18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) 2016 Freescale Semiconductor, Inc.
48c2ecf20Sopenharmony_ci * Copyright 2017-2018 NXP
58c2ecf20Sopenharmony_ci *	Dong Aisheng <aisheng.dong@nxp.com>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#include <dt-bindings/pinctrl/pads-imx8qxp.h>
98c2ecf20Sopenharmony_ci#include <linux/err.h>
108c2ecf20Sopenharmony_ci#include <linux/firmware/imx/sci.h>
118c2ecf20Sopenharmony_ci#include <linux/init.h>
128c2ecf20Sopenharmony_ci#include <linux/io.h>
138c2ecf20Sopenharmony_ci#include <linux/module.h>
148c2ecf20Sopenharmony_ci#include <linux/of.h>
158c2ecf20Sopenharmony_ci#include <linux/of_device.h>
168c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h>
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#include "pinctrl-imx.h"
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc imx8qxp_pinctrl_pads[] = {
218c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_PCIE_CTRL0_PERST_B),
228c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_PCIE_CTRL0_CLKREQ_B),
238c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_PCIE_CTRL0_WAKE_B),
248c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_PCIESEP),
258c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USB_SS3_TC0),
268c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USB_SS3_TC1),
278c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USB_SS3_TC2),
288c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USB_SS3_TC3),
298c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_3V3_USB3IO),
308c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_CLK),
318c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_CMD),
328c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_DATA0),
338c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_DATA1),
348c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_DATA2),
358c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_DATA3),
368c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_SD1FIX0),
378c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_DATA4),
388c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_DATA5),
398c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_DATA6),
408c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_DATA7),
418c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_STROBE),
428c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_EMMC0_RESET_B),
438c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_SD1FIX1),
448c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_RESET_B),
458c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_VSELECT),
468c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CTL_NAND_RE_P_N),
478c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_WP),
488c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_CD_B),
498c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CTL_NAND_DQS_P_N),
508c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_VSELSEP),
518c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_CLK),
528c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_CMD),
538c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_DATA0),
548c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_DATA1),
558c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_DATA2),
568c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_USDHC1_DATA3),
578c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_VSEL3),
588c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_TXC),
598c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_TX_CTL),
608c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_TXD0),
618c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_TXD1),
628c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_TXD2),
638c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_TXD3),
648c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB0),
658c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_RXC),
668c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_RX_CTL),
678c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_RXD0),
688c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_RXD1),
698c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_RXD2),
708c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_RGMII_RXD3),
718c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB1),
728c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_REFCLK_125M_25M),
738c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_MDIO),
748c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ENET0_MDC),
758c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_GPIOCT),
768c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_FSR),
778c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_FST),
788c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_SCKR),
798c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_SCKT),
808c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_TX0),
818c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_TX1),
828c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_TX2_RX3),
838c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_TX3_RX2),
848c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_TX4_RX1),
858c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ESAI0_TX5_RX0),
868c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPDIF0_RX),
878c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPDIF0_TX),
888c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPDIF0_EXT_CLK),
898c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_GPIORHB),
908c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI3_SCK),
918c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI3_SDO),
928c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI3_SDI),
938c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI3_CS0),
948c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI3_CS1),
958c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MCLK_IN1),
968c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MCLK_IN0),
978c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MCLK_OUT0),
988c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_UART1_TX),
998c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_UART1_RX),
1008c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_UART1_RTS_B),
1018c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_UART1_CTS_B),
1028c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_GPIORHK),
1038c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SAI0_TXD),
1048c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SAI0_TXC),
1058c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SAI0_RXD),
1068c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SAI0_TXFS),
1078c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SAI1_RXD),
1088c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SAI1_RXC),
1098c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SAI1_RXFS),
1108c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI2_CS0),
1118c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI2_SDO),
1128c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI2_SDI),
1138c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI2_SCK),
1148c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI0_SCK),
1158c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI0_SDI),
1168c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI0_SDO),
1178c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI0_CS1),
1188c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SPI0_CS0),
1198c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_GPIORHT),
1208c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ADC_IN1),
1218c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ADC_IN0),
1228c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ADC_IN3),
1238c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ADC_IN2),
1248c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ADC_IN5),
1258c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_ADC_IN4),
1268c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_FLEXCAN0_RX),
1278c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_FLEXCAN0_TX),
1288c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_FLEXCAN1_RX),
1298c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_FLEXCAN1_TX),
1308c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_FLEXCAN2_RX),
1318c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_FLEXCAN2_TX),
1328c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_UART0_RX),
1338c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_UART0_TX),
1348c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_UART2_TX),
1358c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_UART2_RX),
1368c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_GPIOLH),
1378c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_DSI0_I2C0_SCL),
1388c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_DSI0_I2C0_SDA),
1398c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_DSI0_GPIO0_00),
1408c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_DSI0_GPIO0_01),
1418c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_DSI1_I2C0_SCL),
1428c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_DSI1_I2C0_SDA),
1438c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_DSI1_GPIO0_00),
1448c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_DSI1_GPIO0_01),
1458c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_MIPIDSIGPIO),
1468c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_JTAG_TRST_B),
1478c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_PMIC_I2C_SCL),
1488c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_PMIC_I2C_SDA),
1498c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_PMIC_INT_B),
1508c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SCU_GPIO0_00),
1518c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SCU_GPIO0_01),
1528c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SCU_PMIC_STANDBY),
1538c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SCU_BOOT_MODE0),
1548c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SCU_BOOT_MODE1),
1558c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SCU_BOOT_MODE2),
1568c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_SCU_BOOT_MODE3),
1578c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_D00),
1588c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_D01),
1598c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_D02),
1608c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_D03),
1618c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_D04),
1628c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_D05),
1638c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_D06),
1648c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_D07),
1658c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_HSYNC),
1668c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_VSYNC),
1678c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_PCLK),
1688c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_MCLK),
1698c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_EN),
1708c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_CSI_RESET),
1718c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_GPIORHD),
1728c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_CSI0_MCLK_OUT),
1738c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_CSI0_I2C0_SCL),
1748c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_CSI0_I2C0_SDA),
1758c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_CSI0_GPIO0_01),
1768c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_MIPI_CSI0_GPIO0_00),
1778c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0A_DATA0),
1788c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0A_DATA1),
1798c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0A_DATA2),
1808c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0A_DATA3),
1818c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0A_DQS),
1828c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0A_SS0_B),
1838c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0A_SS1_B),
1848c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0A_SCLK),
1858c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_QSPI0A),
1868c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0B_SCLK),
1878c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0B_DATA0),
1888c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0B_DATA1),
1898c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0B_DATA2),
1908c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0B_DATA3),
1918c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0B_DQS),
1928c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0B_SS0_B),
1938c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_QSPI0B_SS1_B),
1948c2ecf20Sopenharmony_ci	IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_QSPI0B),
1958c2ecf20Sopenharmony_ci};
1968c2ecf20Sopenharmony_ci
1978c2ecf20Sopenharmony_cistatic struct imx_pinctrl_soc_info imx8qxp_pinctrl_info = {
1988c2ecf20Sopenharmony_ci	.pins = imx8qxp_pinctrl_pads,
1998c2ecf20Sopenharmony_ci	.npins = ARRAY_SIZE(imx8qxp_pinctrl_pads),
2008c2ecf20Sopenharmony_ci	.flags = IMX_USE_SCU,
2018c2ecf20Sopenharmony_ci	.imx_pinconf_get = imx_pinconf_get_scu,
2028c2ecf20Sopenharmony_ci	.imx_pinconf_set = imx_pinconf_set_scu,
2038c2ecf20Sopenharmony_ci	.imx_pinctrl_parse_pin = imx_pinctrl_parse_pin_scu,
2048c2ecf20Sopenharmony_ci};
2058c2ecf20Sopenharmony_ci
2068c2ecf20Sopenharmony_cistatic const struct of_device_id imx8qxp_pinctrl_of_match[] = {
2078c2ecf20Sopenharmony_ci	{ .compatible = "fsl,imx8qxp-iomuxc", },
2088c2ecf20Sopenharmony_ci	{ /* sentinel */ }
2098c2ecf20Sopenharmony_ci};
2108c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(of, imx8qxp_pinctrl_of_match);
2118c2ecf20Sopenharmony_ci
2128c2ecf20Sopenharmony_cistatic int imx8qxp_pinctrl_probe(struct platform_device *pdev)
2138c2ecf20Sopenharmony_ci{
2148c2ecf20Sopenharmony_ci	int ret;
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_ci	ret = imx_pinctrl_sc_ipc_init(pdev);
2178c2ecf20Sopenharmony_ci	if (ret)
2188c2ecf20Sopenharmony_ci		return ret;
2198c2ecf20Sopenharmony_ci
2208c2ecf20Sopenharmony_ci	return imx_pinctrl_probe(pdev, &imx8qxp_pinctrl_info);
2218c2ecf20Sopenharmony_ci}
2228c2ecf20Sopenharmony_ci
2238c2ecf20Sopenharmony_cistatic struct platform_driver imx8qxp_pinctrl_driver = {
2248c2ecf20Sopenharmony_ci	.driver = {
2258c2ecf20Sopenharmony_ci		.name = "imx8qxp-pinctrl",
2268c2ecf20Sopenharmony_ci		.of_match_table = of_match_ptr(imx8qxp_pinctrl_of_match),
2278c2ecf20Sopenharmony_ci		.suppress_bind_attrs = true,
2288c2ecf20Sopenharmony_ci	},
2298c2ecf20Sopenharmony_ci	.probe = imx8qxp_pinctrl_probe,
2308c2ecf20Sopenharmony_ci};
2318c2ecf20Sopenharmony_ci
2328c2ecf20Sopenharmony_cistatic int __init imx8qxp_pinctrl_init(void)
2338c2ecf20Sopenharmony_ci{
2348c2ecf20Sopenharmony_ci	return platform_driver_register(&imx8qxp_pinctrl_driver);
2358c2ecf20Sopenharmony_ci}
2368c2ecf20Sopenharmony_ciarch_initcall(imx8qxp_pinctrl_init);
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_ciMODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>");
2398c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("NXP i.MX8QXP pinctrl driver");
2408c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2");
241