0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include <dt-bindings/gpio/meson-axg-gpio.h>
0011 #include "pinctrl-meson.h"
0012 #include "pinctrl-meson-axg-pmx.h"
0013
0014 static const struct pinctrl_pin_desc meson_axg_periphs_pins[] = {
0015 MESON_PIN(GPIOZ_0),
0016 MESON_PIN(GPIOZ_1),
0017 MESON_PIN(GPIOZ_2),
0018 MESON_PIN(GPIOZ_3),
0019 MESON_PIN(GPIOZ_4),
0020 MESON_PIN(GPIOZ_5),
0021 MESON_PIN(GPIOZ_6),
0022 MESON_PIN(GPIOZ_7),
0023 MESON_PIN(GPIOZ_8),
0024 MESON_PIN(GPIOZ_9),
0025 MESON_PIN(GPIOZ_10),
0026 MESON_PIN(BOOT_0),
0027 MESON_PIN(BOOT_1),
0028 MESON_PIN(BOOT_2),
0029 MESON_PIN(BOOT_3),
0030 MESON_PIN(BOOT_4),
0031 MESON_PIN(BOOT_5),
0032 MESON_PIN(BOOT_6),
0033 MESON_PIN(BOOT_7),
0034 MESON_PIN(BOOT_8),
0035 MESON_PIN(BOOT_9),
0036 MESON_PIN(BOOT_10),
0037 MESON_PIN(BOOT_11),
0038 MESON_PIN(BOOT_12),
0039 MESON_PIN(BOOT_13),
0040 MESON_PIN(BOOT_14),
0041 MESON_PIN(GPIOA_0),
0042 MESON_PIN(GPIOA_1),
0043 MESON_PIN(GPIOA_2),
0044 MESON_PIN(GPIOA_3),
0045 MESON_PIN(GPIOA_4),
0046 MESON_PIN(GPIOA_5),
0047 MESON_PIN(GPIOA_6),
0048 MESON_PIN(GPIOA_7),
0049 MESON_PIN(GPIOA_8),
0050 MESON_PIN(GPIOA_9),
0051 MESON_PIN(GPIOA_10),
0052 MESON_PIN(GPIOA_11),
0053 MESON_PIN(GPIOA_12),
0054 MESON_PIN(GPIOA_13),
0055 MESON_PIN(GPIOA_14),
0056 MESON_PIN(GPIOA_15),
0057 MESON_PIN(GPIOA_16),
0058 MESON_PIN(GPIOA_17),
0059 MESON_PIN(GPIOA_18),
0060 MESON_PIN(GPIOA_19),
0061 MESON_PIN(GPIOA_20),
0062 MESON_PIN(GPIOX_0),
0063 MESON_PIN(GPIOX_1),
0064 MESON_PIN(GPIOX_2),
0065 MESON_PIN(GPIOX_3),
0066 MESON_PIN(GPIOX_4),
0067 MESON_PIN(GPIOX_5),
0068 MESON_PIN(GPIOX_6),
0069 MESON_PIN(GPIOX_7),
0070 MESON_PIN(GPIOX_8),
0071 MESON_PIN(GPIOX_9),
0072 MESON_PIN(GPIOX_10),
0073 MESON_PIN(GPIOX_11),
0074 MESON_PIN(GPIOX_12),
0075 MESON_PIN(GPIOX_13),
0076 MESON_PIN(GPIOX_14),
0077 MESON_PIN(GPIOX_15),
0078 MESON_PIN(GPIOX_16),
0079 MESON_PIN(GPIOX_17),
0080 MESON_PIN(GPIOX_18),
0081 MESON_PIN(GPIOX_19),
0082 MESON_PIN(GPIOX_20),
0083 MESON_PIN(GPIOX_21),
0084 MESON_PIN(GPIOX_22),
0085 MESON_PIN(GPIOY_0),
0086 MESON_PIN(GPIOY_1),
0087 MESON_PIN(GPIOY_2),
0088 MESON_PIN(GPIOY_3),
0089 MESON_PIN(GPIOY_4),
0090 MESON_PIN(GPIOY_5),
0091 MESON_PIN(GPIOY_6),
0092 MESON_PIN(GPIOY_7),
0093 MESON_PIN(GPIOY_8),
0094 MESON_PIN(GPIOY_9),
0095 MESON_PIN(GPIOY_10),
0096 MESON_PIN(GPIOY_11),
0097 MESON_PIN(GPIOY_12),
0098 MESON_PIN(GPIOY_13),
0099 MESON_PIN(GPIOY_14),
0100 MESON_PIN(GPIOY_15),
0101 };
0102
0103 static const struct pinctrl_pin_desc meson_axg_aobus_pins[] = {
0104 MESON_PIN(GPIOAO_0),
0105 MESON_PIN(GPIOAO_1),
0106 MESON_PIN(GPIOAO_2),
0107 MESON_PIN(GPIOAO_3),
0108 MESON_PIN(GPIOAO_4),
0109 MESON_PIN(GPIOAO_5),
0110 MESON_PIN(GPIOAO_6),
0111 MESON_PIN(GPIOAO_7),
0112 MESON_PIN(GPIOAO_8),
0113 MESON_PIN(GPIOAO_9),
0114 MESON_PIN(GPIOAO_10),
0115 MESON_PIN(GPIOAO_11),
0116 MESON_PIN(GPIOAO_12),
0117 MESON_PIN(GPIOAO_13),
0118 MESON_PIN(GPIO_TEST_N),
0119 };
0120
0121
0122 static const unsigned int emmc_nand_d0_pins[] = {BOOT_0};
0123 static const unsigned int emmc_nand_d1_pins[] = {BOOT_1};
0124 static const unsigned int emmc_nand_d2_pins[] = {BOOT_2};
0125 static const unsigned int emmc_nand_d3_pins[] = {BOOT_3};
0126 static const unsigned int emmc_nand_d4_pins[] = {BOOT_4};
0127 static const unsigned int emmc_nand_d5_pins[] = {BOOT_5};
0128 static const unsigned int emmc_nand_d6_pins[] = {BOOT_6};
0129 static const unsigned int emmc_nand_d7_pins[] = {BOOT_7};
0130
0131 static const unsigned int emmc_clk_pins[] = {BOOT_8};
0132 static const unsigned int emmc_cmd_pins[] = {BOOT_10};
0133 static const unsigned int emmc_ds_pins[] = {BOOT_13};
0134
0135
0136 static const unsigned int nand_ce0_pins[] = {BOOT_8};
0137 static const unsigned int nand_ale_pins[] = {BOOT_9};
0138 static const unsigned int nand_cle_pins[] = {BOOT_10};
0139 static const unsigned int nand_wen_clk_pins[] = {BOOT_11};
0140 static const unsigned int nand_ren_wr_pins[] = {BOOT_12};
0141 static const unsigned int nand_rb0_pins[] = {BOOT_13};
0142
0143
0144 static const unsigned int nor_hold_pins[] = {BOOT_3};
0145 static const unsigned int nor_d_pins[] = {BOOT_4};
0146 static const unsigned int nor_q_pins[] = {BOOT_5};
0147 static const unsigned int nor_c_pins[] = {BOOT_6};
0148 static const unsigned int nor_wp_pins[] = {BOOT_9};
0149 static const unsigned int nor_cs_pins[] = {BOOT_14};
0150
0151
0152 static const unsigned int sdio_d0_pins[] = {GPIOX_0};
0153 static const unsigned int sdio_d1_pins[] = {GPIOX_1};
0154 static const unsigned int sdio_d2_pins[] = {GPIOX_2};
0155 static const unsigned int sdio_d3_pins[] = {GPIOX_3};
0156 static const unsigned int sdio_clk_pins[] = {GPIOX_4};
0157 static const unsigned int sdio_cmd_pins[] = {GPIOX_5};
0158
0159
0160 static const unsigned int spi0_clk_pins[] = {GPIOZ_0};
0161 static const unsigned int spi0_mosi_pins[] = {GPIOZ_1};
0162 static const unsigned int spi0_miso_pins[] = {GPIOZ_2};
0163 static const unsigned int spi0_ss0_pins[] = {GPIOZ_3};
0164 static const unsigned int spi0_ss1_pins[] = {GPIOZ_4};
0165 static const unsigned int spi0_ss2_pins[] = {GPIOZ_5};
0166
0167
0168 static const unsigned int spi1_clk_x_pins[] = {GPIOX_19};
0169 static const unsigned int spi1_mosi_x_pins[] = {GPIOX_17};
0170 static const unsigned int spi1_miso_x_pins[] = {GPIOX_18};
0171 static const unsigned int spi1_ss0_x_pins[] = {GPIOX_16};
0172
0173 static const unsigned int spi1_clk_a_pins[] = {GPIOA_4};
0174 static const unsigned int spi1_mosi_a_pins[] = {GPIOA_2};
0175 static const unsigned int spi1_miso_a_pins[] = {GPIOA_3};
0176 static const unsigned int spi1_ss0_a_pins[] = {GPIOA_5};
0177 static const unsigned int spi1_ss1_pins[] = {GPIOA_6};
0178
0179
0180 static const unsigned int i2c0_sck_pins[] = {GPIOZ_6};
0181 static const unsigned int i2c0_sda_pins[] = {GPIOZ_7};
0182
0183
0184 static const unsigned int i2c1_sck_z_pins[] = {GPIOZ_8};
0185 static const unsigned int i2c1_sda_z_pins[] = {GPIOZ_9};
0186
0187 static const unsigned int i2c1_sck_x_pins[] = {GPIOX_16};
0188 static const unsigned int i2c1_sda_x_pins[] = {GPIOX_17};
0189
0190
0191 static const unsigned int i2c2_sck_x_pins[] = {GPIOX_18};
0192 static const unsigned int i2c2_sda_x_pins[] = {GPIOX_19};
0193
0194 static const unsigned int i2c2_sda_a_pins[] = {GPIOA_17};
0195 static const unsigned int i2c2_sck_a_pins[] = {GPIOA_18};
0196
0197
0198 static const unsigned int i2c3_sda_a6_pins[] = {GPIOA_6};
0199 static const unsigned int i2c3_sck_a7_pins[] = {GPIOA_7};
0200
0201 static const unsigned int i2c3_sda_a12_pins[] = {GPIOA_12};
0202 static const unsigned int i2c3_sck_a13_pins[] = {GPIOA_13};
0203
0204 static const unsigned int i2c3_sda_a19_pins[] = {GPIOA_19};
0205 static const unsigned int i2c3_sck_a20_pins[] = {GPIOA_20};
0206
0207
0208 static const unsigned int uart_rts_a_pins[] = {GPIOX_11};
0209 static const unsigned int uart_cts_a_pins[] = {GPIOX_10};
0210 static const unsigned int uart_tx_a_pins[] = {GPIOX_8};
0211 static const unsigned int uart_rx_a_pins[] = {GPIOX_9};
0212
0213
0214 static const unsigned int uart_rts_b_z_pins[] = {GPIOZ_0};
0215 static const unsigned int uart_cts_b_z_pins[] = {GPIOZ_1};
0216 static const unsigned int uart_tx_b_z_pins[] = {GPIOZ_2};
0217 static const unsigned int uart_rx_b_z_pins[] = {GPIOZ_3};
0218
0219 static const unsigned int uart_rts_b_x_pins[] = {GPIOX_18};
0220 static const unsigned int uart_cts_b_x_pins[] = {GPIOX_19};
0221 static const unsigned int uart_tx_b_x_pins[] = {GPIOX_16};
0222 static const unsigned int uart_rx_b_x_pins[] = {GPIOX_17};
0223
0224
0225 static const unsigned int uart_ao_tx_b_z_pins[] = {GPIOZ_8};
0226 static const unsigned int uart_ao_rx_b_z_pins[] = {GPIOZ_9};
0227 static const unsigned int uart_ao_cts_b_z_pins[] = {GPIOZ_6};
0228 static const unsigned int uart_ao_rts_b_z_pins[] = {GPIOZ_7};
0229
0230
0231 static const unsigned int pwm_a_z_pins[] = {GPIOZ_5};
0232
0233 static const unsigned int pwm_a_x18_pins[] = {GPIOX_18};
0234 static const unsigned int pwm_a_x20_pins[] = {GPIOX_20};
0235
0236 static const unsigned int pwm_a_a_pins[] = {GPIOA_14};
0237
0238
0239 static const unsigned int pwm_b_z_pins[] = {GPIOZ_4};
0240
0241 static const unsigned int pwm_b_x_pins[] = {GPIOX_19};
0242
0243 static const unsigned int pwm_b_a_pins[] = {GPIOA_15};
0244
0245
0246 static const unsigned int pwm_c_x10_pins[] = {GPIOX_10};
0247 static const unsigned int pwm_c_x17_pins[] = {GPIOX_17};
0248
0249 static const unsigned int pwm_c_a_pins[] = {GPIOA_16};
0250
0251
0252 static const unsigned int pwm_d_x11_pins[] = {GPIOX_11};
0253 static const unsigned int pwm_d_x16_pins[] = {GPIOX_16};
0254
0255
0256 static const unsigned int pwm_vs_pins[] = {GPIOA_0};
0257
0258
0259 static const unsigned int spdif_in_z_pins[] = {GPIOZ_4};
0260
0261 static const unsigned int spdif_in_a1_pins[] = {GPIOA_1};
0262 static const unsigned int spdif_in_a7_pins[] = {GPIOA_7};
0263 static const unsigned int spdif_in_a19_pins[] = {GPIOA_19};
0264 static const unsigned int spdif_in_a20_pins[] = {GPIOA_20};
0265
0266
0267 static const unsigned int spdif_out_z_pins[] = {GPIOZ_5};
0268
0269 static const unsigned int spdif_out_a1_pins[] = {GPIOA_1};
0270 static const unsigned int spdif_out_a11_pins[] = {GPIOA_11};
0271 static const unsigned int spdif_out_a19_pins[] = {GPIOA_19};
0272 static const unsigned int spdif_out_a20_pins[] = {GPIOA_20};
0273
0274
0275 static const unsigned int jtag_tdo_x_pins[] = {GPIOX_0};
0276 static const unsigned int jtag_tdi_x_pins[] = {GPIOX_1};
0277 static const unsigned int jtag_clk_x_pins[] = {GPIOX_4};
0278 static const unsigned int jtag_tms_x_pins[] = {GPIOX_5};
0279
0280
0281 static const unsigned int eth_txd0_x_pins[] = {GPIOX_8};
0282 static const unsigned int eth_txd1_x_pins[] = {GPIOX_9};
0283 static const unsigned int eth_txen_x_pins[] = {GPIOX_10};
0284 static const unsigned int eth_rgmii_rx_clk_x_pins[] = {GPIOX_12};
0285 static const unsigned int eth_rxd0_x_pins[] = {GPIOX_13};
0286 static const unsigned int eth_rxd1_x_pins[] = {GPIOX_14};
0287 static const unsigned int eth_rx_dv_x_pins[] = {GPIOX_15};
0288 static const unsigned int eth_mdio_x_pins[] = {GPIOX_21};
0289 static const unsigned int eth_mdc_x_pins[] = {GPIOX_22};
0290
0291 static const unsigned int eth_txd0_y_pins[] = {GPIOY_10};
0292 static const unsigned int eth_txd1_y_pins[] = {GPIOY_11};
0293 static const unsigned int eth_txen_y_pins[] = {GPIOY_9};
0294 static const unsigned int eth_rgmii_rx_clk_y_pins[] = {GPIOY_2};
0295 static const unsigned int eth_rxd0_y_pins[] = {GPIOY_4};
0296 static const unsigned int eth_rxd1_y_pins[] = {GPIOY_5};
0297 static const unsigned int eth_rx_dv_y_pins[] = {GPIOY_3};
0298 static const unsigned int eth_mdio_y_pins[] = {GPIOY_0};
0299 static const unsigned int eth_mdc_y_pins[] = {GPIOY_1};
0300
0301 static const unsigned int eth_rxd2_rgmii_pins[] = {GPIOY_6};
0302 static const unsigned int eth_rxd3_rgmii_pins[] = {GPIOY_7};
0303 static const unsigned int eth_rgmii_tx_clk_pins[] = {GPIOY_8};
0304 static const unsigned int eth_txd2_rgmii_pins[] = {GPIOY_12};
0305 static const unsigned int eth_txd3_rgmii_pins[] = {GPIOY_13};
0306
0307
0308 static const unsigned int pdm_dclk_a14_pins[] = {GPIOA_14};
0309 static const unsigned int pdm_dclk_a19_pins[] = {GPIOA_19};
0310 static const unsigned int pdm_din0_pins[] = {GPIOA_15};
0311 static const unsigned int pdm_din1_pins[] = {GPIOA_16};
0312 static const unsigned int pdm_din2_pins[] = {GPIOA_17};
0313 static const unsigned int pdm_din3_pins[] = {GPIOA_18};
0314
0315
0316 static const unsigned int mclk_c_pins[] = {GPIOA_0};
0317 static const unsigned int mclk_b_pins[] = {GPIOA_1};
0318
0319
0320 static const unsigned int tdma_sclk_pins[] = {GPIOX_12};
0321 static const unsigned int tdma_sclk_slv_pins[] = {GPIOX_12};
0322 static const unsigned int tdma_fs_pins[] = {GPIOX_13};
0323 static const unsigned int tdma_fs_slv_pins[] = {GPIOX_13};
0324 static const unsigned int tdma_din0_pins[] = {GPIOX_14};
0325 static const unsigned int tdma_dout0_x14_pins[] = {GPIOX_14};
0326 static const unsigned int tdma_dout0_x15_pins[] = {GPIOX_15};
0327 static const unsigned int tdma_dout1_pins[] = {GPIOX_15};
0328 static const unsigned int tdma_din1_pins[] = {GPIOX_15};
0329
0330 static const unsigned int tdmc_sclk_pins[] = {GPIOA_2};
0331 static const unsigned int tdmc_sclk_slv_pins[] = {GPIOA_2};
0332 static const unsigned int tdmc_fs_pins[] = {GPIOA_3};
0333 static const unsigned int tdmc_fs_slv_pins[] = {GPIOA_3};
0334 static const unsigned int tdmc_din0_pins[] = {GPIOA_4};
0335 static const unsigned int tdmc_dout0_pins[] = {GPIOA_4};
0336 static const unsigned int tdmc_din1_pins[] = {GPIOA_5};
0337 static const unsigned int tdmc_dout1_pins[] = {GPIOA_5};
0338 static const unsigned int tdmc_din2_pins[] = {GPIOA_6};
0339 static const unsigned int tdmc_dout2_pins[] = {GPIOA_6};
0340 static const unsigned int tdmc_din3_pins[] = {GPIOA_7};
0341 static const unsigned int tdmc_dout3_pins[] = {GPIOA_7};
0342
0343 static const unsigned int tdmb_sclk_pins[] = {GPIOA_8};
0344 static const unsigned int tdmb_sclk_slv_pins[] = {GPIOA_8};
0345 static const unsigned int tdmb_fs_pins[] = {GPIOA_9};
0346 static const unsigned int tdmb_fs_slv_pins[] = {GPIOA_9};
0347 static const unsigned int tdmb_din0_pins[] = {GPIOA_10};
0348 static const unsigned int tdmb_dout0_pins[] = {GPIOA_10};
0349 static const unsigned int tdmb_din1_pins[] = {GPIOA_11};
0350 static const unsigned int tdmb_dout1_pins[] = {GPIOA_11};
0351 static const unsigned int tdmb_din2_pins[] = {GPIOA_12};
0352 static const unsigned int tdmb_dout2_pins[] = {GPIOA_12};
0353 static const unsigned int tdmb_din3_pins[] = {GPIOA_13};
0354 static const unsigned int tdmb_dout3_pins[] = {GPIOA_13};
0355
0356 static struct meson_pmx_group meson_axg_periphs_groups[] = {
0357 GPIO_GROUP(GPIOZ_0),
0358 GPIO_GROUP(GPIOZ_1),
0359 GPIO_GROUP(GPIOZ_2),
0360 GPIO_GROUP(GPIOZ_3),
0361 GPIO_GROUP(GPIOZ_4),
0362 GPIO_GROUP(GPIOZ_5),
0363 GPIO_GROUP(GPIOZ_6),
0364 GPIO_GROUP(GPIOZ_7),
0365 GPIO_GROUP(GPIOZ_8),
0366 GPIO_GROUP(GPIOZ_9),
0367 GPIO_GROUP(GPIOZ_10),
0368
0369 GPIO_GROUP(BOOT_0),
0370 GPIO_GROUP(BOOT_1),
0371 GPIO_GROUP(BOOT_2),
0372 GPIO_GROUP(BOOT_3),
0373 GPIO_GROUP(BOOT_4),
0374 GPIO_GROUP(BOOT_5),
0375 GPIO_GROUP(BOOT_6),
0376 GPIO_GROUP(BOOT_7),
0377 GPIO_GROUP(BOOT_8),
0378 GPIO_GROUP(BOOT_9),
0379 GPIO_GROUP(BOOT_10),
0380 GPIO_GROUP(BOOT_11),
0381 GPIO_GROUP(BOOT_12),
0382 GPIO_GROUP(BOOT_13),
0383 GPIO_GROUP(BOOT_14),
0384
0385 GPIO_GROUP(GPIOA_0),
0386 GPIO_GROUP(GPIOA_1),
0387 GPIO_GROUP(GPIOA_2),
0388 GPIO_GROUP(GPIOA_3),
0389 GPIO_GROUP(GPIOA_4),
0390 GPIO_GROUP(GPIOA_5),
0391 GPIO_GROUP(GPIOA_6),
0392 GPIO_GROUP(GPIOA_7),
0393 GPIO_GROUP(GPIOA_8),
0394 GPIO_GROUP(GPIOA_9),
0395 GPIO_GROUP(GPIOA_10),
0396 GPIO_GROUP(GPIOA_11),
0397 GPIO_GROUP(GPIOA_12),
0398 GPIO_GROUP(GPIOA_13),
0399 GPIO_GROUP(GPIOA_14),
0400 GPIO_GROUP(GPIOA_15),
0401 GPIO_GROUP(GPIOA_16),
0402 GPIO_GROUP(GPIOA_17),
0403 GPIO_GROUP(GPIOA_19),
0404 GPIO_GROUP(GPIOA_20),
0405
0406 GPIO_GROUP(GPIOX_0),
0407 GPIO_GROUP(GPIOX_1),
0408 GPIO_GROUP(GPIOX_2),
0409 GPIO_GROUP(GPIOX_3),
0410 GPIO_GROUP(GPIOX_4),
0411 GPIO_GROUP(GPIOX_5),
0412 GPIO_GROUP(GPIOX_6),
0413 GPIO_GROUP(GPIOX_7),
0414 GPIO_GROUP(GPIOX_8),
0415 GPIO_GROUP(GPIOX_9),
0416 GPIO_GROUP(GPIOX_10),
0417 GPIO_GROUP(GPIOX_11),
0418 GPIO_GROUP(GPIOX_12),
0419 GPIO_GROUP(GPIOX_13),
0420 GPIO_GROUP(GPIOX_14),
0421 GPIO_GROUP(GPIOX_15),
0422 GPIO_GROUP(GPIOX_16),
0423 GPIO_GROUP(GPIOX_17),
0424 GPIO_GROUP(GPIOX_18),
0425 GPIO_GROUP(GPIOX_19),
0426 GPIO_GROUP(GPIOX_20),
0427 GPIO_GROUP(GPIOX_21),
0428 GPIO_GROUP(GPIOX_22),
0429
0430 GPIO_GROUP(GPIOY_0),
0431 GPIO_GROUP(GPIOY_1),
0432 GPIO_GROUP(GPIOY_2),
0433 GPIO_GROUP(GPIOY_3),
0434 GPIO_GROUP(GPIOY_4),
0435 GPIO_GROUP(GPIOY_5),
0436 GPIO_GROUP(GPIOY_6),
0437 GPIO_GROUP(GPIOY_7),
0438 GPIO_GROUP(GPIOY_8),
0439 GPIO_GROUP(GPIOY_9),
0440 GPIO_GROUP(GPIOY_10),
0441 GPIO_GROUP(GPIOY_11),
0442 GPIO_GROUP(GPIOY_12),
0443 GPIO_GROUP(GPIOY_13),
0444 GPIO_GROUP(GPIOY_14),
0445 GPIO_GROUP(GPIOY_15),
0446
0447
0448 GROUP(emmc_nand_d0, 1),
0449 GROUP(emmc_nand_d1, 1),
0450 GROUP(emmc_nand_d2, 1),
0451 GROUP(emmc_nand_d3, 1),
0452 GROUP(emmc_nand_d4, 1),
0453 GROUP(emmc_nand_d5, 1),
0454 GROUP(emmc_nand_d6, 1),
0455 GROUP(emmc_nand_d7, 1),
0456 GROUP(emmc_clk, 1),
0457 GROUP(emmc_cmd, 1),
0458 GROUP(emmc_ds, 1),
0459 GROUP(nand_ce0, 2),
0460 GROUP(nand_ale, 2),
0461 GROUP(nand_cle, 2),
0462 GROUP(nand_wen_clk, 2),
0463 GROUP(nand_ren_wr, 2),
0464 GROUP(nand_rb0, 2),
0465 GROUP(nor_hold, 3),
0466 GROUP(nor_d, 3),
0467 GROUP(nor_q, 3),
0468 GROUP(nor_c, 3),
0469 GROUP(nor_wp, 3),
0470 GROUP(nor_cs, 3),
0471
0472
0473 GROUP(spi0_clk, 1),
0474 GROUP(spi0_mosi, 1),
0475 GROUP(spi0_miso, 1),
0476 GROUP(spi0_ss0, 1),
0477 GROUP(spi0_ss1, 1),
0478 GROUP(spi0_ss2, 1),
0479 GROUP(i2c0_sck, 1),
0480 GROUP(i2c0_sda, 1),
0481 GROUP(i2c1_sck_z, 1),
0482 GROUP(i2c1_sda_z, 1),
0483 GROUP(uart_rts_b_z, 2),
0484 GROUP(uart_cts_b_z, 2),
0485 GROUP(uart_tx_b_z, 2),
0486 GROUP(uart_rx_b_z, 2),
0487 GROUP(pwm_a_z, 2),
0488 GROUP(pwm_b_z, 2),
0489 GROUP(spdif_in_z, 3),
0490 GROUP(spdif_out_z, 3),
0491 GROUP(uart_ao_tx_b_z, 2),
0492 GROUP(uart_ao_rx_b_z, 2),
0493 GROUP(uart_ao_cts_b_z, 2),
0494 GROUP(uart_ao_rts_b_z, 2),
0495
0496
0497 GROUP(sdio_d0, 1),
0498 GROUP(sdio_d1, 1),
0499 GROUP(sdio_d2, 1),
0500 GROUP(sdio_d3, 1),
0501 GROUP(sdio_clk, 1),
0502 GROUP(sdio_cmd, 1),
0503 GROUP(i2c1_sck_x, 1),
0504 GROUP(i2c1_sda_x, 1),
0505 GROUP(i2c2_sck_x, 1),
0506 GROUP(i2c2_sda_x, 1),
0507 GROUP(uart_rts_a, 1),
0508 GROUP(uart_cts_a, 1),
0509 GROUP(uart_tx_a, 1),
0510 GROUP(uart_rx_a, 1),
0511 GROUP(uart_rts_b_x, 2),
0512 GROUP(uart_cts_b_x, 2),
0513 GROUP(uart_tx_b_x, 2),
0514 GROUP(uart_rx_b_x, 2),
0515 GROUP(jtag_tdo_x, 2),
0516 GROUP(jtag_tdi_x, 2),
0517 GROUP(jtag_clk_x, 2),
0518 GROUP(jtag_tms_x, 2),
0519 GROUP(spi1_clk_x, 4),
0520 GROUP(spi1_mosi_x, 4),
0521 GROUP(spi1_miso_x, 4),
0522 GROUP(spi1_ss0_x, 4),
0523 GROUP(pwm_a_x18, 3),
0524 GROUP(pwm_a_x20, 1),
0525 GROUP(pwm_b_x, 3),
0526 GROUP(pwm_c_x10, 3),
0527 GROUP(pwm_c_x17, 3),
0528 GROUP(pwm_d_x11, 3),
0529 GROUP(pwm_d_x16, 3),
0530 GROUP(eth_txd0_x, 4),
0531 GROUP(eth_txd1_x, 4),
0532 GROUP(eth_txen_x, 4),
0533 GROUP(eth_rgmii_rx_clk_x, 4),
0534 GROUP(eth_rxd0_x, 4),
0535 GROUP(eth_rxd1_x, 4),
0536 GROUP(eth_rx_dv_x, 4),
0537 GROUP(eth_mdio_x, 4),
0538 GROUP(eth_mdc_x, 4),
0539 GROUP(tdma_sclk, 1),
0540 GROUP(tdma_sclk_slv, 2),
0541 GROUP(tdma_fs, 1),
0542 GROUP(tdma_fs_slv, 2),
0543 GROUP(tdma_din0, 1),
0544 GROUP(tdma_dout0_x14, 2),
0545 GROUP(tdma_dout0_x15, 1),
0546 GROUP(tdma_dout1, 2),
0547 GROUP(tdma_din1, 3),
0548
0549
0550 GROUP(eth_txd0_y, 1),
0551 GROUP(eth_txd1_y, 1),
0552 GROUP(eth_txen_y, 1),
0553 GROUP(eth_rgmii_rx_clk_y, 1),
0554 GROUP(eth_rxd0_y, 1),
0555 GROUP(eth_rxd1_y, 1),
0556 GROUP(eth_rx_dv_y, 1),
0557 GROUP(eth_mdio_y, 1),
0558 GROUP(eth_mdc_y, 1),
0559 GROUP(eth_rxd2_rgmii, 1),
0560 GROUP(eth_rxd3_rgmii, 1),
0561 GROUP(eth_rgmii_tx_clk, 1),
0562 GROUP(eth_txd2_rgmii, 1),
0563 GROUP(eth_txd3_rgmii, 1),
0564
0565
0566 GROUP(spdif_out_a1, 4),
0567 GROUP(spdif_out_a11, 3),
0568 GROUP(spdif_out_a19, 2),
0569 GROUP(spdif_out_a20, 1),
0570 GROUP(spdif_in_a1, 3),
0571 GROUP(spdif_in_a7, 3),
0572 GROUP(spdif_in_a19, 1),
0573 GROUP(spdif_in_a20, 2),
0574 GROUP(spi1_clk_a, 3),
0575 GROUP(spi1_mosi_a, 3),
0576 GROUP(spi1_miso_a, 3),
0577 GROUP(spi1_ss0_a, 3),
0578 GROUP(spi1_ss1, 3),
0579 GROUP(pwm_a_a, 3),
0580 GROUP(pwm_b_a, 3),
0581 GROUP(pwm_c_a, 3),
0582 GROUP(pwm_vs, 2),
0583 GROUP(i2c2_sda_a, 3),
0584 GROUP(i2c2_sck_a, 3),
0585 GROUP(i2c3_sda_a6, 4),
0586 GROUP(i2c3_sck_a7, 4),
0587 GROUP(i2c3_sda_a12, 4),
0588 GROUP(i2c3_sck_a13, 4),
0589 GROUP(i2c3_sda_a19, 4),
0590 GROUP(i2c3_sck_a20, 4),
0591 GROUP(pdm_dclk_a14, 1),
0592 GROUP(pdm_dclk_a19, 3),
0593 GROUP(pdm_din0, 1),
0594 GROUP(pdm_din1, 1),
0595 GROUP(pdm_din2, 1),
0596 GROUP(pdm_din3, 1),
0597 GROUP(mclk_c, 1),
0598 GROUP(mclk_b, 1),
0599 GROUP(tdmc_sclk, 1),
0600 GROUP(tdmc_sclk_slv, 2),
0601 GROUP(tdmc_fs, 1),
0602 GROUP(tdmc_fs_slv, 2),
0603 GROUP(tdmc_din0, 2),
0604 GROUP(tdmc_dout0, 1),
0605 GROUP(tdmc_din1, 2),
0606 GROUP(tdmc_dout1, 1),
0607 GROUP(tdmc_din2, 2),
0608 GROUP(tdmc_dout2, 1),
0609 GROUP(tdmc_din3, 2),
0610 GROUP(tdmc_dout3, 1),
0611 GROUP(tdmb_sclk, 1),
0612 GROUP(tdmb_sclk_slv, 2),
0613 GROUP(tdmb_fs, 1),
0614 GROUP(tdmb_fs_slv, 2),
0615 GROUP(tdmb_din0, 2),
0616 GROUP(tdmb_dout0, 1),
0617 GROUP(tdmb_din1, 2),
0618 GROUP(tdmb_dout1, 1),
0619 GROUP(tdmb_din2, 2),
0620 GROUP(tdmb_dout2, 1),
0621 GROUP(tdmb_din3, 2),
0622 GROUP(tdmb_dout3, 1),
0623 };
0624
0625
0626 static const unsigned int uart_ao_tx_a_pins[] = {GPIOAO_0};
0627 static const unsigned int uart_ao_rx_a_pins[] = {GPIOAO_1};
0628 static const unsigned int uart_ao_cts_a_pins[] = {GPIOAO_2};
0629 static const unsigned int uart_ao_rts_a_pins[] = {GPIOAO_3};
0630
0631
0632 static const unsigned int uart_ao_tx_b_pins[] = {GPIOAO_4};
0633 static const unsigned int uart_ao_rx_b_pins[] = {GPIOAO_5};
0634 static const unsigned int uart_ao_cts_b_pins[] = {GPIOAO_2};
0635 static const unsigned int uart_ao_rts_b_pins[] = {GPIOAO_3};
0636
0637
0638 static const unsigned int i2c_ao_sck_4_pins[] = {GPIOAO_4};
0639 static const unsigned int i2c_ao_sda_5_pins[] = {GPIOAO_5};
0640 static const unsigned int i2c_ao_sck_8_pins[] = {GPIOAO_8};
0641 static const unsigned int i2c_ao_sda_9_pins[] = {GPIOAO_9};
0642 static const unsigned int i2c_ao_sck_10_pins[] = {GPIOAO_10};
0643 static const unsigned int i2c_ao_sda_11_pins[] = {GPIOAO_11};
0644
0645
0646 static const unsigned int i2c_ao_slave_sck_pins[] = {GPIOAO_10};
0647 static const unsigned int i2c_ao_slave_sda_pins[] = {GPIOAO_11};
0648
0649
0650 static const unsigned int remote_input_ao_pins[] = {GPIOAO_6};
0651
0652
0653 static const unsigned int remote_out_ao_pins[] = {GPIOAO_7};
0654
0655
0656 static const unsigned int pwm_ao_a_pins[] = {GPIOAO_3};
0657
0658
0659 static const unsigned int pwm_ao_b_ao2_pins[] = {GPIOAO_2};
0660 static const unsigned int pwm_ao_b_ao12_pins[] = {GPIOAO_12};
0661
0662
0663 static const unsigned int pwm_ao_c_ao8_pins[] = {GPIOAO_8};
0664 static const unsigned int pwm_ao_c_ao13_pins[] = {GPIOAO_13};
0665
0666
0667 static const unsigned int pwm_ao_d_pins[] = {GPIOAO_9};
0668
0669
0670 static const unsigned int jtag_ao_tdi_pins[] = {GPIOAO_3};
0671 static const unsigned int jtag_ao_tdo_pins[] = {GPIOAO_4};
0672 static const unsigned int jtag_ao_clk_pins[] = {GPIOAO_5};
0673 static const unsigned int jtag_ao_tms_pins[] = {GPIOAO_7};
0674
0675
0676 static const unsigned int gen_clk_ee_pins[] = {GPIOAO_13};
0677
0678 static struct meson_pmx_group meson_axg_aobus_groups[] = {
0679 GPIO_GROUP(GPIOAO_0),
0680 GPIO_GROUP(GPIOAO_1),
0681 GPIO_GROUP(GPIOAO_2),
0682 GPIO_GROUP(GPIOAO_3),
0683 GPIO_GROUP(GPIOAO_4),
0684 GPIO_GROUP(GPIOAO_5),
0685 GPIO_GROUP(GPIOAO_6),
0686 GPIO_GROUP(GPIOAO_7),
0687 GPIO_GROUP(GPIOAO_8),
0688 GPIO_GROUP(GPIOAO_9),
0689 GPIO_GROUP(GPIOAO_10),
0690 GPIO_GROUP(GPIOAO_11),
0691 GPIO_GROUP(GPIOAO_12),
0692 GPIO_GROUP(GPIOAO_13),
0693 GPIO_GROUP(GPIO_TEST_N),
0694
0695
0696 GROUP(uart_ao_tx_a, 1),
0697 GROUP(uart_ao_rx_a, 1),
0698 GROUP(uart_ao_cts_a, 2),
0699 GROUP(uart_ao_rts_a, 2),
0700 GROUP(uart_ao_tx_b, 1),
0701 GROUP(uart_ao_rx_b, 1),
0702 GROUP(uart_ao_cts_b, 1),
0703 GROUP(uart_ao_rts_b, 1),
0704 GROUP(i2c_ao_sck_4, 2),
0705 GROUP(i2c_ao_sda_5, 2),
0706 GROUP(i2c_ao_sck_8, 2),
0707 GROUP(i2c_ao_sda_9, 2),
0708 GROUP(i2c_ao_sck_10, 2),
0709 GROUP(i2c_ao_sda_11, 2),
0710 GROUP(i2c_ao_slave_sck, 1),
0711 GROUP(i2c_ao_slave_sda, 1),
0712 GROUP(remote_input_ao, 1),
0713 GROUP(remote_out_ao, 1),
0714 GROUP(pwm_ao_a, 3),
0715 GROUP(pwm_ao_b_ao2, 3),
0716 GROUP(pwm_ao_b_ao12, 3),
0717 GROUP(pwm_ao_c_ao8, 3),
0718 GROUP(pwm_ao_c_ao13, 3),
0719 GROUP(pwm_ao_d, 3),
0720 GROUP(jtag_ao_tdi, 4),
0721 GROUP(jtag_ao_tdo, 4),
0722 GROUP(jtag_ao_clk, 4),
0723 GROUP(jtag_ao_tms, 4),
0724 GROUP(gen_clk_ee, 4),
0725 };
0726
0727 static const char * const gpio_periphs_groups[] = {
0728 "GPIOZ_0", "GPIOZ_1", "GPIOZ_2", "GPIOZ_3", "GPIOZ_4",
0729 "GPIOZ_5", "GPIOZ_6", "GPIOZ_7", "GPIOZ_8", "GPIOZ_9",
0730 "GPIOZ_10",
0731
0732 "BOOT_0", "BOOT_1", "BOOT_2", "BOOT_3", "BOOT_4",
0733 "BOOT_5", "BOOT_6", "BOOT_7", "BOOT_8", "BOOT_9",
0734 "BOOT_10", "BOOT_11", "BOOT_12", "BOOT_13", "BOOT_14",
0735
0736 "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4",
0737 "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9",
0738 "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14",
0739 "GPIOA_15", "GPIOA_16", "GPIOA_17", "GPIOA_18", "GPIOA_19",
0740 "GPIOA_20",
0741
0742 "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4",
0743 "GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9",
0744 "GPIOX_10", "GPIOX_11", "GPIOX_12", "GPIOX_13", "GPIOX_14",
0745 "GPIOX_15", "GPIOX_16", "GPIOX_17", "GPIOX_18", "GPIOX_19",
0746 "GPIOX_20", "GPIOX_21", "GPIOX_22",
0747
0748 "GPIOY_0", "GPIOY_1", "GPIOY_2", "GPIOY_3", "GPIOY_4",
0749 "GPIOY_5", "GPIOY_6", "GPIOY_7", "GPIOY_8", "GPIOY_9",
0750 "GPIOY_10", "GPIOY_11", "GPIOY_12", "GPIOY_13", "GPIOY_14",
0751 "GPIOY_15",
0752 };
0753
0754 static const char * const emmc_groups[] = {
0755 "emmc_nand_d0", "emmc_nand_d1", "emmc_nand_d2",
0756 "emmc_nand_d3", "emmc_nand_d4", "emmc_nand_d5",
0757 "emmc_nand_d6", "emmc_nand_d7",
0758 "emmc_clk", "emmc_cmd", "emmc_ds",
0759 };
0760
0761 static const char * const nand_groups[] = {
0762 "emmc_nand_d0", "emmc_nand_d1", "emmc_nand_d2",
0763 "emmc_nand_d3", "emmc_nand_d4", "emmc_nand_d5",
0764 "emmc_nand_d6", "emmc_nand_d7",
0765 "nand_ce0", "nand_ale", "nand_cle",
0766 "nand_wen_clk", "nand_ren_wr", "nand_rb0",
0767 };
0768
0769 static const char * const nor_groups[] = {
0770 "nor_d", "nor_q", "nor_c", "nor_cs",
0771 "nor_hold", "nor_wp",
0772 };
0773
0774 static const char * const sdio_groups[] = {
0775 "sdio_d0", "sdio_d1", "sdio_d2", "sdio_d3",
0776 "sdio_cmd", "sdio_clk",
0777 };
0778
0779 static const char * const spi0_groups[] = {
0780 "spi0_clk", "spi0_mosi", "spi0_miso", "spi0_ss0",
0781 "spi0_ss1", "spi0_ss2"
0782 };
0783
0784 static const char * const spi1_groups[] = {
0785 "spi1_clk_x", "spi1_mosi_x", "spi1_miso_x", "spi1_ss0_x",
0786 "spi1_clk_a", "spi1_mosi_a", "spi1_miso_a", "spi1_ss0_a",
0787 "spi1_ss1"
0788 };
0789
0790 static const char * const uart_a_groups[] = {
0791 "uart_tx_a", "uart_rx_a", "uart_cts_a", "uart_rts_a",
0792 };
0793
0794 static const char * const uart_b_groups[] = {
0795 "uart_tx_b_z", "uart_rx_b_z", "uart_cts_b_z", "uart_rts_b_z",
0796 "uart_tx_b_x", "uart_rx_b_x", "uart_cts_b_x", "uart_rts_b_x",
0797 };
0798
0799 static const char * const uart_ao_b_z_groups[] = {
0800 "uart_ao_tx_b_z", "uart_ao_rx_b_z",
0801 "uart_ao_cts_b_z", "uart_ao_rts_b_z",
0802 };
0803
0804 static const char * const i2c0_groups[] = {
0805 "i2c0_sck", "i2c0_sda",
0806 };
0807
0808 static const char * const i2c1_groups[] = {
0809 "i2c1_sck_z", "i2c1_sda_z",
0810 "i2c1_sck_x", "i2c1_sda_x",
0811 };
0812
0813 static const char * const i2c2_groups[] = {
0814 "i2c2_sck_x", "i2c2_sda_x",
0815 "i2c2_sda_a", "i2c2_sck_a",
0816 };
0817
0818 static const char * const i2c3_groups[] = {
0819 "i2c3_sda_a6", "i2c3_sck_a7",
0820 "i2c3_sda_a12", "i2c3_sck_a13",
0821 "i2c3_sda_a19", "i2c3_sck_a20",
0822 };
0823
0824 static const char * const eth_groups[] = {
0825 "eth_rxd2_rgmii", "eth_rxd3_rgmii", "eth_rgmii_tx_clk",
0826 "eth_txd2_rgmii", "eth_txd3_rgmii",
0827 "eth_txd0_x", "eth_txd1_x", "eth_txen_x", "eth_rgmii_rx_clk_x",
0828 "eth_rxd0_x", "eth_rxd1_x", "eth_rx_dv_x", "eth_mdio_x",
0829 "eth_mdc_x",
0830 "eth_txd0_y", "eth_txd1_y", "eth_txen_y", "eth_rgmii_rx_clk_y",
0831 "eth_rxd0_y", "eth_rxd1_y", "eth_rx_dv_y", "eth_mdio_y",
0832 "eth_mdc_y",
0833 };
0834
0835 static const char * const pwm_a_groups[] = {
0836 "pwm_a_z", "pwm_a_x18", "pwm_a_x20", "pwm_a_a",
0837 };
0838
0839 static const char * const pwm_b_groups[] = {
0840 "pwm_b_z", "pwm_b_x", "pwm_b_a",
0841 };
0842
0843 static const char * const pwm_c_groups[] = {
0844 "pwm_c_x10", "pwm_c_x17", "pwm_c_a",
0845 };
0846
0847 static const char * const pwm_d_groups[] = {
0848 "pwm_d_x11", "pwm_d_x16",
0849 };
0850
0851 static const char * const pwm_vs_groups[] = {
0852 "pwm_vs",
0853 };
0854
0855 static const char * const spdif_out_groups[] = {
0856 "spdif_out_z", "spdif_out_a1", "spdif_out_a11",
0857 "spdif_out_a19", "spdif_out_a20",
0858 };
0859
0860 static const char * const spdif_in_groups[] = {
0861 "spdif_in_z", "spdif_in_a1", "spdif_in_a7",
0862 "spdif_in_a19", "spdif_in_a20",
0863 };
0864
0865 static const char * const jtag_ee_groups[] = {
0866 "jtag_tdo_x", "jtag_tdi_x", "jtag_clk_x",
0867 "jtag_tms_x",
0868 };
0869
0870 static const char * const pdm_groups[] = {
0871 "pdm_din0", "pdm_din1", "pdm_din2", "pdm_din3",
0872 "pdm_dclk_a14", "pdm_dclk_a19",
0873 };
0874
0875 static const char * const gpio_aobus_groups[] = {
0876 "GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4",
0877 "GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9",
0878 "GPIOAO_10", "GPIOAO_11", "GPIOAO_12", "GPIOAO_13",
0879 "GPIO_TEST_N",
0880 };
0881
0882 static const char * const uart_ao_a_groups[] = {
0883 "uart_ao_tx_a", "uart_ao_rx_a", "uart_ao_cts_a", "uart_ao_rts_a",
0884 };
0885
0886 static const char * const uart_ao_b_groups[] = {
0887 "uart_ao_tx_b", "uart_ao_rx_b", "uart_ao_cts_b", "uart_ao_rts_b",
0888 };
0889
0890 static const char * const i2c_ao_groups[] = {
0891 "i2c_ao_sck_4", "i2c_ao_sda_5",
0892 "i2c_ao_sck_8", "i2c_ao_sda_9",
0893 "i2c_ao_sck_10", "i2c_ao_sda_11",
0894 };
0895
0896 static const char * const i2c_ao_slave_groups[] = {
0897 "i2c_ao_slave_sck", "i2c_ao_slave_sda",
0898 };
0899
0900 static const char * const remote_input_ao_groups[] = {
0901 "remote_input_ao",
0902 };
0903
0904 static const char * const remote_out_ao_groups[] = {
0905 "remote_out_ao",
0906 };
0907
0908 static const char * const pwm_ao_a_groups[] = {
0909 "pwm_ao_a",
0910 };
0911
0912 static const char * const pwm_ao_b_groups[] = {
0913 "pwm_ao_b_ao2", "pwm_ao_b_ao12",
0914 };
0915
0916 static const char * const pwm_ao_c_groups[] = {
0917 "pwm_ao_c_ao8", "pwm_ao_c_ao13",
0918 };
0919
0920 static const char * const pwm_ao_d_groups[] = {
0921 "pwm_ao_d",
0922 };
0923
0924 static const char * const jtag_ao_groups[] = {
0925 "jtag_ao_tdi", "jtag_ao_tdo", "jtag_ao_clk", "jtag_ao_tms",
0926 };
0927
0928 static const char * const mclk_c_groups[] = {
0929 "mclk_c",
0930 };
0931
0932 static const char * const mclk_b_groups[] = {
0933 "mclk_b",
0934 };
0935
0936 static const char * const tdma_groups[] = {
0937 "tdma_sclk", "tdma_sclk_slv", "tdma_fs", "tdma_fs_slv",
0938 "tdma_din0", "tdma_dout0_x14", "tdma_dout0_x15", "tdma_dout1",
0939 "tdma_din1",
0940 };
0941
0942 static const char * const tdmc_groups[] = {
0943 "tdmc_sclk", "tdmc_sclk_slv", "tdmc_fs", "tdmc_fs_slv",
0944 "tdmc_din0", "tdmc_dout0", "tdmc_din1", "tdmc_dout1",
0945 "tdmc_din2", "tdmc_dout2", "tdmc_din3", "tdmc_dout3",
0946 };
0947
0948 static const char * const tdmb_groups[] = {
0949 "tdmb_sclk", "tdmb_sclk_slv", "tdmb_fs", "tdmb_fs_slv",
0950 "tdmb_din0", "tdmb_dout0", "tdmb_din1", "tdmb_dout1",
0951 "tdmb_din2", "tdmb_dout2", "tdmb_din3", "tdmb_dout3",
0952 };
0953
0954 static const char * const gen_clk_ee_groups[] = {
0955 "gen_clk_ee",
0956 };
0957
0958 static struct meson_pmx_func meson_axg_periphs_functions[] = {
0959 FUNCTION(gpio_periphs),
0960 FUNCTION(emmc),
0961 FUNCTION(nor),
0962 FUNCTION(spi0),
0963 FUNCTION(spi1),
0964 FUNCTION(sdio),
0965 FUNCTION(nand),
0966 FUNCTION(uart_a),
0967 FUNCTION(uart_b),
0968 FUNCTION(uart_ao_b_z),
0969 FUNCTION(i2c0),
0970 FUNCTION(i2c1),
0971 FUNCTION(i2c2),
0972 FUNCTION(i2c3),
0973 FUNCTION(eth),
0974 FUNCTION(pwm_a),
0975 FUNCTION(pwm_b),
0976 FUNCTION(pwm_c),
0977 FUNCTION(pwm_d),
0978 FUNCTION(pwm_vs),
0979 FUNCTION(spdif_out),
0980 FUNCTION(spdif_in),
0981 FUNCTION(jtag_ee),
0982 FUNCTION(pdm),
0983 FUNCTION(mclk_b),
0984 FUNCTION(mclk_c),
0985 FUNCTION(tdma),
0986 FUNCTION(tdmb),
0987 FUNCTION(tdmc),
0988 };
0989
0990 static struct meson_pmx_func meson_axg_aobus_functions[] = {
0991 FUNCTION(gpio_aobus),
0992 FUNCTION(uart_ao_a),
0993 FUNCTION(uart_ao_b),
0994 FUNCTION(i2c_ao),
0995 FUNCTION(i2c_ao_slave),
0996 FUNCTION(remote_input_ao),
0997 FUNCTION(remote_out_ao),
0998 FUNCTION(pwm_ao_a),
0999 FUNCTION(pwm_ao_b),
1000 FUNCTION(pwm_ao_c),
1001 FUNCTION(pwm_ao_d),
1002 FUNCTION(jtag_ao),
1003 FUNCTION(gen_clk_ee),
1004 };
1005
1006 static struct meson_bank meson_axg_periphs_banks[] = {
1007
1008 BANK("Z", GPIOZ_0, GPIOZ_10, 14, 24, 3, 0, 3, 0, 9, 0, 10, 0, 11, 0),
1009 BANK("BOOT", BOOT_0, BOOT_14, 25, 39, 4, 0, 4, 0, 12, 0, 13, 0, 14, 0),
1010 BANK("A", GPIOA_0, GPIOA_20, 40, 60, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0),
1011 BANK("X", GPIOX_0, GPIOX_22, 61, 83, 2, 0, 2, 0, 6, 0, 7, 0, 8, 0),
1012 BANK("Y", GPIOY_0, GPIOY_15, 84, 99, 1, 0, 1, 0, 3, 0, 4, 0, 5, 0),
1013 };
1014
1015 static struct meson_bank meson_axg_aobus_banks[] = {
1016
1017 BANK("AO", GPIOAO_0, GPIOAO_13, 0, 13, 0, 16, 0, 0, 0, 0, 0, 16, 1, 0),
1018 };
1019
1020 static struct meson_pmx_bank meson_axg_periphs_pmx_banks[] = {
1021
1022 BANK_PMX("Z", GPIOZ_0, GPIOZ_10, 0x2, 0),
1023 BANK_PMX("BOOT", BOOT_0, BOOT_14, 0x0, 0),
1024 BANK_PMX("A", GPIOA_0, GPIOA_20, 0xb, 0),
1025 BANK_PMX("X", GPIOX_0, GPIOX_22, 0x4, 0),
1026 BANK_PMX("Y", GPIOY_0, GPIOY_15, 0x8, 0),
1027 };
1028
1029 static struct meson_axg_pmx_data meson_axg_periphs_pmx_banks_data = {
1030 .pmx_banks = meson_axg_periphs_pmx_banks,
1031 .num_pmx_banks = ARRAY_SIZE(meson_axg_periphs_pmx_banks),
1032 };
1033
1034 static struct meson_pmx_bank meson_axg_aobus_pmx_banks[] = {
1035 BANK_PMX("AO", GPIOAO_0, GPIOAO_13, 0x0, 0),
1036 };
1037
1038 static struct meson_axg_pmx_data meson_axg_aobus_pmx_banks_data = {
1039 .pmx_banks = meson_axg_aobus_pmx_banks,
1040 .num_pmx_banks = ARRAY_SIZE(meson_axg_aobus_pmx_banks),
1041 };
1042
1043 static struct meson_pinctrl_data meson_axg_periphs_pinctrl_data = {
1044 .name = "periphs-banks",
1045 .pins = meson_axg_periphs_pins,
1046 .groups = meson_axg_periphs_groups,
1047 .funcs = meson_axg_periphs_functions,
1048 .banks = meson_axg_periphs_banks,
1049 .num_pins = ARRAY_SIZE(meson_axg_periphs_pins),
1050 .num_groups = ARRAY_SIZE(meson_axg_periphs_groups),
1051 .num_funcs = ARRAY_SIZE(meson_axg_periphs_functions),
1052 .num_banks = ARRAY_SIZE(meson_axg_periphs_banks),
1053 .pmx_ops = &meson_axg_pmx_ops,
1054 .pmx_data = &meson_axg_periphs_pmx_banks_data,
1055 };
1056
1057 static struct meson_pinctrl_data meson_axg_aobus_pinctrl_data = {
1058 .name = "aobus-banks",
1059 .pins = meson_axg_aobus_pins,
1060 .groups = meson_axg_aobus_groups,
1061 .funcs = meson_axg_aobus_functions,
1062 .banks = meson_axg_aobus_banks,
1063 .num_pins = ARRAY_SIZE(meson_axg_aobus_pins),
1064 .num_groups = ARRAY_SIZE(meson_axg_aobus_groups),
1065 .num_funcs = ARRAY_SIZE(meson_axg_aobus_functions),
1066 .num_banks = ARRAY_SIZE(meson_axg_aobus_banks),
1067 .pmx_ops = &meson_axg_pmx_ops,
1068 .pmx_data = &meson_axg_aobus_pmx_banks_data,
1069 .parse_dt = meson8_aobus_parse_dt_extra,
1070 };
1071
1072 static const struct of_device_id meson_axg_pinctrl_dt_match[] = {
1073 {
1074 .compatible = "amlogic,meson-axg-periphs-pinctrl",
1075 .data = &meson_axg_periphs_pinctrl_data,
1076 },
1077 {
1078 .compatible = "amlogic,meson-axg-aobus-pinctrl",
1079 .data = &meson_axg_aobus_pinctrl_data,
1080 },
1081 { },
1082 };
1083 MODULE_DEVICE_TABLE(of, meson_axg_pinctrl_dt_match);
1084
1085 static struct platform_driver meson_axg_pinctrl_driver = {
1086 .probe = meson_pinctrl_probe,
1087 .driver = {
1088 .name = "meson-axg-pinctrl",
1089 .of_match_table = meson_axg_pinctrl_dt_match,
1090 },
1091 };
1092
1093 module_platform_driver(meson_axg_pinctrl_driver);
1094 MODULE_LICENSE("Dual BSD/GPL");