1c2b39decSFabio Estevam // SPDX-License-Identifier: GPL-2.0 2c2b39decSFabio Estevam // 3c2b39decSFabio Estevam // Freescale imx6ul pinctrl driver 4c2b39decSFabio Estevam // 5c2b39decSFabio Estevam // Author: Anson Huang <Anson.Huang@freescale.com> 6c2b39decSFabio Estevam // Copyright (C) 2015 Freescale Semiconductor, Inc. 79612327cSFrank Li 89612327cSFrank Li #include <linux/err.h> 99612327cSFrank Li #include <linux/init.h> 109612327cSFrank Li #include <linux/io.h> 119612327cSFrank Li #include <linux/of.h> 129612327cSFrank Li #include <linux/of_device.h> 139612327cSFrank Li #include <linux/pinctrl/pinctrl.h> 149612327cSFrank Li 159612327cSFrank Li #include "pinctrl-imx.h" 169612327cSFrank Li 179612327cSFrank Li enum imx6ul_pads { 189612327cSFrank Li MX6UL_PAD_RESERVE0 = 0, 199612327cSFrank Li MX6UL_PAD_RESERVE1 = 1, 209612327cSFrank Li MX6UL_PAD_RESERVE2 = 2, 219612327cSFrank Li MX6UL_PAD_RESERVE3 = 3, 229612327cSFrank Li MX6UL_PAD_RESERVE4 = 4, 239612327cSFrank Li MX6UL_PAD_RESERVE5 = 5, 249612327cSFrank Li MX6UL_PAD_RESERVE6 = 6, 259612327cSFrank Li MX6UL_PAD_RESERVE7 = 7, 269612327cSFrank Li MX6UL_PAD_RESERVE8 = 8, 279612327cSFrank Li MX6UL_PAD_RESERVE9 = 9, 289612327cSFrank Li MX6UL_PAD_RESERVE10 = 10, 299612327cSFrank Li MX6UL_PAD_SNVS_TAMPER4 = 11, 309612327cSFrank Li MX6UL_PAD_RESERVE12 = 12, 319612327cSFrank Li MX6UL_PAD_RESERVE13 = 13, 329612327cSFrank Li MX6UL_PAD_RESERVE14 = 14, 339612327cSFrank Li MX6UL_PAD_RESERVE15 = 15, 349612327cSFrank Li MX6UL_PAD_RESERVE16 = 16, 359612327cSFrank Li MX6UL_PAD_JTAG_MOD = 17, 369612327cSFrank Li MX6UL_PAD_JTAG_TMS = 18, 379612327cSFrank Li MX6UL_PAD_JTAG_TDO = 19, 389612327cSFrank Li MX6UL_PAD_JTAG_TDI = 20, 399612327cSFrank Li MX6UL_PAD_JTAG_TCK = 21, 409612327cSFrank Li MX6UL_PAD_JTAG_TRST_B = 22, 419612327cSFrank Li MX6UL_PAD_GPIO1_IO00 = 23, 429612327cSFrank Li MX6UL_PAD_GPIO1_IO01 = 24, 439612327cSFrank Li MX6UL_PAD_GPIO1_IO02 = 25, 449612327cSFrank Li MX6UL_PAD_GPIO1_IO03 = 26, 459612327cSFrank Li MX6UL_PAD_GPIO1_IO04 = 27, 469612327cSFrank Li MX6UL_PAD_GPIO1_IO05 = 28, 479612327cSFrank Li MX6UL_PAD_GPIO1_IO06 = 29, 489612327cSFrank Li MX6UL_PAD_GPIO1_IO07 = 30, 499612327cSFrank Li MX6UL_PAD_GPIO1_IO08 = 31, 509612327cSFrank Li MX6UL_PAD_GPIO1_IO09 = 32, 519612327cSFrank Li MX6UL_PAD_UART1_TX_DATA = 33, 529612327cSFrank Li MX6UL_PAD_UART1_RX_DATA = 34, 539612327cSFrank Li MX6UL_PAD_UART1_CTS_B = 35, 549612327cSFrank Li MX6UL_PAD_UART1_RTS_B = 36, 559612327cSFrank Li MX6UL_PAD_UART2_TX_DATA = 37, 569612327cSFrank Li MX6UL_PAD_UART2_RX_DATA = 38, 579612327cSFrank Li MX6UL_PAD_UART2_CTS_B = 39, 589612327cSFrank Li MX6UL_PAD_UART2_RTS_B = 40, 599612327cSFrank Li MX6UL_PAD_UART3_TX_DATA = 41, 609612327cSFrank Li MX6UL_PAD_UART3_RX_DATA = 42, 619612327cSFrank Li MX6UL_PAD_UART3_CTS_B = 43, 629612327cSFrank Li MX6UL_PAD_UART3_RTS_B = 44, 639612327cSFrank Li MX6UL_PAD_UART4_TX_DATA = 45, 649612327cSFrank Li MX6UL_PAD_UART4_RX_DATA = 46, 659612327cSFrank Li MX6UL_PAD_UART5_TX_DATA = 47, 669612327cSFrank Li MX6UL_PAD_UART5_RX_DATA = 48, 679612327cSFrank Li MX6UL_PAD_ENET1_RX_DATA0 = 49, 689612327cSFrank Li MX6UL_PAD_ENET1_RX_DATA1 = 50, 699612327cSFrank Li MX6UL_PAD_ENET1_RX_EN = 51, 709612327cSFrank Li MX6UL_PAD_ENET1_TX_DATA0 = 52, 719612327cSFrank Li MX6UL_PAD_ENET1_TX_DATA1 = 53, 729612327cSFrank Li MX6UL_PAD_ENET1_TX_EN = 54, 739612327cSFrank Li MX6UL_PAD_ENET1_TX_CLK = 55, 749612327cSFrank Li MX6UL_PAD_ENET1_RX_ER = 56, 759612327cSFrank Li MX6UL_PAD_ENET2_RX_DATA0 = 57, 769612327cSFrank Li MX6UL_PAD_ENET2_RX_DATA1 = 58, 779612327cSFrank Li MX6UL_PAD_ENET2_RX_EN = 59, 789612327cSFrank Li MX6UL_PAD_ENET2_TX_DATA0 = 60, 799612327cSFrank Li MX6UL_PAD_ENET2_TX_DATA1 = 61, 809612327cSFrank Li MX6UL_PAD_ENET2_TX_EN = 62, 819612327cSFrank Li MX6UL_PAD_ENET2_TX_CLK = 63, 829612327cSFrank Li MX6UL_PAD_ENET2_RX_ER = 64, 839612327cSFrank Li MX6UL_PAD_LCD_CLK = 65, 849612327cSFrank Li MX6UL_PAD_LCD_ENABLE = 66, 859612327cSFrank Li MX6UL_PAD_LCD_HSYNC = 67, 869612327cSFrank Li MX6UL_PAD_LCD_VSYNC = 68, 879612327cSFrank Li MX6UL_PAD_LCD_RESET = 69, 889612327cSFrank Li MX6UL_PAD_LCD_DATA00 = 70, 899612327cSFrank Li MX6UL_PAD_LCD_DATA01 = 71, 909612327cSFrank Li MX6UL_PAD_LCD_DATA02 = 72, 919612327cSFrank Li MX6UL_PAD_LCD_DATA03 = 73, 929612327cSFrank Li MX6UL_PAD_LCD_DATA04 = 74, 939612327cSFrank Li MX6UL_PAD_LCD_DATA05 = 75, 949612327cSFrank Li MX6UL_PAD_LCD_DATA06 = 76, 959612327cSFrank Li MX6UL_PAD_LCD_DATA07 = 77, 969612327cSFrank Li MX6UL_PAD_LCD_DATA08 = 78, 979612327cSFrank Li MX6UL_PAD_LCD_DATA09 = 79, 989612327cSFrank Li MX6UL_PAD_LCD_DATA10 = 80, 999612327cSFrank Li MX6UL_PAD_LCD_DATA11 = 81, 1009612327cSFrank Li MX6UL_PAD_LCD_DATA12 = 82, 1019612327cSFrank Li MX6UL_PAD_LCD_DATA13 = 83, 1029612327cSFrank Li MX6UL_PAD_LCD_DATA14 = 84, 1039612327cSFrank Li MX6UL_PAD_LCD_DATA15 = 85, 1049612327cSFrank Li MX6UL_PAD_LCD_DATA16 = 86, 1059612327cSFrank Li MX6UL_PAD_LCD_DATA17 = 87, 1069612327cSFrank Li MX6UL_PAD_LCD_DATA18 = 88, 1079612327cSFrank Li MX6UL_PAD_LCD_DATA19 = 89, 1089612327cSFrank Li MX6UL_PAD_LCD_DATA20 = 90, 1099612327cSFrank Li MX6UL_PAD_LCD_DATA21 = 91, 1109612327cSFrank Li MX6UL_PAD_LCD_DATA22 = 92, 1119612327cSFrank Li MX6UL_PAD_LCD_DATA23 = 93, 1129612327cSFrank Li MX6UL_PAD_NAND_RE_B = 94, 1139612327cSFrank Li MX6UL_PAD_NAND_WE_B = 95, 1149612327cSFrank Li MX6UL_PAD_NAND_DATA00 = 96, 1159612327cSFrank Li MX6UL_PAD_NAND_DATA01 = 97, 1169612327cSFrank Li MX6UL_PAD_NAND_DATA02 = 98, 1179612327cSFrank Li MX6UL_PAD_NAND_DATA03 = 99, 1189612327cSFrank Li MX6UL_PAD_NAND_DATA04 = 100, 1199612327cSFrank Li MX6UL_PAD_NAND_DATA05 = 101, 1209612327cSFrank Li MX6UL_PAD_NAND_DATA06 = 102, 1219612327cSFrank Li MX6UL_PAD_NAND_DATA07 = 103, 1229612327cSFrank Li MX6UL_PAD_NAND_ALE = 104, 1239612327cSFrank Li MX6UL_PAD_NAND_WP_B = 105, 1249612327cSFrank Li MX6UL_PAD_NAND_READY_B = 106, 1259612327cSFrank Li MX6UL_PAD_NAND_CE0_B = 107, 1269612327cSFrank Li MX6UL_PAD_NAND_CE1_B = 108, 1279612327cSFrank Li MX6UL_PAD_NAND_CLE = 109, 1289612327cSFrank Li MX6UL_PAD_NAND_DQS = 110, 1299612327cSFrank Li MX6UL_PAD_SD1_CMD = 111, 1309612327cSFrank Li MX6UL_PAD_SD1_CLK = 112, 1319612327cSFrank Li MX6UL_PAD_SD1_DATA0 = 113, 1329612327cSFrank Li MX6UL_PAD_SD1_DATA1 = 114, 1339612327cSFrank Li MX6UL_PAD_SD1_DATA2 = 115, 1349612327cSFrank Li MX6UL_PAD_SD1_DATA3 = 116, 1359612327cSFrank Li MX6UL_PAD_CSI_MCLK = 117, 1369612327cSFrank Li MX6UL_PAD_CSI_PIXCLK = 118, 1379612327cSFrank Li MX6UL_PAD_CSI_VSYNC = 119, 1389612327cSFrank Li MX6UL_PAD_CSI_HSYNC = 120, 1399612327cSFrank Li MX6UL_PAD_CSI_DATA00 = 121, 1409612327cSFrank Li MX6UL_PAD_CSI_DATA01 = 122, 1419612327cSFrank Li MX6UL_PAD_CSI_DATA02 = 123, 1429612327cSFrank Li MX6UL_PAD_CSI_DATA03 = 124, 1439612327cSFrank Li MX6UL_PAD_CSI_DATA04 = 125, 1449612327cSFrank Li MX6UL_PAD_CSI_DATA05 = 126, 1459612327cSFrank Li MX6UL_PAD_CSI_DATA06 = 127, 1469612327cSFrank Li MX6UL_PAD_CSI_DATA07 = 128, 1479612327cSFrank Li }; 1489612327cSFrank Li 149ba33f4f4SBai Ping enum imx6ull_lpsr_pads { 150ba33f4f4SBai Ping MX6ULL_PAD_BOOT_MODE0 = 0, 151ba33f4f4SBai Ping MX6ULL_PAD_BOOT_MODE1 = 1, 152ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER0 = 2, 153ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER1 = 3, 154ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER2 = 4, 155ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER3 = 5, 156ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER4 = 6, 157ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER5 = 7, 158ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER6 = 8, 159ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER7 = 9, 160ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER8 = 10, 161ba33f4f4SBai Ping MX6ULL_PAD_SNVS_TAMPER9 = 11, 162ba33f4f4SBai Ping }; 163ba33f4f4SBai Ping 1649612327cSFrank Li /* Pad names for the pinmux subsystem */ 1659612327cSFrank Li static const struct pinctrl_pin_desc imx6ul_pinctrl_pads[] = { 1669612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE0), 1679612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE1), 1689612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE2), 1699612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE3), 1709612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE4), 1719612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE5), 1729612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE6), 1739612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE7), 1749612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE8), 1759612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE9), 1769612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE10), 1779612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_SNVS_TAMPER4), 1789612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE12), 1799612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE13), 1809612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE14), 1819612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE15), 1829612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE16), 1839612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_JTAG_MOD), 1849612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_JTAG_TMS), 1859612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_JTAG_TDO), 1869612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_JTAG_TDI), 1879612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_JTAG_TCK), 1889612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_JTAG_TRST_B), 1899612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO00), 1909612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO01), 1919612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO02), 1929612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO03), 1939612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO04), 1949612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO05), 1959612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO06), 1969612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO07), 1979612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO08), 1989612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_GPIO1_IO09), 1999612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART1_TX_DATA), 2009612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART1_RX_DATA), 2019612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART1_CTS_B), 2029612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART1_RTS_B), 2039612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART2_TX_DATA), 2049612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART2_RX_DATA), 2059612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART2_CTS_B), 2069612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART2_RTS_B), 2079612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART3_TX_DATA), 2089612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART3_RX_DATA), 2099612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART3_CTS_B), 2109612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART3_RTS_B), 2119612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART4_TX_DATA), 2129612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART4_RX_DATA), 2139612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART5_TX_DATA), 2149612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_UART5_RX_DATA), 2159612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET1_RX_DATA0), 2169612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET1_RX_DATA1), 2179612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET1_RX_EN), 2189612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET1_TX_DATA0), 2199612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET1_TX_DATA1), 2209612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET1_TX_EN), 2219612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET1_TX_CLK), 2229612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET1_RX_ER), 2239612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET2_RX_DATA0), 2249612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET2_RX_DATA1), 2259612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET2_RX_EN), 2269612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET2_TX_DATA0), 2279612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET2_TX_DATA1), 2289612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET2_TX_EN), 2299612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET2_TX_CLK), 2309612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_ENET2_RX_ER), 2319612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_CLK), 2329612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_ENABLE), 2339612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_HSYNC), 2349612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_VSYNC), 2359612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_RESET), 2369612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA00), 2379612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA01), 2389612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA02), 2399612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA03), 2409612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA04), 2419612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA05), 2429612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA06), 2439612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA07), 2449612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA08), 2459612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA09), 2469612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA10), 2479612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA11), 2489612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA12), 2499612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA13), 2509612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA14), 2519612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA15), 2529612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA16), 2539612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA17), 2549612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA18), 2559612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA19), 2569612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA20), 2579612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA21), 2589612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA22), 2599612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_LCD_DATA23), 2609612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_RE_B), 2619612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_WE_B), 2629612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_DATA00), 2639612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_DATA01), 2649612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_DATA02), 2659612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_DATA03), 2669612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_DATA04), 2679612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_DATA05), 2689612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_DATA06), 2699612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_DATA07), 2709612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_ALE), 2719612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_WP_B), 2729612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_READY_B), 2739612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_CE0_B), 2749612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_CE1_B), 2759612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_CLE), 2769612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_NAND_DQS), 2779612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_SD1_CMD), 2789612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_SD1_CLK), 2799612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_SD1_DATA0), 2809612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_SD1_DATA1), 2819612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_SD1_DATA2), 2829612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_SD1_DATA3), 2839612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_MCLK), 2849612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_PIXCLK), 2859612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_VSYNC), 2869612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_HSYNC), 2879612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_DATA00), 2889612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_DATA01), 2899612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_DATA02), 2909612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_DATA03), 2919612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_DATA04), 2929612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_DATA05), 2939612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_DATA06), 2949612327cSFrank Li IMX_PINCTRL_PIN(MX6UL_PAD_CSI_DATA07), 2959612327cSFrank Li }; 2969612327cSFrank Li 297ba33f4f4SBai Ping /* pad for i.MX6ULL lpsr pinmux */ 298ba33f4f4SBai Ping static const struct pinctrl_pin_desc imx6ull_snvs_pinctrl_pads[] = { 299ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_BOOT_MODE0), 300ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_BOOT_MODE1), 301ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER0), 302ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER1), 303ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER2), 304ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER3), 305ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER4), 306ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER5), 307ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER6), 308ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER7), 309ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER8), 310ba33f4f4SBai Ping IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER9), 311ba33f4f4SBai Ping }; 312ba33f4f4SBai Ping 313ba33f4f4SBai Ping static const struct imx_pinctrl_soc_info imx6ul_pinctrl_info = { 3149612327cSFrank Li .pins = imx6ul_pinctrl_pads, 3159612327cSFrank Li .npins = ARRAY_SIZE(imx6ul_pinctrl_pads), 3168626ada8SPhilipp Zabel .gpr_compatible = "fsl,imx6ul-iomuxc-gpr", 3179612327cSFrank Li }; 3189612327cSFrank Li 319ba33f4f4SBai Ping static const struct imx_pinctrl_soc_info imx6ull_snvs_pinctrl_info = { 320ba33f4f4SBai Ping .pins = imx6ull_snvs_pinctrl_pads, 321ba33f4f4SBai Ping .npins = ARRAY_SIZE(imx6ull_snvs_pinctrl_pads), 322ba33f4f4SBai Ping .flags = ZERO_OFFSET_VALID, 323ba33f4f4SBai Ping }; 324ba33f4f4SBai Ping 325ba33f4f4SBai Ping static const struct of_device_id imx6ul_pinctrl_of_match[] = { 326ba33f4f4SBai Ping { .compatible = "fsl,imx6ul-iomuxc", .data = &imx6ul_pinctrl_info, }, 327ba33f4f4SBai Ping { .compatible = "fsl,imx6ull-iomuxc-snvs", .data = &imx6ull_snvs_pinctrl_info, }, 3289612327cSFrank Li { /* sentinel */ } 3299612327cSFrank Li }; 3309612327cSFrank Li 3319612327cSFrank Li static int imx6ul_pinctrl_probe(struct platform_device *pdev) 3329612327cSFrank Li { 333ba33f4f4SBai Ping const struct imx_pinctrl_soc_info *pinctrl_info; 334ba33f4f4SBai Ping 335ba33f4f4SBai Ping pinctrl_info = of_device_get_match_data(&pdev->dev); 336ba33f4f4SBai Ping if (!pinctrl_info) 337ba33f4f4SBai Ping return -ENODEV; 338ba33f4f4SBai Ping 339ba33f4f4SBai Ping return imx_pinctrl_probe(pdev, pinctrl_info); 3409612327cSFrank Li } 3419612327cSFrank Li 3429612327cSFrank Li static struct platform_driver imx6ul_pinctrl_driver = { 3439612327cSFrank Li .driver = { 3449612327cSFrank Li .name = "imx6ul-pinctrl", 345*f6b6db2dSFabio Estevam .of_match_table = imx6ul_pinctrl_of_match, 3469612327cSFrank Li }, 3479612327cSFrank Li .probe = imx6ul_pinctrl_probe, 3489612327cSFrank Li }; 3499612327cSFrank Li 3509612327cSFrank Li static int __init imx6ul_pinctrl_init(void) 3519612327cSFrank Li { 3529612327cSFrank Li return platform_driver_register(&imx6ul_pinctrl_driver); 3539612327cSFrank Li } 3549612327cSFrank Li arch_initcall(imx6ul_pinctrl_init); 355