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-imx8qm.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/module.h> 138c2ecf20Sopenharmony_ci#include <linux/of.h> 148c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 158c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#include "pinctrl-imx.h" 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc imx8qm_pinctrl_pads[] = { 208c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SIM0_CLK), 218c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SIM0_RST), 228c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SIM0_IO), 238c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SIM0_PD), 248c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SIM0_POWER_EN), 258c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SIM0_GPIO0_00), 268c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_SIM), 278c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_M40_I2C0_SCL), 288c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_M40_I2C0_SDA), 298c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_M40_GPIO0_00), 308c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_M40_GPIO0_01), 318c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_M41_I2C0_SCL), 328c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_M41_I2C0_SDA), 338c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_M41_GPIO0_00), 348c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_M41_GPIO0_01), 358c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_GPT0_CLK), 368c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_GPT0_CAPTURE), 378c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_GPT0_COMPARE), 388c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_GPT1_CLK), 398c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_GPT1_CAPTURE), 408c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_GPT1_COMPARE), 418c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_UART0_RX), 428c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_UART0_TX), 438c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_UART0_RTS_B), 448c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_UART0_CTS_B), 458c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_UART1_TX), 468c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_UART1_RX), 478c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_UART1_RTS_B), 488c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_UART1_CTS_B), 498c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_GPIOLH), 508c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_PMIC_MEMC_ON), 518c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_WDOG_OUT), 528c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PMIC_I2C_SDA), 538c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PMIC_I2C_SCL), 548c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PMIC_EARLY_WARNING), 558c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PMIC_INT_B), 568c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_GPIO0_00), 578c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_GPIO0_01), 588c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_GPIO0_02), 598c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_GPIO0_03), 608c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_GPIO0_04), 618c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_GPIO0_05), 628c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_GPIO0_06), 638c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_GPIO0_07), 648c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_BOOT_MODE0), 658c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_BOOT_MODE1), 668c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_BOOT_MODE2), 678c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_BOOT_MODE3), 688c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_BOOT_MODE4), 698c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SCU_BOOT_MODE5), 708c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS0_GPIO00), 718c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS0_GPIO01), 728c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS0_I2C0_SCL), 738c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS0_I2C0_SDA), 748c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS0_I2C1_SCL), 758c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS0_I2C1_SDA), 768c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS1_GPIO00), 778c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS1_GPIO01), 788c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS1_I2C0_SCL), 798c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS1_I2C0_SDA), 808c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS1_I2C1_SCL), 818c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_LVDS1_I2C1_SDA), 828c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_LVDSGPIO), 838c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_DSI0_I2C0_SCL), 848c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_DSI0_I2C0_SDA), 858c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_DSI0_GPIO0_00), 868c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_DSI0_GPIO0_01), 878c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_DSI1_I2C0_SCL), 888c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_DSI1_I2C0_SDA), 898c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_DSI1_GPIO0_00), 908c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_DSI1_GPIO0_01), 918c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_MIPIDSIGPIO), 928c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI0_MCLK_OUT), 938c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI0_I2C0_SCL), 948c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI0_I2C0_SDA), 958c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI0_GPIO0_00), 968c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI0_GPIO0_01), 978c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI1_MCLK_OUT), 988c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI1_GPIO0_00), 998c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI1_GPIO0_01), 1008c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI1_I2C0_SCL), 1018c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MIPI_CSI1_I2C0_SDA), 1028c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_HDMI_TX0_TS_SCL), 1038c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_HDMI_TX0_TS_SDA), 1048c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_3V3_HDMIGPIO), 1058c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_FSR), 1068c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_FST), 1078c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_SCKR), 1088c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_SCKT), 1098c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_TX0), 1108c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_TX1), 1118c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_TX2_RX3), 1128c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_TX3_RX2), 1138c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_TX4_RX1), 1148c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI1_TX5_RX0), 1158c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPDIF0_RX), 1168c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPDIF0_TX), 1178c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPDIF0_EXT_CLK), 1188c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI3_SCK), 1198c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI3_SDO), 1208c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI3_SDI), 1218c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI3_CS0), 1228c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI3_CS1), 1238c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_GPIORHB), 1248c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_FSR), 1258c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_FST), 1268c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_SCKR), 1278c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_SCKT), 1288c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_TX0), 1298c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_TX1), 1308c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_TX2_RX3), 1318c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_TX3_RX2), 1328c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_TX4_RX1), 1338c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ESAI0_TX5_RX0), 1348c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MCLK_IN0), 1358c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MCLK_OUT0), 1368c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_GPIORHC), 1378c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI0_SCK), 1388c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI0_SDO), 1398c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI0_SDI), 1408c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI0_CS0), 1418c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI0_CS1), 1428c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI2_SCK), 1438c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI2_SDO), 1448c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI2_SDI), 1458c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI2_CS0), 1468c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SPI2_CS1), 1478c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SAI1_RXC), 1488c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SAI1_RXD), 1498c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SAI1_RXFS), 1508c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SAI1_TXC), 1518c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SAI1_TXD), 1528c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_SAI1_TXFS), 1538c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_GPIORHT), 1548c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ADC_IN7), 1558c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ADC_IN6), 1568c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ADC_IN5), 1578c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ADC_IN4), 1588c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ADC_IN3), 1598c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ADC_IN2), 1608c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ADC_IN1), 1618c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ADC_IN0), 1628c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MLB_SIG), 1638c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MLB_CLK), 1648c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_MLB_DATA), 1658c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_GPIOLHT), 1668c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_FLEXCAN0_RX), 1678c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_FLEXCAN0_TX), 1688c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_FLEXCAN1_RX), 1698c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_FLEXCAN1_TX), 1708c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_FLEXCAN2_RX), 1718c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_FLEXCAN2_TX), 1728c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_GPIOTHR), 1738c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USB_SS3_TC0), 1748c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USB_SS3_TC1), 1758c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USB_SS3_TC2), 1768c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USB_SS3_TC3), 1778c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_3V3_USB3IO), 1788c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_RESET_B), 1798c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_VSELECT), 1808c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_RESET_B), 1818c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_VSELECT), 1828c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_WP), 1838c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_CD_B), 1848c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_VSELSEP), 1858c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_MDIO), 1868c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_MDC), 1878c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_REFCLK_125M_25M), 1888c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_REFCLK_125M_25M), 1898c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_MDIO), 1908c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_MDC), 1918c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_GPIOCT), 1928c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI1A_SS0_B), 1938c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI1A_SS1_B), 1948c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI1A_SCLK), 1958c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI1A_DQS), 1968c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI1A_DATA3), 1978c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI1A_DATA2), 1988c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI1A_DATA1), 1998c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI1A_DATA0), 2008c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_QSPI1), 2018c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0A_DATA0), 2028c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0A_DATA1), 2038c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0A_DATA2), 2048c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0A_DATA3), 2058c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0A_DQS), 2068c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0A_SS0_B), 2078c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0A_SS1_B), 2088c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0A_SCLK), 2098c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0B_SCLK), 2108c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0B_DATA0), 2118c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0B_DATA1), 2128c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0B_DATA2), 2138c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0B_DATA3), 2148c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0B_DQS), 2158c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0B_SS0_B), 2168c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_QSPI0B_SS1_B), 2178c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_QSPI0), 2188c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PCIE_CTRL0_CLKREQ_B), 2198c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PCIE_CTRL0_WAKE_B), 2208c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PCIE_CTRL0_PERST_B), 2218c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PCIE_CTRL1_CLKREQ_B), 2228c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PCIE_CTRL1_WAKE_B), 2238c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_PCIE_CTRL1_PERST_B), 2248c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_PCIESEP), 2258c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USB_HSIC0_DATA), 2268c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USB_HSIC0_STROBE), 2278c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_CALIBRATION_0_HSIC), 2288c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_CALIBRATION_1_HSIC), 2298c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_CLK), 2308c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_CMD), 2318c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_DATA0), 2328c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_DATA1), 2338c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_DATA2), 2348c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_DATA3), 2358c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_DATA4), 2368c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_DATA5), 2378c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_DATA6), 2388c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_DATA7), 2398c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_STROBE), 2408c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_EMMC0_RESET_B), 2418c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_SD1FIX), 2428c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_CLK), 2438c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_CMD), 2448c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_DATA0), 2458c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_DATA1), 2468c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_CTL_NAND_RE_P_N), 2478c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_DATA2), 2488c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_DATA3), 2498c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_CTL_NAND_DQS_P_N), 2508c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_DATA4), 2518c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_DATA5), 2528c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_DATA6), 2538c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_DATA7), 2548c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC1_STROBE), 2558c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_VSEL2), 2568c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_CLK), 2578c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_CMD), 2588c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_DATA0), 2598c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_DATA1), 2608c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_DATA2), 2618c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_USDHC2_DATA3), 2628c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_VSEL3), 2638c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_TXC), 2648c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_TX_CTL), 2658c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_TXD0), 2668c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_TXD1), 2678c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_TXD2), 2688c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_TXD3), 2698c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_RXC), 2708c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_RX_CTL), 2718c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_RXD0), 2728c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_RXD1), 2738c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_RXD2), 2748c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET0_RGMII_RXD3), 2758c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB), 2768c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_TXC), 2778c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_TX_CTL), 2788c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_TXD0), 2798c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_TXD1), 2808c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_TXD2), 2818c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_TXD3), 2828c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_RXC), 2838c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_RX_CTL), 2848c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_RXD0), 2858c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_RXD1), 2868c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_RXD2), 2878c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_ENET1_RGMII_RXD3), 2888c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(IMX8QM_COMP_CTL_GPIO_1V8_3V3_ENET_ENETA), 2898c2ecf20Sopenharmony_ci}; 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_cistatic const struct imx_pinctrl_soc_info imx8qm_pinctrl_info = { 2928c2ecf20Sopenharmony_ci .pins = imx8qm_pinctrl_pads, 2938c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(imx8qm_pinctrl_pads), 2948c2ecf20Sopenharmony_ci .flags = IMX_USE_SCU, 2958c2ecf20Sopenharmony_ci .imx_pinconf_get = imx_pinconf_get_scu, 2968c2ecf20Sopenharmony_ci .imx_pinconf_set = imx_pinconf_set_scu, 2978c2ecf20Sopenharmony_ci .imx_pinctrl_parse_pin = imx_pinctrl_parse_pin_scu, 2988c2ecf20Sopenharmony_ci}; 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_cistatic const struct of_device_id imx8qm_pinctrl_of_match[] = { 3018c2ecf20Sopenharmony_ci { .compatible = "fsl,imx8qm-iomuxc", }, 3028c2ecf20Sopenharmony_ci { /* sentinel */ } 3038c2ecf20Sopenharmony_ci}; 3048c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(of, imx8qm_pinctrl_of_match); 3058c2ecf20Sopenharmony_ci 3068c2ecf20Sopenharmony_cistatic int imx8qm_pinctrl_probe(struct platform_device *pdev) 3078c2ecf20Sopenharmony_ci{ 3088c2ecf20Sopenharmony_ci int ret; 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_ci ret = imx_pinctrl_sc_ipc_init(pdev); 3118c2ecf20Sopenharmony_ci if (ret) 3128c2ecf20Sopenharmony_ci return ret; 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ci return imx_pinctrl_probe(pdev, &imx8qm_pinctrl_info); 3158c2ecf20Sopenharmony_ci} 3168c2ecf20Sopenharmony_ci 3178c2ecf20Sopenharmony_cistatic struct platform_driver imx8qm_pinctrl_driver = { 3188c2ecf20Sopenharmony_ci .driver = { 3198c2ecf20Sopenharmony_ci .name = "imx8qm-pinctrl", 3208c2ecf20Sopenharmony_ci .of_match_table = of_match_ptr(imx8qm_pinctrl_of_match), 3218c2ecf20Sopenharmony_ci .suppress_bind_attrs = true, 3228c2ecf20Sopenharmony_ci }, 3238c2ecf20Sopenharmony_ci .probe = imx8qm_pinctrl_probe, 3248c2ecf20Sopenharmony_ci}; 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_cistatic int __init imx8qm_pinctrl_init(void) 3278c2ecf20Sopenharmony_ci{ 3288c2ecf20Sopenharmony_ci return platform_driver_register(&imx8qm_pinctrl_driver); 3298c2ecf20Sopenharmony_ci} 3308c2ecf20Sopenharmony_ciarch_initcall(imx8qm_pinctrl_init); 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ciMODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>"); 3338c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("NXP i.MX8QM pinctrl driver"); 3348c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2"); 335