1*614a54cbSInochi Amaoto // SPDX-License-Identifier: GPL-2.0
2*614a54cbSInochi Amaoto /*
3*614a54cbSInochi Amaoto * Sophgo SG2042 SoC pinctrl driver.
4*614a54cbSInochi Amaoto *
5*614a54cbSInochi Amaoto * Copyright (C) 2024 Inochi Amaoto <inochiama@outlook.com>
6*614a54cbSInochi Amaoto */
7*614a54cbSInochi Amaoto
8*614a54cbSInochi Amaoto #include <linux/module.h>
9*614a54cbSInochi Amaoto #include <linux/platform_device.h>
10*614a54cbSInochi Amaoto #include <linux/of.h>
11*614a54cbSInochi Amaoto
12*614a54cbSInochi Amaoto #include <linux/pinctrl/pinctrl.h>
13*614a54cbSInochi Amaoto #include <linux/pinctrl/pinmux.h>
14*614a54cbSInochi Amaoto
15*614a54cbSInochi Amaoto #include <dt-bindings/pinctrl/pinctrl-sg2044.h>
16*614a54cbSInochi Amaoto
17*614a54cbSInochi Amaoto #include "pinctrl-sg2042.h"
18*614a54cbSInochi Amaoto
sg2044_get_pull_up(const struct sophgo_pin * sp,const u32 * psmap)19*614a54cbSInochi Amaoto static int sg2044_get_pull_up(const struct sophgo_pin *sp, const u32 *psmap)
20*614a54cbSInochi Amaoto {
21*614a54cbSInochi Amaoto return 19500;
22*614a54cbSInochi Amaoto }
23*614a54cbSInochi Amaoto
sg2044_get_pull_down(const struct sophgo_pin * sp,const u32 * psmap)24*614a54cbSInochi Amaoto static int sg2044_get_pull_down(const struct sophgo_pin *sp, const u32 *psmap)
25*614a54cbSInochi Amaoto {
26*614a54cbSInochi Amaoto return 23200;
27*614a54cbSInochi Amaoto }
28*614a54cbSInochi Amaoto
29*614a54cbSInochi Amaoto static const u32 sg2044_oc_map[] = {
30*614a54cbSInochi Amaoto 3200, 6400, 9600, 12700,
31*614a54cbSInochi Amaoto 15900, 19100, 22200, 25300,
32*614a54cbSInochi Amaoto 29500, 32700, 35900, 39000,
33*614a54cbSInochi Amaoto 42000, 45200, 48300, 51400
34*614a54cbSInochi Amaoto };
35*614a54cbSInochi Amaoto
sg2044_get_oc_map(const struct sophgo_pin * sp,const u32 * psmap,const u32 ** map)36*614a54cbSInochi Amaoto static int sg2044_get_oc_map(const struct sophgo_pin *sp, const u32 *psmap,
37*614a54cbSInochi Amaoto const u32 **map)
38*614a54cbSInochi Amaoto {
39*614a54cbSInochi Amaoto *map = sg2044_oc_map;
40*614a54cbSInochi Amaoto return ARRAY_SIZE(sg2044_oc_map);
41*614a54cbSInochi Amaoto }
42*614a54cbSInochi Amaoto
43*614a54cbSInochi Amaoto static const struct sophgo_vddio_cfg_ops sg2044_vddio_cfg_ops = {
44*614a54cbSInochi Amaoto .get_pull_up = sg2044_get_pull_up,
45*614a54cbSInochi Amaoto .get_pull_down = sg2044_get_pull_down,
46*614a54cbSInochi Amaoto .get_oc_map = sg2044_get_oc_map,
47*614a54cbSInochi Amaoto };
48*614a54cbSInochi Amaoto
49*614a54cbSInochi Amaoto static const struct pinctrl_pin_desc sg2044_pins[] = {
50*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC0_SMBSUS_IN, "iic0_smbsus_in"),
51*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC0_SMBSUS_OUT, "iic0_smbsus_out"),
52*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC0_SMBALERT, "iic0_smbalert"),
53*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC1_SMBSUS_IN, "iic1_smbsus_in"),
54*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC1_SMBSUS_OUT, "iic1_smbsus_out"),
55*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC1_SMBALERT, "iic1_smbalert"),
56*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC2_SMBSUS_IN, "iic2_smbsus_in"),
57*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC2_SMBSUS_OUT, "iic2_smbsus_out"),
58*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC2_SMBALERT, "iic2_smbalert"),
59*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC3_SMBSUS_IN, "iic3_smbsus_in"),
60*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC3_SMBSUS_OUT, "iic3_smbsus_out"),
61*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC3_SMBALERT, "iic3_smbalert"),
62*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE0_L0_RESET, "pcie0_l0_reset"),
63*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE0_L1_RESET, "pcie0_l1_reset"),
64*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE0_L0_WAKEUP, "pcie0_l0_wakeup"),
65*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE0_L1_WAKEUP, "pcie0_l1_wakeup"),
66*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE0_L0_CLKREQ_IN, "pcie0_l0_clkreq_in"),
67*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE0_L1_CLKREQ_IN, "pcie0_l1_clkreq_in"),
68*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE1_L0_RESET, "pcie1_l0_reset"),
69*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE1_L1_RESET, "pcie1_l1_reset"),
70*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE1_L0_WAKEUP, "pcie1_l0_wakeup"),
71*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE1_L1_WAKEUP, "pcie1_l1_wakeup"),
72*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE1_L0_CLKREQ_IN, "pcie1_l0_clkreq_in"),
73*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE1_L1_CLKREQ_IN, "pcie1_l1_clkreq_in"),
74*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE2_L0_RESET, "pcie2_l0_reset"),
75*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE2_L1_RESET, "pcie2_l1_reset"),
76*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE2_L0_WAKEUP, "pcie2_l0_wakeup"),
77*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE2_L1_WAKEUP, "pcie2_l1_wakeup"),
78*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE2_L0_CLKREQ_IN, "pcie2_l0_clkreq_in"),
79*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE2_L1_CLKREQ_IN, "pcie2_l1_clkreq_in"),
80*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE3_L0_RESET, "pcie3_l0_reset"),
81*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE3_L1_RESET, "pcie3_l1_reset"),
82*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE3_L0_WAKEUP, "pcie3_l0_wakeup"),
83*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE3_L1_WAKEUP, "pcie3_l1_wakeup"),
84*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE3_L0_CLKREQ_IN, "pcie3_l0_clkreq_in"),
85*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE3_L1_CLKREQ_IN, "pcie3_l1_clkreq_in"),
86*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE4_L0_RESET, "pcie4_l0_reset"),
87*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE4_L1_RESET, "pcie4_l1_reset"),
88*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE4_L0_WAKEUP, "pcie4_l0_wakeup"),
89*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE4_L1_WAKEUP, "pcie4_l1_wakeup"),
90*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE4_L0_CLKREQ_IN, "pcie4_l0_clkreq_in"),
91*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PCIE4_L1_CLKREQ_IN, "pcie4_l1_clkreq_in"),
92*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF0_CLK_SEL1, "spif0_clk_sel1"),
93*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF0_CLK_SEL0, "spif0_clk_sel0"),
94*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF0_WP, "spif0_wp"),
95*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF0_HOLD, "spif0_hold"),
96*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF0_SDI, "spif0_sdi"),
97*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF0_CS, "spif0_cs"),
98*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF0_SCK, "spif0_sck"),
99*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF0_SDO, "spif0_sdo"),
100*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF1_CLK_SEL1, "spif1_clk_sel1"),
101*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF1_CLK_SEL0, "spif1_clk_sel0"),
102*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF1_WP, "spif1_wp"),
103*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF1_HOLD, "spif1_hold"),
104*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF1_SDI, "spif1_sdi"),
105*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF1_CS, "spif1_cs"),
106*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF1_SCK, "spif1_sck"),
107*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPIF1_SDO, "spif1_sdo"),
108*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_EMMC_WP, "emmc_wp"),
109*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_EMMC_CD, "emmc_cd"),
110*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_EMMC_RST, "emmc_rst"),
111*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_EMMC_PWR_EN, "emmc_pwr_en"),
112*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SDIO_CD, "sdio_cd"),
113*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SDIO_WP, "sdio_wp"),
114*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SDIO_RST, "sdio_rst"),
115*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SDIO_PWR_EN, "sdio_pwr_en"),
116*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_TXD0, "rgmii0_txd0"),
117*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_TXD1, "rgmii0_txd1"),
118*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_TXD2, "rgmii0_txd2"),
119*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_TXD3, "rgmii0_txd3"),
120*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_TXCTRL, "rgmii0_txctrl"),
121*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_RXD0, "rgmii0_rxd0"),
122*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_RXD1, "rgmii0_rxd1"),
123*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_RXD2, "rgmii0_rxd2"),
124*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_RXD3, "rgmii0_rxd3"),
125*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_RXCTRL, "rgmii0_rxctrl"),
126*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_TXC, "rgmii0_txc"),
127*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_RXC, "rgmii0_rxc"),
128*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_REFCLKO, "rgmii0_refclko"),
129*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_IRQ, "rgmii0_irq"),
130*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_MDC, "rgmii0_mdc"),
131*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_RGMII0_MDIO, "rgmii0_mdio"),
132*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PWM0, "pwm0"),
133*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PWM1, "pwm1"),
134*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PWM2, "pwm2"),
135*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PWM3, "pwm3"),
136*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_FAN0, "fan0"),
137*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_FAN1, "fan1"),
138*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_FAN2, "fan2"),
139*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_FAN3, "fan3"),
140*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC0_SDA, "iic0_sda"),
141*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC0_SCL, "iic0_scl"),
142*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC1_SDA, "iic1_sda"),
143*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC1_SCL, "iic1_scl"),
144*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC2_SDA, "iic2_sda"),
145*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC2_SCL, "iic2_scl"),
146*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC3_SDA, "iic3_sda"),
147*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_IIC3_SCL, "iic3_scl"),
148*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART0_TX, "uart0_tx"),
149*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART0_RX, "uart0_rx"),
150*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART0_RTS, "uart0_rts"),
151*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART0_CTS, "uart0_cts"),
152*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART1_TX, "uart1_tx"),
153*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART1_RX, "uart1_rx"),
154*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART1_RTS, "uart1_rts"),
155*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART1_CTS, "uart1_cts"),
156*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART2_TX, "uart2_tx"),
157*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART2_RX, "uart2_rx"),
158*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART2_RTS, "uart2_rts"),
159*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART2_CTS, "uart2_cts"),
160*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART3_TX, "uart3_tx"),
161*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART3_RX, "uart3_rx"),
162*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART3_RTS, "uart3_rts"),
163*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_UART3_CTS, "uart3_cts"),
164*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI0_CS0, "spi0_cs0"),
165*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI0_CS1, "spi0_cs1"),
166*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI0_SDI, "spi0_sdi"),
167*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI0_SDO, "spi0_sdo"),
168*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI0_SCK, "spi0_sck"),
169*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI1_CS0, "spi1_cs0"),
170*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI1_CS1, "spi1_cs1"),
171*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI1_SDI, "spi1_sdi"),
172*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI1_SDO, "spi1_sdo"),
173*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SPI1_SCK, "spi1_sck"),
174*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG0_TDO, "jtag0_tdo"),
175*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG0_TCK, "jtag0_tck"),
176*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG0_TDI, "jtag0_tdi"),
177*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG0_TMS, "jtag0_tms"),
178*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG0_TRST, "jtag0_trst"),
179*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG0_SRST, "jtag0_srst"),
180*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG1_TDO, "jtag1_tdo"),
181*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG1_TCK, "jtag1_tck"),
182*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG1_TDI, "jtag1_tdi"),
183*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG1_TMS, "jtag1_tms"),
184*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG1_TRST, "jtag1_trst"),
185*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG1_SRST, "jtag1_srst"),
186*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG2_TDO, "jtag2_tdo"),
187*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG2_TCK, "jtag2_tck"),
188*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG2_TDI, "jtag2_tdi"),
189*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG2_TMS, "jtag2_tms"),
190*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG2_TRST, "jtag2_trst"),
191*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG2_SRST, "jtag2_srst"),
192*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG3_TDO, "jtag3_tdo"),
193*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG3_TCK, "jtag3_tck"),
194*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG3_TDI, "jtag3_tdi"),
195*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG3_TMS, "jtag3_tms"),
196*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG3_TRST, "jtag3_trst"),
197*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_JTAG3_SRST, "jtag3_srst"),
198*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO0, "gpio0"),
199*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO1, "gpio1"),
200*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO2, "gpio2"),
201*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO3, "gpio3"),
202*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO4, "gpio4"),
203*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO5, "gpio5"),
204*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO6, "gpio6"),
205*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO7, "gpio7"),
206*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO8, "gpio8"),
207*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO9, "gpio9"),
208*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO10, "gpio10"),
209*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO11, "gpio11"),
210*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO12, "gpio12"),
211*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO13, "gpio13"),
212*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO14, "gpio14"),
213*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO15, "gpio15"),
214*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO16, "gpio16"),
215*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO17, "gpio17"),
216*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO18, "gpio18"),
217*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO19, "gpio19"),
218*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO20, "gpio20"),
219*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO21, "gpio21"),
220*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO22, "gpio22"),
221*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO23, "gpio23"),
222*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO24, "gpio24"),
223*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO25, "gpio25"),
224*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO26, "gpio26"),
225*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO27, "gpio27"),
226*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO28, "gpio28"),
227*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO29, "gpio29"),
228*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO30, "gpio30"),
229*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_GPIO31, "gpio31"),
230*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_MODE_SEL0, "mode_sel0"),
231*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_MODE_SEL1, "mode_sel1"),
232*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_MODE_SEL2, "mode_sel2"),
233*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_BOOT_SEL0, "boot_sel0"),
234*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_BOOT_SEL1, "boot_sel1"),
235*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_BOOT_SEL2, "boot_sel2"),
236*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_BOOT_SEL3, "boot_sel3"),
237*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_BOOT_SEL4, "boot_sel4"),
238*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_BOOT_SEL5, "boot_sel5"),
239*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_BOOT_SEL6, "boot_sel6"),
240*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_BOOT_SEL7, "boot_sel7"),
241*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_MULTI_SCKT, "multi_sckt"),
242*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SCKT_ID0, "sckt_id0"),
243*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SCKT_ID1, "sckt_id1"),
244*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PLL_CLK_IN_MAIN, "pll_clk_in_main"),
245*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PLL_CLK_IN_DDR_0, "pll_clk_in_ddr_0"),
246*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PLL_CLK_IN_DDR_1, "pll_clk_in_ddr_1"),
247*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PLL_CLK_IN_DDR_2, "pll_clk_in_ddr_2"),
248*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PLL_CLK_IN_DDR_3, "pll_clk_in_ddr_3"),
249*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_XTAL_32K, "xtal_32k"),
250*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_SYS_RST, "sys_rst"),
251*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_PWR_BUTTON, "pwr_button"),
252*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_TEST_EN, "test_en"),
253*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_TEST_MODE_MBIST, "test_mode_mbist"),
254*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_TEST_MODE_SCAN, "test_mode_scan"),
255*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_TEST_MODE_BSD, "test_mode_bsd"),
256*614a54cbSInochi Amaoto PINCTRL_PIN(PIN_BISR_BYP, "bisr_byp"),
257*614a54cbSInochi Amaoto };
258*614a54cbSInochi Amaoto
259*614a54cbSInochi Amaoto static const struct sg2042_pin sg2044_pin_data[ARRAY_SIZE(sg2044_pins)] = {
260*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC0_SMBSUS_IN, 0x000,
261*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
262*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC0_SMBSUS_OUT, 0x000,
263*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
264*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC0_SMBALERT, 0x004,
265*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
266*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC1_SMBSUS_IN, 0x004,
267*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
268*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC1_SMBSUS_OUT, 0x008,
269*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
270*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC1_SMBALERT, 0x008,
271*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
272*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC2_SMBSUS_IN, 0x00c,
273*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
274*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC2_SMBSUS_OUT, 0x00c,
275*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
276*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC2_SMBALERT, 0x010,
277*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
278*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC3_SMBSUS_IN, 0x010,
279*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
280*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC3_SMBSUS_OUT, 0x014,
281*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
282*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC3_SMBALERT, 0x014,
283*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
284*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE0_L0_RESET, 0x018,
285*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
286*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE0_L1_RESET, 0x018,
287*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
288*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE0_L0_WAKEUP, 0x01c,
289*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
290*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE0_L1_WAKEUP, 0x01c,
291*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
292*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE0_L0_CLKREQ_IN, 0x020,
293*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
294*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE0_L1_CLKREQ_IN, 0x020,
295*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
296*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE1_L0_RESET, 0x024,
297*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
298*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE1_L1_RESET, 0x024,
299*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
300*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE1_L0_WAKEUP, 0x028,
301*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
302*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE1_L1_WAKEUP, 0x028,
303*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
304*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE1_L0_CLKREQ_IN, 0x02c,
305*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
306*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE1_L1_CLKREQ_IN, 0x02c,
307*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
308*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE2_L0_RESET, 0x030,
309*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
310*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE2_L1_RESET, 0x030,
311*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
312*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE2_L0_WAKEUP, 0x034,
313*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
314*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE2_L1_WAKEUP, 0x034,
315*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
316*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE2_L0_CLKREQ_IN, 0x038,
317*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
318*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE2_L1_CLKREQ_IN, 0x038,
319*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
320*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE3_L0_RESET, 0x03c,
321*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
322*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE3_L1_RESET, 0x03c,
323*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
324*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE3_L0_WAKEUP, 0x040,
325*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
326*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE3_L1_WAKEUP, 0x040,
327*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
328*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE3_L0_CLKREQ_IN, 0x044,
329*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
330*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE3_L1_CLKREQ_IN, 0x044,
331*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
332*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE4_L0_RESET, 0x048,
333*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
334*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE4_L1_RESET, 0x048,
335*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
336*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE4_L0_WAKEUP, 0x04c,
337*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
338*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE4_L1_WAKEUP, 0x04c,
339*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
340*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE4_L0_CLKREQ_IN, 0x050,
341*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
342*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PCIE4_L1_CLKREQ_IN, 0x050,
343*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
344*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF0_CLK_SEL1, 0x054,
345*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
346*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF0_CLK_SEL0, 0x054,
347*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
348*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF0_WP, 0x058,
349*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
350*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF0_HOLD, 0x058,
351*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
352*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF0_SDI, 0x05c,
353*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
354*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF0_CS, 0x05c,
355*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
356*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF0_SCK, 0x060,
357*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
358*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF0_SDO, 0x060,
359*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
360*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF1_CLK_SEL1, 0x064,
361*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
362*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF1_CLK_SEL0, 0x064,
363*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
364*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF1_WP, 0x068,
365*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
366*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF1_HOLD, 0x068,
367*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
368*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF1_SDI, 0x06c,
369*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
370*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF1_CS, 0x06c,
371*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
372*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF1_SCK, 0x070,
373*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
374*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPIF1_SDO, 0x070,
375*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
376*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_EMMC_WP, 0x074,
377*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
378*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_EMMC_CD, 0x074,
379*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
380*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_EMMC_RST, 0x078,
381*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
382*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_EMMC_PWR_EN, 0x078,
383*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
384*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SDIO_CD, 0x07c,
385*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
386*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SDIO_WP, 0x07c,
387*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
388*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SDIO_RST, 0x080,
389*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
390*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SDIO_PWR_EN, 0x080,
391*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
392*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_TXD0, 0x084,
393*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
394*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_TXD1, 0x084,
395*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
396*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_TXD2, 0x088,
397*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
398*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_TXD3, 0x088,
399*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
400*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_TXCTRL, 0x08c,
401*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
402*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_RXD0, 0x08c,
403*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
404*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_RXD1, 0x090,
405*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
406*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_RXD2, 0x090,
407*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
408*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_RXD3, 0x094,
409*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
410*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_RXCTRL, 0x094,
411*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
412*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_TXC, 0x098,
413*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
414*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_RXC, 0x098,
415*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
416*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_REFCLKO, 0x09c,
417*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
418*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_IRQ, 0x09c,
419*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
420*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_MDC, 0x0a0,
421*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
422*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_RGMII0_MDIO, 0x0a0,
423*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
424*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PWM0, 0x0a4,
425*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
426*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PWM1, 0x0a4,
427*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
428*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PWM2, 0x0a8,
429*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
430*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PWM3, 0x0a8,
431*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
432*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_FAN0, 0x0ac,
433*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
434*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_FAN1, 0x0ac,
435*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
436*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_FAN2, 0x0b0,
437*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
438*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_FAN3, 0x0b0,
439*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
440*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC0_SDA, 0x0b4,
441*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
442*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC0_SCL, 0x0b4,
443*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
444*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC1_SDA, 0x0b8,
445*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
446*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC1_SCL, 0x0b8,
447*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
448*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC2_SDA, 0x0bc,
449*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
450*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC2_SCL, 0x0bc,
451*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
452*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC3_SDA, 0x0c0,
453*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
454*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_IIC3_SCL, 0x0c0,
455*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
456*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART0_TX, 0x0c4,
457*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
458*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART0_RX, 0x0c4,
459*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
460*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART0_RTS, 0x0c8,
461*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
462*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART0_CTS, 0x0c8,
463*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
464*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART1_TX, 0x0cc,
465*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
466*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART1_RX, 0x0cc,
467*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
468*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART1_RTS, 0x0d0,
469*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
470*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART1_CTS, 0x0d0,
471*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
472*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART2_TX, 0x0d4,
473*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
474*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART2_RX, 0x0d4,
475*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
476*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART2_RTS, 0x0d8,
477*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
478*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART2_CTS, 0x0d8,
479*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
480*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART3_TX, 0x0dc,
481*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
482*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART3_RX, 0x0dc,
483*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
484*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART3_RTS, 0x0e0,
485*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
486*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_UART3_CTS, 0x0e0,
487*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
488*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI0_CS0, 0x0e4,
489*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
490*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI0_CS1, 0x0e4,
491*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
492*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI0_SDI, 0x0e8,
493*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
494*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI0_SDO, 0x0e8,
495*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
496*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI0_SCK, 0x0ec,
497*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
498*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI1_CS0, 0x0ec,
499*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
500*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI1_CS1, 0x0f0,
501*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
502*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI1_SDI, 0x0f0,
503*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
504*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI1_SDO, 0x0f4,
505*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
506*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SPI1_SCK, 0x0f4,
507*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
508*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG0_TDO, 0x0f8,
509*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
510*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG0_TCK, 0x0f8,
511*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
512*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG0_TDI, 0x0fc,
513*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
514*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG0_TMS, 0x0fc,
515*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
516*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG0_TRST, 0x100,
517*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
518*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG0_SRST, 0x100,
519*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
520*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG1_TDO, 0x104,
521*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
522*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG1_TCK, 0x104,
523*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
524*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG1_TDI, 0x108,
525*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
526*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG1_TMS, 0x108,
527*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
528*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG1_TRST, 0x10c,
529*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
530*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG1_SRST, 0x10c,
531*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
532*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG2_TDO, 0x110,
533*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
534*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG2_TCK, 0x110,
535*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
536*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG2_TDI, 0x114,
537*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
538*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG2_TMS, 0x114,
539*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
540*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG2_TRST, 0x118,
541*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
542*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG2_SRST, 0x118,
543*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
544*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG3_TDO, 0x11c,
545*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
546*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG3_TCK, 0x11c,
547*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
548*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG3_TDI, 0x120,
549*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
550*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG3_TMS, 0x120,
551*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
552*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG3_TRST, 0x124,
553*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
554*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_JTAG3_SRST, 0x124,
555*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
556*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO0, 0x128,
557*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
558*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO1, 0x128,
559*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
560*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO2, 0x12c,
561*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
562*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO3, 0x12c,
563*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
564*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO4, 0x130,
565*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
566*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO5, 0x130,
567*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
568*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO6, 0x134,
569*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
570*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO7, 0x134,
571*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
572*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO8, 0x138,
573*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
574*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO9, 0x138,
575*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
576*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO10, 0x13c,
577*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
578*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO11, 0x13c,
579*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
580*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO12, 0x140,
581*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
582*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO13, 0x140,
583*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
584*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO14, 0x144,
585*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
586*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO15, 0x144,
587*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
588*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO16, 0x148,
589*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
590*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO17, 0x148,
591*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
592*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO18, 0x14c,
593*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
594*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO19, 0x14c,
595*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
596*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO20, 0x150,
597*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
598*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO21, 0x150,
599*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
600*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO22, 0x154,
601*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
602*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO23, 0x154,
603*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
604*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO24, 0x158,
605*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
606*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO25, 0x158,
607*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
608*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO26, 0x15c,
609*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
610*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO27, 0x15c,
611*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
612*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO28, 0x160,
613*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
614*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO29, 0x160,
615*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
616*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO30, 0x164,
617*614a54cbSInochi Amaoto PIN_FLAG_DEFAULT),
618*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_GPIO31, 0x164,
619*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH),
620*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_MODE_SEL0, 0x168,
621*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
622*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_MODE_SEL1, 0x168,
623*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
624*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
625*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_MODE_SEL2, 0x16c,
626*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
627*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_BOOT_SEL0, 0x16c,
628*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
629*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
630*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_BOOT_SEL1, 0x170,
631*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
632*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_BOOT_SEL2, 0x170,
633*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
634*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
635*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_BOOT_SEL3, 0x174,
636*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
637*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_BOOT_SEL4, 0x174,
638*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
639*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
640*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_BOOT_SEL5, 0x178,
641*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
642*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_BOOT_SEL6, 0x178,
643*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
644*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
645*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_BOOT_SEL7, 0x17c,
646*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
647*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_MULTI_SCKT, 0x17c,
648*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
649*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
650*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SCKT_ID0, 0x180,
651*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
652*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SCKT_ID1, 0x180,
653*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
654*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
655*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PLL_CLK_IN_MAIN, 0x184,
656*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
657*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PLL_CLK_IN_DDR_0, 0x184,
658*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
659*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
660*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PLL_CLK_IN_DDR_1, 0x188,
661*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
662*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PLL_CLK_IN_DDR_2, 0x188,
663*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
664*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
665*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PLL_CLK_IN_DDR_3, 0x18c,
666*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
667*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_XTAL_32K, 0x18c,
668*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
669*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
670*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_SYS_RST, 0x190,
671*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
672*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_PWR_BUTTON, 0x190,
673*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
674*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
675*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_TEST_EN, 0x194,
676*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
677*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_TEST_MODE_MBIST, 0x194,
678*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
679*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
680*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_TEST_MODE_SCAN, 0x198,
681*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
682*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_TEST_MODE_BSD, 0x198,
683*614a54cbSInochi Amaoto PIN_FLAG_WRITE_HIGH | PIN_FLAG_NO_PINMUX |
684*614a54cbSInochi Amaoto PIN_FLAG_NO_OEX_EN),
685*614a54cbSInochi Amaoto SG2042_GENERAL_PIN(PIN_BISR_BYP, 0x19c,
686*614a54cbSInochi Amaoto PIN_FLAG_NO_PINMUX | PIN_FLAG_NO_OEX_EN),
687*614a54cbSInochi Amaoto };
688*614a54cbSInochi Amaoto
689*614a54cbSInochi Amaoto static const struct sophgo_pinctrl_data sg2044_pindata = {
690*614a54cbSInochi Amaoto .pins = sg2044_pins,
691*614a54cbSInochi Amaoto .pindata = sg2044_pin_data,
692*614a54cbSInochi Amaoto .vddio_ops = &sg2044_vddio_cfg_ops,
693*614a54cbSInochi Amaoto .cfg_ops = &sg2042_cfg_ops,
694*614a54cbSInochi Amaoto .pctl_ops = &sg2042_pctrl_ops,
695*614a54cbSInochi Amaoto .pmx_ops = &sg2042_pmx_ops,
696*614a54cbSInochi Amaoto .pconf_ops = &sg2042_pconf_ops,
697*614a54cbSInochi Amaoto .npins = ARRAY_SIZE(sg2044_pins),
698*614a54cbSInochi Amaoto .pinsize = sizeof(struct sg2042_pin),
699*614a54cbSInochi Amaoto };
700*614a54cbSInochi Amaoto
701*614a54cbSInochi Amaoto static const struct of_device_id sg2044_pinctrl_ids[] = {
702*614a54cbSInochi Amaoto { .compatible = "sophgo,sg2044-pinctrl", .data = &sg2044_pindata },
703*614a54cbSInochi Amaoto { }
704*614a54cbSInochi Amaoto };
705*614a54cbSInochi Amaoto MODULE_DEVICE_TABLE(of, sg2044_pinctrl_ids);
706*614a54cbSInochi Amaoto
707*614a54cbSInochi Amaoto static struct platform_driver sg2044_pinctrl_driver = {
708*614a54cbSInochi Amaoto .probe = sophgo_pinctrl_probe,
709*614a54cbSInochi Amaoto .driver = {
710*614a54cbSInochi Amaoto .name = "sg2044-pinctrl",
711*614a54cbSInochi Amaoto .suppress_bind_attrs = true,
712*614a54cbSInochi Amaoto .of_match_table = sg2044_pinctrl_ids,
713*614a54cbSInochi Amaoto },
714*614a54cbSInochi Amaoto };
715*614a54cbSInochi Amaoto module_platform_driver(sg2044_pinctrl_driver);
716*614a54cbSInochi Amaoto
717*614a54cbSInochi Amaoto MODULE_DESCRIPTION("Pinctrl driver for the SG2002 series SoC");
718*614a54cbSInochi Amaoto MODULE_LICENSE("GPL");
719