18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Driver for the ST Microelectronics SPEAr1310 pinmux 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (C) 2012 ST Microelectronics 58c2ecf20Sopenharmony_ci * Viresh Kumar <vireshk@kernel.org> 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * This file is licensed under the terms of the GNU General Public 88c2ecf20Sopenharmony_ci * License version 2. This program is licensed "as is" without any 98c2ecf20Sopenharmony_ci * warranty of any kind, whether express or implied. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/err.h> 138c2ecf20Sopenharmony_ci#include <linux/init.h> 148c2ecf20Sopenharmony_ci#include <linux/of_device.h> 158c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 168c2ecf20Sopenharmony_ci#include "pinctrl-spear.h" 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define DRIVER_NAME "spear1310-pinmux" 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* pins */ 218c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc spear1310_pins[] = { 228c2ecf20Sopenharmony_ci SPEAR_PIN_0_TO_101, 238c2ecf20Sopenharmony_ci SPEAR_PIN_102_TO_245, 248c2ecf20Sopenharmony_ci}; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/* registers */ 278c2ecf20Sopenharmony_ci#define PERIP_CFG 0x3B0 288c2ecf20Sopenharmony_ci #define MCIF_SEL_SHIFT 5 298c2ecf20Sopenharmony_ci #define MCIF_SEL_SD (0x1 << MCIF_SEL_SHIFT) 308c2ecf20Sopenharmony_ci #define MCIF_SEL_CF (0x2 << MCIF_SEL_SHIFT) 318c2ecf20Sopenharmony_ci #define MCIF_SEL_XD (0x3 << MCIF_SEL_SHIFT) 328c2ecf20Sopenharmony_ci #define MCIF_SEL_MASK (0x3 << MCIF_SEL_SHIFT) 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#define PCIE_SATA_CFG 0x3A4 358c2ecf20Sopenharmony_ci #define PCIE_SATA2_SEL_PCIE (0 << 31) 368c2ecf20Sopenharmony_ci #define PCIE_SATA1_SEL_PCIE (0 << 30) 378c2ecf20Sopenharmony_ci #define PCIE_SATA0_SEL_PCIE (0 << 29) 388c2ecf20Sopenharmony_ci #define PCIE_SATA2_SEL_SATA (1 << 31) 398c2ecf20Sopenharmony_ci #define PCIE_SATA1_SEL_SATA (1 << 30) 408c2ecf20Sopenharmony_ci #define PCIE_SATA0_SEL_SATA (1 << 29) 418c2ecf20Sopenharmony_ci #define SATA2_CFG_TX_CLK_EN (1 << 27) 428c2ecf20Sopenharmony_ci #define SATA2_CFG_RX_CLK_EN (1 << 26) 438c2ecf20Sopenharmony_ci #define SATA2_CFG_POWERUP_RESET (1 << 25) 448c2ecf20Sopenharmony_ci #define SATA2_CFG_PM_CLK_EN (1 << 24) 458c2ecf20Sopenharmony_ci #define SATA1_CFG_TX_CLK_EN (1 << 23) 468c2ecf20Sopenharmony_ci #define SATA1_CFG_RX_CLK_EN (1 << 22) 478c2ecf20Sopenharmony_ci #define SATA1_CFG_POWERUP_RESET (1 << 21) 488c2ecf20Sopenharmony_ci #define SATA1_CFG_PM_CLK_EN (1 << 20) 498c2ecf20Sopenharmony_ci #define SATA0_CFG_TX_CLK_EN (1 << 19) 508c2ecf20Sopenharmony_ci #define SATA0_CFG_RX_CLK_EN (1 << 18) 518c2ecf20Sopenharmony_ci #define SATA0_CFG_POWERUP_RESET (1 << 17) 528c2ecf20Sopenharmony_ci #define SATA0_CFG_PM_CLK_EN (1 << 16) 538c2ecf20Sopenharmony_ci #define PCIE2_CFG_DEVICE_PRESENT (1 << 11) 548c2ecf20Sopenharmony_ci #define PCIE2_CFG_POWERUP_RESET (1 << 10) 558c2ecf20Sopenharmony_ci #define PCIE2_CFG_CORE_CLK_EN (1 << 9) 568c2ecf20Sopenharmony_ci #define PCIE2_CFG_AUX_CLK_EN (1 << 8) 578c2ecf20Sopenharmony_ci #define PCIE1_CFG_DEVICE_PRESENT (1 << 7) 588c2ecf20Sopenharmony_ci #define PCIE1_CFG_POWERUP_RESET (1 << 6) 598c2ecf20Sopenharmony_ci #define PCIE1_CFG_CORE_CLK_EN (1 << 5) 608c2ecf20Sopenharmony_ci #define PCIE1_CFG_AUX_CLK_EN (1 << 4) 618c2ecf20Sopenharmony_ci #define PCIE0_CFG_DEVICE_PRESENT (1 << 3) 628c2ecf20Sopenharmony_ci #define PCIE0_CFG_POWERUP_RESET (1 << 2) 638c2ecf20Sopenharmony_ci #define PCIE0_CFG_CORE_CLK_EN (1 << 1) 648c2ecf20Sopenharmony_ci #define PCIE0_CFG_AUX_CLK_EN (1 << 0) 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci#define PAD_FUNCTION_EN_0 0x650 678c2ecf20Sopenharmony_ci #define PMX_UART0_MASK (1 << 1) 688c2ecf20Sopenharmony_ci #define PMX_I2C0_MASK (1 << 2) 698c2ecf20Sopenharmony_ci #define PMX_I2S0_MASK (1 << 3) 708c2ecf20Sopenharmony_ci #define PMX_SSP0_MASK (1 << 4) 718c2ecf20Sopenharmony_ci #define PMX_CLCD1_MASK (1 << 5) 728c2ecf20Sopenharmony_ci #define PMX_EGPIO00_MASK (1 << 6) 738c2ecf20Sopenharmony_ci #define PMX_EGPIO01_MASK (1 << 7) 748c2ecf20Sopenharmony_ci #define PMX_EGPIO02_MASK (1 << 8) 758c2ecf20Sopenharmony_ci #define PMX_EGPIO03_MASK (1 << 9) 768c2ecf20Sopenharmony_ci #define PMX_EGPIO04_MASK (1 << 10) 778c2ecf20Sopenharmony_ci #define PMX_EGPIO05_MASK (1 << 11) 788c2ecf20Sopenharmony_ci #define PMX_EGPIO06_MASK (1 << 12) 798c2ecf20Sopenharmony_ci #define PMX_EGPIO07_MASK (1 << 13) 808c2ecf20Sopenharmony_ci #define PMX_EGPIO08_MASK (1 << 14) 818c2ecf20Sopenharmony_ci #define PMX_EGPIO09_MASK (1 << 15) 828c2ecf20Sopenharmony_ci #define PMX_SMI_MASK (1 << 16) 838c2ecf20Sopenharmony_ci #define PMX_NAND8_MASK (1 << 17) 848c2ecf20Sopenharmony_ci #define PMX_GMIICLK_MASK (1 << 18) 858c2ecf20Sopenharmony_ci #define PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK (1 << 19) 868c2ecf20Sopenharmony_ci #define PMX_RXCLK_RDV_TXEN_D03_MASK (1 << 20) 878c2ecf20Sopenharmony_ci #define PMX_GMIID47_MASK (1 << 21) 888c2ecf20Sopenharmony_ci #define PMX_MDC_MDIO_MASK (1 << 22) 898c2ecf20Sopenharmony_ci #define PMX_MCI_DATA8_15_MASK (1 << 23) 908c2ecf20Sopenharmony_ci #define PMX_NFAD23_MASK (1 << 24) 918c2ecf20Sopenharmony_ci #define PMX_NFAD24_MASK (1 << 25) 928c2ecf20Sopenharmony_ci #define PMX_NFAD25_MASK (1 << 26) 938c2ecf20Sopenharmony_ci #define PMX_NFCE3_MASK (1 << 27) 948c2ecf20Sopenharmony_ci #define PMX_NFWPRT3_MASK (1 << 28) 958c2ecf20Sopenharmony_ci #define PMX_NFRSTPWDWN0_MASK (1 << 29) 968c2ecf20Sopenharmony_ci #define PMX_NFRSTPWDWN1_MASK (1 << 30) 978c2ecf20Sopenharmony_ci #define PMX_NFRSTPWDWN2_MASK (1 << 31) 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci#define PAD_FUNCTION_EN_1 0x654 1008c2ecf20Sopenharmony_ci #define PMX_NFRSTPWDWN3_MASK (1 << 0) 1018c2ecf20Sopenharmony_ci #define PMX_SMINCS2_MASK (1 << 1) 1028c2ecf20Sopenharmony_ci #define PMX_SMINCS3_MASK (1 << 2) 1038c2ecf20Sopenharmony_ci #define PMX_CLCD2_MASK (1 << 3) 1048c2ecf20Sopenharmony_ci #define PMX_KBD_ROWCOL68_MASK (1 << 4) 1058c2ecf20Sopenharmony_ci #define PMX_EGPIO10_MASK (1 << 5) 1068c2ecf20Sopenharmony_ci #define PMX_EGPIO11_MASK (1 << 6) 1078c2ecf20Sopenharmony_ci #define PMX_EGPIO12_MASK (1 << 7) 1088c2ecf20Sopenharmony_ci #define PMX_EGPIO13_MASK (1 << 8) 1098c2ecf20Sopenharmony_ci #define PMX_EGPIO14_MASK (1 << 9) 1108c2ecf20Sopenharmony_ci #define PMX_EGPIO15_MASK (1 << 10) 1118c2ecf20Sopenharmony_ci #define PMX_UART0_MODEM_MASK (1 << 11) 1128c2ecf20Sopenharmony_ci #define PMX_GPT0_TMR0_MASK (1 << 12) 1138c2ecf20Sopenharmony_ci #define PMX_GPT0_TMR1_MASK (1 << 13) 1148c2ecf20Sopenharmony_ci #define PMX_GPT1_TMR0_MASK (1 << 14) 1158c2ecf20Sopenharmony_ci #define PMX_GPT1_TMR1_MASK (1 << 15) 1168c2ecf20Sopenharmony_ci #define PMX_I2S1_MASK (1 << 16) 1178c2ecf20Sopenharmony_ci #define PMX_KBD_ROWCOL25_MASK (1 << 17) 1188c2ecf20Sopenharmony_ci #define PMX_NFIO8_15_MASK (1 << 18) 1198c2ecf20Sopenharmony_ci #define PMX_KBD_COL1_MASK (1 << 19) 1208c2ecf20Sopenharmony_ci #define PMX_NFCE1_MASK (1 << 20) 1218c2ecf20Sopenharmony_ci #define PMX_KBD_COL0_MASK (1 << 21) 1228c2ecf20Sopenharmony_ci #define PMX_NFCE2_MASK (1 << 22) 1238c2ecf20Sopenharmony_ci #define PMX_KBD_ROW1_MASK (1 << 23) 1248c2ecf20Sopenharmony_ci #define PMX_NFWPRT1_MASK (1 << 24) 1258c2ecf20Sopenharmony_ci #define PMX_KBD_ROW0_MASK (1 << 25) 1268c2ecf20Sopenharmony_ci #define PMX_NFWPRT2_MASK (1 << 26) 1278c2ecf20Sopenharmony_ci #define PMX_MCIDATA0_MASK (1 << 27) 1288c2ecf20Sopenharmony_ci #define PMX_MCIDATA1_MASK (1 << 28) 1298c2ecf20Sopenharmony_ci #define PMX_MCIDATA2_MASK (1 << 29) 1308c2ecf20Sopenharmony_ci #define PMX_MCIDATA3_MASK (1 << 30) 1318c2ecf20Sopenharmony_ci #define PMX_MCIDATA4_MASK (1 << 31) 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci#define PAD_FUNCTION_EN_2 0x658 1348c2ecf20Sopenharmony_ci #define PMX_MCIDATA5_MASK (1 << 0) 1358c2ecf20Sopenharmony_ci #define PMX_MCIDATA6_MASK (1 << 1) 1368c2ecf20Sopenharmony_ci #define PMX_MCIDATA7_MASK (1 << 2) 1378c2ecf20Sopenharmony_ci #define PMX_MCIDATA1SD_MASK (1 << 3) 1388c2ecf20Sopenharmony_ci #define PMX_MCIDATA2SD_MASK (1 << 4) 1398c2ecf20Sopenharmony_ci #define PMX_MCIDATA3SD_MASK (1 << 5) 1408c2ecf20Sopenharmony_ci #define PMX_MCIADDR0ALE_MASK (1 << 6) 1418c2ecf20Sopenharmony_ci #define PMX_MCIADDR1CLECLK_MASK (1 << 7) 1428c2ecf20Sopenharmony_ci #define PMX_MCIADDR2_MASK (1 << 8) 1438c2ecf20Sopenharmony_ci #define PMX_MCICECF_MASK (1 << 9) 1448c2ecf20Sopenharmony_ci #define PMX_MCICEXD_MASK (1 << 10) 1458c2ecf20Sopenharmony_ci #define PMX_MCICESDMMC_MASK (1 << 11) 1468c2ecf20Sopenharmony_ci #define PMX_MCICDCF1_MASK (1 << 12) 1478c2ecf20Sopenharmony_ci #define PMX_MCICDCF2_MASK (1 << 13) 1488c2ecf20Sopenharmony_ci #define PMX_MCICDXD_MASK (1 << 14) 1498c2ecf20Sopenharmony_ci #define PMX_MCICDSDMMC_MASK (1 << 15) 1508c2ecf20Sopenharmony_ci #define PMX_MCIDATADIR_MASK (1 << 16) 1518c2ecf20Sopenharmony_ci #define PMX_MCIDMARQWP_MASK (1 << 17) 1528c2ecf20Sopenharmony_ci #define PMX_MCIIORDRE_MASK (1 << 18) 1538c2ecf20Sopenharmony_ci #define PMX_MCIIOWRWE_MASK (1 << 19) 1548c2ecf20Sopenharmony_ci #define PMX_MCIRESETCF_MASK (1 << 20) 1558c2ecf20Sopenharmony_ci #define PMX_MCICS0CE_MASK (1 << 21) 1568c2ecf20Sopenharmony_ci #define PMX_MCICFINTR_MASK (1 << 22) 1578c2ecf20Sopenharmony_ci #define PMX_MCIIORDY_MASK (1 << 23) 1588c2ecf20Sopenharmony_ci #define PMX_MCICS1_MASK (1 << 24) 1598c2ecf20Sopenharmony_ci #define PMX_MCIDMAACK_MASK (1 << 25) 1608c2ecf20Sopenharmony_ci #define PMX_MCISDCMD_MASK (1 << 26) 1618c2ecf20Sopenharmony_ci #define PMX_MCILEDS_MASK (1 << 27) 1628c2ecf20Sopenharmony_ci #define PMX_TOUCH_XY_MASK (1 << 28) 1638c2ecf20Sopenharmony_ci #define PMX_SSP0_CS0_MASK (1 << 29) 1648c2ecf20Sopenharmony_ci #define PMX_SSP0_CS1_2_MASK (1 << 30) 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci#define PAD_DIRECTION_SEL_0 0x65C 1678c2ecf20Sopenharmony_ci#define PAD_DIRECTION_SEL_1 0x660 1688c2ecf20Sopenharmony_ci#define PAD_DIRECTION_SEL_2 0x664 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci/* combined macros */ 1718c2ecf20Sopenharmony_ci#define PMX_GMII_MASK (PMX_GMIICLK_MASK | \ 1728c2ecf20Sopenharmony_ci PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK | \ 1738c2ecf20Sopenharmony_ci PMX_RXCLK_RDV_TXEN_D03_MASK | \ 1748c2ecf20Sopenharmony_ci PMX_GMIID47_MASK | PMX_MDC_MDIO_MASK) 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci#define PMX_EGPIO_0_GRP_MASK (PMX_EGPIO00_MASK | PMX_EGPIO01_MASK | \ 1778c2ecf20Sopenharmony_ci PMX_EGPIO02_MASK | \ 1788c2ecf20Sopenharmony_ci PMX_EGPIO03_MASK | PMX_EGPIO04_MASK | \ 1798c2ecf20Sopenharmony_ci PMX_EGPIO05_MASK | PMX_EGPIO06_MASK | \ 1808c2ecf20Sopenharmony_ci PMX_EGPIO07_MASK | PMX_EGPIO08_MASK | \ 1818c2ecf20Sopenharmony_ci PMX_EGPIO09_MASK) 1828c2ecf20Sopenharmony_ci#define PMX_EGPIO_1_GRP_MASK (PMX_EGPIO10_MASK | PMX_EGPIO11_MASK | \ 1838c2ecf20Sopenharmony_ci PMX_EGPIO12_MASK | PMX_EGPIO13_MASK | \ 1848c2ecf20Sopenharmony_ci PMX_EGPIO14_MASK | PMX_EGPIO15_MASK) 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci#define PMX_KEYBOARD_6X6_MASK (PMX_KBD_ROW0_MASK | PMX_KBD_ROW1_MASK | \ 1878c2ecf20Sopenharmony_ci PMX_KBD_ROWCOL25_MASK | PMX_KBD_COL0_MASK | \ 1888c2ecf20Sopenharmony_ci PMX_KBD_COL1_MASK) 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci#define PMX_NAND8BIT_0_MASK (PMX_NAND8_MASK | PMX_NFAD23_MASK | \ 1918c2ecf20Sopenharmony_ci PMX_NFAD24_MASK | PMX_NFAD25_MASK | \ 1928c2ecf20Sopenharmony_ci PMX_NFWPRT3_MASK | PMX_NFRSTPWDWN0_MASK | \ 1938c2ecf20Sopenharmony_ci PMX_NFRSTPWDWN1_MASK | PMX_NFRSTPWDWN2_MASK | \ 1948c2ecf20Sopenharmony_ci PMX_NFCE3_MASK) 1958c2ecf20Sopenharmony_ci#define PMX_NAND8BIT_1_MASK PMX_NFRSTPWDWN3_MASK 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci#define PMX_NAND16BIT_1_MASK (PMX_KBD_ROWCOL25_MASK | PMX_NFIO8_15_MASK) 1988c2ecf20Sopenharmony_ci#define PMX_NAND_4CHIPS_MASK (PMX_NFCE1_MASK | PMX_NFCE2_MASK | \ 1998c2ecf20Sopenharmony_ci PMX_NFWPRT1_MASK | PMX_NFWPRT2_MASK | \ 2008c2ecf20Sopenharmony_ci PMX_KBD_ROW0_MASK | PMX_KBD_ROW1_MASK | \ 2018c2ecf20Sopenharmony_ci PMX_KBD_COL0_MASK | PMX_KBD_COL1_MASK) 2028c2ecf20Sopenharmony_ci 2038c2ecf20Sopenharmony_ci#define PMX_MCIFALL_1_MASK 0xF8000000 2048c2ecf20Sopenharmony_ci#define PMX_MCIFALL_2_MASK 0x0FFFFFFF 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ci#define PMX_PCI_REG1_MASK (PMX_SMINCS2_MASK | PMX_SMINCS3_MASK | \ 2078c2ecf20Sopenharmony_ci PMX_CLCD2_MASK | PMX_KBD_ROWCOL68_MASK | \ 2088c2ecf20Sopenharmony_ci PMX_EGPIO_1_GRP_MASK | PMX_GPT0_TMR0_MASK | \ 2098c2ecf20Sopenharmony_ci PMX_GPT0_TMR1_MASK | PMX_GPT1_TMR0_MASK | \ 2108c2ecf20Sopenharmony_ci PMX_GPT1_TMR1_MASK | PMX_I2S1_MASK | \ 2118c2ecf20Sopenharmony_ci PMX_NFCE2_MASK) 2128c2ecf20Sopenharmony_ci#define PMX_PCI_REG2_MASK (PMX_TOUCH_XY_MASK | PMX_SSP0_CS0_MASK | \ 2138c2ecf20Sopenharmony_ci PMX_SSP0_CS1_2_MASK) 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_ci#define PMX_SMII_0_1_2_MASK (PMX_CLCD2_MASK | PMX_KBD_ROWCOL68_MASK) 2168c2ecf20Sopenharmony_ci#define PMX_RGMII_REG0_MASK (PMX_MCI_DATA8_15_MASK | \ 2178c2ecf20Sopenharmony_ci PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK | \ 2188c2ecf20Sopenharmony_ci PMX_GMIID47_MASK) 2198c2ecf20Sopenharmony_ci#define PMX_RGMII_REG1_MASK (PMX_KBD_ROWCOL68_MASK | PMX_EGPIO_1_GRP_MASK |\ 2208c2ecf20Sopenharmony_ci PMX_KBD_ROW1_MASK | PMX_NFWPRT1_MASK | \ 2218c2ecf20Sopenharmony_ci PMX_KBD_ROW0_MASK | PMX_NFWPRT2_MASK) 2228c2ecf20Sopenharmony_ci#define PMX_RGMII_REG2_MASK (PMX_TOUCH_XY_MASK | PMX_SSP0_CS0_MASK | \ 2238c2ecf20Sopenharmony_ci PMX_SSP0_CS1_2_MASK) 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci#define PCIE_CFG_VAL(x) (PCIE_SATA##x##_SEL_PCIE | \ 2268c2ecf20Sopenharmony_ci PCIE##x##_CFG_AUX_CLK_EN | \ 2278c2ecf20Sopenharmony_ci PCIE##x##_CFG_CORE_CLK_EN | \ 2288c2ecf20Sopenharmony_ci PCIE##x##_CFG_POWERUP_RESET | \ 2298c2ecf20Sopenharmony_ci PCIE##x##_CFG_DEVICE_PRESENT) 2308c2ecf20Sopenharmony_ci#define SATA_CFG_VAL(x) (PCIE_SATA##x##_SEL_SATA | \ 2318c2ecf20Sopenharmony_ci SATA##x##_CFG_PM_CLK_EN | \ 2328c2ecf20Sopenharmony_ci SATA##x##_CFG_POWERUP_RESET | \ 2338c2ecf20Sopenharmony_ci SATA##x##_CFG_RX_CLK_EN | \ 2348c2ecf20Sopenharmony_ci SATA##x##_CFG_TX_CLK_EN) 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c0 device */ 2378c2ecf20Sopenharmony_cistatic const unsigned i2c0_pins[] = { 102, 103 }; 2388c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c0_muxreg[] = { 2398c2ecf20Sopenharmony_ci { 2408c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 2418c2ecf20Sopenharmony_ci .mask = PMX_I2C0_MASK, 2428c2ecf20Sopenharmony_ci .val = PMX_I2C0_MASK, 2438c2ecf20Sopenharmony_ci }, { 2448c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 2458c2ecf20Sopenharmony_ci .mask = PMX_I2C0_MASK, 2468c2ecf20Sopenharmony_ci .val = PMX_I2C0_MASK, 2478c2ecf20Sopenharmony_ci }, 2488c2ecf20Sopenharmony_ci}; 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_cistatic struct spear_modemux i2c0_modemux[] = { 2518c2ecf20Sopenharmony_ci { 2528c2ecf20Sopenharmony_ci .muxregs = i2c0_muxreg, 2538c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c0_muxreg), 2548c2ecf20Sopenharmony_ci }, 2558c2ecf20Sopenharmony_ci}; 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c0_pingroup = { 2588c2ecf20Sopenharmony_ci .name = "i2c0_grp", 2598c2ecf20Sopenharmony_ci .pins = i2c0_pins, 2608c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c0_pins), 2618c2ecf20Sopenharmony_ci .modemuxs = i2c0_modemux, 2628c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c0_modemux), 2638c2ecf20Sopenharmony_ci}; 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_cistatic const char *const i2c0_grps[] = { "i2c0_grp" }; 2668c2ecf20Sopenharmony_cistatic struct spear_function i2c0_function = { 2678c2ecf20Sopenharmony_ci .name = "i2c0", 2688c2ecf20Sopenharmony_ci .groups = i2c0_grps, 2698c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c0_grps), 2708c2ecf20Sopenharmony_ci}; 2718c2ecf20Sopenharmony_ci 2728c2ecf20Sopenharmony_ci/* Pad multiplexing for ssp0 device */ 2738c2ecf20Sopenharmony_cistatic const unsigned ssp0_pins[] = { 109, 110, 111, 112 }; 2748c2ecf20Sopenharmony_cistatic struct spear_muxreg ssp0_muxreg[] = { 2758c2ecf20Sopenharmony_ci { 2768c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 2778c2ecf20Sopenharmony_ci .mask = PMX_SSP0_MASK, 2788c2ecf20Sopenharmony_ci .val = PMX_SSP0_MASK, 2798c2ecf20Sopenharmony_ci }, { 2808c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 2818c2ecf20Sopenharmony_ci .mask = PMX_SSP0_MASK, 2828c2ecf20Sopenharmony_ci .val = PMX_SSP0_MASK, 2838c2ecf20Sopenharmony_ci }, 2848c2ecf20Sopenharmony_ci}; 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_cistatic struct spear_modemux ssp0_modemux[] = { 2878c2ecf20Sopenharmony_ci { 2888c2ecf20Sopenharmony_ci .muxregs = ssp0_muxreg, 2898c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp0_muxreg), 2908c2ecf20Sopenharmony_ci }, 2918c2ecf20Sopenharmony_ci}; 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_cistatic struct spear_pingroup ssp0_pingroup = { 2948c2ecf20Sopenharmony_ci .name = "ssp0_grp", 2958c2ecf20Sopenharmony_ci .pins = ssp0_pins, 2968c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(ssp0_pins), 2978c2ecf20Sopenharmony_ci .modemuxs = ssp0_modemux, 2988c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp0_modemux), 2998c2ecf20Sopenharmony_ci}; 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_ci/* Pad multiplexing for ssp0_cs0 device */ 3028c2ecf20Sopenharmony_cistatic const unsigned ssp0_cs0_pins[] = { 96 }; 3038c2ecf20Sopenharmony_cistatic struct spear_muxreg ssp0_cs0_muxreg[] = { 3048c2ecf20Sopenharmony_ci { 3058c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 3068c2ecf20Sopenharmony_ci .mask = PMX_SSP0_CS0_MASK, 3078c2ecf20Sopenharmony_ci .val = PMX_SSP0_CS0_MASK, 3088c2ecf20Sopenharmony_ci }, { 3098c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 3108c2ecf20Sopenharmony_ci .mask = PMX_SSP0_CS0_MASK, 3118c2ecf20Sopenharmony_ci .val = PMX_SSP0_CS0_MASK, 3128c2ecf20Sopenharmony_ci }, 3138c2ecf20Sopenharmony_ci}; 3148c2ecf20Sopenharmony_ci 3158c2ecf20Sopenharmony_cistatic struct spear_modemux ssp0_cs0_modemux[] = { 3168c2ecf20Sopenharmony_ci { 3178c2ecf20Sopenharmony_ci .muxregs = ssp0_cs0_muxreg, 3188c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp0_cs0_muxreg), 3198c2ecf20Sopenharmony_ci }, 3208c2ecf20Sopenharmony_ci}; 3218c2ecf20Sopenharmony_ci 3228c2ecf20Sopenharmony_cistatic struct spear_pingroup ssp0_cs0_pingroup = { 3238c2ecf20Sopenharmony_ci .name = "ssp0_cs0_grp", 3248c2ecf20Sopenharmony_ci .pins = ssp0_cs0_pins, 3258c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(ssp0_cs0_pins), 3268c2ecf20Sopenharmony_ci .modemuxs = ssp0_cs0_modemux, 3278c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp0_cs0_modemux), 3288c2ecf20Sopenharmony_ci}; 3298c2ecf20Sopenharmony_ci 3308c2ecf20Sopenharmony_ci/* ssp0_cs1_2 device */ 3318c2ecf20Sopenharmony_cistatic const unsigned ssp0_cs1_2_pins[] = { 94, 95 }; 3328c2ecf20Sopenharmony_cistatic struct spear_muxreg ssp0_cs1_2_muxreg[] = { 3338c2ecf20Sopenharmony_ci { 3348c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 3358c2ecf20Sopenharmony_ci .mask = PMX_SSP0_CS1_2_MASK, 3368c2ecf20Sopenharmony_ci .val = PMX_SSP0_CS1_2_MASK, 3378c2ecf20Sopenharmony_ci }, { 3388c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 3398c2ecf20Sopenharmony_ci .mask = PMX_SSP0_CS1_2_MASK, 3408c2ecf20Sopenharmony_ci .val = PMX_SSP0_CS1_2_MASK, 3418c2ecf20Sopenharmony_ci }, 3428c2ecf20Sopenharmony_ci}; 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_cistatic struct spear_modemux ssp0_cs1_2_modemux[] = { 3458c2ecf20Sopenharmony_ci { 3468c2ecf20Sopenharmony_ci .muxregs = ssp0_cs1_2_muxreg, 3478c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp0_cs1_2_muxreg), 3488c2ecf20Sopenharmony_ci }, 3498c2ecf20Sopenharmony_ci}; 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_cistatic struct spear_pingroup ssp0_cs1_2_pingroup = { 3528c2ecf20Sopenharmony_ci .name = "ssp0_cs1_2_grp", 3538c2ecf20Sopenharmony_ci .pins = ssp0_cs1_2_pins, 3548c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(ssp0_cs1_2_pins), 3558c2ecf20Sopenharmony_ci .modemuxs = ssp0_cs1_2_modemux, 3568c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp0_cs1_2_modemux), 3578c2ecf20Sopenharmony_ci}; 3588c2ecf20Sopenharmony_ci 3598c2ecf20Sopenharmony_cistatic const char *const ssp0_grps[] = { "ssp0_grp", "ssp0_cs0_grp", 3608c2ecf20Sopenharmony_ci "ssp0_cs1_2_grp" }; 3618c2ecf20Sopenharmony_cistatic struct spear_function ssp0_function = { 3628c2ecf20Sopenharmony_ci .name = "ssp0", 3638c2ecf20Sopenharmony_ci .groups = ssp0_grps, 3648c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(ssp0_grps), 3658c2ecf20Sopenharmony_ci}; 3668c2ecf20Sopenharmony_ci 3678c2ecf20Sopenharmony_ci/* Pad multiplexing for i2s0 device */ 3688c2ecf20Sopenharmony_cistatic const unsigned i2s0_pins[] = { 104, 105, 106, 107, 108 }; 3698c2ecf20Sopenharmony_cistatic struct spear_muxreg i2s0_muxreg[] = { 3708c2ecf20Sopenharmony_ci { 3718c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 3728c2ecf20Sopenharmony_ci .mask = PMX_I2S0_MASK, 3738c2ecf20Sopenharmony_ci .val = PMX_I2S0_MASK, 3748c2ecf20Sopenharmony_ci }, { 3758c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 3768c2ecf20Sopenharmony_ci .mask = PMX_I2S0_MASK, 3778c2ecf20Sopenharmony_ci .val = PMX_I2S0_MASK, 3788c2ecf20Sopenharmony_ci }, 3798c2ecf20Sopenharmony_ci}; 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_cistatic struct spear_modemux i2s0_modemux[] = { 3828c2ecf20Sopenharmony_ci { 3838c2ecf20Sopenharmony_ci .muxregs = i2s0_muxreg, 3848c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2s0_muxreg), 3858c2ecf20Sopenharmony_ci }, 3868c2ecf20Sopenharmony_ci}; 3878c2ecf20Sopenharmony_ci 3888c2ecf20Sopenharmony_cistatic struct spear_pingroup i2s0_pingroup = { 3898c2ecf20Sopenharmony_ci .name = "i2s0_grp", 3908c2ecf20Sopenharmony_ci .pins = i2s0_pins, 3918c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2s0_pins), 3928c2ecf20Sopenharmony_ci .modemuxs = i2s0_modemux, 3938c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2s0_modemux), 3948c2ecf20Sopenharmony_ci}; 3958c2ecf20Sopenharmony_ci 3968c2ecf20Sopenharmony_cistatic const char *const i2s0_grps[] = { "i2s0_grp" }; 3978c2ecf20Sopenharmony_cistatic struct spear_function i2s0_function = { 3988c2ecf20Sopenharmony_ci .name = "i2s0", 3998c2ecf20Sopenharmony_ci .groups = i2s0_grps, 4008c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(i2s0_grps), 4018c2ecf20Sopenharmony_ci}; 4028c2ecf20Sopenharmony_ci 4038c2ecf20Sopenharmony_ci/* Pad multiplexing for i2s1 device */ 4048c2ecf20Sopenharmony_cistatic const unsigned i2s1_pins[] = { 0, 1, 2, 3 }; 4058c2ecf20Sopenharmony_cistatic struct spear_muxreg i2s1_muxreg[] = { 4068c2ecf20Sopenharmony_ci { 4078c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 4088c2ecf20Sopenharmony_ci .mask = PMX_I2S1_MASK, 4098c2ecf20Sopenharmony_ci .val = PMX_I2S1_MASK, 4108c2ecf20Sopenharmony_ci }, { 4118c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 4128c2ecf20Sopenharmony_ci .mask = PMX_I2S1_MASK, 4138c2ecf20Sopenharmony_ci .val = PMX_I2S1_MASK, 4148c2ecf20Sopenharmony_ci }, 4158c2ecf20Sopenharmony_ci}; 4168c2ecf20Sopenharmony_ci 4178c2ecf20Sopenharmony_cistatic struct spear_modemux i2s1_modemux[] = { 4188c2ecf20Sopenharmony_ci { 4198c2ecf20Sopenharmony_ci .muxregs = i2s1_muxreg, 4208c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2s1_muxreg), 4218c2ecf20Sopenharmony_ci }, 4228c2ecf20Sopenharmony_ci}; 4238c2ecf20Sopenharmony_ci 4248c2ecf20Sopenharmony_cistatic struct spear_pingroup i2s1_pingroup = { 4258c2ecf20Sopenharmony_ci .name = "i2s1_grp", 4268c2ecf20Sopenharmony_ci .pins = i2s1_pins, 4278c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2s1_pins), 4288c2ecf20Sopenharmony_ci .modemuxs = i2s1_modemux, 4298c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2s1_modemux), 4308c2ecf20Sopenharmony_ci}; 4318c2ecf20Sopenharmony_ci 4328c2ecf20Sopenharmony_cistatic const char *const i2s1_grps[] = { "i2s1_grp" }; 4338c2ecf20Sopenharmony_cistatic struct spear_function i2s1_function = { 4348c2ecf20Sopenharmony_ci .name = "i2s1", 4358c2ecf20Sopenharmony_ci .groups = i2s1_grps, 4368c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(i2s1_grps), 4378c2ecf20Sopenharmony_ci}; 4388c2ecf20Sopenharmony_ci 4398c2ecf20Sopenharmony_ci/* Pad multiplexing for clcd device */ 4408c2ecf20Sopenharmony_cistatic const unsigned clcd_pins[] = { 113, 114, 115, 116, 117, 118, 119, 120, 4418c2ecf20Sopenharmony_ci 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 4428c2ecf20Sopenharmony_ci 135, 136, 137, 138, 139, 140, 141, 142 }; 4438c2ecf20Sopenharmony_cistatic struct spear_muxreg clcd_muxreg[] = { 4448c2ecf20Sopenharmony_ci { 4458c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 4468c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK, 4478c2ecf20Sopenharmony_ci .val = PMX_CLCD1_MASK, 4488c2ecf20Sopenharmony_ci }, { 4498c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 4508c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK, 4518c2ecf20Sopenharmony_ci .val = PMX_CLCD1_MASK, 4528c2ecf20Sopenharmony_ci }, 4538c2ecf20Sopenharmony_ci}; 4548c2ecf20Sopenharmony_ci 4558c2ecf20Sopenharmony_cistatic struct spear_modemux clcd_modemux[] = { 4568c2ecf20Sopenharmony_ci { 4578c2ecf20Sopenharmony_ci .muxregs = clcd_muxreg, 4588c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(clcd_muxreg), 4598c2ecf20Sopenharmony_ci }, 4608c2ecf20Sopenharmony_ci}; 4618c2ecf20Sopenharmony_ci 4628c2ecf20Sopenharmony_cistatic struct spear_pingroup clcd_pingroup = { 4638c2ecf20Sopenharmony_ci .name = "clcd_grp", 4648c2ecf20Sopenharmony_ci .pins = clcd_pins, 4658c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(clcd_pins), 4668c2ecf20Sopenharmony_ci .modemuxs = clcd_modemux, 4678c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(clcd_modemux), 4688c2ecf20Sopenharmony_ci}; 4698c2ecf20Sopenharmony_ci 4708c2ecf20Sopenharmony_cistatic const unsigned clcd_high_res_pins[] = { 30, 31, 32, 33, 34, 35, 36, 37, 4718c2ecf20Sopenharmony_ci 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }; 4728c2ecf20Sopenharmony_cistatic struct spear_muxreg clcd_high_res_muxreg[] = { 4738c2ecf20Sopenharmony_ci { 4748c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 4758c2ecf20Sopenharmony_ci .mask = PMX_CLCD2_MASK, 4768c2ecf20Sopenharmony_ci .val = PMX_CLCD2_MASK, 4778c2ecf20Sopenharmony_ci }, { 4788c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 4798c2ecf20Sopenharmony_ci .mask = PMX_CLCD2_MASK, 4808c2ecf20Sopenharmony_ci .val = PMX_CLCD2_MASK, 4818c2ecf20Sopenharmony_ci }, 4828c2ecf20Sopenharmony_ci}; 4838c2ecf20Sopenharmony_ci 4848c2ecf20Sopenharmony_cistatic struct spear_modemux clcd_high_res_modemux[] = { 4858c2ecf20Sopenharmony_ci { 4868c2ecf20Sopenharmony_ci .muxregs = clcd_high_res_muxreg, 4878c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(clcd_high_res_muxreg), 4888c2ecf20Sopenharmony_ci }, 4898c2ecf20Sopenharmony_ci}; 4908c2ecf20Sopenharmony_ci 4918c2ecf20Sopenharmony_cistatic struct spear_pingroup clcd_high_res_pingroup = { 4928c2ecf20Sopenharmony_ci .name = "clcd_high_res_grp", 4938c2ecf20Sopenharmony_ci .pins = clcd_high_res_pins, 4948c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(clcd_high_res_pins), 4958c2ecf20Sopenharmony_ci .modemuxs = clcd_high_res_modemux, 4968c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(clcd_high_res_modemux), 4978c2ecf20Sopenharmony_ci}; 4988c2ecf20Sopenharmony_ci 4998c2ecf20Sopenharmony_cistatic const char *const clcd_grps[] = { "clcd_grp", "clcd_high_res_grp" }; 5008c2ecf20Sopenharmony_cistatic struct spear_function clcd_function = { 5018c2ecf20Sopenharmony_ci .name = "clcd", 5028c2ecf20Sopenharmony_ci .groups = clcd_grps, 5038c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(clcd_grps), 5048c2ecf20Sopenharmony_ci}; 5058c2ecf20Sopenharmony_ci 5068c2ecf20Sopenharmony_cistatic const unsigned arm_gpio_pins[] = { 18, 19, 20, 21, 22, 23, 143, 144, 145, 5078c2ecf20Sopenharmony_ci 146, 147, 148, 149, 150, 151, 152 }; 5088c2ecf20Sopenharmony_cistatic struct spear_muxreg arm_gpio_muxreg[] = { 5098c2ecf20Sopenharmony_ci { 5108c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 5118c2ecf20Sopenharmony_ci .mask = PMX_EGPIO_0_GRP_MASK, 5128c2ecf20Sopenharmony_ci .val = PMX_EGPIO_0_GRP_MASK, 5138c2ecf20Sopenharmony_ci }, { 5148c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 5158c2ecf20Sopenharmony_ci .mask = PMX_EGPIO_1_GRP_MASK, 5168c2ecf20Sopenharmony_ci .val = PMX_EGPIO_1_GRP_MASK, 5178c2ecf20Sopenharmony_ci }, { 5188c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 5198c2ecf20Sopenharmony_ci .mask = PMX_EGPIO_0_GRP_MASK, 5208c2ecf20Sopenharmony_ci .val = PMX_EGPIO_0_GRP_MASK, 5218c2ecf20Sopenharmony_ci }, { 5228c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 5238c2ecf20Sopenharmony_ci .mask = PMX_EGPIO_1_GRP_MASK, 5248c2ecf20Sopenharmony_ci .val = PMX_EGPIO_1_GRP_MASK, 5258c2ecf20Sopenharmony_ci }, 5268c2ecf20Sopenharmony_ci}; 5278c2ecf20Sopenharmony_ci 5288c2ecf20Sopenharmony_cistatic struct spear_modemux arm_gpio_modemux[] = { 5298c2ecf20Sopenharmony_ci { 5308c2ecf20Sopenharmony_ci .muxregs = arm_gpio_muxreg, 5318c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(arm_gpio_muxreg), 5328c2ecf20Sopenharmony_ci }, 5338c2ecf20Sopenharmony_ci}; 5348c2ecf20Sopenharmony_ci 5358c2ecf20Sopenharmony_cistatic struct spear_pingroup arm_gpio_pingroup = { 5368c2ecf20Sopenharmony_ci .name = "arm_gpio_grp", 5378c2ecf20Sopenharmony_ci .pins = arm_gpio_pins, 5388c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(arm_gpio_pins), 5398c2ecf20Sopenharmony_ci .modemuxs = arm_gpio_modemux, 5408c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(arm_gpio_modemux), 5418c2ecf20Sopenharmony_ci}; 5428c2ecf20Sopenharmony_ci 5438c2ecf20Sopenharmony_cistatic const char *const arm_gpio_grps[] = { "arm_gpio_grp" }; 5448c2ecf20Sopenharmony_cistatic struct spear_function arm_gpio_function = { 5458c2ecf20Sopenharmony_ci .name = "arm_gpio", 5468c2ecf20Sopenharmony_ci .groups = arm_gpio_grps, 5478c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(arm_gpio_grps), 5488c2ecf20Sopenharmony_ci}; 5498c2ecf20Sopenharmony_ci 5508c2ecf20Sopenharmony_ci/* Pad multiplexing for smi 2 chips device */ 5518c2ecf20Sopenharmony_cistatic const unsigned smi_2_chips_pins[] = { 153, 154, 155, 156, 157 }; 5528c2ecf20Sopenharmony_cistatic struct spear_muxreg smi_2_chips_muxreg[] = { 5538c2ecf20Sopenharmony_ci { 5548c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 5558c2ecf20Sopenharmony_ci .mask = PMX_SMI_MASK, 5568c2ecf20Sopenharmony_ci .val = PMX_SMI_MASK, 5578c2ecf20Sopenharmony_ci }, { 5588c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 5598c2ecf20Sopenharmony_ci .mask = PMX_SMI_MASK, 5608c2ecf20Sopenharmony_ci .val = PMX_SMI_MASK, 5618c2ecf20Sopenharmony_ci }, 5628c2ecf20Sopenharmony_ci}; 5638c2ecf20Sopenharmony_ci 5648c2ecf20Sopenharmony_cistatic struct spear_modemux smi_2_chips_modemux[] = { 5658c2ecf20Sopenharmony_ci { 5668c2ecf20Sopenharmony_ci .muxregs = smi_2_chips_muxreg, 5678c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(smi_2_chips_muxreg), 5688c2ecf20Sopenharmony_ci }, 5698c2ecf20Sopenharmony_ci}; 5708c2ecf20Sopenharmony_ci 5718c2ecf20Sopenharmony_cistatic struct spear_pingroup smi_2_chips_pingroup = { 5728c2ecf20Sopenharmony_ci .name = "smi_2_chips_grp", 5738c2ecf20Sopenharmony_ci .pins = smi_2_chips_pins, 5748c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(smi_2_chips_pins), 5758c2ecf20Sopenharmony_ci .modemuxs = smi_2_chips_modemux, 5768c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(smi_2_chips_modemux), 5778c2ecf20Sopenharmony_ci}; 5788c2ecf20Sopenharmony_ci 5798c2ecf20Sopenharmony_cistatic const unsigned smi_4_chips_pins[] = { 54, 55 }; 5808c2ecf20Sopenharmony_cistatic struct spear_muxreg smi_4_chips_muxreg[] = { 5818c2ecf20Sopenharmony_ci { 5828c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 5838c2ecf20Sopenharmony_ci .mask = PMX_SMI_MASK, 5848c2ecf20Sopenharmony_ci .val = PMX_SMI_MASK, 5858c2ecf20Sopenharmony_ci }, { 5868c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 5878c2ecf20Sopenharmony_ci .mask = PMX_SMINCS2_MASK | PMX_SMINCS3_MASK, 5888c2ecf20Sopenharmony_ci .val = PMX_SMINCS2_MASK | PMX_SMINCS3_MASK, 5898c2ecf20Sopenharmony_ci }, { 5908c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 5918c2ecf20Sopenharmony_ci .mask = PMX_SMI_MASK, 5928c2ecf20Sopenharmony_ci .val = PMX_SMI_MASK, 5938c2ecf20Sopenharmony_ci }, { 5948c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 5958c2ecf20Sopenharmony_ci .mask = PMX_SMINCS2_MASK | PMX_SMINCS3_MASK, 5968c2ecf20Sopenharmony_ci .val = PMX_SMINCS2_MASK | PMX_SMINCS3_MASK, 5978c2ecf20Sopenharmony_ci }, 5988c2ecf20Sopenharmony_ci}; 5998c2ecf20Sopenharmony_ci 6008c2ecf20Sopenharmony_cistatic struct spear_modemux smi_4_chips_modemux[] = { 6018c2ecf20Sopenharmony_ci { 6028c2ecf20Sopenharmony_ci .muxregs = smi_4_chips_muxreg, 6038c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(smi_4_chips_muxreg), 6048c2ecf20Sopenharmony_ci }, 6058c2ecf20Sopenharmony_ci}; 6068c2ecf20Sopenharmony_ci 6078c2ecf20Sopenharmony_cistatic struct spear_pingroup smi_4_chips_pingroup = { 6088c2ecf20Sopenharmony_ci .name = "smi_4_chips_grp", 6098c2ecf20Sopenharmony_ci .pins = smi_4_chips_pins, 6108c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(smi_4_chips_pins), 6118c2ecf20Sopenharmony_ci .modemuxs = smi_4_chips_modemux, 6128c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(smi_4_chips_modemux), 6138c2ecf20Sopenharmony_ci}; 6148c2ecf20Sopenharmony_ci 6158c2ecf20Sopenharmony_cistatic const char *const smi_grps[] = { "smi_2_chips_grp", "smi_4_chips_grp" }; 6168c2ecf20Sopenharmony_cistatic struct spear_function smi_function = { 6178c2ecf20Sopenharmony_ci .name = "smi", 6188c2ecf20Sopenharmony_ci .groups = smi_grps, 6198c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(smi_grps), 6208c2ecf20Sopenharmony_ci}; 6218c2ecf20Sopenharmony_ci 6228c2ecf20Sopenharmony_ci/* Pad multiplexing for gmii device */ 6238c2ecf20Sopenharmony_cistatic const unsigned gmii_pins[] = { 173, 174, 175, 176, 177, 178, 179, 180, 6248c2ecf20Sopenharmony_ci 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 6258c2ecf20Sopenharmony_ci 195, 196, 197, 198, 199, 200 }; 6268c2ecf20Sopenharmony_cistatic struct spear_muxreg gmii_muxreg[] = { 6278c2ecf20Sopenharmony_ci { 6288c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 6298c2ecf20Sopenharmony_ci .mask = PMX_GMII_MASK, 6308c2ecf20Sopenharmony_ci .val = PMX_GMII_MASK, 6318c2ecf20Sopenharmony_ci }, { 6328c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 6338c2ecf20Sopenharmony_ci .mask = PMX_GMII_MASK, 6348c2ecf20Sopenharmony_ci .val = PMX_GMII_MASK, 6358c2ecf20Sopenharmony_ci }, 6368c2ecf20Sopenharmony_ci}; 6378c2ecf20Sopenharmony_ci 6388c2ecf20Sopenharmony_cistatic struct spear_modemux gmii_modemux[] = { 6398c2ecf20Sopenharmony_ci { 6408c2ecf20Sopenharmony_ci .muxregs = gmii_muxreg, 6418c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gmii_muxreg), 6428c2ecf20Sopenharmony_ci }, 6438c2ecf20Sopenharmony_ci}; 6448c2ecf20Sopenharmony_ci 6458c2ecf20Sopenharmony_cistatic struct spear_pingroup gmii_pingroup = { 6468c2ecf20Sopenharmony_ci .name = "gmii_grp", 6478c2ecf20Sopenharmony_ci .pins = gmii_pins, 6488c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(gmii_pins), 6498c2ecf20Sopenharmony_ci .modemuxs = gmii_modemux, 6508c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gmii_modemux), 6518c2ecf20Sopenharmony_ci}; 6528c2ecf20Sopenharmony_ci 6538c2ecf20Sopenharmony_cistatic const char *const gmii_grps[] = { "gmii_grp" }; 6548c2ecf20Sopenharmony_cistatic struct spear_function gmii_function = { 6558c2ecf20Sopenharmony_ci .name = "gmii", 6568c2ecf20Sopenharmony_ci .groups = gmii_grps, 6578c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(gmii_grps), 6588c2ecf20Sopenharmony_ci}; 6598c2ecf20Sopenharmony_ci 6608c2ecf20Sopenharmony_ci/* Pad multiplexing for rgmii device */ 6618c2ecf20Sopenharmony_cistatic const unsigned rgmii_pins[] = { 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 6628c2ecf20Sopenharmony_ci 28, 29, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 175, 6638c2ecf20Sopenharmony_ci 180, 181, 182, 183, 185, 188, 193, 194, 195, 196, 197, 198, 211, 212 }; 6648c2ecf20Sopenharmony_cistatic struct spear_muxreg rgmii_muxreg[] = { 6658c2ecf20Sopenharmony_ci { 6668c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 6678c2ecf20Sopenharmony_ci .mask = PMX_RGMII_REG0_MASK, 6688c2ecf20Sopenharmony_ci .val = 0, 6698c2ecf20Sopenharmony_ci }, { 6708c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 6718c2ecf20Sopenharmony_ci .mask = PMX_RGMII_REG1_MASK, 6728c2ecf20Sopenharmony_ci .val = 0, 6738c2ecf20Sopenharmony_ci }, { 6748c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 6758c2ecf20Sopenharmony_ci .mask = PMX_RGMII_REG2_MASK, 6768c2ecf20Sopenharmony_ci .val = 0, 6778c2ecf20Sopenharmony_ci }, { 6788c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 6798c2ecf20Sopenharmony_ci .mask = PMX_RGMII_REG0_MASK, 6808c2ecf20Sopenharmony_ci .val = PMX_RGMII_REG0_MASK, 6818c2ecf20Sopenharmony_ci }, { 6828c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 6838c2ecf20Sopenharmony_ci .mask = PMX_RGMII_REG1_MASK, 6848c2ecf20Sopenharmony_ci .val = PMX_RGMII_REG1_MASK, 6858c2ecf20Sopenharmony_ci }, { 6868c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 6878c2ecf20Sopenharmony_ci .mask = PMX_RGMII_REG2_MASK, 6888c2ecf20Sopenharmony_ci .val = PMX_RGMII_REG2_MASK, 6898c2ecf20Sopenharmony_ci }, 6908c2ecf20Sopenharmony_ci}; 6918c2ecf20Sopenharmony_ci 6928c2ecf20Sopenharmony_cistatic struct spear_modemux rgmii_modemux[] = { 6938c2ecf20Sopenharmony_ci { 6948c2ecf20Sopenharmony_ci .muxregs = rgmii_muxreg, 6958c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(rgmii_muxreg), 6968c2ecf20Sopenharmony_ci }, 6978c2ecf20Sopenharmony_ci}; 6988c2ecf20Sopenharmony_ci 6998c2ecf20Sopenharmony_cistatic struct spear_pingroup rgmii_pingroup = { 7008c2ecf20Sopenharmony_ci .name = "rgmii_grp", 7018c2ecf20Sopenharmony_ci .pins = rgmii_pins, 7028c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(rgmii_pins), 7038c2ecf20Sopenharmony_ci .modemuxs = rgmii_modemux, 7048c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(rgmii_modemux), 7058c2ecf20Sopenharmony_ci}; 7068c2ecf20Sopenharmony_ci 7078c2ecf20Sopenharmony_cistatic const char *const rgmii_grps[] = { "rgmii_grp" }; 7088c2ecf20Sopenharmony_cistatic struct spear_function rgmii_function = { 7098c2ecf20Sopenharmony_ci .name = "rgmii", 7108c2ecf20Sopenharmony_ci .groups = rgmii_grps, 7118c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(rgmii_grps), 7128c2ecf20Sopenharmony_ci}; 7138c2ecf20Sopenharmony_ci 7148c2ecf20Sopenharmony_ci/* Pad multiplexing for smii_0_1_2 device */ 7158c2ecf20Sopenharmony_cistatic const unsigned smii_0_1_2_pins[] = { 24, 25, 26, 27, 28, 29, 30, 31, 32, 7168c2ecf20Sopenharmony_ci 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 7178c2ecf20Sopenharmony_ci 51, 52, 53, 54, 55 }; 7188c2ecf20Sopenharmony_cistatic struct spear_muxreg smii_0_1_2_muxreg[] = { 7198c2ecf20Sopenharmony_ci { 7208c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 7218c2ecf20Sopenharmony_ci .mask = PMX_SMII_0_1_2_MASK, 7228c2ecf20Sopenharmony_ci .val = 0, 7238c2ecf20Sopenharmony_ci }, { 7248c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 7258c2ecf20Sopenharmony_ci .mask = PMX_SMII_0_1_2_MASK, 7268c2ecf20Sopenharmony_ci .val = PMX_SMII_0_1_2_MASK, 7278c2ecf20Sopenharmony_ci }, 7288c2ecf20Sopenharmony_ci}; 7298c2ecf20Sopenharmony_ci 7308c2ecf20Sopenharmony_cistatic struct spear_modemux smii_0_1_2_modemux[] = { 7318c2ecf20Sopenharmony_ci { 7328c2ecf20Sopenharmony_ci .muxregs = smii_0_1_2_muxreg, 7338c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(smii_0_1_2_muxreg), 7348c2ecf20Sopenharmony_ci }, 7358c2ecf20Sopenharmony_ci}; 7368c2ecf20Sopenharmony_ci 7378c2ecf20Sopenharmony_cistatic struct spear_pingroup smii_0_1_2_pingroup = { 7388c2ecf20Sopenharmony_ci .name = "smii_0_1_2_grp", 7398c2ecf20Sopenharmony_ci .pins = smii_0_1_2_pins, 7408c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(smii_0_1_2_pins), 7418c2ecf20Sopenharmony_ci .modemuxs = smii_0_1_2_modemux, 7428c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(smii_0_1_2_modemux), 7438c2ecf20Sopenharmony_ci}; 7448c2ecf20Sopenharmony_ci 7458c2ecf20Sopenharmony_cistatic const char *const smii_0_1_2_grps[] = { "smii_0_1_2_grp" }; 7468c2ecf20Sopenharmony_cistatic struct spear_function smii_0_1_2_function = { 7478c2ecf20Sopenharmony_ci .name = "smii_0_1_2", 7488c2ecf20Sopenharmony_ci .groups = smii_0_1_2_grps, 7498c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(smii_0_1_2_grps), 7508c2ecf20Sopenharmony_ci}; 7518c2ecf20Sopenharmony_ci 7528c2ecf20Sopenharmony_ci/* Pad multiplexing for ras_mii_txclk device */ 7538c2ecf20Sopenharmony_cistatic const unsigned ras_mii_txclk_pins[] = { 98, 99 }; 7548c2ecf20Sopenharmony_cistatic struct spear_muxreg ras_mii_txclk_muxreg[] = { 7558c2ecf20Sopenharmony_ci { 7568c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 7578c2ecf20Sopenharmony_ci .mask = PMX_NFCE2_MASK, 7588c2ecf20Sopenharmony_ci .val = 0, 7598c2ecf20Sopenharmony_ci }, { 7608c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 7618c2ecf20Sopenharmony_ci .mask = PMX_NFCE2_MASK, 7628c2ecf20Sopenharmony_ci .val = PMX_NFCE2_MASK, 7638c2ecf20Sopenharmony_ci }, 7648c2ecf20Sopenharmony_ci}; 7658c2ecf20Sopenharmony_ci 7668c2ecf20Sopenharmony_cistatic struct spear_modemux ras_mii_txclk_modemux[] = { 7678c2ecf20Sopenharmony_ci { 7688c2ecf20Sopenharmony_ci .muxregs = ras_mii_txclk_muxreg, 7698c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ras_mii_txclk_muxreg), 7708c2ecf20Sopenharmony_ci }, 7718c2ecf20Sopenharmony_ci}; 7728c2ecf20Sopenharmony_ci 7738c2ecf20Sopenharmony_cistatic struct spear_pingroup ras_mii_txclk_pingroup = { 7748c2ecf20Sopenharmony_ci .name = "ras_mii_txclk_grp", 7758c2ecf20Sopenharmony_ci .pins = ras_mii_txclk_pins, 7768c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(ras_mii_txclk_pins), 7778c2ecf20Sopenharmony_ci .modemuxs = ras_mii_txclk_modemux, 7788c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ras_mii_txclk_modemux), 7798c2ecf20Sopenharmony_ci}; 7808c2ecf20Sopenharmony_ci 7818c2ecf20Sopenharmony_cistatic const char *const ras_mii_txclk_grps[] = { "ras_mii_txclk_grp" }; 7828c2ecf20Sopenharmony_cistatic struct spear_function ras_mii_txclk_function = { 7838c2ecf20Sopenharmony_ci .name = "ras_mii_txclk", 7848c2ecf20Sopenharmony_ci .groups = ras_mii_txclk_grps, 7858c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(ras_mii_txclk_grps), 7868c2ecf20Sopenharmony_ci}; 7878c2ecf20Sopenharmony_ci 7888c2ecf20Sopenharmony_ci/* Pad multiplexing for nand 8bit device (cs0 only) */ 7898c2ecf20Sopenharmony_cistatic const unsigned nand_8bit_pins[] = { 56, 57, 58, 59, 60, 61, 62, 63, 64, 7908c2ecf20Sopenharmony_ci 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 7918c2ecf20Sopenharmony_ci 83, 84, 85, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 7928c2ecf20Sopenharmony_ci 170, 171, 172, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 7938c2ecf20Sopenharmony_ci 212 }; 7948c2ecf20Sopenharmony_cistatic struct spear_muxreg nand_8bit_muxreg[] = { 7958c2ecf20Sopenharmony_ci { 7968c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 7978c2ecf20Sopenharmony_ci .mask = PMX_NAND8BIT_0_MASK, 7988c2ecf20Sopenharmony_ci .val = PMX_NAND8BIT_0_MASK, 7998c2ecf20Sopenharmony_ci }, { 8008c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 8018c2ecf20Sopenharmony_ci .mask = PMX_NAND8BIT_1_MASK, 8028c2ecf20Sopenharmony_ci .val = PMX_NAND8BIT_1_MASK, 8038c2ecf20Sopenharmony_ci }, { 8048c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 8058c2ecf20Sopenharmony_ci .mask = PMX_NAND8BIT_0_MASK, 8068c2ecf20Sopenharmony_ci .val = PMX_NAND8BIT_0_MASK, 8078c2ecf20Sopenharmony_ci }, { 8088c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 8098c2ecf20Sopenharmony_ci .mask = PMX_NAND8BIT_1_MASK, 8108c2ecf20Sopenharmony_ci .val = PMX_NAND8BIT_1_MASK, 8118c2ecf20Sopenharmony_ci }, 8128c2ecf20Sopenharmony_ci}; 8138c2ecf20Sopenharmony_ci 8148c2ecf20Sopenharmony_cistatic struct spear_modemux nand_8bit_modemux[] = { 8158c2ecf20Sopenharmony_ci { 8168c2ecf20Sopenharmony_ci .muxregs = nand_8bit_muxreg, 8178c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(nand_8bit_muxreg), 8188c2ecf20Sopenharmony_ci }, 8198c2ecf20Sopenharmony_ci}; 8208c2ecf20Sopenharmony_ci 8218c2ecf20Sopenharmony_cistatic struct spear_pingroup nand_8bit_pingroup = { 8228c2ecf20Sopenharmony_ci .name = "nand_8bit_grp", 8238c2ecf20Sopenharmony_ci .pins = nand_8bit_pins, 8248c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(nand_8bit_pins), 8258c2ecf20Sopenharmony_ci .modemuxs = nand_8bit_modemux, 8268c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(nand_8bit_modemux), 8278c2ecf20Sopenharmony_ci}; 8288c2ecf20Sopenharmony_ci 8298c2ecf20Sopenharmony_ci/* Pad multiplexing for nand 16bit device */ 8308c2ecf20Sopenharmony_cistatic const unsigned nand_16bit_pins[] = { 201, 202, 203, 204, 207, 208, 209, 8318c2ecf20Sopenharmony_ci 210 }; 8328c2ecf20Sopenharmony_cistatic struct spear_muxreg nand_16bit_muxreg[] = { 8338c2ecf20Sopenharmony_ci { 8348c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 8358c2ecf20Sopenharmony_ci .mask = PMX_NAND16BIT_1_MASK, 8368c2ecf20Sopenharmony_ci .val = PMX_NAND16BIT_1_MASK, 8378c2ecf20Sopenharmony_ci }, { 8388c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 8398c2ecf20Sopenharmony_ci .mask = PMX_NAND16BIT_1_MASK, 8408c2ecf20Sopenharmony_ci .val = PMX_NAND16BIT_1_MASK, 8418c2ecf20Sopenharmony_ci }, 8428c2ecf20Sopenharmony_ci}; 8438c2ecf20Sopenharmony_ci 8448c2ecf20Sopenharmony_cistatic struct spear_modemux nand_16bit_modemux[] = { 8458c2ecf20Sopenharmony_ci { 8468c2ecf20Sopenharmony_ci .muxregs = nand_16bit_muxreg, 8478c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(nand_16bit_muxreg), 8488c2ecf20Sopenharmony_ci }, 8498c2ecf20Sopenharmony_ci}; 8508c2ecf20Sopenharmony_ci 8518c2ecf20Sopenharmony_cistatic struct spear_pingroup nand_16bit_pingroup = { 8528c2ecf20Sopenharmony_ci .name = "nand_16bit_grp", 8538c2ecf20Sopenharmony_ci .pins = nand_16bit_pins, 8548c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(nand_16bit_pins), 8558c2ecf20Sopenharmony_ci .modemuxs = nand_16bit_modemux, 8568c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(nand_16bit_modemux), 8578c2ecf20Sopenharmony_ci}; 8588c2ecf20Sopenharmony_ci 8598c2ecf20Sopenharmony_ci/* Pad multiplexing for nand 4 chips */ 8608c2ecf20Sopenharmony_cistatic const unsigned nand_4_chips_pins[] = { 205, 206, 211, 212 }; 8618c2ecf20Sopenharmony_cistatic struct spear_muxreg nand_4_chips_muxreg[] = { 8628c2ecf20Sopenharmony_ci { 8638c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 8648c2ecf20Sopenharmony_ci .mask = PMX_NAND_4CHIPS_MASK, 8658c2ecf20Sopenharmony_ci .val = PMX_NAND_4CHIPS_MASK, 8668c2ecf20Sopenharmony_ci }, { 8678c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 8688c2ecf20Sopenharmony_ci .mask = PMX_NAND_4CHIPS_MASK, 8698c2ecf20Sopenharmony_ci .val = PMX_NAND_4CHIPS_MASK, 8708c2ecf20Sopenharmony_ci }, 8718c2ecf20Sopenharmony_ci}; 8728c2ecf20Sopenharmony_ci 8738c2ecf20Sopenharmony_cistatic struct spear_modemux nand_4_chips_modemux[] = { 8748c2ecf20Sopenharmony_ci { 8758c2ecf20Sopenharmony_ci .muxregs = nand_4_chips_muxreg, 8768c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(nand_4_chips_muxreg), 8778c2ecf20Sopenharmony_ci }, 8788c2ecf20Sopenharmony_ci}; 8798c2ecf20Sopenharmony_ci 8808c2ecf20Sopenharmony_cistatic struct spear_pingroup nand_4_chips_pingroup = { 8818c2ecf20Sopenharmony_ci .name = "nand_4_chips_grp", 8828c2ecf20Sopenharmony_ci .pins = nand_4_chips_pins, 8838c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(nand_4_chips_pins), 8848c2ecf20Sopenharmony_ci .modemuxs = nand_4_chips_modemux, 8858c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(nand_4_chips_modemux), 8868c2ecf20Sopenharmony_ci}; 8878c2ecf20Sopenharmony_ci 8888c2ecf20Sopenharmony_cistatic const char *const nand_grps[] = { "nand_8bit_grp", "nand_16bit_grp", 8898c2ecf20Sopenharmony_ci "nand_4_chips_grp" }; 8908c2ecf20Sopenharmony_cistatic struct spear_function nand_function = { 8918c2ecf20Sopenharmony_ci .name = "nand", 8928c2ecf20Sopenharmony_ci .groups = nand_grps, 8938c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(nand_grps), 8948c2ecf20Sopenharmony_ci}; 8958c2ecf20Sopenharmony_ci 8968c2ecf20Sopenharmony_ci/* Pad multiplexing for keyboard_6x6 device */ 8978c2ecf20Sopenharmony_cistatic const unsigned keyboard_6x6_pins[] = { 201, 202, 203, 204, 205, 206, 207, 8988c2ecf20Sopenharmony_ci 208, 209, 210, 211, 212 }; 8998c2ecf20Sopenharmony_cistatic struct spear_muxreg keyboard_6x6_muxreg[] = { 9008c2ecf20Sopenharmony_ci { 9018c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 9028c2ecf20Sopenharmony_ci .mask = PMX_KEYBOARD_6X6_MASK | PMX_NFIO8_15_MASK | 9038c2ecf20Sopenharmony_ci PMX_NFCE1_MASK | PMX_NFCE2_MASK | PMX_NFWPRT1_MASK | 9048c2ecf20Sopenharmony_ci PMX_NFWPRT2_MASK, 9058c2ecf20Sopenharmony_ci .val = PMX_KEYBOARD_6X6_MASK, 9068c2ecf20Sopenharmony_ci }, 9078c2ecf20Sopenharmony_ci}; 9088c2ecf20Sopenharmony_ci 9098c2ecf20Sopenharmony_cistatic struct spear_modemux keyboard_6x6_modemux[] = { 9108c2ecf20Sopenharmony_ci { 9118c2ecf20Sopenharmony_ci .muxregs = keyboard_6x6_muxreg, 9128c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(keyboard_6x6_muxreg), 9138c2ecf20Sopenharmony_ci }, 9148c2ecf20Sopenharmony_ci}; 9158c2ecf20Sopenharmony_ci 9168c2ecf20Sopenharmony_cistatic struct spear_pingroup keyboard_6x6_pingroup = { 9178c2ecf20Sopenharmony_ci .name = "keyboard_6x6_grp", 9188c2ecf20Sopenharmony_ci .pins = keyboard_6x6_pins, 9198c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(keyboard_6x6_pins), 9208c2ecf20Sopenharmony_ci .modemuxs = keyboard_6x6_modemux, 9218c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(keyboard_6x6_modemux), 9228c2ecf20Sopenharmony_ci}; 9238c2ecf20Sopenharmony_ci 9248c2ecf20Sopenharmony_ci/* Pad multiplexing for keyboard_rowcol6_8 device */ 9258c2ecf20Sopenharmony_cistatic const unsigned keyboard_rowcol6_8_pins[] = { 24, 25, 26, 27, 28, 29 }; 9268c2ecf20Sopenharmony_cistatic struct spear_muxreg keyboard_rowcol6_8_muxreg[] = { 9278c2ecf20Sopenharmony_ci { 9288c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 9298c2ecf20Sopenharmony_ci .mask = PMX_KBD_ROWCOL68_MASK, 9308c2ecf20Sopenharmony_ci .val = PMX_KBD_ROWCOL68_MASK, 9318c2ecf20Sopenharmony_ci }, { 9328c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 9338c2ecf20Sopenharmony_ci .mask = PMX_KBD_ROWCOL68_MASK, 9348c2ecf20Sopenharmony_ci .val = PMX_KBD_ROWCOL68_MASK, 9358c2ecf20Sopenharmony_ci }, 9368c2ecf20Sopenharmony_ci}; 9378c2ecf20Sopenharmony_ci 9388c2ecf20Sopenharmony_cistatic struct spear_modemux keyboard_rowcol6_8_modemux[] = { 9398c2ecf20Sopenharmony_ci { 9408c2ecf20Sopenharmony_ci .muxregs = keyboard_rowcol6_8_muxreg, 9418c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(keyboard_rowcol6_8_muxreg), 9428c2ecf20Sopenharmony_ci }, 9438c2ecf20Sopenharmony_ci}; 9448c2ecf20Sopenharmony_ci 9458c2ecf20Sopenharmony_cistatic struct spear_pingroup keyboard_rowcol6_8_pingroup = { 9468c2ecf20Sopenharmony_ci .name = "keyboard_rowcol6_8_grp", 9478c2ecf20Sopenharmony_ci .pins = keyboard_rowcol6_8_pins, 9488c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(keyboard_rowcol6_8_pins), 9498c2ecf20Sopenharmony_ci .modemuxs = keyboard_rowcol6_8_modemux, 9508c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(keyboard_rowcol6_8_modemux), 9518c2ecf20Sopenharmony_ci}; 9528c2ecf20Sopenharmony_ci 9538c2ecf20Sopenharmony_cistatic const char *const keyboard_grps[] = { "keyboard_6x6_grp", 9548c2ecf20Sopenharmony_ci "keyboard_rowcol6_8_grp" }; 9558c2ecf20Sopenharmony_cistatic struct spear_function keyboard_function = { 9568c2ecf20Sopenharmony_ci .name = "keyboard", 9578c2ecf20Sopenharmony_ci .groups = keyboard_grps, 9588c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(keyboard_grps), 9598c2ecf20Sopenharmony_ci}; 9608c2ecf20Sopenharmony_ci 9618c2ecf20Sopenharmony_ci/* Pad multiplexing for uart0 device */ 9628c2ecf20Sopenharmony_cistatic const unsigned uart0_pins[] = { 100, 101 }; 9638c2ecf20Sopenharmony_cistatic struct spear_muxreg uart0_muxreg[] = { 9648c2ecf20Sopenharmony_ci { 9658c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 9668c2ecf20Sopenharmony_ci .mask = PMX_UART0_MASK, 9678c2ecf20Sopenharmony_ci .val = PMX_UART0_MASK, 9688c2ecf20Sopenharmony_ci }, { 9698c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 9708c2ecf20Sopenharmony_ci .mask = PMX_UART0_MASK, 9718c2ecf20Sopenharmony_ci .val = PMX_UART0_MASK, 9728c2ecf20Sopenharmony_ci }, 9738c2ecf20Sopenharmony_ci}; 9748c2ecf20Sopenharmony_ci 9758c2ecf20Sopenharmony_cistatic struct spear_modemux uart0_modemux[] = { 9768c2ecf20Sopenharmony_ci { 9778c2ecf20Sopenharmony_ci .muxregs = uart0_muxreg, 9788c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart0_muxreg), 9798c2ecf20Sopenharmony_ci }, 9808c2ecf20Sopenharmony_ci}; 9818c2ecf20Sopenharmony_ci 9828c2ecf20Sopenharmony_cistatic struct spear_pingroup uart0_pingroup = { 9838c2ecf20Sopenharmony_ci .name = "uart0_grp", 9848c2ecf20Sopenharmony_ci .pins = uart0_pins, 9858c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(uart0_pins), 9868c2ecf20Sopenharmony_ci .modemuxs = uart0_modemux, 9878c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart0_modemux), 9888c2ecf20Sopenharmony_ci}; 9898c2ecf20Sopenharmony_ci 9908c2ecf20Sopenharmony_ci/* Pad multiplexing for uart0_modem device */ 9918c2ecf20Sopenharmony_cistatic const unsigned uart0_modem_pins[] = { 12, 13, 14, 15, 16, 17 }; 9928c2ecf20Sopenharmony_cistatic struct spear_muxreg uart0_modem_muxreg[] = { 9938c2ecf20Sopenharmony_ci { 9948c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 9958c2ecf20Sopenharmony_ci .mask = PMX_UART0_MODEM_MASK, 9968c2ecf20Sopenharmony_ci .val = PMX_UART0_MODEM_MASK, 9978c2ecf20Sopenharmony_ci }, { 9988c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 9998c2ecf20Sopenharmony_ci .mask = PMX_UART0_MODEM_MASK, 10008c2ecf20Sopenharmony_ci .val = PMX_UART0_MODEM_MASK, 10018c2ecf20Sopenharmony_ci }, 10028c2ecf20Sopenharmony_ci}; 10038c2ecf20Sopenharmony_ci 10048c2ecf20Sopenharmony_cistatic struct spear_modemux uart0_modem_modemux[] = { 10058c2ecf20Sopenharmony_ci { 10068c2ecf20Sopenharmony_ci .muxregs = uart0_modem_muxreg, 10078c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart0_modem_muxreg), 10088c2ecf20Sopenharmony_ci }, 10098c2ecf20Sopenharmony_ci}; 10108c2ecf20Sopenharmony_ci 10118c2ecf20Sopenharmony_cistatic struct spear_pingroup uart0_modem_pingroup = { 10128c2ecf20Sopenharmony_ci .name = "uart0_modem_grp", 10138c2ecf20Sopenharmony_ci .pins = uart0_modem_pins, 10148c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(uart0_modem_pins), 10158c2ecf20Sopenharmony_ci .modemuxs = uart0_modem_modemux, 10168c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart0_modem_modemux), 10178c2ecf20Sopenharmony_ci}; 10188c2ecf20Sopenharmony_ci 10198c2ecf20Sopenharmony_cistatic const char *const uart0_grps[] = { "uart0_grp", "uart0_modem_grp" }; 10208c2ecf20Sopenharmony_cistatic struct spear_function uart0_function = { 10218c2ecf20Sopenharmony_ci .name = "uart0", 10228c2ecf20Sopenharmony_ci .groups = uart0_grps, 10238c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(uart0_grps), 10248c2ecf20Sopenharmony_ci}; 10258c2ecf20Sopenharmony_ci 10268c2ecf20Sopenharmony_ci/* Pad multiplexing for gpt0_tmr0 device */ 10278c2ecf20Sopenharmony_cistatic const unsigned gpt0_tmr0_pins[] = { 10, 11 }; 10288c2ecf20Sopenharmony_cistatic struct spear_muxreg gpt0_tmr0_muxreg[] = { 10298c2ecf20Sopenharmony_ci { 10308c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 10318c2ecf20Sopenharmony_ci .mask = PMX_GPT0_TMR0_MASK, 10328c2ecf20Sopenharmony_ci .val = PMX_GPT0_TMR0_MASK, 10338c2ecf20Sopenharmony_ci }, { 10348c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 10358c2ecf20Sopenharmony_ci .mask = PMX_GPT0_TMR0_MASK, 10368c2ecf20Sopenharmony_ci .val = PMX_GPT0_TMR0_MASK, 10378c2ecf20Sopenharmony_ci }, 10388c2ecf20Sopenharmony_ci}; 10398c2ecf20Sopenharmony_ci 10408c2ecf20Sopenharmony_cistatic struct spear_modemux gpt0_tmr0_modemux[] = { 10418c2ecf20Sopenharmony_ci { 10428c2ecf20Sopenharmony_ci .muxregs = gpt0_tmr0_muxreg, 10438c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt0_tmr0_muxreg), 10448c2ecf20Sopenharmony_ci }, 10458c2ecf20Sopenharmony_ci}; 10468c2ecf20Sopenharmony_ci 10478c2ecf20Sopenharmony_cistatic struct spear_pingroup gpt0_tmr0_pingroup = { 10488c2ecf20Sopenharmony_ci .name = "gpt0_tmr0_grp", 10498c2ecf20Sopenharmony_ci .pins = gpt0_tmr0_pins, 10508c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(gpt0_tmr0_pins), 10518c2ecf20Sopenharmony_ci .modemuxs = gpt0_tmr0_modemux, 10528c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt0_tmr0_modemux), 10538c2ecf20Sopenharmony_ci}; 10548c2ecf20Sopenharmony_ci 10558c2ecf20Sopenharmony_ci/* Pad multiplexing for gpt0_tmr1 device */ 10568c2ecf20Sopenharmony_cistatic const unsigned gpt0_tmr1_pins[] = { 8, 9 }; 10578c2ecf20Sopenharmony_cistatic struct spear_muxreg gpt0_tmr1_muxreg[] = { 10588c2ecf20Sopenharmony_ci { 10598c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 10608c2ecf20Sopenharmony_ci .mask = PMX_GPT0_TMR1_MASK, 10618c2ecf20Sopenharmony_ci .val = PMX_GPT0_TMR1_MASK, 10628c2ecf20Sopenharmony_ci }, { 10638c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 10648c2ecf20Sopenharmony_ci .mask = PMX_GPT0_TMR1_MASK, 10658c2ecf20Sopenharmony_ci .val = PMX_GPT0_TMR1_MASK, 10668c2ecf20Sopenharmony_ci }, 10678c2ecf20Sopenharmony_ci}; 10688c2ecf20Sopenharmony_ci 10698c2ecf20Sopenharmony_cistatic struct spear_modemux gpt0_tmr1_modemux[] = { 10708c2ecf20Sopenharmony_ci { 10718c2ecf20Sopenharmony_ci .muxregs = gpt0_tmr1_muxreg, 10728c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt0_tmr1_muxreg), 10738c2ecf20Sopenharmony_ci }, 10748c2ecf20Sopenharmony_ci}; 10758c2ecf20Sopenharmony_ci 10768c2ecf20Sopenharmony_cistatic struct spear_pingroup gpt0_tmr1_pingroup = { 10778c2ecf20Sopenharmony_ci .name = "gpt0_tmr1_grp", 10788c2ecf20Sopenharmony_ci .pins = gpt0_tmr1_pins, 10798c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(gpt0_tmr1_pins), 10808c2ecf20Sopenharmony_ci .modemuxs = gpt0_tmr1_modemux, 10818c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt0_tmr1_modemux), 10828c2ecf20Sopenharmony_ci}; 10838c2ecf20Sopenharmony_ci 10848c2ecf20Sopenharmony_cistatic const char *const gpt0_grps[] = { "gpt0_tmr0_grp", "gpt0_tmr1_grp" }; 10858c2ecf20Sopenharmony_cistatic struct spear_function gpt0_function = { 10868c2ecf20Sopenharmony_ci .name = "gpt0", 10878c2ecf20Sopenharmony_ci .groups = gpt0_grps, 10888c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(gpt0_grps), 10898c2ecf20Sopenharmony_ci}; 10908c2ecf20Sopenharmony_ci 10918c2ecf20Sopenharmony_ci/* Pad multiplexing for gpt1_tmr0 device */ 10928c2ecf20Sopenharmony_cistatic const unsigned gpt1_tmr0_pins[] = { 6, 7 }; 10938c2ecf20Sopenharmony_cistatic struct spear_muxreg gpt1_tmr0_muxreg[] = { 10948c2ecf20Sopenharmony_ci { 10958c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 10968c2ecf20Sopenharmony_ci .mask = PMX_GPT1_TMR0_MASK, 10978c2ecf20Sopenharmony_ci .val = PMX_GPT1_TMR0_MASK, 10988c2ecf20Sopenharmony_ci }, { 10998c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 11008c2ecf20Sopenharmony_ci .mask = PMX_GPT1_TMR0_MASK, 11018c2ecf20Sopenharmony_ci .val = PMX_GPT1_TMR0_MASK, 11028c2ecf20Sopenharmony_ci }, 11038c2ecf20Sopenharmony_ci}; 11048c2ecf20Sopenharmony_ci 11058c2ecf20Sopenharmony_cistatic struct spear_modemux gpt1_tmr0_modemux[] = { 11068c2ecf20Sopenharmony_ci { 11078c2ecf20Sopenharmony_ci .muxregs = gpt1_tmr0_muxreg, 11088c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt1_tmr0_muxreg), 11098c2ecf20Sopenharmony_ci }, 11108c2ecf20Sopenharmony_ci}; 11118c2ecf20Sopenharmony_ci 11128c2ecf20Sopenharmony_cistatic struct spear_pingroup gpt1_tmr0_pingroup = { 11138c2ecf20Sopenharmony_ci .name = "gpt1_tmr0_grp", 11148c2ecf20Sopenharmony_ci .pins = gpt1_tmr0_pins, 11158c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(gpt1_tmr0_pins), 11168c2ecf20Sopenharmony_ci .modemuxs = gpt1_tmr0_modemux, 11178c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt1_tmr0_modemux), 11188c2ecf20Sopenharmony_ci}; 11198c2ecf20Sopenharmony_ci 11208c2ecf20Sopenharmony_ci/* Pad multiplexing for gpt1_tmr1 device */ 11218c2ecf20Sopenharmony_cistatic const unsigned gpt1_tmr1_pins[] = { 4, 5 }; 11228c2ecf20Sopenharmony_cistatic struct spear_muxreg gpt1_tmr1_muxreg[] = { 11238c2ecf20Sopenharmony_ci { 11248c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 11258c2ecf20Sopenharmony_ci .mask = PMX_GPT1_TMR1_MASK, 11268c2ecf20Sopenharmony_ci .val = PMX_GPT1_TMR1_MASK, 11278c2ecf20Sopenharmony_ci }, { 11288c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 11298c2ecf20Sopenharmony_ci .mask = PMX_GPT1_TMR1_MASK, 11308c2ecf20Sopenharmony_ci .val = PMX_GPT1_TMR1_MASK, 11318c2ecf20Sopenharmony_ci }, 11328c2ecf20Sopenharmony_ci}; 11338c2ecf20Sopenharmony_ci 11348c2ecf20Sopenharmony_cistatic struct spear_modemux gpt1_tmr1_modemux[] = { 11358c2ecf20Sopenharmony_ci { 11368c2ecf20Sopenharmony_ci .muxregs = gpt1_tmr1_muxreg, 11378c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt1_tmr1_muxreg), 11388c2ecf20Sopenharmony_ci }, 11398c2ecf20Sopenharmony_ci}; 11408c2ecf20Sopenharmony_ci 11418c2ecf20Sopenharmony_cistatic struct spear_pingroup gpt1_tmr1_pingroup = { 11428c2ecf20Sopenharmony_ci .name = "gpt1_tmr1_grp", 11438c2ecf20Sopenharmony_ci .pins = gpt1_tmr1_pins, 11448c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(gpt1_tmr1_pins), 11458c2ecf20Sopenharmony_ci .modemuxs = gpt1_tmr1_modemux, 11468c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt1_tmr1_modemux), 11478c2ecf20Sopenharmony_ci}; 11488c2ecf20Sopenharmony_ci 11498c2ecf20Sopenharmony_cistatic const char *const gpt1_grps[] = { "gpt1_tmr1_grp", "gpt1_tmr0_grp" }; 11508c2ecf20Sopenharmony_cistatic struct spear_function gpt1_function = { 11518c2ecf20Sopenharmony_ci .name = "gpt1", 11528c2ecf20Sopenharmony_ci .groups = gpt1_grps, 11538c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(gpt1_grps), 11548c2ecf20Sopenharmony_ci}; 11558c2ecf20Sopenharmony_ci 11568c2ecf20Sopenharmony_ci/* Pad multiplexing for mcif device */ 11578c2ecf20Sopenharmony_cistatic const unsigned mcif_pins[] = { 86, 87, 88, 89, 90, 91, 92, 93, 213, 214, 11588c2ecf20Sopenharmony_ci 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 11598c2ecf20Sopenharmony_ci 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 11608c2ecf20Sopenharmony_ci 243, 244, 245 }; 11618c2ecf20Sopenharmony_ci#define MCIF_MUXREG \ 11628c2ecf20Sopenharmony_ci { \ 11638c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, \ 11648c2ecf20Sopenharmony_ci .mask = PMX_MCI_DATA8_15_MASK, \ 11658c2ecf20Sopenharmony_ci .val = PMX_MCI_DATA8_15_MASK, \ 11668c2ecf20Sopenharmony_ci }, { \ 11678c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, \ 11688c2ecf20Sopenharmony_ci .mask = PMX_MCIFALL_1_MASK | PMX_NFWPRT1_MASK | \ 11698c2ecf20Sopenharmony_ci PMX_NFWPRT2_MASK, \ 11708c2ecf20Sopenharmony_ci .val = PMX_MCIFALL_1_MASK, \ 11718c2ecf20Sopenharmony_ci }, { \ 11728c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, \ 11738c2ecf20Sopenharmony_ci .mask = PMX_MCIFALL_2_MASK, \ 11748c2ecf20Sopenharmony_ci .val = PMX_MCIFALL_2_MASK, \ 11758c2ecf20Sopenharmony_ci }, { \ 11768c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, \ 11778c2ecf20Sopenharmony_ci .mask = PMX_MCI_DATA8_15_MASK, \ 11788c2ecf20Sopenharmony_ci .val = PMX_MCI_DATA8_15_MASK, \ 11798c2ecf20Sopenharmony_ci }, { \ 11808c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, \ 11818c2ecf20Sopenharmony_ci .mask = PMX_MCIFALL_1_MASK | PMX_NFWPRT1_MASK | \ 11828c2ecf20Sopenharmony_ci PMX_NFWPRT2_MASK, \ 11838c2ecf20Sopenharmony_ci .val = PMX_MCIFALL_1_MASK | PMX_NFWPRT1_MASK | \ 11848c2ecf20Sopenharmony_ci PMX_NFWPRT2_MASK, \ 11858c2ecf20Sopenharmony_ci }, { \ 11868c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, \ 11878c2ecf20Sopenharmony_ci .mask = PMX_MCIFALL_2_MASK, \ 11888c2ecf20Sopenharmony_ci .val = PMX_MCIFALL_2_MASK, \ 11898c2ecf20Sopenharmony_ci } 11908c2ecf20Sopenharmony_ci 11918c2ecf20Sopenharmony_ci/* sdhci device */ 11928c2ecf20Sopenharmony_cistatic struct spear_muxreg sdhci_muxreg[] = { 11938c2ecf20Sopenharmony_ci MCIF_MUXREG, 11948c2ecf20Sopenharmony_ci { 11958c2ecf20Sopenharmony_ci .reg = PERIP_CFG, 11968c2ecf20Sopenharmony_ci .mask = MCIF_SEL_MASK, 11978c2ecf20Sopenharmony_ci .val = MCIF_SEL_SD, 11988c2ecf20Sopenharmony_ci }, 11998c2ecf20Sopenharmony_ci}; 12008c2ecf20Sopenharmony_ci 12018c2ecf20Sopenharmony_cistatic struct spear_modemux sdhci_modemux[] = { 12028c2ecf20Sopenharmony_ci { 12038c2ecf20Sopenharmony_ci .muxregs = sdhci_muxreg, 12048c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(sdhci_muxreg), 12058c2ecf20Sopenharmony_ci }, 12068c2ecf20Sopenharmony_ci}; 12078c2ecf20Sopenharmony_ci 12088c2ecf20Sopenharmony_cistatic struct spear_pingroup sdhci_pingroup = { 12098c2ecf20Sopenharmony_ci .name = "sdhci_grp", 12108c2ecf20Sopenharmony_ci .pins = mcif_pins, 12118c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(mcif_pins), 12128c2ecf20Sopenharmony_ci .modemuxs = sdhci_modemux, 12138c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(sdhci_modemux), 12148c2ecf20Sopenharmony_ci}; 12158c2ecf20Sopenharmony_ci 12168c2ecf20Sopenharmony_cistatic const char *const sdhci_grps[] = { "sdhci_grp" }; 12178c2ecf20Sopenharmony_cistatic struct spear_function sdhci_function = { 12188c2ecf20Sopenharmony_ci .name = "sdhci", 12198c2ecf20Sopenharmony_ci .groups = sdhci_grps, 12208c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(sdhci_grps), 12218c2ecf20Sopenharmony_ci}; 12228c2ecf20Sopenharmony_ci 12238c2ecf20Sopenharmony_ci/* cf device */ 12248c2ecf20Sopenharmony_cistatic struct spear_muxreg cf_muxreg[] = { 12258c2ecf20Sopenharmony_ci MCIF_MUXREG, 12268c2ecf20Sopenharmony_ci { 12278c2ecf20Sopenharmony_ci .reg = PERIP_CFG, 12288c2ecf20Sopenharmony_ci .mask = MCIF_SEL_MASK, 12298c2ecf20Sopenharmony_ci .val = MCIF_SEL_CF, 12308c2ecf20Sopenharmony_ci }, 12318c2ecf20Sopenharmony_ci}; 12328c2ecf20Sopenharmony_ci 12338c2ecf20Sopenharmony_cistatic struct spear_modemux cf_modemux[] = { 12348c2ecf20Sopenharmony_ci { 12358c2ecf20Sopenharmony_ci .muxregs = cf_muxreg, 12368c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(cf_muxreg), 12378c2ecf20Sopenharmony_ci }, 12388c2ecf20Sopenharmony_ci}; 12398c2ecf20Sopenharmony_ci 12408c2ecf20Sopenharmony_cistatic struct spear_pingroup cf_pingroup = { 12418c2ecf20Sopenharmony_ci .name = "cf_grp", 12428c2ecf20Sopenharmony_ci .pins = mcif_pins, 12438c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(mcif_pins), 12448c2ecf20Sopenharmony_ci .modemuxs = cf_modemux, 12458c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(cf_modemux), 12468c2ecf20Sopenharmony_ci}; 12478c2ecf20Sopenharmony_ci 12488c2ecf20Sopenharmony_cistatic const char *const cf_grps[] = { "cf_grp" }; 12498c2ecf20Sopenharmony_cistatic struct spear_function cf_function = { 12508c2ecf20Sopenharmony_ci .name = "cf", 12518c2ecf20Sopenharmony_ci .groups = cf_grps, 12528c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(cf_grps), 12538c2ecf20Sopenharmony_ci}; 12548c2ecf20Sopenharmony_ci 12558c2ecf20Sopenharmony_ci/* xd device */ 12568c2ecf20Sopenharmony_cistatic struct spear_muxreg xd_muxreg[] = { 12578c2ecf20Sopenharmony_ci MCIF_MUXREG, 12588c2ecf20Sopenharmony_ci { 12598c2ecf20Sopenharmony_ci .reg = PERIP_CFG, 12608c2ecf20Sopenharmony_ci .mask = MCIF_SEL_MASK, 12618c2ecf20Sopenharmony_ci .val = MCIF_SEL_XD, 12628c2ecf20Sopenharmony_ci }, 12638c2ecf20Sopenharmony_ci}; 12648c2ecf20Sopenharmony_ci 12658c2ecf20Sopenharmony_cistatic struct spear_modemux xd_modemux[] = { 12668c2ecf20Sopenharmony_ci { 12678c2ecf20Sopenharmony_ci .muxregs = xd_muxreg, 12688c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(xd_muxreg), 12698c2ecf20Sopenharmony_ci }, 12708c2ecf20Sopenharmony_ci}; 12718c2ecf20Sopenharmony_ci 12728c2ecf20Sopenharmony_cistatic struct spear_pingroup xd_pingroup = { 12738c2ecf20Sopenharmony_ci .name = "xd_grp", 12748c2ecf20Sopenharmony_ci .pins = mcif_pins, 12758c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(mcif_pins), 12768c2ecf20Sopenharmony_ci .modemuxs = xd_modemux, 12778c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(xd_modemux), 12788c2ecf20Sopenharmony_ci}; 12798c2ecf20Sopenharmony_ci 12808c2ecf20Sopenharmony_cistatic const char *const xd_grps[] = { "xd_grp" }; 12818c2ecf20Sopenharmony_cistatic struct spear_function xd_function = { 12828c2ecf20Sopenharmony_ci .name = "xd", 12838c2ecf20Sopenharmony_ci .groups = xd_grps, 12848c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(xd_grps), 12858c2ecf20Sopenharmony_ci}; 12868c2ecf20Sopenharmony_ci 12878c2ecf20Sopenharmony_ci/* Pad multiplexing for touch_xy device */ 12888c2ecf20Sopenharmony_cistatic const unsigned touch_xy_pins[] = { 97 }; 12898c2ecf20Sopenharmony_cistatic struct spear_muxreg touch_xy_muxreg[] = { 12908c2ecf20Sopenharmony_ci { 12918c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 12928c2ecf20Sopenharmony_ci .mask = PMX_TOUCH_XY_MASK, 12938c2ecf20Sopenharmony_ci .val = PMX_TOUCH_XY_MASK, 12948c2ecf20Sopenharmony_ci }, { 12958c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 12968c2ecf20Sopenharmony_ci .mask = PMX_TOUCH_XY_MASK, 12978c2ecf20Sopenharmony_ci .val = PMX_TOUCH_XY_MASK, 12988c2ecf20Sopenharmony_ci }, 12998c2ecf20Sopenharmony_ci}; 13008c2ecf20Sopenharmony_ci 13018c2ecf20Sopenharmony_cistatic struct spear_modemux touch_xy_modemux[] = { 13028c2ecf20Sopenharmony_ci { 13038c2ecf20Sopenharmony_ci .muxregs = touch_xy_muxreg, 13048c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(touch_xy_muxreg), 13058c2ecf20Sopenharmony_ci }, 13068c2ecf20Sopenharmony_ci}; 13078c2ecf20Sopenharmony_ci 13088c2ecf20Sopenharmony_cistatic struct spear_pingroup touch_xy_pingroup = { 13098c2ecf20Sopenharmony_ci .name = "touch_xy_grp", 13108c2ecf20Sopenharmony_ci .pins = touch_xy_pins, 13118c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(touch_xy_pins), 13128c2ecf20Sopenharmony_ci .modemuxs = touch_xy_modemux, 13138c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(touch_xy_modemux), 13148c2ecf20Sopenharmony_ci}; 13158c2ecf20Sopenharmony_ci 13168c2ecf20Sopenharmony_cistatic const char *const touch_xy_grps[] = { "touch_xy_grp" }; 13178c2ecf20Sopenharmony_cistatic struct spear_function touch_xy_function = { 13188c2ecf20Sopenharmony_ci .name = "touchscreen", 13198c2ecf20Sopenharmony_ci .groups = touch_xy_grps, 13208c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(touch_xy_grps), 13218c2ecf20Sopenharmony_ci}; 13228c2ecf20Sopenharmony_ci 13238c2ecf20Sopenharmony_ci/* Pad multiplexing for uart1 device */ 13248c2ecf20Sopenharmony_ci/* Muxed with I2C */ 13258c2ecf20Sopenharmony_cistatic const unsigned uart1_dis_i2c_pins[] = { 102, 103 }; 13268c2ecf20Sopenharmony_cistatic struct spear_muxreg uart1_dis_i2c_muxreg[] = { 13278c2ecf20Sopenharmony_ci { 13288c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 13298c2ecf20Sopenharmony_ci .mask = PMX_I2C0_MASK, 13308c2ecf20Sopenharmony_ci .val = 0, 13318c2ecf20Sopenharmony_ci }, { 13328c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 13338c2ecf20Sopenharmony_ci .mask = PMX_I2C0_MASK, 13348c2ecf20Sopenharmony_ci .val = PMX_I2C0_MASK, 13358c2ecf20Sopenharmony_ci }, 13368c2ecf20Sopenharmony_ci}; 13378c2ecf20Sopenharmony_ci 13388c2ecf20Sopenharmony_cistatic struct spear_modemux uart1_dis_i2c_modemux[] = { 13398c2ecf20Sopenharmony_ci { 13408c2ecf20Sopenharmony_ci .muxregs = uart1_dis_i2c_muxreg, 13418c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart1_dis_i2c_muxreg), 13428c2ecf20Sopenharmony_ci }, 13438c2ecf20Sopenharmony_ci}; 13448c2ecf20Sopenharmony_ci 13458c2ecf20Sopenharmony_cistatic struct spear_pingroup uart_1_dis_i2c_pingroup = { 13468c2ecf20Sopenharmony_ci .name = "uart1_disable_i2c_grp", 13478c2ecf20Sopenharmony_ci .pins = uart1_dis_i2c_pins, 13488c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(uart1_dis_i2c_pins), 13498c2ecf20Sopenharmony_ci .modemuxs = uart1_dis_i2c_modemux, 13508c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart1_dis_i2c_modemux), 13518c2ecf20Sopenharmony_ci}; 13528c2ecf20Sopenharmony_ci 13538c2ecf20Sopenharmony_ci/* Muxed with SD/MMC */ 13548c2ecf20Sopenharmony_cistatic const unsigned uart1_dis_sd_pins[] = { 214, 215 }; 13558c2ecf20Sopenharmony_cistatic struct spear_muxreg uart1_dis_sd_muxreg[] = { 13568c2ecf20Sopenharmony_ci { 13578c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 13588c2ecf20Sopenharmony_ci .mask = PMX_MCIDATA1_MASK | 13598c2ecf20Sopenharmony_ci PMX_MCIDATA2_MASK, 13608c2ecf20Sopenharmony_ci .val = 0, 13618c2ecf20Sopenharmony_ci }, { 13628c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 13638c2ecf20Sopenharmony_ci .mask = PMX_MCIDATA1_MASK | 13648c2ecf20Sopenharmony_ci PMX_MCIDATA2_MASK, 13658c2ecf20Sopenharmony_ci .val = PMX_MCIDATA1_MASK | 13668c2ecf20Sopenharmony_ci PMX_MCIDATA2_MASK, 13678c2ecf20Sopenharmony_ci }, 13688c2ecf20Sopenharmony_ci}; 13698c2ecf20Sopenharmony_ci 13708c2ecf20Sopenharmony_cistatic struct spear_modemux uart1_dis_sd_modemux[] = { 13718c2ecf20Sopenharmony_ci { 13728c2ecf20Sopenharmony_ci .muxregs = uart1_dis_sd_muxreg, 13738c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart1_dis_sd_muxreg), 13748c2ecf20Sopenharmony_ci }, 13758c2ecf20Sopenharmony_ci}; 13768c2ecf20Sopenharmony_ci 13778c2ecf20Sopenharmony_cistatic struct spear_pingroup uart_1_dis_sd_pingroup = { 13788c2ecf20Sopenharmony_ci .name = "uart1_disable_sd_grp", 13798c2ecf20Sopenharmony_ci .pins = uart1_dis_sd_pins, 13808c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(uart1_dis_sd_pins), 13818c2ecf20Sopenharmony_ci .modemuxs = uart1_dis_sd_modemux, 13828c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart1_dis_sd_modemux), 13838c2ecf20Sopenharmony_ci}; 13848c2ecf20Sopenharmony_ci 13858c2ecf20Sopenharmony_cistatic const char *const uart1_grps[] = { "uart1_disable_i2c_grp", 13868c2ecf20Sopenharmony_ci "uart1_disable_sd_grp" }; 13878c2ecf20Sopenharmony_cistatic struct spear_function uart1_function = { 13888c2ecf20Sopenharmony_ci .name = "uart1", 13898c2ecf20Sopenharmony_ci .groups = uart1_grps, 13908c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(uart1_grps), 13918c2ecf20Sopenharmony_ci}; 13928c2ecf20Sopenharmony_ci 13938c2ecf20Sopenharmony_ci/* Pad multiplexing for uart2_3 device */ 13948c2ecf20Sopenharmony_cistatic const unsigned uart2_3_pins[] = { 104, 105, 106, 107 }; 13958c2ecf20Sopenharmony_cistatic struct spear_muxreg uart2_3_muxreg[] = { 13968c2ecf20Sopenharmony_ci { 13978c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 13988c2ecf20Sopenharmony_ci .mask = PMX_I2S0_MASK, 13998c2ecf20Sopenharmony_ci .val = 0, 14008c2ecf20Sopenharmony_ci }, { 14018c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 14028c2ecf20Sopenharmony_ci .mask = PMX_I2S0_MASK, 14038c2ecf20Sopenharmony_ci .val = PMX_I2S0_MASK, 14048c2ecf20Sopenharmony_ci }, 14058c2ecf20Sopenharmony_ci}; 14068c2ecf20Sopenharmony_ci 14078c2ecf20Sopenharmony_cistatic struct spear_modemux uart2_3_modemux[] = { 14088c2ecf20Sopenharmony_ci { 14098c2ecf20Sopenharmony_ci .muxregs = uart2_3_muxreg, 14108c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart2_3_muxreg), 14118c2ecf20Sopenharmony_ci }, 14128c2ecf20Sopenharmony_ci}; 14138c2ecf20Sopenharmony_ci 14148c2ecf20Sopenharmony_cistatic struct spear_pingroup uart_2_3_pingroup = { 14158c2ecf20Sopenharmony_ci .name = "uart2_3_grp", 14168c2ecf20Sopenharmony_ci .pins = uart2_3_pins, 14178c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(uart2_3_pins), 14188c2ecf20Sopenharmony_ci .modemuxs = uart2_3_modemux, 14198c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart2_3_modemux), 14208c2ecf20Sopenharmony_ci}; 14218c2ecf20Sopenharmony_ci 14228c2ecf20Sopenharmony_cistatic const char *const uart2_3_grps[] = { "uart2_3_grp" }; 14238c2ecf20Sopenharmony_cistatic struct spear_function uart2_3_function = { 14248c2ecf20Sopenharmony_ci .name = "uart2_3", 14258c2ecf20Sopenharmony_ci .groups = uart2_3_grps, 14268c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(uart2_3_grps), 14278c2ecf20Sopenharmony_ci}; 14288c2ecf20Sopenharmony_ci 14298c2ecf20Sopenharmony_ci/* Pad multiplexing for uart4 device */ 14308c2ecf20Sopenharmony_cistatic const unsigned uart4_pins[] = { 108, 113 }; 14318c2ecf20Sopenharmony_cistatic struct spear_muxreg uart4_muxreg[] = { 14328c2ecf20Sopenharmony_ci { 14338c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 14348c2ecf20Sopenharmony_ci .mask = PMX_I2S0_MASK | PMX_CLCD1_MASK, 14358c2ecf20Sopenharmony_ci .val = 0, 14368c2ecf20Sopenharmony_ci }, { 14378c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 14388c2ecf20Sopenharmony_ci .mask = PMX_I2S0_MASK | PMX_CLCD1_MASK, 14398c2ecf20Sopenharmony_ci .val = PMX_I2S0_MASK | PMX_CLCD1_MASK, 14408c2ecf20Sopenharmony_ci }, 14418c2ecf20Sopenharmony_ci}; 14428c2ecf20Sopenharmony_ci 14438c2ecf20Sopenharmony_cistatic struct spear_modemux uart4_modemux[] = { 14448c2ecf20Sopenharmony_ci { 14458c2ecf20Sopenharmony_ci .muxregs = uart4_muxreg, 14468c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart4_muxreg), 14478c2ecf20Sopenharmony_ci }, 14488c2ecf20Sopenharmony_ci}; 14498c2ecf20Sopenharmony_ci 14508c2ecf20Sopenharmony_cistatic struct spear_pingroup uart_4_pingroup = { 14518c2ecf20Sopenharmony_ci .name = "uart4_grp", 14528c2ecf20Sopenharmony_ci .pins = uart4_pins, 14538c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(uart4_pins), 14548c2ecf20Sopenharmony_ci .modemuxs = uart4_modemux, 14558c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart4_modemux), 14568c2ecf20Sopenharmony_ci}; 14578c2ecf20Sopenharmony_ci 14588c2ecf20Sopenharmony_cistatic const char *const uart4_grps[] = { "uart4_grp" }; 14598c2ecf20Sopenharmony_cistatic struct spear_function uart4_function = { 14608c2ecf20Sopenharmony_ci .name = "uart4", 14618c2ecf20Sopenharmony_ci .groups = uart4_grps, 14628c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(uart4_grps), 14638c2ecf20Sopenharmony_ci}; 14648c2ecf20Sopenharmony_ci 14658c2ecf20Sopenharmony_ci/* Pad multiplexing for uart5 device */ 14668c2ecf20Sopenharmony_cistatic const unsigned uart5_pins[] = { 114, 115 }; 14678c2ecf20Sopenharmony_cistatic struct spear_muxreg uart5_muxreg[] = { 14688c2ecf20Sopenharmony_ci { 14698c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 14708c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK, 14718c2ecf20Sopenharmony_ci .val = 0, 14728c2ecf20Sopenharmony_ci }, { 14738c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 14748c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK, 14758c2ecf20Sopenharmony_ci .val = PMX_CLCD1_MASK, 14768c2ecf20Sopenharmony_ci }, 14778c2ecf20Sopenharmony_ci}; 14788c2ecf20Sopenharmony_ci 14798c2ecf20Sopenharmony_cistatic struct spear_modemux uart5_modemux[] = { 14808c2ecf20Sopenharmony_ci { 14818c2ecf20Sopenharmony_ci .muxregs = uart5_muxreg, 14828c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart5_muxreg), 14838c2ecf20Sopenharmony_ci }, 14848c2ecf20Sopenharmony_ci}; 14858c2ecf20Sopenharmony_ci 14868c2ecf20Sopenharmony_cistatic struct spear_pingroup uart_5_pingroup = { 14878c2ecf20Sopenharmony_ci .name = "uart5_grp", 14888c2ecf20Sopenharmony_ci .pins = uart5_pins, 14898c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(uart5_pins), 14908c2ecf20Sopenharmony_ci .modemuxs = uart5_modemux, 14918c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart5_modemux), 14928c2ecf20Sopenharmony_ci}; 14938c2ecf20Sopenharmony_ci 14948c2ecf20Sopenharmony_cistatic const char *const uart5_grps[] = { "uart5_grp" }; 14958c2ecf20Sopenharmony_cistatic struct spear_function uart5_function = { 14968c2ecf20Sopenharmony_ci .name = "uart5", 14978c2ecf20Sopenharmony_ci .groups = uart5_grps, 14988c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(uart5_grps), 14998c2ecf20Sopenharmony_ci}; 15008c2ecf20Sopenharmony_ci 15018c2ecf20Sopenharmony_ci/* Pad multiplexing for rs485_0_1_tdm_0_1 device */ 15028c2ecf20Sopenharmony_cistatic const unsigned rs485_0_1_tdm_0_1_pins[] = { 116, 117, 118, 119, 120, 121, 15038c2ecf20Sopenharmony_ci 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 15048c2ecf20Sopenharmony_ci 136, 137 }; 15058c2ecf20Sopenharmony_cistatic struct spear_muxreg rs485_0_1_tdm_0_1_muxreg[] = { 15068c2ecf20Sopenharmony_ci { 15078c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 15088c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK, 15098c2ecf20Sopenharmony_ci .val = 0, 15108c2ecf20Sopenharmony_ci }, { 15118c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 15128c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK, 15138c2ecf20Sopenharmony_ci .val = PMX_CLCD1_MASK, 15148c2ecf20Sopenharmony_ci }, 15158c2ecf20Sopenharmony_ci}; 15168c2ecf20Sopenharmony_ci 15178c2ecf20Sopenharmony_cistatic struct spear_modemux rs485_0_1_tdm_0_1_modemux[] = { 15188c2ecf20Sopenharmony_ci { 15198c2ecf20Sopenharmony_ci .muxregs = rs485_0_1_tdm_0_1_muxreg, 15208c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(rs485_0_1_tdm_0_1_muxreg), 15218c2ecf20Sopenharmony_ci }, 15228c2ecf20Sopenharmony_ci}; 15238c2ecf20Sopenharmony_ci 15248c2ecf20Sopenharmony_cistatic struct spear_pingroup rs485_0_1_tdm_0_1_pingroup = { 15258c2ecf20Sopenharmony_ci .name = "rs485_0_1_tdm_0_1_grp", 15268c2ecf20Sopenharmony_ci .pins = rs485_0_1_tdm_0_1_pins, 15278c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(rs485_0_1_tdm_0_1_pins), 15288c2ecf20Sopenharmony_ci .modemuxs = rs485_0_1_tdm_0_1_modemux, 15298c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(rs485_0_1_tdm_0_1_modemux), 15308c2ecf20Sopenharmony_ci}; 15318c2ecf20Sopenharmony_ci 15328c2ecf20Sopenharmony_cistatic const char *const rs485_0_1_tdm_0_1_grps[] = { "rs485_0_1_tdm_0_1_grp" }; 15338c2ecf20Sopenharmony_cistatic struct spear_function rs485_0_1_tdm_0_1_function = { 15348c2ecf20Sopenharmony_ci .name = "rs485_0_1_tdm_0_1", 15358c2ecf20Sopenharmony_ci .groups = rs485_0_1_tdm_0_1_grps, 15368c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(rs485_0_1_tdm_0_1_grps), 15378c2ecf20Sopenharmony_ci}; 15388c2ecf20Sopenharmony_ci 15398c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c_1_2 device */ 15408c2ecf20Sopenharmony_cistatic const unsigned i2c_1_2_pins[] = { 138, 139, 140, 141 }; 15418c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c_1_2_muxreg[] = { 15428c2ecf20Sopenharmony_ci { 15438c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 15448c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK, 15458c2ecf20Sopenharmony_ci .val = 0, 15468c2ecf20Sopenharmony_ci }, { 15478c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 15488c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK, 15498c2ecf20Sopenharmony_ci .val = PMX_CLCD1_MASK, 15508c2ecf20Sopenharmony_ci }, 15518c2ecf20Sopenharmony_ci}; 15528c2ecf20Sopenharmony_ci 15538c2ecf20Sopenharmony_cistatic struct spear_modemux i2c_1_2_modemux[] = { 15548c2ecf20Sopenharmony_ci { 15558c2ecf20Sopenharmony_ci .muxregs = i2c_1_2_muxreg, 15568c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c_1_2_muxreg), 15578c2ecf20Sopenharmony_ci }, 15588c2ecf20Sopenharmony_ci}; 15598c2ecf20Sopenharmony_ci 15608c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c_1_2_pingroup = { 15618c2ecf20Sopenharmony_ci .name = "i2c_1_2_grp", 15628c2ecf20Sopenharmony_ci .pins = i2c_1_2_pins, 15638c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c_1_2_pins), 15648c2ecf20Sopenharmony_ci .modemuxs = i2c_1_2_modemux, 15658c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c_1_2_modemux), 15668c2ecf20Sopenharmony_ci}; 15678c2ecf20Sopenharmony_ci 15688c2ecf20Sopenharmony_cistatic const char *const i2c_1_2_grps[] = { "i2c_1_2_grp" }; 15698c2ecf20Sopenharmony_cistatic struct spear_function i2c_1_2_function = { 15708c2ecf20Sopenharmony_ci .name = "i2c_1_2", 15718c2ecf20Sopenharmony_ci .groups = i2c_1_2_grps, 15728c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c_1_2_grps), 15738c2ecf20Sopenharmony_ci}; 15748c2ecf20Sopenharmony_ci 15758c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c3_dis_smi_clcd device */ 15768c2ecf20Sopenharmony_ci/* Muxed with SMI & CLCD */ 15778c2ecf20Sopenharmony_cistatic const unsigned i2c3_dis_smi_clcd_pins[] = { 142, 153 }; 15788c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c3_dis_smi_clcd_muxreg[] = { 15798c2ecf20Sopenharmony_ci { 15808c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 15818c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK | PMX_SMI_MASK, 15828c2ecf20Sopenharmony_ci .val = 0, 15838c2ecf20Sopenharmony_ci }, { 15848c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 15858c2ecf20Sopenharmony_ci .mask = PMX_CLCD1_MASK | PMX_SMI_MASK, 15868c2ecf20Sopenharmony_ci .val = PMX_CLCD1_MASK | PMX_SMI_MASK, 15878c2ecf20Sopenharmony_ci }, 15888c2ecf20Sopenharmony_ci}; 15898c2ecf20Sopenharmony_ci 15908c2ecf20Sopenharmony_cistatic struct spear_modemux i2c3_dis_smi_clcd_modemux[] = { 15918c2ecf20Sopenharmony_ci { 15928c2ecf20Sopenharmony_ci .muxregs = i2c3_dis_smi_clcd_muxreg, 15938c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c3_dis_smi_clcd_muxreg), 15948c2ecf20Sopenharmony_ci }, 15958c2ecf20Sopenharmony_ci}; 15968c2ecf20Sopenharmony_ci 15978c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c3_dis_smi_clcd_pingroup = { 15988c2ecf20Sopenharmony_ci .name = "i2c3_dis_smi_clcd_grp", 15998c2ecf20Sopenharmony_ci .pins = i2c3_dis_smi_clcd_pins, 16008c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c3_dis_smi_clcd_pins), 16018c2ecf20Sopenharmony_ci .modemuxs = i2c3_dis_smi_clcd_modemux, 16028c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c3_dis_smi_clcd_modemux), 16038c2ecf20Sopenharmony_ci}; 16048c2ecf20Sopenharmony_ci 16058c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c3_dis_sd_i2s0 device */ 16068c2ecf20Sopenharmony_ci/* Muxed with SD/MMC & I2S1 */ 16078c2ecf20Sopenharmony_cistatic const unsigned i2c3_dis_sd_i2s0_pins[] = { 0, 216 }; 16088c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c3_dis_sd_i2s0_muxreg[] = { 16098c2ecf20Sopenharmony_ci { 16108c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 16118c2ecf20Sopenharmony_ci .mask = PMX_I2S1_MASK | PMX_MCIDATA3_MASK, 16128c2ecf20Sopenharmony_ci .val = 0, 16138c2ecf20Sopenharmony_ci }, { 16148c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 16158c2ecf20Sopenharmony_ci .mask = PMX_I2S1_MASK | PMX_MCIDATA3_MASK, 16168c2ecf20Sopenharmony_ci .val = PMX_I2S1_MASK | PMX_MCIDATA3_MASK, 16178c2ecf20Sopenharmony_ci }, 16188c2ecf20Sopenharmony_ci}; 16198c2ecf20Sopenharmony_ci 16208c2ecf20Sopenharmony_cistatic struct spear_modemux i2c3_dis_sd_i2s0_modemux[] = { 16218c2ecf20Sopenharmony_ci { 16228c2ecf20Sopenharmony_ci .muxregs = i2c3_dis_sd_i2s0_muxreg, 16238c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c3_dis_sd_i2s0_muxreg), 16248c2ecf20Sopenharmony_ci }, 16258c2ecf20Sopenharmony_ci}; 16268c2ecf20Sopenharmony_ci 16278c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c3_dis_sd_i2s0_pingroup = { 16288c2ecf20Sopenharmony_ci .name = "i2c3_dis_sd_i2s0_grp", 16298c2ecf20Sopenharmony_ci .pins = i2c3_dis_sd_i2s0_pins, 16308c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c3_dis_sd_i2s0_pins), 16318c2ecf20Sopenharmony_ci .modemuxs = i2c3_dis_sd_i2s0_modemux, 16328c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c3_dis_sd_i2s0_modemux), 16338c2ecf20Sopenharmony_ci}; 16348c2ecf20Sopenharmony_ci 16358c2ecf20Sopenharmony_cistatic const char *const i2c3_grps[] = { "i2c3_dis_smi_clcd_grp", 16368c2ecf20Sopenharmony_ci "i2c3_dis_sd_i2s0_grp" }; 16378c2ecf20Sopenharmony_cistatic struct spear_function i2c3_unction = { 16388c2ecf20Sopenharmony_ci .name = "i2c3_i2s1", 16398c2ecf20Sopenharmony_ci .groups = i2c3_grps, 16408c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c3_grps), 16418c2ecf20Sopenharmony_ci}; 16428c2ecf20Sopenharmony_ci 16438c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c_4_5_dis_smi device */ 16448c2ecf20Sopenharmony_ci/* Muxed with SMI */ 16458c2ecf20Sopenharmony_cistatic const unsigned i2c_4_5_dis_smi_pins[] = { 154, 155, 156, 157 }; 16468c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c_4_5_dis_smi_muxreg[] = { 16478c2ecf20Sopenharmony_ci { 16488c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 16498c2ecf20Sopenharmony_ci .mask = PMX_SMI_MASK, 16508c2ecf20Sopenharmony_ci .val = 0, 16518c2ecf20Sopenharmony_ci }, { 16528c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 16538c2ecf20Sopenharmony_ci .mask = PMX_SMI_MASK, 16548c2ecf20Sopenharmony_ci .val = PMX_SMI_MASK, 16558c2ecf20Sopenharmony_ci }, 16568c2ecf20Sopenharmony_ci}; 16578c2ecf20Sopenharmony_ci 16588c2ecf20Sopenharmony_cistatic struct spear_modemux i2c_4_5_dis_smi_modemux[] = { 16598c2ecf20Sopenharmony_ci { 16608c2ecf20Sopenharmony_ci .muxregs = i2c_4_5_dis_smi_muxreg, 16618c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c_4_5_dis_smi_muxreg), 16628c2ecf20Sopenharmony_ci }, 16638c2ecf20Sopenharmony_ci}; 16648c2ecf20Sopenharmony_ci 16658c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c_4_5_dis_smi_pingroup = { 16668c2ecf20Sopenharmony_ci .name = "i2c_4_5_dis_smi_grp", 16678c2ecf20Sopenharmony_ci .pins = i2c_4_5_dis_smi_pins, 16688c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c_4_5_dis_smi_pins), 16698c2ecf20Sopenharmony_ci .modemuxs = i2c_4_5_dis_smi_modemux, 16708c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c_4_5_dis_smi_modemux), 16718c2ecf20Sopenharmony_ci}; 16728c2ecf20Sopenharmony_ci 16738c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c4_dis_sd device */ 16748c2ecf20Sopenharmony_ci/* Muxed with SD/MMC */ 16758c2ecf20Sopenharmony_cistatic const unsigned i2c4_dis_sd_pins[] = { 217, 218 }; 16768c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c4_dis_sd_muxreg[] = { 16778c2ecf20Sopenharmony_ci { 16788c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 16798c2ecf20Sopenharmony_ci .mask = PMX_MCIDATA4_MASK, 16808c2ecf20Sopenharmony_ci .val = 0, 16818c2ecf20Sopenharmony_ci }, { 16828c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 16838c2ecf20Sopenharmony_ci .mask = PMX_MCIDATA5_MASK, 16848c2ecf20Sopenharmony_ci .val = 0, 16858c2ecf20Sopenharmony_ci }, { 16868c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 16878c2ecf20Sopenharmony_ci .mask = PMX_MCIDATA4_MASK, 16888c2ecf20Sopenharmony_ci .val = PMX_MCIDATA4_MASK, 16898c2ecf20Sopenharmony_ci }, { 16908c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 16918c2ecf20Sopenharmony_ci .mask = PMX_MCIDATA5_MASK, 16928c2ecf20Sopenharmony_ci .val = PMX_MCIDATA5_MASK, 16938c2ecf20Sopenharmony_ci }, 16948c2ecf20Sopenharmony_ci}; 16958c2ecf20Sopenharmony_ci 16968c2ecf20Sopenharmony_cistatic struct spear_modemux i2c4_dis_sd_modemux[] = { 16978c2ecf20Sopenharmony_ci { 16988c2ecf20Sopenharmony_ci .muxregs = i2c4_dis_sd_muxreg, 16998c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c4_dis_sd_muxreg), 17008c2ecf20Sopenharmony_ci }, 17018c2ecf20Sopenharmony_ci}; 17028c2ecf20Sopenharmony_ci 17038c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c4_dis_sd_pingroup = { 17048c2ecf20Sopenharmony_ci .name = "i2c4_dis_sd_grp", 17058c2ecf20Sopenharmony_ci .pins = i2c4_dis_sd_pins, 17068c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c4_dis_sd_pins), 17078c2ecf20Sopenharmony_ci .modemuxs = i2c4_dis_sd_modemux, 17088c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c4_dis_sd_modemux), 17098c2ecf20Sopenharmony_ci}; 17108c2ecf20Sopenharmony_ci 17118c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c5_dis_sd device */ 17128c2ecf20Sopenharmony_ci/* Muxed with SD/MMC */ 17138c2ecf20Sopenharmony_cistatic const unsigned i2c5_dis_sd_pins[] = { 219, 220 }; 17148c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c5_dis_sd_muxreg[] = { 17158c2ecf20Sopenharmony_ci { 17168c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 17178c2ecf20Sopenharmony_ci .mask = PMX_MCIDATA6_MASK | 17188c2ecf20Sopenharmony_ci PMX_MCIDATA7_MASK, 17198c2ecf20Sopenharmony_ci .val = 0, 17208c2ecf20Sopenharmony_ci }, { 17218c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 17228c2ecf20Sopenharmony_ci .mask = PMX_MCIDATA6_MASK | 17238c2ecf20Sopenharmony_ci PMX_MCIDATA7_MASK, 17248c2ecf20Sopenharmony_ci .val = PMX_MCIDATA6_MASK | 17258c2ecf20Sopenharmony_ci PMX_MCIDATA7_MASK, 17268c2ecf20Sopenharmony_ci }, 17278c2ecf20Sopenharmony_ci}; 17288c2ecf20Sopenharmony_ci 17298c2ecf20Sopenharmony_cistatic struct spear_modemux i2c5_dis_sd_modemux[] = { 17308c2ecf20Sopenharmony_ci { 17318c2ecf20Sopenharmony_ci .muxregs = i2c5_dis_sd_muxreg, 17328c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c5_dis_sd_muxreg), 17338c2ecf20Sopenharmony_ci }, 17348c2ecf20Sopenharmony_ci}; 17358c2ecf20Sopenharmony_ci 17368c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c5_dis_sd_pingroup = { 17378c2ecf20Sopenharmony_ci .name = "i2c5_dis_sd_grp", 17388c2ecf20Sopenharmony_ci .pins = i2c5_dis_sd_pins, 17398c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c5_dis_sd_pins), 17408c2ecf20Sopenharmony_ci .modemuxs = i2c5_dis_sd_modemux, 17418c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c5_dis_sd_modemux), 17428c2ecf20Sopenharmony_ci}; 17438c2ecf20Sopenharmony_ci 17448c2ecf20Sopenharmony_cistatic const char *const i2c_4_5_grps[] = { "i2c5_dis_sd_grp", 17458c2ecf20Sopenharmony_ci "i2c4_dis_sd_grp", "i2c_4_5_dis_smi_grp" }; 17468c2ecf20Sopenharmony_cistatic struct spear_function i2c_4_5_function = { 17478c2ecf20Sopenharmony_ci .name = "i2c_4_5", 17488c2ecf20Sopenharmony_ci .groups = i2c_4_5_grps, 17498c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c_4_5_grps), 17508c2ecf20Sopenharmony_ci}; 17518c2ecf20Sopenharmony_ci 17528c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c_6_7_dis_kbd device */ 17538c2ecf20Sopenharmony_ci/* Muxed with KBD */ 17548c2ecf20Sopenharmony_cistatic const unsigned i2c_6_7_dis_kbd_pins[] = { 207, 208, 209, 210 }; 17558c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c_6_7_dis_kbd_muxreg[] = { 17568c2ecf20Sopenharmony_ci { 17578c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 17588c2ecf20Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK, 17598c2ecf20Sopenharmony_ci .val = 0, 17608c2ecf20Sopenharmony_ci }, { 17618c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 17628c2ecf20Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK, 17638c2ecf20Sopenharmony_ci .val = PMX_KBD_ROWCOL25_MASK, 17648c2ecf20Sopenharmony_ci }, 17658c2ecf20Sopenharmony_ci}; 17668c2ecf20Sopenharmony_ci 17678c2ecf20Sopenharmony_cistatic struct spear_modemux i2c_6_7_dis_kbd_modemux[] = { 17688c2ecf20Sopenharmony_ci { 17698c2ecf20Sopenharmony_ci .muxregs = i2c_6_7_dis_kbd_muxreg, 17708c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c_6_7_dis_kbd_muxreg), 17718c2ecf20Sopenharmony_ci }, 17728c2ecf20Sopenharmony_ci}; 17738c2ecf20Sopenharmony_ci 17748c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c_6_7_dis_kbd_pingroup = { 17758c2ecf20Sopenharmony_ci .name = "i2c_6_7_dis_kbd_grp", 17768c2ecf20Sopenharmony_ci .pins = i2c_6_7_dis_kbd_pins, 17778c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c_6_7_dis_kbd_pins), 17788c2ecf20Sopenharmony_ci .modemuxs = i2c_6_7_dis_kbd_modemux, 17798c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c_6_7_dis_kbd_modemux), 17808c2ecf20Sopenharmony_ci}; 17818c2ecf20Sopenharmony_ci 17828c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c6_dis_sd device */ 17838c2ecf20Sopenharmony_ci/* Muxed with SD/MMC */ 17848c2ecf20Sopenharmony_cistatic const unsigned i2c6_dis_sd_pins[] = { 236, 237 }; 17858c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c6_dis_sd_muxreg[] = { 17868c2ecf20Sopenharmony_ci { 17878c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 17888c2ecf20Sopenharmony_ci .mask = PMX_MCIIORDRE_MASK | 17898c2ecf20Sopenharmony_ci PMX_MCIIOWRWE_MASK, 17908c2ecf20Sopenharmony_ci .val = 0, 17918c2ecf20Sopenharmony_ci }, { 17928c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 17938c2ecf20Sopenharmony_ci .mask = PMX_MCIIORDRE_MASK | 17948c2ecf20Sopenharmony_ci PMX_MCIIOWRWE_MASK, 17958c2ecf20Sopenharmony_ci .val = PMX_MCIIORDRE_MASK | 17968c2ecf20Sopenharmony_ci PMX_MCIIOWRWE_MASK, 17978c2ecf20Sopenharmony_ci }, 17988c2ecf20Sopenharmony_ci}; 17998c2ecf20Sopenharmony_ci 18008c2ecf20Sopenharmony_cistatic struct spear_modemux i2c6_dis_sd_modemux[] = { 18018c2ecf20Sopenharmony_ci { 18028c2ecf20Sopenharmony_ci .muxregs = i2c6_dis_sd_muxreg, 18038c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c6_dis_sd_muxreg), 18048c2ecf20Sopenharmony_ci }, 18058c2ecf20Sopenharmony_ci}; 18068c2ecf20Sopenharmony_ci 18078c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c6_dis_sd_pingroup = { 18088c2ecf20Sopenharmony_ci .name = "i2c6_dis_sd_grp", 18098c2ecf20Sopenharmony_ci .pins = i2c6_dis_sd_pins, 18108c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c6_dis_sd_pins), 18118c2ecf20Sopenharmony_ci .modemuxs = i2c6_dis_sd_modemux, 18128c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c6_dis_sd_modemux), 18138c2ecf20Sopenharmony_ci}; 18148c2ecf20Sopenharmony_ci 18158c2ecf20Sopenharmony_ci/* Pad multiplexing for i2c7_dis_sd device */ 18168c2ecf20Sopenharmony_cistatic const unsigned i2c7_dis_sd_pins[] = { 238, 239 }; 18178c2ecf20Sopenharmony_cistatic struct spear_muxreg i2c7_dis_sd_muxreg[] = { 18188c2ecf20Sopenharmony_ci { 18198c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 18208c2ecf20Sopenharmony_ci .mask = PMX_MCIRESETCF_MASK | 18218c2ecf20Sopenharmony_ci PMX_MCICS0CE_MASK, 18228c2ecf20Sopenharmony_ci .val = 0, 18238c2ecf20Sopenharmony_ci }, { 18248c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 18258c2ecf20Sopenharmony_ci .mask = PMX_MCIRESETCF_MASK | 18268c2ecf20Sopenharmony_ci PMX_MCICS0CE_MASK, 18278c2ecf20Sopenharmony_ci .val = PMX_MCIRESETCF_MASK | 18288c2ecf20Sopenharmony_ci PMX_MCICS0CE_MASK, 18298c2ecf20Sopenharmony_ci }, 18308c2ecf20Sopenharmony_ci}; 18318c2ecf20Sopenharmony_ci 18328c2ecf20Sopenharmony_cistatic struct spear_modemux i2c7_dis_sd_modemux[] = { 18338c2ecf20Sopenharmony_ci { 18348c2ecf20Sopenharmony_ci .muxregs = i2c7_dis_sd_muxreg, 18358c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c7_dis_sd_muxreg), 18368c2ecf20Sopenharmony_ci }, 18378c2ecf20Sopenharmony_ci}; 18388c2ecf20Sopenharmony_ci 18398c2ecf20Sopenharmony_cistatic struct spear_pingroup i2c7_dis_sd_pingroup = { 18408c2ecf20Sopenharmony_ci .name = "i2c7_dis_sd_grp", 18418c2ecf20Sopenharmony_ci .pins = i2c7_dis_sd_pins, 18428c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(i2c7_dis_sd_pins), 18438c2ecf20Sopenharmony_ci .modemuxs = i2c7_dis_sd_modemux, 18448c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c7_dis_sd_modemux), 18458c2ecf20Sopenharmony_ci}; 18468c2ecf20Sopenharmony_ci 18478c2ecf20Sopenharmony_cistatic const char *const i2c_6_7_grps[] = { "i2c6_dis_sd_grp", 18488c2ecf20Sopenharmony_ci "i2c7_dis_sd_grp", "i2c_6_7_dis_kbd_grp" }; 18498c2ecf20Sopenharmony_cistatic struct spear_function i2c_6_7_function = { 18508c2ecf20Sopenharmony_ci .name = "i2c_6_7", 18518c2ecf20Sopenharmony_ci .groups = i2c_6_7_grps, 18528c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c_6_7_grps), 18538c2ecf20Sopenharmony_ci}; 18548c2ecf20Sopenharmony_ci 18558c2ecf20Sopenharmony_ci/* Pad multiplexing for can0_dis_nor device */ 18568c2ecf20Sopenharmony_ci/* Muxed with NOR */ 18578c2ecf20Sopenharmony_cistatic const unsigned can0_dis_nor_pins[] = { 56, 57 }; 18588c2ecf20Sopenharmony_cistatic struct spear_muxreg can0_dis_nor_muxreg[] = { 18598c2ecf20Sopenharmony_ci { 18608c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 18618c2ecf20Sopenharmony_ci .mask = PMX_NFRSTPWDWN2_MASK, 18628c2ecf20Sopenharmony_ci .val = 0, 18638c2ecf20Sopenharmony_ci }, { 18648c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 18658c2ecf20Sopenharmony_ci .mask = PMX_NFRSTPWDWN3_MASK, 18668c2ecf20Sopenharmony_ci .val = 0, 18678c2ecf20Sopenharmony_ci }, { 18688c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 18698c2ecf20Sopenharmony_ci .mask = PMX_NFRSTPWDWN2_MASK, 18708c2ecf20Sopenharmony_ci .val = PMX_NFRSTPWDWN2_MASK, 18718c2ecf20Sopenharmony_ci }, { 18728c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 18738c2ecf20Sopenharmony_ci .mask = PMX_NFRSTPWDWN3_MASK, 18748c2ecf20Sopenharmony_ci .val = PMX_NFRSTPWDWN3_MASK, 18758c2ecf20Sopenharmony_ci }, 18768c2ecf20Sopenharmony_ci}; 18778c2ecf20Sopenharmony_ci 18788c2ecf20Sopenharmony_cistatic struct spear_modemux can0_dis_nor_modemux[] = { 18798c2ecf20Sopenharmony_ci { 18808c2ecf20Sopenharmony_ci .muxregs = can0_dis_nor_muxreg, 18818c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(can0_dis_nor_muxreg), 18828c2ecf20Sopenharmony_ci }, 18838c2ecf20Sopenharmony_ci}; 18848c2ecf20Sopenharmony_ci 18858c2ecf20Sopenharmony_cistatic struct spear_pingroup can0_dis_nor_pingroup = { 18868c2ecf20Sopenharmony_ci .name = "can0_dis_nor_grp", 18878c2ecf20Sopenharmony_ci .pins = can0_dis_nor_pins, 18888c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(can0_dis_nor_pins), 18898c2ecf20Sopenharmony_ci .modemuxs = can0_dis_nor_modemux, 18908c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(can0_dis_nor_modemux), 18918c2ecf20Sopenharmony_ci}; 18928c2ecf20Sopenharmony_ci 18938c2ecf20Sopenharmony_ci/* Pad multiplexing for can0_dis_sd device */ 18948c2ecf20Sopenharmony_ci/* Muxed with SD/MMC */ 18958c2ecf20Sopenharmony_cistatic const unsigned can0_dis_sd_pins[] = { 240, 241 }; 18968c2ecf20Sopenharmony_cistatic struct spear_muxreg can0_dis_sd_muxreg[] = { 18978c2ecf20Sopenharmony_ci { 18988c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 18998c2ecf20Sopenharmony_ci .mask = PMX_MCICFINTR_MASK | PMX_MCIIORDY_MASK, 19008c2ecf20Sopenharmony_ci .val = 0, 19018c2ecf20Sopenharmony_ci }, { 19028c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 19038c2ecf20Sopenharmony_ci .mask = PMX_MCICFINTR_MASK | PMX_MCIIORDY_MASK, 19048c2ecf20Sopenharmony_ci .val = PMX_MCICFINTR_MASK | PMX_MCIIORDY_MASK, 19058c2ecf20Sopenharmony_ci }, 19068c2ecf20Sopenharmony_ci}; 19078c2ecf20Sopenharmony_ci 19088c2ecf20Sopenharmony_cistatic struct spear_modemux can0_dis_sd_modemux[] = { 19098c2ecf20Sopenharmony_ci { 19108c2ecf20Sopenharmony_ci .muxregs = can0_dis_sd_muxreg, 19118c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(can0_dis_sd_muxreg), 19128c2ecf20Sopenharmony_ci }, 19138c2ecf20Sopenharmony_ci}; 19148c2ecf20Sopenharmony_ci 19158c2ecf20Sopenharmony_cistatic struct spear_pingroup can0_dis_sd_pingroup = { 19168c2ecf20Sopenharmony_ci .name = "can0_dis_sd_grp", 19178c2ecf20Sopenharmony_ci .pins = can0_dis_sd_pins, 19188c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(can0_dis_sd_pins), 19198c2ecf20Sopenharmony_ci .modemuxs = can0_dis_sd_modemux, 19208c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(can0_dis_sd_modemux), 19218c2ecf20Sopenharmony_ci}; 19228c2ecf20Sopenharmony_ci 19238c2ecf20Sopenharmony_cistatic const char *const can0_grps[] = { "can0_dis_nor_grp", "can0_dis_sd_grp" 19248c2ecf20Sopenharmony_ci}; 19258c2ecf20Sopenharmony_cistatic struct spear_function can0_function = { 19268c2ecf20Sopenharmony_ci .name = "can0", 19278c2ecf20Sopenharmony_ci .groups = can0_grps, 19288c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(can0_grps), 19298c2ecf20Sopenharmony_ci}; 19308c2ecf20Sopenharmony_ci 19318c2ecf20Sopenharmony_ci/* Pad multiplexing for can1_dis_sd device */ 19328c2ecf20Sopenharmony_ci/* Muxed with SD/MMC */ 19338c2ecf20Sopenharmony_cistatic const unsigned can1_dis_sd_pins[] = { 242, 243 }; 19348c2ecf20Sopenharmony_cistatic struct spear_muxreg can1_dis_sd_muxreg[] = { 19358c2ecf20Sopenharmony_ci { 19368c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 19378c2ecf20Sopenharmony_ci .mask = PMX_MCICS1_MASK | PMX_MCIDMAACK_MASK, 19388c2ecf20Sopenharmony_ci .val = 0, 19398c2ecf20Sopenharmony_ci }, { 19408c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 19418c2ecf20Sopenharmony_ci .mask = PMX_MCICS1_MASK | PMX_MCIDMAACK_MASK, 19428c2ecf20Sopenharmony_ci .val = PMX_MCICS1_MASK | PMX_MCIDMAACK_MASK, 19438c2ecf20Sopenharmony_ci }, 19448c2ecf20Sopenharmony_ci}; 19458c2ecf20Sopenharmony_ci 19468c2ecf20Sopenharmony_cistatic struct spear_modemux can1_dis_sd_modemux[] = { 19478c2ecf20Sopenharmony_ci { 19488c2ecf20Sopenharmony_ci .muxregs = can1_dis_sd_muxreg, 19498c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(can1_dis_sd_muxreg), 19508c2ecf20Sopenharmony_ci }, 19518c2ecf20Sopenharmony_ci}; 19528c2ecf20Sopenharmony_ci 19538c2ecf20Sopenharmony_cistatic struct spear_pingroup can1_dis_sd_pingroup = { 19548c2ecf20Sopenharmony_ci .name = "can1_dis_sd_grp", 19558c2ecf20Sopenharmony_ci .pins = can1_dis_sd_pins, 19568c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(can1_dis_sd_pins), 19578c2ecf20Sopenharmony_ci .modemuxs = can1_dis_sd_modemux, 19588c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(can1_dis_sd_modemux), 19598c2ecf20Sopenharmony_ci}; 19608c2ecf20Sopenharmony_ci 19618c2ecf20Sopenharmony_ci/* Pad multiplexing for can1_dis_kbd device */ 19628c2ecf20Sopenharmony_ci/* Muxed with KBD */ 19638c2ecf20Sopenharmony_cistatic const unsigned can1_dis_kbd_pins[] = { 201, 202 }; 19648c2ecf20Sopenharmony_cistatic struct spear_muxreg can1_dis_kbd_muxreg[] = { 19658c2ecf20Sopenharmony_ci { 19668c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 19678c2ecf20Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK, 19688c2ecf20Sopenharmony_ci .val = 0, 19698c2ecf20Sopenharmony_ci }, { 19708c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 19718c2ecf20Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK, 19728c2ecf20Sopenharmony_ci .val = PMX_KBD_ROWCOL25_MASK, 19738c2ecf20Sopenharmony_ci }, 19748c2ecf20Sopenharmony_ci}; 19758c2ecf20Sopenharmony_ci 19768c2ecf20Sopenharmony_cistatic struct spear_modemux can1_dis_kbd_modemux[] = { 19778c2ecf20Sopenharmony_ci { 19788c2ecf20Sopenharmony_ci .muxregs = can1_dis_kbd_muxreg, 19798c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(can1_dis_kbd_muxreg), 19808c2ecf20Sopenharmony_ci }, 19818c2ecf20Sopenharmony_ci}; 19828c2ecf20Sopenharmony_ci 19838c2ecf20Sopenharmony_cistatic struct spear_pingroup can1_dis_kbd_pingroup = { 19848c2ecf20Sopenharmony_ci .name = "can1_dis_kbd_grp", 19858c2ecf20Sopenharmony_ci .pins = can1_dis_kbd_pins, 19868c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(can1_dis_kbd_pins), 19878c2ecf20Sopenharmony_ci .modemuxs = can1_dis_kbd_modemux, 19888c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(can1_dis_kbd_modemux), 19898c2ecf20Sopenharmony_ci}; 19908c2ecf20Sopenharmony_ci 19918c2ecf20Sopenharmony_cistatic const char *const can1_grps[] = { "can1_dis_sd_grp", "can1_dis_kbd_grp" 19928c2ecf20Sopenharmony_ci}; 19938c2ecf20Sopenharmony_cistatic struct spear_function can1_function = { 19948c2ecf20Sopenharmony_ci .name = "can1", 19958c2ecf20Sopenharmony_ci .groups = can1_grps, 19968c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(can1_grps), 19978c2ecf20Sopenharmony_ci}; 19988c2ecf20Sopenharmony_ci 19998c2ecf20Sopenharmony_ci/* Pad multiplexing for (ras-ip) pci device */ 20008c2ecf20Sopenharmony_cistatic const unsigned pci_pins[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 18, 20018c2ecf20Sopenharmony_ci 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 20028c2ecf20Sopenharmony_ci 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 20038c2ecf20Sopenharmony_ci 55, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 }; 20048c2ecf20Sopenharmony_ci 20058c2ecf20Sopenharmony_cistatic struct spear_muxreg pci_muxreg[] = { 20068c2ecf20Sopenharmony_ci { 20078c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 20088c2ecf20Sopenharmony_ci .mask = PMX_MCI_DATA8_15_MASK, 20098c2ecf20Sopenharmony_ci .val = 0, 20108c2ecf20Sopenharmony_ci }, { 20118c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 20128c2ecf20Sopenharmony_ci .mask = PMX_PCI_REG1_MASK, 20138c2ecf20Sopenharmony_ci .val = 0, 20148c2ecf20Sopenharmony_ci }, { 20158c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 20168c2ecf20Sopenharmony_ci .mask = PMX_PCI_REG2_MASK, 20178c2ecf20Sopenharmony_ci .val = 0, 20188c2ecf20Sopenharmony_ci }, { 20198c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 20208c2ecf20Sopenharmony_ci .mask = PMX_MCI_DATA8_15_MASK, 20218c2ecf20Sopenharmony_ci .val = PMX_MCI_DATA8_15_MASK, 20228c2ecf20Sopenharmony_ci }, { 20238c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 20248c2ecf20Sopenharmony_ci .mask = PMX_PCI_REG1_MASK, 20258c2ecf20Sopenharmony_ci .val = PMX_PCI_REG1_MASK, 20268c2ecf20Sopenharmony_ci }, { 20278c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 20288c2ecf20Sopenharmony_ci .mask = PMX_PCI_REG2_MASK, 20298c2ecf20Sopenharmony_ci .val = PMX_PCI_REG2_MASK, 20308c2ecf20Sopenharmony_ci }, 20318c2ecf20Sopenharmony_ci}; 20328c2ecf20Sopenharmony_ci 20338c2ecf20Sopenharmony_cistatic struct spear_modemux pci_modemux[] = { 20348c2ecf20Sopenharmony_ci { 20358c2ecf20Sopenharmony_ci .muxregs = pci_muxreg, 20368c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(pci_muxreg), 20378c2ecf20Sopenharmony_ci }, 20388c2ecf20Sopenharmony_ci}; 20398c2ecf20Sopenharmony_ci 20408c2ecf20Sopenharmony_cistatic struct spear_pingroup pci_pingroup = { 20418c2ecf20Sopenharmony_ci .name = "pci_grp", 20428c2ecf20Sopenharmony_ci .pins = pci_pins, 20438c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(pci_pins), 20448c2ecf20Sopenharmony_ci .modemuxs = pci_modemux, 20458c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(pci_modemux), 20468c2ecf20Sopenharmony_ci}; 20478c2ecf20Sopenharmony_ci 20488c2ecf20Sopenharmony_cistatic const char *const pci_grps[] = { "pci_grp" }; 20498c2ecf20Sopenharmony_cistatic struct spear_function pci_function = { 20508c2ecf20Sopenharmony_ci .name = "pci", 20518c2ecf20Sopenharmony_ci .groups = pci_grps, 20528c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(pci_grps), 20538c2ecf20Sopenharmony_ci}; 20548c2ecf20Sopenharmony_ci 20558c2ecf20Sopenharmony_ci/* pad multiplexing for (fix-part) pcie0 device */ 20568c2ecf20Sopenharmony_cistatic struct spear_muxreg pcie0_muxreg[] = { 20578c2ecf20Sopenharmony_ci { 20588c2ecf20Sopenharmony_ci .reg = PCIE_SATA_CFG, 20598c2ecf20Sopenharmony_ci .mask = PCIE_CFG_VAL(0), 20608c2ecf20Sopenharmony_ci .val = PCIE_CFG_VAL(0), 20618c2ecf20Sopenharmony_ci }, 20628c2ecf20Sopenharmony_ci}; 20638c2ecf20Sopenharmony_ci 20648c2ecf20Sopenharmony_cistatic struct spear_modemux pcie0_modemux[] = { 20658c2ecf20Sopenharmony_ci { 20668c2ecf20Sopenharmony_ci .muxregs = pcie0_muxreg, 20678c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(pcie0_muxreg), 20688c2ecf20Sopenharmony_ci }, 20698c2ecf20Sopenharmony_ci}; 20708c2ecf20Sopenharmony_ci 20718c2ecf20Sopenharmony_cistatic struct spear_pingroup pcie0_pingroup = { 20728c2ecf20Sopenharmony_ci .name = "pcie0_grp", 20738c2ecf20Sopenharmony_ci .modemuxs = pcie0_modemux, 20748c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(pcie0_modemux), 20758c2ecf20Sopenharmony_ci}; 20768c2ecf20Sopenharmony_ci 20778c2ecf20Sopenharmony_ci/* pad multiplexing for (fix-part) pcie1 device */ 20788c2ecf20Sopenharmony_cistatic struct spear_muxreg pcie1_muxreg[] = { 20798c2ecf20Sopenharmony_ci { 20808c2ecf20Sopenharmony_ci .reg = PCIE_SATA_CFG, 20818c2ecf20Sopenharmony_ci .mask = PCIE_CFG_VAL(1), 20828c2ecf20Sopenharmony_ci .val = PCIE_CFG_VAL(1), 20838c2ecf20Sopenharmony_ci }, 20848c2ecf20Sopenharmony_ci}; 20858c2ecf20Sopenharmony_ci 20868c2ecf20Sopenharmony_cistatic struct spear_modemux pcie1_modemux[] = { 20878c2ecf20Sopenharmony_ci { 20888c2ecf20Sopenharmony_ci .muxregs = pcie1_muxreg, 20898c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(pcie1_muxreg), 20908c2ecf20Sopenharmony_ci }, 20918c2ecf20Sopenharmony_ci}; 20928c2ecf20Sopenharmony_ci 20938c2ecf20Sopenharmony_cistatic struct spear_pingroup pcie1_pingroup = { 20948c2ecf20Sopenharmony_ci .name = "pcie1_grp", 20958c2ecf20Sopenharmony_ci .modemuxs = pcie1_modemux, 20968c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(pcie1_modemux), 20978c2ecf20Sopenharmony_ci}; 20988c2ecf20Sopenharmony_ci 20998c2ecf20Sopenharmony_ci/* pad multiplexing for (fix-part) pcie2 device */ 21008c2ecf20Sopenharmony_cistatic struct spear_muxreg pcie2_muxreg[] = { 21018c2ecf20Sopenharmony_ci { 21028c2ecf20Sopenharmony_ci .reg = PCIE_SATA_CFG, 21038c2ecf20Sopenharmony_ci .mask = PCIE_CFG_VAL(2), 21048c2ecf20Sopenharmony_ci .val = PCIE_CFG_VAL(2), 21058c2ecf20Sopenharmony_ci }, 21068c2ecf20Sopenharmony_ci}; 21078c2ecf20Sopenharmony_ci 21088c2ecf20Sopenharmony_cistatic struct spear_modemux pcie2_modemux[] = { 21098c2ecf20Sopenharmony_ci { 21108c2ecf20Sopenharmony_ci .muxregs = pcie2_muxreg, 21118c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(pcie2_muxreg), 21128c2ecf20Sopenharmony_ci }, 21138c2ecf20Sopenharmony_ci}; 21148c2ecf20Sopenharmony_ci 21158c2ecf20Sopenharmony_cistatic struct spear_pingroup pcie2_pingroup = { 21168c2ecf20Sopenharmony_ci .name = "pcie2_grp", 21178c2ecf20Sopenharmony_ci .modemuxs = pcie2_modemux, 21188c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(pcie2_modemux), 21198c2ecf20Sopenharmony_ci}; 21208c2ecf20Sopenharmony_ci 21218c2ecf20Sopenharmony_cistatic const char *const pcie_grps[] = { "pcie0_grp", "pcie1_grp", "pcie2_grp" 21228c2ecf20Sopenharmony_ci}; 21238c2ecf20Sopenharmony_cistatic struct spear_function pcie_function = { 21248c2ecf20Sopenharmony_ci .name = "pci_express", 21258c2ecf20Sopenharmony_ci .groups = pcie_grps, 21268c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(pcie_grps), 21278c2ecf20Sopenharmony_ci}; 21288c2ecf20Sopenharmony_ci 21298c2ecf20Sopenharmony_ci/* pad multiplexing for sata0 device */ 21308c2ecf20Sopenharmony_cistatic struct spear_muxreg sata0_muxreg[] = { 21318c2ecf20Sopenharmony_ci { 21328c2ecf20Sopenharmony_ci .reg = PCIE_SATA_CFG, 21338c2ecf20Sopenharmony_ci .mask = SATA_CFG_VAL(0), 21348c2ecf20Sopenharmony_ci .val = SATA_CFG_VAL(0), 21358c2ecf20Sopenharmony_ci }, 21368c2ecf20Sopenharmony_ci}; 21378c2ecf20Sopenharmony_ci 21388c2ecf20Sopenharmony_cistatic struct spear_modemux sata0_modemux[] = { 21398c2ecf20Sopenharmony_ci { 21408c2ecf20Sopenharmony_ci .muxregs = sata0_muxreg, 21418c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(sata0_muxreg), 21428c2ecf20Sopenharmony_ci }, 21438c2ecf20Sopenharmony_ci}; 21448c2ecf20Sopenharmony_ci 21458c2ecf20Sopenharmony_cistatic struct spear_pingroup sata0_pingroup = { 21468c2ecf20Sopenharmony_ci .name = "sata0_grp", 21478c2ecf20Sopenharmony_ci .modemuxs = sata0_modemux, 21488c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(sata0_modemux), 21498c2ecf20Sopenharmony_ci}; 21508c2ecf20Sopenharmony_ci 21518c2ecf20Sopenharmony_ci/* pad multiplexing for sata1 device */ 21528c2ecf20Sopenharmony_cistatic struct spear_muxreg sata1_muxreg[] = { 21538c2ecf20Sopenharmony_ci { 21548c2ecf20Sopenharmony_ci .reg = PCIE_SATA_CFG, 21558c2ecf20Sopenharmony_ci .mask = SATA_CFG_VAL(1), 21568c2ecf20Sopenharmony_ci .val = SATA_CFG_VAL(1), 21578c2ecf20Sopenharmony_ci }, 21588c2ecf20Sopenharmony_ci}; 21598c2ecf20Sopenharmony_ci 21608c2ecf20Sopenharmony_cistatic struct spear_modemux sata1_modemux[] = { 21618c2ecf20Sopenharmony_ci { 21628c2ecf20Sopenharmony_ci .muxregs = sata1_muxreg, 21638c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(sata1_muxreg), 21648c2ecf20Sopenharmony_ci }, 21658c2ecf20Sopenharmony_ci}; 21668c2ecf20Sopenharmony_ci 21678c2ecf20Sopenharmony_cistatic struct spear_pingroup sata1_pingroup = { 21688c2ecf20Sopenharmony_ci .name = "sata1_grp", 21698c2ecf20Sopenharmony_ci .modemuxs = sata1_modemux, 21708c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(sata1_modemux), 21718c2ecf20Sopenharmony_ci}; 21728c2ecf20Sopenharmony_ci 21738c2ecf20Sopenharmony_ci/* pad multiplexing for sata2 device */ 21748c2ecf20Sopenharmony_cistatic struct spear_muxreg sata2_muxreg[] = { 21758c2ecf20Sopenharmony_ci { 21768c2ecf20Sopenharmony_ci .reg = PCIE_SATA_CFG, 21778c2ecf20Sopenharmony_ci .mask = SATA_CFG_VAL(2), 21788c2ecf20Sopenharmony_ci .val = SATA_CFG_VAL(2), 21798c2ecf20Sopenharmony_ci }, 21808c2ecf20Sopenharmony_ci}; 21818c2ecf20Sopenharmony_ci 21828c2ecf20Sopenharmony_cistatic struct spear_modemux sata2_modemux[] = { 21838c2ecf20Sopenharmony_ci { 21848c2ecf20Sopenharmony_ci .muxregs = sata2_muxreg, 21858c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(sata2_muxreg), 21868c2ecf20Sopenharmony_ci }, 21878c2ecf20Sopenharmony_ci}; 21888c2ecf20Sopenharmony_ci 21898c2ecf20Sopenharmony_cistatic struct spear_pingroup sata2_pingroup = { 21908c2ecf20Sopenharmony_ci .name = "sata2_grp", 21918c2ecf20Sopenharmony_ci .modemuxs = sata2_modemux, 21928c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(sata2_modemux), 21938c2ecf20Sopenharmony_ci}; 21948c2ecf20Sopenharmony_ci 21958c2ecf20Sopenharmony_cistatic const char *const sata_grps[] = { "sata0_grp", "sata1_grp", "sata2_grp" 21968c2ecf20Sopenharmony_ci}; 21978c2ecf20Sopenharmony_cistatic struct spear_function sata_function = { 21988c2ecf20Sopenharmony_ci .name = "sata", 21998c2ecf20Sopenharmony_ci .groups = sata_grps, 22008c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(sata_grps), 22018c2ecf20Sopenharmony_ci}; 22028c2ecf20Sopenharmony_ci 22038c2ecf20Sopenharmony_ci/* Pad multiplexing for ssp1_dis_kbd device */ 22048c2ecf20Sopenharmony_cistatic const unsigned ssp1_dis_kbd_pins[] = { 203, 204, 205, 206 }; 22058c2ecf20Sopenharmony_cistatic struct spear_muxreg ssp1_dis_kbd_muxreg[] = { 22068c2ecf20Sopenharmony_ci { 22078c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 22088c2ecf20Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK | PMX_KBD_COL1_MASK | 22098c2ecf20Sopenharmony_ci PMX_KBD_COL0_MASK | PMX_NFIO8_15_MASK | PMX_NFCE1_MASK | 22108c2ecf20Sopenharmony_ci PMX_NFCE2_MASK, 22118c2ecf20Sopenharmony_ci .val = 0, 22128c2ecf20Sopenharmony_ci }, { 22138c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 22148c2ecf20Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK | PMX_KBD_COL1_MASK | 22158c2ecf20Sopenharmony_ci PMX_KBD_COL0_MASK | PMX_NFIO8_15_MASK | PMX_NFCE1_MASK | 22168c2ecf20Sopenharmony_ci PMX_NFCE2_MASK, 22178c2ecf20Sopenharmony_ci .val = PMX_KBD_ROWCOL25_MASK | PMX_KBD_COL1_MASK | 22188c2ecf20Sopenharmony_ci PMX_KBD_COL0_MASK | PMX_NFIO8_15_MASK | PMX_NFCE1_MASK | 22198c2ecf20Sopenharmony_ci PMX_NFCE2_MASK, 22208c2ecf20Sopenharmony_ci }, 22218c2ecf20Sopenharmony_ci}; 22228c2ecf20Sopenharmony_ci 22238c2ecf20Sopenharmony_cistatic struct spear_modemux ssp1_dis_kbd_modemux[] = { 22248c2ecf20Sopenharmony_ci { 22258c2ecf20Sopenharmony_ci .muxregs = ssp1_dis_kbd_muxreg, 22268c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp1_dis_kbd_muxreg), 22278c2ecf20Sopenharmony_ci }, 22288c2ecf20Sopenharmony_ci}; 22298c2ecf20Sopenharmony_ci 22308c2ecf20Sopenharmony_cistatic struct spear_pingroup ssp1_dis_kbd_pingroup = { 22318c2ecf20Sopenharmony_ci .name = "ssp1_dis_kbd_grp", 22328c2ecf20Sopenharmony_ci .pins = ssp1_dis_kbd_pins, 22338c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(ssp1_dis_kbd_pins), 22348c2ecf20Sopenharmony_ci .modemuxs = ssp1_dis_kbd_modemux, 22358c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp1_dis_kbd_modemux), 22368c2ecf20Sopenharmony_ci}; 22378c2ecf20Sopenharmony_ci 22388c2ecf20Sopenharmony_ci/* Pad multiplexing for ssp1_dis_sd device */ 22398c2ecf20Sopenharmony_cistatic const unsigned ssp1_dis_sd_pins[] = { 224, 226, 227, 228 }; 22408c2ecf20Sopenharmony_cistatic struct spear_muxreg ssp1_dis_sd_muxreg[] = { 22418c2ecf20Sopenharmony_ci { 22428c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 22438c2ecf20Sopenharmony_ci .mask = PMX_MCIADDR0ALE_MASK | PMX_MCIADDR2_MASK | 22448c2ecf20Sopenharmony_ci PMX_MCICECF_MASK | PMX_MCICEXD_MASK, 22458c2ecf20Sopenharmony_ci .val = 0, 22468c2ecf20Sopenharmony_ci }, { 22478c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 22488c2ecf20Sopenharmony_ci .mask = PMX_MCIADDR0ALE_MASK | PMX_MCIADDR2_MASK | 22498c2ecf20Sopenharmony_ci PMX_MCICECF_MASK | PMX_MCICEXD_MASK, 22508c2ecf20Sopenharmony_ci .val = PMX_MCIADDR0ALE_MASK | PMX_MCIADDR2_MASK | 22518c2ecf20Sopenharmony_ci PMX_MCICECF_MASK | PMX_MCICEXD_MASK, 22528c2ecf20Sopenharmony_ci }, 22538c2ecf20Sopenharmony_ci}; 22548c2ecf20Sopenharmony_ci 22558c2ecf20Sopenharmony_cistatic struct spear_modemux ssp1_dis_sd_modemux[] = { 22568c2ecf20Sopenharmony_ci { 22578c2ecf20Sopenharmony_ci .muxregs = ssp1_dis_sd_muxreg, 22588c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp1_dis_sd_muxreg), 22598c2ecf20Sopenharmony_ci }, 22608c2ecf20Sopenharmony_ci}; 22618c2ecf20Sopenharmony_ci 22628c2ecf20Sopenharmony_cistatic struct spear_pingroup ssp1_dis_sd_pingroup = { 22638c2ecf20Sopenharmony_ci .name = "ssp1_dis_sd_grp", 22648c2ecf20Sopenharmony_ci .pins = ssp1_dis_sd_pins, 22658c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(ssp1_dis_sd_pins), 22668c2ecf20Sopenharmony_ci .modemuxs = ssp1_dis_sd_modemux, 22678c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp1_dis_sd_modemux), 22688c2ecf20Sopenharmony_ci}; 22698c2ecf20Sopenharmony_ci 22708c2ecf20Sopenharmony_cistatic const char *const ssp1_grps[] = { "ssp1_dis_kbd_grp", 22718c2ecf20Sopenharmony_ci "ssp1_dis_sd_grp" }; 22728c2ecf20Sopenharmony_cistatic struct spear_function ssp1_function = { 22738c2ecf20Sopenharmony_ci .name = "ssp1", 22748c2ecf20Sopenharmony_ci .groups = ssp1_grps, 22758c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(ssp1_grps), 22768c2ecf20Sopenharmony_ci}; 22778c2ecf20Sopenharmony_ci 22788c2ecf20Sopenharmony_ci/* Pad multiplexing for gpt64 device */ 22798c2ecf20Sopenharmony_cistatic const unsigned gpt64_pins[] = { 230, 231, 232, 245 }; 22808c2ecf20Sopenharmony_cistatic struct spear_muxreg gpt64_muxreg[] = { 22818c2ecf20Sopenharmony_ci { 22828c2ecf20Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 22838c2ecf20Sopenharmony_ci .mask = PMX_MCICDCF1_MASK | PMX_MCICDCF2_MASK | PMX_MCICDXD_MASK 22848c2ecf20Sopenharmony_ci | PMX_MCILEDS_MASK, 22858c2ecf20Sopenharmony_ci .val = 0, 22868c2ecf20Sopenharmony_ci }, { 22878c2ecf20Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 22888c2ecf20Sopenharmony_ci .mask = PMX_MCICDCF1_MASK | PMX_MCICDCF2_MASK | PMX_MCICDXD_MASK 22898c2ecf20Sopenharmony_ci | PMX_MCILEDS_MASK, 22908c2ecf20Sopenharmony_ci .val = PMX_MCICDCF1_MASK | PMX_MCICDCF2_MASK | PMX_MCICDXD_MASK 22918c2ecf20Sopenharmony_ci | PMX_MCILEDS_MASK, 22928c2ecf20Sopenharmony_ci }, 22938c2ecf20Sopenharmony_ci}; 22948c2ecf20Sopenharmony_ci 22958c2ecf20Sopenharmony_cistatic struct spear_modemux gpt64_modemux[] = { 22968c2ecf20Sopenharmony_ci { 22978c2ecf20Sopenharmony_ci .muxregs = gpt64_muxreg, 22988c2ecf20Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt64_muxreg), 22998c2ecf20Sopenharmony_ci }, 23008c2ecf20Sopenharmony_ci}; 23018c2ecf20Sopenharmony_ci 23028c2ecf20Sopenharmony_cistatic struct spear_pingroup gpt64_pingroup = { 23038c2ecf20Sopenharmony_ci .name = "gpt64_grp", 23048c2ecf20Sopenharmony_ci .pins = gpt64_pins, 23058c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(gpt64_pins), 23068c2ecf20Sopenharmony_ci .modemuxs = gpt64_modemux, 23078c2ecf20Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt64_modemux), 23088c2ecf20Sopenharmony_ci}; 23098c2ecf20Sopenharmony_ci 23108c2ecf20Sopenharmony_cistatic const char *const gpt64_grps[] = { "gpt64_grp" }; 23118c2ecf20Sopenharmony_cistatic struct spear_function gpt64_function = { 23128c2ecf20Sopenharmony_ci .name = "gpt64", 23138c2ecf20Sopenharmony_ci .groups = gpt64_grps, 23148c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(gpt64_grps), 23158c2ecf20Sopenharmony_ci}; 23168c2ecf20Sopenharmony_ci 23178c2ecf20Sopenharmony_ci/* pingroups */ 23188c2ecf20Sopenharmony_cistatic struct spear_pingroup *spear1310_pingroups[] = { 23198c2ecf20Sopenharmony_ci &i2c0_pingroup, 23208c2ecf20Sopenharmony_ci &ssp0_pingroup, 23218c2ecf20Sopenharmony_ci &i2s0_pingroup, 23228c2ecf20Sopenharmony_ci &i2s1_pingroup, 23238c2ecf20Sopenharmony_ci &clcd_pingroup, 23248c2ecf20Sopenharmony_ci &clcd_high_res_pingroup, 23258c2ecf20Sopenharmony_ci &arm_gpio_pingroup, 23268c2ecf20Sopenharmony_ci &smi_2_chips_pingroup, 23278c2ecf20Sopenharmony_ci &smi_4_chips_pingroup, 23288c2ecf20Sopenharmony_ci &gmii_pingroup, 23298c2ecf20Sopenharmony_ci &rgmii_pingroup, 23308c2ecf20Sopenharmony_ci &smii_0_1_2_pingroup, 23318c2ecf20Sopenharmony_ci &ras_mii_txclk_pingroup, 23328c2ecf20Sopenharmony_ci &nand_8bit_pingroup, 23338c2ecf20Sopenharmony_ci &nand_16bit_pingroup, 23348c2ecf20Sopenharmony_ci &nand_4_chips_pingroup, 23358c2ecf20Sopenharmony_ci &keyboard_6x6_pingroup, 23368c2ecf20Sopenharmony_ci &keyboard_rowcol6_8_pingroup, 23378c2ecf20Sopenharmony_ci &uart0_pingroup, 23388c2ecf20Sopenharmony_ci &uart0_modem_pingroup, 23398c2ecf20Sopenharmony_ci &gpt0_tmr0_pingroup, 23408c2ecf20Sopenharmony_ci &gpt0_tmr1_pingroup, 23418c2ecf20Sopenharmony_ci &gpt1_tmr0_pingroup, 23428c2ecf20Sopenharmony_ci &gpt1_tmr1_pingroup, 23438c2ecf20Sopenharmony_ci &sdhci_pingroup, 23448c2ecf20Sopenharmony_ci &cf_pingroup, 23458c2ecf20Sopenharmony_ci &xd_pingroup, 23468c2ecf20Sopenharmony_ci &touch_xy_pingroup, 23478c2ecf20Sopenharmony_ci &ssp0_cs0_pingroup, 23488c2ecf20Sopenharmony_ci &ssp0_cs1_2_pingroup, 23498c2ecf20Sopenharmony_ci &uart_1_dis_i2c_pingroup, 23508c2ecf20Sopenharmony_ci &uart_1_dis_sd_pingroup, 23518c2ecf20Sopenharmony_ci &uart_2_3_pingroup, 23528c2ecf20Sopenharmony_ci &uart_4_pingroup, 23538c2ecf20Sopenharmony_ci &uart_5_pingroup, 23548c2ecf20Sopenharmony_ci &rs485_0_1_tdm_0_1_pingroup, 23558c2ecf20Sopenharmony_ci &i2c_1_2_pingroup, 23568c2ecf20Sopenharmony_ci &i2c3_dis_smi_clcd_pingroup, 23578c2ecf20Sopenharmony_ci &i2c3_dis_sd_i2s0_pingroup, 23588c2ecf20Sopenharmony_ci &i2c_4_5_dis_smi_pingroup, 23598c2ecf20Sopenharmony_ci &i2c4_dis_sd_pingroup, 23608c2ecf20Sopenharmony_ci &i2c5_dis_sd_pingroup, 23618c2ecf20Sopenharmony_ci &i2c_6_7_dis_kbd_pingroup, 23628c2ecf20Sopenharmony_ci &i2c6_dis_sd_pingroup, 23638c2ecf20Sopenharmony_ci &i2c7_dis_sd_pingroup, 23648c2ecf20Sopenharmony_ci &can0_dis_nor_pingroup, 23658c2ecf20Sopenharmony_ci &can0_dis_sd_pingroup, 23668c2ecf20Sopenharmony_ci &can1_dis_sd_pingroup, 23678c2ecf20Sopenharmony_ci &can1_dis_kbd_pingroup, 23688c2ecf20Sopenharmony_ci &pci_pingroup, 23698c2ecf20Sopenharmony_ci &pcie0_pingroup, 23708c2ecf20Sopenharmony_ci &pcie1_pingroup, 23718c2ecf20Sopenharmony_ci &pcie2_pingroup, 23728c2ecf20Sopenharmony_ci &sata0_pingroup, 23738c2ecf20Sopenharmony_ci &sata1_pingroup, 23748c2ecf20Sopenharmony_ci &sata2_pingroup, 23758c2ecf20Sopenharmony_ci &ssp1_dis_kbd_pingroup, 23768c2ecf20Sopenharmony_ci &ssp1_dis_sd_pingroup, 23778c2ecf20Sopenharmony_ci &gpt64_pingroup, 23788c2ecf20Sopenharmony_ci}; 23798c2ecf20Sopenharmony_ci 23808c2ecf20Sopenharmony_ci/* functions */ 23818c2ecf20Sopenharmony_cistatic struct spear_function *spear1310_functions[] = { 23828c2ecf20Sopenharmony_ci &i2c0_function, 23838c2ecf20Sopenharmony_ci &ssp0_function, 23848c2ecf20Sopenharmony_ci &i2s0_function, 23858c2ecf20Sopenharmony_ci &i2s1_function, 23868c2ecf20Sopenharmony_ci &clcd_function, 23878c2ecf20Sopenharmony_ci &arm_gpio_function, 23888c2ecf20Sopenharmony_ci &smi_function, 23898c2ecf20Sopenharmony_ci &gmii_function, 23908c2ecf20Sopenharmony_ci &rgmii_function, 23918c2ecf20Sopenharmony_ci &smii_0_1_2_function, 23928c2ecf20Sopenharmony_ci &ras_mii_txclk_function, 23938c2ecf20Sopenharmony_ci &nand_function, 23948c2ecf20Sopenharmony_ci &keyboard_function, 23958c2ecf20Sopenharmony_ci &uart0_function, 23968c2ecf20Sopenharmony_ci &gpt0_function, 23978c2ecf20Sopenharmony_ci &gpt1_function, 23988c2ecf20Sopenharmony_ci &sdhci_function, 23998c2ecf20Sopenharmony_ci &cf_function, 24008c2ecf20Sopenharmony_ci &xd_function, 24018c2ecf20Sopenharmony_ci &touch_xy_function, 24028c2ecf20Sopenharmony_ci &uart1_function, 24038c2ecf20Sopenharmony_ci &uart2_3_function, 24048c2ecf20Sopenharmony_ci &uart4_function, 24058c2ecf20Sopenharmony_ci &uart5_function, 24068c2ecf20Sopenharmony_ci &rs485_0_1_tdm_0_1_function, 24078c2ecf20Sopenharmony_ci &i2c_1_2_function, 24088c2ecf20Sopenharmony_ci &i2c3_unction, 24098c2ecf20Sopenharmony_ci &i2c_4_5_function, 24108c2ecf20Sopenharmony_ci &i2c_6_7_function, 24118c2ecf20Sopenharmony_ci &can0_function, 24128c2ecf20Sopenharmony_ci &can1_function, 24138c2ecf20Sopenharmony_ci &pci_function, 24148c2ecf20Sopenharmony_ci &pcie_function, 24158c2ecf20Sopenharmony_ci &sata_function, 24168c2ecf20Sopenharmony_ci &ssp1_function, 24178c2ecf20Sopenharmony_ci &gpt64_function, 24188c2ecf20Sopenharmony_ci}; 24198c2ecf20Sopenharmony_ci 24208c2ecf20Sopenharmony_cistatic const unsigned pin18[] = { 18, }; 24218c2ecf20Sopenharmony_cistatic const unsigned pin19[] = { 19, }; 24228c2ecf20Sopenharmony_cistatic const unsigned pin20[] = { 20, }; 24238c2ecf20Sopenharmony_cistatic const unsigned pin21[] = { 21, }; 24248c2ecf20Sopenharmony_cistatic const unsigned pin22[] = { 22, }; 24258c2ecf20Sopenharmony_cistatic const unsigned pin23[] = { 23, }; 24268c2ecf20Sopenharmony_cistatic const unsigned pin54[] = { 54, }; 24278c2ecf20Sopenharmony_cistatic const unsigned pin55[] = { 55, }; 24288c2ecf20Sopenharmony_cistatic const unsigned pin56[] = { 56, }; 24298c2ecf20Sopenharmony_cistatic const unsigned pin57[] = { 57, }; 24308c2ecf20Sopenharmony_cistatic const unsigned pin58[] = { 58, }; 24318c2ecf20Sopenharmony_cistatic const unsigned pin59[] = { 59, }; 24328c2ecf20Sopenharmony_cistatic const unsigned pin60[] = { 60, }; 24338c2ecf20Sopenharmony_cistatic const unsigned pin61[] = { 61, }; 24348c2ecf20Sopenharmony_cistatic const unsigned pin62[] = { 62, }; 24358c2ecf20Sopenharmony_cistatic const unsigned pin63[] = { 63, }; 24368c2ecf20Sopenharmony_cistatic const unsigned pin143[] = { 143, }; 24378c2ecf20Sopenharmony_cistatic const unsigned pin144[] = { 144, }; 24388c2ecf20Sopenharmony_cistatic const unsigned pin145[] = { 145, }; 24398c2ecf20Sopenharmony_cistatic const unsigned pin146[] = { 146, }; 24408c2ecf20Sopenharmony_cistatic const unsigned pin147[] = { 147, }; 24418c2ecf20Sopenharmony_cistatic const unsigned pin148[] = { 148, }; 24428c2ecf20Sopenharmony_cistatic const unsigned pin149[] = { 149, }; 24438c2ecf20Sopenharmony_cistatic const unsigned pin150[] = { 150, }; 24448c2ecf20Sopenharmony_cistatic const unsigned pin151[] = { 151, }; 24458c2ecf20Sopenharmony_cistatic const unsigned pin152[] = { 152, }; 24468c2ecf20Sopenharmony_cistatic const unsigned pin205[] = { 205, }; 24478c2ecf20Sopenharmony_cistatic const unsigned pin206[] = { 206, }; 24488c2ecf20Sopenharmony_cistatic const unsigned pin211[] = { 211, }; 24498c2ecf20Sopenharmony_cistatic const unsigned pin212[] = { 212, }; 24508c2ecf20Sopenharmony_cistatic const unsigned pin213[] = { 213, }; 24518c2ecf20Sopenharmony_cistatic const unsigned pin214[] = { 214, }; 24528c2ecf20Sopenharmony_cistatic const unsigned pin215[] = { 215, }; 24538c2ecf20Sopenharmony_cistatic const unsigned pin216[] = { 216, }; 24548c2ecf20Sopenharmony_cistatic const unsigned pin217[] = { 217, }; 24558c2ecf20Sopenharmony_cistatic const unsigned pin218[] = { 218, }; 24568c2ecf20Sopenharmony_cistatic const unsigned pin219[] = { 219, }; 24578c2ecf20Sopenharmony_cistatic const unsigned pin220[] = { 220, }; 24588c2ecf20Sopenharmony_cistatic const unsigned pin221[] = { 221, }; 24598c2ecf20Sopenharmony_cistatic const unsigned pin222[] = { 222, }; 24608c2ecf20Sopenharmony_cistatic const unsigned pin223[] = { 223, }; 24618c2ecf20Sopenharmony_cistatic const unsigned pin224[] = { 224, }; 24628c2ecf20Sopenharmony_cistatic const unsigned pin225[] = { 225, }; 24638c2ecf20Sopenharmony_cistatic const unsigned pin226[] = { 226, }; 24648c2ecf20Sopenharmony_cistatic const unsigned pin227[] = { 227, }; 24658c2ecf20Sopenharmony_cistatic const unsigned pin228[] = { 228, }; 24668c2ecf20Sopenharmony_cistatic const unsigned pin229[] = { 229, }; 24678c2ecf20Sopenharmony_cistatic const unsigned pin230[] = { 230, }; 24688c2ecf20Sopenharmony_cistatic const unsigned pin231[] = { 231, }; 24698c2ecf20Sopenharmony_cistatic const unsigned pin232[] = { 232, }; 24708c2ecf20Sopenharmony_cistatic const unsigned pin233[] = { 233, }; 24718c2ecf20Sopenharmony_cistatic const unsigned pin234[] = { 234, }; 24728c2ecf20Sopenharmony_cistatic const unsigned pin235[] = { 235, }; 24738c2ecf20Sopenharmony_cistatic const unsigned pin236[] = { 236, }; 24748c2ecf20Sopenharmony_cistatic const unsigned pin237[] = { 237, }; 24758c2ecf20Sopenharmony_cistatic const unsigned pin238[] = { 238, }; 24768c2ecf20Sopenharmony_cistatic const unsigned pin239[] = { 239, }; 24778c2ecf20Sopenharmony_cistatic const unsigned pin240[] = { 240, }; 24788c2ecf20Sopenharmony_cistatic const unsigned pin241[] = { 241, }; 24798c2ecf20Sopenharmony_cistatic const unsigned pin242[] = { 242, }; 24808c2ecf20Sopenharmony_cistatic const unsigned pin243[] = { 243, }; 24818c2ecf20Sopenharmony_cistatic const unsigned pin244[] = { 244, }; 24828c2ecf20Sopenharmony_cistatic const unsigned pin245[] = { 245, }; 24838c2ecf20Sopenharmony_ci 24848c2ecf20Sopenharmony_cistatic const unsigned pin_grp0[] = { 173, 174, }; 24858c2ecf20Sopenharmony_cistatic const unsigned pin_grp1[] = { 175, 185, 188, 197, 198, }; 24868c2ecf20Sopenharmony_cistatic const unsigned pin_grp2[] = { 176, 177, 178, 179, 184, 186, 187, 189, 24878c2ecf20Sopenharmony_ci 190, 191, 192, }; 24888c2ecf20Sopenharmony_cistatic const unsigned pin_grp3[] = { 180, 181, 182, 183, 193, 194, 195, 196, }; 24898c2ecf20Sopenharmony_cistatic const unsigned pin_grp4[] = { 199, 200, }; 24908c2ecf20Sopenharmony_cistatic const unsigned pin_grp5[] = { 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 24918c2ecf20Sopenharmony_ci 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, }; 24928c2ecf20Sopenharmony_cistatic const unsigned pin_grp6[] = { 86, 87, 88, 89, 90, 91, 92, 93, }; 24938c2ecf20Sopenharmony_cistatic const unsigned pin_grp7[] = { 98, 99, }; 24948c2ecf20Sopenharmony_cistatic const unsigned pin_grp8[] = { 158, 159, 160, 161, 162, 163, 164, 165, 24958c2ecf20Sopenharmony_ci 166, 167, 168, 169, 170, 171, 172, }; 24968c2ecf20Sopenharmony_ci 24978c2ecf20Sopenharmony_ci/* Define muxreg arrays */ 24988c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(i2c0_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_I2C0_MASK, 0, 1); 24998c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(ssp0_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_SSP0_MASK, 0, 1); 25008c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(ssp0_cs0_pins, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_SSP0_CS0_MASK, 0, 1); 25018c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(ssp0_cs1_2_pins, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_SSP0_CS1_2_MASK, 0, 1); 25028c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(i2s0_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_I2S0_MASK, 0, 1); 25038c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(i2s1_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_I2S1_MASK, 0, 1); 25048c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(clcd_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_CLCD1_MASK, 0, 1); 25058c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(clcd_high_res_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_CLCD2_MASK, 0, 1); 25068c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin18, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO15_MASK, 0, 1); 25078c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin19, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO14_MASK, 0, 1); 25088c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin20, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO13_MASK, 0, 1); 25098c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin21, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO12_MASK, 0, 1); 25108c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin22, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO11_MASK, 0, 1); 25118c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin23, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO10_MASK, 0, 1); 25128c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin143, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO00_MASK, 0, 1); 25138c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin144, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO01_MASK, 0, 1); 25148c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin145, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO02_MASK, 0, 1); 25158c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin146, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO03_MASK, 0, 1); 25168c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin147, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO04_MASK, 0, 1); 25178c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin148, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO05_MASK, 0, 1); 25188c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin149, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO06_MASK, 0, 1); 25198c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin150, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO07_MASK, 0, 1); 25208c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin151, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO08_MASK, 0, 1); 25218c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin152, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO09_MASK, 0, 1); 25228c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(smi_2_chips_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_SMI_MASK, 0, 1); 25238c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin54, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_SMINCS3_MASK, 0, 1); 25248c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin55, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_SMINCS2_MASK, 0, 1); 25258c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin56, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_NFRSTPWDWN3_MASK, 0, 1); 25268c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin57, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFRSTPWDWN2_MASK, 0, 1); 25278c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin58, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFRSTPWDWN1_MASK, 0, 1); 25288c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin59, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFRSTPWDWN0_MASK, 0, 1); 25298c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin60, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFWPRT3_MASK, 0, 1); 25308c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin61, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFCE3_MASK, 0, 1); 25318c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin62, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFAD25_MASK, 0, 1); 25328c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin63, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFAD24_MASK, 0, 1); 25338c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin_grp0, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_GMIICLK_MASK, 0, 1); 25348c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin_grp1, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK, 0, 1); 25358c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin_grp2, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_RXCLK_RDV_TXEN_D03_MASK, 0, 1); 25368c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin_grp3, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_GMIID47_MASK, 0, 1); 25378c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin_grp4, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_MDC_MDIO_MASK, 0, 1); 25388c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin_grp5, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFAD23_MASK, 0, 1); 25398c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin_grp6, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_MCI_DATA8_15_MASK, 0, 1); 25408c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin_grp7, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_NFCE2_MASK, 0, 1); 25418c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin_grp8, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_NAND8_MASK, 0, 1); 25428c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(nand_16bit_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_NAND16BIT_1_MASK, 0, 1); 25438c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin205, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_COL1_MASK | PMX_NFCE1_MASK, 0, 1); 25448c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin206, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_COL0_MASK | PMX_NFCE2_MASK, 0, 1); 25458c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin211, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_ROW1_MASK | PMX_NFWPRT1_MASK, 0, 1); 25468c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin212, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_ROW0_MASK | PMX_NFWPRT2_MASK, 0, 1); 25478c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin213, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA0_MASK, 0, 1); 25488c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin214, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA1_MASK, 0, 1); 25498c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin215, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA2_MASK, 0, 1); 25508c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin216, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA3_MASK, 0, 1); 25518c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin217, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA4_MASK, 0, 1); 25528c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin218, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA5_MASK, 0, 1); 25538c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin219, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA6_MASK, 0, 1); 25548c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin220, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA7_MASK, 0, 1); 25558c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin221, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA1SD_MASK, 0, 1); 25568c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin222, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA2SD_MASK, 0, 1); 25578c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin223, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA3SD_MASK, 0, 1); 25588c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin224, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIADDR0ALE_MASK, 0, 1); 25598c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin225, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIADDR1CLECLK_MASK, 0, 1); 25608c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin226, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIADDR2_MASK, 0, 1); 25618c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin227, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICECF_MASK, 0, 1); 25628c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin228, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICEXD_MASK, 0, 1); 25638c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin229, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICESDMMC_MASK, 0, 1); 25648c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin230, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICDCF1_MASK, 0, 1); 25658c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin231, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICDCF2_MASK, 0, 1); 25668c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin232, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICDXD_MASK, 0, 1); 25678c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin233, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICDSDMMC_MASK, 0, 1); 25688c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin234, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATADIR_MASK, 0, 1); 25698c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin235, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDMARQWP_MASK, 0, 1); 25708c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin236, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIIORDRE_MASK, 0, 1); 25718c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin237, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIIOWRWE_MASK, 0, 1); 25728c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin238, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIRESETCF_MASK, 0, 1); 25738c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin239, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICS0CE_MASK, 0, 1); 25748c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin240, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICFINTR_MASK, 0, 1); 25758c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin241, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIIORDY_MASK, 0, 1); 25768c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin242, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICS1_MASK, 0, 1); 25778c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin243, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDMAACK_MASK, 0, 1); 25788c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin244, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCISDCMD_MASK, 0, 1); 25798c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(pin245, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCILEDS_MASK, 0, 1); 25808c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(keyboard_rowcol6_8_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_ROWCOL68_MASK, 0, 1); 25818c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(uart0_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_UART0_MASK, 0, 1); 25828c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(uart0_modem_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_UART0_MODEM_MASK, 0, 1); 25838c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(gpt0_tmr0_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_GPT0_TMR0_MASK, 0, 1); 25848c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(gpt0_tmr1_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_GPT0_TMR1_MASK, 0, 1); 25858c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(gpt1_tmr0_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_GPT1_TMR0_MASK, 0, 1); 25868c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(gpt1_tmr1_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_GPT1_TMR1_MASK, 0, 1); 25878c2ecf20Sopenharmony_ciDEFINE_2_MUXREG(touch_xy_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_TOUCH_XY_MASK, 0, 1); 25888c2ecf20Sopenharmony_ci 25898c2ecf20Sopenharmony_cistatic struct spear_gpio_pingroup spear1310_gpio_pingroup[] = { 25908c2ecf20Sopenharmony_ci GPIO_PINGROUP(i2c0_pins), 25918c2ecf20Sopenharmony_ci GPIO_PINGROUP(ssp0_pins), 25928c2ecf20Sopenharmony_ci GPIO_PINGROUP(ssp0_cs0_pins), 25938c2ecf20Sopenharmony_ci GPIO_PINGROUP(ssp0_cs1_2_pins), 25948c2ecf20Sopenharmony_ci GPIO_PINGROUP(i2s0_pins), 25958c2ecf20Sopenharmony_ci GPIO_PINGROUP(i2s1_pins), 25968c2ecf20Sopenharmony_ci GPIO_PINGROUP(clcd_pins), 25978c2ecf20Sopenharmony_ci GPIO_PINGROUP(clcd_high_res_pins), 25988c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin18), 25998c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin19), 26008c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin20), 26018c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin21), 26028c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin22), 26038c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin23), 26048c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin143), 26058c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin144), 26068c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin145), 26078c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin146), 26088c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin147), 26098c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin148), 26108c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin149), 26118c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin150), 26128c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin151), 26138c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin152), 26148c2ecf20Sopenharmony_ci GPIO_PINGROUP(smi_2_chips_pins), 26158c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin54), 26168c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin55), 26178c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin56), 26188c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin57), 26198c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin58), 26208c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin59), 26218c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin60), 26228c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin61), 26238c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin62), 26248c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin63), 26258c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin_grp0), 26268c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin_grp1), 26278c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin_grp2), 26288c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin_grp3), 26298c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin_grp4), 26308c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin_grp5), 26318c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin_grp6), 26328c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin_grp7), 26338c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin_grp8), 26348c2ecf20Sopenharmony_ci GPIO_PINGROUP(nand_16bit_pins), 26358c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin205), 26368c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin206), 26378c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin211), 26388c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin212), 26398c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin213), 26408c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin214), 26418c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin215), 26428c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin216), 26438c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin217), 26448c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin218), 26458c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin219), 26468c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin220), 26478c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin221), 26488c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin222), 26498c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin223), 26508c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin224), 26518c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin225), 26528c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin226), 26538c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin227), 26548c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin228), 26558c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin229), 26568c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin230), 26578c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin231), 26588c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin232), 26598c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin233), 26608c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin234), 26618c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin235), 26628c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin236), 26638c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin237), 26648c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin238), 26658c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin239), 26668c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin240), 26678c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin241), 26688c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin242), 26698c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin243), 26708c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin244), 26718c2ecf20Sopenharmony_ci GPIO_PINGROUP(pin245), 26728c2ecf20Sopenharmony_ci GPIO_PINGROUP(keyboard_rowcol6_8_pins), 26738c2ecf20Sopenharmony_ci GPIO_PINGROUP(uart0_pins), 26748c2ecf20Sopenharmony_ci GPIO_PINGROUP(uart0_modem_pins), 26758c2ecf20Sopenharmony_ci GPIO_PINGROUP(gpt0_tmr0_pins), 26768c2ecf20Sopenharmony_ci GPIO_PINGROUP(gpt0_tmr1_pins), 26778c2ecf20Sopenharmony_ci GPIO_PINGROUP(gpt1_tmr0_pins), 26788c2ecf20Sopenharmony_ci GPIO_PINGROUP(gpt1_tmr1_pins), 26798c2ecf20Sopenharmony_ci GPIO_PINGROUP(touch_xy_pins), 26808c2ecf20Sopenharmony_ci}; 26818c2ecf20Sopenharmony_ci 26828c2ecf20Sopenharmony_cistatic struct spear_pinctrl_machdata spear1310_machdata = { 26838c2ecf20Sopenharmony_ci .pins = spear1310_pins, 26848c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(spear1310_pins), 26858c2ecf20Sopenharmony_ci .groups = spear1310_pingroups, 26868c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(spear1310_pingroups), 26878c2ecf20Sopenharmony_ci .functions = spear1310_functions, 26888c2ecf20Sopenharmony_ci .nfunctions = ARRAY_SIZE(spear1310_functions), 26898c2ecf20Sopenharmony_ci .gpio_pingroups = spear1310_gpio_pingroup, 26908c2ecf20Sopenharmony_ci .ngpio_pingroups = ARRAY_SIZE(spear1310_gpio_pingroup), 26918c2ecf20Sopenharmony_ci .modes_supported = false, 26928c2ecf20Sopenharmony_ci}; 26938c2ecf20Sopenharmony_ci 26948c2ecf20Sopenharmony_cistatic const struct of_device_id spear1310_pinctrl_of_match[] = { 26958c2ecf20Sopenharmony_ci { 26968c2ecf20Sopenharmony_ci .compatible = "st,spear1310-pinmux", 26978c2ecf20Sopenharmony_ci }, 26988c2ecf20Sopenharmony_ci {}, 26998c2ecf20Sopenharmony_ci}; 27008c2ecf20Sopenharmony_ci 27018c2ecf20Sopenharmony_cistatic int spear1310_pinctrl_probe(struct platform_device *pdev) 27028c2ecf20Sopenharmony_ci{ 27038c2ecf20Sopenharmony_ci return spear_pinctrl_probe(pdev, &spear1310_machdata); 27048c2ecf20Sopenharmony_ci} 27058c2ecf20Sopenharmony_ci 27068c2ecf20Sopenharmony_cistatic struct platform_driver spear1310_pinctrl_driver = { 27078c2ecf20Sopenharmony_ci .driver = { 27088c2ecf20Sopenharmony_ci .name = DRIVER_NAME, 27098c2ecf20Sopenharmony_ci .of_match_table = spear1310_pinctrl_of_match, 27108c2ecf20Sopenharmony_ci }, 27118c2ecf20Sopenharmony_ci .probe = spear1310_pinctrl_probe, 27128c2ecf20Sopenharmony_ci}; 27138c2ecf20Sopenharmony_ci 27148c2ecf20Sopenharmony_cistatic int __init spear1310_pinctrl_init(void) 27158c2ecf20Sopenharmony_ci{ 27168c2ecf20Sopenharmony_ci return platform_driver_register(&spear1310_pinctrl_driver); 27178c2ecf20Sopenharmony_ci} 27188c2ecf20Sopenharmony_ciarch_initcall(spear1310_pinctrl_init); 2719