Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | |
| 3 | #include <clk.h> |
| 4 | #include <dm.h> |
| 5 | #include <dm/device-internal.h> |
| 6 | #include <dm/lists.h> |
| 7 | #include <dm/pinctrl.h> |
| 8 | #include <errno.h> |
| 9 | #include <malloc.h> |
| 10 | |
| 11 | #include <asm/gpio.h> |
| 12 | |
| 13 | extern U_BOOT_DRIVER(gpio_sunxi); |
| 14 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 15 | /* |
| 16 | * This structure implements a simplified view of the possible pinmux settings: |
| 17 | * Each mux value is assumed to be the same for a given function, across the |
| 18 | * pins in each group (almost universally true, with same rare exceptions not |
| 19 | * relevant to U-Boot), but also across different ports (not true in many |
| 20 | * cases). We ignore the first problem, and work around the latter by just |
| 21 | * supporting one particular port for a each function. This works fine for all |
| 22 | * board configurations so far. If this would need to be revisited, we could |
| 23 | * add a "u8 port;" below and match that, with 0 encoding the "don't care" case. |
| 24 | */ |
| 25 | struct sunxi_pinctrl_function { |
| 26 | const char name[sizeof("gpio_out")]; |
| 27 | u8 mux; |
| 28 | }; |
| 29 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 30 | struct sunxi_pinctrl_desc { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 31 | const struct sunxi_pinctrl_function *functions; |
| 32 | u8 num_functions; |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 33 | u8 first_bank; |
| 34 | u8 num_banks; |
| 35 | }; |
| 36 | |
| 37 | struct sunxi_pinctrl_plat { |
| 38 | struct sunxi_gpio __iomem *base; |
| 39 | }; |
| 40 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 41 | static int sunxi_pinctrl_get_pins_count(struct udevice *dev) |
| 42 | { |
| 43 | const struct sunxi_pinctrl_desc *desc = dev_get_priv(dev); |
| 44 | |
| 45 | return desc->num_banks * SUNXI_GPIOS_PER_BANK; |
| 46 | } |
| 47 | |
| 48 | static const char *sunxi_pinctrl_get_pin_name(struct udevice *dev, |
| 49 | uint pin_selector) |
| 50 | { |
| 51 | const struct sunxi_pinctrl_desc *desc = dev_get_priv(dev); |
| 52 | static char pin_name[sizeof("PN31")]; |
| 53 | |
| 54 | snprintf(pin_name, sizeof(pin_name), "P%c%d", |
| 55 | pin_selector / SUNXI_GPIOS_PER_BANK + desc->first_bank + 'A', |
| 56 | pin_selector % SUNXI_GPIOS_PER_BANK); |
| 57 | |
| 58 | return pin_name; |
| 59 | } |
| 60 | |
| 61 | static int sunxi_pinctrl_get_functions_count(struct udevice *dev) |
| 62 | { |
| 63 | const struct sunxi_pinctrl_desc *desc = dev_get_priv(dev); |
| 64 | |
| 65 | return desc->num_functions; |
| 66 | } |
| 67 | |
| 68 | static const char *sunxi_pinctrl_get_function_name(struct udevice *dev, |
| 69 | uint func_selector) |
| 70 | { |
| 71 | const struct sunxi_pinctrl_desc *desc = dev_get_priv(dev); |
| 72 | |
| 73 | return desc->functions[func_selector].name; |
| 74 | } |
| 75 | |
| 76 | static int sunxi_pinctrl_pinmux_set(struct udevice *dev, uint pin_selector, |
| 77 | uint func_selector) |
| 78 | { |
| 79 | const struct sunxi_pinctrl_desc *desc = dev_get_priv(dev); |
| 80 | struct sunxi_pinctrl_plat *plat = dev_get_plat(dev); |
| 81 | int bank = pin_selector / SUNXI_GPIOS_PER_BANK; |
| 82 | int pin = pin_selector % SUNXI_GPIOS_PER_BANK; |
| 83 | |
| 84 | debug("set mux: %-4s => %s (%d)\n", |
| 85 | sunxi_pinctrl_get_pin_name(dev, pin_selector), |
| 86 | sunxi_pinctrl_get_function_name(dev, func_selector), |
| 87 | desc->functions[func_selector].mux); |
| 88 | |
| 89 | sunxi_gpio_set_cfgbank(plat->base + bank, pin, |
| 90 | desc->functions[func_selector].mux); |
| 91 | |
| 92 | return 0; |
| 93 | } |
| 94 | |
Samuel Holland | de828b4 | 2021-08-28 21:10:47 -0500 | [diff] [blame] | 95 | static const struct pinconf_param sunxi_pinctrl_pinconf_params[] = { |
| 96 | { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, |
| 97 | { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 2 }, |
| 98 | { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 }, |
| 99 | { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 10 }, |
| 100 | }; |
| 101 | |
| 102 | static int sunxi_pinctrl_pinconf_set_pull(struct sunxi_pinctrl_plat *plat, |
| 103 | uint bank, uint pin, uint bias) |
| 104 | { |
| 105 | struct sunxi_gpio *regs = &plat->base[bank]; |
| 106 | |
| 107 | sunxi_gpio_set_pull_bank(regs, pin, bias); |
| 108 | |
| 109 | return 0; |
| 110 | } |
| 111 | |
| 112 | static int sunxi_pinctrl_pinconf_set_drive(struct sunxi_pinctrl_plat *plat, |
| 113 | uint bank, uint pin, uint drive) |
| 114 | { |
| 115 | struct sunxi_gpio *regs = &plat->base[bank]; |
| 116 | |
| 117 | if (drive < 10 || drive > 40) |
| 118 | return -EINVAL; |
| 119 | |
| 120 | /* Convert mA to the register value, rounding down. */ |
| 121 | sunxi_gpio_set_drv_bank(regs, pin, drive / 10 - 1); |
| 122 | |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | static int sunxi_pinctrl_pinconf_set(struct udevice *dev, uint pin_selector, |
| 127 | uint param, uint val) |
| 128 | { |
| 129 | struct sunxi_pinctrl_plat *plat = dev_get_plat(dev); |
| 130 | int bank = pin_selector / SUNXI_GPIOS_PER_BANK; |
| 131 | int pin = pin_selector % SUNXI_GPIOS_PER_BANK; |
| 132 | |
| 133 | switch (param) { |
| 134 | case PIN_CONFIG_BIAS_DISABLE: |
| 135 | case PIN_CONFIG_BIAS_PULL_DOWN: |
| 136 | case PIN_CONFIG_BIAS_PULL_UP: |
| 137 | return sunxi_pinctrl_pinconf_set_pull(plat, bank, pin, val); |
| 138 | case PIN_CONFIG_DRIVE_STRENGTH: |
| 139 | return sunxi_pinctrl_pinconf_set_drive(plat, bank, pin, val); |
| 140 | } |
| 141 | |
| 142 | return -EINVAL; |
| 143 | } |
| 144 | |
Samuel Holland | 116d523 | 2021-08-17 00:52:00 -0500 | [diff] [blame] | 145 | static int sunxi_pinctrl_get_pin_muxing(struct udevice *dev, uint pin_selector, |
| 146 | char *buf, int size) |
| 147 | { |
| 148 | struct sunxi_pinctrl_plat *plat = dev_get_plat(dev); |
| 149 | int bank = pin_selector / SUNXI_GPIOS_PER_BANK; |
| 150 | int pin = pin_selector % SUNXI_GPIOS_PER_BANK; |
| 151 | int mux = sunxi_gpio_get_cfgbank(plat->base + bank, pin); |
| 152 | |
| 153 | switch (mux) { |
| 154 | case SUNXI_GPIO_INPUT: |
| 155 | strlcpy(buf, "gpio input", size); |
| 156 | break; |
| 157 | case SUNXI_GPIO_OUTPUT: |
| 158 | strlcpy(buf, "gpio output", size); |
| 159 | break; |
| 160 | case SUNXI_GPIO_DISABLE: |
| 161 | strlcpy(buf, "disabled", size); |
| 162 | break; |
| 163 | default: |
| 164 | snprintf(buf, size, "function %d", mux); |
| 165 | break; |
| 166 | } |
| 167 | |
| 168 | return 0; |
| 169 | } |
| 170 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 171 | static const struct pinctrl_ops sunxi_pinctrl_ops = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 172 | .get_pins_count = sunxi_pinctrl_get_pins_count, |
| 173 | .get_pin_name = sunxi_pinctrl_get_pin_name, |
| 174 | .get_functions_count = sunxi_pinctrl_get_functions_count, |
| 175 | .get_function_name = sunxi_pinctrl_get_function_name, |
| 176 | .pinmux_set = sunxi_pinctrl_pinmux_set, |
Samuel Holland | de828b4 | 2021-08-28 21:10:47 -0500 | [diff] [blame] | 177 | .pinconf_num_params = ARRAY_SIZE(sunxi_pinctrl_pinconf_params), |
| 178 | .pinconf_params = sunxi_pinctrl_pinconf_params, |
| 179 | .pinconf_set = sunxi_pinctrl_pinconf_set, |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 180 | .set_state = pinctrl_generic_set_state, |
Samuel Holland | 116d523 | 2021-08-17 00:52:00 -0500 | [diff] [blame] | 181 | .get_pin_muxing = sunxi_pinctrl_get_pin_muxing, |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 182 | }; |
| 183 | |
| 184 | static int sunxi_pinctrl_bind(struct udevice *dev) |
| 185 | { |
| 186 | struct sunxi_pinctrl_plat *plat = dev_get_plat(dev); |
| 187 | struct sunxi_pinctrl_desc *desc; |
| 188 | struct sunxi_gpio_plat *gpio_plat; |
| 189 | struct udevice *gpio_dev; |
| 190 | int i, ret; |
| 191 | |
| 192 | desc = (void *)dev_get_driver_data(dev); |
| 193 | if (!desc) |
| 194 | return -EINVAL; |
| 195 | dev_set_priv(dev, desc); |
| 196 | |
| 197 | plat->base = dev_read_addr_ptr(dev); |
| 198 | |
| 199 | ret = device_bind_driver_to_node(dev, "gpio_sunxi", dev->name, |
| 200 | dev_ofnode(dev), &gpio_dev); |
| 201 | if (ret) |
| 202 | return ret; |
| 203 | |
| 204 | for (i = 0; i < desc->num_banks; ++i) { |
| 205 | gpio_plat = malloc(sizeof(*gpio_plat)); |
| 206 | if (!gpio_plat) |
| 207 | return -ENOMEM; |
| 208 | |
| 209 | gpio_plat->regs = plat->base + i; |
| 210 | gpio_plat->bank_name[0] = 'P'; |
| 211 | gpio_plat->bank_name[1] = 'A' + desc->first_bank + i; |
| 212 | gpio_plat->bank_name[2] = '\0'; |
| 213 | |
| 214 | ret = device_bind(gpio_dev, DM_DRIVER_REF(gpio_sunxi), |
| 215 | gpio_plat->bank_name, gpio_plat, |
| 216 | ofnode_null(), NULL); |
| 217 | if (ret) |
| 218 | return ret; |
| 219 | } |
| 220 | |
| 221 | return 0; |
| 222 | } |
| 223 | |
| 224 | static int sunxi_pinctrl_probe(struct udevice *dev) |
| 225 | { |
| 226 | struct clk *apb_clk; |
| 227 | |
| 228 | apb_clk = devm_clk_get(dev, "apb"); |
| 229 | if (!IS_ERR(apb_clk)) |
| 230 | clk_enable(apb_clk); |
| 231 | |
| 232 | return 0; |
| 233 | } |
| 234 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 235 | static const struct sunxi_pinctrl_function suniv_f1c100s_pinctrl_functions[] = { |
| 236 | { "gpio_in", 0 }, |
| 237 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 238 | { "i2c0", 3 }, /* PE11-PE12 */ |
| 239 | { "i2c1", 3 }, /* PD5-PD6 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 240 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 241 | { "mmc1", 3 }, /* PC0-PC2 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 242 | { "spi0", 2 }, /* PC0-PC3 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 243 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 244 | { "uart0", 3 }, /* PF2-PF4 */ |
| 245 | #else |
| 246 | { "uart0", 5 }, /* PE0-PE1 */ |
| 247 | #endif |
Andre Przywara | 72313dc | 2022-10-05 23:19:54 +0100 | [diff] [blame] | 248 | { "uart1", 5 }, /* PA0-PA3 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 249 | }; |
| 250 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 251 | static const struct sunxi_pinctrl_desc __maybe_unused suniv_f1c100s_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 252 | .functions = suniv_f1c100s_pinctrl_functions, |
| 253 | .num_functions = ARRAY_SIZE(suniv_f1c100s_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 254 | .first_bank = SUNXI_GPIO_A, |
| 255 | .num_banks = 6, |
| 256 | }; |
| 257 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 258 | static const struct sunxi_pinctrl_function sun4i_a10_pinctrl_functions[] = { |
Samuel Holland | 5d57e05 | 2021-08-28 13:21:36 -0500 | [diff] [blame] | 259 | { "emac", 2 }, /* PA0-PA17 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 260 | { "gpio_in", 0 }, |
| 261 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 262 | { "i2c0", 2 }, /* PB0-PB1 */ |
| 263 | { "i2c1", 2 }, /* PB18-PB19 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 264 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 265 | #if IS_ENABLED(CONFIG_MMC1_PINS_PH) |
| 266 | { "mmc1", 5 }, /* PH22-PH27 */ |
| 267 | #else |
| 268 | { "mmc1", 4 }, /* PG0-PG5 */ |
| 269 | #endif |
| 270 | { "mmc2", 3 }, /* PC6-PC15 */ |
| 271 | { "mmc3", 2 }, /* PI4-PI9 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 272 | { "spi0", 3 }, /* PC0-PC2, PC23 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 273 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 274 | { "uart0", 4 }, /* PF2-PF4 */ |
| 275 | #else |
| 276 | { "uart0", 2 }, /* PB22-PB23 */ |
| 277 | #endif |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 278 | }; |
| 279 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 280 | static const struct sunxi_pinctrl_desc __maybe_unused sun4i_a10_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 281 | .functions = sun4i_a10_pinctrl_functions, |
| 282 | .num_functions = ARRAY_SIZE(sun4i_a10_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 283 | .first_bank = SUNXI_GPIO_A, |
| 284 | .num_banks = 9, |
| 285 | }; |
| 286 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 287 | static const struct sunxi_pinctrl_function sun5i_a13_pinctrl_functions[] = { |
Samuel Holland | 5d57e05 | 2021-08-28 13:21:36 -0500 | [diff] [blame] | 288 | { "emac", 2 }, /* PA0-PA17 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 289 | { "gpio_in", 0 }, |
| 290 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 291 | { "i2c0", 2 }, /* PB0-PB1 */ |
| 292 | { "i2c1", 2 }, /* PB15-PB16 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 293 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 294 | { "mmc1", 2 }, /* PG3-PG8 */ |
| 295 | { "mmc2", 3 }, /* PC6-PC15 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 296 | { "spi0", 3 }, /* PC0-PC3 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 297 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 298 | { "uart0", 4 }, /* PF2-PF4 */ |
| 299 | #else |
| 300 | { "uart0", 2 }, /* PB19-PB20 */ |
| 301 | #endif |
| 302 | { "uart1", 4 }, /* PG3-PG4 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 303 | }; |
| 304 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 305 | static const struct sunxi_pinctrl_desc __maybe_unused sun5i_a13_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 306 | .functions = sun5i_a13_pinctrl_functions, |
| 307 | .num_functions = ARRAY_SIZE(sun5i_a13_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 308 | .first_bank = SUNXI_GPIO_A, |
| 309 | .num_banks = 7, |
| 310 | }; |
| 311 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 312 | static const struct sunxi_pinctrl_function sun6i_a31_pinctrl_functions[] = { |
Samuel Holland | 8181f56 | 2021-08-28 13:13:52 -0500 | [diff] [blame] | 313 | { "gmac", 2 }, /* PA0-PA27 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 314 | { "gpio_in", 0 }, |
| 315 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 316 | { "i2c0", 2 }, /* PH14-PH15 */ |
| 317 | { "i2c1", 2 }, /* PH16-PH17 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 318 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 319 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 320 | { "mmc2", 3 }, /* PC6-PC15, PC24 */ |
| 321 | { "mmc3", 4 }, /* PC6-PC15, PC24 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 322 | { "spi0", 3 }, /* PC0-PC2, PC27 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 323 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 324 | { "uart0", 3 }, /* PF2-PF4 */ |
| 325 | #else |
| 326 | { "uart0", 2 }, /* PH20-PH21 */ |
| 327 | #endif |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 328 | }; |
| 329 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 330 | static const struct sunxi_pinctrl_desc __maybe_unused sun6i_a31_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 331 | .functions = sun6i_a31_pinctrl_functions, |
| 332 | .num_functions = ARRAY_SIZE(sun6i_a31_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 333 | .first_bank = SUNXI_GPIO_A, |
| 334 | .num_banks = 8, |
| 335 | }; |
| 336 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 337 | static const struct sunxi_pinctrl_function sun6i_a31_r_pinctrl_functions[] = { |
| 338 | { "gpio_in", 0 }, |
| 339 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 340 | { "s_i2c", 2 }, /* PL0-PL1 */ |
Samuel Holland | d98ccb8 | 2022-11-17 22:22:27 -0600 | [diff] [blame] | 341 | { "s_p2wi", 3 }, /* PL0-PL1 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 342 | { "s_uart", 2 }, /* PL2-PL3 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 343 | }; |
| 344 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 345 | static const struct sunxi_pinctrl_desc __maybe_unused sun6i_a31_r_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 346 | .functions = sun6i_a31_r_pinctrl_functions, |
| 347 | .num_functions = ARRAY_SIZE(sun6i_a31_r_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 348 | .first_bank = SUNXI_GPIO_L, |
| 349 | .num_banks = 2, |
| 350 | }; |
| 351 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 352 | static const struct sunxi_pinctrl_function sun7i_a20_pinctrl_functions[] = { |
Samuel Holland | 5d57e05 | 2021-08-28 13:21:36 -0500 | [diff] [blame] | 353 | { "emac", 2 }, /* PA0-PA17 */ |
Samuel Holland | 8181f56 | 2021-08-28 13:13:52 -0500 | [diff] [blame] | 354 | { "gmac", 5 }, /* PA0-PA17 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 355 | { "gpio_in", 0 }, |
| 356 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 357 | { "i2c0", 2 }, /* PB0-PB1 */ |
| 358 | { "i2c1", 2 }, /* PB18-PB19 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 359 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 360 | #if IS_ENABLED(CONFIG_MMC1_PINS_PH) |
| 361 | { "mmc1", 5 }, /* PH22-PH27 */ |
| 362 | #else |
| 363 | { "mmc1", 4 }, /* PG0-PG5 */ |
| 364 | #endif |
| 365 | { "mmc2", 3 }, /* PC5-PC15, PC24 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 366 | { "spi0", 3 }, /* PC0-PC2, PC23 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 367 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 368 | { "uart0", 4 }, /* PF2-PF4 */ |
| 369 | #else |
| 370 | { "uart0", 2 }, /* PB22-PB23 */ |
| 371 | #endif |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 372 | }; |
| 373 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 374 | static const struct sunxi_pinctrl_desc __maybe_unused sun7i_a20_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 375 | .functions = sun7i_a20_pinctrl_functions, |
| 376 | .num_functions = ARRAY_SIZE(sun7i_a20_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 377 | .first_bank = SUNXI_GPIO_A, |
| 378 | .num_banks = 9, |
| 379 | }; |
| 380 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 381 | static const struct sunxi_pinctrl_function sun8i_a23_pinctrl_functions[] = { |
| 382 | { "gpio_in", 0 }, |
| 383 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 384 | { "i2c0", 2 }, /* PH2-PH3 */ |
| 385 | { "i2c1", 2 }, /* PH4-PH5 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 386 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 387 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 388 | { "mmc2", 3 }, /* PC5-PC16 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 389 | { "spi0", 3 }, /* PC0-PC3 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 390 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 391 | { "uart0", 3 }, /* PF2-PF4 */ |
| 392 | #endif |
| 393 | { "uart1", 2 }, /* PG6-PG7 */ |
| 394 | { "uart2", 2 }, /* PB0-PB1 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 395 | }; |
| 396 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 397 | static const struct sunxi_pinctrl_desc __maybe_unused sun8i_a23_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 398 | .functions = sun8i_a23_pinctrl_functions, |
| 399 | .num_functions = ARRAY_SIZE(sun8i_a23_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 400 | .first_bank = SUNXI_GPIO_A, |
| 401 | .num_banks = 8, |
| 402 | }; |
| 403 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 404 | static const struct sunxi_pinctrl_function sun8i_a23_r_pinctrl_functions[] = { |
| 405 | { "gpio_in", 0 }, |
| 406 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 407 | { "s_i2c", 3 }, /* PL0-PL1 */ |
Samuel Holland | d98ccb8 | 2022-11-17 22:22:27 -0600 | [diff] [blame] | 408 | { "s_rsb", 2 }, /* PL0-PL1 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 409 | { "s_uart", 2 }, /* PL2-PL3 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 410 | }; |
| 411 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 412 | static const struct sunxi_pinctrl_desc __maybe_unused sun8i_a23_r_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 413 | .functions = sun8i_a23_r_pinctrl_functions, |
| 414 | .num_functions = ARRAY_SIZE(sun8i_a23_r_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 415 | .first_bank = SUNXI_GPIO_L, |
| 416 | .num_banks = 1, |
| 417 | }; |
| 418 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 419 | static const struct sunxi_pinctrl_function sun8i_a33_pinctrl_functions[] = { |
| 420 | { "gpio_in", 0 }, |
| 421 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 422 | { "i2c0", 2 }, /* PH2-PH3 */ |
| 423 | { "i2c1", 2 }, /* PH4-PH5 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 424 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 425 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 426 | { "mmc2", 3 }, /* PC5-PC16 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 427 | { "spi0", 3 }, /* PC0-PC3 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 428 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 429 | { "uart0", 3 }, /* PF2-PF4 */ |
| 430 | #else |
| 431 | { "uart0", 3 }, /* PB0-PB1 */ |
| 432 | #endif |
| 433 | { "uart1", 2 }, /* PG6-PG7 */ |
| 434 | { "uart2", 2 }, /* PB0-PB1 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 435 | }; |
| 436 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 437 | static const struct sunxi_pinctrl_desc __maybe_unused sun8i_a33_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 438 | .functions = sun8i_a33_pinctrl_functions, |
| 439 | .num_functions = ARRAY_SIZE(sun8i_a33_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 440 | .first_bank = SUNXI_GPIO_A, |
| 441 | .num_banks = 8, |
| 442 | }; |
| 443 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 444 | static const struct sunxi_pinctrl_function sun8i_a83t_pinctrl_functions[] = { |
Samuel Holland | a8cbf47 | 2021-08-28 13:34:29 -0500 | [diff] [blame] | 445 | { "gmac", 4 }, /* PD2-PD23 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 446 | { "gpio_in", 0 }, |
| 447 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 448 | { "i2c0", 2 }, /* PH0-PH1 */ |
| 449 | { "i2c1", 2 }, /* PH2-PH3 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 450 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 451 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 452 | { "mmc2", 3 }, /* PC5-PC16 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 453 | { "spi0", 3 }, /* PC0-PC3 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 454 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 455 | { "uart0", 3 }, /* PF2-PF4 */ |
| 456 | #else |
| 457 | { "uart0", 2 }, /* PB9-PB10 */ |
| 458 | #endif |
| 459 | { "uart1", 2 }, /* PG6-PG7 */ |
| 460 | { "uart2", 2 }, /* PB0-PB1 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 461 | }; |
| 462 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 463 | static const struct sunxi_pinctrl_desc __maybe_unused sun8i_a83t_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 464 | .functions = sun8i_a83t_pinctrl_functions, |
| 465 | .num_functions = ARRAY_SIZE(sun8i_a83t_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 466 | .first_bank = SUNXI_GPIO_A, |
| 467 | .num_banks = 8, |
| 468 | }; |
| 469 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 470 | static const struct sunxi_pinctrl_function sun8i_a83t_r_pinctrl_functions[] = { |
| 471 | { "gpio_in", 0 }, |
| 472 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 473 | { "s_i2c", 2 }, /* PL8-PL9 */ |
Samuel Holland | d98ccb8 | 2022-11-17 22:22:27 -0600 | [diff] [blame] | 474 | { "s_rsb", 2 }, /* PL0-PL1 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 475 | { "s_uart", 2 }, /* PL2-PL3 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 476 | }; |
| 477 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 478 | static const struct sunxi_pinctrl_desc __maybe_unused sun8i_a83t_r_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 479 | .functions = sun8i_a83t_r_pinctrl_functions, |
| 480 | .num_functions = ARRAY_SIZE(sun8i_a83t_r_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 481 | .first_bank = SUNXI_GPIO_L, |
| 482 | .num_banks = 1, |
| 483 | }; |
| 484 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 485 | static const struct sunxi_pinctrl_function sun8i_h3_pinctrl_functions[] = { |
Samuel Holland | a8cbf47 | 2021-08-28 13:34:29 -0500 | [diff] [blame] | 486 | { "emac", 2 }, /* PD0-PD17 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 487 | { "gpio_in", 0 }, |
| 488 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 489 | { "i2c0", 2 }, /* PA11-PA12 */ |
| 490 | { "i2c1", 3 }, /* PA18-PA19 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 491 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 492 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 493 | { "mmc2", 3 }, /* PC5-PC16 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 494 | { "spi0", 3 }, /* PC0-PC3 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 495 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 496 | { "uart0", 3 }, /* PF2-PF4 */ |
| 497 | #else |
| 498 | { "uart0", 2 }, /* PA4-PA5 */ |
| 499 | #endif |
| 500 | { "uart1", 2 }, /* PG6-PG7 */ |
| 501 | { "uart2", 2 }, /* PA0-PA1 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 502 | }; |
| 503 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 504 | static const struct sunxi_pinctrl_desc __maybe_unused sun8i_h3_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 505 | .functions = sun8i_h3_pinctrl_functions, |
| 506 | .num_functions = ARRAY_SIZE(sun8i_h3_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 507 | .first_bank = SUNXI_GPIO_A, |
| 508 | .num_banks = 7, |
| 509 | }; |
| 510 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 511 | static const struct sunxi_pinctrl_function sun8i_h3_r_pinctrl_functions[] = { |
| 512 | { "gpio_in", 0 }, |
| 513 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 514 | { "s_i2c", 2 }, /* PL0-PL1 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 515 | { "s_uart", 2 }, /* PL2-PL3 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 516 | }; |
| 517 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 518 | static const struct sunxi_pinctrl_desc __maybe_unused sun8i_h3_r_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 519 | .functions = sun8i_h3_r_pinctrl_functions, |
| 520 | .num_functions = ARRAY_SIZE(sun8i_h3_r_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 521 | .first_bank = SUNXI_GPIO_L, |
| 522 | .num_banks = 1, |
| 523 | }; |
| 524 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 525 | static const struct sunxi_pinctrl_function sun8i_v3s_pinctrl_functions[] = { |
Samuel Holland | a8cbf47 | 2021-08-28 13:34:29 -0500 | [diff] [blame] | 526 | { "emac", 4 }, /* PD0-PD17 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 527 | { "gpio_in", 0 }, |
| 528 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 529 | { "i2c0", 2 }, /* PB6-PB7 */ |
| 530 | { "i2c1", 2 }, /* PB8-PB9 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 531 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 532 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 533 | { "mmc2", 2 }, /* PC0-PC10 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 534 | { "spi0", 3 }, /* PC0-PC3 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 535 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 536 | { "uart0", 3 }, /* PF2-PF4 */ |
| 537 | #else |
| 538 | { "uart0", 3 }, /* PB8-PB9 */ |
| 539 | #endif |
| 540 | { "uart1", 2 }, /* PG6-PG7 */ |
| 541 | { "uart2", 2 }, /* PB0-PB1 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 542 | }; |
| 543 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 544 | static const struct sunxi_pinctrl_desc __maybe_unused sun8i_v3s_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 545 | .functions = sun8i_v3s_pinctrl_functions, |
| 546 | .num_functions = ARRAY_SIZE(sun8i_v3s_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 547 | .first_bank = SUNXI_GPIO_A, |
| 548 | .num_banks = 7, |
| 549 | }; |
| 550 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 551 | static const struct sunxi_pinctrl_function sun9i_a80_pinctrl_functions[] = { |
Samuel Holland | 8181f56 | 2021-08-28 13:13:52 -0500 | [diff] [blame] | 552 | { "gmac", 2 }, /* PA0-PA17 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 553 | { "gpio_in", 0 }, |
| 554 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 555 | { "i2c0", 2 }, /* PH0-PH1 */ |
| 556 | { "i2c1", 2 }, /* PH2-PH3 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 557 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 558 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 559 | { "mmc2", 3 }, /* PC6-PC16 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 560 | { "spi0", 3 }, /* PC0-PC2, PC19 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 561 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 562 | { "uart0", 4 }, /* PF2-PF4 */ |
| 563 | #else |
| 564 | { "uart0", 2 }, /* PH12-PH13 */ |
| 565 | #endif |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 566 | }; |
| 567 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 568 | static const struct sunxi_pinctrl_desc __maybe_unused sun9i_a80_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 569 | .functions = sun9i_a80_pinctrl_functions, |
| 570 | .num_functions = ARRAY_SIZE(sun9i_a80_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 571 | .first_bank = SUNXI_GPIO_A, |
| 572 | .num_banks = 8, |
| 573 | }; |
| 574 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 575 | static const struct sunxi_pinctrl_function sun9i_a80_r_pinctrl_functions[] = { |
| 576 | { "gpio_in", 0 }, |
| 577 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 578 | { "s_i2c0", 2 }, /* PN0-PN1 */ |
| 579 | { "s_i2c1", 3 }, /* PM8-PM9 */ |
Samuel Holland | d98ccb8 | 2022-11-17 22:22:27 -0600 | [diff] [blame] | 580 | { "s_rsb", 3 }, /* PN0-PN1 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 581 | { "s_uart", 3 }, /* PL0-PL1 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 582 | }; |
| 583 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 584 | static const struct sunxi_pinctrl_desc __maybe_unused sun9i_a80_r_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 585 | .functions = sun9i_a80_r_pinctrl_functions, |
| 586 | .num_functions = ARRAY_SIZE(sun9i_a80_r_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 587 | .first_bank = SUNXI_GPIO_L, |
| 588 | .num_banks = 3, |
| 589 | }; |
| 590 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 591 | static const struct sunxi_pinctrl_function sun50i_a64_pinctrl_functions[] = { |
Samuel Holland | a8cbf47 | 2021-08-28 13:34:29 -0500 | [diff] [blame] | 592 | { "emac", 4 }, /* PD8-PD23 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 593 | { "gpio_in", 0 }, |
| 594 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 595 | { "i2c0", 2 }, /* PH0-PH1 */ |
| 596 | { "i2c1", 2 }, /* PH2-PH3 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 597 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 598 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 599 | { "mmc2", 3 }, /* PC1-PC16 */ |
Samuel Holland | 3de641b | 2021-08-28 15:52:52 -0500 | [diff] [blame] | 600 | { "pwm", 2 }, /* PD22 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 601 | { "spi0", 4 }, /* PC0-PC3 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 602 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 603 | { "uart0", 3 }, /* PF2-PF4 */ |
| 604 | #else |
| 605 | { "uart0", 4 }, /* PB8-PB9 */ |
| 606 | #endif |
| 607 | { "uart1", 2 }, /* PG6-PG7 */ |
| 608 | { "uart2", 2 }, /* PB0-PB1 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 609 | }; |
| 610 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 611 | static const struct sunxi_pinctrl_desc __maybe_unused sun50i_a64_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 612 | .functions = sun50i_a64_pinctrl_functions, |
| 613 | .num_functions = ARRAY_SIZE(sun50i_a64_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 614 | .first_bank = SUNXI_GPIO_A, |
| 615 | .num_banks = 8, |
| 616 | }; |
| 617 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 618 | static const struct sunxi_pinctrl_function sun50i_a64_r_pinctrl_functions[] = { |
| 619 | { "gpio_in", 0 }, |
| 620 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 621 | { "s_i2c", 2 }, /* PL8-PL9 */ |
Samuel Holland | d98ccb8 | 2022-11-17 22:22:27 -0600 | [diff] [blame] | 622 | { "s_rsb", 2 }, /* PL0-PL1 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 623 | { "s_uart", 2 }, /* PL2-PL3 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 624 | }; |
| 625 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 626 | static const struct sunxi_pinctrl_desc __maybe_unused sun50i_a64_r_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 627 | .functions = sun50i_a64_r_pinctrl_functions, |
| 628 | .num_functions = ARRAY_SIZE(sun50i_a64_r_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 629 | .first_bank = SUNXI_GPIO_L, |
| 630 | .num_banks = 1, |
| 631 | }; |
| 632 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 633 | static const struct sunxi_pinctrl_function sun50i_h5_pinctrl_functions[] = { |
Samuel Holland | a8cbf47 | 2021-08-28 13:34:29 -0500 | [diff] [blame] | 634 | { "emac", 2 }, /* PD0-PD17 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 635 | { "gpio_in", 0 }, |
| 636 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 637 | { "i2c0", 2 }, /* PA11-PA12 */ |
| 638 | { "i2c1", 3 }, /* PA18-PA19 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 639 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 640 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 641 | { "mmc2", 3 }, /* PC1-PC16 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 642 | { "spi0", 3 }, /* PC0-PC3 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 643 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 644 | { "uart0", 3 }, /* PF2-PF4 */ |
| 645 | #else |
| 646 | { "uart0", 2 }, /* PA4-PA5 */ |
| 647 | #endif |
| 648 | { "uart1", 2 }, /* PG6-PG7 */ |
| 649 | { "uart2", 2 }, /* PA0-PA1 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 650 | }; |
| 651 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 652 | static const struct sunxi_pinctrl_desc __maybe_unused sun50i_h5_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 653 | .functions = sun50i_h5_pinctrl_functions, |
| 654 | .num_functions = ARRAY_SIZE(sun50i_h5_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 655 | .first_bank = SUNXI_GPIO_A, |
| 656 | .num_banks = 7, |
| 657 | }; |
| 658 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 659 | static const struct sunxi_pinctrl_function sun50i_h6_pinctrl_functions[] = { |
Samuel Holland | a8cbf47 | 2021-08-28 13:34:29 -0500 | [diff] [blame] | 660 | { "emac", 5 }, /* PD0-PD20 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 661 | { "gpio_in", 0 }, |
| 662 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 663 | { "i2c0", 2 }, /* PD25-PD26 */ |
| 664 | { "i2c1", 4 }, /* PH5-PH6 */ |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 665 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 666 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 667 | { "mmc2", 3 }, /* PC1-PC14 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 668 | { "spi0", 4 }, /* PC0-PC7 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 669 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 670 | { "uart0", 3 }, /* PF2-PF4 */ |
| 671 | #else |
| 672 | { "uart0", 2 }, /* PH0-PH1 */ |
| 673 | #endif |
| 674 | { "uart1", 2 }, /* PG6-PG7 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 675 | }; |
| 676 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 677 | static const struct sunxi_pinctrl_desc __maybe_unused sun50i_h6_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 678 | .functions = sun50i_h6_pinctrl_functions, |
| 679 | .num_functions = ARRAY_SIZE(sun50i_h6_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 680 | .first_bank = SUNXI_GPIO_A, |
| 681 | .num_banks = 8, |
| 682 | }; |
| 683 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 684 | static const struct sunxi_pinctrl_function sun50i_h6_r_pinctrl_functions[] = { |
| 685 | { "gpio_in", 0 }, |
| 686 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 687 | { "s_i2c", 3 }, /* PL0-PL1 */ |
Samuel Holland | d98ccb8 | 2022-11-17 22:22:27 -0600 | [diff] [blame] | 688 | { "s_rsb", 2 }, /* PL0-PL1 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 689 | { "s_uart", 2 }, /* PL2-PL3 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 690 | }; |
| 691 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 692 | static const struct sunxi_pinctrl_desc __maybe_unused sun50i_h6_r_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 693 | .functions = sun50i_h6_r_pinctrl_functions, |
| 694 | .num_functions = ARRAY_SIZE(sun50i_h6_r_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 695 | .first_bank = SUNXI_GPIO_L, |
| 696 | .num_banks = 2, |
| 697 | }; |
| 698 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 699 | static const struct sunxi_pinctrl_function sun50i_h616_pinctrl_functions[] = { |
Samuel Holland | a8cbf47 | 2021-08-28 13:34:29 -0500 | [diff] [blame] | 700 | { "emac0", 2 }, /* PI0-PI16 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 701 | { "gpio_in", 0 }, |
| 702 | { "gpio_out", 1 }, |
Samuel Holland | 1c17f41 | 2021-08-28 16:51:03 -0500 | [diff] [blame] | 703 | { "mmc0", 2 }, /* PF0-PF5 */ |
| 704 | { "mmc1", 2 }, /* PG0-PG5 */ |
| 705 | { "mmc2", 3 }, /* PC0-PC16 */ |
Samuel Holland | 96b75d2 | 2021-08-28 17:05:35 -0500 | [diff] [blame] | 706 | { "spi0", 4 }, /* PC0-PC7, PC15-PC16 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 707 | #if IS_ENABLED(CONFIG_UART0_PORT_F) |
| 708 | { "uart0", 3 }, /* PF2-PF4 */ |
| 709 | #else |
| 710 | { "uart0", 2 }, /* PH0-PH1 */ |
| 711 | #endif |
| 712 | { "uart1", 2 }, /* PG6-PG7 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 713 | }; |
| 714 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 715 | static const struct sunxi_pinctrl_desc __maybe_unused sun50i_h616_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 716 | .functions = sun50i_h616_pinctrl_functions, |
| 717 | .num_functions = ARRAY_SIZE(sun50i_h616_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 718 | .first_bank = SUNXI_GPIO_A, |
| 719 | .num_banks = 9, |
| 720 | }; |
| 721 | |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 722 | static const struct sunxi_pinctrl_function sun50i_h616_r_pinctrl_functions[] = { |
| 723 | { "gpio_in", 0 }, |
| 724 | { "gpio_out", 1 }, |
Samuel Holland | 4b10d25 | 2021-08-28 15:17:32 -0500 | [diff] [blame] | 725 | { "s_i2c", 3 }, /* PL0-PL1 */ |
Samuel Holland | d98ccb8 | 2022-11-17 22:22:27 -0600 | [diff] [blame] | 726 | { "s_rsb", 2 }, /* PL0-PL1 */ |
Samuel Holland | 5a08d41 | 2021-08-28 13:00:45 -0500 | [diff] [blame] | 727 | { "s_uart", 2 }, /* PL2-PL3 */ |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 728 | }; |
| 729 | |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 730 | static const struct sunxi_pinctrl_desc __maybe_unused sun50i_h616_r_pinctrl_desc = { |
Samuel Holland | ecbbedb | 2021-08-16 23:56:47 -0500 | [diff] [blame] | 731 | .functions = sun50i_h616_r_pinctrl_functions, |
| 732 | .num_functions = ARRAY_SIZE(sun50i_h616_r_pinctrl_functions), |
Samuel Holland | e309502 | 2021-08-12 20:09:43 -0500 | [diff] [blame] | 733 | .first_bank = SUNXI_GPIO_L, |
| 734 | .num_banks = 1, |
| 735 | }; |
| 736 | |
| 737 | static const struct udevice_id sunxi_pinctrl_ids[] = { |
| 738 | #ifdef CONFIG_PINCTRL_SUNIV_F1C100S |
| 739 | { |
| 740 | .compatible = "allwinner,suniv-f1c100s-pinctrl", |
| 741 | .data = (ulong)&suniv_f1c100s_pinctrl_desc, |
| 742 | }, |
| 743 | #endif |
| 744 | #ifdef CONFIG_PINCTRL_SUN4I_A10 |
| 745 | { |
| 746 | .compatible = "allwinner,sun4i-a10-pinctrl", |
| 747 | .data = (ulong)&sun4i_a10_pinctrl_desc, |
| 748 | }, |
| 749 | #endif |
| 750 | #ifdef CONFIG_PINCTRL_SUN5I_A13 |
| 751 | { |
| 752 | .compatible = "allwinner,sun5i-a10s-pinctrl", |
| 753 | .data = (ulong)&sun5i_a13_pinctrl_desc, |
| 754 | }, |
| 755 | { |
| 756 | .compatible = "allwinner,sun5i-a13-pinctrl", |
| 757 | .data = (ulong)&sun5i_a13_pinctrl_desc, |
| 758 | }, |
| 759 | #endif |
| 760 | #ifdef CONFIG_PINCTRL_SUN6I_A31 |
| 761 | { |
| 762 | .compatible = "allwinner,sun6i-a31-pinctrl", |
| 763 | .data = (ulong)&sun6i_a31_pinctrl_desc, |
| 764 | }, |
| 765 | { |
| 766 | .compatible = "allwinner,sun6i-a31s-pinctrl", |
| 767 | .data = (ulong)&sun6i_a31_pinctrl_desc, |
| 768 | }, |
| 769 | #endif |
| 770 | #ifdef CONFIG_PINCTRL_SUN6I_A31_R |
| 771 | { |
| 772 | .compatible = "allwinner,sun6i-a31-r-pinctrl", |
| 773 | .data = (ulong)&sun6i_a31_r_pinctrl_desc, |
| 774 | }, |
| 775 | #endif |
| 776 | #ifdef CONFIG_PINCTRL_SUN7I_A20 |
| 777 | { |
| 778 | .compatible = "allwinner,sun7i-a20-pinctrl", |
| 779 | .data = (ulong)&sun7i_a20_pinctrl_desc, |
| 780 | }, |
| 781 | #endif |
| 782 | #ifdef CONFIG_PINCTRL_SUN8I_A23 |
| 783 | { |
| 784 | .compatible = "allwinner,sun8i-a23-pinctrl", |
| 785 | .data = (ulong)&sun8i_a23_pinctrl_desc, |
| 786 | }, |
| 787 | #endif |
| 788 | #ifdef CONFIG_PINCTRL_SUN8I_A23_R |
| 789 | { |
| 790 | .compatible = "allwinner,sun8i-a23-r-pinctrl", |
| 791 | .data = (ulong)&sun8i_a23_r_pinctrl_desc, |
| 792 | }, |
| 793 | #endif |
| 794 | #ifdef CONFIG_PINCTRL_SUN8I_A33 |
| 795 | { |
| 796 | .compatible = "allwinner,sun8i-a33-pinctrl", |
| 797 | .data = (ulong)&sun8i_a33_pinctrl_desc, |
| 798 | }, |
| 799 | #endif |
| 800 | #ifdef CONFIG_PINCTRL_SUN8I_A83T |
| 801 | { |
| 802 | .compatible = "allwinner,sun8i-a83t-pinctrl", |
| 803 | .data = (ulong)&sun8i_a83t_pinctrl_desc, |
| 804 | }, |
| 805 | #endif |
| 806 | #ifdef CONFIG_PINCTRL_SUN8I_A83T_R |
| 807 | { |
| 808 | .compatible = "allwinner,sun8i-a83t-r-pinctrl", |
| 809 | .data = (ulong)&sun8i_a83t_r_pinctrl_desc, |
| 810 | }, |
| 811 | #endif |
| 812 | #ifdef CONFIG_PINCTRL_SUN8I_H3 |
| 813 | { |
| 814 | .compatible = "allwinner,sun8i-h3-pinctrl", |
| 815 | .data = (ulong)&sun8i_h3_pinctrl_desc, |
| 816 | }, |
| 817 | #endif |
| 818 | #ifdef CONFIG_PINCTRL_SUN8I_H3_R |
| 819 | { |
| 820 | .compatible = "allwinner,sun8i-h3-r-pinctrl", |
| 821 | .data = (ulong)&sun8i_h3_r_pinctrl_desc, |
| 822 | }, |
| 823 | #endif |
| 824 | #ifdef CONFIG_PINCTRL_SUN7I_A20 |
| 825 | { |
| 826 | .compatible = "allwinner,sun8i-r40-pinctrl", |
| 827 | .data = (ulong)&sun7i_a20_pinctrl_desc, |
| 828 | }, |
| 829 | #endif |
| 830 | #ifdef CONFIG_PINCTRL_SUN8I_V3S |
| 831 | { |
| 832 | .compatible = "allwinner,sun8i-v3-pinctrl", |
| 833 | .data = (ulong)&sun8i_v3s_pinctrl_desc, |
| 834 | }, |
| 835 | { |
| 836 | .compatible = "allwinner,sun8i-v3s-pinctrl", |
| 837 | .data = (ulong)&sun8i_v3s_pinctrl_desc, |
| 838 | }, |
| 839 | #endif |
| 840 | #ifdef CONFIG_PINCTRL_SUN9I_A80 |
| 841 | { |
| 842 | .compatible = "allwinner,sun9i-a80-pinctrl", |
| 843 | .data = (ulong)&sun9i_a80_pinctrl_desc, |
| 844 | }, |
| 845 | #endif |
| 846 | #ifdef CONFIG_PINCTRL_SUN9I_A80_R |
| 847 | { |
| 848 | .compatible = "allwinner,sun9i-a80-r-pinctrl", |
| 849 | .data = (ulong)&sun9i_a80_r_pinctrl_desc, |
| 850 | }, |
| 851 | #endif |
| 852 | #ifdef CONFIG_PINCTRL_SUN50I_A64 |
| 853 | { |
| 854 | .compatible = "allwinner,sun50i-a64-pinctrl", |
| 855 | .data = (ulong)&sun50i_a64_pinctrl_desc, |
| 856 | }, |
| 857 | #endif |
| 858 | #ifdef CONFIG_PINCTRL_SUN50I_A64_R |
| 859 | { |
| 860 | .compatible = "allwinner,sun50i-a64-r-pinctrl", |
| 861 | .data = (ulong)&sun50i_a64_r_pinctrl_desc, |
| 862 | }, |
| 863 | #endif |
| 864 | #ifdef CONFIG_PINCTRL_SUN50I_H5 |
| 865 | { |
| 866 | .compatible = "allwinner,sun50i-h5-pinctrl", |
| 867 | .data = (ulong)&sun50i_h5_pinctrl_desc, |
| 868 | }, |
| 869 | #endif |
| 870 | #ifdef CONFIG_PINCTRL_SUN50I_H6 |
| 871 | { |
| 872 | .compatible = "allwinner,sun50i-h6-pinctrl", |
| 873 | .data = (ulong)&sun50i_h6_pinctrl_desc, |
| 874 | }, |
| 875 | #endif |
| 876 | #ifdef CONFIG_PINCTRL_SUN50I_H6_R |
| 877 | { |
| 878 | .compatible = "allwinner,sun50i-h6-r-pinctrl", |
| 879 | .data = (ulong)&sun50i_h6_r_pinctrl_desc, |
| 880 | }, |
| 881 | #endif |
| 882 | #ifdef CONFIG_PINCTRL_SUN50I_H616 |
| 883 | { |
| 884 | .compatible = "allwinner,sun50i-h616-pinctrl", |
| 885 | .data = (ulong)&sun50i_h616_pinctrl_desc, |
| 886 | }, |
| 887 | #endif |
| 888 | #ifdef CONFIG_PINCTRL_SUN50I_H616_R |
| 889 | { |
| 890 | .compatible = "allwinner,sun50i-h616-r-pinctrl", |
| 891 | .data = (ulong)&sun50i_h616_r_pinctrl_desc, |
| 892 | }, |
| 893 | #endif |
| 894 | {} |
| 895 | }; |
| 896 | |
| 897 | U_BOOT_DRIVER(sunxi_pinctrl) = { |
| 898 | .name = "sunxi-pinctrl", |
| 899 | .id = UCLASS_PINCTRL, |
| 900 | .of_match = sunxi_pinctrl_ids, |
| 901 | .bind = sunxi_pinctrl_bind, |
| 902 | .probe = sunxi_pinctrl_probe, |
| 903 | .plat_auto = sizeof(struct sunxi_pinctrl_plat), |
| 904 | .ops = &sunxi_pinctrl_ops, |
| 905 | }; |