18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Pin controller and GPIO driver for Amlogic Meson GXBB.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2016 Endless Mobile, Inc.
68c2ecf20Sopenharmony_ci * Author: Carlo Caione <carlo@endlessm.com>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include <dt-bindings/gpio/meson-gxbb-gpio.h>
108c2ecf20Sopenharmony_ci#include "pinctrl-meson.h"
118c2ecf20Sopenharmony_ci#include "pinctrl-meson8-pmx.h"
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc meson_gxbb_periphs_pins[] = {
148c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_0),
158c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_1),
168c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_2),
178c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_3),
188c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_4),
198c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_5),
208c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_6),
218c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_7),
228c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_8),
238c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_9),
248c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_10),
258c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_11),
268c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_12),
278c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_13),
288c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_14),
298c2ecf20Sopenharmony_ci	MESON_PIN(GPIOZ_15),
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_0),
328c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_1),
338c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_2),
348c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_3),
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_0),
378c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_1),
388c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_2),
398c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_3),
408c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_4),
418c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_5),
428c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_6),
438c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_7),
448c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_8),
458c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_9),
468c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_10),
478c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_11),
488c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_12),
498c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_13),
508c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_14),
518c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_15),
528c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_16),
538c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_17),
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci	MESON_PIN(CARD_0),
568c2ecf20Sopenharmony_ci	MESON_PIN(CARD_1),
578c2ecf20Sopenharmony_ci	MESON_PIN(CARD_2),
588c2ecf20Sopenharmony_ci	MESON_PIN(CARD_3),
598c2ecf20Sopenharmony_ci	MESON_PIN(CARD_4),
608c2ecf20Sopenharmony_ci	MESON_PIN(CARD_5),
618c2ecf20Sopenharmony_ci	MESON_PIN(CARD_6),
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_0),
648c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_1),
658c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_2),
668c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_3),
678c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_4),
688c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_5),
698c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_6),
708c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_7),
718c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_8),
728c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_9),
738c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_10),
748c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_11),
758c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_12),
768c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_13),
778c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_14),
788c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_15),
798c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_16),
808c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_17),
818c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_18),
828c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_19),
838c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_20),
848c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_21),
858c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_22),
868c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_23),
878c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_24),
888c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_25),
898c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_26),
908c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_27),
918c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_28),
928c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_29),
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_0),
958c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_1),
968c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_2),
978c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_3),
988c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_4),
998c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_5),
1008c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_6),
1018c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_7),
1028c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_8),
1038c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_9),
1048c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_10),
1058c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_11),
1068c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_12),
1078c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_13),
1088c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_14),
1098c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_15),
1108c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_16),
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_0),
1138c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_1),
1148c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_2),
1158c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_3),
1168c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_4),
1178c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_5),
1188c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_6),
1198c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_7),
1208c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_8),
1218c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_9),
1228c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_10),
1238c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_11),
1248c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_12),
1258c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_13),
1268c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_14),
1278c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_15),
1288c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_16),
1298c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_17),
1308c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_18),
1318c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_19),
1328c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_20),
1338c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_21),
1348c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_22),
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ci	MESON_PIN(GPIOCLK_0),
1378c2ecf20Sopenharmony_ci	MESON_PIN(GPIOCLK_1),
1388c2ecf20Sopenharmony_ci	MESON_PIN(GPIOCLK_2),
1398c2ecf20Sopenharmony_ci	MESON_PIN(GPIOCLK_3),
1408c2ecf20Sopenharmony_ci};
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_cistatic const unsigned int emmc_nand_d07_pins[] = {
1438c2ecf20Sopenharmony_ci	BOOT_0, BOOT_1, BOOT_2, BOOT_3, BOOT_4, BOOT_5, BOOT_6, BOOT_7,
1448c2ecf20Sopenharmony_ci};
1458c2ecf20Sopenharmony_cistatic const unsigned int emmc_clk_pins[]	= { BOOT_8 };
1468c2ecf20Sopenharmony_cistatic const unsigned int emmc_cmd_pins[]	= { BOOT_10 };
1478c2ecf20Sopenharmony_cistatic const unsigned int emmc_ds_pins[]	= { BOOT_15 };
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_cistatic const unsigned int nor_d_pins[]		= { BOOT_11 };
1508c2ecf20Sopenharmony_cistatic const unsigned int nor_q_pins[]		= { BOOT_12 };
1518c2ecf20Sopenharmony_cistatic const unsigned int nor_c_pins[]		= { BOOT_13 };
1528c2ecf20Sopenharmony_cistatic const unsigned int nor_cs_pins[]		= { BOOT_15 };
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_cistatic const unsigned int spi_sclk_pins[]	= { GPIOZ_6 };
1558c2ecf20Sopenharmony_cistatic const unsigned int spi_ss0_pins[]	= { GPIOZ_7 };
1568c2ecf20Sopenharmony_cistatic const unsigned int spi_miso_pins[]	= { GPIOZ_12 };
1578c2ecf20Sopenharmony_cistatic const unsigned int spi_mosi_pins[]	= { GPIOZ_13 };
1588c2ecf20Sopenharmony_ci
1598c2ecf20Sopenharmony_cistatic const unsigned int sdcard_d0_pins[]	= { CARD_1 };
1608c2ecf20Sopenharmony_cistatic const unsigned int sdcard_d1_pins[]	= { CARD_0 };
1618c2ecf20Sopenharmony_cistatic const unsigned int sdcard_d2_pins[]	= { CARD_5 };
1628c2ecf20Sopenharmony_cistatic const unsigned int sdcard_d3_pins[]	= { CARD_4 };
1638c2ecf20Sopenharmony_cistatic const unsigned int sdcard_cmd_pins[]	= { CARD_3 };
1648c2ecf20Sopenharmony_cistatic const unsigned int sdcard_clk_pins[]	= { CARD_2 };
1658c2ecf20Sopenharmony_ci
1668c2ecf20Sopenharmony_cistatic const unsigned int sdio_d0_pins[]	= { GPIOX_0 };
1678c2ecf20Sopenharmony_cistatic const unsigned int sdio_d1_pins[]	= { GPIOX_1 };
1688c2ecf20Sopenharmony_cistatic const unsigned int sdio_d2_pins[]	= { GPIOX_2 };
1698c2ecf20Sopenharmony_cistatic const unsigned int sdio_d3_pins[]	= { GPIOX_3 };
1708c2ecf20Sopenharmony_cistatic const unsigned int sdio_cmd_pins[]	= { GPIOX_4 };
1718c2ecf20Sopenharmony_cistatic const unsigned int sdio_clk_pins[]	= { GPIOX_5 };
1728c2ecf20Sopenharmony_cistatic const unsigned int sdio_irq_pins[]	= { GPIOX_7 };
1738c2ecf20Sopenharmony_ci
1748c2ecf20Sopenharmony_cistatic const unsigned int nand_ce0_pins[]	= { BOOT_8 };
1758c2ecf20Sopenharmony_cistatic const unsigned int nand_ce1_pins[]	= { BOOT_9 };
1768c2ecf20Sopenharmony_cistatic const unsigned int nand_rb0_pins[]	= { BOOT_10 };
1778c2ecf20Sopenharmony_cistatic const unsigned int nand_ale_pins[]	= { BOOT_11 };
1788c2ecf20Sopenharmony_cistatic const unsigned int nand_cle_pins[]	= { BOOT_12 };
1798c2ecf20Sopenharmony_cistatic const unsigned int nand_wen_clk_pins[]	= { BOOT_13 };
1808c2ecf20Sopenharmony_cistatic const unsigned int nand_ren_wr_pins[]	= { BOOT_14 };
1818c2ecf20Sopenharmony_cistatic const unsigned int nand_dqs_pins[]	= { BOOT_15 };
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_a_pins[]	= { GPIOX_12 };
1848c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_a_pins[]	= { GPIOX_13 };
1858c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_a_pins[]	= { GPIOX_14 };
1868c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_a_pins[]	= { GPIOX_15 };
1878c2ecf20Sopenharmony_ci
1888c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_b_pins[]	= { GPIODV_24 };
1898c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_b_pins[]	= { GPIODV_25 };
1908c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_b_pins[]	= { GPIODV_26 };
1918c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_b_pins[]	= { GPIODV_27 };
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_c_pins[]	= { GPIOY_13 };
1948c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_c_pins[]	= { GPIOY_14 };
1958c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_c_pins[]	= { GPIOY_11 };
1968c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_c_pins[]	= { GPIOY_12 };
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_a_pins[]	= { GPIODV_25 };
1998c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_a_pins[]	= { GPIODV_24 };
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_b_pins[]	= { GPIODV_27 };
2028c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_b_pins[]	= { GPIODV_26 };
2038c2ecf20Sopenharmony_ci
2048c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_c_pins[]	= { GPIODV_29 };
2058c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_c_pins[]	= { GPIODV_28 };
2068c2ecf20Sopenharmony_ci
2078c2ecf20Sopenharmony_cistatic const unsigned int eth_mdio_pins[]	= { GPIOZ_0 };
2088c2ecf20Sopenharmony_cistatic const unsigned int eth_mdc_pins[]	= { GPIOZ_1 };
2098c2ecf20Sopenharmony_cistatic const unsigned int eth_clk_rx_clk_pins[]	= { GPIOZ_2 };
2108c2ecf20Sopenharmony_cistatic const unsigned int eth_rx_dv_pins[]	= { GPIOZ_3 };
2118c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd0_pins[]	= { GPIOZ_4 };
2128c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd1_pins[]	= { GPIOZ_5 };
2138c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd2_pins[]	= { GPIOZ_6 };
2148c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd3_pins[]	= { GPIOZ_7 };
2158c2ecf20Sopenharmony_cistatic const unsigned int eth_rgmii_tx_clk_pins[] = { GPIOZ_8 };
2168c2ecf20Sopenharmony_cistatic const unsigned int eth_tx_en_pins[]	= { GPIOZ_9 };
2178c2ecf20Sopenharmony_cistatic const unsigned int eth_txd0_pins[]	= { GPIOZ_10 };
2188c2ecf20Sopenharmony_cistatic const unsigned int eth_txd1_pins[]	= { GPIOZ_11 };
2198c2ecf20Sopenharmony_cistatic const unsigned int eth_txd2_pins[]	= { GPIOZ_12 };
2208c2ecf20Sopenharmony_cistatic const unsigned int eth_txd3_pins[]	= { GPIOZ_13 };
2218c2ecf20Sopenharmony_ci
2228c2ecf20Sopenharmony_cistatic const unsigned int pwm_a_x_pins[]	= { GPIOX_6 };
2238c2ecf20Sopenharmony_cistatic const unsigned int pwm_a_y_pins[]	= { GPIOY_16 };
2248c2ecf20Sopenharmony_cistatic const unsigned int pwm_b_pins[]		= { GPIODV_29 };
2258c2ecf20Sopenharmony_cistatic const unsigned int pwm_d_pins[]		= { GPIODV_28 };
2268c2ecf20Sopenharmony_cistatic const unsigned int pwm_e_pins[]		= { GPIOX_19 };
2278c2ecf20Sopenharmony_cistatic const unsigned int pwm_f_x_pins[]	= { GPIOX_7 };
2288c2ecf20Sopenharmony_cistatic const unsigned int pwm_f_y_pins[]	= { GPIOY_15 };
2298c2ecf20Sopenharmony_ci
2308c2ecf20Sopenharmony_cistatic const unsigned int hdmi_hpd_pins[]	= { GPIOH_0 };
2318c2ecf20Sopenharmony_cistatic const unsigned int hdmi_sda_pins[]	= { GPIOH_1 };
2328c2ecf20Sopenharmony_cistatic const unsigned int hdmi_scl_pins[]	= { GPIOH_2 };
2338c2ecf20Sopenharmony_ci
2348c2ecf20Sopenharmony_cistatic const unsigned int tsin_a_d_valid_pins[] = { GPIOY_0 };
2358c2ecf20Sopenharmony_cistatic const unsigned int tsin_a_sop_pins[]	= { GPIOY_1 };
2368c2ecf20Sopenharmony_cistatic const unsigned int tsin_a_clk_pins[]	= { GPIOY_2 };
2378c2ecf20Sopenharmony_cistatic const unsigned int tsin_a_d0_pins[]	= { GPIOY_3 };
2388c2ecf20Sopenharmony_cistatic const unsigned int tsin_a_dp_pins[]	= {
2398c2ecf20Sopenharmony_ci	GPIOY_4, GPIOY_5, GPIOY_6, GPIOY_7, GPIOY_8, GPIOY_9, GPIOY_10
2408c2ecf20Sopenharmony_ci};
2418c2ecf20Sopenharmony_ci
2428c2ecf20Sopenharmony_cistatic const unsigned int tsin_a_fail_pins[]	= { GPIOY_11 };
2438c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_ch23_y_pins[]	= { GPIOY_8 };
2448c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_ch45_y_pins[]	= { GPIOY_9 };
2458c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_ch67_y_pins[]	= { GPIOY_10 };
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_cistatic const unsigned int tsin_b_d_valid_pins[] = { GPIOX_6 };
2488c2ecf20Sopenharmony_cistatic const unsigned int tsin_b_sop_pins[]	= { GPIOX_7 };
2498c2ecf20Sopenharmony_cistatic const unsigned int tsin_b_clk_pins[]	= { GPIOX_8 };
2508c2ecf20Sopenharmony_cistatic const unsigned int tsin_b_d0_pins[]	= { GPIOX_9 };
2518c2ecf20Sopenharmony_ci
2528c2ecf20Sopenharmony_cistatic const unsigned int spdif_out_y_pins[]	= { GPIOY_12 };
2538c2ecf20Sopenharmony_ci
2548c2ecf20Sopenharmony_cistatic const unsigned int gen_clk_out_pins[]	= { GPIOY_15 };
2558c2ecf20Sopenharmony_ci
2568c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = {
2578c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_0),
2588c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_1),
2598c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_2),
2608c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_3),
2618c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_4),
2628c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_5),
2638c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_6),
2648c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_7),
2658c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_8),
2668c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_9),
2678c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_10),
2688c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_11),
2698c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_12),
2708c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_13),
2718c2ecf20Sopenharmony_ci
2728c2ecf20Sopenharmony_ci	MESON_PIN(GPIO_TEST_N),
2738c2ecf20Sopenharmony_ci};
2748c2ecf20Sopenharmony_ci
2758c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_ao_a_pins[]	= { GPIOAO_0 };
2768c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_ao_a_pins[]	= { GPIOAO_1 };
2778c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_ao_a_pins[]	= { GPIOAO_2 };
2788c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_ao_a_pins[]	= { GPIOAO_3 };
2798c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_ao_b_pins[]	= { GPIOAO_4 };
2808c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_ao_b_pins[]	= { GPIOAO_5 };
2818c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_ao_b_pins[]	= { GPIOAO_2 };
2828c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_ao_b_pins[]	= { GPIOAO_3 };
2838c2ecf20Sopenharmony_ci
2848c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_ao_pins[]	= { GPIOAO_4 };
2858c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_ao_pins[]	= { GPIOAO_5 };
2868c2ecf20Sopenharmony_cistatic const unsigned int i2c_slave_sck_ao_pins[] = {GPIOAO_4 };
2878c2ecf20Sopenharmony_cistatic const unsigned int i2c_slave_sda_ao_pins[] = {GPIOAO_5 };
2888c2ecf20Sopenharmony_ci
2898c2ecf20Sopenharmony_cistatic const unsigned int remote_input_ao_pins[] = { GPIOAO_7 };
2908c2ecf20Sopenharmony_ci
2918c2ecf20Sopenharmony_cistatic const unsigned int pwm_ao_a_3_pins[]	= { GPIOAO_3 };
2928c2ecf20Sopenharmony_cistatic const unsigned int pwm_ao_a_6_pins[]	= { GPIOAO_6 };
2938c2ecf20Sopenharmony_cistatic const unsigned int pwm_ao_a_12_pins[]	= { GPIOAO_12 };
2948c2ecf20Sopenharmony_cistatic const unsigned int pwm_ao_b_pins[]	= { GPIOAO_13 };
2958c2ecf20Sopenharmony_ci
2968c2ecf20Sopenharmony_cistatic const unsigned int i2s_am_clk_pins[]	= { GPIOAO_8 };
2978c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_ao_clk_pins[]	= { GPIOAO_9 };
2988c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_lr_clk_pins[]	= { GPIOAO_10 };
2998c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_ch01_ao_pins[] = { GPIOAO_11 };
3008c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_ch23_ao_pins[] = { GPIOAO_12 };
3018c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_ch45_ao_pins[] = { GPIOAO_13 };
3028c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_ch67_ao_pins[] = { GPIO_TEST_N };
3038c2ecf20Sopenharmony_ci
3048c2ecf20Sopenharmony_cistatic const unsigned int spdif_out_ao_6_pins[]	= { GPIOAO_6 };
3058c2ecf20Sopenharmony_cistatic const unsigned int spdif_out_ao_13_pins[] = { GPIOAO_13 };
3068c2ecf20Sopenharmony_ci
3078c2ecf20Sopenharmony_cistatic const unsigned int ao_cec_pins[]		= { GPIOAO_12 };
3088c2ecf20Sopenharmony_cistatic const unsigned int ee_cec_pins[]		= { GPIOAO_12 };
3098c2ecf20Sopenharmony_ci
3108c2ecf20Sopenharmony_cistatic struct meson_pmx_group meson_gxbb_periphs_groups[] = {
3118c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_0),
3128c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_1),
3138c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_2),
3148c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_3),
3158c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_4),
3168c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_5),
3178c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_6),
3188c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_7),
3198c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_8),
3208c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_9),
3218c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_10),
3228c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_11),
3238c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_12),
3248c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_13),
3258c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_14),
3268c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOZ_15),
3278c2ecf20Sopenharmony_ci
3288c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_0),
3298c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_1),
3308c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_2),
3318c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_3),
3328c2ecf20Sopenharmony_ci
3338c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_0),
3348c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_1),
3358c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_2),
3368c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_3),
3378c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_4),
3388c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_5),
3398c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_6),
3408c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_7),
3418c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_8),
3428c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_9),
3438c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_10),
3448c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_11),
3458c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_12),
3468c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_13),
3478c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_14),
3488c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_15),
3498c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_16),
3508c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_17),
3518c2ecf20Sopenharmony_ci
3528c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_0),
3538c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_1),
3548c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_2),
3558c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_3),
3568c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_4),
3578c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_5),
3588c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_6),
3598c2ecf20Sopenharmony_ci
3608c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_0),
3618c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_1),
3628c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_2),
3638c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_3),
3648c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_4),
3658c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_5),
3668c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_6),
3678c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_7),
3688c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_8),
3698c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_9),
3708c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_10),
3718c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_11),
3728c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_12),
3738c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_13),
3748c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_14),
3758c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_15),
3768c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_16),
3778c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_17),
3788c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_19),
3798c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_20),
3808c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_21),
3818c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_22),
3828c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_23),
3838c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_24),
3848c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_25),
3858c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_26),
3868c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_27),
3878c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_28),
3888c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_29),
3898c2ecf20Sopenharmony_ci
3908c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_0),
3918c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_1),
3928c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_2),
3938c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_3),
3948c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_4),
3958c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_5),
3968c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_6),
3978c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_7),
3988c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_8),
3998c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_9),
4008c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_10),
4018c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_11),
4028c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_12),
4038c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_13),
4048c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_14),
4058c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_15),
4068c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_16),
4078c2ecf20Sopenharmony_ci
4088c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_0),
4098c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_1),
4108c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_2),
4118c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_3),
4128c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_4),
4138c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_5),
4148c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_6),
4158c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_7),
4168c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_8),
4178c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_9),
4188c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_10),
4198c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_11),
4208c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_12),
4218c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_13),
4228c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_14),
4238c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_15),
4248c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_16),
4258c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_17),
4268c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_18),
4278c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_19),
4288c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_20),
4298c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_21),
4308c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_22),
4318c2ecf20Sopenharmony_ci
4328c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOCLK_0),
4338c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOCLK_1),
4348c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOCLK_2),
4358c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOCLK_3),
4368c2ecf20Sopenharmony_ci
4378c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIO_TEST_N),
4388c2ecf20Sopenharmony_ci
4398c2ecf20Sopenharmony_ci	/* Bank X */
4408c2ecf20Sopenharmony_ci	GROUP(sdio_d0,		8,	5),
4418c2ecf20Sopenharmony_ci	GROUP(sdio_d1,		8,	4),
4428c2ecf20Sopenharmony_ci	GROUP(sdio_d2,		8,	3),
4438c2ecf20Sopenharmony_ci	GROUP(sdio_d3,		8,	2),
4448c2ecf20Sopenharmony_ci	GROUP(sdio_cmd,		8,	1),
4458c2ecf20Sopenharmony_ci	GROUP(sdio_clk,		8,	0),
4468c2ecf20Sopenharmony_ci	GROUP(sdio_irq,		8,	11),
4478c2ecf20Sopenharmony_ci	GROUP(uart_tx_a,	4,	13),
4488c2ecf20Sopenharmony_ci	GROUP(uart_rx_a,	4,	12),
4498c2ecf20Sopenharmony_ci	GROUP(uart_cts_a,	4,	11),
4508c2ecf20Sopenharmony_ci	GROUP(uart_rts_a,	4,	10),
4518c2ecf20Sopenharmony_ci	GROUP(pwm_a_x,		3,	17),
4528c2ecf20Sopenharmony_ci	GROUP(pwm_e,		2,	30),
4538c2ecf20Sopenharmony_ci	GROUP(pwm_f_x,		3,	18),
4548c2ecf20Sopenharmony_ci	GROUP(tsin_b_d_valid,	3,	9),
4558c2ecf20Sopenharmony_ci	GROUP(tsin_b_sop,	3,	8),
4568c2ecf20Sopenharmony_ci	GROUP(tsin_b_clk,	3,	10),
4578c2ecf20Sopenharmony_ci	GROUP(tsin_b_d0,	3,	7),
4588c2ecf20Sopenharmony_ci
4598c2ecf20Sopenharmony_ci	/* Bank Y */
4608c2ecf20Sopenharmony_ci	GROUP(uart_cts_c,	1,	17),
4618c2ecf20Sopenharmony_ci	GROUP(uart_rts_c,	1,	16),
4628c2ecf20Sopenharmony_ci	GROUP(uart_tx_c,	1,	19),
4638c2ecf20Sopenharmony_ci	GROUP(uart_rx_c,	1,	18),
4648c2ecf20Sopenharmony_ci	GROUP(tsin_a_fail,	3,	3),
4658c2ecf20Sopenharmony_ci	GROUP(tsin_a_d_valid,	3,	2),
4668c2ecf20Sopenharmony_ci	GROUP(tsin_a_sop,	3,	1),
4678c2ecf20Sopenharmony_ci	GROUP(tsin_a_clk,	3,	0),
4688c2ecf20Sopenharmony_ci	GROUP(tsin_a_d0,	3,	4),
4698c2ecf20Sopenharmony_ci	GROUP(tsin_a_dp,	3,	5),
4708c2ecf20Sopenharmony_ci	GROUP(pwm_a_y,		1,	21),
4718c2ecf20Sopenharmony_ci	GROUP(pwm_f_y,		1,	20),
4728c2ecf20Sopenharmony_ci	GROUP(i2s_out_ch23_y,	1,	5),
4738c2ecf20Sopenharmony_ci	GROUP(i2s_out_ch45_y,	1,	6),
4748c2ecf20Sopenharmony_ci	GROUP(i2s_out_ch67_y,	1,	7),
4758c2ecf20Sopenharmony_ci	GROUP(spdif_out_y,	1,	9),
4768c2ecf20Sopenharmony_ci	GROUP(gen_clk_out,	6,	15),
4778c2ecf20Sopenharmony_ci
4788c2ecf20Sopenharmony_ci	/* Bank Z */
4798c2ecf20Sopenharmony_ci	GROUP(eth_mdio,		6,	1),
4808c2ecf20Sopenharmony_ci	GROUP(eth_mdc,		6,	0),
4818c2ecf20Sopenharmony_ci	GROUP(eth_clk_rx_clk,	6,	13),
4828c2ecf20Sopenharmony_ci	GROUP(eth_rx_dv,	6,	12),
4838c2ecf20Sopenharmony_ci	GROUP(eth_rxd0,		6,	11),
4848c2ecf20Sopenharmony_ci	GROUP(eth_rxd1,		6,	10),
4858c2ecf20Sopenharmony_ci	GROUP(eth_rxd2,		6,	9),
4868c2ecf20Sopenharmony_ci	GROUP(eth_rxd3,		6,	8),
4878c2ecf20Sopenharmony_ci	GROUP(eth_rgmii_tx_clk,	6,	7),
4888c2ecf20Sopenharmony_ci	GROUP(eth_tx_en,	6,	6),
4898c2ecf20Sopenharmony_ci	GROUP(eth_txd0,		6,	5),
4908c2ecf20Sopenharmony_ci	GROUP(eth_txd1,		6,	4),
4918c2ecf20Sopenharmony_ci	GROUP(eth_txd2,		6,	3),
4928c2ecf20Sopenharmony_ci	GROUP(eth_txd3,		6,	2),
4938c2ecf20Sopenharmony_ci	GROUP(spi_ss0,		5,	26),
4948c2ecf20Sopenharmony_ci	GROUP(spi_sclk,		5,	27),
4958c2ecf20Sopenharmony_ci	GROUP(spi_miso,		5,	28),
4968c2ecf20Sopenharmony_ci	GROUP(spi_mosi,		5,	29),
4978c2ecf20Sopenharmony_ci
4988c2ecf20Sopenharmony_ci	/* Bank H */
4998c2ecf20Sopenharmony_ci	GROUP(hdmi_hpd,		1,	26),
5008c2ecf20Sopenharmony_ci	GROUP(hdmi_sda,		1,	25),
5018c2ecf20Sopenharmony_ci	GROUP(hdmi_scl,		1,	24),
5028c2ecf20Sopenharmony_ci
5038c2ecf20Sopenharmony_ci	/* Bank DV */
5048c2ecf20Sopenharmony_ci	GROUP(uart_tx_b,	2,	29),
5058c2ecf20Sopenharmony_ci	GROUP(uart_rx_b,	2,	28),
5068c2ecf20Sopenharmony_ci	GROUP(uart_cts_b,	2,	27),
5078c2ecf20Sopenharmony_ci	GROUP(uart_rts_b,	2,	26),
5088c2ecf20Sopenharmony_ci	GROUP(pwm_b,		3,	21),
5098c2ecf20Sopenharmony_ci	GROUP(pwm_d,		3,	20),
5108c2ecf20Sopenharmony_ci	GROUP(i2c_sck_a,	7,	27),
5118c2ecf20Sopenharmony_ci	GROUP(i2c_sda_a,	7,	26),
5128c2ecf20Sopenharmony_ci	GROUP(i2c_sck_b,	7,	25),
5138c2ecf20Sopenharmony_ci	GROUP(i2c_sda_b,	7,	24),
5148c2ecf20Sopenharmony_ci	GROUP(i2c_sck_c,	7,	23),
5158c2ecf20Sopenharmony_ci	GROUP(i2c_sda_c,	7,	22),
5168c2ecf20Sopenharmony_ci
5178c2ecf20Sopenharmony_ci	/* Bank BOOT */
5188c2ecf20Sopenharmony_ci	GROUP(emmc_nand_d07,	4,	30),
5198c2ecf20Sopenharmony_ci	GROUP(emmc_clk,		4,	18),
5208c2ecf20Sopenharmony_ci	GROUP(emmc_cmd,		4,	19),
5218c2ecf20Sopenharmony_ci	GROUP(emmc_ds,		4,	31),
5228c2ecf20Sopenharmony_ci	GROUP(nor_d,		5,	1),
5238c2ecf20Sopenharmony_ci	GROUP(nor_q,		5,	3),
5248c2ecf20Sopenharmony_ci	GROUP(nor_c,		5,	2),
5258c2ecf20Sopenharmony_ci	GROUP(nor_cs,		5,	0),
5268c2ecf20Sopenharmony_ci	GROUP(nand_ce0,		4,	26),
5278c2ecf20Sopenharmony_ci	GROUP(nand_ce1,		4,	27),
5288c2ecf20Sopenharmony_ci	GROUP(nand_rb0,		4,	25),
5298c2ecf20Sopenharmony_ci	GROUP(nand_ale,		4,	24),
5308c2ecf20Sopenharmony_ci	GROUP(nand_cle,		4,	23),
5318c2ecf20Sopenharmony_ci	GROUP(nand_wen_clk,	4,	22),
5328c2ecf20Sopenharmony_ci	GROUP(nand_ren_wr,	4,	21),
5338c2ecf20Sopenharmony_ci	GROUP(nand_dqs,		4,	20),
5348c2ecf20Sopenharmony_ci
5358c2ecf20Sopenharmony_ci	/* Bank CARD */
5368c2ecf20Sopenharmony_ci	GROUP(sdcard_d1,	2,	14),
5378c2ecf20Sopenharmony_ci	GROUP(sdcard_d0,	2,	15),
5388c2ecf20Sopenharmony_ci	GROUP(sdcard_d3,	2,	12),
5398c2ecf20Sopenharmony_ci	GROUP(sdcard_d2,	2,	13),
5408c2ecf20Sopenharmony_ci	GROUP(sdcard_cmd,	2,	10),
5418c2ecf20Sopenharmony_ci	GROUP(sdcard_clk,	2,	11),
5428c2ecf20Sopenharmony_ci};
5438c2ecf20Sopenharmony_ci
5448c2ecf20Sopenharmony_cistatic struct meson_pmx_group meson_gxbb_aobus_groups[] = {
5458c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_0),
5468c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_1),
5478c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_2),
5488c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_3),
5498c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_4),
5508c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_5),
5518c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_6),
5528c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_7),
5538c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_8),
5548c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_9),
5558c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_10),
5568c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_11),
5578c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_12),
5588c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_13),
5598c2ecf20Sopenharmony_ci
5608c2ecf20Sopenharmony_ci	/* bank AO */
5618c2ecf20Sopenharmony_ci	GROUP(uart_tx_ao_b,	0,	24),
5628c2ecf20Sopenharmony_ci	GROUP(uart_rx_ao_b,	0,	25),
5638c2ecf20Sopenharmony_ci	GROUP(uart_tx_ao_a,	0,	12),
5648c2ecf20Sopenharmony_ci	GROUP(uart_rx_ao_a,	0,	11),
5658c2ecf20Sopenharmony_ci	GROUP(uart_cts_ao_a,	0,	10),
5668c2ecf20Sopenharmony_ci	GROUP(uart_rts_ao_a,	0,	9),
5678c2ecf20Sopenharmony_ci	GROUP(uart_cts_ao_b,	0,	8),
5688c2ecf20Sopenharmony_ci	GROUP(uart_rts_ao_b,	0,	7),
5698c2ecf20Sopenharmony_ci	GROUP(i2c_sck_ao,	0,	6),
5708c2ecf20Sopenharmony_ci	GROUP(i2c_sda_ao,	0,	5),
5718c2ecf20Sopenharmony_ci	GROUP(i2c_slave_sck_ao, 0,	2),
5728c2ecf20Sopenharmony_ci	GROUP(i2c_slave_sda_ao, 0,	1),
5738c2ecf20Sopenharmony_ci	GROUP(remote_input_ao,	0,	0),
5748c2ecf20Sopenharmony_ci	GROUP(pwm_ao_a_3,	0,	22),
5758c2ecf20Sopenharmony_ci	GROUP(pwm_ao_a_6,	0,	18),
5768c2ecf20Sopenharmony_ci	GROUP(pwm_ao_a_12,	0,	17),
5778c2ecf20Sopenharmony_ci	GROUP(pwm_ao_b,		0,	3),
5788c2ecf20Sopenharmony_ci	GROUP(i2s_am_clk,	0,	30),
5798c2ecf20Sopenharmony_ci	GROUP(i2s_out_ao_clk,	0,	29),
5808c2ecf20Sopenharmony_ci	GROUP(i2s_out_lr_clk,	0,	28),
5818c2ecf20Sopenharmony_ci	GROUP(i2s_out_ch01_ao,	0,	27),
5828c2ecf20Sopenharmony_ci	GROUP(i2s_out_ch23_ao,	1,	0),
5838c2ecf20Sopenharmony_ci	GROUP(i2s_out_ch45_ao,	1,	1),
5848c2ecf20Sopenharmony_ci	GROUP(spdif_out_ao_6,	0,	16),
5858c2ecf20Sopenharmony_ci	GROUP(spdif_out_ao_13,	0,	4),
5868c2ecf20Sopenharmony_ci	GROUP(ao_cec,           0,      15),
5878c2ecf20Sopenharmony_ci	GROUP(ee_cec,           0,      14),
5888c2ecf20Sopenharmony_ci
5898c2ecf20Sopenharmony_ci	/* test n pin */
5908c2ecf20Sopenharmony_ci	GROUP(i2s_out_ch67_ao,	1,	2),
5918c2ecf20Sopenharmony_ci};
5928c2ecf20Sopenharmony_ci
5938c2ecf20Sopenharmony_cistatic const char * const gpio_periphs_groups[] = {
5948c2ecf20Sopenharmony_ci	"GPIOZ_0", "GPIOZ_1", "GPIOZ_2", "GPIOZ_3", "GPIOZ_4",
5958c2ecf20Sopenharmony_ci	"GPIOZ_5", "GPIOZ_6", "GPIOZ_7", "GPIOZ_8", "GPIOZ_9",
5968c2ecf20Sopenharmony_ci	"GPIOZ_10", "GPIOZ_11", "GPIOZ_12", "GPIOZ_13", "GPIOZ_14",
5978c2ecf20Sopenharmony_ci	"GPIOZ_15",
5988c2ecf20Sopenharmony_ci
5998c2ecf20Sopenharmony_ci	"GPIOH_0", "GPIOH_1", "GPIOH_2", "GPIOH_3",
6008c2ecf20Sopenharmony_ci
6018c2ecf20Sopenharmony_ci	"BOOT_0", "BOOT_1", "BOOT_2", "BOOT_3", "BOOT_4",
6028c2ecf20Sopenharmony_ci	"BOOT_5", "BOOT_6", "BOOT_7", "BOOT_8", "BOOT_9",
6038c2ecf20Sopenharmony_ci	"BOOT_10", "BOOT_11", "BOOT_12", "BOOT_13", "BOOT_14",
6048c2ecf20Sopenharmony_ci	"BOOT_15", "BOOT_16", "BOOT_17",
6058c2ecf20Sopenharmony_ci
6068c2ecf20Sopenharmony_ci	"CARD_0", "CARD_1", "CARD_2", "CARD_3", "CARD_4",
6078c2ecf20Sopenharmony_ci	"CARD_5", "CARD_6",
6088c2ecf20Sopenharmony_ci
6098c2ecf20Sopenharmony_ci	"GPIODV_0", "GPIODV_1", "GPIODV_2", "GPIODV_3", "GPIODV_4",
6108c2ecf20Sopenharmony_ci	"GPIODV_5", "GPIODV_6", "GPIODV_7", "GPIODV_8", "GPIODV_9",
6118c2ecf20Sopenharmony_ci	"GPIODV_10", "GPIODV_11", "GPIODV_12", "GPIODV_13", "GPIODV_14",
6128c2ecf20Sopenharmony_ci	"GPIODV_15", "GPIODV_16", "GPIODV_17", "GPIODV_18", "GPIODV_19",
6138c2ecf20Sopenharmony_ci	"GPIODV_20", "GPIODV_21", "GPIODV_22", "GPIODV_23", "GPIODV_24",
6148c2ecf20Sopenharmony_ci	"GPIODV_25", "GPIODV_26", "GPIODV_27", "GPIODV_28", "GPIODV_29",
6158c2ecf20Sopenharmony_ci
6168c2ecf20Sopenharmony_ci	"GPIOY_0", "GPIOY_1", "GPIOY_2", "GPIOY_3", "GPIOY_4",
6178c2ecf20Sopenharmony_ci	"GPIOY_5", "GPIOY_6", "GPIOY_7", "GPIOY_8", "GPIOY_9",
6188c2ecf20Sopenharmony_ci	"GPIOY_10", "GPIOY_11", "GPIOY_12", "GPIOY_13", "GPIOY_14",
6198c2ecf20Sopenharmony_ci	"GPIOY_15", "GPIOY_16",
6208c2ecf20Sopenharmony_ci
6218c2ecf20Sopenharmony_ci	"GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4",
6228c2ecf20Sopenharmony_ci	"GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9",
6238c2ecf20Sopenharmony_ci	"GPIOX_10", "GPIOX_11", "GPIOX_12", "GPIOX_13", "GPIOX_14",
6248c2ecf20Sopenharmony_ci	"GPIOX_15", "GPIOX_16", "GPIOX_17", "GPIOX_18", "GPIOX_19",
6258c2ecf20Sopenharmony_ci	"GPIOX_20", "GPIOX_21", "GPIOX_22",
6268c2ecf20Sopenharmony_ci};
6278c2ecf20Sopenharmony_ci
6288c2ecf20Sopenharmony_cistatic const char * const tsin_a_groups[] = {
6298c2ecf20Sopenharmony_ci	"tsin_a_clk", "tsin_a_sop", "tsin_a_d_valid", "tsin_a_d0",
6308c2ecf20Sopenharmony_ci	"tsin_a_dp", "tsin_a_fail",
6318c2ecf20Sopenharmony_ci};
6328c2ecf20Sopenharmony_ci
6338c2ecf20Sopenharmony_cistatic const char * const tsin_b_groups[] = {
6348c2ecf20Sopenharmony_ci	"tsin_b_clk", "tsin_b_sop", "tsin_b_d_valid", "tsin_b_d0",
6358c2ecf20Sopenharmony_ci};
6368c2ecf20Sopenharmony_ci
6378c2ecf20Sopenharmony_cistatic const char * const emmc_groups[] = {
6388c2ecf20Sopenharmony_ci	"emmc_nand_d07", "emmc_clk", "emmc_cmd", "emmc_ds",
6398c2ecf20Sopenharmony_ci};
6408c2ecf20Sopenharmony_ci
6418c2ecf20Sopenharmony_cistatic const char * const nor_groups[] = {
6428c2ecf20Sopenharmony_ci	"nor_d", "nor_q", "nor_c", "nor_cs",
6438c2ecf20Sopenharmony_ci};
6448c2ecf20Sopenharmony_ci
6458c2ecf20Sopenharmony_cistatic const char * const spi_groups[] = {
6468c2ecf20Sopenharmony_ci	"spi_mosi", "spi_miso", "spi_ss0", "spi_sclk",
6478c2ecf20Sopenharmony_ci};
6488c2ecf20Sopenharmony_ci
6498c2ecf20Sopenharmony_cistatic const char * const sdcard_groups[] = {
6508c2ecf20Sopenharmony_ci	"sdcard_d0", "sdcard_d1", "sdcard_d2", "sdcard_d3",
6518c2ecf20Sopenharmony_ci	"sdcard_cmd", "sdcard_clk",
6528c2ecf20Sopenharmony_ci};
6538c2ecf20Sopenharmony_ci
6548c2ecf20Sopenharmony_cistatic const char * const sdio_groups[] = {
6558c2ecf20Sopenharmony_ci	"sdio_d0", "sdio_d1", "sdio_d2", "sdio_d3",
6568c2ecf20Sopenharmony_ci	"sdio_cmd", "sdio_clk", "sdio_irq",
6578c2ecf20Sopenharmony_ci};
6588c2ecf20Sopenharmony_ci
6598c2ecf20Sopenharmony_cistatic const char * const nand_groups[] = {
6608c2ecf20Sopenharmony_ci	"emmc_nand_d07", "nand_ce0", "nand_ce1", "nand_rb0", "nand_ale",
6618c2ecf20Sopenharmony_ci	"nand_cle", "nand_wen_clk", "nand_ren_wr", "nand_dqs",
6628c2ecf20Sopenharmony_ci};
6638c2ecf20Sopenharmony_ci
6648c2ecf20Sopenharmony_cistatic const char * const uart_a_groups[] = {
6658c2ecf20Sopenharmony_ci	"uart_tx_a", "uart_rx_a", "uart_cts_a", "uart_rts_a",
6668c2ecf20Sopenharmony_ci};
6678c2ecf20Sopenharmony_ci
6688c2ecf20Sopenharmony_cistatic const char * const uart_b_groups[] = {
6698c2ecf20Sopenharmony_ci	"uart_tx_b", "uart_rx_b", "uart_cts_b", "uart_rts_b",
6708c2ecf20Sopenharmony_ci};
6718c2ecf20Sopenharmony_ci
6728c2ecf20Sopenharmony_cistatic const char * const uart_c_groups[] = {
6738c2ecf20Sopenharmony_ci	"uart_tx_c", "uart_rx_c", "uart_cts_c", "uart_rts_c",
6748c2ecf20Sopenharmony_ci};
6758c2ecf20Sopenharmony_ci
6768c2ecf20Sopenharmony_cistatic const char * const i2c_a_groups[] = {
6778c2ecf20Sopenharmony_ci	"i2c_sck_a", "i2c_sda_a",
6788c2ecf20Sopenharmony_ci};
6798c2ecf20Sopenharmony_ci
6808c2ecf20Sopenharmony_cistatic const char * const i2c_b_groups[] = {
6818c2ecf20Sopenharmony_ci	"i2c_sck_b", "i2c_sda_b",
6828c2ecf20Sopenharmony_ci};
6838c2ecf20Sopenharmony_ci
6848c2ecf20Sopenharmony_cistatic const char * const i2c_c_groups[] = {
6858c2ecf20Sopenharmony_ci	"i2c_sck_c", "i2c_sda_c",
6868c2ecf20Sopenharmony_ci};
6878c2ecf20Sopenharmony_ci
6888c2ecf20Sopenharmony_cistatic const char * const eth_groups[] = {
6898c2ecf20Sopenharmony_ci	"eth_mdio", "eth_mdc", "eth_clk_rx_clk", "eth_rx_dv",
6908c2ecf20Sopenharmony_ci	"eth_rxd0", "eth_rxd1", "eth_rxd2", "eth_rxd3",
6918c2ecf20Sopenharmony_ci	"eth_rgmii_tx_clk", "eth_tx_en",
6928c2ecf20Sopenharmony_ci	"eth_txd0", "eth_txd1", "eth_txd2", "eth_txd3",
6938c2ecf20Sopenharmony_ci};
6948c2ecf20Sopenharmony_ci
6958c2ecf20Sopenharmony_cistatic const char * const pwm_a_x_groups[] = {
6968c2ecf20Sopenharmony_ci	"pwm_a_x",
6978c2ecf20Sopenharmony_ci};
6988c2ecf20Sopenharmony_ci
6998c2ecf20Sopenharmony_cistatic const char * const pwm_a_y_groups[] = {
7008c2ecf20Sopenharmony_ci	"pwm_a_y",
7018c2ecf20Sopenharmony_ci};
7028c2ecf20Sopenharmony_ci
7038c2ecf20Sopenharmony_cistatic const char * const pwm_b_groups[] = {
7048c2ecf20Sopenharmony_ci	"pwm_b",
7058c2ecf20Sopenharmony_ci};
7068c2ecf20Sopenharmony_ci
7078c2ecf20Sopenharmony_cistatic const char * const pwm_d_groups[] = {
7088c2ecf20Sopenharmony_ci	"pwm_d",
7098c2ecf20Sopenharmony_ci};
7108c2ecf20Sopenharmony_ci
7118c2ecf20Sopenharmony_cistatic const char * const pwm_e_groups[] = {
7128c2ecf20Sopenharmony_ci	"pwm_e",
7138c2ecf20Sopenharmony_ci};
7148c2ecf20Sopenharmony_ci
7158c2ecf20Sopenharmony_cistatic const char * const pwm_f_x_groups[] = {
7168c2ecf20Sopenharmony_ci	"pwm_f_x",
7178c2ecf20Sopenharmony_ci};
7188c2ecf20Sopenharmony_ci
7198c2ecf20Sopenharmony_cistatic const char * const pwm_f_y_groups[] = {
7208c2ecf20Sopenharmony_ci	"pwm_f_y",
7218c2ecf20Sopenharmony_ci};
7228c2ecf20Sopenharmony_ci
7238c2ecf20Sopenharmony_cistatic const char * const hdmi_hpd_groups[] = {
7248c2ecf20Sopenharmony_ci	"hdmi_hpd",
7258c2ecf20Sopenharmony_ci};
7268c2ecf20Sopenharmony_ci
7278c2ecf20Sopenharmony_cistatic const char * const hdmi_i2c_groups[] = {
7288c2ecf20Sopenharmony_ci	"hdmi_sda", "hdmi_scl",
7298c2ecf20Sopenharmony_ci};
7308c2ecf20Sopenharmony_ci
7318c2ecf20Sopenharmony_cistatic const char * const i2s_out_groups[] = {
7328c2ecf20Sopenharmony_ci	"i2s_out_ch23_y", "i2s_out_ch45_y", "i2s_out_ch67_y",
7338c2ecf20Sopenharmony_ci};
7348c2ecf20Sopenharmony_ci
7358c2ecf20Sopenharmony_cistatic const char * const spdif_out_groups[] = {
7368c2ecf20Sopenharmony_ci	"spdif_out_y",
7378c2ecf20Sopenharmony_ci};
7388c2ecf20Sopenharmony_ci
7398c2ecf20Sopenharmony_cistatic const char * const gen_clk_out_groups[] = {
7408c2ecf20Sopenharmony_ci	"gen_clk_out",
7418c2ecf20Sopenharmony_ci};
7428c2ecf20Sopenharmony_ci
7438c2ecf20Sopenharmony_cistatic const char * const gpio_aobus_groups[] = {
7448c2ecf20Sopenharmony_ci	"GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4",
7458c2ecf20Sopenharmony_ci	"GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9",
7468c2ecf20Sopenharmony_ci	"GPIOAO_10", "GPIOAO_11", "GPIOAO_12", "GPIOAO_13",
7478c2ecf20Sopenharmony_ci
7488c2ecf20Sopenharmony_ci	"GPIO_TEST_N",
7498c2ecf20Sopenharmony_ci};
7508c2ecf20Sopenharmony_ci
7518c2ecf20Sopenharmony_cistatic const char * const uart_ao_groups[] = {
7528c2ecf20Sopenharmony_ci	"uart_tx_ao_a", "uart_rx_ao_a", "uart_cts_ao_a", "uart_rts_ao_a",
7538c2ecf20Sopenharmony_ci};
7548c2ecf20Sopenharmony_ci
7558c2ecf20Sopenharmony_cistatic const char * const uart_ao_b_groups[] = {
7568c2ecf20Sopenharmony_ci	"uart_tx_ao_b", "uart_rx_ao_b", "uart_cts_ao_b", "uart_rts_ao_b",
7578c2ecf20Sopenharmony_ci};
7588c2ecf20Sopenharmony_ci
7598c2ecf20Sopenharmony_cistatic const char * const i2c_ao_groups[] = {
7608c2ecf20Sopenharmony_ci	"i2c_sck_ao", "i2c_sda_ao",
7618c2ecf20Sopenharmony_ci};
7628c2ecf20Sopenharmony_ci
7638c2ecf20Sopenharmony_cistatic const char * const i2c_slave_ao_groups[] = {
7648c2ecf20Sopenharmony_ci	"i2c_slave_sck_ao", "i2c_slave_sda_ao",
7658c2ecf20Sopenharmony_ci};
7668c2ecf20Sopenharmony_ci
7678c2ecf20Sopenharmony_cistatic const char * const remote_input_ao_groups[] = {
7688c2ecf20Sopenharmony_ci	"remote_input_ao",
7698c2ecf20Sopenharmony_ci};
7708c2ecf20Sopenharmony_ci
7718c2ecf20Sopenharmony_cistatic const char * const pwm_ao_a_3_groups[] = {
7728c2ecf20Sopenharmony_ci	"pwm_ao_a_3",
7738c2ecf20Sopenharmony_ci};
7748c2ecf20Sopenharmony_ci
7758c2ecf20Sopenharmony_cistatic const char * const pwm_ao_a_6_groups[] = {
7768c2ecf20Sopenharmony_ci	"pwm_ao_a_6",
7778c2ecf20Sopenharmony_ci};
7788c2ecf20Sopenharmony_ci
7798c2ecf20Sopenharmony_cistatic const char * const pwm_ao_a_12_groups[] = {
7808c2ecf20Sopenharmony_ci	"pwm_ao_a_12",
7818c2ecf20Sopenharmony_ci};
7828c2ecf20Sopenharmony_ci
7838c2ecf20Sopenharmony_cistatic const char * const pwm_ao_b_groups[] = {
7848c2ecf20Sopenharmony_ci	"pwm_ao_b",
7858c2ecf20Sopenharmony_ci};
7868c2ecf20Sopenharmony_ci
7878c2ecf20Sopenharmony_cistatic const char * const i2s_out_ao_groups[] = {
7888c2ecf20Sopenharmony_ci	"i2s_am_clk", "i2s_out_ao_clk", "i2s_out_lr_clk",
7898c2ecf20Sopenharmony_ci	"i2s_out_ch01_ao", "i2s_out_ch23_ao", "i2s_out_ch45_ao",
7908c2ecf20Sopenharmony_ci	"i2s_out_ch67_ao",
7918c2ecf20Sopenharmony_ci};
7928c2ecf20Sopenharmony_ci
7938c2ecf20Sopenharmony_cistatic const char * const spdif_out_ao_groups[] = {
7948c2ecf20Sopenharmony_ci	"spdif_out_ao_6", "spdif_out_ao_13",
7958c2ecf20Sopenharmony_ci};
7968c2ecf20Sopenharmony_ci
7978c2ecf20Sopenharmony_cistatic const char * const cec_ao_groups[] = {
7988c2ecf20Sopenharmony_ci	"ao_cec", "ee_cec",
7998c2ecf20Sopenharmony_ci};
8008c2ecf20Sopenharmony_ci
8018c2ecf20Sopenharmony_cistatic struct meson_pmx_func meson_gxbb_periphs_functions[] = {
8028c2ecf20Sopenharmony_ci	FUNCTION(gpio_periphs),
8038c2ecf20Sopenharmony_ci	FUNCTION(emmc),
8048c2ecf20Sopenharmony_ci	FUNCTION(nor),
8058c2ecf20Sopenharmony_ci	FUNCTION(spi),
8068c2ecf20Sopenharmony_ci	FUNCTION(sdcard),
8078c2ecf20Sopenharmony_ci	FUNCTION(sdio),
8088c2ecf20Sopenharmony_ci	FUNCTION(nand),
8098c2ecf20Sopenharmony_ci	FUNCTION(uart_a),
8108c2ecf20Sopenharmony_ci	FUNCTION(uart_b),
8118c2ecf20Sopenharmony_ci	FUNCTION(uart_c),
8128c2ecf20Sopenharmony_ci	FUNCTION(i2c_a),
8138c2ecf20Sopenharmony_ci	FUNCTION(i2c_b),
8148c2ecf20Sopenharmony_ci	FUNCTION(i2c_c),
8158c2ecf20Sopenharmony_ci	FUNCTION(eth),
8168c2ecf20Sopenharmony_ci	FUNCTION(pwm_a_x),
8178c2ecf20Sopenharmony_ci	FUNCTION(pwm_a_y),
8188c2ecf20Sopenharmony_ci	FUNCTION(pwm_b),
8198c2ecf20Sopenharmony_ci	FUNCTION(pwm_d),
8208c2ecf20Sopenharmony_ci	FUNCTION(pwm_e),
8218c2ecf20Sopenharmony_ci	FUNCTION(pwm_f_x),
8228c2ecf20Sopenharmony_ci	FUNCTION(pwm_f_y),
8238c2ecf20Sopenharmony_ci	FUNCTION(hdmi_hpd),
8248c2ecf20Sopenharmony_ci	FUNCTION(hdmi_i2c),
8258c2ecf20Sopenharmony_ci	FUNCTION(i2s_out),
8268c2ecf20Sopenharmony_ci	FUNCTION(spdif_out),
8278c2ecf20Sopenharmony_ci	FUNCTION(gen_clk_out),
8288c2ecf20Sopenharmony_ci	FUNCTION(tsin_a),
8298c2ecf20Sopenharmony_ci	FUNCTION(tsin_b),
8308c2ecf20Sopenharmony_ci};
8318c2ecf20Sopenharmony_ci
8328c2ecf20Sopenharmony_cistatic struct meson_pmx_func meson_gxbb_aobus_functions[] = {
8338c2ecf20Sopenharmony_ci	FUNCTION(gpio_aobus),
8348c2ecf20Sopenharmony_ci	FUNCTION(uart_ao),
8358c2ecf20Sopenharmony_ci	FUNCTION(uart_ao_b),
8368c2ecf20Sopenharmony_ci	FUNCTION(i2c_ao),
8378c2ecf20Sopenharmony_ci	FUNCTION(i2c_slave_ao),
8388c2ecf20Sopenharmony_ci	FUNCTION(remote_input_ao),
8398c2ecf20Sopenharmony_ci	FUNCTION(pwm_ao_a_3),
8408c2ecf20Sopenharmony_ci	FUNCTION(pwm_ao_a_6),
8418c2ecf20Sopenharmony_ci	FUNCTION(pwm_ao_a_12),
8428c2ecf20Sopenharmony_ci	FUNCTION(pwm_ao_b),
8438c2ecf20Sopenharmony_ci	FUNCTION(i2s_out_ao),
8448c2ecf20Sopenharmony_ci	FUNCTION(spdif_out_ao),
8458c2ecf20Sopenharmony_ci	FUNCTION(cec_ao),
8468c2ecf20Sopenharmony_ci};
8478c2ecf20Sopenharmony_ci
8488c2ecf20Sopenharmony_cistatic struct meson_bank meson_gxbb_periphs_banks[] = {
8498c2ecf20Sopenharmony_ci	/*   name    first      last       irq       pullen  pull    dir     out     in  */
8508c2ecf20Sopenharmony_ci	BANK("X",    GPIOX_0,	GPIOX_22,  106, 128, 4,  0,  4,  0,  12, 0,  13, 0,  14, 0),
8518c2ecf20Sopenharmony_ci	BANK("Y",    GPIOY_0,	GPIOY_16,   89, 105, 1,  0,  1,  0,  3,  0,  4,  0,  5,  0),
8528c2ecf20Sopenharmony_ci	BANK("DV",   GPIODV_0,	GPIODV_29,  59,  88, 0,  0,  0,  0,  0,  0,  1,  0,  2,  0),
8538c2ecf20Sopenharmony_ci	BANK("H",    GPIOH_0,	GPIOH_3,    30,  33, 1, 20,  1, 20,  3, 20,  4, 20,  5, 20),
8548c2ecf20Sopenharmony_ci	BANK("Z",    GPIOZ_0,	GPIOZ_15,   14,  29, 3,  0,  3,  0,  9,  0,  10, 0, 11,  0),
8558c2ecf20Sopenharmony_ci	BANK("CARD", CARD_0,	CARD_6,     52,  58, 2, 20,  2, 20,  6, 20,  7, 20,  8, 20),
8568c2ecf20Sopenharmony_ci	BANK("BOOT", BOOT_0,	BOOT_17,    34,  51, 2,  0,  2,  0,  6,  0,  7,  0,  8,  0),
8578c2ecf20Sopenharmony_ci	BANK("CLK",  GPIOCLK_0,	GPIOCLK_3, 129, 132, 3, 28,  3, 28,  9, 28, 10, 28, 11, 28),
8588c2ecf20Sopenharmony_ci};
8598c2ecf20Sopenharmony_ci
8608c2ecf20Sopenharmony_cistatic struct meson_bank meson_gxbb_aobus_banks[] = {
8618c2ecf20Sopenharmony_ci	/*   name    first      last       irq    pullen  pull    dir     out     in  */
8628c2ecf20Sopenharmony_ci	BANK("AO",   GPIOAO_0,  GPIOAO_13, 0, 13, 0,  16, 0, 0,   0,  0,  0, 16,  1,  0),
8638c2ecf20Sopenharmony_ci};
8648c2ecf20Sopenharmony_ci
8658c2ecf20Sopenharmony_cistatic struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data = {
8668c2ecf20Sopenharmony_ci	.name		= "periphs-banks",
8678c2ecf20Sopenharmony_ci	.pins		= meson_gxbb_periphs_pins,
8688c2ecf20Sopenharmony_ci	.groups		= meson_gxbb_periphs_groups,
8698c2ecf20Sopenharmony_ci	.funcs		= meson_gxbb_periphs_functions,
8708c2ecf20Sopenharmony_ci	.banks		= meson_gxbb_periphs_banks,
8718c2ecf20Sopenharmony_ci	.num_pins	= ARRAY_SIZE(meson_gxbb_periphs_pins),
8728c2ecf20Sopenharmony_ci	.num_groups	= ARRAY_SIZE(meson_gxbb_periphs_groups),
8738c2ecf20Sopenharmony_ci	.num_funcs	= ARRAY_SIZE(meson_gxbb_periphs_functions),
8748c2ecf20Sopenharmony_ci	.num_banks	= ARRAY_SIZE(meson_gxbb_periphs_banks),
8758c2ecf20Sopenharmony_ci	.pmx_ops	= &meson8_pmx_ops,
8768c2ecf20Sopenharmony_ci};
8778c2ecf20Sopenharmony_ci
8788c2ecf20Sopenharmony_cistatic struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data = {
8798c2ecf20Sopenharmony_ci	.name		= "aobus-banks",
8808c2ecf20Sopenharmony_ci	.pins		= meson_gxbb_aobus_pins,
8818c2ecf20Sopenharmony_ci	.groups		= meson_gxbb_aobus_groups,
8828c2ecf20Sopenharmony_ci	.funcs		= meson_gxbb_aobus_functions,
8838c2ecf20Sopenharmony_ci	.banks		= meson_gxbb_aobus_banks,
8848c2ecf20Sopenharmony_ci	.num_pins	= ARRAY_SIZE(meson_gxbb_aobus_pins),
8858c2ecf20Sopenharmony_ci	.num_groups	= ARRAY_SIZE(meson_gxbb_aobus_groups),
8868c2ecf20Sopenharmony_ci	.num_funcs	= ARRAY_SIZE(meson_gxbb_aobus_functions),
8878c2ecf20Sopenharmony_ci	.num_banks	= ARRAY_SIZE(meson_gxbb_aobus_banks),
8888c2ecf20Sopenharmony_ci	.pmx_ops	= &meson8_pmx_ops,
8898c2ecf20Sopenharmony_ci	.parse_dt	= meson8_aobus_parse_dt_extra,
8908c2ecf20Sopenharmony_ci};
8918c2ecf20Sopenharmony_ci
8928c2ecf20Sopenharmony_cistatic const struct of_device_id meson_gxbb_pinctrl_dt_match[] = {
8938c2ecf20Sopenharmony_ci	{
8948c2ecf20Sopenharmony_ci		.compatible = "amlogic,meson-gxbb-periphs-pinctrl",
8958c2ecf20Sopenharmony_ci		.data = &meson_gxbb_periphs_pinctrl_data,
8968c2ecf20Sopenharmony_ci	},
8978c2ecf20Sopenharmony_ci	{
8988c2ecf20Sopenharmony_ci		.compatible = "amlogic,meson-gxbb-aobus-pinctrl",
8998c2ecf20Sopenharmony_ci		.data = &meson_gxbb_aobus_pinctrl_data,
9008c2ecf20Sopenharmony_ci	},
9018c2ecf20Sopenharmony_ci	{ },
9028c2ecf20Sopenharmony_ci};
9038c2ecf20Sopenharmony_ci
9048c2ecf20Sopenharmony_cistatic struct platform_driver meson_gxbb_pinctrl_driver = {
9058c2ecf20Sopenharmony_ci	.probe		= meson_pinctrl_probe,
9068c2ecf20Sopenharmony_ci	.driver = {
9078c2ecf20Sopenharmony_ci		.name	= "meson-gxbb-pinctrl",
9088c2ecf20Sopenharmony_ci		.of_match_table = meson_gxbb_pinctrl_dt_match,
9098c2ecf20Sopenharmony_ci	},
9108c2ecf20Sopenharmony_ci};
9118c2ecf20Sopenharmony_cibuiltin_platform_driver(meson_gxbb_pinctrl_driver);
912