162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Driver for the ST Microelectronics SPEAr1310 pinmux 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (C) 2012 ST Microelectronics 562306a36Sopenharmony_ci * Viresh Kumar <vireshk@kernel.org> 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * This file is licensed under the terms of the GNU General Public 862306a36Sopenharmony_ci * License version 2. This program is licensed "as is" without any 962306a36Sopenharmony_ci * warranty of any kind, whether express or implied. 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#include <linux/err.h> 1362306a36Sopenharmony_ci#include <linux/init.h> 1462306a36Sopenharmony_ci#include <linux/mod_devicetable.h> 1562306a36Sopenharmony_ci#include <linux/platform_device.h> 1662306a36Sopenharmony_ci#include "pinctrl-spear.h" 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci#define DRIVER_NAME "spear1310-pinmux" 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci/* pins */ 2162306a36Sopenharmony_cistatic const struct pinctrl_pin_desc spear1310_pins[] = { 2262306a36Sopenharmony_ci SPEAR_PIN_0_TO_101, 2362306a36Sopenharmony_ci SPEAR_PIN_102_TO_245, 2462306a36Sopenharmony_ci}; 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci/* registers */ 2762306a36Sopenharmony_ci#define PERIP_CFG 0x3B0 2862306a36Sopenharmony_ci #define MCIF_SEL_SHIFT 5 2962306a36Sopenharmony_ci #define MCIF_SEL_SD (0x1 << MCIF_SEL_SHIFT) 3062306a36Sopenharmony_ci #define MCIF_SEL_CF (0x2 << MCIF_SEL_SHIFT) 3162306a36Sopenharmony_ci #define MCIF_SEL_XD (0x3 << MCIF_SEL_SHIFT) 3262306a36Sopenharmony_ci #define MCIF_SEL_MASK (0x3 << MCIF_SEL_SHIFT) 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci#define PCIE_SATA_CFG 0x3A4 3562306a36Sopenharmony_ci #define PCIE_SATA2_SEL_PCIE (0 << 31) 3662306a36Sopenharmony_ci #define PCIE_SATA1_SEL_PCIE (0 << 30) 3762306a36Sopenharmony_ci #define PCIE_SATA0_SEL_PCIE (0 << 29) 3862306a36Sopenharmony_ci #define PCIE_SATA2_SEL_SATA (1 << 31) 3962306a36Sopenharmony_ci #define PCIE_SATA1_SEL_SATA (1 << 30) 4062306a36Sopenharmony_ci #define PCIE_SATA0_SEL_SATA (1 << 29) 4162306a36Sopenharmony_ci #define SATA2_CFG_TX_CLK_EN (1 << 27) 4262306a36Sopenharmony_ci #define SATA2_CFG_RX_CLK_EN (1 << 26) 4362306a36Sopenharmony_ci #define SATA2_CFG_POWERUP_RESET (1 << 25) 4462306a36Sopenharmony_ci #define SATA2_CFG_PM_CLK_EN (1 << 24) 4562306a36Sopenharmony_ci #define SATA1_CFG_TX_CLK_EN (1 << 23) 4662306a36Sopenharmony_ci #define SATA1_CFG_RX_CLK_EN (1 << 22) 4762306a36Sopenharmony_ci #define SATA1_CFG_POWERUP_RESET (1 << 21) 4862306a36Sopenharmony_ci #define SATA1_CFG_PM_CLK_EN (1 << 20) 4962306a36Sopenharmony_ci #define SATA0_CFG_TX_CLK_EN (1 << 19) 5062306a36Sopenharmony_ci #define SATA0_CFG_RX_CLK_EN (1 << 18) 5162306a36Sopenharmony_ci #define SATA0_CFG_POWERUP_RESET (1 << 17) 5262306a36Sopenharmony_ci #define SATA0_CFG_PM_CLK_EN (1 << 16) 5362306a36Sopenharmony_ci #define PCIE2_CFG_DEVICE_PRESENT (1 << 11) 5462306a36Sopenharmony_ci #define PCIE2_CFG_POWERUP_RESET (1 << 10) 5562306a36Sopenharmony_ci #define PCIE2_CFG_CORE_CLK_EN (1 << 9) 5662306a36Sopenharmony_ci #define PCIE2_CFG_AUX_CLK_EN (1 << 8) 5762306a36Sopenharmony_ci #define PCIE1_CFG_DEVICE_PRESENT (1 << 7) 5862306a36Sopenharmony_ci #define PCIE1_CFG_POWERUP_RESET (1 << 6) 5962306a36Sopenharmony_ci #define PCIE1_CFG_CORE_CLK_EN (1 << 5) 6062306a36Sopenharmony_ci #define PCIE1_CFG_AUX_CLK_EN (1 << 4) 6162306a36Sopenharmony_ci #define PCIE0_CFG_DEVICE_PRESENT (1 << 3) 6262306a36Sopenharmony_ci #define PCIE0_CFG_POWERUP_RESET (1 << 2) 6362306a36Sopenharmony_ci #define PCIE0_CFG_CORE_CLK_EN (1 << 1) 6462306a36Sopenharmony_ci #define PCIE0_CFG_AUX_CLK_EN (1 << 0) 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci#define PAD_FUNCTION_EN_0 0x650 6762306a36Sopenharmony_ci #define PMX_UART0_MASK (1 << 1) 6862306a36Sopenharmony_ci #define PMX_I2C0_MASK (1 << 2) 6962306a36Sopenharmony_ci #define PMX_I2S0_MASK (1 << 3) 7062306a36Sopenharmony_ci #define PMX_SSP0_MASK (1 << 4) 7162306a36Sopenharmony_ci #define PMX_CLCD1_MASK (1 << 5) 7262306a36Sopenharmony_ci #define PMX_EGPIO00_MASK (1 << 6) 7362306a36Sopenharmony_ci #define PMX_EGPIO01_MASK (1 << 7) 7462306a36Sopenharmony_ci #define PMX_EGPIO02_MASK (1 << 8) 7562306a36Sopenharmony_ci #define PMX_EGPIO03_MASK (1 << 9) 7662306a36Sopenharmony_ci #define PMX_EGPIO04_MASK (1 << 10) 7762306a36Sopenharmony_ci #define PMX_EGPIO05_MASK (1 << 11) 7862306a36Sopenharmony_ci #define PMX_EGPIO06_MASK (1 << 12) 7962306a36Sopenharmony_ci #define PMX_EGPIO07_MASK (1 << 13) 8062306a36Sopenharmony_ci #define PMX_EGPIO08_MASK (1 << 14) 8162306a36Sopenharmony_ci #define PMX_EGPIO09_MASK (1 << 15) 8262306a36Sopenharmony_ci #define PMX_SMI_MASK (1 << 16) 8362306a36Sopenharmony_ci #define PMX_NAND8_MASK (1 << 17) 8462306a36Sopenharmony_ci #define PMX_GMIICLK_MASK (1 << 18) 8562306a36Sopenharmony_ci #define PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK (1 << 19) 8662306a36Sopenharmony_ci #define PMX_RXCLK_RDV_TXEN_D03_MASK (1 << 20) 8762306a36Sopenharmony_ci #define PMX_GMIID47_MASK (1 << 21) 8862306a36Sopenharmony_ci #define PMX_MDC_MDIO_MASK (1 << 22) 8962306a36Sopenharmony_ci #define PMX_MCI_DATA8_15_MASK (1 << 23) 9062306a36Sopenharmony_ci #define PMX_NFAD23_MASK (1 << 24) 9162306a36Sopenharmony_ci #define PMX_NFAD24_MASK (1 << 25) 9262306a36Sopenharmony_ci #define PMX_NFAD25_MASK (1 << 26) 9362306a36Sopenharmony_ci #define PMX_NFCE3_MASK (1 << 27) 9462306a36Sopenharmony_ci #define PMX_NFWPRT3_MASK (1 << 28) 9562306a36Sopenharmony_ci #define PMX_NFRSTPWDWN0_MASK (1 << 29) 9662306a36Sopenharmony_ci #define PMX_NFRSTPWDWN1_MASK (1 << 30) 9762306a36Sopenharmony_ci #define PMX_NFRSTPWDWN2_MASK (1 << 31) 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci#define PAD_FUNCTION_EN_1 0x654 10062306a36Sopenharmony_ci #define PMX_NFRSTPWDWN3_MASK (1 << 0) 10162306a36Sopenharmony_ci #define PMX_SMINCS2_MASK (1 << 1) 10262306a36Sopenharmony_ci #define PMX_SMINCS3_MASK (1 << 2) 10362306a36Sopenharmony_ci #define PMX_CLCD2_MASK (1 << 3) 10462306a36Sopenharmony_ci #define PMX_KBD_ROWCOL68_MASK (1 << 4) 10562306a36Sopenharmony_ci #define PMX_EGPIO10_MASK (1 << 5) 10662306a36Sopenharmony_ci #define PMX_EGPIO11_MASK (1 << 6) 10762306a36Sopenharmony_ci #define PMX_EGPIO12_MASK (1 << 7) 10862306a36Sopenharmony_ci #define PMX_EGPIO13_MASK (1 << 8) 10962306a36Sopenharmony_ci #define PMX_EGPIO14_MASK (1 << 9) 11062306a36Sopenharmony_ci #define PMX_EGPIO15_MASK (1 << 10) 11162306a36Sopenharmony_ci #define PMX_UART0_MODEM_MASK (1 << 11) 11262306a36Sopenharmony_ci #define PMX_GPT0_TMR0_MASK (1 << 12) 11362306a36Sopenharmony_ci #define PMX_GPT0_TMR1_MASK (1 << 13) 11462306a36Sopenharmony_ci #define PMX_GPT1_TMR0_MASK (1 << 14) 11562306a36Sopenharmony_ci #define PMX_GPT1_TMR1_MASK (1 << 15) 11662306a36Sopenharmony_ci #define PMX_I2S1_MASK (1 << 16) 11762306a36Sopenharmony_ci #define PMX_KBD_ROWCOL25_MASK (1 << 17) 11862306a36Sopenharmony_ci #define PMX_NFIO8_15_MASK (1 << 18) 11962306a36Sopenharmony_ci #define PMX_KBD_COL1_MASK (1 << 19) 12062306a36Sopenharmony_ci #define PMX_NFCE1_MASK (1 << 20) 12162306a36Sopenharmony_ci #define PMX_KBD_COL0_MASK (1 << 21) 12262306a36Sopenharmony_ci #define PMX_NFCE2_MASK (1 << 22) 12362306a36Sopenharmony_ci #define PMX_KBD_ROW1_MASK (1 << 23) 12462306a36Sopenharmony_ci #define PMX_NFWPRT1_MASK (1 << 24) 12562306a36Sopenharmony_ci #define PMX_KBD_ROW0_MASK (1 << 25) 12662306a36Sopenharmony_ci #define PMX_NFWPRT2_MASK (1 << 26) 12762306a36Sopenharmony_ci #define PMX_MCIDATA0_MASK (1 << 27) 12862306a36Sopenharmony_ci #define PMX_MCIDATA1_MASK (1 << 28) 12962306a36Sopenharmony_ci #define PMX_MCIDATA2_MASK (1 << 29) 13062306a36Sopenharmony_ci #define PMX_MCIDATA3_MASK (1 << 30) 13162306a36Sopenharmony_ci #define PMX_MCIDATA4_MASK (1 << 31) 13262306a36Sopenharmony_ci 13362306a36Sopenharmony_ci#define PAD_FUNCTION_EN_2 0x658 13462306a36Sopenharmony_ci #define PMX_MCIDATA5_MASK (1 << 0) 13562306a36Sopenharmony_ci #define PMX_MCIDATA6_MASK (1 << 1) 13662306a36Sopenharmony_ci #define PMX_MCIDATA7_MASK (1 << 2) 13762306a36Sopenharmony_ci #define PMX_MCIDATA1SD_MASK (1 << 3) 13862306a36Sopenharmony_ci #define PMX_MCIDATA2SD_MASK (1 << 4) 13962306a36Sopenharmony_ci #define PMX_MCIDATA3SD_MASK (1 << 5) 14062306a36Sopenharmony_ci #define PMX_MCIADDR0ALE_MASK (1 << 6) 14162306a36Sopenharmony_ci #define PMX_MCIADDR1CLECLK_MASK (1 << 7) 14262306a36Sopenharmony_ci #define PMX_MCIADDR2_MASK (1 << 8) 14362306a36Sopenharmony_ci #define PMX_MCICECF_MASK (1 << 9) 14462306a36Sopenharmony_ci #define PMX_MCICEXD_MASK (1 << 10) 14562306a36Sopenharmony_ci #define PMX_MCICESDMMC_MASK (1 << 11) 14662306a36Sopenharmony_ci #define PMX_MCICDCF1_MASK (1 << 12) 14762306a36Sopenharmony_ci #define PMX_MCICDCF2_MASK (1 << 13) 14862306a36Sopenharmony_ci #define PMX_MCICDXD_MASK (1 << 14) 14962306a36Sopenharmony_ci #define PMX_MCICDSDMMC_MASK (1 << 15) 15062306a36Sopenharmony_ci #define PMX_MCIDATADIR_MASK (1 << 16) 15162306a36Sopenharmony_ci #define PMX_MCIDMARQWP_MASK (1 << 17) 15262306a36Sopenharmony_ci #define PMX_MCIIORDRE_MASK (1 << 18) 15362306a36Sopenharmony_ci #define PMX_MCIIOWRWE_MASK (1 << 19) 15462306a36Sopenharmony_ci #define PMX_MCIRESETCF_MASK (1 << 20) 15562306a36Sopenharmony_ci #define PMX_MCICS0CE_MASK (1 << 21) 15662306a36Sopenharmony_ci #define PMX_MCICFINTR_MASK (1 << 22) 15762306a36Sopenharmony_ci #define PMX_MCIIORDY_MASK (1 << 23) 15862306a36Sopenharmony_ci #define PMX_MCICS1_MASK (1 << 24) 15962306a36Sopenharmony_ci #define PMX_MCIDMAACK_MASK (1 << 25) 16062306a36Sopenharmony_ci #define PMX_MCISDCMD_MASK (1 << 26) 16162306a36Sopenharmony_ci #define PMX_MCILEDS_MASK (1 << 27) 16262306a36Sopenharmony_ci #define PMX_TOUCH_XY_MASK (1 << 28) 16362306a36Sopenharmony_ci #define PMX_SSP0_CS0_MASK (1 << 29) 16462306a36Sopenharmony_ci #define PMX_SSP0_CS1_2_MASK (1 << 30) 16562306a36Sopenharmony_ci 16662306a36Sopenharmony_ci#define PAD_DIRECTION_SEL_0 0x65C 16762306a36Sopenharmony_ci#define PAD_DIRECTION_SEL_1 0x660 16862306a36Sopenharmony_ci#define PAD_DIRECTION_SEL_2 0x664 16962306a36Sopenharmony_ci 17062306a36Sopenharmony_ci/* combined macros */ 17162306a36Sopenharmony_ci#define PMX_GMII_MASK (PMX_GMIICLK_MASK | \ 17262306a36Sopenharmony_ci PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK | \ 17362306a36Sopenharmony_ci PMX_RXCLK_RDV_TXEN_D03_MASK | \ 17462306a36Sopenharmony_ci PMX_GMIID47_MASK | PMX_MDC_MDIO_MASK) 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_ci#define PMX_EGPIO_0_GRP_MASK (PMX_EGPIO00_MASK | PMX_EGPIO01_MASK | \ 17762306a36Sopenharmony_ci PMX_EGPIO02_MASK | \ 17862306a36Sopenharmony_ci PMX_EGPIO03_MASK | PMX_EGPIO04_MASK | \ 17962306a36Sopenharmony_ci PMX_EGPIO05_MASK | PMX_EGPIO06_MASK | \ 18062306a36Sopenharmony_ci PMX_EGPIO07_MASK | PMX_EGPIO08_MASK | \ 18162306a36Sopenharmony_ci PMX_EGPIO09_MASK) 18262306a36Sopenharmony_ci#define PMX_EGPIO_1_GRP_MASK (PMX_EGPIO10_MASK | PMX_EGPIO11_MASK | \ 18362306a36Sopenharmony_ci PMX_EGPIO12_MASK | PMX_EGPIO13_MASK | \ 18462306a36Sopenharmony_ci PMX_EGPIO14_MASK | PMX_EGPIO15_MASK) 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_ci#define PMX_KEYBOARD_6X6_MASK (PMX_KBD_ROW0_MASK | PMX_KBD_ROW1_MASK | \ 18762306a36Sopenharmony_ci PMX_KBD_ROWCOL25_MASK | PMX_KBD_COL0_MASK | \ 18862306a36Sopenharmony_ci PMX_KBD_COL1_MASK) 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ci#define PMX_NAND8BIT_0_MASK (PMX_NAND8_MASK | PMX_NFAD23_MASK | \ 19162306a36Sopenharmony_ci PMX_NFAD24_MASK | PMX_NFAD25_MASK | \ 19262306a36Sopenharmony_ci PMX_NFWPRT3_MASK | PMX_NFRSTPWDWN0_MASK | \ 19362306a36Sopenharmony_ci PMX_NFRSTPWDWN1_MASK | PMX_NFRSTPWDWN2_MASK | \ 19462306a36Sopenharmony_ci PMX_NFCE3_MASK) 19562306a36Sopenharmony_ci#define PMX_NAND8BIT_1_MASK PMX_NFRSTPWDWN3_MASK 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ci#define PMX_NAND16BIT_1_MASK (PMX_KBD_ROWCOL25_MASK | PMX_NFIO8_15_MASK) 19862306a36Sopenharmony_ci#define PMX_NAND_4CHIPS_MASK (PMX_NFCE1_MASK | PMX_NFCE2_MASK | \ 19962306a36Sopenharmony_ci PMX_NFWPRT1_MASK | PMX_NFWPRT2_MASK | \ 20062306a36Sopenharmony_ci PMX_KBD_ROW0_MASK | PMX_KBD_ROW1_MASK | \ 20162306a36Sopenharmony_ci PMX_KBD_COL0_MASK | PMX_KBD_COL1_MASK) 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ci#define PMX_MCIFALL_1_MASK 0xF8000000 20462306a36Sopenharmony_ci#define PMX_MCIFALL_2_MASK 0x0FFFFFFF 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ci#define PMX_PCI_REG1_MASK (PMX_SMINCS2_MASK | PMX_SMINCS3_MASK | \ 20762306a36Sopenharmony_ci PMX_CLCD2_MASK | PMX_KBD_ROWCOL68_MASK | \ 20862306a36Sopenharmony_ci PMX_EGPIO_1_GRP_MASK | PMX_GPT0_TMR0_MASK | \ 20962306a36Sopenharmony_ci PMX_GPT0_TMR1_MASK | PMX_GPT1_TMR0_MASK | \ 21062306a36Sopenharmony_ci PMX_GPT1_TMR1_MASK | PMX_I2S1_MASK | \ 21162306a36Sopenharmony_ci PMX_NFCE2_MASK) 21262306a36Sopenharmony_ci#define PMX_PCI_REG2_MASK (PMX_TOUCH_XY_MASK | PMX_SSP0_CS0_MASK | \ 21362306a36Sopenharmony_ci PMX_SSP0_CS1_2_MASK) 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ci#define PMX_SMII_0_1_2_MASK (PMX_CLCD2_MASK | PMX_KBD_ROWCOL68_MASK) 21662306a36Sopenharmony_ci#define PMX_RGMII_REG0_MASK (PMX_MCI_DATA8_15_MASK | \ 21762306a36Sopenharmony_ci PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK | \ 21862306a36Sopenharmony_ci PMX_GMIID47_MASK) 21962306a36Sopenharmony_ci#define PMX_RGMII_REG1_MASK (PMX_KBD_ROWCOL68_MASK | PMX_EGPIO_1_GRP_MASK |\ 22062306a36Sopenharmony_ci PMX_KBD_ROW1_MASK | PMX_NFWPRT1_MASK | \ 22162306a36Sopenharmony_ci PMX_KBD_ROW0_MASK | PMX_NFWPRT2_MASK) 22262306a36Sopenharmony_ci#define PMX_RGMII_REG2_MASK (PMX_TOUCH_XY_MASK | PMX_SSP0_CS0_MASK | \ 22362306a36Sopenharmony_ci PMX_SSP0_CS1_2_MASK) 22462306a36Sopenharmony_ci 22562306a36Sopenharmony_ci#define PCIE_CFG_VAL(x) (PCIE_SATA##x##_SEL_PCIE | \ 22662306a36Sopenharmony_ci PCIE##x##_CFG_AUX_CLK_EN | \ 22762306a36Sopenharmony_ci PCIE##x##_CFG_CORE_CLK_EN | \ 22862306a36Sopenharmony_ci PCIE##x##_CFG_POWERUP_RESET | \ 22962306a36Sopenharmony_ci PCIE##x##_CFG_DEVICE_PRESENT) 23062306a36Sopenharmony_ci#define SATA_CFG_VAL(x) (PCIE_SATA##x##_SEL_SATA | \ 23162306a36Sopenharmony_ci SATA##x##_CFG_PM_CLK_EN | \ 23262306a36Sopenharmony_ci SATA##x##_CFG_POWERUP_RESET | \ 23362306a36Sopenharmony_ci SATA##x##_CFG_RX_CLK_EN | \ 23462306a36Sopenharmony_ci SATA##x##_CFG_TX_CLK_EN) 23562306a36Sopenharmony_ci 23662306a36Sopenharmony_ci/* Pad multiplexing for i2c0 device */ 23762306a36Sopenharmony_cistatic const unsigned i2c0_pins[] = { 102, 103 }; 23862306a36Sopenharmony_cistatic struct spear_muxreg i2c0_muxreg[] = { 23962306a36Sopenharmony_ci { 24062306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 24162306a36Sopenharmony_ci .mask = PMX_I2C0_MASK, 24262306a36Sopenharmony_ci .val = PMX_I2C0_MASK, 24362306a36Sopenharmony_ci }, { 24462306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 24562306a36Sopenharmony_ci .mask = PMX_I2C0_MASK, 24662306a36Sopenharmony_ci .val = PMX_I2C0_MASK, 24762306a36Sopenharmony_ci }, 24862306a36Sopenharmony_ci}; 24962306a36Sopenharmony_ci 25062306a36Sopenharmony_cistatic struct spear_modemux i2c0_modemux[] = { 25162306a36Sopenharmony_ci { 25262306a36Sopenharmony_ci .muxregs = i2c0_muxreg, 25362306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c0_muxreg), 25462306a36Sopenharmony_ci }, 25562306a36Sopenharmony_ci}; 25662306a36Sopenharmony_ci 25762306a36Sopenharmony_cistatic struct spear_pingroup i2c0_pingroup = { 25862306a36Sopenharmony_ci .name = "i2c0_grp", 25962306a36Sopenharmony_ci .pins = i2c0_pins, 26062306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c0_pins), 26162306a36Sopenharmony_ci .modemuxs = i2c0_modemux, 26262306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c0_modemux), 26362306a36Sopenharmony_ci}; 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_cistatic const char *const i2c0_grps[] = { "i2c0_grp" }; 26662306a36Sopenharmony_cistatic struct spear_function i2c0_function = { 26762306a36Sopenharmony_ci .name = "i2c0", 26862306a36Sopenharmony_ci .groups = i2c0_grps, 26962306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c0_grps), 27062306a36Sopenharmony_ci}; 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_ci/* Pad multiplexing for ssp0 device */ 27362306a36Sopenharmony_cistatic const unsigned ssp0_pins[] = { 109, 110, 111, 112 }; 27462306a36Sopenharmony_cistatic struct spear_muxreg ssp0_muxreg[] = { 27562306a36Sopenharmony_ci { 27662306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 27762306a36Sopenharmony_ci .mask = PMX_SSP0_MASK, 27862306a36Sopenharmony_ci .val = PMX_SSP0_MASK, 27962306a36Sopenharmony_ci }, { 28062306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 28162306a36Sopenharmony_ci .mask = PMX_SSP0_MASK, 28262306a36Sopenharmony_ci .val = PMX_SSP0_MASK, 28362306a36Sopenharmony_ci }, 28462306a36Sopenharmony_ci}; 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_cistatic struct spear_modemux ssp0_modemux[] = { 28762306a36Sopenharmony_ci { 28862306a36Sopenharmony_ci .muxregs = ssp0_muxreg, 28962306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp0_muxreg), 29062306a36Sopenharmony_ci }, 29162306a36Sopenharmony_ci}; 29262306a36Sopenharmony_ci 29362306a36Sopenharmony_cistatic struct spear_pingroup ssp0_pingroup = { 29462306a36Sopenharmony_ci .name = "ssp0_grp", 29562306a36Sopenharmony_ci .pins = ssp0_pins, 29662306a36Sopenharmony_ci .npins = ARRAY_SIZE(ssp0_pins), 29762306a36Sopenharmony_ci .modemuxs = ssp0_modemux, 29862306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp0_modemux), 29962306a36Sopenharmony_ci}; 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ci/* Pad multiplexing for ssp0_cs0 device */ 30262306a36Sopenharmony_cistatic const unsigned ssp0_cs0_pins[] = { 96 }; 30362306a36Sopenharmony_cistatic struct spear_muxreg ssp0_cs0_muxreg[] = { 30462306a36Sopenharmony_ci { 30562306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 30662306a36Sopenharmony_ci .mask = PMX_SSP0_CS0_MASK, 30762306a36Sopenharmony_ci .val = PMX_SSP0_CS0_MASK, 30862306a36Sopenharmony_ci }, { 30962306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 31062306a36Sopenharmony_ci .mask = PMX_SSP0_CS0_MASK, 31162306a36Sopenharmony_ci .val = PMX_SSP0_CS0_MASK, 31262306a36Sopenharmony_ci }, 31362306a36Sopenharmony_ci}; 31462306a36Sopenharmony_ci 31562306a36Sopenharmony_cistatic struct spear_modemux ssp0_cs0_modemux[] = { 31662306a36Sopenharmony_ci { 31762306a36Sopenharmony_ci .muxregs = ssp0_cs0_muxreg, 31862306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp0_cs0_muxreg), 31962306a36Sopenharmony_ci }, 32062306a36Sopenharmony_ci}; 32162306a36Sopenharmony_ci 32262306a36Sopenharmony_cistatic struct spear_pingroup ssp0_cs0_pingroup = { 32362306a36Sopenharmony_ci .name = "ssp0_cs0_grp", 32462306a36Sopenharmony_ci .pins = ssp0_cs0_pins, 32562306a36Sopenharmony_ci .npins = ARRAY_SIZE(ssp0_cs0_pins), 32662306a36Sopenharmony_ci .modemuxs = ssp0_cs0_modemux, 32762306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp0_cs0_modemux), 32862306a36Sopenharmony_ci}; 32962306a36Sopenharmony_ci 33062306a36Sopenharmony_ci/* ssp0_cs1_2 device */ 33162306a36Sopenharmony_cistatic const unsigned ssp0_cs1_2_pins[] = { 94, 95 }; 33262306a36Sopenharmony_cistatic struct spear_muxreg ssp0_cs1_2_muxreg[] = { 33362306a36Sopenharmony_ci { 33462306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 33562306a36Sopenharmony_ci .mask = PMX_SSP0_CS1_2_MASK, 33662306a36Sopenharmony_ci .val = PMX_SSP0_CS1_2_MASK, 33762306a36Sopenharmony_ci }, { 33862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 33962306a36Sopenharmony_ci .mask = PMX_SSP0_CS1_2_MASK, 34062306a36Sopenharmony_ci .val = PMX_SSP0_CS1_2_MASK, 34162306a36Sopenharmony_ci }, 34262306a36Sopenharmony_ci}; 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_cistatic struct spear_modemux ssp0_cs1_2_modemux[] = { 34562306a36Sopenharmony_ci { 34662306a36Sopenharmony_ci .muxregs = ssp0_cs1_2_muxreg, 34762306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp0_cs1_2_muxreg), 34862306a36Sopenharmony_ci }, 34962306a36Sopenharmony_ci}; 35062306a36Sopenharmony_ci 35162306a36Sopenharmony_cistatic struct spear_pingroup ssp0_cs1_2_pingroup = { 35262306a36Sopenharmony_ci .name = "ssp0_cs1_2_grp", 35362306a36Sopenharmony_ci .pins = ssp0_cs1_2_pins, 35462306a36Sopenharmony_ci .npins = ARRAY_SIZE(ssp0_cs1_2_pins), 35562306a36Sopenharmony_ci .modemuxs = ssp0_cs1_2_modemux, 35662306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp0_cs1_2_modemux), 35762306a36Sopenharmony_ci}; 35862306a36Sopenharmony_ci 35962306a36Sopenharmony_cistatic const char *const ssp0_grps[] = { "ssp0_grp", "ssp0_cs0_grp", 36062306a36Sopenharmony_ci "ssp0_cs1_2_grp" }; 36162306a36Sopenharmony_cistatic struct spear_function ssp0_function = { 36262306a36Sopenharmony_ci .name = "ssp0", 36362306a36Sopenharmony_ci .groups = ssp0_grps, 36462306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(ssp0_grps), 36562306a36Sopenharmony_ci}; 36662306a36Sopenharmony_ci 36762306a36Sopenharmony_ci/* Pad multiplexing for i2s0 device */ 36862306a36Sopenharmony_cistatic const unsigned i2s0_pins[] = { 104, 105, 106, 107, 108 }; 36962306a36Sopenharmony_cistatic struct spear_muxreg i2s0_muxreg[] = { 37062306a36Sopenharmony_ci { 37162306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 37262306a36Sopenharmony_ci .mask = PMX_I2S0_MASK, 37362306a36Sopenharmony_ci .val = PMX_I2S0_MASK, 37462306a36Sopenharmony_ci }, { 37562306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 37662306a36Sopenharmony_ci .mask = PMX_I2S0_MASK, 37762306a36Sopenharmony_ci .val = PMX_I2S0_MASK, 37862306a36Sopenharmony_ci }, 37962306a36Sopenharmony_ci}; 38062306a36Sopenharmony_ci 38162306a36Sopenharmony_cistatic struct spear_modemux i2s0_modemux[] = { 38262306a36Sopenharmony_ci { 38362306a36Sopenharmony_ci .muxregs = i2s0_muxreg, 38462306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2s0_muxreg), 38562306a36Sopenharmony_ci }, 38662306a36Sopenharmony_ci}; 38762306a36Sopenharmony_ci 38862306a36Sopenharmony_cistatic struct spear_pingroup i2s0_pingroup = { 38962306a36Sopenharmony_ci .name = "i2s0_grp", 39062306a36Sopenharmony_ci .pins = i2s0_pins, 39162306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2s0_pins), 39262306a36Sopenharmony_ci .modemuxs = i2s0_modemux, 39362306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2s0_modemux), 39462306a36Sopenharmony_ci}; 39562306a36Sopenharmony_ci 39662306a36Sopenharmony_cistatic const char *const i2s0_grps[] = { "i2s0_grp" }; 39762306a36Sopenharmony_cistatic struct spear_function i2s0_function = { 39862306a36Sopenharmony_ci .name = "i2s0", 39962306a36Sopenharmony_ci .groups = i2s0_grps, 40062306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(i2s0_grps), 40162306a36Sopenharmony_ci}; 40262306a36Sopenharmony_ci 40362306a36Sopenharmony_ci/* Pad multiplexing for i2s1 device */ 40462306a36Sopenharmony_cistatic const unsigned i2s1_pins[] = { 0, 1, 2, 3 }; 40562306a36Sopenharmony_cistatic struct spear_muxreg i2s1_muxreg[] = { 40662306a36Sopenharmony_ci { 40762306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 40862306a36Sopenharmony_ci .mask = PMX_I2S1_MASK, 40962306a36Sopenharmony_ci .val = PMX_I2S1_MASK, 41062306a36Sopenharmony_ci }, { 41162306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 41262306a36Sopenharmony_ci .mask = PMX_I2S1_MASK, 41362306a36Sopenharmony_ci .val = PMX_I2S1_MASK, 41462306a36Sopenharmony_ci }, 41562306a36Sopenharmony_ci}; 41662306a36Sopenharmony_ci 41762306a36Sopenharmony_cistatic struct spear_modemux i2s1_modemux[] = { 41862306a36Sopenharmony_ci { 41962306a36Sopenharmony_ci .muxregs = i2s1_muxreg, 42062306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2s1_muxreg), 42162306a36Sopenharmony_ci }, 42262306a36Sopenharmony_ci}; 42362306a36Sopenharmony_ci 42462306a36Sopenharmony_cistatic struct spear_pingroup i2s1_pingroup = { 42562306a36Sopenharmony_ci .name = "i2s1_grp", 42662306a36Sopenharmony_ci .pins = i2s1_pins, 42762306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2s1_pins), 42862306a36Sopenharmony_ci .modemuxs = i2s1_modemux, 42962306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2s1_modemux), 43062306a36Sopenharmony_ci}; 43162306a36Sopenharmony_ci 43262306a36Sopenharmony_cistatic const char *const i2s1_grps[] = { "i2s1_grp" }; 43362306a36Sopenharmony_cistatic struct spear_function i2s1_function = { 43462306a36Sopenharmony_ci .name = "i2s1", 43562306a36Sopenharmony_ci .groups = i2s1_grps, 43662306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(i2s1_grps), 43762306a36Sopenharmony_ci}; 43862306a36Sopenharmony_ci 43962306a36Sopenharmony_ci/* Pad multiplexing for clcd device */ 44062306a36Sopenharmony_cistatic const unsigned clcd_pins[] = { 113, 114, 115, 116, 117, 118, 119, 120, 44162306a36Sopenharmony_ci 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 44262306a36Sopenharmony_ci 135, 136, 137, 138, 139, 140, 141, 142 }; 44362306a36Sopenharmony_cistatic struct spear_muxreg clcd_muxreg[] = { 44462306a36Sopenharmony_ci { 44562306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 44662306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK, 44762306a36Sopenharmony_ci .val = PMX_CLCD1_MASK, 44862306a36Sopenharmony_ci }, { 44962306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 45062306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK, 45162306a36Sopenharmony_ci .val = PMX_CLCD1_MASK, 45262306a36Sopenharmony_ci }, 45362306a36Sopenharmony_ci}; 45462306a36Sopenharmony_ci 45562306a36Sopenharmony_cistatic struct spear_modemux clcd_modemux[] = { 45662306a36Sopenharmony_ci { 45762306a36Sopenharmony_ci .muxregs = clcd_muxreg, 45862306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(clcd_muxreg), 45962306a36Sopenharmony_ci }, 46062306a36Sopenharmony_ci}; 46162306a36Sopenharmony_ci 46262306a36Sopenharmony_cistatic struct spear_pingroup clcd_pingroup = { 46362306a36Sopenharmony_ci .name = "clcd_grp", 46462306a36Sopenharmony_ci .pins = clcd_pins, 46562306a36Sopenharmony_ci .npins = ARRAY_SIZE(clcd_pins), 46662306a36Sopenharmony_ci .modemuxs = clcd_modemux, 46762306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(clcd_modemux), 46862306a36Sopenharmony_ci}; 46962306a36Sopenharmony_ci 47062306a36Sopenharmony_cistatic const unsigned clcd_high_res_pins[] = { 30, 31, 32, 33, 34, 35, 36, 37, 47162306a36Sopenharmony_ci 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }; 47262306a36Sopenharmony_cistatic struct spear_muxreg clcd_high_res_muxreg[] = { 47362306a36Sopenharmony_ci { 47462306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 47562306a36Sopenharmony_ci .mask = PMX_CLCD2_MASK, 47662306a36Sopenharmony_ci .val = PMX_CLCD2_MASK, 47762306a36Sopenharmony_ci }, { 47862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 47962306a36Sopenharmony_ci .mask = PMX_CLCD2_MASK, 48062306a36Sopenharmony_ci .val = PMX_CLCD2_MASK, 48162306a36Sopenharmony_ci }, 48262306a36Sopenharmony_ci}; 48362306a36Sopenharmony_ci 48462306a36Sopenharmony_cistatic struct spear_modemux clcd_high_res_modemux[] = { 48562306a36Sopenharmony_ci { 48662306a36Sopenharmony_ci .muxregs = clcd_high_res_muxreg, 48762306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(clcd_high_res_muxreg), 48862306a36Sopenharmony_ci }, 48962306a36Sopenharmony_ci}; 49062306a36Sopenharmony_ci 49162306a36Sopenharmony_cistatic struct spear_pingroup clcd_high_res_pingroup = { 49262306a36Sopenharmony_ci .name = "clcd_high_res_grp", 49362306a36Sopenharmony_ci .pins = clcd_high_res_pins, 49462306a36Sopenharmony_ci .npins = ARRAY_SIZE(clcd_high_res_pins), 49562306a36Sopenharmony_ci .modemuxs = clcd_high_res_modemux, 49662306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(clcd_high_res_modemux), 49762306a36Sopenharmony_ci}; 49862306a36Sopenharmony_ci 49962306a36Sopenharmony_cistatic const char *const clcd_grps[] = { "clcd_grp", "clcd_high_res_grp" }; 50062306a36Sopenharmony_cistatic struct spear_function clcd_function = { 50162306a36Sopenharmony_ci .name = "clcd", 50262306a36Sopenharmony_ci .groups = clcd_grps, 50362306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(clcd_grps), 50462306a36Sopenharmony_ci}; 50562306a36Sopenharmony_ci 50662306a36Sopenharmony_cistatic const unsigned arm_gpio_pins[] = { 18, 19, 20, 21, 22, 23, 143, 144, 145, 50762306a36Sopenharmony_ci 146, 147, 148, 149, 150, 151, 152 }; 50862306a36Sopenharmony_cistatic struct spear_muxreg arm_gpio_muxreg[] = { 50962306a36Sopenharmony_ci { 51062306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 51162306a36Sopenharmony_ci .mask = PMX_EGPIO_0_GRP_MASK, 51262306a36Sopenharmony_ci .val = PMX_EGPIO_0_GRP_MASK, 51362306a36Sopenharmony_ci }, { 51462306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 51562306a36Sopenharmony_ci .mask = PMX_EGPIO_1_GRP_MASK, 51662306a36Sopenharmony_ci .val = PMX_EGPIO_1_GRP_MASK, 51762306a36Sopenharmony_ci }, { 51862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 51962306a36Sopenharmony_ci .mask = PMX_EGPIO_0_GRP_MASK, 52062306a36Sopenharmony_ci .val = PMX_EGPIO_0_GRP_MASK, 52162306a36Sopenharmony_ci }, { 52262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 52362306a36Sopenharmony_ci .mask = PMX_EGPIO_1_GRP_MASK, 52462306a36Sopenharmony_ci .val = PMX_EGPIO_1_GRP_MASK, 52562306a36Sopenharmony_ci }, 52662306a36Sopenharmony_ci}; 52762306a36Sopenharmony_ci 52862306a36Sopenharmony_cistatic struct spear_modemux arm_gpio_modemux[] = { 52962306a36Sopenharmony_ci { 53062306a36Sopenharmony_ci .muxregs = arm_gpio_muxreg, 53162306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(arm_gpio_muxreg), 53262306a36Sopenharmony_ci }, 53362306a36Sopenharmony_ci}; 53462306a36Sopenharmony_ci 53562306a36Sopenharmony_cistatic struct spear_pingroup arm_gpio_pingroup = { 53662306a36Sopenharmony_ci .name = "arm_gpio_grp", 53762306a36Sopenharmony_ci .pins = arm_gpio_pins, 53862306a36Sopenharmony_ci .npins = ARRAY_SIZE(arm_gpio_pins), 53962306a36Sopenharmony_ci .modemuxs = arm_gpio_modemux, 54062306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(arm_gpio_modemux), 54162306a36Sopenharmony_ci}; 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_cistatic const char *const arm_gpio_grps[] = { "arm_gpio_grp" }; 54462306a36Sopenharmony_cistatic struct spear_function arm_gpio_function = { 54562306a36Sopenharmony_ci .name = "arm_gpio", 54662306a36Sopenharmony_ci .groups = arm_gpio_grps, 54762306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(arm_gpio_grps), 54862306a36Sopenharmony_ci}; 54962306a36Sopenharmony_ci 55062306a36Sopenharmony_ci/* Pad multiplexing for smi 2 chips device */ 55162306a36Sopenharmony_cistatic const unsigned smi_2_chips_pins[] = { 153, 154, 155, 156, 157 }; 55262306a36Sopenharmony_cistatic struct spear_muxreg smi_2_chips_muxreg[] = { 55362306a36Sopenharmony_ci { 55462306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 55562306a36Sopenharmony_ci .mask = PMX_SMI_MASK, 55662306a36Sopenharmony_ci .val = PMX_SMI_MASK, 55762306a36Sopenharmony_ci }, { 55862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 55962306a36Sopenharmony_ci .mask = PMX_SMI_MASK, 56062306a36Sopenharmony_ci .val = PMX_SMI_MASK, 56162306a36Sopenharmony_ci }, 56262306a36Sopenharmony_ci}; 56362306a36Sopenharmony_ci 56462306a36Sopenharmony_cistatic struct spear_modemux smi_2_chips_modemux[] = { 56562306a36Sopenharmony_ci { 56662306a36Sopenharmony_ci .muxregs = smi_2_chips_muxreg, 56762306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(smi_2_chips_muxreg), 56862306a36Sopenharmony_ci }, 56962306a36Sopenharmony_ci}; 57062306a36Sopenharmony_ci 57162306a36Sopenharmony_cistatic struct spear_pingroup smi_2_chips_pingroup = { 57262306a36Sopenharmony_ci .name = "smi_2_chips_grp", 57362306a36Sopenharmony_ci .pins = smi_2_chips_pins, 57462306a36Sopenharmony_ci .npins = ARRAY_SIZE(smi_2_chips_pins), 57562306a36Sopenharmony_ci .modemuxs = smi_2_chips_modemux, 57662306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(smi_2_chips_modemux), 57762306a36Sopenharmony_ci}; 57862306a36Sopenharmony_ci 57962306a36Sopenharmony_cistatic const unsigned smi_4_chips_pins[] = { 54, 55 }; 58062306a36Sopenharmony_cistatic struct spear_muxreg smi_4_chips_muxreg[] = { 58162306a36Sopenharmony_ci { 58262306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 58362306a36Sopenharmony_ci .mask = PMX_SMI_MASK, 58462306a36Sopenharmony_ci .val = PMX_SMI_MASK, 58562306a36Sopenharmony_ci }, { 58662306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 58762306a36Sopenharmony_ci .mask = PMX_SMINCS2_MASK | PMX_SMINCS3_MASK, 58862306a36Sopenharmony_ci .val = PMX_SMINCS2_MASK | PMX_SMINCS3_MASK, 58962306a36Sopenharmony_ci }, { 59062306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 59162306a36Sopenharmony_ci .mask = PMX_SMI_MASK, 59262306a36Sopenharmony_ci .val = PMX_SMI_MASK, 59362306a36Sopenharmony_ci }, { 59462306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 59562306a36Sopenharmony_ci .mask = PMX_SMINCS2_MASK | PMX_SMINCS3_MASK, 59662306a36Sopenharmony_ci .val = PMX_SMINCS2_MASK | PMX_SMINCS3_MASK, 59762306a36Sopenharmony_ci }, 59862306a36Sopenharmony_ci}; 59962306a36Sopenharmony_ci 60062306a36Sopenharmony_cistatic struct spear_modemux smi_4_chips_modemux[] = { 60162306a36Sopenharmony_ci { 60262306a36Sopenharmony_ci .muxregs = smi_4_chips_muxreg, 60362306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(smi_4_chips_muxreg), 60462306a36Sopenharmony_ci }, 60562306a36Sopenharmony_ci}; 60662306a36Sopenharmony_ci 60762306a36Sopenharmony_cistatic struct spear_pingroup smi_4_chips_pingroup = { 60862306a36Sopenharmony_ci .name = "smi_4_chips_grp", 60962306a36Sopenharmony_ci .pins = smi_4_chips_pins, 61062306a36Sopenharmony_ci .npins = ARRAY_SIZE(smi_4_chips_pins), 61162306a36Sopenharmony_ci .modemuxs = smi_4_chips_modemux, 61262306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(smi_4_chips_modemux), 61362306a36Sopenharmony_ci}; 61462306a36Sopenharmony_ci 61562306a36Sopenharmony_cistatic const char *const smi_grps[] = { "smi_2_chips_grp", "smi_4_chips_grp" }; 61662306a36Sopenharmony_cistatic struct spear_function smi_function = { 61762306a36Sopenharmony_ci .name = "smi", 61862306a36Sopenharmony_ci .groups = smi_grps, 61962306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(smi_grps), 62062306a36Sopenharmony_ci}; 62162306a36Sopenharmony_ci 62262306a36Sopenharmony_ci/* Pad multiplexing for gmii device */ 62362306a36Sopenharmony_cistatic const unsigned gmii_pins[] = { 173, 174, 175, 176, 177, 178, 179, 180, 62462306a36Sopenharmony_ci 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 62562306a36Sopenharmony_ci 195, 196, 197, 198, 199, 200 }; 62662306a36Sopenharmony_cistatic struct spear_muxreg gmii_muxreg[] = { 62762306a36Sopenharmony_ci { 62862306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 62962306a36Sopenharmony_ci .mask = PMX_GMII_MASK, 63062306a36Sopenharmony_ci .val = PMX_GMII_MASK, 63162306a36Sopenharmony_ci }, { 63262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 63362306a36Sopenharmony_ci .mask = PMX_GMII_MASK, 63462306a36Sopenharmony_ci .val = PMX_GMII_MASK, 63562306a36Sopenharmony_ci }, 63662306a36Sopenharmony_ci}; 63762306a36Sopenharmony_ci 63862306a36Sopenharmony_cistatic struct spear_modemux gmii_modemux[] = { 63962306a36Sopenharmony_ci { 64062306a36Sopenharmony_ci .muxregs = gmii_muxreg, 64162306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gmii_muxreg), 64262306a36Sopenharmony_ci }, 64362306a36Sopenharmony_ci}; 64462306a36Sopenharmony_ci 64562306a36Sopenharmony_cistatic struct spear_pingroup gmii_pingroup = { 64662306a36Sopenharmony_ci .name = "gmii_grp", 64762306a36Sopenharmony_ci .pins = gmii_pins, 64862306a36Sopenharmony_ci .npins = ARRAY_SIZE(gmii_pins), 64962306a36Sopenharmony_ci .modemuxs = gmii_modemux, 65062306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gmii_modemux), 65162306a36Sopenharmony_ci}; 65262306a36Sopenharmony_ci 65362306a36Sopenharmony_cistatic const char *const gmii_grps[] = { "gmii_grp" }; 65462306a36Sopenharmony_cistatic struct spear_function gmii_function = { 65562306a36Sopenharmony_ci .name = "gmii", 65662306a36Sopenharmony_ci .groups = gmii_grps, 65762306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(gmii_grps), 65862306a36Sopenharmony_ci}; 65962306a36Sopenharmony_ci 66062306a36Sopenharmony_ci/* Pad multiplexing for rgmii device */ 66162306a36Sopenharmony_cistatic const unsigned rgmii_pins[] = { 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 66262306a36Sopenharmony_ci 28, 29, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 175, 66362306a36Sopenharmony_ci 180, 181, 182, 183, 185, 188, 193, 194, 195, 196, 197, 198, 211, 212 }; 66462306a36Sopenharmony_cistatic struct spear_muxreg rgmii_muxreg[] = { 66562306a36Sopenharmony_ci { 66662306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 66762306a36Sopenharmony_ci .mask = PMX_RGMII_REG0_MASK, 66862306a36Sopenharmony_ci .val = 0, 66962306a36Sopenharmony_ci }, { 67062306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 67162306a36Sopenharmony_ci .mask = PMX_RGMII_REG1_MASK, 67262306a36Sopenharmony_ci .val = 0, 67362306a36Sopenharmony_ci }, { 67462306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 67562306a36Sopenharmony_ci .mask = PMX_RGMII_REG2_MASK, 67662306a36Sopenharmony_ci .val = 0, 67762306a36Sopenharmony_ci }, { 67862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 67962306a36Sopenharmony_ci .mask = PMX_RGMII_REG0_MASK, 68062306a36Sopenharmony_ci .val = PMX_RGMII_REG0_MASK, 68162306a36Sopenharmony_ci }, { 68262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 68362306a36Sopenharmony_ci .mask = PMX_RGMII_REG1_MASK, 68462306a36Sopenharmony_ci .val = PMX_RGMII_REG1_MASK, 68562306a36Sopenharmony_ci }, { 68662306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 68762306a36Sopenharmony_ci .mask = PMX_RGMII_REG2_MASK, 68862306a36Sopenharmony_ci .val = PMX_RGMII_REG2_MASK, 68962306a36Sopenharmony_ci }, 69062306a36Sopenharmony_ci}; 69162306a36Sopenharmony_ci 69262306a36Sopenharmony_cistatic struct spear_modemux rgmii_modemux[] = { 69362306a36Sopenharmony_ci { 69462306a36Sopenharmony_ci .muxregs = rgmii_muxreg, 69562306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(rgmii_muxreg), 69662306a36Sopenharmony_ci }, 69762306a36Sopenharmony_ci}; 69862306a36Sopenharmony_ci 69962306a36Sopenharmony_cistatic struct spear_pingroup rgmii_pingroup = { 70062306a36Sopenharmony_ci .name = "rgmii_grp", 70162306a36Sopenharmony_ci .pins = rgmii_pins, 70262306a36Sopenharmony_ci .npins = ARRAY_SIZE(rgmii_pins), 70362306a36Sopenharmony_ci .modemuxs = rgmii_modemux, 70462306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(rgmii_modemux), 70562306a36Sopenharmony_ci}; 70662306a36Sopenharmony_ci 70762306a36Sopenharmony_cistatic const char *const rgmii_grps[] = { "rgmii_grp" }; 70862306a36Sopenharmony_cistatic struct spear_function rgmii_function = { 70962306a36Sopenharmony_ci .name = "rgmii", 71062306a36Sopenharmony_ci .groups = rgmii_grps, 71162306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(rgmii_grps), 71262306a36Sopenharmony_ci}; 71362306a36Sopenharmony_ci 71462306a36Sopenharmony_ci/* Pad multiplexing for smii_0_1_2 device */ 71562306a36Sopenharmony_cistatic const unsigned smii_0_1_2_pins[] = { 24, 25, 26, 27, 28, 29, 30, 31, 32, 71662306a36Sopenharmony_ci 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 71762306a36Sopenharmony_ci 51, 52, 53, 54, 55 }; 71862306a36Sopenharmony_cistatic struct spear_muxreg smii_0_1_2_muxreg[] = { 71962306a36Sopenharmony_ci { 72062306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 72162306a36Sopenharmony_ci .mask = PMX_SMII_0_1_2_MASK, 72262306a36Sopenharmony_ci .val = 0, 72362306a36Sopenharmony_ci }, { 72462306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 72562306a36Sopenharmony_ci .mask = PMX_SMII_0_1_2_MASK, 72662306a36Sopenharmony_ci .val = PMX_SMII_0_1_2_MASK, 72762306a36Sopenharmony_ci }, 72862306a36Sopenharmony_ci}; 72962306a36Sopenharmony_ci 73062306a36Sopenharmony_cistatic struct spear_modemux smii_0_1_2_modemux[] = { 73162306a36Sopenharmony_ci { 73262306a36Sopenharmony_ci .muxregs = smii_0_1_2_muxreg, 73362306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(smii_0_1_2_muxreg), 73462306a36Sopenharmony_ci }, 73562306a36Sopenharmony_ci}; 73662306a36Sopenharmony_ci 73762306a36Sopenharmony_cistatic struct spear_pingroup smii_0_1_2_pingroup = { 73862306a36Sopenharmony_ci .name = "smii_0_1_2_grp", 73962306a36Sopenharmony_ci .pins = smii_0_1_2_pins, 74062306a36Sopenharmony_ci .npins = ARRAY_SIZE(smii_0_1_2_pins), 74162306a36Sopenharmony_ci .modemuxs = smii_0_1_2_modemux, 74262306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(smii_0_1_2_modemux), 74362306a36Sopenharmony_ci}; 74462306a36Sopenharmony_ci 74562306a36Sopenharmony_cistatic const char *const smii_0_1_2_grps[] = { "smii_0_1_2_grp" }; 74662306a36Sopenharmony_cistatic struct spear_function smii_0_1_2_function = { 74762306a36Sopenharmony_ci .name = "smii_0_1_2", 74862306a36Sopenharmony_ci .groups = smii_0_1_2_grps, 74962306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(smii_0_1_2_grps), 75062306a36Sopenharmony_ci}; 75162306a36Sopenharmony_ci 75262306a36Sopenharmony_ci/* Pad multiplexing for ras_mii_txclk device */ 75362306a36Sopenharmony_cistatic const unsigned ras_mii_txclk_pins[] = { 98, 99 }; 75462306a36Sopenharmony_cistatic struct spear_muxreg ras_mii_txclk_muxreg[] = { 75562306a36Sopenharmony_ci { 75662306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 75762306a36Sopenharmony_ci .mask = PMX_NFCE2_MASK, 75862306a36Sopenharmony_ci .val = 0, 75962306a36Sopenharmony_ci }, { 76062306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 76162306a36Sopenharmony_ci .mask = PMX_NFCE2_MASK, 76262306a36Sopenharmony_ci .val = PMX_NFCE2_MASK, 76362306a36Sopenharmony_ci }, 76462306a36Sopenharmony_ci}; 76562306a36Sopenharmony_ci 76662306a36Sopenharmony_cistatic struct spear_modemux ras_mii_txclk_modemux[] = { 76762306a36Sopenharmony_ci { 76862306a36Sopenharmony_ci .muxregs = ras_mii_txclk_muxreg, 76962306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ras_mii_txclk_muxreg), 77062306a36Sopenharmony_ci }, 77162306a36Sopenharmony_ci}; 77262306a36Sopenharmony_ci 77362306a36Sopenharmony_cistatic struct spear_pingroup ras_mii_txclk_pingroup = { 77462306a36Sopenharmony_ci .name = "ras_mii_txclk_grp", 77562306a36Sopenharmony_ci .pins = ras_mii_txclk_pins, 77662306a36Sopenharmony_ci .npins = ARRAY_SIZE(ras_mii_txclk_pins), 77762306a36Sopenharmony_ci .modemuxs = ras_mii_txclk_modemux, 77862306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ras_mii_txclk_modemux), 77962306a36Sopenharmony_ci}; 78062306a36Sopenharmony_ci 78162306a36Sopenharmony_cistatic const char *const ras_mii_txclk_grps[] = { "ras_mii_txclk_grp" }; 78262306a36Sopenharmony_cistatic struct spear_function ras_mii_txclk_function = { 78362306a36Sopenharmony_ci .name = "ras_mii_txclk", 78462306a36Sopenharmony_ci .groups = ras_mii_txclk_grps, 78562306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(ras_mii_txclk_grps), 78662306a36Sopenharmony_ci}; 78762306a36Sopenharmony_ci 78862306a36Sopenharmony_ci/* Pad multiplexing for nand 8bit device (cs0 only) */ 78962306a36Sopenharmony_cistatic const unsigned nand_8bit_pins[] = { 56, 57, 58, 59, 60, 61, 62, 63, 64, 79062306a36Sopenharmony_ci 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 79162306a36Sopenharmony_ci 83, 84, 85, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 79262306a36Sopenharmony_ci 170, 171, 172, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 79362306a36Sopenharmony_ci 212 }; 79462306a36Sopenharmony_cistatic struct spear_muxreg nand_8bit_muxreg[] = { 79562306a36Sopenharmony_ci { 79662306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 79762306a36Sopenharmony_ci .mask = PMX_NAND8BIT_0_MASK, 79862306a36Sopenharmony_ci .val = PMX_NAND8BIT_0_MASK, 79962306a36Sopenharmony_ci }, { 80062306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 80162306a36Sopenharmony_ci .mask = PMX_NAND8BIT_1_MASK, 80262306a36Sopenharmony_ci .val = PMX_NAND8BIT_1_MASK, 80362306a36Sopenharmony_ci }, { 80462306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 80562306a36Sopenharmony_ci .mask = PMX_NAND8BIT_0_MASK, 80662306a36Sopenharmony_ci .val = PMX_NAND8BIT_0_MASK, 80762306a36Sopenharmony_ci }, { 80862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 80962306a36Sopenharmony_ci .mask = PMX_NAND8BIT_1_MASK, 81062306a36Sopenharmony_ci .val = PMX_NAND8BIT_1_MASK, 81162306a36Sopenharmony_ci }, 81262306a36Sopenharmony_ci}; 81362306a36Sopenharmony_ci 81462306a36Sopenharmony_cistatic struct spear_modemux nand_8bit_modemux[] = { 81562306a36Sopenharmony_ci { 81662306a36Sopenharmony_ci .muxregs = nand_8bit_muxreg, 81762306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(nand_8bit_muxreg), 81862306a36Sopenharmony_ci }, 81962306a36Sopenharmony_ci}; 82062306a36Sopenharmony_ci 82162306a36Sopenharmony_cistatic struct spear_pingroup nand_8bit_pingroup = { 82262306a36Sopenharmony_ci .name = "nand_8bit_grp", 82362306a36Sopenharmony_ci .pins = nand_8bit_pins, 82462306a36Sopenharmony_ci .npins = ARRAY_SIZE(nand_8bit_pins), 82562306a36Sopenharmony_ci .modemuxs = nand_8bit_modemux, 82662306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(nand_8bit_modemux), 82762306a36Sopenharmony_ci}; 82862306a36Sopenharmony_ci 82962306a36Sopenharmony_ci/* Pad multiplexing for nand 16bit device */ 83062306a36Sopenharmony_cistatic const unsigned nand_16bit_pins[] = { 201, 202, 203, 204, 207, 208, 209, 83162306a36Sopenharmony_ci 210 }; 83262306a36Sopenharmony_cistatic struct spear_muxreg nand_16bit_muxreg[] = { 83362306a36Sopenharmony_ci { 83462306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 83562306a36Sopenharmony_ci .mask = PMX_NAND16BIT_1_MASK, 83662306a36Sopenharmony_ci .val = PMX_NAND16BIT_1_MASK, 83762306a36Sopenharmony_ci }, { 83862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 83962306a36Sopenharmony_ci .mask = PMX_NAND16BIT_1_MASK, 84062306a36Sopenharmony_ci .val = PMX_NAND16BIT_1_MASK, 84162306a36Sopenharmony_ci }, 84262306a36Sopenharmony_ci}; 84362306a36Sopenharmony_ci 84462306a36Sopenharmony_cistatic struct spear_modemux nand_16bit_modemux[] = { 84562306a36Sopenharmony_ci { 84662306a36Sopenharmony_ci .muxregs = nand_16bit_muxreg, 84762306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(nand_16bit_muxreg), 84862306a36Sopenharmony_ci }, 84962306a36Sopenharmony_ci}; 85062306a36Sopenharmony_ci 85162306a36Sopenharmony_cistatic struct spear_pingroup nand_16bit_pingroup = { 85262306a36Sopenharmony_ci .name = "nand_16bit_grp", 85362306a36Sopenharmony_ci .pins = nand_16bit_pins, 85462306a36Sopenharmony_ci .npins = ARRAY_SIZE(nand_16bit_pins), 85562306a36Sopenharmony_ci .modemuxs = nand_16bit_modemux, 85662306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(nand_16bit_modemux), 85762306a36Sopenharmony_ci}; 85862306a36Sopenharmony_ci 85962306a36Sopenharmony_ci/* Pad multiplexing for nand 4 chips */ 86062306a36Sopenharmony_cistatic const unsigned nand_4_chips_pins[] = { 205, 206, 211, 212 }; 86162306a36Sopenharmony_cistatic struct spear_muxreg nand_4_chips_muxreg[] = { 86262306a36Sopenharmony_ci { 86362306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 86462306a36Sopenharmony_ci .mask = PMX_NAND_4CHIPS_MASK, 86562306a36Sopenharmony_ci .val = PMX_NAND_4CHIPS_MASK, 86662306a36Sopenharmony_ci }, { 86762306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 86862306a36Sopenharmony_ci .mask = PMX_NAND_4CHIPS_MASK, 86962306a36Sopenharmony_ci .val = PMX_NAND_4CHIPS_MASK, 87062306a36Sopenharmony_ci }, 87162306a36Sopenharmony_ci}; 87262306a36Sopenharmony_ci 87362306a36Sopenharmony_cistatic struct spear_modemux nand_4_chips_modemux[] = { 87462306a36Sopenharmony_ci { 87562306a36Sopenharmony_ci .muxregs = nand_4_chips_muxreg, 87662306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(nand_4_chips_muxreg), 87762306a36Sopenharmony_ci }, 87862306a36Sopenharmony_ci}; 87962306a36Sopenharmony_ci 88062306a36Sopenharmony_cistatic struct spear_pingroup nand_4_chips_pingroup = { 88162306a36Sopenharmony_ci .name = "nand_4_chips_grp", 88262306a36Sopenharmony_ci .pins = nand_4_chips_pins, 88362306a36Sopenharmony_ci .npins = ARRAY_SIZE(nand_4_chips_pins), 88462306a36Sopenharmony_ci .modemuxs = nand_4_chips_modemux, 88562306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(nand_4_chips_modemux), 88662306a36Sopenharmony_ci}; 88762306a36Sopenharmony_ci 88862306a36Sopenharmony_cistatic const char *const nand_grps[] = { "nand_8bit_grp", "nand_16bit_grp", 88962306a36Sopenharmony_ci "nand_4_chips_grp" }; 89062306a36Sopenharmony_cistatic struct spear_function nand_function = { 89162306a36Sopenharmony_ci .name = "nand", 89262306a36Sopenharmony_ci .groups = nand_grps, 89362306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(nand_grps), 89462306a36Sopenharmony_ci}; 89562306a36Sopenharmony_ci 89662306a36Sopenharmony_ci/* Pad multiplexing for keyboard_6x6 device */ 89762306a36Sopenharmony_cistatic const unsigned keyboard_6x6_pins[] = { 201, 202, 203, 204, 205, 206, 207, 89862306a36Sopenharmony_ci 208, 209, 210, 211, 212 }; 89962306a36Sopenharmony_cistatic struct spear_muxreg keyboard_6x6_muxreg[] = { 90062306a36Sopenharmony_ci { 90162306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 90262306a36Sopenharmony_ci .mask = PMX_KEYBOARD_6X6_MASK | PMX_NFIO8_15_MASK | 90362306a36Sopenharmony_ci PMX_NFCE1_MASK | PMX_NFCE2_MASK | PMX_NFWPRT1_MASK | 90462306a36Sopenharmony_ci PMX_NFWPRT2_MASK, 90562306a36Sopenharmony_ci .val = PMX_KEYBOARD_6X6_MASK, 90662306a36Sopenharmony_ci }, 90762306a36Sopenharmony_ci}; 90862306a36Sopenharmony_ci 90962306a36Sopenharmony_cistatic struct spear_modemux keyboard_6x6_modemux[] = { 91062306a36Sopenharmony_ci { 91162306a36Sopenharmony_ci .muxregs = keyboard_6x6_muxreg, 91262306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(keyboard_6x6_muxreg), 91362306a36Sopenharmony_ci }, 91462306a36Sopenharmony_ci}; 91562306a36Sopenharmony_ci 91662306a36Sopenharmony_cistatic struct spear_pingroup keyboard_6x6_pingroup = { 91762306a36Sopenharmony_ci .name = "keyboard_6x6_grp", 91862306a36Sopenharmony_ci .pins = keyboard_6x6_pins, 91962306a36Sopenharmony_ci .npins = ARRAY_SIZE(keyboard_6x6_pins), 92062306a36Sopenharmony_ci .modemuxs = keyboard_6x6_modemux, 92162306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(keyboard_6x6_modemux), 92262306a36Sopenharmony_ci}; 92362306a36Sopenharmony_ci 92462306a36Sopenharmony_ci/* Pad multiplexing for keyboard_rowcol6_8 device */ 92562306a36Sopenharmony_cistatic const unsigned keyboard_rowcol6_8_pins[] = { 24, 25, 26, 27, 28, 29 }; 92662306a36Sopenharmony_cistatic struct spear_muxreg keyboard_rowcol6_8_muxreg[] = { 92762306a36Sopenharmony_ci { 92862306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 92962306a36Sopenharmony_ci .mask = PMX_KBD_ROWCOL68_MASK, 93062306a36Sopenharmony_ci .val = PMX_KBD_ROWCOL68_MASK, 93162306a36Sopenharmony_ci }, { 93262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 93362306a36Sopenharmony_ci .mask = PMX_KBD_ROWCOL68_MASK, 93462306a36Sopenharmony_ci .val = PMX_KBD_ROWCOL68_MASK, 93562306a36Sopenharmony_ci }, 93662306a36Sopenharmony_ci}; 93762306a36Sopenharmony_ci 93862306a36Sopenharmony_cistatic struct spear_modemux keyboard_rowcol6_8_modemux[] = { 93962306a36Sopenharmony_ci { 94062306a36Sopenharmony_ci .muxregs = keyboard_rowcol6_8_muxreg, 94162306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(keyboard_rowcol6_8_muxreg), 94262306a36Sopenharmony_ci }, 94362306a36Sopenharmony_ci}; 94462306a36Sopenharmony_ci 94562306a36Sopenharmony_cistatic struct spear_pingroup keyboard_rowcol6_8_pingroup = { 94662306a36Sopenharmony_ci .name = "keyboard_rowcol6_8_grp", 94762306a36Sopenharmony_ci .pins = keyboard_rowcol6_8_pins, 94862306a36Sopenharmony_ci .npins = ARRAY_SIZE(keyboard_rowcol6_8_pins), 94962306a36Sopenharmony_ci .modemuxs = keyboard_rowcol6_8_modemux, 95062306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(keyboard_rowcol6_8_modemux), 95162306a36Sopenharmony_ci}; 95262306a36Sopenharmony_ci 95362306a36Sopenharmony_cistatic const char *const keyboard_grps[] = { "keyboard_6x6_grp", 95462306a36Sopenharmony_ci "keyboard_rowcol6_8_grp" }; 95562306a36Sopenharmony_cistatic struct spear_function keyboard_function = { 95662306a36Sopenharmony_ci .name = "keyboard", 95762306a36Sopenharmony_ci .groups = keyboard_grps, 95862306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(keyboard_grps), 95962306a36Sopenharmony_ci}; 96062306a36Sopenharmony_ci 96162306a36Sopenharmony_ci/* Pad multiplexing for uart0 device */ 96262306a36Sopenharmony_cistatic const unsigned uart0_pins[] = { 100, 101 }; 96362306a36Sopenharmony_cistatic struct spear_muxreg uart0_muxreg[] = { 96462306a36Sopenharmony_ci { 96562306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 96662306a36Sopenharmony_ci .mask = PMX_UART0_MASK, 96762306a36Sopenharmony_ci .val = PMX_UART0_MASK, 96862306a36Sopenharmony_ci }, { 96962306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 97062306a36Sopenharmony_ci .mask = PMX_UART0_MASK, 97162306a36Sopenharmony_ci .val = PMX_UART0_MASK, 97262306a36Sopenharmony_ci }, 97362306a36Sopenharmony_ci}; 97462306a36Sopenharmony_ci 97562306a36Sopenharmony_cistatic struct spear_modemux uart0_modemux[] = { 97662306a36Sopenharmony_ci { 97762306a36Sopenharmony_ci .muxregs = uart0_muxreg, 97862306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart0_muxreg), 97962306a36Sopenharmony_ci }, 98062306a36Sopenharmony_ci}; 98162306a36Sopenharmony_ci 98262306a36Sopenharmony_cistatic struct spear_pingroup uart0_pingroup = { 98362306a36Sopenharmony_ci .name = "uart0_grp", 98462306a36Sopenharmony_ci .pins = uart0_pins, 98562306a36Sopenharmony_ci .npins = ARRAY_SIZE(uart0_pins), 98662306a36Sopenharmony_ci .modemuxs = uart0_modemux, 98762306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart0_modemux), 98862306a36Sopenharmony_ci}; 98962306a36Sopenharmony_ci 99062306a36Sopenharmony_ci/* Pad multiplexing for uart0_modem device */ 99162306a36Sopenharmony_cistatic const unsigned uart0_modem_pins[] = { 12, 13, 14, 15, 16, 17 }; 99262306a36Sopenharmony_cistatic struct spear_muxreg uart0_modem_muxreg[] = { 99362306a36Sopenharmony_ci { 99462306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 99562306a36Sopenharmony_ci .mask = PMX_UART0_MODEM_MASK, 99662306a36Sopenharmony_ci .val = PMX_UART0_MODEM_MASK, 99762306a36Sopenharmony_ci }, { 99862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 99962306a36Sopenharmony_ci .mask = PMX_UART0_MODEM_MASK, 100062306a36Sopenharmony_ci .val = PMX_UART0_MODEM_MASK, 100162306a36Sopenharmony_ci }, 100262306a36Sopenharmony_ci}; 100362306a36Sopenharmony_ci 100462306a36Sopenharmony_cistatic struct spear_modemux uart0_modem_modemux[] = { 100562306a36Sopenharmony_ci { 100662306a36Sopenharmony_ci .muxregs = uart0_modem_muxreg, 100762306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart0_modem_muxreg), 100862306a36Sopenharmony_ci }, 100962306a36Sopenharmony_ci}; 101062306a36Sopenharmony_ci 101162306a36Sopenharmony_cistatic struct spear_pingroup uart0_modem_pingroup = { 101262306a36Sopenharmony_ci .name = "uart0_modem_grp", 101362306a36Sopenharmony_ci .pins = uart0_modem_pins, 101462306a36Sopenharmony_ci .npins = ARRAY_SIZE(uart0_modem_pins), 101562306a36Sopenharmony_ci .modemuxs = uart0_modem_modemux, 101662306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart0_modem_modemux), 101762306a36Sopenharmony_ci}; 101862306a36Sopenharmony_ci 101962306a36Sopenharmony_cistatic const char *const uart0_grps[] = { "uart0_grp", "uart0_modem_grp" }; 102062306a36Sopenharmony_cistatic struct spear_function uart0_function = { 102162306a36Sopenharmony_ci .name = "uart0", 102262306a36Sopenharmony_ci .groups = uart0_grps, 102362306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(uart0_grps), 102462306a36Sopenharmony_ci}; 102562306a36Sopenharmony_ci 102662306a36Sopenharmony_ci/* Pad multiplexing for gpt0_tmr0 device */ 102762306a36Sopenharmony_cistatic const unsigned gpt0_tmr0_pins[] = { 10, 11 }; 102862306a36Sopenharmony_cistatic struct spear_muxreg gpt0_tmr0_muxreg[] = { 102962306a36Sopenharmony_ci { 103062306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 103162306a36Sopenharmony_ci .mask = PMX_GPT0_TMR0_MASK, 103262306a36Sopenharmony_ci .val = PMX_GPT0_TMR0_MASK, 103362306a36Sopenharmony_ci }, { 103462306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 103562306a36Sopenharmony_ci .mask = PMX_GPT0_TMR0_MASK, 103662306a36Sopenharmony_ci .val = PMX_GPT0_TMR0_MASK, 103762306a36Sopenharmony_ci }, 103862306a36Sopenharmony_ci}; 103962306a36Sopenharmony_ci 104062306a36Sopenharmony_cistatic struct spear_modemux gpt0_tmr0_modemux[] = { 104162306a36Sopenharmony_ci { 104262306a36Sopenharmony_ci .muxregs = gpt0_tmr0_muxreg, 104362306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt0_tmr0_muxreg), 104462306a36Sopenharmony_ci }, 104562306a36Sopenharmony_ci}; 104662306a36Sopenharmony_ci 104762306a36Sopenharmony_cistatic struct spear_pingroup gpt0_tmr0_pingroup = { 104862306a36Sopenharmony_ci .name = "gpt0_tmr0_grp", 104962306a36Sopenharmony_ci .pins = gpt0_tmr0_pins, 105062306a36Sopenharmony_ci .npins = ARRAY_SIZE(gpt0_tmr0_pins), 105162306a36Sopenharmony_ci .modemuxs = gpt0_tmr0_modemux, 105262306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt0_tmr0_modemux), 105362306a36Sopenharmony_ci}; 105462306a36Sopenharmony_ci 105562306a36Sopenharmony_ci/* Pad multiplexing for gpt0_tmr1 device */ 105662306a36Sopenharmony_cistatic const unsigned gpt0_tmr1_pins[] = { 8, 9 }; 105762306a36Sopenharmony_cistatic struct spear_muxreg gpt0_tmr1_muxreg[] = { 105862306a36Sopenharmony_ci { 105962306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 106062306a36Sopenharmony_ci .mask = PMX_GPT0_TMR1_MASK, 106162306a36Sopenharmony_ci .val = PMX_GPT0_TMR1_MASK, 106262306a36Sopenharmony_ci }, { 106362306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 106462306a36Sopenharmony_ci .mask = PMX_GPT0_TMR1_MASK, 106562306a36Sopenharmony_ci .val = PMX_GPT0_TMR1_MASK, 106662306a36Sopenharmony_ci }, 106762306a36Sopenharmony_ci}; 106862306a36Sopenharmony_ci 106962306a36Sopenharmony_cistatic struct spear_modemux gpt0_tmr1_modemux[] = { 107062306a36Sopenharmony_ci { 107162306a36Sopenharmony_ci .muxregs = gpt0_tmr1_muxreg, 107262306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt0_tmr1_muxreg), 107362306a36Sopenharmony_ci }, 107462306a36Sopenharmony_ci}; 107562306a36Sopenharmony_ci 107662306a36Sopenharmony_cistatic struct spear_pingroup gpt0_tmr1_pingroup = { 107762306a36Sopenharmony_ci .name = "gpt0_tmr1_grp", 107862306a36Sopenharmony_ci .pins = gpt0_tmr1_pins, 107962306a36Sopenharmony_ci .npins = ARRAY_SIZE(gpt0_tmr1_pins), 108062306a36Sopenharmony_ci .modemuxs = gpt0_tmr1_modemux, 108162306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt0_tmr1_modemux), 108262306a36Sopenharmony_ci}; 108362306a36Sopenharmony_ci 108462306a36Sopenharmony_cistatic const char *const gpt0_grps[] = { "gpt0_tmr0_grp", "gpt0_tmr1_grp" }; 108562306a36Sopenharmony_cistatic struct spear_function gpt0_function = { 108662306a36Sopenharmony_ci .name = "gpt0", 108762306a36Sopenharmony_ci .groups = gpt0_grps, 108862306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(gpt0_grps), 108962306a36Sopenharmony_ci}; 109062306a36Sopenharmony_ci 109162306a36Sopenharmony_ci/* Pad multiplexing for gpt1_tmr0 device */ 109262306a36Sopenharmony_cistatic const unsigned gpt1_tmr0_pins[] = { 6, 7 }; 109362306a36Sopenharmony_cistatic struct spear_muxreg gpt1_tmr0_muxreg[] = { 109462306a36Sopenharmony_ci { 109562306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 109662306a36Sopenharmony_ci .mask = PMX_GPT1_TMR0_MASK, 109762306a36Sopenharmony_ci .val = PMX_GPT1_TMR0_MASK, 109862306a36Sopenharmony_ci }, { 109962306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 110062306a36Sopenharmony_ci .mask = PMX_GPT1_TMR0_MASK, 110162306a36Sopenharmony_ci .val = PMX_GPT1_TMR0_MASK, 110262306a36Sopenharmony_ci }, 110362306a36Sopenharmony_ci}; 110462306a36Sopenharmony_ci 110562306a36Sopenharmony_cistatic struct spear_modemux gpt1_tmr0_modemux[] = { 110662306a36Sopenharmony_ci { 110762306a36Sopenharmony_ci .muxregs = gpt1_tmr0_muxreg, 110862306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt1_tmr0_muxreg), 110962306a36Sopenharmony_ci }, 111062306a36Sopenharmony_ci}; 111162306a36Sopenharmony_ci 111262306a36Sopenharmony_cistatic struct spear_pingroup gpt1_tmr0_pingroup = { 111362306a36Sopenharmony_ci .name = "gpt1_tmr0_grp", 111462306a36Sopenharmony_ci .pins = gpt1_tmr0_pins, 111562306a36Sopenharmony_ci .npins = ARRAY_SIZE(gpt1_tmr0_pins), 111662306a36Sopenharmony_ci .modemuxs = gpt1_tmr0_modemux, 111762306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt1_tmr0_modemux), 111862306a36Sopenharmony_ci}; 111962306a36Sopenharmony_ci 112062306a36Sopenharmony_ci/* Pad multiplexing for gpt1_tmr1 device */ 112162306a36Sopenharmony_cistatic const unsigned gpt1_tmr1_pins[] = { 4, 5 }; 112262306a36Sopenharmony_cistatic struct spear_muxreg gpt1_tmr1_muxreg[] = { 112362306a36Sopenharmony_ci { 112462306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 112562306a36Sopenharmony_ci .mask = PMX_GPT1_TMR1_MASK, 112662306a36Sopenharmony_ci .val = PMX_GPT1_TMR1_MASK, 112762306a36Sopenharmony_ci }, { 112862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 112962306a36Sopenharmony_ci .mask = PMX_GPT1_TMR1_MASK, 113062306a36Sopenharmony_ci .val = PMX_GPT1_TMR1_MASK, 113162306a36Sopenharmony_ci }, 113262306a36Sopenharmony_ci}; 113362306a36Sopenharmony_ci 113462306a36Sopenharmony_cistatic struct spear_modemux gpt1_tmr1_modemux[] = { 113562306a36Sopenharmony_ci { 113662306a36Sopenharmony_ci .muxregs = gpt1_tmr1_muxreg, 113762306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt1_tmr1_muxreg), 113862306a36Sopenharmony_ci }, 113962306a36Sopenharmony_ci}; 114062306a36Sopenharmony_ci 114162306a36Sopenharmony_cistatic struct spear_pingroup gpt1_tmr1_pingroup = { 114262306a36Sopenharmony_ci .name = "gpt1_tmr1_grp", 114362306a36Sopenharmony_ci .pins = gpt1_tmr1_pins, 114462306a36Sopenharmony_ci .npins = ARRAY_SIZE(gpt1_tmr1_pins), 114562306a36Sopenharmony_ci .modemuxs = gpt1_tmr1_modemux, 114662306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt1_tmr1_modemux), 114762306a36Sopenharmony_ci}; 114862306a36Sopenharmony_ci 114962306a36Sopenharmony_cistatic const char *const gpt1_grps[] = { "gpt1_tmr1_grp", "gpt1_tmr0_grp" }; 115062306a36Sopenharmony_cistatic struct spear_function gpt1_function = { 115162306a36Sopenharmony_ci .name = "gpt1", 115262306a36Sopenharmony_ci .groups = gpt1_grps, 115362306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(gpt1_grps), 115462306a36Sopenharmony_ci}; 115562306a36Sopenharmony_ci 115662306a36Sopenharmony_ci/* Pad multiplexing for mcif device */ 115762306a36Sopenharmony_cistatic const unsigned mcif_pins[] = { 86, 87, 88, 89, 90, 91, 92, 93, 213, 214, 115862306a36Sopenharmony_ci 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 115962306a36Sopenharmony_ci 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 116062306a36Sopenharmony_ci 243, 244, 245 }; 116162306a36Sopenharmony_ci#define MCIF_MUXREG \ 116262306a36Sopenharmony_ci { \ 116362306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, \ 116462306a36Sopenharmony_ci .mask = PMX_MCI_DATA8_15_MASK, \ 116562306a36Sopenharmony_ci .val = PMX_MCI_DATA8_15_MASK, \ 116662306a36Sopenharmony_ci }, { \ 116762306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, \ 116862306a36Sopenharmony_ci .mask = PMX_MCIFALL_1_MASK | PMX_NFWPRT1_MASK | \ 116962306a36Sopenharmony_ci PMX_NFWPRT2_MASK, \ 117062306a36Sopenharmony_ci .val = PMX_MCIFALL_1_MASK, \ 117162306a36Sopenharmony_ci }, { \ 117262306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, \ 117362306a36Sopenharmony_ci .mask = PMX_MCIFALL_2_MASK, \ 117462306a36Sopenharmony_ci .val = PMX_MCIFALL_2_MASK, \ 117562306a36Sopenharmony_ci }, { \ 117662306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, \ 117762306a36Sopenharmony_ci .mask = PMX_MCI_DATA8_15_MASK, \ 117862306a36Sopenharmony_ci .val = PMX_MCI_DATA8_15_MASK, \ 117962306a36Sopenharmony_ci }, { \ 118062306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, \ 118162306a36Sopenharmony_ci .mask = PMX_MCIFALL_1_MASK | PMX_NFWPRT1_MASK | \ 118262306a36Sopenharmony_ci PMX_NFWPRT2_MASK, \ 118362306a36Sopenharmony_ci .val = PMX_MCIFALL_1_MASK | PMX_NFWPRT1_MASK | \ 118462306a36Sopenharmony_ci PMX_NFWPRT2_MASK, \ 118562306a36Sopenharmony_ci }, { \ 118662306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, \ 118762306a36Sopenharmony_ci .mask = PMX_MCIFALL_2_MASK, \ 118862306a36Sopenharmony_ci .val = PMX_MCIFALL_2_MASK, \ 118962306a36Sopenharmony_ci } 119062306a36Sopenharmony_ci 119162306a36Sopenharmony_ci/* sdhci device */ 119262306a36Sopenharmony_cistatic struct spear_muxreg sdhci_muxreg[] = { 119362306a36Sopenharmony_ci MCIF_MUXREG, 119462306a36Sopenharmony_ci { 119562306a36Sopenharmony_ci .reg = PERIP_CFG, 119662306a36Sopenharmony_ci .mask = MCIF_SEL_MASK, 119762306a36Sopenharmony_ci .val = MCIF_SEL_SD, 119862306a36Sopenharmony_ci }, 119962306a36Sopenharmony_ci}; 120062306a36Sopenharmony_ci 120162306a36Sopenharmony_cistatic struct spear_modemux sdhci_modemux[] = { 120262306a36Sopenharmony_ci { 120362306a36Sopenharmony_ci .muxregs = sdhci_muxreg, 120462306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(sdhci_muxreg), 120562306a36Sopenharmony_ci }, 120662306a36Sopenharmony_ci}; 120762306a36Sopenharmony_ci 120862306a36Sopenharmony_cistatic struct spear_pingroup sdhci_pingroup = { 120962306a36Sopenharmony_ci .name = "sdhci_grp", 121062306a36Sopenharmony_ci .pins = mcif_pins, 121162306a36Sopenharmony_ci .npins = ARRAY_SIZE(mcif_pins), 121262306a36Sopenharmony_ci .modemuxs = sdhci_modemux, 121362306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(sdhci_modemux), 121462306a36Sopenharmony_ci}; 121562306a36Sopenharmony_ci 121662306a36Sopenharmony_cistatic const char *const sdhci_grps[] = { "sdhci_grp" }; 121762306a36Sopenharmony_cistatic struct spear_function sdhci_function = { 121862306a36Sopenharmony_ci .name = "sdhci", 121962306a36Sopenharmony_ci .groups = sdhci_grps, 122062306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(sdhci_grps), 122162306a36Sopenharmony_ci}; 122262306a36Sopenharmony_ci 122362306a36Sopenharmony_ci/* cf device */ 122462306a36Sopenharmony_cistatic struct spear_muxreg cf_muxreg[] = { 122562306a36Sopenharmony_ci MCIF_MUXREG, 122662306a36Sopenharmony_ci { 122762306a36Sopenharmony_ci .reg = PERIP_CFG, 122862306a36Sopenharmony_ci .mask = MCIF_SEL_MASK, 122962306a36Sopenharmony_ci .val = MCIF_SEL_CF, 123062306a36Sopenharmony_ci }, 123162306a36Sopenharmony_ci}; 123262306a36Sopenharmony_ci 123362306a36Sopenharmony_cistatic struct spear_modemux cf_modemux[] = { 123462306a36Sopenharmony_ci { 123562306a36Sopenharmony_ci .muxregs = cf_muxreg, 123662306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(cf_muxreg), 123762306a36Sopenharmony_ci }, 123862306a36Sopenharmony_ci}; 123962306a36Sopenharmony_ci 124062306a36Sopenharmony_cistatic struct spear_pingroup cf_pingroup = { 124162306a36Sopenharmony_ci .name = "cf_grp", 124262306a36Sopenharmony_ci .pins = mcif_pins, 124362306a36Sopenharmony_ci .npins = ARRAY_SIZE(mcif_pins), 124462306a36Sopenharmony_ci .modemuxs = cf_modemux, 124562306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(cf_modemux), 124662306a36Sopenharmony_ci}; 124762306a36Sopenharmony_ci 124862306a36Sopenharmony_cistatic const char *const cf_grps[] = { "cf_grp" }; 124962306a36Sopenharmony_cistatic struct spear_function cf_function = { 125062306a36Sopenharmony_ci .name = "cf", 125162306a36Sopenharmony_ci .groups = cf_grps, 125262306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(cf_grps), 125362306a36Sopenharmony_ci}; 125462306a36Sopenharmony_ci 125562306a36Sopenharmony_ci/* xd device */ 125662306a36Sopenharmony_cistatic struct spear_muxreg xd_muxreg[] = { 125762306a36Sopenharmony_ci MCIF_MUXREG, 125862306a36Sopenharmony_ci { 125962306a36Sopenharmony_ci .reg = PERIP_CFG, 126062306a36Sopenharmony_ci .mask = MCIF_SEL_MASK, 126162306a36Sopenharmony_ci .val = MCIF_SEL_XD, 126262306a36Sopenharmony_ci }, 126362306a36Sopenharmony_ci}; 126462306a36Sopenharmony_ci 126562306a36Sopenharmony_cistatic struct spear_modemux xd_modemux[] = { 126662306a36Sopenharmony_ci { 126762306a36Sopenharmony_ci .muxregs = xd_muxreg, 126862306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(xd_muxreg), 126962306a36Sopenharmony_ci }, 127062306a36Sopenharmony_ci}; 127162306a36Sopenharmony_ci 127262306a36Sopenharmony_cistatic struct spear_pingroup xd_pingroup = { 127362306a36Sopenharmony_ci .name = "xd_grp", 127462306a36Sopenharmony_ci .pins = mcif_pins, 127562306a36Sopenharmony_ci .npins = ARRAY_SIZE(mcif_pins), 127662306a36Sopenharmony_ci .modemuxs = xd_modemux, 127762306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(xd_modemux), 127862306a36Sopenharmony_ci}; 127962306a36Sopenharmony_ci 128062306a36Sopenharmony_cistatic const char *const xd_grps[] = { "xd_grp" }; 128162306a36Sopenharmony_cistatic struct spear_function xd_function = { 128262306a36Sopenharmony_ci .name = "xd", 128362306a36Sopenharmony_ci .groups = xd_grps, 128462306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(xd_grps), 128562306a36Sopenharmony_ci}; 128662306a36Sopenharmony_ci 128762306a36Sopenharmony_ci/* Pad multiplexing for touch_xy device */ 128862306a36Sopenharmony_cistatic const unsigned touch_xy_pins[] = { 97 }; 128962306a36Sopenharmony_cistatic struct spear_muxreg touch_xy_muxreg[] = { 129062306a36Sopenharmony_ci { 129162306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 129262306a36Sopenharmony_ci .mask = PMX_TOUCH_XY_MASK, 129362306a36Sopenharmony_ci .val = PMX_TOUCH_XY_MASK, 129462306a36Sopenharmony_ci }, { 129562306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 129662306a36Sopenharmony_ci .mask = PMX_TOUCH_XY_MASK, 129762306a36Sopenharmony_ci .val = PMX_TOUCH_XY_MASK, 129862306a36Sopenharmony_ci }, 129962306a36Sopenharmony_ci}; 130062306a36Sopenharmony_ci 130162306a36Sopenharmony_cistatic struct spear_modemux touch_xy_modemux[] = { 130262306a36Sopenharmony_ci { 130362306a36Sopenharmony_ci .muxregs = touch_xy_muxreg, 130462306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(touch_xy_muxreg), 130562306a36Sopenharmony_ci }, 130662306a36Sopenharmony_ci}; 130762306a36Sopenharmony_ci 130862306a36Sopenharmony_cistatic struct spear_pingroup touch_xy_pingroup = { 130962306a36Sopenharmony_ci .name = "touch_xy_grp", 131062306a36Sopenharmony_ci .pins = touch_xy_pins, 131162306a36Sopenharmony_ci .npins = ARRAY_SIZE(touch_xy_pins), 131262306a36Sopenharmony_ci .modemuxs = touch_xy_modemux, 131362306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(touch_xy_modemux), 131462306a36Sopenharmony_ci}; 131562306a36Sopenharmony_ci 131662306a36Sopenharmony_cistatic const char *const touch_xy_grps[] = { "touch_xy_grp" }; 131762306a36Sopenharmony_cistatic struct spear_function touch_xy_function = { 131862306a36Sopenharmony_ci .name = "touchscreen", 131962306a36Sopenharmony_ci .groups = touch_xy_grps, 132062306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(touch_xy_grps), 132162306a36Sopenharmony_ci}; 132262306a36Sopenharmony_ci 132362306a36Sopenharmony_ci/* Pad multiplexing for uart1 device */ 132462306a36Sopenharmony_ci/* Muxed with I2C */ 132562306a36Sopenharmony_cistatic const unsigned uart1_dis_i2c_pins[] = { 102, 103 }; 132662306a36Sopenharmony_cistatic struct spear_muxreg uart1_dis_i2c_muxreg[] = { 132762306a36Sopenharmony_ci { 132862306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 132962306a36Sopenharmony_ci .mask = PMX_I2C0_MASK, 133062306a36Sopenharmony_ci .val = 0, 133162306a36Sopenharmony_ci }, { 133262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 133362306a36Sopenharmony_ci .mask = PMX_I2C0_MASK, 133462306a36Sopenharmony_ci .val = PMX_I2C0_MASK, 133562306a36Sopenharmony_ci }, 133662306a36Sopenharmony_ci}; 133762306a36Sopenharmony_ci 133862306a36Sopenharmony_cistatic struct spear_modemux uart1_dis_i2c_modemux[] = { 133962306a36Sopenharmony_ci { 134062306a36Sopenharmony_ci .muxregs = uart1_dis_i2c_muxreg, 134162306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart1_dis_i2c_muxreg), 134262306a36Sopenharmony_ci }, 134362306a36Sopenharmony_ci}; 134462306a36Sopenharmony_ci 134562306a36Sopenharmony_cistatic struct spear_pingroup uart_1_dis_i2c_pingroup = { 134662306a36Sopenharmony_ci .name = "uart1_disable_i2c_grp", 134762306a36Sopenharmony_ci .pins = uart1_dis_i2c_pins, 134862306a36Sopenharmony_ci .npins = ARRAY_SIZE(uart1_dis_i2c_pins), 134962306a36Sopenharmony_ci .modemuxs = uart1_dis_i2c_modemux, 135062306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart1_dis_i2c_modemux), 135162306a36Sopenharmony_ci}; 135262306a36Sopenharmony_ci 135362306a36Sopenharmony_ci/* Muxed with SD/MMC */ 135462306a36Sopenharmony_cistatic const unsigned uart1_dis_sd_pins[] = { 214, 215 }; 135562306a36Sopenharmony_cistatic struct spear_muxreg uart1_dis_sd_muxreg[] = { 135662306a36Sopenharmony_ci { 135762306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 135862306a36Sopenharmony_ci .mask = PMX_MCIDATA1_MASK | 135962306a36Sopenharmony_ci PMX_MCIDATA2_MASK, 136062306a36Sopenharmony_ci .val = 0, 136162306a36Sopenharmony_ci }, { 136262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 136362306a36Sopenharmony_ci .mask = PMX_MCIDATA1_MASK | 136462306a36Sopenharmony_ci PMX_MCIDATA2_MASK, 136562306a36Sopenharmony_ci .val = PMX_MCIDATA1_MASK | 136662306a36Sopenharmony_ci PMX_MCIDATA2_MASK, 136762306a36Sopenharmony_ci }, 136862306a36Sopenharmony_ci}; 136962306a36Sopenharmony_ci 137062306a36Sopenharmony_cistatic struct spear_modemux uart1_dis_sd_modemux[] = { 137162306a36Sopenharmony_ci { 137262306a36Sopenharmony_ci .muxregs = uart1_dis_sd_muxreg, 137362306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart1_dis_sd_muxreg), 137462306a36Sopenharmony_ci }, 137562306a36Sopenharmony_ci}; 137662306a36Sopenharmony_ci 137762306a36Sopenharmony_cistatic struct spear_pingroup uart_1_dis_sd_pingroup = { 137862306a36Sopenharmony_ci .name = "uart1_disable_sd_grp", 137962306a36Sopenharmony_ci .pins = uart1_dis_sd_pins, 138062306a36Sopenharmony_ci .npins = ARRAY_SIZE(uart1_dis_sd_pins), 138162306a36Sopenharmony_ci .modemuxs = uart1_dis_sd_modemux, 138262306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart1_dis_sd_modemux), 138362306a36Sopenharmony_ci}; 138462306a36Sopenharmony_ci 138562306a36Sopenharmony_cistatic const char *const uart1_grps[] = { "uart1_disable_i2c_grp", 138662306a36Sopenharmony_ci "uart1_disable_sd_grp" }; 138762306a36Sopenharmony_cistatic struct spear_function uart1_function = { 138862306a36Sopenharmony_ci .name = "uart1", 138962306a36Sopenharmony_ci .groups = uart1_grps, 139062306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(uart1_grps), 139162306a36Sopenharmony_ci}; 139262306a36Sopenharmony_ci 139362306a36Sopenharmony_ci/* Pad multiplexing for uart2_3 device */ 139462306a36Sopenharmony_cistatic const unsigned uart2_3_pins[] = { 104, 105, 106, 107 }; 139562306a36Sopenharmony_cistatic struct spear_muxreg uart2_3_muxreg[] = { 139662306a36Sopenharmony_ci { 139762306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 139862306a36Sopenharmony_ci .mask = PMX_I2S0_MASK, 139962306a36Sopenharmony_ci .val = 0, 140062306a36Sopenharmony_ci }, { 140162306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 140262306a36Sopenharmony_ci .mask = PMX_I2S0_MASK, 140362306a36Sopenharmony_ci .val = PMX_I2S0_MASK, 140462306a36Sopenharmony_ci }, 140562306a36Sopenharmony_ci}; 140662306a36Sopenharmony_ci 140762306a36Sopenharmony_cistatic struct spear_modemux uart2_3_modemux[] = { 140862306a36Sopenharmony_ci { 140962306a36Sopenharmony_ci .muxregs = uart2_3_muxreg, 141062306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart2_3_muxreg), 141162306a36Sopenharmony_ci }, 141262306a36Sopenharmony_ci}; 141362306a36Sopenharmony_ci 141462306a36Sopenharmony_cistatic struct spear_pingroup uart_2_3_pingroup = { 141562306a36Sopenharmony_ci .name = "uart2_3_grp", 141662306a36Sopenharmony_ci .pins = uart2_3_pins, 141762306a36Sopenharmony_ci .npins = ARRAY_SIZE(uart2_3_pins), 141862306a36Sopenharmony_ci .modemuxs = uart2_3_modemux, 141962306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart2_3_modemux), 142062306a36Sopenharmony_ci}; 142162306a36Sopenharmony_ci 142262306a36Sopenharmony_cistatic const char *const uart2_3_grps[] = { "uart2_3_grp" }; 142362306a36Sopenharmony_cistatic struct spear_function uart2_3_function = { 142462306a36Sopenharmony_ci .name = "uart2_3", 142562306a36Sopenharmony_ci .groups = uart2_3_grps, 142662306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(uart2_3_grps), 142762306a36Sopenharmony_ci}; 142862306a36Sopenharmony_ci 142962306a36Sopenharmony_ci/* Pad multiplexing for uart4 device */ 143062306a36Sopenharmony_cistatic const unsigned uart4_pins[] = { 108, 113 }; 143162306a36Sopenharmony_cistatic struct spear_muxreg uart4_muxreg[] = { 143262306a36Sopenharmony_ci { 143362306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 143462306a36Sopenharmony_ci .mask = PMX_I2S0_MASK | PMX_CLCD1_MASK, 143562306a36Sopenharmony_ci .val = 0, 143662306a36Sopenharmony_ci }, { 143762306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 143862306a36Sopenharmony_ci .mask = PMX_I2S0_MASK | PMX_CLCD1_MASK, 143962306a36Sopenharmony_ci .val = PMX_I2S0_MASK | PMX_CLCD1_MASK, 144062306a36Sopenharmony_ci }, 144162306a36Sopenharmony_ci}; 144262306a36Sopenharmony_ci 144362306a36Sopenharmony_cistatic struct spear_modemux uart4_modemux[] = { 144462306a36Sopenharmony_ci { 144562306a36Sopenharmony_ci .muxregs = uart4_muxreg, 144662306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart4_muxreg), 144762306a36Sopenharmony_ci }, 144862306a36Sopenharmony_ci}; 144962306a36Sopenharmony_ci 145062306a36Sopenharmony_cistatic struct spear_pingroup uart_4_pingroup = { 145162306a36Sopenharmony_ci .name = "uart4_grp", 145262306a36Sopenharmony_ci .pins = uart4_pins, 145362306a36Sopenharmony_ci .npins = ARRAY_SIZE(uart4_pins), 145462306a36Sopenharmony_ci .modemuxs = uart4_modemux, 145562306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart4_modemux), 145662306a36Sopenharmony_ci}; 145762306a36Sopenharmony_ci 145862306a36Sopenharmony_cistatic const char *const uart4_grps[] = { "uart4_grp" }; 145962306a36Sopenharmony_cistatic struct spear_function uart4_function = { 146062306a36Sopenharmony_ci .name = "uart4", 146162306a36Sopenharmony_ci .groups = uart4_grps, 146262306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(uart4_grps), 146362306a36Sopenharmony_ci}; 146462306a36Sopenharmony_ci 146562306a36Sopenharmony_ci/* Pad multiplexing for uart5 device */ 146662306a36Sopenharmony_cistatic const unsigned uart5_pins[] = { 114, 115 }; 146762306a36Sopenharmony_cistatic struct spear_muxreg uart5_muxreg[] = { 146862306a36Sopenharmony_ci { 146962306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 147062306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK, 147162306a36Sopenharmony_ci .val = 0, 147262306a36Sopenharmony_ci }, { 147362306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 147462306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK, 147562306a36Sopenharmony_ci .val = PMX_CLCD1_MASK, 147662306a36Sopenharmony_ci }, 147762306a36Sopenharmony_ci}; 147862306a36Sopenharmony_ci 147962306a36Sopenharmony_cistatic struct spear_modemux uart5_modemux[] = { 148062306a36Sopenharmony_ci { 148162306a36Sopenharmony_ci .muxregs = uart5_muxreg, 148262306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(uart5_muxreg), 148362306a36Sopenharmony_ci }, 148462306a36Sopenharmony_ci}; 148562306a36Sopenharmony_ci 148662306a36Sopenharmony_cistatic struct spear_pingroup uart_5_pingroup = { 148762306a36Sopenharmony_ci .name = "uart5_grp", 148862306a36Sopenharmony_ci .pins = uart5_pins, 148962306a36Sopenharmony_ci .npins = ARRAY_SIZE(uart5_pins), 149062306a36Sopenharmony_ci .modemuxs = uart5_modemux, 149162306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(uart5_modemux), 149262306a36Sopenharmony_ci}; 149362306a36Sopenharmony_ci 149462306a36Sopenharmony_cistatic const char *const uart5_grps[] = { "uart5_grp" }; 149562306a36Sopenharmony_cistatic struct spear_function uart5_function = { 149662306a36Sopenharmony_ci .name = "uart5", 149762306a36Sopenharmony_ci .groups = uart5_grps, 149862306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(uart5_grps), 149962306a36Sopenharmony_ci}; 150062306a36Sopenharmony_ci 150162306a36Sopenharmony_ci/* Pad multiplexing for rs485_0_1_tdm_0_1 device */ 150262306a36Sopenharmony_cistatic const unsigned rs485_0_1_tdm_0_1_pins[] = { 116, 117, 118, 119, 120, 121, 150362306a36Sopenharmony_ci 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 150462306a36Sopenharmony_ci 136, 137 }; 150562306a36Sopenharmony_cistatic struct spear_muxreg rs485_0_1_tdm_0_1_muxreg[] = { 150662306a36Sopenharmony_ci { 150762306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 150862306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK, 150962306a36Sopenharmony_ci .val = 0, 151062306a36Sopenharmony_ci }, { 151162306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 151262306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK, 151362306a36Sopenharmony_ci .val = PMX_CLCD1_MASK, 151462306a36Sopenharmony_ci }, 151562306a36Sopenharmony_ci}; 151662306a36Sopenharmony_ci 151762306a36Sopenharmony_cistatic struct spear_modemux rs485_0_1_tdm_0_1_modemux[] = { 151862306a36Sopenharmony_ci { 151962306a36Sopenharmony_ci .muxregs = rs485_0_1_tdm_0_1_muxreg, 152062306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(rs485_0_1_tdm_0_1_muxreg), 152162306a36Sopenharmony_ci }, 152262306a36Sopenharmony_ci}; 152362306a36Sopenharmony_ci 152462306a36Sopenharmony_cistatic struct spear_pingroup rs485_0_1_tdm_0_1_pingroup = { 152562306a36Sopenharmony_ci .name = "rs485_0_1_tdm_0_1_grp", 152662306a36Sopenharmony_ci .pins = rs485_0_1_tdm_0_1_pins, 152762306a36Sopenharmony_ci .npins = ARRAY_SIZE(rs485_0_1_tdm_0_1_pins), 152862306a36Sopenharmony_ci .modemuxs = rs485_0_1_tdm_0_1_modemux, 152962306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(rs485_0_1_tdm_0_1_modemux), 153062306a36Sopenharmony_ci}; 153162306a36Sopenharmony_ci 153262306a36Sopenharmony_cistatic const char *const rs485_0_1_tdm_0_1_grps[] = { "rs485_0_1_tdm_0_1_grp" }; 153362306a36Sopenharmony_cistatic struct spear_function rs485_0_1_tdm_0_1_function = { 153462306a36Sopenharmony_ci .name = "rs485_0_1_tdm_0_1", 153562306a36Sopenharmony_ci .groups = rs485_0_1_tdm_0_1_grps, 153662306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(rs485_0_1_tdm_0_1_grps), 153762306a36Sopenharmony_ci}; 153862306a36Sopenharmony_ci 153962306a36Sopenharmony_ci/* Pad multiplexing for i2c_1_2 device */ 154062306a36Sopenharmony_cistatic const unsigned i2c_1_2_pins[] = { 138, 139, 140, 141 }; 154162306a36Sopenharmony_cistatic struct spear_muxreg i2c_1_2_muxreg[] = { 154262306a36Sopenharmony_ci { 154362306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 154462306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK, 154562306a36Sopenharmony_ci .val = 0, 154662306a36Sopenharmony_ci }, { 154762306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 154862306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK, 154962306a36Sopenharmony_ci .val = PMX_CLCD1_MASK, 155062306a36Sopenharmony_ci }, 155162306a36Sopenharmony_ci}; 155262306a36Sopenharmony_ci 155362306a36Sopenharmony_cistatic struct spear_modemux i2c_1_2_modemux[] = { 155462306a36Sopenharmony_ci { 155562306a36Sopenharmony_ci .muxregs = i2c_1_2_muxreg, 155662306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c_1_2_muxreg), 155762306a36Sopenharmony_ci }, 155862306a36Sopenharmony_ci}; 155962306a36Sopenharmony_ci 156062306a36Sopenharmony_cistatic struct spear_pingroup i2c_1_2_pingroup = { 156162306a36Sopenharmony_ci .name = "i2c_1_2_grp", 156262306a36Sopenharmony_ci .pins = i2c_1_2_pins, 156362306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c_1_2_pins), 156462306a36Sopenharmony_ci .modemuxs = i2c_1_2_modemux, 156562306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c_1_2_modemux), 156662306a36Sopenharmony_ci}; 156762306a36Sopenharmony_ci 156862306a36Sopenharmony_cistatic const char *const i2c_1_2_grps[] = { "i2c_1_2_grp" }; 156962306a36Sopenharmony_cistatic struct spear_function i2c_1_2_function = { 157062306a36Sopenharmony_ci .name = "i2c_1_2", 157162306a36Sopenharmony_ci .groups = i2c_1_2_grps, 157262306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c_1_2_grps), 157362306a36Sopenharmony_ci}; 157462306a36Sopenharmony_ci 157562306a36Sopenharmony_ci/* Pad multiplexing for i2c3_dis_smi_clcd device */ 157662306a36Sopenharmony_ci/* Muxed with SMI & CLCD */ 157762306a36Sopenharmony_cistatic const unsigned i2c3_dis_smi_clcd_pins[] = { 142, 153 }; 157862306a36Sopenharmony_cistatic struct spear_muxreg i2c3_dis_smi_clcd_muxreg[] = { 157962306a36Sopenharmony_ci { 158062306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 158162306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK | PMX_SMI_MASK, 158262306a36Sopenharmony_ci .val = 0, 158362306a36Sopenharmony_ci }, { 158462306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 158562306a36Sopenharmony_ci .mask = PMX_CLCD1_MASK | PMX_SMI_MASK, 158662306a36Sopenharmony_ci .val = PMX_CLCD1_MASK | PMX_SMI_MASK, 158762306a36Sopenharmony_ci }, 158862306a36Sopenharmony_ci}; 158962306a36Sopenharmony_ci 159062306a36Sopenharmony_cistatic struct spear_modemux i2c3_dis_smi_clcd_modemux[] = { 159162306a36Sopenharmony_ci { 159262306a36Sopenharmony_ci .muxregs = i2c3_dis_smi_clcd_muxreg, 159362306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c3_dis_smi_clcd_muxreg), 159462306a36Sopenharmony_ci }, 159562306a36Sopenharmony_ci}; 159662306a36Sopenharmony_ci 159762306a36Sopenharmony_cistatic struct spear_pingroup i2c3_dis_smi_clcd_pingroup = { 159862306a36Sopenharmony_ci .name = "i2c3_dis_smi_clcd_grp", 159962306a36Sopenharmony_ci .pins = i2c3_dis_smi_clcd_pins, 160062306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c3_dis_smi_clcd_pins), 160162306a36Sopenharmony_ci .modemuxs = i2c3_dis_smi_clcd_modemux, 160262306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c3_dis_smi_clcd_modemux), 160362306a36Sopenharmony_ci}; 160462306a36Sopenharmony_ci 160562306a36Sopenharmony_ci/* Pad multiplexing for i2c3_dis_sd_i2s0 device */ 160662306a36Sopenharmony_ci/* Muxed with SD/MMC & I2S1 */ 160762306a36Sopenharmony_cistatic const unsigned i2c3_dis_sd_i2s0_pins[] = { 0, 216 }; 160862306a36Sopenharmony_cistatic struct spear_muxreg i2c3_dis_sd_i2s0_muxreg[] = { 160962306a36Sopenharmony_ci { 161062306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 161162306a36Sopenharmony_ci .mask = PMX_I2S1_MASK | PMX_MCIDATA3_MASK, 161262306a36Sopenharmony_ci .val = 0, 161362306a36Sopenharmony_ci }, { 161462306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 161562306a36Sopenharmony_ci .mask = PMX_I2S1_MASK | PMX_MCIDATA3_MASK, 161662306a36Sopenharmony_ci .val = PMX_I2S1_MASK | PMX_MCIDATA3_MASK, 161762306a36Sopenharmony_ci }, 161862306a36Sopenharmony_ci}; 161962306a36Sopenharmony_ci 162062306a36Sopenharmony_cistatic struct spear_modemux i2c3_dis_sd_i2s0_modemux[] = { 162162306a36Sopenharmony_ci { 162262306a36Sopenharmony_ci .muxregs = i2c3_dis_sd_i2s0_muxreg, 162362306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c3_dis_sd_i2s0_muxreg), 162462306a36Sopenharmony_ci }, 162562306a36Sopenharmony_ci}; 162662306a36Sopenharmony_ci 162762306a36Sopenharmony_cistatic struct spear_pingroup i2c3_dis_sd_i2s0_pingroup = { 162862306a36Sopenharmony_ci .name = "i2c3_dis_sd_i2s0_grp", 162962306a36Sopenharmony_ci .pins = i2c3_dis_sd_i2s0_pins, 163062306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c3_dis_sd_i2s0_pins), 163162306a36Sopenharmony_ci .modemuxs = i2c3_dis_sd_i2s0_modemux, 163262306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c3_dis_sd_i2s0_modemux), 163362306a36Sopenharmony_ci}; 163462306a36Sopenharmony_ci 163562306a36Sopenharmony_cistatic const char *const i2c3_grps[] = { "i2c3_dis_smi_clcd_grp", 163662306a36Sopenharmony_ci "i2c3_dis_sd_i2s0_grp" }; 163762306a36Sopenharmony_cistatic struct spear_function i2c3_unction = { 163862306a36Sopenharmony_ci .name = "i2c3_i2s1", 163962306a36Sopenharmony_ci .groups = i2c3_grps, 164062306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c3_grps), 164162306a36Sopenharmony_ci}; 164262306a36Sopenharmony_ci 164362306a36Sopenharmony_ci/* Pad multiplexing for i2c_4_5_dis_smi device */ 164462306a36Sopenharmony_ci/* Muxed with SMI */ 164562306a36Sopenharmony_cistatic const unsigned i2c_4_5_dis_smi_pins[] = { 154, 155, 156, 157 }; 164662306a36Sopenharmony_cistatic struct spear_muxreg i2c_4_5_dis_smi_muxreg[] = { 164762306a36Sopenharmony_ci { 164862306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 164962306a36Sopenharmony_ci .mask = PMX_SMI_MASK, 165062306a36Sopenharmony_ci .val = 0, 165162306a36Sopenharmony_ci }, { 165262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 165362306a36Sopenharmony_ci .mask = PMX_SMI_MASK, 165462306a36Sopenharmony_ci .val = PMX_SMI_MASK, 165562306a36Sopenharmony_ci }, 165662306a36Sopenharmony_ci}; 165762306a36Sopenharmony_ci 165862306a36Sopenharmony_cistatic struct spear_modemux i2c_4_5_dis_smi_modemux[] = { 165962306a36Sopenharmony_ci { 166062306a36Sopenharmony_ci .muxregs = i2c_4_5_dis_smi_muxreg, 166162306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c_4_5_dis_smi_muxreg), 166262306a36Sopenharmony_ci }, 166362306a36Sopenharmony_ci}; 166462306a36Sopenharmony_ci 166562306a36Sopenharmony_cistatic struct spear_pingroup i2c_4_5_dis_smi_pingroup = { 166662306a36Sopenharmony_ci .name = "i2c_4_5_dis_smi_grp", 166762306a36Sopenharmony_ci .pins = i2c_4_5_dis_smi_pins, 166862306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c_4_5_dis_smi_pins), 166962306a36Sopenharmony_ci .modemuxs = i2c_4_5_dis_smi_modemux, 167062306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c_4_5_dis_smi_modemux), 167162306a36Sopenharmony_ci}; 167262306a36Sopenharmony_ci 167362306a36Sopenharmony_ci/* Pad multiplexing for i2c4_dis_sd device */ 167462306a36Sopenharmony_ci/* Muxed with SD/MMC */ 167562306a36Sopenharmony_cistatic const unsigned i2c4_dis_sd_pins[] = { 217, 218 }; 167662306a36Sopenharmony_cistatic struct spear_muxreg i2c4_dis_sd_muxreg[] = { 167762306a36Sopenharmony_ci { 167862306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 167962306a36Sopenharmony_ci .mask = PMX_MCIDATA4_MASK, 168062306a36Sopenharmony_ci .val = 0, 168162306a36Sopenharmony_ci }, { 168262306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 168362306a36Sopenharmony_ci .mask = PMX_MCIDATA5_MASK, 168462306a36Sopenharmony_ci .val = 0, 168562306a36Sopenharmony_ci }, { 168662306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 168762306a36Sopenharmony_ci .mask = PMX_MCIDATA4_MASK, 168862306a36Sopenharmony_ci .val = PMX_MCIDATA4_MASK, 168962306a36Sopenharmony_ci }, { 169062306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 169162306a36Sopenharmony_ci .mask = PMX_MCIDATA5_MASK, 169262306a36Sopenharmony_ci .val = PMX_MCIDATA5_MASK, 169362306a36Sopenharmony_ci }, 169462306a36Sopenharmony_ci}; 169562306a36Sopenharmony_ci 169662306a36Sopenharmony_cistatic struct spear_modemux i2c4_dis_sd_modemux[] = { 169762306a36Sopenharmony_ci { 169862306a36Sopenharmony_ci .muxregs = i2c4_dis_sd_muxreg, 169962306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c4_dis_sd_muxreg), 170062306a36Sopenharmony_ci }, 170162306a36Sopenharmony_ci}; 170262306a36Sopenharmony_ci 170362306a36Sopenharmony_cistatic struct spear_pingroup i2c4_dis_sd_pingroup = { 170462306a36Sopenharmony_ci .name = "i2c4_dis_sd_grp", 170562306a36Sopenharmony_ci .pins = i2c4_dis_sd_pins, 170662306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c4_dis_sd_pins), 170762306a36Sopenharmony_ci .modemuxs = i2c4_dis_sd_modemux, 170862306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c4_dis_sd_modemux), 170962306a36Sopenharmony_ci}; 171062306a36Sopenharmony_ci 171162306a36Sopenharmony_ci/* Pad multiplexing for i2c5_dis_sd device */ 171262306a36Sopenharmony_ci/* Muxed with SD/MMC */ 171362306a36Sopenharmony_cistatic const unsigned i2c5_dis_sd_pins[] = { 219, 220 }; 171462306a36Sopenharmony_cistatic struct spear_muxreg i2c5_dis_sd_muxreg[] = { 171562306a36Sopenharmony_ci { 171662306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 171762306a36Sopenharmony_ci .mask = PMX_MCIDATA6_MASK | 171862306a36Sopenharmony_ci PMX_MCIDATA7_MASK, 171962306a36Sopenharmony_ci .val = 0, 172062306a36Sopenharmony_ci }, { 172162306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 172262306a36Sopenharmony_ci .mask = PMX_MCIDATA6_MASK | 172362306a36Sopenharmony_ci PMX_MCIDATA7_MASK, 172462306a36Sopenharmony_ci .val = PMX_MCIDATA6_MASK | 172562306a36Sopenharmony_ci PMX_MCIDATA7_MASK, 172662306a36Sopenharmony_ci }, 172762306a36Sopenharmony_ci}; 172862306a36Sopenharmony_ci 172962306a36Sopenharmony_cistatic struct spear_modemux i2c5_dis_sd_modemux[] = { 173062306a36Sopenharmony_ci { 173162306a36Sopenharmony_ci .muxregs = i2c5_dis_sd_muxreg, 173262306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c5_dis_sd_muxreg), 173362306a36Sopenharmony_ci }, 173462306a36Sopenharmony_ci}; 173562306a36Sopenharmony_ci 173662306a36Sopenharmony_cistatic struct spear_pingroup i2c5_dis_sd_pingroup = { 173762306a36Sopenharmony_ci .name = "i2c5_dis_sd_grp", 173862306a36Sopenharmony_ci .pins = i2c5_dis_sd_pins, 173962306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c5_dis_sd_pins), 174062306a36Sopenharmony_ci .modemuxs = i2c5_dis_sd_modemux, 174162306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c5_dis_sd_modemux), 174262306a36Sopenharmony_ci}; 174362306a36Sopenharmony_ci 174462306a36Sopenharmony_cistatic const char *const i2c_4_5_grps[] = { "i2c5_dis_sd_grp", 174562306a36Sopenharmony_ci "i2c4_dis_sd_grp", "i2c_4_5_dis_smi_grp" }; 174662306a36Sopenharmony_cistatic struct spear_function i2c_4_5_function = { 174762306a36Sopenharmony_ci .name = "i2c_4_5", 174862306a36Sopenharmony_ci .groups = i2c_4_5_grps, 174962306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c_4_5_grps), 175062306a36Sopenharmony_ci}; 175162306a36Sopenharmony_ci 175262306a36Sopenharmony_ci/* Pad multiplexing for i2c_6_7_dis_kbd device */ 175362306a36Sopenharmony_ci/* Muxed with KBD */ 175462306a36Sopenharmony_cistatic const unsigned i2c_6_7_dis_kbd_pins[] = { 207, 208, 209, 210 }; 175562306a36Sopenharmony_cistatic struct spear_muxreg i2c_6_7_dis_kbd_muxreg[] = { 175662306a36Sopenharmony_ci { 175762306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 175862306a36Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK, 175962306a36Sopenharmony_ci .val = 0, 176062306a36Sopenharmony_ci }, { 176162306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 176262306a36Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK, 176362306a36Sopenharmony_ci .val = PMX_KBD_ROWCOL25_MASK, 176462306a36Sopenharmony_ci }, 176562306a36Sopenharmony_ci}; 176662306a36Sopenharmony_ci 176762306a36Sopenharmony_cistatic struct spear_modemux i2c_6_7_dis_kbd_modemux[] = { 176862306a36Sopenharmony_ci { 176962306a36Sopenharmony_ci .muxregs = i2c_6_7_dis_kbd_muxreg, 177062306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c_6_7_dis_kbd_muxreg), 177162306a36Sopenharmony_ci }, 177262306a36Sopenharmony_ci}; 177362306a36Sopenharmony_ci 177462306a36Sopenharmony_cistatic struct spear_pingroup i2c_6_7_dis_kbd_pingroup = { 177562306a36Sopenharmony_ci .name = "i2c_6_7_dis_kbd_grp", 177662306a36Sopenharmony_ci .pins = i2c_6_7_dis_kbd_pins, 177762306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c_6_7_dis_kbd_pins), 177862306a36Sopenharmony_ci .modemuxs = i2c_6_7_dis_kbd_modemux, 177962306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c_6_7_dis_kbd_modemux), 178062306a36Sopenharmony_ci}; 178162306a36Sopenharmony_ci 178262306a36Sopenharmony_ci/* Pad multiplexing for i2c6_dis_sd device */ 178362306a36Sopenharmony_ci/* Muxed with SD/MMC */ 178462306a36Sopenharmony_cistatic const unsigned i2c6_dis_sd_pins[] = { 236, 237 }; 178562306a36Sopenharmony_cistatic struct spear_muxreg i2c6_dis_sd_muxreg[] = { 178662306a36Sopenharmony_ci { 178762306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 178862306a36Sopenharmony_ci .mask = PMX_MCIIORDRE_MASK | 178962306a36Sopenharmony_ci PMX_MCIIOWRWE_MASK, 179062306a36Sopenharmony_ci .val = 0, 179162306a36Sopenharmony_ci }, { 179262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 179362306a36Sopenharmony_ci .mask = PMX_MCIIORDRE_MASK | 179462306a36Sopenharmony_ci PMX_MCIIOWRWE_MASK, 179562306a36Sopenharmony_ci .val = PMX_MCIIORDRE_MASK | 179662306a36Sopenharmony_ci PMX_MCIIOWRWE_MASK, 179762306a36Sopenharmony_ci }, 179862306a36Sopenharmony_ci}; 179962306a36Sopenharmony_ci 180062306a36Sopenharmony_cistatic struct spear_modemux i2c6_dis_sd_modemux[] = { 180162306a36Sopenharmony_ci { 180262306a36Sopenharmony_ci .muxregs = i2c6_dis_sd_muxreg, 180362306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c6_dis_sd_muxreg), 180462306a36Sopenharmony_ci }, 180562306a36Sopenharmony_ci}; 180662306a36Sopenharmony_ci 180762306a36Sopenharmony_cistatic struct spear_pingroup i2c6_dis_sd_pingroup = { 180862306a36Sopenharmony_ci .name = "i2c6_dis_sd_grp", 180962306a36Sopenharmony_ci .pins = i2c6_dis_sd_pins, 181062306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c6_dis_sd_pins), 181162306a36Sopenharmony_ci .modemuxs = i2c6_dis_sd_modemux, 181262306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c6_dis_sd_modemux), 181362306a36Sopenharmony_ci}; 181462306a36Sopenharmony_ci 181562306a36Sopenharmony_ci/* Pad multiplexing for i2c7_dis_sd device */ 181662306a36Sopenharmony_cistatic const unsigned i2c7_dis_sd_pins[] = { 238, 239 }; 181762306a36Sopenharmony_cistatic struct spear_muxreg i2c7_dis_sd_muxreg[] = { 181862306a36Sopenharmony_ci { 181962306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 182062306a36Sopenharmony_ci .mask = PMX_MCIRESETCF_MASK | 182162306a36Sopenharmony_ci PMX_MCICS0CE_MASK, 182262306a36Sopenharmony_ci .val = 0, 182362306a36Sopenharmony_ci }, { 182462306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 182562306a36Sopenharmony_ci .mask = PMX_MCIRESETCF_MASK | 182662306a36Sopenharmony_ci PMX_MCICS0CE_MASK, 182762306a36Sopenharmony_ci .val = PMX_MCIRESETCF_MASK | 182862306a36Sopenharmony_ci PMX_MCICS0CE_MASK, 182962306a36Sopenharmony_ci }, 183062306a36Sopenharmony_ci}; 183162306a36Sopenharmony_ci 183262306a36Sopenharmony_cistatic struct spear_modemux i2c7_dis_sd_modemux[] = { 183362306a36Sopenharmony_ci { 183462306a36Sopenharmony_ci .muxregs = i2c7_dis_sd_muxreg, 183562306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(i2c7_dis_sd_muxreg), 183662306a36Sopenharmony_ci }, 183762306a36Sopenharmony_ci}; 183862306a36Sopenharmony_ci 183962306a36Sopenharmony_cistatic struct spear_pingroup i2c7_dis_sd_pingroup = { 184062306a36Sopenharmony_ci .name = "i2c7_dis_sd_grp", 184162306a36Sopenharmony_ci .pins = i2c7_dis_sd_pins, 184262306a36Sopenharmony_ci .npins = ARRAY_SIZE(i2c7_dis_sd_pins), 184362306a36Sopenharmony_ci .modemuxs = i2c7_dis_sd_modemux, 184462306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(i2c7_dis_sd_modemux), 184562306a36Sopenharmony_ci}; 184662306a36Sopenharmony_ci 184762306a36Sopenharmony_cistatic const char *const i2c_6_7_grps[] = { "i2c6_dis_sd_grp", 184862306a36Sopenharmony_ci "i2c7_dis_sd_grp", "i2c_6_7_dis_kbd_grp" }; 184962306a36Sopenharmony_cistatic struct spear_function i2c_6_7_function = { 185062306a36Sopenharmony_ci .name = "i2c_6_7", 185162306a36Sopenharmony_ci .groups = i2c_6_7_grps, 185262306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(i2c_6_7_grps), 185362306a36Sopenharmony_ci}; 185462306a36Sopenharmony_ci 185562306a36Sopenharmony_ci/* Pad multiplexing for can0_dis_nor device */ 185662306a36Sopenharmony_ci/* Muxed with NOR */ 185762306a36Sopenharmony_cistatic const unsigned can0_dis_nor_pins[] = { 56, 57 }; 185862306a36Sopenharmony_cistatic struct spear_muxreg can0_dis_nor_muxreg[] = { 185962306a36Sopenharmony_ci { 186062306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 186162306a36Sopenharmony_ci .mask = PMX_NFRSTPWDWN2_MASK, 186262306a36Sopenharmony_ci .val = 0, 186362306a36Sopenharmony_ci }, { 186462306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 186562306a36Sopenharmony_ci .mask = PMX_NFRSTPWDWN3_MASK, 186662306a36Sopenharmony_ci .val = 0, 186762306a36Sopenharmony_ci }, { 186862306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 186962306a36Sopenharmony_ci .mask = PMX_NFRSTPWDWN2_MASK, 187062306a36Sopenharmony_ci .val = PMX_NFRSTPWDWN2_MASK, 187162306a36Sopenharmony_ci }, { 187262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 187362306a36Sopenharmony_ci .mask = PMX_NFRSTPWDWN3_MASK, 187462306a36Sopenharmony_ci .val = PMX_NFRSTPWDWN3_MASK, 187562306a36Sopenharmony_ci }, 187662306a36Sopenharmony_ci}; 187762306a36Sopenharmony_ci 187862306a36Sopenharmony_cistatic struct spear_modemux can0_dis_nor_modemux[] = { 187962306a36Sopenharmony_ci { 188062306a36Sopenharmony_ci .muxregs = can0_dis_nor_muxreg, 188162306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(can0_dis_nor_muxreg), 188262306a36Sopenharmony_ci }, 188362306a36Sopenharmony_ci}; 188462306a36Sopenharmony_ci 188562306a36Sopenharmony_cistatic struct spear_pingroup can0_dis_nor_pingroup = { 188662306a36Sopenharmony_ci .name = "can0_dis_nor_grp", 188762306a36Sopenharmony_ci .pins = can0_dis_nor_pins, 188862306a36Sopenharmony_ci .npins = ARRAY_SIZE(can0_dis_nor_pins), 188962306a36Sopenharmony_ci .modemuxs = can0_dis_nor_modemux, 189062306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(can0_dis_nor_modemux), 189162306a36Sopenharmony_ci}; 189262306a36Sopenharmony_ci 189362306a36Sopenharmony_ci/* Pad multiplexing for can0_dis_sd device */ 189462306a36Sopenharmony_ci/* Muxed with SD/MMC */ 189562306a36Sopenharmony_cistatic const unsigned can0_dis_sd_pins[] = { 240, 241 }; 189662306a36Sopenharmony_cistatic struct spear_muxreg can0_dis_sd_muxreg[] = { 189762306a36Sopenharmony_ci { 189862306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 189962306a36Sopenharmony_ci .mask = PMX_MCICFINTR_MASK | PMX_MCIIORDY_MASK, 190062306a36Sopenharmony_ci .val = 0, 190162306a36Sopenharmony_ci }, { 190262306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 190362306a36Sopenharmony_ci .mask = PMX_MCICFINTR_MASK | PMX_MCIIORDY_MASK, 190462306a36Sopenharmony_ci .val = PMX_MCICFINTR_MASK | PMX_MCIIORDY_MASK, 190562306a36Sopenharmony_ci }, 190662306a36Sopenharmony_ci}; 190762306a36Sopenharmony_ci 190862306a36Sopenharmony_cistatic struct spear_modemux can0_dis_sd_modemux[] = { 190962306a36Sopenharmony_ci { 191062306a36Sopenharmony_ci .muxregs = can0_dis_sd_muxreg, 191162306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(can0_dis_sd_muxreg), 191262306a36Sopenharmony_ci }, 191362306a36Sopenharmony_ci}; 191462306a36Sopenharmony_ci 191562306a36Sopenharmony_cistatic struct spear_pingroup can0_dis_sd_pingroup = { 191662306a36Sopenharmony_ci .name = "can0_dis_sd_grp", 191762306a36Sopenharmony_ci .pins = can0_dis_sd_pins, 191862306a36Sopenharmony_ci .npins = ARRAY_SIZE(can0_dis_sd_pins), 191962306a36Sopenharmony_ci .modemuxs = can0_dis_sd_modemux, 192062306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(can0_dis_sd_modemux), 192162306a36Sopenharmony_ci}; 192262306a36Sopenharmony_ci 192362306a36Sopenharmony_cistatic const char *const can0_grps[] = { "can0_dis_nor_grp", "can0_dis_sd_grp" 192462306a36Sopenharmony_ci}; 192562306a36Sopenharmony_cistatic struct spear_function can0_function = { 192662306a36Sopenharmony_ci .name = "can0", 192762306a36Sopenharmony_ci .groups = can0_grps, 192862306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(can0_grps), 192962306a36Sopenharmony_ci}; 193062306a36Sopenharmony_ci 193162306a36Sopenharmony_ci/* Pad multiplexing for can1_dis_sd device */ 193262306a36Sopenharmony_ci/* Muxed with SD/MMC */ 193362306a36Sopenharmony_cistatic const unsigned can1_dis_sd_pins[] = { 242, 243 }; 193462306a36Sopenharmony_cistatic struct spear_muxreg can1_dis_sd_muxreg[] = { 193562306a36Sopenharmony_ci { 193662306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 193762306a36Sopenharmony_ci .mask = PMX_MCICS1_MASK | PMX_MCIDMAACK_MASK, 193862306a36Sopenharmony_ci .val = 0, 193962306a36Sopenharmony_ci }, { 194062306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 194162306a36Sopenharmony_ci .mask = PMX_MCICS1_MASK | PMX_MCIDMAACK_MASK, 194262306a36Sopenharmony_ci .val = PMX_MCICS1_MASK | PMX_MCIDMAACK_MASK, 194362306a36Sopenharmony_ci }, 194462306a36Sopenharmony_ci}; 194562306a36Sopenharmony_ci 194662306a36Sopenharmony_cistatic struct spear_modemux can1_dis_sd_modemux[] = { 194762306a36Sopenharmony_ci { 194862306a36Sopenharmony_ci .muxregs = can1_dis_sd_muxreg, 194962306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(can1_dis_sd_muxreg), 195062306a36Sopenharmony_ci }, 195162306a36Sopenharmony_ci}; 195262306a36Sopenharmony_ci 195362306a36Sopenharmony_cistatic struct spear_pingroup can1_dis_sd_pingroup = { 195462306a36Sopenharmony_ci .name = "can1_dis_sd_grp", 195562306a36Sopenharmony_ci .pins = can1_dis_sd_pins, 195662306a36Sopenharmony_ci .npins = ARRAY_SIZE(can1_dis_sd_pins), 195762306a36Sopenharmony_ci .modemuxs = can1_dis_sd_modemux, 195862306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(can1_dis_sd_modemux), 195962306a36Sopenharmony_ci}; 196062306a36Sopenharmony_ci 196162306a36Sopenharmony_ci/* Pad multiplexing for can1_dis_kbd device */ 196262306a36Sopenharmony_ci/* Muxed with KBD */ 196362306a36Sopenharmony_cistatic const unsigned can1_dis_kbd_pins[] = { 201, 202 }; 196462306a36Sopenharmony_cistatic struct spear_muxreg can1_dis_kbd_muxreg[] = { 196562306a36Sopenharmony_ci { 196662306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 196762306a36Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK, 196862306a36Sopenharmony_ci .val = 0, 196962306a36Sopenharmony_ci }, { 197062306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 197162306a36Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK, 197262306a36Sopenharmony_ci .val = PMX_KBD_ROWCOL25_MASK, 197362306a36Sopenharmony_ci }, 197462306a36Sopenharmony_ci}; 197562306a36Sopenharmony_ci 197662306a36Sopenharmony_cistatic struct spear_modemux can1_dis_kbd_modemux[] = { 197762306a36Sopenharmony_ci { 197862306a36Sopenharmony_ci .muxregs = can1_dis_kbd_muxreg, 197962306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(can1_dis_kbd_muxreg), 198062306a36Sopenharmony_ci }, 198162306a36Sopenharmony_ci}; 198262306a36Sopenharmony_ci 198362306a36Sopenharmony_cistatic struct spear_pingroup can1_dis_kbd_pingroup = { 198462306a36Sopenharmony_ci .name = "can1_dis_kbd_grp", 198562306a36Sopenharmony_ci .pins = can1_dis_kbd_pins, 198662306a36Sopenharmony_ci .npins = ARRAY_SIZE(can1_dis_kbd_pins), 198762306a36Sopenharmony_ci .modemuxs = can1_dis_kbd_modemux, 198862306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(can1_dis_kbd_modemux), 198962306a36Sopenharmony_ci}; 199062306a36Sopenharmony_ci 199162306a36Sopenharmony_cistatic const char *const can1_grps[] = { "can1_dis_sd_grp", "can1_dis_kbd_grp" 199262306a36Sopenharmony_ci}; 199362306a36Sopenharmony_cistatic struct spear_function can1_function = { 199462306a36Sopenharmony_ci .name = "can1", 199562306a36Sopenharmony_ci .groups = can1_grps, 199662306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(can1_grps), 199762306a36Sopenharmony_ci}; 199862306a36Sopenharmony_ci 199962306a36Sopenharmony_ci/* Pad multiplexing for (ras-ip) pci device */ 200062306a36Sopenharmony_cistatic const unsigned pci_pins[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 18, 200162306a36Sopenharmony_ci 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 200262306a36Sopenharmony_ci 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 200362306a36Sopenharmony_ci 55, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 }; 200462306a36Sopenharmony_ci 200562306a36Sopenharmony_cistatic struct spear_muxreg pci_muxreg[] = { 200662306a36Sopenharmony_ci { 200762306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_0, 200862306a36Sopenharmony_ci .mask = PMX_MCI_DATA8_15_MASK, 200962306a36Sopenharmony_ci .val = 0, 201062306a36Sopenharmony_ci }, { 201162306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 201262306a36Sopenharmony_ci .mask = PMX_PCI_REG1_MASK, 201362306a36Sopenharmony_ci .val = 0, 201462306a36Sopenharmony_ci }, { 201562306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 201662306a36Sopenharmony_ci .mask = PMX_PCI_REG2_MASK, 201762306a36Sopenharmony_ci .val = 0, 201862306a36Sopenharmony_ci }, { 201962306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_0, 202062306a36Sopenharmony_ci .mask = PMX_MCI_DATA8_15_MASK, 202162306a36Sopenharmony_ci .val = PMX_MCI_DATA8_15_MASK, 202262306a36Sopenharmony_ci }, { 202362306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 202462306a36Sopenharmony_ci .mask = PMX_PCI_REG1_MASK, 202562306a36Sopenharmony_ci .val = PMX_PCI_REG1_MASK, 202662306a36Sopenharmony_ci }, { 202762306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 202862306a36Sopenharmony_ci .mask = PMX_PCI_REG2_MASK, 202962306a36Sopenharmony_ci .val = PMX_PCI_REG2_MASK, 203062306a36Sopenharmony_ci }, 203162306a36Sopenharmony_ci}; 203262306a36Sopenharmony_ci 203362306a36Sopenharmony_cistatic struct spear_modemux pci_modemux[] = { 203462306a36Sopenharmony_ci { 203562306a36Sopenharmony_ci .muxregs = pci_muxreg, 203662306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(pci_muxreg), 203762306a36Sopenharmony_ci }, 203862306a36Sopenharmony_ci}; 203962306a36Sopenharmony_ci 204062306a36Sopenharmony_cistatic struct spear_pingroup pci_pingroup = { 204162306a36Sopenharmony_ci .name = "pci_grp", 204262306a36Sopenharmony_ci .pins = pci_pins, 204362306a36Sopenharmony_ci .npins = ARRAY_SIZE(pci_pins), 204462306a36Sopenharmony_ci .modemuxs = pci_modemux, 204562306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(pci_modemux), 204662306a36Sopenharmony_ci}; 204762306a36Sopenharmony_ci 204862306a36Sopenharmony_cistatic const char *const pci_grps[] = { "pci_grp" }; 204962306a36Sopenharmony_cistatic struct spear_function pci_function = { 205062306a36Sopenharmony_ci .name = "pci", 205162306a36Sopenharmony_ci .groups = pci_grps, 205262306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(pci_grps), 205362306a36Sopenharmony_ci}; 205462306a36Sopenharmony_ci 205562306a36Sopenharmony_ci/* pad multiplexing for (fix-part) pcie0 device */ 205662306a36Sopenharmony_cistatic struct spear_muxreg pcie0_muxreg[] = { 205762306a36Sopenharmony_ci { 205862306a36Sopenharmony_ci .reg = PCIE_SATA_CFG, 205962306a36Sopenharmony_ci .mask = PCIE_CFG_VAL(0), 206062306a36Sopenharmony_ci .val = PCIE_CFG_VAL(0), 206162306a36Sopenharmony_ci }, 206262306a36Sopenharmony_ci}; 206362306a36Sopenharmony_ci 206462306a36Sopenharmony_cistatic struct spear_modemux pcie0_modemux[] = { 206562306a36Sopenharmony_ci { 206662306a36Sopenharmony_ci .muxregs = pcie0_muxreg, 206762306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(pcie0_muxreg), 206862306a36Sopenharmony_ci }, 206962306a36Sopenharmony_ci}; 207062306a36Sopenharmony_ci 207162306a36Sopenharmony_cistatic struct spear_pingroup pcie0_pingroup = { 207262306a36Sopenharmony_ci .name = "pcie0_grp", 207362306a36Sopenharmony_ci .modemuxs = pcie0_modemux, 207462306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(pcie0_modemux), 207562306a36Sopenharmony_ci}; 207662306a36Sopenharmony_ci 207762306a36Sopenharmony_ci/* pad multiplexing for (fix-part) pcie1 device */ 207862306a36Sopenharmony_cistatic struct spear_muxreg pcie1_muxreg[] = { 207962306a36Sopenharmony_ci { 208062306a36Sopenharmony_ci .reg = PCIE_SATA_CFG, 208162306a36Sopenharmony_ci .mask = PCIE_CFG_VAL(1), 208262306a36Sopenharmony_ci .val = PCIE_CFG_VAL(1), 208362306a36Sopenharmony_ci }, 208462306a36Sopenharmony_ci}; 208562306a36Sopenharmony_ci 208662306a36Sopenharmony_cistatic struct spear_modemux pcie1_modemux[] = { 208762306a36Sopenharmony_ci { 208862306a36Sopenharmony_ci .muxregs = pcie1_muxreg, 208962306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(pcie1_muxreg), 209062306a36Sopenharmony_ci }, 209162306a36Sopenharmony_ci}; 209262306a36Sopenharmony_ci 209362306a36Sopenharmony_cistatic struct spear_pingroup pcie1_pingroup = { 209462306a36Sopenharmony_ci .name = "pcie1_grp", 209562306a36Sopenharmony_ci .modemuxs = pcie1_modemux, 209662306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(pcie1_modemux), 209762306a36Sopenharmony_ci}; 209862306a36Sopenharmony_ci 209962306a36Sopenharmony_ci/* pad multiplexing for (fix-part) pcie2 device */ 210062306a36Sopenharmony_cistatic struct spear_muxreg pcie2_muxreg[] = { 210162306a36Sopenharmony_ci { 210262306a36Sopenharmony_ci .reg = PCIE_SATA_CFG, 210362306a36Sopenharmony_ci .mask = PCIE_CFG_VAL(2), 210462306a36Sopenharmony_ci .val = PCIE_CFG_VAL(2), 210562306a36Sopenharmony_ci }, 210662306a36Sopenharmony_ci}; 210762306a36Sopenharmony_ci 210862306a36Sopenharmony_cistatic struct spear_modemux pcie2_modemux[] = { 210962306a36Sopenharmony_ci { 211062306a36Sopenharmony_ci .muxregs = pcie2_muxreg, 211162306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(pcie2_muxreg), 211262306a36Sopenharmony_ci }, 211362306a36Sopenharmony_ci}; 211462306a36Sopenharmony_ci 211562306a36Sopenharmony_cistatic struct spear_pingroup pcie2_pingroup = { 211662306a36Sopenharmony_ci .name = "pcie2_grp", 211762306a36Sopenharmony_ci .modemuxs = pcie2_modemux, 211862306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(pcie2_modemux), 211962306a36Sopenharmony_ci}; 212062306a36Sopenharmony_ci 212162306a36Sopenharmony_cistatic const char *const pcie_grps[] = { "pcie0_grp", "pcie1_grp", "pcie2_grp" 212262306a36Sopenharmony_ci}; 212362306a36Sopenharmony_cistatic struct spear_function pcie_function = { 212462306a36Sopenharmony_ci .name = "pci_express", 212562306a36Sopenharmony_ci .groups = pcie_grps, 212662306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(pcie_grps), 212762306a36Sopenharmony_ci}; 212862306a36Sopenharmony_ci 212962306a36Sopenharmony_ci/* pad multiplexing for sata0 device */ 213062306a36Sopenharmony_cistatic struct spear_muxreg sata0_muxreg[] = { 213162306a36Sopenharmony_ci { 213262306a36Sopenharmony_ci .reg = PCIE_SATA_CFG, 213362306a36Sopenharmony_ci .mask = SATA_CFG_VAL(0), 213462306a36Sopenharmony_ci .val = SATA_CFG_VAL(0), 213562306a36Sopenharmony_ci }, 213662306a36Sopenharmony_ci}; 213762306a36Sopenharmony_ci 213862306a36Sopenharmony_cistatic struct spear_modemux sata0_modemux[] = { 213962306a36Sopenharmony_ci { 214062306a36Sopenharmony_ci .muxregs = sata0_muxreg, 214162306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(sata0_muxreg), 214262306a36Sopenharmony_ci }, 214362306a36Sopenharmony_ci}; 214462306a36Sopenharmony_ci 214562306a36Sopenharmony_cistatic struct spear_pingroup sata0_pingroup = { 214662306a36Sopenharmony_ci .name = "sata0_grp", 214762306a36Sopenharmony_ci .modemuxs = sata0_modemux, 214862306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(sata0_modemux), 214962306a36Sopenharmony_ci}; 215062306a36Sopenharmony_ci 215162306a36Sopenharmony_ci/* pad multiplexing for sata1 device */ 215262306a36Sopenharmony_cistatic struct spear_muxreg sata1_muxreg[] = { 215362306a36Sopenharmony_ci { 215462306a36Sopenharmony_ci .reg = PCIE_SATA_CFG, 215562306a36Sopenharmony_ci .mask = SATA_CFG_VAL(1), 215662306a36Sopenharmony_ci .val = SATA_CFG_VAL(1), 215762306a36Sopenharmony_ci }, 215862306a36Sopenharmony_ci}; 215962306a36Sopenharmony_ci 216062306a36Sopenharmony_cistatic struct spear_modemux sata1_modemux[] = { 216162306a36Sopenharmony_ci { 216262306a36Sopenharmony_ci .muxregs = sata1_muxreg, 216362306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(sata1_muxreg), 216462306a36Sopenharmony_ci }, 216562306a36Sopenharmony_ci}; 216662306a36Sopenharmony_ci 216762306a36Sopenharmony_cistatic struct spear_pingroup sata1_pingroup = { 216862306a36Sopenharmony_ci .name = "sata1_grp", 216962306a36Sopenharmony_ci .modemuxs = sata1_modemux, 217062306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(sata1_modemux), 217162306a36Sopenharmony_ci}; 217262306a36Sopenharmony_ci 217362306a36Sopenharmony_ci/* pad multiplexing for sata2 device */ 217462306a36Sopenharmony_cistatic struct spear_muxreg sata2_muxreg[] = { 217562306a36Sopenharmony_ci { 217662306a36Sopenharmony_ci .reg = PCIE_SATA_CFG, 217762306a36Sopenharmony_ci .mask = SATA_CFG_VAL(2), 217862306a36Sopenharmony_ci .val = SATA_CFG_VAL(2), 217962306a36Sopenharmony_ci }, 218062306a36Sopenharmony_ci}; 218162306a36Sopenharmony_ci 218262306a36Sopenharmony_cistatic struct spear_modemux sata2_modemux[] = { 218362306a36Sopenharmony_ci { 218462306a36Sopenharmony_ci .muxregs = sata2_muxreg, 218562306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(sata2_muxreg), 218662306a36Sopenharmony_ci }, 218762306a36Sopenharmony_ci}; 218862306a36Sopenharmony_ci 218962306a36Sopenharmony_cistatic struct spear_pingroup sata2_pingroup = { 219062306a36Sopenharmony_ci .name = "sata2_grp", 219162306a36Sopenharmony_ci .modemuxs = sata2_modemux, 219262306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(sata2_modemux), 219362306a36Sopenharmony_ci}; 219462306a36Sopenharmony_ci 219562306a36Sopenharmony_cistatic const char *const sata_grps[] = { "sata0_grp", "sata1_grp", "sata2_grp" 219662306a36Sopenharmony_ci}; 219762306a36Sopenharmony_cistatic struct spear_function sata_function = { 219862306a36Sopenharmony_ci .name = "sata", 219962306a36Sopenharmony_ci .groups = sata_grps, 220062306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(sata_grps), 220162306a36Sopenharmony_ci}; 220262306a36Sopenharmony_ci 220362306a36Sopenharmony_ci/* Pad multiplexing for ssp1_dis_kbd device */ 220462306a36Sopenharmony_cistatic const unsigned ssp1_dis_kbd_pins[] = { 203, 204, 205, 206 }; 220562306a36Sopenharmony_cistatic struct spear_muxreg ssp1_dis_kbd_muxreg[] = { 220662306a36Sopenharmony_ci { 220762306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_1, 220862306a36Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK | PMX_KBD_COL1_MASK | 220962306a36Sopenharmony_ci PMX_KBD_COL0_MASK | PMX_NFIO8_15_MASK | PMX_NFCE1_MASK | 221062306a36Sopenharmony_ci PMX_NFCE2_MASK, 221162306a36Sopenharmony_ci .val = 0, 221262306a36Sopenharmony_ci }, { 221362306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_1, 221462306a36Sopenharmony_ci .mask = PMX_KBD_ROWCOL25_MASK | PMX_KBD_COL1_MASK | 221562306a36Sopenharmony_ci PMX_KBD_COL0_MASK | PMX_NFIO8_15_MASK | PMX_NFCE1_MASK | 221662306a36Sopenharmony_ci PMX_NFCE2_MASK, 221762306a36Sopenharmony_ci .val = PMX_KBD_ROWCOL25_MASK | PMX_KBD_COL1_MASK | 221862306a36Sopenharmony_ci PMX_KBD_COL0_MASK | PMX_NFIO8_15_MASK | PMX_NFCE1_MASK | 221962306a36Sopenharmony_ci PMX_NFCE2_MASK, 222062306a36Sopenharmony_ci }, 222162306a36Sopenharmony_ci}; 222262306a36Sopenharmony_ci 222362306a36Sopenharmony_cistatic struct spear_modemux ssp1_dis_kbd_modemux[] = { 222462306a36Sopenharmony_ci { 222562306a36Sopenharmony_ci .muxregs = ssp1_dis_kbd_muxreg, 222662306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp1_dis_kbd_muxreg), 222762306a36Sopenharmony_ci }, 222862306a36Sopenharmony_ci}; 222962306a36Sopenharmony_ci 223062306a36Sopenharmony_cistatic struct spear_pingroup ssp1_dis_kbd_pingroup = { 223162306a36Sopenharmony_ci .name = "ssp1_dis_kbd_grp", 223262306a36Sopenharmony_ci .pins = ssp1_dis_kbd_pins, 223362306a36Sopenharmony_ci .npins = ARRAY_SIZE(ssp1_dis_kbd_pins), 223462306a36Sopenharmony_ci .modemuxs = ssp1_dis_kbd_modemux, 223562306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp1_dis_kbd_modemux), 223662306a36Sopenharmony_ci}; 223762306a36Sopenharmony_ci 223862306a36Sopenharmony_ci/* Pad multiplexing for ssp1_dis_sd device */ 223962306a36Sopenharmony_cistatic const unsigned ssp1_dis_sd_pins[] = { 224, 226, 227, 228 }; 224062306a36Sopenharmony_cistatic struct spear_muxreg ssp1_dis_sd_muxreg[] = { 224162306a36Sopenharmony_ci { 224262306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 224362306a36Sopenharmony_ci .mask = PMX_MCIADDR0ALE_MASK | PMX_MCIADDR2_MASK | 224462306a36Sopenharmony_ci PMX_MCICECF_MASK | PMX_MCICEXD_MASK, 224562306a36Sopenharmony_ci .val = 0, 224662306a36Sopenharmony_ci }, { 224762306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 224862306a36Sopenharmony_ci .mask = PMX_MCIADDR0ALE_MASK | PMX_MCIADDR2_MASK | 224962306a36Sopenharmony_ci PMX_MCICECF_MASK | PMX_MCICEXD_MASK, 225062306a36Sopenharmony_ci .val = PMX_MCIADDR0ALE_MASK | PMX_MCIADDR2_MASK | 225162306a36Sopenharmony_ci PMX_MCICECF_MASK | PMX_MCICEXD_MASK, 225262306a36Sopenharmony_ci }, 225362306a36Sopenharmony_ci}; 225462306a36Sopenharmony_ci 225562306a36Sopenharmony_cistatic struct spear_modemux ssp1_dis_sd_modemux[] = { 225662306a36Sopenharmony_ci { 225762306a36Sopenharmony_ci .muxregs = ssp1_dis_sd_muxreg, 225862306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(ssp1_dis_sd_muxreg), 225962306a36Sopenharmony_ci }, 226062306a36Sopenharmony_ci}; 226162306a36Sopenharmony_ci 226262306a36Sopenharmony_cistatic struct spear_pingroup ssp1_dis_sd_pingroup = { 226362306a36Sopenharmony_ci .name = "ssp1_dis_sd_grp", 226462306a36Sopenharmony_ci .pins = ssp1_dis_sd_pins, 226562306a36Sopenharmony_ci .npins = ARRAY_SIZE(ssp1_dis_sd_pins), 226662306a36Sopenharmony_ci .modemuxs = ssp1_dis_sd_modemux, 226762306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(ssp1_dis_sd_modemux), 226862306a36Sopenharmony_ci}; 226962306a36Sopenharmony_ci 227062306a36Sopenharmony_cistatic const char *const ssp1_grps[] = { "ssp1_dis_kbd_grp", 227162306a36Sopenharmony_ci "ssp1_dis_sd_grp" }; 227262306a36Sopenharmony_cistatic struct spear_function ssp1_function = { 227362306a36Sopenharmony_ci .name = "ssp1", 227462306a36Sopenharmony_ci .groups = ssp1_grps, 227562306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(ssp1_grps), 227662306a36Sopenharmony_ci}; 227762306a36Sopenharmony_ci 227862306a36Sopenharmony_ci/* Pad multiplexing for gpt64 device */ 227962306a36Sopenharmony_cistatic const unsigned gpt64_pins[] = { 230, 231, 232, 245 }; 228062306a36Sopenharmony_cistatic struct spear_muxreg gpt64_muxreg[] = { 228162306a36Sopenharmony_ci { 228262306a36Sopenharmony_ci .reg = PAD_FUNCTION_EN_2, 228362306a36Sopenharmony_ci .mask = PMX_MCICDCF1_MASK | PMX_MCICDCF2_MASK | PMX_MCICDXD_MASK 228462306a36Sopenharmony_ci | PMX_MCILEDS_MASK, 228562306a36Sopenharmony_ci .val = 0, 228662306a36Sopenharmony_ci }, { 228762306a36Sopenharmony_ci .reg = PAD_DIRECTION_SEL_2, 228862306a36Sopenharmony_ci .mask = PMX_MCICDCF1_MASK | PMX_MCICDCF2_MASK | PMX_MCICDXD_MASK 228962306a36Sopenharmony_ci | PMX_MCILEDS_MASK, 229062306a36Sopenharmony_ci .val = PMX_MCICDCF1_MASK | PMX_MCICDCF2_MASK | PMX_MCICDXD_MASK 229162306a36Sopenharmony_ci | PMX_MCILEDS_MASK, 229262306a36Sopenharmony_ci }, 229362306a36Sopenharmony_ci}; 229462306a36Sopenharmony_ci 229562306a36Sopenharmony_cistatic struct spear_modemux gpt64_modemux[] = { 229662306a36Sopenharmony_ci { 229762306a36Sopenharmony_ci .muxregs = gpt64_muxreg, 229862306a36Sopenharmony_ci .nmuxregs = ARRAY_SIZE(gpt64_muxreg), 229962306a36Sopenharmony_ci }, 230062306a36Sopenharmony_ci}; 230162306a36Sopenharmony_ci 230262306a36Sopenharmony_cistatic struct spear_pingroup gpt64_pingroup = { 230362306a36Sopenharmony_ci .name = "gpt64_grp", 230462306a36Sopenharmony_ci .pins = gpt64_pins, 230562306a36Sopenharmony_ci .npins = ARRAY_SIZE(gpt64_pins), 230662306a36Sopenharmony_ci .modemuxs = gpt64_modemux, 230762306a36Sopenharmony_ci .nmodemuxs = ARRAY_SIZE(gpt64_modemux), 230862306a36Sopenharmony_ci}; 230962306a36Sopenharmony_ci 231062306a36Sopenharmony_cistatic const char *const gpt64_grps[] = { "gpt64_grp" }; 231162306a36Sopenharmony_cistatic struct spear_function gpt64_function = { 231262306a36Sopenharmony_ci .name = "gpt64", 231362306a36Sopenharmony_ci .groups = gpt64_grps, 231462306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(gpt64_grps), 231562306a36Sopenharmony_ci}; 231662306a36Sopenharmony_ci 231762306a36Sopenharmony_ci/* pingroups */ 231862306a36Sopenharmony_cistatic struct spear_pingroup *spear1310_pingroups[] = { 231962306a36Sopenharmony_ci &i2c0_pingroup, 232062306a36Sopenharmony_ci &ssp0_pingroup, 232162306a36Sopenharmony_ci &i2s0_pingroup, 232262306a36Sopenharmony_ci &i2s1_pingroup, 232362306a36Sopenharmony_ci &clcd_pingroup, 232462306a36Sopenharmony_ci &clcd_high_res_pingroup, 232562306a36Sopenharmony_ci &arm_gpio_pingroup, 232662306a36Sopenharmony_ci &smi_2_chips_pingroup, 232762306a36Sopenharmony_ci &smi_4_chips_pingroup, 232862306a36Sopenharmony_ci &gmii_pingroup, 232962306a36Sopenharmony_ci &rgmii_pingroup, 233062306a36Sopenharmony_ci &smii_0_1_2_pingroup, 233162306a36Sopenharmony_ci &ras_mii_txclk_pingroup, 233262306a36Sopenharmony_ci &nand_8bit_pingroup, 233362306a36Sopenharmony_ci &nand_16bit_pingroup, 233462306a36Sopenharmony_ci &nand_4_chips_pingroup, 233562306a36Sopenharmony_ci &keyboard_6x6_pingroup, 233662306a36Sopenharmony_ci &keyboard_rowcol6_8_pingroup, 233762306a36Sopenharmony_ci &uart0_pingroup, 233862306a36Sopenharmony_ci &uart0_modem_pingroup, 233962306a36Sopenharmony_ci &gpt0_tmr0_pingroup, 234062306a36Sopenharmony_ci &gpt0_tmr1_pingroup, 234162306a36Sopenharmony_ci &gpt1_tmr0_pingroup, 234262306a36Sopenharmony_ci &gpt1_tmr1_pingroup, 234362306a36Sopenharmony_ci &sdhci_pingroup, 234462306a36Sopenharmony_ci &cf_pingroup, 234562306a36Sopenharmony_ci &xd_pingroup, 234662306a36Sopenharmony_ci &touch_xy_pingroup, 234762306a36Sopenharmony_ci &ssp0_cs0_pingroup, 234862306a36Sopenharmony_ci &ssp0_cs1_2_pingroup, 234962306a36Sopenharmony_ci &uart_1_dis_i2c_pingroup, 235062306a36Sopenharmony_ci &uart_1_dis_sd_pingroup, 235162306a36Sopenharmony_ci &uart_2_3_pingroup, 235262306a36Sopenharmony_ci &uart_4_pingroup, 235362306a36Sopenharmony_ci &uart_5_pingroup, 235462306a36Sopenharmony_ci &rs485_0_1_tdm_0_1_pingroup, 235562306a36Sopenharmony_ci &i2c_1_2_pingroup, 235662306a36Sopenharmony_ci &i2c3_dis_smi_clcd_pingroup, 235762306a36Sopenharmony_ci &i2c3_dis_sd_i2s0_pingroup, 235862306a36Sopenharmony_ci &i2c_4_5_dis_smi_pingroup, 235962306a36Sopenharmony_ci &i2c4_dis_sd_pingroup, 236062306a36Sopenharmony_ci &i2c5_dis_sd_pingroup, 236162306a36Sopenharmony_ci &i2c_6_7_dis_kbd_pingroup, 236262306a36Sopenharmony_ci &i2c6_dis_sd_pingroup, 236362306a36Sopenharmony_ci &i2c7_dis_sd_pingroup, 236462306a36Sopenharmony_ci &can0_dis_nor_pingroup, 236562306a36Sopenharmony_ci &can0_dis_sd_pingroup, 236662306a36Sopenharmony_ci &can1_dis_sd_pingroup, 236762306a36Sopenharmony_ci &can1_dis_kbd_pingroup, 236862306a36Sopenharmony_ci &pci_pingroup, 236962306a36Sopenharmony_ci &pcie0_pingroup, 237062306a36Sopenharmony_ci &pcie1_pingroup, 237162306a36Sopenharmony_ci &pcie2_pingroup, 237262306a36Sopenharmony_ci &sata0_pingroup, 237362306a36Sopenharmony_ci &sata1_pingroup, 237462306a36Sopenharmony_ci &sata2_pingroup, 237562306a36Sopenharmony_ci &ssp1_dis_kbd_pingroup, 237662306a36Sopenharmony_ci &ssp1_dis_sd_pingroup, 237762306a36Sopenharmony_ci &gpt64_pingroup, 237862306a36Sopenharmony_ci}; 237962306a36Sopenharmony_ci 238062306a36Sopenharmony_ci/* functions */ 238162306a36Sopenharmony_cistatic struct spear_function *spear1310_functions[] = { 238262306a36Sopenharmony_ci &i2c0_function, 238362306a36Sopenharmony_ci &ssp0_function, 238462306a36Sopenharmony_ci &i2s0_function, 238562306a36Sopenharmony_ci &i2s1_function, 238662306a36Sopenharmony_ci &clcd_function, 238762306a36Sopenharmony_ci &arm_gpio_function, 238862306a36Sopenharmony_ci &smi_function, 238962306a36Sopenharmony_ci &gmii_function, 239062306a36Sopenharmony_ci &rgmii_function, 239162306a36Sopenharmony_ci &smii_0_1_2_function, 239262306a36Sopenharmony_ci &ras_mii_txclk_function, 239362306a36Sopenharmony_ci &nand_function, 239462306a36Sopenharmony_ci &keyboard_function, 239562306a36Sopenharmony_ci &uart0_function, 239662306a36Sopenharmony_ci &gpt0_function, 239762306a36Sopenharmony_ci &gpt1_function, 239862306a36Sopenharmony_ci &sdhci_function, 239962306a36Sopenharmony_ci &cf_function, 240062306a36Sopenharmony_ci &xd_function, 240162306a36Sopenharmony_ci &touch_xy_function, 240262306a36Sopenharmony_ci &uart1_function, 240362306a36Sopenharmony_ci &uart2_3_function, 240462306a36Sopenharmony_ci &uart4_function, 240562306a36Sopenharmony_ci &uart5_function, 240662306a36Sopenharmony_ci &rs485_0_1_tdm_0_1_function, 240762306a36Sopenharmony_ci &i2c_1_2_function, 240862306a36Sopenharmony_ci &i2c3_unction, 240962306a36Sopenharmony_ci &i2c_4_5_function, 241062306a36Sopenharmony_ci &i2c_6_7_function, 241162306a36Sopenharmony_ci &can0_function, 241262306a36Sopenharmony_ci &can1_function, 241362306a36Sopenharmony_ci &pci_function, 241462306a36Sopenharmony_ci &pcie_function, 241562306a36Sopenharmony_ci &sata_function, 241662306a36Sopenharmony_ci &ssp1_function, 241762306a36Sopenharmony_ci &gpt64_function, 241862306a36Sopenharmony_ci}; 241962306a36Sopenharmony_ci 242062306a36Sopenharmony_cistatic const unsigned pin18[] = { 18, }; 242162306a36Sopenharmony_cistatic const unsigned pin19[] = { 19, }; 242262306a36Sopenharmony_cistatic const unsigned pin20[] = { 20, }; 242362306a36Sopenharmony_cistatic const unsigned pin21[] = { 21, }; 242462306a36Sopenharmony_cistatic const unsigned pin22[] = { 22, }; 242562306a36Sopenharmony_cistatic const unsigned pin23[] = { 23, }; 242662306a36Sopenharmony_cistatic const unsigned pin54[] = { 54, }; 242762306a36Sopenharmony_cistatic const unsigned pin55[] = { 55, }; 242862306a36Sopenharmony_cistatic const unsigned pin56[] = { 56, }; 242962306a36Sopenharmony_cistatic const unsigned pin57[] = { 57, }; 243062306a36Sopenharmony_cistatic const unsigned pin58[] = { 58, }; 243162306a36Sopenharmony_cistatic const unsigned pin59[] = { 59, }; 243262306a36Sopenharmony_cistatic const unsigned pin60[] = { 60, }; 243362306a36Sopenharmony_cistatic const unsigned pin61[] = { 61, }; 243462306a36Sopenharmony_cistatic const unsigned pin62[] = { 62, }; 243562306a36Sopenharmony_cistatic const unsigned pin63[] = { 63, }; 243662306a36Sopenharmony_cistatic const unsigned pin143[] = { 143, }; 243762306a36Sopenharmony_cistatic const unsigned pin144[] = { 144, }; 243862306a36Sopenharmony_cistatic const unsigned pin145[] = { 145, }; 243962306a36Sopenharmony_cistatic const unsigned pin146[] = { 146, }; 244062306a36Sopenharmony_cistatic const unsigned pin147[] = { 147, }; 244162306a36Sopenharmony_cistatic const unsigned pin148[] = { 148, }; 244262306a36Sopenharmony_cistatic const unsigned pin149[] = { 149, }; 244362306a36Sopenharmony_cistatic const unsigned pin150[] = { 150, }; 244462306a36Sopenharmony_cistatic const unsigned pin151[] = { 151, }; 244562306a36Sopenharmony_cistatic const unsigned pin152[] = { 152, }; 244662306a36Sopenharmony_cistatic const unsigned pin205[] = { 205, }; 244762306a36Sopenharmony_cistatic const unsigned pin206[] = { 206, }; 244862306a36Sopenharmony_cistatic const unsigned pin211[] = { 211, }; 244962306a36Sopenharmony_cistatic const unsigned pin212[] = { 212, }; 245062306a36Sopenharmony_cistatic const unsigned pin213[] = { 213, }; 245162306a36Sopenharmony_cistatic const unsigned pin214[] = { 214, }; 245262306a36Sopenharmony_cistatic const unsigned pin215[] = { 215, }; 245362306a36Sopenharmony_cistatic const unsigned pin216[] = { 216, }; 245462306a36Sopenharmony_cistatic const unsigned pin217[] = { 217, }; 245562306a36Sopenharmony_cistatic const unsigned pin218[] = { 218, }; 245662306a36Sopenharmony_cistatic const unsigned pin219[] = { 219, }; 245762306a36Sopenharmony_cistatic const unsigned pin220[] = { 220, }; 245862306a36Sopenharmony_cistatic const unsigned pin221[] = { 221, }; 245962306a36Sopenharmony_cistatic const unsigned pin222[] = { 222, }; 246062306a36Sopenharmony_cistatic const unsigned pin223[] = { 223, }; 246162306a36Sopenharmony_cistatic const unsigned pin224[] = { 224, }; 246262306a36Sopenharmony_cistatic const unsigned pin225[] = { 225, }; 246362306a36Sopenharmony_cistatic const unsigned pin226[] = { 226, }; 246462306a36Sopenharmony_cistatic const unsigned pin227[] = { 227, }; 246562306a36Sopenharmony_cistatic const unsigned pin228[] = { 228, }; 246662306a36Sopenharmony_cistatic const unsigned pin229[] = { 229, }; 246762306a36Sopenharmony_cistatic const unsigned pin230[] = { 230, }; 246862306a36Sopenharmony_cistatic const unsigned pin231[] = { 231, }; 246962306a36Sopenharmony_cistatic const unsigned pin232[] = { 232, }; 247062306a36Sopenharmony_cistatic const unsigned pin233[] = { 233, }; 247162306a36Sopenharmony_cistatic const unsigned pin234[] = { 234, }; 247262306a36Sopenharmony_cistatic const unsigned pin235[] = { 235, }; 247362306a36Sopenharmony_cistatic const unsigned pin236[] = { 236, }; 247462306a36Sopenharmony_cistatic const unsigned pin237[] = { 237, }; 247562306a36Sopenharmony_cistatic const unsigned pin238[] = { 238, }; 247662306a36Sopenharmony_cistatic const unsigned pin239[] = { 239, }; 247762306a36Sopenharmony_cistatic const unsigned pin240[] = { 240, }; 247862306a36Sopenharmony_cistatic const unsigned pin241[] = { 241, }; 247962306a36Sopenharmony_cistatic const unsigned pin242[] = { 242, }; 248062306a36Sopenharmony_cistatic const unsigned pin243[] = { 243, }; 248162306a36Sopenharmony_cistatic const unsigned pin244[] = { 244, }; 248262306a36Sopenharmony_cistatic const unsigned pin245[] = { 245, }; 248362306a36Sopenharmony_ci 248462306a36Sopenharmony_cistatic const unsigned pin_grp0[] = { 173, 174, }; 248562306a36Sopenharmony_cistatic const unsigned pin_grp1[] = { 175, 185, 188, 197, 198, }; 248662306a36Sopenharmony_cistatic const unsigned pin_grp2[] = { 176, 177, 178, 179, 184, 186, 187, 189, 248762306a36Sopenharmony_ci 190, 191, 192, }; 248862306a36Sopenharmony_cistatic const unsigned pin_grp3[] = { 180, 181, 182, 183, 193, 194, 195, 196, }; 248962306a36Sopenharmony_cistatic const unsigned pin_grp4[] = { 199, 200, }; 249062306a36Sopenharmony_cistatic const unsigned pin_grp5[] = { 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 249162306a36Sopenharmony_ci 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, }; 249262306a36Sopenharmony_cistatic const unsigned pin_grp6[] = { 86, 87, 88, 89, 90, 91, 92, 93, }; 249362306a36Sopenharmony_cistatic const unsigned pin_grp7[] = { 98, 99, }; 249462306a36Sopenharmony_cistatic const unsigned pin_grp8[] = { 158, 159, 160, 161, 162, 163, 164, 165, 249562306a36Sopenharmony_ci 166, 167, 168, 169, 170, 171, 172, }; 249662306a36Sopenharmony_ci 249762306a36Sopenharmony_ci/* Define muxreg arrays */ 249862306a36Sopenharmony_ciDEFINE_2_MUXREG(i2c0_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_I2C0_MASK, 0, 1); 249962306a36Sopenharmony_ciDEFINE_2_MUXREG(ssp0_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_SSP0_MASK, 0, 1); 250062306a36Sopenharmony_ciDEFINE_2_MUXREG(ssp0_cs0_pins, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_SSP0_CS0_MASK, 0, 1); 250162306a36Sopenharmony_ciDEFINE_2_MUXREG(ssp0_cs1_2_pins, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_SSP0_CS1_2_MASK, 0, 1); 250262306a36Sopenharmony_ciDEFINE_2_MUXREG(i2s0_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_I2S0_MASK, 0, 1); 250362306a36Sopenharmony_ciDEFINE_2_MUXREG(i2s1_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_I2S1_MASK, 0, 1); 250462306a36Sopenharmony_ciDEFINE_2_MUXREG(clcd_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_CLCD1_MASK, 0, 1); 250562306a36Sopenharmony_ciDEFINE_2_MUXREG(clcd_high_res_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_CLCD2_MASK, 0, 1); 250662306a36Sopenharmony_ciDEFINE_2_MUXREG(pin18, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO15_MASK, 0, 1); 250762306a36Sopenharmony_ciDEFINE_2_MUXREG(pin19, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO14_MASK, 0, 1); 250862306a36Sopenharmony_ciDEFINE_2_MUXREG(pin20, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO13_MASK, 0, 1); 250962306a36Sopenharmony_ciDEFINE_2_MUXREG(pin21, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO12_MASK, 0, 1); 251062306a36Sopenharmony_ciDEFINE_2_MUXREG(pin22, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO11_MASK, 0, 1); 251162306a36Sopenharmony_ciDEFINE_2_MUXREG(pin23, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO10_MASK, 0, 1); 251262306a36Sopenharmony_ciDEFINE_2_MUXREG(pin143, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO00_MASK, 0, 1); 251362306a36Sopenharmony_ciDEFINE_2_MUXREG(pin144, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO01_MASK, 0, 1); 251462306a36Sopenharmony_ciDEFINE_2_MUXREG(pin145, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO02_MASK, 0, 1); 251562306a36Sopenharmony_ciDEFINE_2_MUXREG(pin146, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO03_MASK, 0, 1); 251662306a36Sopenharmony_ciDEFINE_2_MUXREG(pin147, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO04_MASK, 0, 1); 251762306a36Sopenharmony_ciDEFINE_2_MUXREG(pin148, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO05_MASK, 0, 1); 251862306a36Sopenharmony_ciDEFINE_2_MUXREG(pin149, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO06_MASK, 0, 1); 251962306a36Sopenharmony_ciDEFINE_2_MUXREG(pin150, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO07_MASK, 0, 1); 252062306a36Sopenharmony_ciDEFINE_2_MUXREG(pin151, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO08_MASK, 0, 1); 252162306a36Sopenharmony_ciDEFINE_2_MUXREG(pin152, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_EGPIO09_MASK, 0, 1); 252262306a36Sopenharmony_ciDEFINE_2_MUXREG(smi_2_chips_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_SMI_MASK, 0, 1); 252362306a36Sopenharmony_ciDEFINE_2_MUXREG(pin54, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_SMINCS3_MASK, 0, 1); 252462306a36Sopenharmony_ciDEFINE_2_MUXREG(pin55, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_SMINCS2_MASK, 0, 1); 252562306a36Sopenharmony_ciDEFINE_2_MUXREG(pin56, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_NFRSTPWDWN3_MASK, 0, 1); 252662306a36Sopenharmony_ciDEFINE_2_MUXREG(pin57, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFRSTPWDWN2_MASK, 0, 1); 252762306a36Sopenharmony_ciDEFINE_2_MUXREG(pin58, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFRSTPWDWN1_MASK, 0, 1); 252862306a36Sopenharmony_ciDEFINE_2_MUXREG(pin59, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFRSTPWDWN0_MASK, 0, 1); 252962306a36Sopenharmony_ciDEFINE_2_MUXREG(pin60, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFWPRT3_MASK, 0, 1); 253062306a36Sopenharmony_ciDEFINE_2_MUXREG(pin61, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFCE3_MASK, 0, 1); 253162306a36Sopenharmony_ciDEFINE_2_MUXREG(pin62, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFAD25_MASK, 0, 1); 253262306a36Sopenharmony_ciDEFINE_2_MUXREG(pin63, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFAD24_MASK, 0, 1); 253362306a36Sopenharmony_ciDEFINE_2_MUXREG(pin_grp0, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_GMIICLK_MASK, 0, 1); 253462306a36Sopenharmony_ciDEFINE_2_MUXREG(pin_grp1, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK, 0, 1); 253562306a36Sopenharmony_ciDEFINE_2_MUXREG(pin_grp2, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_RXCLK_RDV_TXEN_D03_MASK, 0, 1); 253662306a36Sopenharmony_ciDEFINE_2_MUXREG(pin_grp3, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_GMIID47_MASK, 0, 1); 253762306a36Sopenharmony_ciDEFINE_2_MUXREG(pin_grp4, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_MDC_MDIO_MASK, 0, 1); 253862306a36Sopenharmony_ciDEFINE_2_MUXREG(pin_grp5, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_NFAD23_MASK, 0, 1); 253962306a36Sopenharmony_ciDEFINE_2_MUXREG(pin_grp6, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_MCI_DATA8_15_MASK, 0, 1); 254062306a36Sopenharmony_ciDEFINE_2_MUXREG(pin_grp7, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_NFCE2_MASK, 0, 1); 254162306a36Sopenharmony_ciDEFINE_2_MUXREG(pin_grp8, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_NAND8_MASK, 0, 1); 254262306a36Sopenharmony_ciDEFINE_2_MUXREG(nand_16bit_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_NAND16BIT_1_MASK, 0, 1); 254362306a36Sopenharmony_ciDEFINE_2_MUXREG(pin205, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_COL1_MASK | PMX_NFCE1_MASK, 0, 1); 254462306a36Sopenharmony_ciDEFINE_2_MUXREG(pin206, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_COL0_MASK | PMX_NFCE2_MASK, 0, 1); 254562306a36Sopenharmony_ciDEFINE_2_MUXREG(pin211, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_ROW1_MASK | PMX_NFWPRT1_MASK, 0, 1); 254662306a36Sopenharmony_ciDEFINE_2_MUXREG(pin212, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_ROW0_MASK | PMX_NFWPRT2_MASK, 0, 1); 254762306a36Sopenharmony_ciDEFINE_2_MUXREG(pin213, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA0_MASK, 0, 1); 254862306a36Sopenharmony_ciDEFINE_2_MUXREG(pin214, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA1_MASK, 0, 1); 254962306a36Sopenharmony_ciDEFINE_2_MUXREG(pin215, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA2_MASK, 0, 1); 255062306a36Sopenharmony_ciDEFINE_2_MUXREG(pin216, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA3_MASK, 0, 1); 255162306a36Sopenharmony_ciDEFINE_2_MUXREG(pin217, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_MCIDATA4_MASK, 0, 1); 255262306a36Sopenharmony_ciDEFINE_2_MUXREG(pin218, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA5_MASK, 0, 1); 255362306a36Sopenharmony_ciDEFINE_2_MUXREG(pin219, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA6_MASK, 0, 1); 255462306a36Sopenharmony_ciDEFINE_2_MUXREG(pin220, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA7_MASK, 0, 1); 255562306a36Sopenharmony_ciDEFINE_2_MUXREG(pin221, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA1SD_MASK, 0, 1); 255662306a36Sopenharmony_ciDEFINE_2_MUXREG(pin222, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA2SD_MASK, 0, 1); 255762306a36Sopenharmony_ciDEFINE_2_MUXREG(pin223, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATA3SD_MASK, 0, 1); 255862306a36Sopenharmony_ciDEFINE_2_MUXREG(pin224, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIADDR0ALE_MASK, 0, 1); 255962306a36Sopenharmony_ciDEFINE_2_MUXREG(pin225, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIADDR1CLECLK_MASK, 0, 1); 256062306a36Sopenharmony_ciDEFINE_2_MUXREG(pin226, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIADDR2_MASK, 0, 1); 256162306a36Sopenharmony_ciDEFINE_2_MUXREG(pin227, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICECF_MASK, 0, 1); 256262306a36Sopenharmony_ciDEFINE_2_MUXREG(pin228, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICEXD_MASK, 0, 1); 256362306a36Sopenharmony_ciDEFINE_2_MUXREG(pin229, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICESDMMC_MASK, 0, 1); 256462306a36Sopenharmony_ciDEFINE_2_MUXREG(pin230, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICDCF1_MASK, 0, 1); 256562306a36Sopenharmony_ciDEFINE_2_MUXREG(pin231, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICDCF2_MASK, 0, 1); 256662306a36Sopenharmony_ciDEFINE_2_MUXREG(pin232, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICDXD_MASK, 0, 1); 256762306a36Sopenharmony_ciDEFINE_2_MUXREG(pin233, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICDSDMMC_MASK, 0, 1); 256862306a36Sopenharmony_ciDEFINE_2_MUXREG(pin234, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDATADIR_MASK, 0, 1); 256962306a36Sopenharmony_ciDEFINE_2_MUXREG(pin235, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDMARQWP_MASK, 0, 1); 257062306a36Sopenharmony_ciDEFINE_2_MUXREG(pin236, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIIORDRE_MASK, 0, 1); 257162306a36Sopenharmony_ciDEFINE_2_MUXREG(pin237, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIIOWRWE_MASK, 0, 1); 257262306a36Sopenharmony_ciDEFINE_2_MUXREG(pin238, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIRESETCF_MASK, 0, 1); 257362306a36Sopenharmony_ciDEFINE_2_MUXREG(pin239, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICS0CE_MASK, 0, 1); 257462306a36Sopenharmony_ciDEFINE_2_MUXREG(pin240, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICFINTR_MASK, 0, 1); 257562306a36Sopenharmony_ciDEFINE_2_MUXREG(pin241, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIIORDY_MASK, 0, 1); 257662306a36Sopenharmony_ciDEFINE_2_MUXREG(pin242, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCICS1_MASK, 0, 1); 257762306a36Sopenharmony_ciDEFINE_2_MUXREG(pin243, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCIDMAACK_MASK, 0, 1); 257862306a36Sopenharmony_ciDEFINE_2_MUXREG(pin244, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCISDCMD_MASK, 0, 1); 257962306a36Sopenharmony_ciDEFINE_2_MUXREG(pin245, PAD_FUNCTION_EN_2, PAD_DIRECTION_SEL_2, PMX_MCILEDS_MASK, 0, 1); 258062306a36Sopenharmony_ciDEFINE_2_MUXREG(keyboard_rowcol6_8_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_KBD_ROWCOL68_MASK, 0, 1); 258162306a36Sopenharmony_ciDEFINE_2_MUXREG(uart0_pins, PAD_FUNCTION_EN_0, PAD_DIRECTION_SEL_0, PMX_UART0_MASK, 0, 1); 258262306a36Sopenharmony_ciDEFINE_2_MUXREG(uart0_modem_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_UART0_MODEM_MASK, 0, 1); 258362306a36Sopenharmony_ciDEFINE_2_MUXREG(gpt0_tmr0_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_GPT0_TMR0_MASK, 0, 1); 258462306a36Sopenharmony_ciDEFINE_2_MUXREG(gpt0_tmr1_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_GPT0_TMR1_MASK, 0, 1); 258562306a36Sopenharmony_ciDEFINE_2_MUXREG(gpt1_tmr0_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_GPT1_TMR0_MASK, 0, 1); 258662306a36Sopenharmony_ciDEFINE_2_MUXREG(gpt1_tmr1_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_GPT1_TMR1_MASK, 0, 1); 258762306a36Sopenharmony_ciDEFINE_2_MUXREG(touch_xy_pins, PAD_FUNCTION_EN_1, PAD_DIRECTION_SEL_1, PMX_TOUCH_XY_MASK, 0, 1); 258862306a36Sopenharmony_ci 258962306a36Sopenharmony_cistatic struct spear_gpio_pingroup spear1310_gpio_pingroup[] = { 259062306a36Sopenharmony_ci GPIO_PINGROUP(i2c0_pins), 259162306a36Sopenharmony_ci GPIO_PINGROUP(ssp0_pins), 259262306a36Sopenharmony_ci GPIO_PINGROUP(ssp0_cs0_pins), 259362306a36Sopenharmony_ci GPIO_PINGROUP(ssp0_cs1_2_pins), 259462306a36Sopenharmony_ci GPIO_PINGROUP(i2s0_pins), 259562306a36Sopenharmony_ci GPIO_PINGROUP(i2s1_pins), 259662306a36Sopenharmony_ci GPIO_PINGROUP(clcd_pins), 259762306a36Sopenharmony_ci GPIO_PINGROUP(clcd_high_res_pins), 259862306a36Sopenharmony_ci GPIO_PINGROUP(pin18), 259962306a36Sopenharmony_ci GPIO_PINGROUP(pin19), 260062306a36Sopenharmony_ci GPIO_PINGROUP(pin20), 260162306a36Sopenharmony_ci GPIO_PINGROUP(pin21), 260262306a36Sopenharmony_ci GPIO_PINGROUP(pin22), 260362306a36Sopenharmony_ci GPIO_PINGROUP(pin23), 260462306a36Sopenharmony_ci GPIO_PINGROUP(pin143), 260562306a36Sopenharmony_ci GPIO_PINGROUP(pin144), 260662306a36Sopenharmony_ci GPIO_PINGROUP(pin145), 260762306a36Sopenharmony_ci GPIO_PINGROUP(pin146), 260862306a36Sopenharmony_ci GPIO_PINGROUP(pin147), 260962306a36Sopenharmony_ci GPIO_PINGROUP(pin148), 261062306a36Sopenharmony_ci GPIO_PINGROUP(pin149), 261162306a36Sopenharmony_ci GPIO_PINGROUP(pin150), 261262306a36Sopenharmony_ci GPIO_PINGROUP(pin151), 261362306a36Sopenharmony_ci GPIO_PINGROUP(pin152), 261462306a36Sopenharmony_ci GPIO_PINGROUP(smi_2_chips_pins), 261562306a36Sopenharmony_ci GPIO_PINGROUP(pin54), 261662306a36Sopenharmony_ci GPIO_PINGROUP(pin55), 261762306a36Sopenharmony_ci GPIO_PINGROUP(pin56), 261862306a36Sopenharmony_ci GPIO_PINGROUP(pin57), 261962306a36Sopenharmony_ci GPIO_PINGROUP(pin58), 262062306a36Sopenharmony_ci GPIO_PINGROUP(pin59), 262162306a36Sopenharmony_ci GPIO_PINGROUP(pin60), 262262306a36Sopenharmony_ci GPIO_PINGROUP(pin61), 262362306a36Sopenharmony_ci GPIO_PINGROUP(pin62), 262462306a36Sopenharmony_ci GPIO_PINGROUP(pin63), 262562306a36Sopenharmony_ci GPIO_PINGROUP(pin_grp0), 262662306a36Sopenharmony_ci GPIO_PINGROUP(pin_grp1), 262762306a36Sopenharmony_ci GPIO_PINGROUP(pin_grp2), 262862306a36Sopenharmony_ci GPIO_PINGROUP(pin_grp3), 262962306a36Sopenharmony_ci GPIO_PINGROUP(pin_grp4), 263062306a36Sopenharmony_ci GPIO_PINGROUP(pin_grp5), 263162306a36Sopenharmony_ci GPIO_PINGROUP(pin_grp6), 263262306a36Sopenharmony_ci GPIO_PINGROUP(pin_grp7), 263362306a36Sopenharmony_ci GPIO_PINGROUP(pin_grp8), 263462306a36Sopenharmony_ci GPIO_PINGROUP(nand_16bit_pins), 263562306a36Sopenharmony_ci GPIO_PINGROUP(pin205), 263662306a36Sopenharmony_ci GPIO_PINGROUP(pin206), 263762306a36Sopenharmony_ci GPIO_PINGROUP(pin211), 263862306a36Sopenharmony_ci GPIO_PINGROUP(pin212), 263962306a36Sopenharmony_ci GPIO_PINGROUP(pin213), 264062306a36Sopenharmony_ci GPIO_PINGROUP(pin214), 264162306a36Sopenharmony_ci GPIO_PINGROUP(pin215), 264262306a36Sopenharmony_ci GPIO_PINGROUP(pin216), 264362306a36Sopenharmony_ci GPIO_PINGROUP(pin217), 264462306a36Sopenharmony_ci GPIO_PINGROUP(pin218), 264562306a36Sopenharmony_ci GPIO_PINGROUP(pin219), 264662306a36Sopenharmony_ci GPIO_PINGROUP(pin220), 264762306a36Sopenharmony_ci GPIO_PINGROUP(pin221), 264862306a36Sopenharmony_ci GPIO_PINGROUP(pin222), 264962306a36Sopenharmony_ci GPIO_PINGROUP(pin223), 265062306a36Sopenharmony_ci GPIO_PINGROUP(pin224), 265162306a36Sopenharmony_ci GPIO_PINGROUP(pin225), 265262306a36Sopenharmony_ci GPIO_PINGROUP(pin226), 265362306a36Sopenharmony_ci GPIO_PINGROUP(pin227), 265462306a36Sopenharmony_ci GPIO_PINGROUP(pin228), 265562306a36Sopenharmony_ci GPIO_PINGROUP(pin229), 265662306a36Sopenharmony_ci GPIO_PINGROUP(pin230), 265762306a36Sopenharmony_ci GPIO_PINGROUP(pin231), 265862306a36Sopenharmony_ci GPIO_PINGROUP(pin232), 265962306a36Sopenharmony_ci GPIO_PINGROUP(pin233), 266062306a36Sopenharmony_ci GPIO_PINGROUP(pin234), 266162306a36Sopenharmony_ci GPIO_PINGROUP(pin235), 266262306a36Sopenharmony_ci GPIO_PINGROUP(pin236), 266362306a36Sopenharmony_ci GPIO_PINGROUP(pin237), 266462306a36Sopenharmony_ci GPIO_PINGROUP(pin238), 266562306a36Sopenharmony_ci GPIO_PINGROUP(pin239), 266662306a36Sopenharmony_ci GPIO_PINGROUP(pin240), 266762306a36Sopenharmony_ci GPIO_PINGROUP(pin241), 266862306a36Sopenharmony_ci GPIO_PINGROUP(pin242), 266962306a36Sopenharmony_ci GPIO_PINGROUP(pin243), 267062306a36Sopenharmony_ci GPIO_PINGROUP(pin244), 267162306a36Sopenharmony_ci GPIO_PINGROUP(pin245), 267262306a36Sopenharmony_ci GPIO_PINGROUP(keyboard_rowcol6_8_pins), 267362306a36Sopenharmony_ci GPIO_PINGROUP(uart0_pins), 267462306a36Sopenharmony_ci GPIO_PINGROUP(uart0_modem_pins), 267562306a36Sopenharmony_ci GPIO_PINGROUP(gpt0_tmr0_pins), 267662306a36Sopenharmony_ci GPIO_PINGROUP(gpt0_tmr1_pins), 267762306a36Sopenharmony_ci GPIO_PINGROUP(gpt1_tmr0_pins), 267862306a36Sopenharmony_ci GPIO_PINGROUP(gpt1_tmr1_pins), 267962306a36Sopenharmony_ci GPIO_PINGROUP(touch_xy_pins), 268062306a36Sopenharmony_ci}; 268162306a36Sopenharmony_ci 268262306a36Sopenharmony_cistatic struct spear_pinctrl_machdata spear1310_machdata = { 268362306a36Sopenharmony_ci .pins = spear1310_pins, 268462306a36Sopenharmony_ci .npins = ARRAY_SIZE(spear1310_pins), 268562306a36Sopenharmony_ci .groups = spear1310_pingroups, 268662306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(spear1310_pingroups), 268762306a36Sopenharmony_ci .functions = spear1310_functions, 268862306a36Sopenharmony_ci .nfunctions = ARRAY_SIZE(spear1310_functions), 268962306a36Sopenharmony_ci .gpio_pingroups = spear1310_gpio_pingroup, 269062306a36Sopenharmony_ci .ngpio_pingroups = ARRAY_SIZE(spear1310_gpio_pingroup), 269162306a36Sopenharmony_ci .modes_supported = false, 269262306a36Sopenharmony_ci}; 269362306a36Sopenharmony_ci 269462306a36Sopenharmony_cistatic const struct of_device_id spear1310_pinctrl_of_match[] = { 269562306a36Sopenharmony_ci { 269662306a36Sopenharmony_ci .compatible = "st,spear1310-pinmux", 269762306a36Sopenharmony_ci }, 269862306a36Sopenharmony_ci {}, 269962306a36Sopenharmony_ci}; 270062306a36Sopenharmony_ci 270162306a36Sopenharmony_cistatic int spear1310_pinctrl_probe(struct platform_device *pdev) 270262306a36Sopenharmony_ci{ 270362306a36Sopenharmony_ci return spear_pinctrl_probe(pdev, &spear1310_machdata); 270462306a36Sopenharmony_ci} 270562306a36Sopenharmony_ci 270662306a36Sopenharmony_cistatic struct platform_driver spear1310_pinctrl_driver = { 270762306a36Sopenharmony_ci .driver = { 270862306a36Sopenharmony_ci .name = DRIVER_NAME, 270962306a36Sopenharmony_ci .of_match_table = spear1310_pinctrl_of_match, 271062306a36Sopenharmony_ci }, 271162306a36Sopenharmony_ci .probe = spear1310_pinctrl_probe, 271262306a36Sopenharmony_ci}; 271362306a36Sopenharmony_ci 271462306a36Sopenharmony_cistatic int __init spear1310_pinctrl_init(void) 271562306a36Sopenharmony_ci{ 271662306a36Sopenharmony_ci return platform_driver_register(&spear1310_pinctrl_driver); 271762306a36Sopenharmony_ci} 271862306a36Sopenharmony_ciarch_initcall(spear1310_pinctrl_init); 2719