xref: /openbmc/linux/drivers/pinctrl/meson/pinctrl-meson-axg.c (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1*c0f84760SKrzysztof Kozlowski // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
283c56680SXingyu Chen /*
383c56680SXingyu Chen  * Pin controller and GPIO driver for Amlogic Meson AXG SoC.
483c56680SXingyu Chen  *
583c56680SXingyu Chen  * Copyright (c) 2017 Amlogic, Inc. All rights reserved.
683c56680SXingyu Chen  * Author: Xingyu Chen <xingyu.chen@amlogic.com>
783c56680SXingyu Chen  */
883c56680SXingyu Chen 
983c56680SXingyu Chen #include <dt-bindings/gpio/meson-axg-gpio.h>
1083c56680SXingyu Chen #include "pinctrl-meson.h"
1183c56680SXingyu Chen #include "pinctrl-meson-axg-pmx.h"
1283c56680SXingyu Chen 
1383c56680SXingyu Chen static const struct pinctrl_pin_desc meson_axg_periphs_pins[] = {
1483c56680SXingyu Chen 	MESON_PIN(GPIOZ_0),
1583c56680SXingyu Chen 	MESON_PIN(GPIOZ_1),
1683c56680SXingyu Chen 	MESON_PIN(GPIOZ_2),
1783c56680SXingyu Chen 	MESON_PIN(GPIOZ_3),
1883c56680SXingyu Chen 	MESON_PIN(GPIOZ_4),
1983c56680SXingyu Chen 	MESON_PIN(GPIOZ_5),
2083c56680SXingyu Chen 	MESON_PIN(GPIOZ_6),
2183c56680SXingyu Chen 	MESON_PIN(GPIOZ_7),
2283c56680SXingyu Chen 	MESON_PIN(GPIOZ_8),
2383c56680SXingyu Chen 	MESON_PIN(GPIOZ_9),
2483c56680SXingyu Chen 	MESON_PIN(GPIOZ_10),
2583c56680SXingyu Chen 	MESON_PIN(BOOT_0),
2683c56680SXingyu Chen 	MESON_PIN(BOOT_1),
2783c56680SXingyu Chen 	MESON_PIN(BOOT_2),
2883c56680SXingyu Chen 	MESON_PIN(BOOT_3),
2983c56680SXingyu Chen 	MESON_PIN(BOOT_4),
3083c56680SXingyu Chen 	MESON_PIN(BOOT_5),
3183c56680SXingyu Chen 	MESON_PIN(BOOT_6),
3283c56680SXingyu Chen 	MESON_PIN(BOOT_7),
3383c56680SXingyu Chen 	MESON_PIN(BOOT_8),
3483c56680SXingyu Chen 	MESON_PIN(BOOT_9),
3583c56680SXingyu Chen 	MESON_PIN(BOOT_10),
3683c56680SXingyu Chen 	MESON_PIN(BOOT_11),
3783c56680SXingyu Chen 	MESON_PIN(BOOT_12),
3883c56680SXingyu Chen 	MESON_PIN(BOOT_13),
3983c56680SXingyu Chen 	MESON_PIN(BOOT_14),
4083c56680SXingyu Chen 	MESON_PIN(GPIOA_0),
4183c56680SXingyu Chen 	MESON_PIN(GPIOA_1),
4283c56680SXingyu Chen 	MESON_PIN(GPIOA_2),
4383c56680SXingyu Chen 	MESON_PIN(GPIOA_3),
4483c56680SXingyu Chen 	MESON_PIN(GPIOA_4),
4583c56680SXingyu Chen 	MESON_PIN(GPIOA_5),
4683c56680SXingyu Chen 	MESON_PIN(GPIOA_6),
4783c56680SXingyu Chen 	MESON_PIN(GPIOA_7),
4883c56680SXingyu Chen 	MESON_PIN(GPIOA_8),
4983c56680SXingyu Chen 	MESON_PIN(GPIOA_9),
5083c56680SXingyu Chen 	MESON_PIN(GPIOA_10),
5183c56680SXingyu Chen 	MESON_PIN(GPIOA_11),
5283c56680SXingyu Chen 	MESON_PIN(GPIOA_12),
5383c56680SXingyu Chen 	MESON_PIN(GPIOA_13),
5483c56680SXingyu Chen 	MESON_PIN(GPIOA_14),
5583c56680SXingyu Chen 	MESON_PIN(GPIOA_15),
5683c56680SXingyu Chen 	MESON_PIN(GPIOA_16),
5783c56680SXingyu Chen 	MESON_PIN(GPIOA_17),
5883c56680SXingyu Chen 	MESON_PIN(GPIOA_18),
5983c56680SXingyu Chen 	MESON_PIN(GPIOA_19),
6083c56680SXingyu Chen 	MESON_PIN(GPIOA_20),
6183c56680SXingyu Chen 	MESON_PIN(GPIOX_0),
6283c56680SXingyu Chen 	MESON_PIN(GPIOX_1),
6383c56680SXingyu Chen 	MESON_PIN(GPIOX_2),
6483c56680SXingyu Chen 	MESON_PIN(GPIOX_3),
6583c56680SXingyu Chen 	MESON_PIN(GPIOX_4),
6683c56680SXingyu Chen 	MESON_PIN(GPIOX_5),
6783c56680SXingyu Chen 	MESON_PIN(GPIOX_6),
6883c56680SXingyu Chen 	MESON_PIN(GPIOX_7),
6983c56680SXingyu Chen 	MESON_PIN(GPIOX_8),
7083c56680SXingyu Chen 	MESON_PIN(GPIOX_9),
7183c56680SXingyu Chen 	MESON_PIN(GPIOX_10),
7283c56680SXingyu Chen 	MESON_PIN(GPIOX_11),
7383c56680SXingyu Chen 	MESON_PIN(GPIOX_12),
7483c56680SXingyu Chen 	MESON_PIN(GPIOX_13),
7583c56680SXingyu Chen 	MESON_PIN(GPIOX_14),
7683c56680SXingyu Chen 	MESON_PIN(GPIOX_15),
7783c56680SXingyu Chen 	MESON_PIN(GPIOX_16),
7883c56680SXingyu Chen 	MESON_PIN(GPIOX_17),
7983c56680SXingyu Chen 	MESON_PIN(GPIOX_18),
8083c56680SXingyu Chen 	MESON_PIN(GPIOX_19),
8183c56680SXingyu Chen 	MESON_PIN(GPIOX_20),
8283c56680SXingyu Chen 	MESON_PIN(GPIOX_21),
8383c56680SXingyu Chen 	MESON_PIN(GPIOX_22),
8483c56680SXingyu Chen 	MESON_PIN(GPIOY_0),
8583c56680SXingyu Chen 	MESON_PIN(GPIOY_1),
8683c56680SXingyu Chen 	MESON_PIN(GPIOY_2),
8783c56680SXingyu Chen 	MESON_PIN(GPIOY_3),
8883c56680SXingyu Chen 	MESON_PIN(GPIOY_4),
8983c56680SXingyu Chen 	MESON_PIN(GPIOY_5),
9083c56680SXingyu Chen 	MESON_PIN(GPIOY_6),
9183c56680SXingyu Chen 	MESON_PIN(GPIOY_7),
9283c56680SXingyu Chen 	MESON_PIN(GPIOY_8),
9383c56680SXingyu Chen 	MESON_PIN(GPIOY_9),
9483c56680SXingyu Chen 	MESON_PIN(GPIOY_10),
9583c56680SXingyu Chen 	MESON_PIN(GPIOY_11),
9683c56680SXingyu Chen 	MESON_PIN(GPIOY_12),
9783c56680SXingyu Chen 	MESON_PIN(GPIOY_13),
9883c56680SXingyu Chen 	MESON_PIN(GPIOY_14),
9983c56680SXingyu Chen 	MESON_PIN(GPIOY_15),
10083c56680SXingyu Chen };
10183c56680SXingyu Chen 
10283c56680SXingyu Chen static const struct pinctrl_pin_desc meson_axg_aobus_pins[] = {
10383c56680SXingyu Chen 	MESON_PIN(GPIOAO_0),
10483c56680SXingyu Chen 	MESON_PIN(GPIOAO_1),
10583c56680SXingyu Chen 	MESON_PIN(GPIOAO_2),
10683c56680SXingyu Chen 	MESON_PIN(GPIOAO_3),
10783c56680SXingyu Chen 	MESON_PIN(GPIOAO_4),
10883c56680SXingyu Chen 	MESON_PIN(GPIOAO_5),
10983c56680SXingyu Chen 	MESON_PIN(GPIOAO_6),
11083c56680SXingyu Chen 	MESON_PIN(GPIOAO_7),
11183c56680SXingyu Chen 	MESON_PIN(GPIOAO_8),
11283c56680SXingyu Chen 	MESON_PIN(GPIOAO_9),
11383c56680SXingyu Chen 	MESON_PIN(GPIOAO_10),
11483c56680SXingyu Chen 	MESON_PIN(GPIOAO_11),
11583c56680SXingyu Chen 	MESON_PIN(GPIOAO_12),
11683c56680SXingyu Chen 	MESON_PIN(GPIOAO_13),
11783c56680SXingyu Chen 	MESON_PIN(GPIO_TEST_N),
11883c56680SXingyu Chen };
11983c56680SXingyu Chen 
12083c56680SXingyu Chen /* emmc */
12183c56680SXingyu Chen static const unsigned int emmc_nand_d0_pins[] = {BOOT_0};
12283c56680SXingyu Chen static const unsigned int emmc_nand_d1_pins[] = {BOOT_1};
12383c56680SXingyu Chen static const unsigned int emmc_nand_d2_pins[] = {BOOT_2};
12483c56680SXingyu Chen static const unsigned int emmc_nand_d3_pins[] = {BOOT_3};
12583c56680SXingyu Chen static const unsigned int emmc_nand_d4_pins[] = {BOOT_4};
12683c56680SXingyu Chen static const unsigned int emmc_nand_d5_pins[] = {BOOT_5};
12783c56680SXingyu Chen static const unsigned int emmc_nand_d6_pins[] = {BOOT_6};
12883c56680SXingyu Chen static const unsigned int emmc_nand_d7_pins[] = {BOOT_7};
12983c56680SXingyu Chen 
13083c56680SXingyu Chen static const unsigned int emmc_clk_pins[] = {BOOT_8};
13183c56680SXingyu Chen static const unsigned int emmc_cmd_pins[] = {BOOT_10};
13283c56680SXingyu Chen static const unsigned int emmc_ds_pins[]  = {BOOT_13};
13383c56680SXingyu Chen 
13483c56680SXingyu Chen /* nand */
13583c56680SXingyu Chen static const unsigned int nand_ce0_pins[] = {BOOT_8};
13683c56680SXingyu Chen static const unsigned int nand_ale_pins[] = {BOOT_9};
13783c56680SXingyu Chen static const unsigned int nand_cle_pins[] = {BOOT_10};
13883c56680SXingyu Chen static const unsigned int nand_wen_clk_pins[] = {BOOT_11};
13983c56680SXingyu Chen static const unsigned int nand_ren_wr_pins[] = {BOOT_12};
14083c56680SXingyu Chen static const unsigned int nand_rb0_pins[] = {BOOT_13};
14183c56680SXingyu Chen 
14283c56680SXingyu Chen /* nor */
14383c56680SXingyu Chen static const unsigned int nor_hold_pins[] = {BOOT_3};
14483c56680SXingyu Chen static const unsigned int nor_d_pins[] = {BOOT_4};
14583c56680SXingyu Chen static const unsigned int nor_q_pins[] = {BOOT_5};
14683c56680SXingyu Chen static const unsigned int nor_c_pins[] = {BOOT_6};
14783c56680SXingyu Chen static const unsigned int nor_wp_pins[] = {BOOT_9};
14883c56680SXingyu Chen static const unsigned int nor_cs_pins[] = {BOOT_14};
14983c56680SXingyu Chen 
15083c56680SXingyu Chen /* sdio */
15183c56680SXingyu Chen static const unsigned int sdio_d0_pins[] = {GPIOX_0};
15283c56680SXingyu Chen static const unsigned int sdio_d1_pins[] = {GPIOX_1};
15383c56680SXingyu Chen static const unsigned int sdio_d2_pins[] = {GPIOX_2};
15483c56680SXingyu Chen static const unsigned int sdio_d3_pins[] = {GPIOX_3};
15583c56680SXingyu Chen static const unsigned int sdio_clk_pins[] = {GPIOX_4};
15683c56680SXingyu Chen static const unsigned int sdio_cmd_pins[] = {GPIOX_5};
15783c56680SXingyu Chen 
158d72ebbccSYixun Lan /* spi0 */
159d72ebbccSYixun Lan static const unsigned int spi0_clk_pins[] = {GPIOZ_0};
160d72ebbccSYixun Lan static const unsigned int spi0_mosi_pins[] = {GPIOZ_1};
161d72ebbccSYixun Lan static const unsigned int spi0_miso_pins[] = {GPIOZ_2};
162d72ebbccSYixun Lan static const unsigned int spi0_ss0_pins[] = {GPIOZ_3};
163d72ebbccSYixun Lan static const unsigned int spi0_ss1_pins[] = {GPIOZ_4};
164d72ebbccSYixun Lan static const unsigned int spi0_ss2_pins[] = {GPIOZ_5};
16583c56680SXingyu Chen 
166d72ebbccSYixun Lan /* spi1 */
167d72ebbccSYixun Lan static const unsigned int spi1_clk_x_pins[] = {GPIOX_19};
168d72ebbccSYixun Lan static const unsigned int spi1_mosi_x_pins[] = {GPIOX_17};
169d72ebbccSYixun Lan static const unsigned int spi1_miso_x_pins[] = {GPIOX_18};
170d72ebbccSYixun Lan static const unsigned int spi1_ss0_x_pins[] = {GPIOX_16};
17183c56680SXingyu Chen 
172d72ebbccSYixun Lan static const unsigned int spi1_clk_a_pins[] = {GPIOA_4};
173d72ebbccSYixun Lan static const unsigned int spi1_mosi_a_pins[] = {GPIOA_2};
174d72ebbccSYixun Lan static const unsigned int spi1_miso_a_pins[] = {GPIOA_3};
175d72ebbccSYixun Lan static const unsigned int spi1_ss0_a_pins[] = {GPIOA_5};
176d72ebbccSYixun Lan static const unsigned int spi1_ss1_pins[] = {GPIOA_6};
17783c56680SXingyu Chen 
17883c56680SXingyu Chen /* i2c0 */
17983c56680SXingyu Chen static const unsigned int i2c0_sck_pins[] = {GPIOZ_6};
18083c56680SXingyu Chen static const unsigned int i2c0_sda_pins[] = {GPIOZ_7};
18183c56680SXingyu Chen 
18283c56680SXingyu Chen /* i2c1 */
18383c56680SXingyu Chen static const unsigned int i2c1_sck_z_pins[] = {GPIOZ_8};
18483c56680SXingyu Chen static const unsigned int i2c1_sda_z_pins[] = {GPIOZ_9};
18583c56680SXingyu Chen 
18683c56680SXingyu Chen static const unsigned int i2c1_sck_x_pins[] = {GPIOX_16};
18783c56680SXingyu Chen static const unsigned int i2c1_sda_x_pins[] = {GPIOX_17};
18883c56680SXingyu Chen 
18983c56680SXingyu Chen /* i2c2 */
19083c56680SXingyu Chen static const unsigned int i2c2_sck_x_pins[] = {GPIOX_18};
19183c56680SXingyu Chen static const unsigned int i2c2_sda_x_pins[] = {GPIOX_19};
19283c56680SXingyu Chen 
19383c56680SXingyu Chen static const unsigned int i2c2_sda_a_pins[] = {GPIOA_17};
19483c56680SXingyu Chen static const unsigned int i2c2_sck_a_pins[] = {GPIOA_18};
19583c56680SXingyu Chen 
19683c56680SXingyu Chen /* i2c3 */
19783c56680SXingyu Chen static const unsigned int i2c3_sda_a6_pins[] = {GPIOA_6};
19883c56680SXingyu Chen static const unsigned int i2c3_sck_a7_pins[] = {GPIOA_7};
19983c56680SXingyu Chen 
20083c56680SXingyu Chen static const unsigned int i2c3_sda_a12_pins[] = {GPIOA_12};
20183c56680SXingyu Chen static const unsigned int i2c3_sck_a13_pins[] = {GPIOA_13};
20283c56680SXingyu Chen 
20383c56680SXingyu Chen static const unsigned int i2c3_sda_a19_pins[] = {GPIOA_19};
20483c56680SXingyu Chen static const unsigned int i2c3_sck_a20_pins[] = {GPIOA_20};
20583c56680SXingyu Chen 
20683c56680SXingyu Chen /* uart_a */
20783c56680SXingyu Chen static const unsigned int uart_rts_a_pins[] = {GPIOX_11};
20883c56680SXingyu Chen static const unsigned int uart_cts_a_pins[] = {GPIOX_10};
20983c56680SXingyu Chen static const unsigned int uart_tx_a_pins[] = {GPIOX_8};
21083c56680SXingyu Chen static const unsigned int uart_rx_a_pins[] = {GPIOX_9};
21183c56680SXingyu Chen 
21283c56680SXingyu Chen /* uart_b */
21383c56680SXingyu Chen static const unsigned int uart_rts_b_z_pins[] = {GPIOZ_0};
21483c56680SXingyu Chen static const unsigned int uart_cts_b_z_pins[] = {GPIOZ_1};
21583c56680SXingyu Chen static const unsigned int uart_tx_b_z_pins[] = {GPIOZ_2};
21683c56680SXingyu Chen static const unsigned int uart_rx_b_z_pins[] = {GPIOZ_3};
21783c56680SXingyu Chen 
21883c56680SXingyu Chen static const unsigned int uart_rts_b_x_pins[] = {GPIOX_18};
21983c56680SXingyu Chen static const unsigned int uart_cts_b_x_pins[] = {GPIOX_19};
22083c56680SXingyu Chen static const unsigned int uart_tx_b_x_pins[] = {GPIOX_16};
22183c56680SXingyu Chen static const unsigned int uart_rx_b_x_pins[] = {GPIOX_17};
22283c56680SXingyu Chen 
22383c56680SXingyu Chen /* uart_ao_b */
22483c56680SXingyu Chen static const unsigned int uart_ao_tx_b_z_pins[] = {GPIOZ_8};
22583c56680SXingyu Chen static const unsigned int uart_ao_rx_b_z_pins[] = {GPIOZ_9};
22683c56680SXingyu Chen static const unsigned int uart_ao_cts_b_z_pins[] = {GPIOZ_6};
22783c56680SXingyu Chen static const unsigned int uart_ao_rts_b_z_pins[] = {GPIOZ_7};
22883c56680SXingyu Chen 
22983c56680SXingyu Chen /* pwm_a */
23083c56680SXingyu Chen static const unsigned int pwm_a_z_pins[] = {GPIOZ_5};
23183c56680SXingyu Chen 
23283c56680SXingyu Chen static const unsigned int pwm_a_x18_pins[] = {GPIOX_18};
23383c56680SXingyu Chen static const unsigned int pwm_a_x20_pins[] = {GPIOX_20};
23483c56680SXingyu Chen 
23583c56680SXingyu Chen static const unsigned int pwm_a_a_pins[] = {GPIOA_14};
23683c56680SXingyu Chen 
23783c56680SXingyu Chen /* pwm_b */
23883c56680SXingyu Chen static const unsigned int pwm_b_z_pins[] = {GPIOZ_4};
23983c56680SXingyu Chen 
24083c56680SXingyu Chen static const unsigned int pwm_b_x_pins[] = {GPIOX_19};
24183c56680SXingyu Chen 
24283c56680SXingyu Chen static const unsigned int pwm_b_a_pins[] = {GPIOA_15};
24383c56680SXingyu Chen 
24483c56680SXingyu Chen /* pwm_c */
24583c56680SXingyu Chen static const unsigned int pwm_c_x10_pins[] = {GPIOX_10};
24683c56680SXingyu Chen static const unsigned int pwm_c_x17_pins[] = {GPIOX_17};
24783c56680SXingyu Chen 
24883c56680SXingyu Chen static const unsigned int pwm_c_a_pins[] = {GPIOA_16};
24983c56680SXingyu Chen 
25083c56680SXingyu Chen /* pwm_d */
25183c56680SXingyu Chen static const unsigned int pwm_d_x11_pins[] = {GPIOX_11};
25283c56680SXingyu Chen static const unsigned int pwm_d_x16_pins[] = {GPIOX_16};
25383c56680SXingyu Chen 
25483c56680SXingyu Chen /* pwm_vs */
25583c56680SXingyu Chen static const unsigned int pwm_vs_pins[] = {GPIOA_0};
25683c56680SXingyu Chen 
25783c56680SXingyu Chen /* spdif_in */
25883c56680SXingyu Chen static const unsigned int spdif_in_z_pins[] = {GPIOZ_4};
25983c56680SXingyu Chen 
26083c56680SXingyu Chen static const unsigned int spdif_in_a1_pins[] = {GPIOA_1};
26183c56680SXingyu Chen static const unsigned int spdif_in_a7_pins[] = {GPIOA_7};
26283c56680SXingyu Chen static const unsigned int spdif_in_a19_pins[] = {GPIOA_19};
26383c56680SXingyu Chen static const unsigned int spdif_in_a20_pins[] = {GPIOA_20};
26483c56680SXingyu Chen 
26583c56680SXingyu Chen /* spdif_out */
26683c56680SXingyu Chen static const unsigned int spdif_out_z_pins[] = {GPIOZ_5};
26783c56680SXingyu Chen 
26883c56680SXingyu Chen static const unsigned int spdif_out_a1_pins[] = {GPIOA_1};
26983c56680SXingyu Chen static const unsigned int spdif_out_a11_pins[] = {GPIOA_11};
27083c56680SXingyu Chen static const unsigned int spdif_out_a19_pins[] = {GPIOA_19};
27183c56680SXingyu Chen static const unsigned int spdif_out_a20_pins[] = {GPIOA_20};
27283c56680SXingyu Chen 
27383c56680SXingyu Chen /* jtag_ee */
27483c56680SXingyu Chen static const unsigned int jtag_tdo_x_pins[] = {GPIOX_0};
27583c56680SXingyu Chen static const unsigned int jtag_tdi_x_pins[] = {GPIOX_1};
27683c56680SXingyu Chen static const unsigned int jtag_clk_x_pins[] = {GPIOX_4};
27783c56680SXingyu Chen static const unsigned int jtag_tms_x_pins[] = {GPIOX_5};
27883c56680SXingyu Chen 
27983c56680SXingyu Chen /* eth */
28083c56680SXingyu Chen static const unsigned int eth_txd0_x_pins[] = {GPIOX_8};
28183c56680SXingyu Chen static const unsigned int eth_txd1_x_pins[] = {GPIOX_9};
28283c56680SXingyu Chen static const unsigned int eth_txen_x_pins[] = {GPIOX_10};
28383c56680SXingyu Chen static const unsigned int eth_rgmii_rx_clk_x_pins[] = {GPIOX_12};
28483c56680SXingyu Chen static const unsigned int eth_rxd0_x_pins[] = {GPIOX_13};
28583c56680SXingyu Chen static const unsigned int eth_rxd1_x_pins[] = {GPIOX_14};
28683c56680SXingyu Chen static const unsigned int eth_rx_dv_x_pins[] = {GPIOX_15};
28783c56680SXingyu Chen static const unsigned int eth_mdio_x_pins[] = {GPIOX_21};
28883c56680SXingyu Chen static const unsigned int eth_mdc_x_pins[] = {GPIOX_22};
28983c56680SXingyu Chen 
29083c56680SXingyu Chen static const unsigned int eth_txd0_y_pins[] = {GPIOY_10};
29183c56680SXingyu Chen static const unsigned int eth_txd1_y_pins[] = {GPIOY_11};
29283c56680SXingyu Chen static const unsigned int eth_txen_y_pins[] = {GPIOY_9};
29383c56680SXingyu Chen static const unsigned int eth_rgmii_rx_clk_y_pins[] = {GPIOY_2};
29483c56680SXingyu Chen static const unsigned int eth_rxd0_y_pins[] = {GPIOY_4};
29583c56680SXingyu Chen static const unsigned int eth_rxd1_y_pins[] = {GPIOY_5};
29683c56680SXingyu Chen static const unsigned int eth_rx_dv_y_pins[] = {GPIOY_3};
29783c56680SXingyu Chen static const unsigned int eth_mdio_y_pins[] = {GPIOY_0};
29883c56680SXingyu Chen static const unsigned int eth_mdc_y_pins[] = {GPIOY_1};
29983c56680SXingyu Chen 
30083c56680SXingyu Chen static const unsigned int eth_rxd2_rgmii_pins[] = {GPIOY_6};
30183c56680SXingyu Chen static const unsigned int eth_rxd3_rgmii_pins[] = {GPIOY_7};
30283c56680SXingyu Chen static const unsigned int eth_rgmii_tx_clk_pins[] = {GPIOY_8};
30383c56680SXingyu Chen static const unsigned int eth_txd2_rgmii_pins[] = {GPIOY_12};
30483c56680SXingyu Chen static const unsigned int eth_txd3_rgmii_pins[] = {GPIOY_13};
30583c56680SXingyu Chen 
30683c56680SXingyu Chen /* pdm */
30783c56680SXingyu Chen static const unsigned int pdm_dclk_a14_pins[] = {GPIOA_14};
30883c56680SXingyu Chen static const unsigned int pdm_dclk_a19_pins[] = {GPIOA_19};
30983c56680SXingyu Chen static const unsigned int pdm_din0_pins[] = {GPIOA_15};
31083c56680SXingyu Chen static const unsigned int pdm_din1_pins[] = {GPIOA_16};
31183c56680SXingyu Chen static const unsigned int pdm_din2_pins[] = {GPIOA_17};
31283c56680SXingyu Chen static const unsigned int pdm_din3_pins[] = {GPIOA_18};
31383c56680SXingyu Chen 
314f83b5882SJerome Brunet /* mclk */
315f83b5882SJerome Brunet static const unsigned int mclk_c_pins[] = {GPIOA_0};
316f83b5882SJerome Brunet static const unsigned int mclk_b_pins[] = {GPIOA_1};
317f83b5882SJerome Brunet 
318f83b5882SJerome Brunet /* tdm */
319f83b5882SJerome Brunet static const unsigned int tdma_sclk_pins[] = {GPIOX_12};
320f83b5882SJerome Brunet static const unsigned int tdma_sclk_slv_pins[] = {GPIOX_12};
321f83b5882SJerome Brunet static const unsigned int tdma_fs_pins[] = {GPIOX_13};
322f83b5882SJerome Brunet static const unsigned int tdma_fs_slv_pins[] = {GPIOX_13};
323f83b5882SJerome Brunet static const unsigned int tdma_din0_pins[] = {GPIOX_14};
324f83b5882SJerome Brunet static const unsigned int tdma_dout0_x14_pins[] = {GPIOX_14};
325f83b5882SJerome Brunet static const unsigned int tdma_dout0_x15_pins[] = {GPIOX_15};
326f83b5882SJerome Brunet static const unsigned int tdma_dout1_pins[] = {GPIOX_15};
327f83b5882SJerome Brunet static const unsigned int tdma_din1_pins[] = {GPIOX_15};
328f83b5882SJerome Brunet 
329f83b5882SJerome Brunet static const unsigned int tdmc_sclk_pins[] = {GPIOA_2};
330f83b5882SJerome Brunet static const unsigned int tdmc_sclk_slv_pins[] = {GPIOA_2};
331f83b5882SJerome Brunet static const unsigned int tdmc_fs_pins[] = {GPIOA_3};
332f83b5882SJerome Brunet static const unsigned int tdmc_fs_slv_pins[] = {GPIOA_3};
333f83b5882SJerome Brunet static const unsigned int tdmc_din0_pins[] = {GPIOA_4};
334f83b5882SJerome Brunet static const unsigned int tdmc_dout0_pins[] = {GPIOA_4};
335f83b5882SJerome Brunet static const unsigned int tdmc_din1_pins[] = {GPIOA_5};
336f83b5882SJerome Brunet static const unsigned int tdmc_dout1_pins[] = {GPIOA_5};
337f83b5882SJerome Brunet static const unsigned int tdmc_din2_pins[] = {GPIOA_6};
338f83b5882SJerome Brunet static const unsigned int tdmc_dout2_pins[] = {GPIOA_6};
339f83b5882SJerome Brunet static const unsigned int tdmc_din3_pins[] = {GPIOA_7};
340f83b5882SJerome Brunet static const unsigned int tdmc_dout3_pins[] = {GPIOA_7};
341f83b5882SJerome Brunet 
342f83b5882SJerome Brunet static const unsigned int tdmb_sclk_pins[] = {GPIOA_8};
343f83b5882SJerome Brunet static const unsigned int tdmb_sclk_slv_pins[] = {GPIOA_8};
344f83b5882SJerome Brunet static const unsigned int tdmb_fs_pins[] = {GPIOA_9};
345f83b5882SJerome Brunet static const unsigned int tdmb_fs_slv_pins[] = {GPIOA_9};
346f83b5882SJerome Brunet static const unsigned int tdmb_din0_pins[] = {GPIOA_10};
347f83b5882SJerome Brunet static const unsigned int tdmb_dout0_pins[] = {GPIOA_10};
348f83b5882SJerome Brunet static const unsigned int tdmb_din1_pins[] = {GPIOA_11};
349f83b5882SJerome Brunet static const unsigned int tdmb_dout1_pins[] = {GPIOA_11};
350f83b5882SJerome Brunet static const unsigned int tdmb_din2_pins[] = {GPIOA_12};
351f83b5882SJerome Brunet static const unsigned int tdmb_dout2_pins[] = {GPIOA_12};
352f83b5882SJerome Brunet static const unsigned int tdmb_din3_pins[] = {GPIOA_13};
353f83b5882SJerome Brunet static const unsigned int tdmb_dout3_pins[] = {GPIOA_13};
354f83b5882SJerome Brunet 
35583c56680SXingyu Chen static struct meson_pmx_group meson_axg_periphs_groups[] = {
35683c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_0),
35783c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_1),
35883c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_2),
35983c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_3),
36083c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_4),
36183c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_5),
36283c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_6),
36383c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_7),
36483c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_8),
36583c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_9),
36683c56680SXingyu Chen 	GPIO_GROUP(GPIOZ_10),
36783c56680SXingyu Chen 
36883c56680SXingyu Chen 	GPIO_GROUP(BOOT_0),
36983c56680SXingyu Chen 	GPIO_GROUP(BOOT_1),
37083c56680SXingyu Chen 	GPIO_GROUP(BOOT_2),
37183c56680SXingyu Chen 	GPIO_GROUP(BOOT_3),
37283c56680SXingyu Chen 	GPIO_GROUP(BOOT_4),
37383c56680SXingyu Chen 	GPIO_GROUP(BOOT_5),
37483c56680SXingyu Chen 	GPIO_GROUP(BOOT_6),
37583c56680SXingyu Chen 	GPIO_GROUP(BOOT_7),
37683c56680SXingyu Chen 	GPIO_GROUP(BOOT_8),
37783c56680SXingyu Chen 	GPIO_GROUP(BOOT_9),
37883c56680SXingyu Chen 	GPIO_GROUP(BOOT_10),
37983c56680SXingyu Chen 	GPIO_GROUP(BOOT_11),
38083c56680SXingyu Chen 	GPIO_GROUP(BOOT_12),
38183c56680SXingyu Chen 	GPIO_GROUP(BOOT_13),
38283c56680SXingyu Chen 	GPIO_GROUP(BOOT_14),
38383c56680SXingyu Chen 
38483c56680SXingyu Chen 	GPIO_GROUP(GPIOA_0),
38583c56680SXingyu Chen 	GPIO_GROUP(GPIOA_1),
38683c56680SXingyu Chen 	GPIO_GROUP(GPIOA_2),
38783c56680SXingyu Chen 	GPIO_GROUP(GPIOA_3),
38883c56680SXingyu Chen 	GPIO_GROUP(GPIOA_4),
38983c56680SXingyu Chen 	GPIO_GROUP(GPIOA_5),
39083c56680SXingyu Chen 	GPIO_GROUP(GPIOA_6),
39183c56680SXingyu Chen 	GPIO_GROUP(GPIOA_7),
39283c56680SXingyu Chen 	GPIO_GROUP(GPIOA_8),
39383c56680SXingyu Chen 	GPIO_GROUP(GPIOA_9),
39483c56680SXingyu Chen 	GPIO_GROUP(GPIOA_10),
39583c56680SXingyu Chen 	GPIO_GROUP(GPIOA_11),
39683c56680SXingyu Chen 	GPIO_GROUP(GPIOA_12),
39783c56680SXingyu Chen 	GPIO_GROUP(GPIOA_13),
39883c56680SXingyu Chen 	GPIO_GROUP(GPIOA_14),
39983c56680SXingyu Chen 	GPIO_GROUP(GPIOA_15),
40083c56680SXingyu Chen 	GPIO_GROUP(GPIOA_16),
40183c56680SXingyu Chen 	GPIO_GROUP(GPIOA_17),
4025b10ff01SMartin Hundebøll 	GPIO_GROUP(GPIOA_18),
40383c56680SXingyu Chen 	GPIO_GROUP(GPIOA_19),
40483c56680SXingyu Chen 	GPIO_GROUP(GPIOA_20),
40583c56680SXingyu Chen 
40683c56680SXingyu Chen 	GPIO_GROUP(GPIOX_0),
40783c56680SXingyu Chen 	GPIO_GROUP(GPIOX_1),
40883c56680SXingyu Chen 	GPIO_GROUP(GPIOX_2),
40983c56680SXingyu Chen 	GPIO_GROUP(GPIOX_3),
41083c56680SXingyu Chen 	GPIO_GROUP(GPIOX_4),
41183c56680SXingyu Chen 	GPIO_GROUP(GPIOX_5),
41283c56680SXingyu Chen 	GPIO_GROUP(GPIOX_6),
41383c56680SXingyu Chen 	GPIO_GROUP(GPIOX_7),
41483c56680SXingyu Chen 	GPIO_GROUP(GPIOX_8),
41583c56680SXingyu Chen 	GPIO_GROUP(GPIOX_9),
41683c56680SXingyu Chen 	GPIO_GROUP(GPIOX_10),
41783c56680SXingyu Chen 	GPIO_GROUP(GPIOX_11),
41883c56680SXingyu Chen 	GPIO_GROUP(GPIOX_12),
41983c56680SXingyu Chen 	GPIO_GROUP(GPIOX_13),
42083c56680SXingyu Chen 	GPIO_GROUP(GPIOX_14),
42183c56680SXingyu Chen 	GPIO_GROUP(GPIOX_15),
42283c56680SXingyu Chen 	GPIO_GROUP(GPIOX_16),
42383c56680SXingyu Chen 	GPIO_GROUP(GPIOX_17),
42483c56680SXingyu Chen 	GPIO_GROUP(GPIOX_18),
42583c56680SXingyu Chen 	GPIO_GROUP(GPIOX_19),
42683c56680SXingyu Chen 	GPIO_GROUP(GPIOX_20),
42783c56680SXingyu Chen 	GPIO_GROUP(GPIOX_21),
42883c56680SXingyu Chen 	GPIO_GROUP(GPIOX_22),
42983c56680SXingyu Chen 
43083c56680SXingyu Chen 	GPIO_GROUP(GPIOY_0),
43183c56680SXingyu Chen 	GPIO_GROUP(GPIOY_1),
43283c56680SXingyu Chen 	GPIO_GROUP(GPIOY_2),
43383c56680SXingyu Chen 	GPIO_GROUP(GPIOY_3),
43483c56680SXingyu Chen 	GPIO_GROUP(GPIOY_4),
43583c56680SXingyu Chen 	GPIO_GROUP(GPIOY_5),
43683c56680SXingyu Chen 	GPIO_GROUP(GPIOY_6),
43783c56680SXingyu Chen 	GPIO_GROUP(GPIOY_7),
43883c56680SXingyu Chen 	GPIO_GROUP(GPIOY_8),
43983c56680SXingyu Chen 	GPIO_GROUP(GPIOY_9),
44083c56680SXingyu Chen 	GPIO_GROUP(GPIOY_10),
44183c56680SXingyu Chen 	GPIO_GROUP(GPIOY_11),
44283c56680SXingyu Chen 	GPIO_GROUP(GPIOY_12),
44383c56680SXingyu Chen 	GPIO_GROUP(GPIOY_13),
44483c56680SXingyu Chen 	GPIO_GROUP(GPIOY_14),
44583c56680SXingyu Chen 	GPIO_GROUP(GPIOY_15),
44683c56680SXingyu Chen 
44783c56680SXingyu Chen 	/* bank BOOT */
44883c56680SXingyu Chen 	GROUP(emmc_nand_d0, 1),
44983c56680SXingyu Chen 	GROUP(emmc_nand_d1, 1),
45083c56680SXingyu Chen 	GROUP(emmc_nand_d2, 1),
45183c56680SXingyu Chen 	GROUP(emmc_nand_d3, 1),
45283c56680SXingyu Chen 	GROUP(emmc_nand_d4, 1),
45383c56680SXingyu Chen 	GROUP(emmc_nand_d5, 1),
45483c56680SXingyu Chen 	GROUP(emmc_nand_d6, 1),
45583c56680SXingyu Chen 	GROUP(emmc_nand_d7, 1),
45683c56680SXingyu Chen 	GROUP(emmc_clk, 1),
45783c56680SXingyu Chen 	GROUP(emmc_cmd, 1),
45883c56680SXingyu Chen 	GROUP(emmc_ds, 1),
45983c56680SXingyu Chen 	GROUP(nand_ce0, 2),
46083c56680SXingyu Chen 	GROUP(nand_ale, 2),
46183c56680SXingyu Chen 	GROUP(nand_cle, 2),
46283c56680SXingyu Chen 	GROUP(nand_wen_clk, 2),
46383c56680SXingyu Chen 	GROUP(nand_ren_wr, 2),
46483c56680SXingyu Chen 	GROUP(nand_rb0, 2),
46583c56680SXingyu Chen 	GROUP(nor_hold, 3),
46683c56680SXingyu Chen 	GROUP(nor_d, 3),
46783c56680SXingyu Chen 	GROUP(nor_q, 3),
46883c56680SXingyu Chen 	GROUP(nor_c, 3),
46983c56680SXingyu Chen 	GROUP(nor_wp, 3),
47083c56680SXingyu Chen 	GROUP(nor_cs, 3),
47183c56680SXingyu Chen 
47283c56680SXingyu Chen 	/* bank GPIOZ */
473d72ebbccSYixun Lan 	GROUP(spi0_clk, 1),
474d72ebbccSYixun Lan 	GROUP(spi0_mosi, 1),
475d72ebbccSYixun Lan 	GROUP(spi0_miso, 1),
476d72ebbccSYixun Lan 	GROUP(spi0_ss0, 1),
477d72ebbccSYixun Lan 	GROUP(spi0_ss1, 1),
478d72ebbccSYixun Lan 	GROUP(spi0_ss2, 1),
47983c56680SXingyu Chen 	GROUP(i2c0_sck, 1),
48083c56680SXingyu Chen 	GROUP(i2c0_sda, 1),
48183c56680SXingyu Chen 	GROUP(i2c1_sck_z, 1),
48283c56680SXingyu Chen 	GROUP(i2c1_sda_z, 1),
48383c56680SXingyu Chen 	GROUP(uart_rts_b_z, 2),
48483c56680SXingyu Chen 	GROUP(uart_cts_b_z, 2),
48583c56680SXingyu Chen 	GROUP(uart_tx_b_z, 2),
48683c56680SXingyu Chen 	GROUP(uart_rx_b_z, 2),
48783c56680SXingyu Chen 	GROUP(pwm_a_z, 2),
48883c56680SXingyu Chen 	GROUP(pwm_b_z, 2),
48983c56680SXingyu Chen 	GROUP(spdif_in_z, 3),
49083c56680SXingyu Chen 	GROUP(spdif_out_z, 3),
49183c56680SXingyu Chen 	GROUP(uart_ao_tx_b_z, 2),
49283c56680SXingyu Chen 	GROUP(uart_ao_rx_b_z, 2),
49383c56680SXingyu Chen 	GROUP(uart_ao_cts_b_z, 2),
49483c56680SXingyu Chen 	GROUP(uart_ao_rts_b_z, 2),
49583c56680SXingyu Chen 
49683c56680SXingyu Chen 	/* bank GPIOX */
49783c56680SXingyu Chen 	GROUP(sdio_d0, 1),
49883c56680SXingyu Chen 	GROUP(sdio_d1, 1),
49983c56680SXingyu Chen 	GROUP(sdio_d2, 1),
50083c56680SXingyu Chen 	GROUP(sdio_d3, 1),
50183c56680SXingyu Chen 	GROUP(sdio_clk, 1),
50283c56680SXingyu Chen 	GROUP(sdio_cmd, 1),
50383c56680SXingyu Chen 	GROUP(i2c1_sck_x, 1),
50483c56680SXingyu Chen 	GROUP(i2c1_sda_x, 1),
50583c56680SXingyu Chen 	GROUP(i2c2_sck_x, 1),
50683c56680SXingyu Chen 	GROUP(i2c2_sda_x, 1),
50783c56680SXingyu Chen 	GROUP(uart_rts_a, 1),
50883c56680SXingyu Chen 	GROUP(uart_cts_a, 1),
50983c56680SXingyu Chen 	GROUP(uart_tx_a, 1),
51083c56680SXingyu Chen 	GROUP(uart_rx_a, 1),
51183c56680SXingyu Chen 	GROUP(uart_rts_b_x, 2),
51283c56680SXingyu Chen 	GROUP(uart_cts_b_x, 2),
51383c56680SXingyu Chen 	GROUP(uart_tx_b_x, 2),
51483c56680SXingyu Chen 	GROUP(uart_rx_b_x, 2),
51583c56680SXingyu Chen 	GROUP(jtag_tdo_x, 2),
51683c56680SXingyu Chen 	GROUP(jtag_tdi_x, 2),
51783c56680SXingyu Chen 	GROUP(jtag_clk_x, 2),
51883c56680SXingyu Chen 	GROUP(jtag_tms_x, 2),
519d72ebbccSYixun Lan 	GROUP(spi1_clk_x, 4),
520d72ebbccSYixun Lan 	GROUP(spi1_mosi_x, 4),
521d72ebbccSYixun Lan 	GROUP(spi1_miso_x, 4),
522d72ebbccSYixun Lan 	GROUP(spi1_ss0_x, 4),
52383c56680SXingyu Chen 	GROUP(pwm_a_x18, 3),
52483c56680SXingyu Chen 	GROUP(pwm_a_x20, 1),
52583c56680SXingyu Chen 	GROUP(pwm_b_x, 3),
52683c56680SXingyu Chen 	GROUP(pwm_c_x10, 3),
52783c56680SXingyu Chen 	GROUP(pwm_c_x17, 3),
52883c56680SXingyu Chen 	GROUP(pwm_d_x11, 3),
52983c56680SXingyu Chen 	GROUP(pwm_d_x16, 3),
53083c56680SXingyu Chen 	GROUP(eth_txd0_x, 4),
53183c56680SXingyu Chen 	GROUP(eth_txd1_x, 4),
53283c56680SXingyu Chen 	GROUP(eth_txen_x, 4),
53383c56680SXingyu Chen 	GROUP(eth_rgmii_rx_clk_x, 4),
53483c56680SXingyu Chen 	GROUP(eth_rxd0_x, 4),
53583c56680SXingyu Chen 	GROUP(eth_rxd1_x, 4),
53683c56680SXingyu Chen 	GROUP(eth_rx_dv_x, 4),
53783c56680SXingyu Chen 	GROUP(eth_mdio_x, 4),
53883c56680SXingyu Chen 	GROUP(eth_mdc_x, 4),
539f83b5882SJerome Brunet 	GROUP(tdma_sclk, 1),
540f83b5882SJerome Brunet 	GROUP(tdma_sclk_slv, 2),
541f83b5882SJerome Brunet 	GROUP(tdma_fs, 1),
542f83b5882SJerome Brunet 	GROUP(tdma_fs_slv, 2),
543f83b5882SJerome Brunet 	GROUP(tdma_din0, 1),
544f83b5882SJerome Brunet 	GROUP(tdma_dout0_x14, 2),
545f83b5882SJerome Brunet 	GROUP(tdma_dout0_x15, 1),
546f83b5882SJerome Brunet 	GROUP(tdma_dout1, 2),
547f83b5882SJerome Brunet 	GROUP(tdma_din1, 3),
54883c56680SXingyu Chen 
54983c56680SXingyu Chen 	/* bank GPIOY */
55083c56680SXingyu Chen 	GROUP(eth_txd0_y, 1),
55183c56680SXingyu Chen 	GROUP(eth_txd1_y, 1),
55283c56680SXingyu Chen 	GROUP(eth_txen_y, 1),
55383c56680SXingyu Chen 	GROUP(eth_rgmii_rx_clk_y, 1),
55483c56680SXingyu Chen 	GROUP(eth_rxd0_y, 1),
55583c56680SXingyu Chen 	GROUP(eth_rxd1_y, 1),
55683c56680SXingyu Chen 	GROUP(eth_rx_dv_y, 1),
55783c56680SXingyu Chen 	GROUP(eth_mdio_y, 1),
55883c56680SXingyu Chen 	GROUP(eth_mdc_y, 1),
55983c56680SXingyu Chen 	GROUP(eth_rxd2_rgmii, 1),
56083c56680SXingyu Chen 	GROUP(eth_rxd3_rgmii, 1),
56183c56680SXingyu Chen 	GROUP(eth_rgmii_tx_clk, 1),
56283c56680SXingyu Chen 	GROUP(eth_txd2_rgmii, 1),
56383c56680SXingyu Chen 	GROUP(eth_txd3_rgmii, 1),
56483c56680SXingyu Chen 
56583c56680SXingyu Chen 	/* bank GPIOA */
56683c56680SXingyu Chen 	GROUP(spdif_out_a1, 4),
56783c56680SXingyu Chen 	GROUP(spdif_out_a11, 3),
56883c56680SXingyu Chen 	GROUP(spdif_out_a19, 2),
56983c56680SXingyu Chen 	GROUP(spdif_out_a20, 1),
57083c56680SXingyu Chen 	GROUP(spdif_in_a1, 3),
57183c56680SXingyu Chen 	GROUP(spdif_in_a7, 3),
57283c56680SXingyu Chen 	GROUP(spdif_in_a19, 1),
57383c56680SXingyu Chen 	GROUP(spdif_in_a20, 2),
574d72ebbccSYixun Lan 	GROUP(spi1_clk_a, 3),
575d72ebbccSYixun Lan 	GROUP(spi1_mosi_a, 3),
576d72ebbccSYixun Lan 	GROUP(spi1_miso_a, 3),
577d72ebbccSYixun Lan 	GROUP(spi1_ss0_a, 3),
578d72ebbccSYixun Lan 	GROUP(spi1_ss1, 3),
57983c56680SXingyu Chen 	GROUP(pwm_a_a, 3),
58083c56680SXingyu Chen 	GROUP(pwm_b_a, 3),
58183c56680SXingyu Chen 	GROUP(pwm_c_a, 3),
58283c56680SXingyu Chen 	GROUP(pwm_vs, 2),
58383c56680SXingyu Chen 	GROUP(i2c2_sda_a, 3),
58483c56680SXingyu Chen 	GROUP(i2c2_sck_a, 3),
58583c56680SXingyu Chen 	GROUP(i2c3_sda_a6, 4),
58683c56680SXingyu Chen 	GROUP(i2c3_sck_a7, 4),
58783c56680SXingyu Chen 	GROUP(i2c3_sda_a12, 4),
58883c56680SXingyu Chen 	GROUP(i2c3_sck_a13, 4),
58983c56680SXingyu Chen 	GROUP(i2c3_sda_a19, 4),
59083c56680SXingyu Chen 	GROUP(i2c3_sck_a20, 4),
59183c56680SXingyu Chen 	GROUP(pdm_dclk_a14, 1),
59283c56680SXingyu Chen 	GROUP(pdm_dclk_a19, 3),
59383c56680SXingyu Chen 	GROUP(pdm_din0, 1),
59483c56680SXingyu Chen 	GROUP(pdm_din1, 1),
59583c56680SXingyu Chen 	GROUP(pdm_din2, 1),
59683c56680SXingyu Chen 	GROUP(pdm_din3, 1),
597f83b5882SJerome Brunet 	GROUP(mclk_c, 1),
598f83b5882SJerome Brunet 	GROUP(mclk_b, 1),
599f83b5882SJerome Brunet 	GROUP(tdmc_sclk, 1),
600f83b5882SJerome Brunet 	GROUP(tdmc_sclk_slv, 2),
601f83b5882SJerome Brunet 	GROUP(tdmc_fs, 1),
602f83b5882SJerome Brunet 	GROUP(tdmc_fs_slv, 2),
603f83b5882SJerome Brunet 	GROUP(tdmc_din0, 2),
604f83b5882SJerome Brunet 	GROUP(tdmc_dout0, 1),
605f83b5882SJerome Brunet 	GROUP(tdmc_din1, 2),
606f83b5882SJerome Brunet 	GROUP(tdmc_dout1, 1),
607f83b5882SJerome Brunet 	GROUP(tdmc_din2, 2),
608f83b5882SJerome Brunet 	GROUP(tdmc_dout2, 1),
609f83b5882SJerome Brunet 	GROUP(tdmc_din3, 2),
610f83b5882SJerome Brunet 	GROUP(tdmc_dout3, 1),
611f83b5882SJerome Brunet 	GROUP(tdmb_sclk, 1),
612f83b5882SJerome Brunet 	GROUP(tdmb_sclk_slv, 2),
613f83b5882SJerome Brunet 	GROUP(tdmb_fs, 1),
614f83b5882SJerome Brunet 	GROUP(tdmb_fs_slv, 2),
615f83b5882SJerome Brunet 	GROUP(tdmb_din0, 2),
616f83b5882SJerome Brunet 	GROUP(tdmb_dout0, 1),
617f83b5882SJerome Brunet 	GROUP(tdmb_din1, 2),
618f83b5882SJerome Brunet 	GROUP(tdmb_dout1, 1),
619f83b5882SJerome Brunet 	GROUP(tdmb_din2, 2),
620f83b5882SJerome Brunet 	GROUP(tdmb_dout2, 1),
621f83b5882SJerome Brunet 	GROUP(tdmb_din3, 2),
622f83b5882SJerome Brunet 	GROUP(tdmb_dout3, 1),
62383c56680SXingyu Chen };
62483c56680SXingyu Chen 
62583c56680SXingyu Chen /* uart_ao_a */
62683c56680SXingyu Chen static const unsigned int uart_ao_tx_a_pins[] = {GPIOAO_0};
62783c56680SXingyu Chen static const unsigned int uart_ao_rx_a_pins[] = {GPIOAO_1};
62883c56680SXingyu Chen static const unsigned int uart_ao_cts_a_pins[] = {GPIOAO_2};
62983c56680SXingyu Chen static const unsigned int uart_ao_rts_a_pins[] = {GPIOAO_3};
63083c56680SXingyu Chen 
63183c56680SXingyu Chen /* uart_ao_b */
63283c56680SXingyu Chen static const unsigned int uart_ao_tx_b_pins[] = {GPIOAO_4};
63383c56680SXingyu Chen static const unsigned int uart_ao_rx_b_pins[] = {GPIOAO_5};
63483c56680SXingyu Chen static const unsigned int uart_ao_cts_b_pins[] = {GPIOAO_2};
63583c56680SXingyu Chen static const unsigned int uart_ao_rts_b_pins[] = {GPIOAO_3};
63683c56680SXingyu Chen 
63783c56680SXingyu Chen /* i2c_ao */
63883c56680SXingyu Chen static const unsigned int i2c_ao_sck_4_pins[] = {GPIOAO_4};
63983c56680SXingyu Chen static const unsigned int i2c_ao_sda_5_pins[] = {GPIOAO_5};
64083c56680SXingyu Chen static const unsigned int i2c_ao_sck_8_pins[] = {GPIOAO_8};
64183c56680SXingyu Chen static const unsigned int i2c_ao_sda_9_pins[] = {GPIOAO_9};
64283c56680SXingyu Chen static const unsigned int i2c_ao_sck_10_pins[] = {GPIOAO_10};
64383c56680SXingyu Chen static const unsigned int i2c_ao_sda_11_pins[] = {GPIOAO_11};
64483c56680SXingyu Chen 
64583c56680SXingyu Chen /* i2c_ao_slave */
64683c56680SXingyu Chen static const unsigned int i2c_ao_slave_sck_pins[] = {GPIOAO_10};
64783c56680SXingyu Chen static const unsigned int i2c_ao_slave_sda_pins[] = {GPIOAO_11};
64883c56680SXingyu Chen 
64983c56680SXingyu Chen /* ir_in */
65083c56680SXingyu Chen static const unsigned int remote_input_ao_pins[] = {GPIOAO_6};
65183c56680SXingyu Chen 
65283c56680SXingyu Chen /* ir_out */
65383c56680SXingyu Chen static const unsigned int remote_out_ao_pins[] = {GPIOAO_7};
65483c56680SXingyu Chen 
65583c56680SXingyu Chen /* pwm_ao_a */
65683c56680SXingyu Chen static const unsigned int pwm_ao_a_pins[] = {GPIOAO_3};
65783c56680SXingyu Chen 
65883c56680SXingyu Chen /* pwm_ao_b */
65983c56680SXingyu Chen static const unsigned int pwm_ao_b_ao2_pins[] = {GPIOAO_2};
66083c56680SXingyu Chen static const unsigned int pwm_ao_b_ao12_pins[] = {GPIOAO_12};
66183c56680SXingyu Chen 
66283c56680SXingyu Chen /* pwm_ao_c */
66383c56680SXingyu Chen static const unsigned int pwm_ao_c_ao8_pins[] = {GPIOAO_8};
66483c56680SXingyu Chen static const unsigned int pwm_ao_c_ao13_pins[] = {GPIOAO_13};
66583c56680SXingyu Chen 
66683c56680SXingyu Chen /* pwm_ao_d */
66783c56680SXingyu Chen static const unsigned int pwm_ao_d_pins[] = {GPIOAO_9};
66883c56680SXingyu Chen 
66983c56680SXingyu Chen /* jtag_ao */
67083c56680SXingyu Chen static const unsigned int jtag_ao_tdi_pins[] = {GPIOAO_3};
67183c56680SXingyu Chen static const unsigned int jtag_ao_tdo_pins[] = {GPIOAO_4};
67283c56680SXingyu Chen static const unsigned int jtag_ao_clk_pins[] = {GPIOAO_5};
67383c56680SXingyu Chen static const unsigned int jtag_ao_tms_pins[] = {GPIOAO_7};
67483c56680SXingyu Chen 
675a130af01SJerome Brunet /* gen_clk */
676a130af01SJerome Brunet static const unsigned int gen_clk_ee_pins[] = {GPIOAO_13};
677a130af01SJerome Brunet 
67883c56680SXingyu Chen static struct meson_pmx_group meson_axg_aobus_groups[] = {
67983c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_0),
68083c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_1),
68183c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_2),
68283c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_3),
68383c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_4),
68483c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_5),
68583c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_6),
68683c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_7),
68783c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_8),
68883c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_9),
68983c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_10),
69083c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_11),
69183c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_12),
69283c56680SXingyu Chen 	GPIO_GROUP(GPIOAO_13),
69383c56680SXingyu Chen 	GPIO_GROUP(GPIO_TEST_N),
69483c56680SXingyu Chen 
69583c56680SXingyu Chen 	/* bank AO */
69683c56680SXingyu Chen 	GROUP(uart_ao_tx_a, 1),
69783c56680SXingyu Chen 	GROUP(uart_ao_rx_a, 1),
69883c56680SXingyu Chen 	GROUP(uart_ao_cts_a, 2),
69983c56680SXingyu Chen 	GROUP(uart_ao_rts_a, 2),
70083c56680SXingyu Chen 	GROUP(uart_ao_tx_b, 1),
70183c56680SXingyu Chen 	GROUP(uart_ao_rx_b, 1),
70283c56680SXingyu Chen 	GROUP(uart_ao_cts_b, 1),
70383c56680SXingyu Chen 	GROUP(uart_ao_rts_b, 1),
70483c56680SXingyu Chen 	GROUP(i2c_ao_sck_4, 2),
70583c56680SXingyu Chen 	GROUP(i2c_ao_sda_5, 2),
70683c56680SXingyu Chen 	GROUP(i2c_ao_sck_8, 2),
70783c56680SXingyu Chen 	GROUP(i2c_ao_sda_9, 2),
70883c56680SXingyu Chen 	GROUP(i2c_ao_sck_10, 2),
70983c56680SXingyu Chen 	GROUP(i2c_ao_sda_11, 2),
71083c56680SXingyu Chen 	GROUP(i2c_ao_slave_sck, 1),
71183c56680SXingyu Chen 	GROUP(i2c_ao_slave_sda, 1),
71283c56680SXingyu Chen 	GROUP(remote_input_ao, 1),
71383c56680SXingyu Chen 	GROUP(remote_out_ao, 1),
71483c56680SXingyu Chen 	GROUP(pwm_ao_a, 3),
71583c56680SXingyu Chen 	GROUP(pwm_ao_b_ao2, 3),
71683c56680SXingyu Chen 	GROUP(pwm_ao_b_ao12, 3),
71783c56680SXingyu Chen 	GROUP(pwm_ao_c_ao8, 3),
71883c56680SXingyu Chen 	GROUP(pwm_ao_c_ao13, 3),
71983c56680SXingyu Chen 	GROUP(pwm_ao_d, 3),
72083c56680SXingyu Chen 	GROUP(jtag_ao_tdi, 4),
72183c56680SXingyu Chen 	GROUP(jtag_ao_tdo, 4),
72283c56680SXingyu Chen 	GROUP(jtag_ao_clk, 4),
72383c56680SXingyu Chen 	GROUP(jtag_ao_tms, 4),
724a130af01SJerome Brunet 	GROUP(gen_clk_ee, 4),
72583c56680SXingyu Chen };
72683c56680SXingyu Chen 
72783c56680SXingyu Chen static const char * const gpio_periphs_groups[] = {
72883c56680SXingyu Chen 	"GPIOZ_0", "GPIOZ_1", "GPIOZ_2", "GPIOZ_3", "GPIOZ_4",
72983c56680SXingyu Chen 	"GPIOZ_5", "GPIOZ_6", "GPIOZ_7", "GPIOZ_8", "GPIOZ_9",
73083c56680SXingyu Chen 	"GPIOZ_10",
73183c56680SXingyu Chen 
73283c56680SXingyu Chen 	"BOOT_0", "BOOT_1", "BOOT_2", "BOOT_3", "BOOT_4",
73383c56680SXingyu Chen 	"BOOT_5", "BOOT_6", "BOOT_7", "BOOT_8", "BOOT_9",
73483c56680SXingyu Chen 	"BOOT_10", "BOOT_11", "BOOT_12", "BOOT_13", "BOOT_14",
73583c56680SXingyu Chen 
73683c56680SXingyu Chen 	"GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4",
73783c56680SXingyu Chen 	"GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9",
73883c56680SXingyu Chen 	"GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14",
73983c56680SXingyu Chen 	"GPIOA_15", "GPIOA_16", "GPIOA_17", "GPIOA_18", "GPIOA_19",
74083c56680SXingyu Chen 	"GPIOA_20",
74183c56680SXingyu Chen 
74283c56680SXingyu Chen 	"GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4",
74383c56680SXingyu Chen 	"GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9",
74483c56680SXingyu Chen 	"GPIOX_10", "GPIOX_11", "GPIOX_12", "GPIOX_13", "GPIOX_14",
74583c56680SXingyu Chen 	"GPIOX_15", "GPIOX_16", "GPIOX_17", "GPIOX_18", "GPIOX_19",
74683c56680SXingyu Chen 	"GPIOX_20", "GPIOX_21", "GPIOX_22",
74783c56680SXingyu Chen 
74883c56680SXingyu Chen 	"GPIOY_0", "GPIOY_1", "GPIOY_2", "GPIOY_3", "GPIOY_4",
74983c56680SXingyu Chen 	"GPIOY_5", "GPIOY_6", "GPIOY_7", "GPIOY_8", "GPIOY_9",
75083c56680SXingyu Chen 	"GPIOY_10", "GPIOY_11", "GPIOY_12", "GPIOY_13", "GPIOY_14",
75183c56680SXingyu Chen 	"GPIOY_15",
75283c56680SXingyu Chen };
75383c56680SXingyu Chen 
75483c56680SXingyu Chen static const char * const emmc_groups[] = {
75583c56680SXingyu Chen 	"emmc_nand_d0", "emmc_nand_d1", "emmc_nand_d2",
75683c56680SXingyu Chen 	"emmc_nand_d3", "emmc_nand_d4", "emmc_nand_d5",
75783c56680SXingyu Chen 	"emmc_nand_d6", "emmc_nand_d7",
75883c56680SXingyu Chen 	"emmc_clk", "emmc_cmd", "emmc_ds",
75983c56680SXingyu Chen };
76083c56680SXingyu Chen 
76183c56680SXingyu Chen static const char * const nand_groups[] = {
76283c56680SXingyu Chen 	"emmc_nand_d0", "emmc_nand_d1", "emmc_nand_d2",
76383c56680SXingyu Chen 	"emmc_nand_d3", "emmc_nand_d4", "emmc_nand_d5",
76483c56680SXingyu Chen 	"emmc_nand_d6", "emmc_nand_d7",
76583c56680SXingyu Chen 	"nand_ce0", "nand_ale", "nand_cle",
76683c56680SXingyu Chen 	"nand_wen_clk", "nand_ren_wr", "nand_rb0",
76783c56680SXingyu Chen };
76883c56680SXingyu Chen 
76983c56680SXingyu Chen static const char * const nor_groups[] = {
77083c56680SXingyu Chen 	"nor_d", "nor_q", "nor_c", "nor_cs",
77183c56680SXingyu Chen 	"nor_hold", "nor_wp",
77283c56680SXingyu Chen };
77383c56680SXingyu Chen 
77483c56680SXingyu Chen static const char * const sdio_groups[] = {
77583c56680SXingyu Chen 	"sdio_d0", "sdio_d1", "sdio_d2", "sdio_d3",
77683c56680SXingyu Chen 	"sdio_cmd", "sdio_clk",
77783c56680SXingyu Chen };
77883c56680SXingyu Chen 
779d72ebbccSYixun Lan static const char * const spi0_groups[] = {
780d72ebbccSYixun Lan 	"spi0_clk", "spi0_mosi", "spi0_miso", "spi0_ss0",
781d72ebbccSYixun Lan 	"spi0_ss1", "spi0_ss2"
78283c56680SXingyu Chen };
78383c56680SXingyu Chen 
784d72ebbccSYixun Lan static const char * const spi1_groups[] = {
785d72ebbccSYixun Lan 	"spi1_clk_x", "spi1_mosi_x", "spi1_miso_x", "spi1_ss0_x",
786d72ebbccSYixun Lan 	"spi1_clk_a", "spi1_mosi_a", "spi1_miso_a", "spi1_ss0_a",
787d72ebbccSYixun Lan 	"spi1_ss1"
78883c56680SXingyu Chen };
78983c56680SXingyu Chen 
79083c56680SXingyu Chen static const char * const uart_a_groups[] = {
79183c56680SXingyu Chen 	"uart_tx_a", "uart_rx_a", "uart_cts_a", "uart_rts_a",
79283c56680SXingyu Chen };
79383c56680SXingyu Chen 
79483c56680SXingyu Chen static const char * const uart_b_groups[] = {
79583c56680SXingyu Chen 	"uart_tx_b_z", "uart_rx_b_z", "uart_cts_b_z", "uart_rts_b_z",
79683c56680SXingyu Chen 	"uart_tx_b_x", "uart_rx_b_x", "uart_cts_b_x", "uart_rts_b_x",
79783c56680SXingyu Chen };
79883c56680SXingyu Chen 
79949527bc0SYixun Lan static const char * const uart_ao_b_z_groups[] = {
80083c56680SXingyu Chen 	"uart_ao_tx_b_z", "uart_ao_rx_b_z",
80183c56680SXingyu Chen 	"uart_ao_cts_b_z", "uart_ao_rts_b_z",
80283c56680SXingyu Chen };
80383c56680SXingyu Chen 
80483c56680SXingyu Chen static const char * const i2c0_groups[] = {
80583c56680SXingyu Chen 	"i2c0_sck", "i2c0_sda",
80683c56680SXingyu Chen };
80783c56680SXingyu Chen 
80883c56680SXingyu Chen static const char * const i2c1_groups[] = {
80983c56680SXingyu Chen 	"i2c1_sck_z", "i2c1_sda_z",
81083c56680SXingyu Chen 	"i2c1_sck_x", "i2c1_sda_x",
81183c56680SXingyu Chen };
81283c56680SXingyu Chen 
81383c56680SXingyu Chen static const char * const i2c2_groups[] = {
81483c56680SXingyu Chen 	"i2c2_sck_x", "i2c2_sda_x",
81583c56680SXingyu Chen 	"i2c2_sda_a", "i2c2_sck_a",
81683c56680SXingyu Chen };
81783c56680SXingyu Chen 
81883c56680SXingyu Chen static const char * const i2c3_groups[] = {
81983c56680SXingyu Chen 	"i2c3_sda_a6", "i2c3_sck_a7",
82083c56680SXingyu Chen 	"i2c3_sda_a12", "i2c3_sck_a13",
82183c56680SXingyu Chen 	"i2c3_sda_a19", "i2c3_sck_a20",
82283c56680SXingyu Chen };
82383c56680SXingyu Chen 
82483c56680SXingyu Chen static const char * const eth_groups[] = {
82583c56680SXingyu Chen 	"eth_rxd2_rgmii", "eth_rxd3_rgmii", "eth_rgmii_tx_clk",
82683c56680SXingyu Chen 	"eth_txd2_rgmii", "eth_txd3_rgmii",
82783c56680SXingyu Chen 	"eth_txd0_x", "eth_txd1_x", "eth_txen_x", "eth_rgmii_rx_clk_x",
82883c56680SXingyu Chen 	"eth_rxd0_x", "eth_rxd1_x", "eth_rx_dv_x", "eth_mdio_x",
82983c56680SXingyu Chen 	"eth_mdc_x",
83083c56680SXingyu Chen 	"eth_txd0_y", "eth_txd1_y", "eth_txen_y", "eth_rgmii_rx_clk_y",
83183c56680SXingyu Chen 	"eth_rxd0_y", "eth_rxd1_y", "eth_rx_dv_y", "eth_mdio_y",
83283c56680SXingyu Chen 	"eth_mdc_y",
83383c56680SXingyu Chen };
83483c56680SXingyu Chen 
83583c56680SXingyu Chen static const char * const pwm_a_groups[] = {
83683c56680SXingyu Chen 	"pwm_a_z", "pwm_a_x18", "pwm_a_x20", "pwm_a_a",
83783c56680SXingyu Chen };
83883c56680SXingyu Chen 
83983c56680SXingyu Chen static const char * const pwm_b_groups[] = {
84083c56680SXingyu Chen 	"pwm_b_z", "pwm_b_x", "pwm_b_a",
84183c56680SXingyu Chen };
84283c56680SXingyu Chen 
84383c56680SXingyu Chen static const char * const pwm_c_groups[] = {
84483c56680SXingyu Chen 	"pwm_c_x10", "pwm_c_x17", "pwm_c_a",
84583c56680SXingyu Chen };
84683c56680SXingyu Chen 
84783c56680SXingyu Chen static const char * const pwm_d_groups[] = {
84883c56680SXingyu Chen 	"pwm_d_x11", "pwm_d_x16",
84983c56680SXingyu Chen };
85083c56680SXingyu Chen 
85183c56680SXingyu Chen static const char * const pwm_vs_groups[] = {
85283c56680SXingyu Chen 	"pwm_vs",
85383c56680SXingyu Chen };
85483c56680SXingyu Chen 
85583c56680SXingyu Chen static const char * const spdif_out_groups[] = {
85683c56680SXingyu Chen 	"spdif_out_z", "spdif_out_a1", "spdif_out_a11",
85783c56680SXingyu Chen 	"spdif_out_a19", "spdif_out_a20",
85883c56680SXingyu Chen };
85983c56680SXingyu Chen 
86083c56680SXingyu Chen static const char * const spdif_in_groups[] = {
86183c56680SXingyu Chen 	"spdif_in_z", "spdif_in_a1", "spdif_in_a7",
86283c56680SXingyu Chen 	"spdif_in_a19", "spdif_in_a20",
86383c56680SXingyu Chen };
86483c56680SXingyu Chen 
86583c56680SXingyu Chen static const char * const jtag_ee_groups[] = {
86683c56680SXingyu Chen 	"jtag_tdo_x", "jtag_tdi_x", "jtag_clk_x",
86783c56680SXingyu Chen 	"jtag_tms_x",
86883c56680SXingyu Chen };
86983c56680SXingyu Chen 
87083c56680SXingyu Chen static const char * const pdm_groups[] = {
87183c56680SXingyu Chen 	"pdm_din0", "pdm_din1", "pdm_din2", "pdm_din3",
87283c56680SXingyu Chen 	"pdm_dclk_a14", "pdm_dclk_a19",
87383c56680SXingyu Chen };
87483c56680SXingyu Chen 
87583c56680SXingyu Chen static const char * const gpio_aobus_groups[] = {
87683c56680SXingyu Chen 	"GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4",
87783c56680SXingyu Chen 	"GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9",
87883c56680SXingyu Chen 	"GPIOAO_10", "GPIOAO_11", "GPIOAO_12", "GPIOAO_13",
87983c56680SXingyu Chen 	"GPIO_TEST_N",
88083c56680SXingyu Chen };
88183c56680SXingyu Chen 
88283c56680SXingyu Chen static const char * const uart_ao_a_groups[] = {
88383c56680SXingyu Chen 	"uart_ao_tx_a", "uart_ao_rx_a", "uart_ao_cts_a", "uart_ao_rts_a",
88483c56680SXingyu Chen };
88583c56680SXingyu Chen 
88683c56680SXingyu Chen static const char * const uart_ao_b_groups[] = {
88783c56680SXingyu Chen 	"uart_ao_tx_b", "uart_ao_rx_b", "uart_ao_cts_b", "uart_ao_rts_b",
88883c56680SXingyu Chen };
88983c56680SXingyu Chen 
89083c56680SXingyu Chen static const char * const i2c_ao_groups[] = {
89183c56680SXingyu Chen 	"i2c_ao_sck_4", "i2c_ao_sda_5",
89283c56680SXingyu Chen 	"i2c_ao_sck_8", "i2c_ao_sda_9",
89383c56680SXingyu Chen 	"i2c_ao_sck_10", "i2c_ao_sda_11",
89483c56680SXingyu Chen };
89583c56680SXingyu Chen 
89683c56680SXingyu Chen static const char * const i2c_ao_slave_groups[] = {
89783c56680SXingyu Chen 	"i2c_ao_slave_sck", "i2c_ao_slave_sda",
89883c56680SXingyu Chen };
89983c56680SXingyu Chen 
90083c56680SXingyu Chen static const char * const remote_input_ao_groups[] = {
90183c56680SXingyu Chen 	"remote_input_ao",
90283c56680SXingyu Chen };
90383c56680SXingyu Chen 
90483c56680SXingyu Chen static const char * const remote_out_ao_groups[] = {
90583c56680SXingyu Chen 	"remote_out_ao",
90683c56680SXingyu Chen };
90783c56680SXingyu Chen 
90883c56680SXingyu Chen static const char * const pwm_ao_a_groups[] = {
90983c56680SXingyu Chen 	"pwm_ao_a",
91083c56680SXingyu Chen };
91183c56680SXingyu Chen 
91283c56680SXingyu Chen static const char * const pwm_ao_b_groups[] = {
91383c56680SXingyu Chen 	"pwm_ao_b_ao2", "pwm_ao_b_ao12",
91483c56680SXingyu Chen };
91583c56680SXingyu Chen 
91683c56680SXingyu Chen static const char * const pwm_ao_c_groups[] = {
91783c56680SXingyu Chen 	"pwm_ao_c_ao8", "pwm_ao_c_ao13",
91883c56680SXingyu Chen };
91983c56680SXingyu Chen 
92083c56680SXingyu Chen static const char * const pwm_ao_d_groups[] = {
92183c56680SXingyu Chen 	"pwm_ao_d",
92283c56680SXingyu Chen };
92383c56680SXingyu Chen 
92483c56680SXingyu Chen static const char * const jtag_ao_groups[] = {
92583c56680SXingyu Chen 	"jtag_ao_tdi", "jtag_ao_tdo", "jtag_ao_clk", "jtag_ao_tms",
92683c56680SXingyu Chen };
92783c56680SXingyu Chen 
928f83b5882SJerome Brunet static const char * const mclk_c_groups[] = {
929f83b5882SJerome Brunet 	"mclk_c",
930f83b5882SJerome Brunet };
931f83b5882SJerome Brunet 
932f83b5882SJerome Brunet static const char * const mclk_b_groups[] = {
933f83b5882SJerome Brunet 	"mclk_b",
934f83b5882SJerome Brunet };
935f83b5882SJerome Brunet 
936f83b5882SJerome Brunet static const char * const tdma_groups[] = {
937f83b5882SJerome Brunet 	"tdma_sclk", "tdma_sclk_slv", "tdma_fs", "tdma_fs_slv",
938f83b5882SJerome Brunet 	"tdma_din0", "tdma_dout0_x14", "tdma_dout0_x15", "tdma_dout1",
939f83b5882SJerome Brunet 	"tdma_din1",
940f83b5882SJerome Brunet };
941f83b5882SJerome Brunet 
942f83b5882SJerome Brunet static const char * const tdmc_groups[] = {
943f83b5882SJerome Brunet 	"tdmc_sclk", "tdmc_sclk_slv", "tdmc_fs", "tdmc_fs_slv",
944f83b5882SJerome Brunet 	"tdmc_din0", "tdmc_dout0", "tdmc_din1",	"tdmc_dout1",
945f83b5882SJerome Brunet 	"tdmc_din2", "tdmc_dout2", "tdmc_din3",	"tdmc_dout3",
946f83b5882SJerome Brunet };
947f83b5882SJerome Brunet 
948f83b5882SJerome Brunet static const char * const tdmb_groups[] = {
949f83b5882SJerome Brunet 	"tdmb_sclk", "tdmb_sclk_slv", "tdmb_fs", "tdmb_fs_slv",
950f83b5882SJerome Brunet 	"tdmb_din0", "tdmb_dout0", "tdmb_din1",	"tdmb_dout1",
951f83b5882SJerome Brunet 	"tdmb_din2", "tdmb_dout2", "tdmb_din3",	"tdmb_dout3",
952f83b5882SJerome Brunet };
953f83b5882SJerome Brunet 
954a130af01SJerome Brunet static const char * const gen_clk_ee_groups[] = {
955a130af01SJerome Brunet 	"gen_clk_ee",
956a130af01SJerome Brunet };
957a130af01SJerome Brunet 
95883c56680SXingyu Chen static struct meson_pmx_func meson_axg_periphs_functions[] = {
95983c56680SXingyu Chen 	FUNCTION(gpio_periphs),
96083c56680SXingyu Chen 	FUNCTION(emmc),
96183c56680SXingyu Chen 	FUNCTION(nor),
962d72ebbccSYixun Lan 	FUNCTION(spi0),
963d72ebbccSYixun Lan 	FUNCTION(spi1),
96483c56680SXingyu Chen 	FUNCTION(sdio),
96583c56680SXingyu Chen 	FUNCTION(nand),
96683c56680SXingyu Chen 	FUNCTION(uart_a),
96783c56680SXingyu Chen 	FUNCTION(uart_b),
96849527bc0SYixun Lan 	FUNCTION(uart_ao_b_z),
96983c56680SXingyu Chen 	FUNCTION(i2c0),
97083c56680SXingyu Chen 	FUNCTION(i2c1),
97183c56680SXingyu Chen 	FUNCTION(i2c2),
97283c56680SXingyu Chen 	FUNCTION(i2c3),
97383c56680SXingyu Chen 	FUNCTION(eth),
97483c56680SXingyu Chen 	FUNCTION(pwm_a),
97583c56680SXingyu Chen 	FUNCTION(pwm_b),
97683c56680SXingyu Chen 	FUNCTION(pwm_c),
97783c56680SXingyu Chen 	FUNCTION(pwm_d),
97883c56680SXingyu Chen 	FUNCTION(pwm_vs),
97983c56680SXingyu Chen 	FUNCTION(spdif_out),
98083c56680SXingyu Chen 	FUNCTION(spdif_in),
98183c56680SXingyu Chen 	FUNCTION(jtag_ee),
98283c56680SXingyu Chen 	FUNCTION(pdm),
983f83b5882SJerome Brunet 	FUNCTION(mclk_b),
984f83b5882SJerome Brunet 	FUNCTION(mclk_c),
985f83b5882SJerome Brunet 	FUNCTION(tdma),
986f83b5882SJerome Brunet 	FUNCTION(tdmb),
987f83b5882SJerome Brunet 	FUNCTION(tdmc),
98883c56680SXingyu Chen };
98983c56680SXingyu Chen 
99083c56680SXingyu Chen static struct meson_pmx_func meson_axg_aobus_functions[] = {
99183c56680SXingyu Chen 	FUNCTION(gpio_aobus),
99283c56680SXingyu Chen 	FUNCTION(uart_ao_a),
99383c56680SXingyu Chen 	FUNCTION(uart_ao_b),
99483c56680SXingyu Chen 	FUNCTION(i2c_ao),
99583c56680SXingyu Chen 	FUNCTION(i2c_ao_slave),
99683c56680SXingyu Chen 	FUNCTION(remote_input_ao),
99783c56680SXingyu Chen 	FUNCTION(remote_out_ao),
99883c56680SXingyu Chen 	FUNCTION(pwm_ao_a),
99983c56680SXingyu Chen 	FUNCTION(pwm_ao_b),
100083c56680SXingyu Chen 	FUNCTION(pwm_ao_c),
100183c56680SXingyu Chen 	FUNCTION(pwm_ao_d),
100283c56680SXingyu Chen 	FUNCTION(jtag_ao),
1003a130af01SJerome Brunet 	FUNCTION(gen_clk_ee),
100483c56680SXingyu Chen };
100583c56680SXingyu Chen 
100683c56680SXingyu Chen static struct meson_bank meson_axg_periphs_banks[] = {
100783c56680SXingyu Chen 	/*   name    first      last       irq	     pullen  pull    dir     out     in  */
100883c56680SXingyu Chen 	BANK("Z",    GPIOZ_0,	GPIOZ_10, 14,  24, 3,  0,  3,  0,  9,  0,  10, 0,  11, 0),
100983c56680SXingyu Chen 	BANK("BOOT", BOOT_0,	BOOT_14,  25,  39, 4,  0,  4,  0,  12, 0,  13, 0,  14, 0),
101083c56680SXingyu Chen 	BANK("A",    GPIOA_0,	GPIOA_20, 40,  60, 0,  0,  0,  0,  0,  0,  1,  0,  2,  0),
101183c56680SXingyu Chen 	BANK("X",    GPIOX_0,	GPIOX_22, 61,  83, 2,  0,  2,  0,  6,  0,  7,  0,  8,  0),
101283c56680SXingyu Chen 	BANK("Y", 	 GPIOY_0,	GPIOY_15, 84,  99, 1,  0,  1,  0,  3,  0,  4,  0,  5,  0),
101383c56680SXingyu Chen };
101483c56680SXingyu Chen 
101583c56680SXingyu Chen static struct meson_bank meson_axg_aobus_banks[] = {
101683c56680SXingyu Chen 	/*   name    first      last      irq	pullen  pull    dir     out     in  */
1017b84e5461SYixun Lan 	BANK("AO",   GPIOAO_0,  GPIOAO_13, 0, 13, 0,  16,  0, 0,  0,  0,  0, 16,  1,  0),
101883c56680SXingyu Chen };
101983c56680SXingyu Chen 
102083c56680SXingyu Chen static struct meson_pmx_bank meson_axg_periphs_pmx_banks[] = {
102183c56680SXingyu Chen 	/*	 name	 first		lask	   reg	offset  */
102283c56680SXingyu Chen 	BANK_PMX("Z",	 GPIOZ_0, GPIOZ_10, 0x2, 0),
102383c56680SXingyu Chen 	BANK_PMX("BOOT", BOOT_0,  BOOT_14,  0x0, 0),
102483c56680SXingyu Chen 	BANK_PMX("A",	 GPIOA_0, GPIOA_20, 0xb, 0),
102583c56680SXingyu Chen 	BANK_PMX("X",	 GPIOX_0, GPIOX_22, 0x4, 0),
102683c56680SXingyu Chen 	BANK_PMX("Y",	 GPIOY_0, GPIOY_15, 0x8, 0),
102783c56680SXingyu Chen };
102883c56680SXingyu Chen 
102983c56680SXingyu Chen static struct meson_axg_pmx_data meson_axg_periphs_pmx_banks_data = {
103083c56680SXingyu Chen 	.pmx_banks	= meson_axg_periphs_pmx_banks,
103183c56680SXingyu Chen 	.num_pmx_banks = ARRAY_SIZE(meson_axg_periphs_pmx_banks),
103283c56680SXingyu Chen };
103383c56680SXingyu Chen 
103483c56680SXingyu Chen static struct meson_pmx_bank meson_axg_aobus_pmx_banks[] = {
103583c56680SXingyu Chen 	BANK_PMX("AO", GPIOAO_0, GPIOAO_13, 0x0, 0),
103683c56680SXingyu Chen };
103783c56680SXingyu Chen 
103883c56680SXingyu Chen static struct meson_axg_pmx_data meson_axg_aobus_pmx_banks_data = {
103983c56680SXingyu Chen 	.pmx_banks	= meson_axg_aobus_pmx_banks,
104083c56680SXingyu Chen 	.num_pmx_banks = ARRAY_SIZE(meson_axg_aobus_pmx_banks),
104183c56680SXingyu Chen };
104283c56680SXingyu Chen 
104383c56680SXingyu Chen static struct meson_pinctrl_data meson_axg_periphs_pinctrl_data = {
104483c56680SXingyu Chen 	.name		= "periphs-banks",
104583c56680SXingyu Chen 	.pins		= meson_axg_periphs_pins,
104683c56680SXingyu Chen 	.groups		= meson_axg_periphs_groups,
104783c56680SXingyu Chen 	.funcs		= meson_axg_periphs_functions,
104883c56680SXingyu Chen 	.banks		= meson_axg_periphs_banks,
104983c56680SXingyu Chen 	.num_pins	= ARRAY_SIZE(meson_axg_periphs_pins),
105083c56680SXingyu Chen 	.num_groups	= ARRAY_SIZE(meson_axg_periphs_groups),
105183c56680SXingyu Chen 	.num_funcs	= ARRAY_SIZE(meson_axg_periphs_functions),
105283c56680SXingyu Chen 	.num_banks	= ARRAY_SIZE(meson_axg_periphs_banks),
105383c56680SXingyu Chen 	.pmx_ops	= &meson_axg_pmx_ops,
105483c56680SXingyu Chen 	.pmx_data	= &meson_axg_periphs_pmx_banks_data,
105583c56680SXingyu Chen };
105683c56680SXingyu Chen 
105783c56680SXingyu Chen static struct meson_pinctrl_data meson_axg_aobus_pinctrl_data = {
105883c56680SXingyu Chen 	.name		= "aobus-banks",
105983c56680SXingyu Chen 	.pins		= meson_axg_aobus_pins,
106083c56680SXingyu Chen 	.groups		= meson_axg_aobus_groups,
106183c56680SXingyu Chen 	.funcs		= meson_axg_aobus_functions,
106283c56680SXingyu Chen 	.banks		= meson_axg_aobus_banks,
106383c56680SXingyu Chen 	.num_pins	= ARRAY_SIZE(meson_axg_aobus_pins),
106483c56680SXingyu Chen 	.num_groups	= ARRAY_SIZE(meson_axg_aobus_groups),
106583c56680SXingyu Chen 	.num_funcs	= ARRAY_SIZE(meson_axg_aobus_functions),
106683c56680SXingyu Chen 	.num_banks	= ARRAY_SIZE(meson_axg_aobus_banks),
106783c56680SXingyu Chen 	.pmx_ops	= &meson_axg_pmx_ops,
106883c56680SXingyu Chen 	.pmx_data	= &meson_axg_aobus_pmx_banks_data,
1069fd422964SQianggui Song 	.parse_dt	= meson8_aobus_parse_dt_extra,
107083c56680SXingyu Chen };
107183c56680SXingyu Chen 
107283c56680SXingyu Chen static const struct of_device_id meson_axg_pinctrl_dt_match[] = {
107383c56680SXingyu Chen 	{
107483c56680SXingyu Chen 		.compatible = "amlogic,meson-axg-periphs-pinctrl",
107583c56680SXingyu Chen 		.data = &meson_axg_periphs_pinctrl_data,
107683c56680SXingyu Chen 	},
107783c56680SXingyu Chen 	{
107883c56680SXingyu Chen 		.compatible = "amlogic,meson-axg-aobus-pinctrl",
107983c56680SXingyu Chen 		.data = &meson_axg_aobus_pinctrl_data,
108083c56680SXingyu Chen 	},
108183c56680SXingyu Chen 	{ },
108283c56680SXingyu Chen };
10839c65441eSKevin Hilman MODULE_DEVICE_TABLE(of, meson_axg_pinctrl_dt_match);
108483c56680SXingyu Chen 
108583c56680SXingyu Chen static struct platform_driver meson_axg_pinctrl_driver = {
108683c56680SXingyu Chen 	.probe		= meson_pinctrl_probe,
108783c56680SXingyu Chen 	.driver = {
108883c56680SXingyu Chen 		.name	= "meson-axg-pinctrl",
108983c56680SXingyu Chen 		.of_match_table = meson_axg_pinctrl_dt_match,
109083c56680SXingyu Chen 	},
109183c56680SXingyu Chen };
109283c56680SXingyu Chen 
10939c65441eSKevin Hilman module_platform_driver(meson_axg_pinctrl_driver);
10949c65441eSKevin Hilman MODULE_LICENSE("Dual BSD/GPL");
1095