18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Pin controller and GPIO driver for Amlogic Meson8b.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2015 Endless Mobile, Inc.
68c2ecf20Sopenharmony_ci * Author: Carlo Caione <carlo@endlessm.com>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include <dt-bindings/gpio/meson8b-gpio.h>
108c2ecf20Sopenharmony_ci#include "pinctrl-meson.h"
118c2ecf20Sopenharmony_ci#include "pinctrl-meson8-pmx.h"
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc meson8b_cbus_pins[] = {
148c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_0),
158c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_1),
168c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_2),
178c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_3),
188c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_4),
198c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_5),
208c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_6),
218c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_7),
228c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_8),
238c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_9),
248c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_10),
258c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_11),
268c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_16),
278c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_17),
288c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_18),
298c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_19),
308c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_20),
318c2ecf20Sopenharmony_ci	MESON_PIN(GPIOX_21),
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_0),
348c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_1),
358c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_3),
368c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_6),
378c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_7),
388c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_8),
398c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_9),
408c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_10),
418c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_11),
428c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_12),
438c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_13),
448c2ecf20Sopenharmony_ci	MESON_PIN(GPIOY_14),
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_9),
478c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_24),
488c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_25),
498c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_26),
508c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_27),
518c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_28),
528c2ecf20Sopenharmony_ci	MESON_PIN(GPIODV_29),
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_0),
558c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_1),
568c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_2),
578c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_3),
588c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_4),
598c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_5),
608c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_6),
618c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_7),
628c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_8),
638c2ecf20Sopenharmony_ci	MESON_PIN(GPIOH_9),
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci	MESON_PIN(CARD_0),
668c2ecf20Sopenharmony_ci	MESON_PIN(CARD_1),
678c2ecf20Sopenharmony_ci	MESON_PIN(CARD_2),
688c2ecf20Sopenharmony_ci	MESON_PIN(CARD_3),
698c2ecf20Sopenharmony_ci	MESON_PIN(CARD_4),
708c2ecf20Sopenharmony_ci	MESON_PIN(CARD_5),
718c2ecf20Sopenharmony_ci	MESON_PIN(CARD_6),
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_0),
748c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_1),
758c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_2),
768c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_3),
778c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_4),
788c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_5),
798c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_6),
808c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_7),
818c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_8),
828c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_9),
838c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_10),
848c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_11),
858c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_12),
868c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_13),
878c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_14),
888c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_15),
898c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_16),
908c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_17),
918c2ecf20Sopenharmony_ci	MESON_PIN(BOOT_18),
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci	MESON_PIN(DIF_0_P),
948c2ecf20Sopenharmony_ci	MESON_PIN(DIF_0_N),
958c2ecf20Sopenharmony_ci	MESON_PIN(DIF_1_P),
968c2ecf20Sopenharmony_ci	MESON_PIN(DIF_1_N),
978c2ecf20Sopenharmony_ci	MESON_PIN(DIF_2_P),
988c2ecf20Sopenharmony_ci	MESON_PIN(DIF_2_N),
998c2ecf20Sopenharmony_ci	MESON_PIN(DIF_3_P),
1008c2ecf20Sopenharmony_ci	MESON_PIN(DIF_3_N),
1018c2ecf20Sopenharmony_ci	MESON_PIN(DIF_4_P),
1028c2ecf20Sopenharmony_ci	MESON_PIN(DIF_4_N),
1038c2ecf20Sopenharmony_ci};
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc meson8b_aobus_pins[] = {
1068c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_0),
1078c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_1),
1088c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_2),
1098c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_3),
1108c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_4),
1118c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_5),
1128c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_6),
1138c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_7),
1148c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_8),
1158c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_9),
1168c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_10),
1178c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_11),
1188c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_12),
1198c2ecf20Sopenharmony_ci	MESON_PIN(GPIOAO_13),
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci	/*
1228c2ecf20Sopenharmony_ci	 * The following 2 pins are not mentionned in the public datasheet
1238c2ecf20Sopenharmony_ci	 * According to this datasheet, they can't be used with the gpio
1248c2ecf20Sopenharmony_ci	 * interrupt controller
1258c2ecf20Sopenharmony_ci	 */
1268c2ecf20Sopenharmony_ci	MESON_PIN(GPIO_BSD_EN),
1278c2ecf20Sopenharmony_ci	MESON_PIN(GPIO_TEST_N),
1288c2ecf20Sopenharmony_ci};
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ci/* bank X */
1318c2ecf20Sopenharmony_cistatic const unsigned int sd_d0_a_pins[]	= { GPIOX_0 };
1328c2ecf20Sopenharmony_cistatic const unsigned int sd_d1_a_pins[]	= { GPIOX_1 };
1338c2ecf20Sopenharmony_cistatic const unsigned int sd_d2_a_pins[]	= { GPIOX_2 };
1348c2ecf20Sopenharmony_cistatic const unsigned int sd_d3_a_pins[]	= { GPIOX_3 };
1358c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d0_0_a_pins[]	= { GPIOX_4 };
1368c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d47_a_pins[]	= { GPIOX_4, GPIOX_5,
1378c2ecf20Sopenharmony_ci						    GPIOX_6, GPIOX_7 };
1388c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d13_0_a_pins[]	= { GPIOX_5, GPIOX_6,
1398c2ecf20Sopenharmony_ci						    GPIOX_7 };
1408c2ecf20Sopenharmony_cistatic const unsigned int sd_clk_a_pins[]	= { GPIOX_8 };
1418c2ecf20Sopenharmony_cistatic const unsigned int sd_cmd_a_pins[]	= { GPIOX_9 };
1428c2ecf20Sopenharmony_cistatic const unsigned int xtal_32k_out_pins[]	= { GPIOX_10 };
1438c2ecf20Sopenharmony_cistatic const unsigned int xtal_24m_out_pins[]	= { GPIOX_11 };
1448c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_b0_pins[]	= { GPIOX_16 };
1458c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_b0_pins[]	= { GPIOX_17 };
1468c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_b0_pins[]	= { GPIOX_18 };
1478c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_b0_pins[]	= { GPIOX_19 };
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d0_1_a_pins[]	= { GPIOX_0 };
1508c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d13_1_a_pins[]	= { GPIOX_1, GPIOX_2,
1518c2ecf20Sopenharmony_ci						    GPIOX_3 };
1528c2ecf20Sopenharmony_cistatic const unsigned int pcm_out_a_pins[]	= { GPIOX_4 };
1538c2ecf20Sopenharmony_cistatic const unsigned int pcm_in_a_pins[]	= { GPIOX_5 };
1548c2ecf20Sopenharmony_cistatic const unsigned int pcm_fs_a_pins[]	= { GPIOX_6 };
1558c2ecf20Sopenharmony_cistatic const unsigned int pcm_clk_a_pins[]	= { GPIOX_7 };
1568c2ecf20Sopenharmony_cistatic const unsigned int sdxc_clk_a_pins[]	= { GPIOX_8 };
1578c2ecf20Sopenharmony_cistatic const unsigned int sdxc_cmd_a_pins[]	= { GPIOX_9 };
1588c2ecf20Sopenharmony_cistatic const unsigned int pwm_vs_0_pins[]	= { GPIOX_10 };
1598c2ecf20Sopenharmony_cistatic const unsigned int pwm_e_pins[]		= { GPIOX_10 };
1608c2ecf20Sopenharmony_cistatic const unsigned int pwm_vs_1_pins[]	= { GPIOX_11 };
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_a_pins[]	= { GPIOX_4 };
1638c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_a_pins[]	= { GPIOX_5 };
1648c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_a_pins[]	= { GPIOX_6 };
1658c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_a_pins[]	= { GPIOX_7 };
1668c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_b1_pins[]	= { GPIOX_8 };
1678c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_b1_pins[]	= { GPIOX_9 };
1688c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_b1_pins[]	= { GPIOX_10 };
1698c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_b1_pins[]	= { GPIOX_20 };
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_cistatic const unsigned int iso7816_0_clk_pins[]	= { GPIOX_6 };
1728c2ecf20Sopenharmony_cistatic const unsigned int iso7816_0_data_pins[]	= { GPIOX_7 };
1738c2ecf20Sopenharmony_cistatic const unsigned int spi_sclk_0_pins[]	= { GPIOX_8 };
1748c2ecf20Sopenharmony_cistatic const unsigned int spi_miso_0_pins[]	= { GPIOX_9 };
1758c2ecf20Sopenharmony_cistatic const unsigned int spi_mosi_0_pins[]	= { GPIOX_10 };
1768c2ecf20Sopenharmony_cistatic const unsigned int iso7816_det_pins[]	= { GPIOX_16 };
1778c2ecf20Sopenharmony_cistatic const unsigned int iso7816_reset_pins[]	= { GPIOX_17 };
1788c2ecf20Sopenharmony_cistatic const unsigned int iso7816_1_clk_pins[]	= { GPIOX_18 };
1798c2ecf20Sopenharmony_cistatic const unsigned int iso7816_1_data_pins[]	= { GPIOX_19 };
1808c2ecf20Sopenharmony_cistatic const unsigned int spi_ss0_0_pins[]	= { GPIOX_20 };
1818c2ecf20Sopenharmony_ci
1828c2ecf20Sopenharmony_cistatic const unsigned int tsin_clk_b_pins[]	= { GPIOX_8 };
1838c2ecf20Sopenharmony_cistatic const unsigned int tsin_sop_b_pins[]	= { GPIOX_9 };
1848c2ecf20Sopenharmony_cistatic const unsigned int tsin_d0_b_pins[]	= { GPIOX_10 };
1858c2ecf20Sopenharmony_cistatic const unsigned int pwm_b_pins[]		= { GPIOX_11 };
1868c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_d0_pins[]	= { GPIOX_16 };
1878c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_d0_pins[]	= { GPIOX_17 };
1888c2ecf20Sopenharmony_cistatic const unsigned int tsin_d_valid_b_pins[] = { GPIOX_20 };
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_ci/* bank Y */
1918c2ecf20Sopenharmony_cistatic const unsigned int tsin_d_valid_a_pins[] = { GPIOY_0 };
1928c2ecf20Sopenharmony_cistatic const unsigned int tsin_sop_a_pins[]	= { GPIOY_1 };
1938c2ecf20Sopenharmony_cistatic const unsigned int tsin_d17_a_pins[] = {
1948c2ecf20Sopenharmony_ci	GPIOY_6, GPIOY_7, GPIOY_10, GPIOY_11, GPIOY_12, GPIOY_13, GPIOY_14,
1958c2ecf20Sopenharmony_ci};
1968c2ecf20Sopenharmony_cistatic const unsigned int tsin_clk_a_pins[]	= { GPIOY_8 };
1978c2ecf20Sopenharmony_cistatic const unsigned int tsin_d0_a_pins[]	= { GPIOY_9 };
1988c2ecf20Sopenharmony_ci
1998c2ecf20Sopenharmony_cistatic const unsigned int spdif_out_0_pins[]	= { GPIOY_3 };
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_cistatic const unsigned int xtal_24m_pins[]	= { GPIOY_3 };
2028c2ecf20Sopenharmony_cistatic const unsigned int iso7816_2_clk_pins[]	= { GPIOY_13 };
2038c2ecf20Sopenharmony_cistatic const unsigned int iso7816_2_data_pins[] = { GPIOY_14 };
2048c2ecf20Sopenharmony_ci
2058c2ecf20Sopenharmony_ci/* bank DV */
2068c2ecf20Sopenharmony_cistatic const unsigned int pwm_d_pins[]		= { GPIODV_28 };
2078c2ecf20Sopenharmony_cistatic const unsigned int pwm_c0_pins[]		= { GPIODV_29 };
2088c2ecf20Sopenharmony_ci
2098c2ecf20Sopenharmony_cistatic const unsigned int pwm_vs_2_pins[]	= { GPIODV_9 };
2108c2ecf20Sopenharmony_cistatic const unsigned int pwm_vs_3_pins[]	= { GPIODV_28 };
2118c2ecf20Sopenharmony_cistatic const unsigned int pwm_vs_4_pins[]	= { GPIODV_29 };
2128c2ecf20Sopenharmony_ci
2138c2ecf20Sopenharmony_cistatic const unsigned int xtal24_out_pins[]	= { GPIODV_29 };
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_c_pins[]	= { GPIODV_24 };
2168c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_c_pins[]	= { GPIODV_25 };
2178c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_c_pins[]	= { GPIODV_26 };
2188c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_c_pins[]	= { GPIODV_27 };
2198c2ecf20Sopenharmony_ci
2208c2ecf20Sopenharmony_cistatic const unsigned int pwm_c1_pins[]		= { GPIODV_9 };
2218c2ecf20Sopenharmony_ci
2228c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_a_pins[]	= { GPIODV_24 };
2238c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_a_pins[]	= { GPIODV_25 };
2248c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_b0_pins[]	= { GPIODV_26 };
2258c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_b0_pins[]	= { GPIODV_27 };
2268c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_c0_pins[]	= { GPIODV_28 };
2278c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_c0_pins[]	= { GPIODV_29 };
2288c2ecf20Sopenharmony_ci
2298c2ecf20Sopenharmony_ci/* bank H */
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_cistatic const unsigned int hdmi_cec_0_pins[]	= { GPIOH_3 };
2348c2ecf20Sopenharmony_cistatic const unsigned int eth_txd1_0_pins[]	= { GPIOH_5 };
2358c2ecf20Sopenharmony_cistatic const unsigned int eth_txd0_0_pins[]	= { GPIOH_6 };
2368c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd3_h_pins[]	= { GPIOH_5 };
2378c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd2_h_pins[]	= { GPIOH_6 };
2388c2ecf20Sopenharmony_cistatic const unsigned int clk_24m_out_pins[]	= { GPIOH_9 };
2398c2ecf20Sopenharmony_ci
2408c2ecf20Sopenharmony_cistatic const unsigned int spi_ss1_pins[]	= { GPIOH_0 };
2418c2ecf20Sopenharmony_cistatic const unsigned int spi_ss2_pins[]	= { GPIOH_1 };
2428c2ecf20Sopenharmony_cistatic const unsigned int spi_ss0_1_pins[]	= { GPIOH_3 };
2438c2ecf20Sopenharmony_cistatic const unsigned int spi_miso_1_pins[]	= { GPIOH_4 };
2448c2ecf20Sopenharmony_cistatic const unsigned int spi_mosi_1_pins[]	= { GPIOH_5 };
2458c2ecf20Sopenharmony_cistatic const unsigned int spi_sclk_1_pins[]	= { GPIOH_6 };
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_cistatic const unsigned int eth_txd3_pins[]	= { GPIOH_7 };
2488c2ecf20Sopenharmony_cistatic const unsigned int eth_txd2_pins[]	= { GPIOH_8 };
2498c2ecf20Sopenharmony_cistatic const unsigned int eth_tx_clk_pins[]	= { GPIOH_9 };
2508c2ecf20Sopenharmony_ci
2518c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_b1_pins[]	= { GPIOH_3 };
2528c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_b1_pins[]	= { GPIOH_4 };
2538c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_c1_pins[]	= { GPIOH_5 };
2548c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_c1_pins[]	= { GPIOH_6 };
2558c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_d1_pins[]	= { GPIOH_7 };
2568c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_d1_pins[]	= { GPIOH_8 };
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_ci/* bank BOOT */
2598c2ecf20Sopenharmony_cistatic const unsigned int nand_io_pins[] = {
2608c2ecf20Sopenharmony_ci	BOOT_0, BOOT_1, BOOT_2, BOOT_3, BOOT_4, BOOT_5, BOOT_6, BOOT_7
2618c2ecf20Sopenharmony_ci};
2628c2ecf20Sopenharmony_cistatic const unsigned int nand_io_ce0_pins[]	= { BOOT_8 };
2638c2ecf20Sopenharmony_cistatic const unsigned int nand_io_ce1_pins[]	= { BOOT_9 };
2648c2ecf20Sopenharmony_cistatic const unsigned int nand_io_rb0_pins[]	= { BOOT_10 };
2658c2ecf20Sopenharmony_cistatic const unsigned int nand_ale_pins[]	= { BOOT_11 };
2668c2ecf20Sopenharmony_cistatic const unsigned int nand_cle_pins[]	= { BOOT_12 };
2678c2ecf20Sopenharmony_cistatic const unsigned int nand_wen_clk_pins[]	= { BOOT_13 };
2688c2ecf20Sopenharmony_cistatic const unsigned int nand_ren_clk_pins[]	= { BOOT_14 };
2698c2ecf20Sopenharmony_cistatic const unsigned int nand_dqs_15_pins[]	= { BOOT_15 };
2708c2ecf20Sopenharmony_cistatic const unsigned int nand_dqs_18_pins[]	= { BOOT_18 };
2718c2ecf20Sopenharmony_ci
2728c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d0_c_pins[]	= { BOOT_0};
2738c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d13_c_pins[]	= { BOOT_1, BOOT_2,
2748c2ecf20Sopenharmony_ci						    BOOT_3 };
2758c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d47_c_pins[]	= { BOOT_4, BOOT_5,
2768c2ecf20Sopenharmony_ci						    BOOT_6, BOOT_7 };
2778c2ecf20Sopenharmony_cistatic const unsigned int sdxc_clk_c_pins[]	= { BOOT_8 };
2788c2ecf20Sopenharmony_cistatic const unsigned int sdxc_cmd_c_pins[]	= { BOOT_10 };
2798c2ecf20Sopenharmony_cistatic const unsigned int nor_d_pins[]		= { BOOT_11 };
2808c2ecf20Sopenharmony_cistatic const unsigned int nor_q_pins[]		= { BOOT_12 };
2818c2ecf20Sopenharmony_cistatic const unsigned int nor_c_pins[]		= { BOOT_13 };
2828c2ecf20Sopenharmony_cistatic const unsigned int nor_cs_pins[]		= { BOOT_18 };
2838c2ecf20Sopenharmony_ci
2848c2ecf20Sopenharmony_cistatic const unsigned int sd_d0_c_pins[]	= { BOOT_0 };
2858c2ecf20Sopenharmony_cistatic const unsigned int sd_d1_c_pins[]	= { BOOT_1 };
2868c2ecf20Sopenharmony_cistatic const unsigned int sd_d2_c_pins[]	= { BOOT_2 };
2878c2ecf20Sopenharmony_cistatic const unsigned int sd_d3_c_pins[]	= { BOOT_3 };
2888c2ecf20Sopenharmony_cistatic const unsigned int sd_cmd_c_pins[]	= { BOOT_8 };
2898c2ecf20Sopenharmony_cistatic const unsigned int sd_clk_c_pins[]	= { BOOT_10 };
2908c2ecf20Sopenharmony_ci
2918c2ecf20Sopenharmony_ci/* bank CARD */
2928c2ecf20Sopenharmony_cistatic const unsigned int sd_d1_b_pins[]	= { CARD_0 };
2938c2ecf20Sopenharmony_cistatic const unsigned int sd_d0_b_pins[]	= { CARD_1 };
2948c2ecf20Sopenharmony_cistatic const unsigned int sd_clk_b_pins[]	= { CARD_2 };
2958c2ecf20Sopenharmony_cistatic const unsigned int sd_cmd_b_pins[]	= { CARD_3 };
2968c2ecf20Sopenharmony_cistatic const unsigned int sd_d3_b_pins[]	= { CARD_4 };
2978c2ecf20Sopenharmony_cistatic const unsigned int sd_d2_b_pins[]	= { CARD_5 };
2988c2ecf20Sopenharmony_ci
2998c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d13_b_pins[]	= { CARD_0,  CARD_4,
3008c2ecf20Sopenharmony_ci						    CARD_5 };
3018c2ecf20Sopenharmony_cistatic const unsigned int sdxc_d0_b_pins[]	= { CARD_1 };
3028c2ecf20Sopenharmony_cistatic const unsigned int sdxc_clk_b_pins[]	= { CARD_2 };
3038c2ecf20Sopenharmony_cistatic const unsigned int sdxc_cmd_b_pins[]	= { CARD_3 };
3048c2ecf20Sopenharmony_ci
3058c2ecf20Sopenharmony_ci/* bank AO */
3068c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_ao_a_pins[]	= { GPIOAO_0 };
3078c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_ao_a_pins[]	= { GPIOAO_1 };
3088c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_ao_a_pins[]	= { GPIOAO_2 };
3098c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_ao_a_pins[]	= { GPIOAO_3 };
3108c2ecf20Sopenharmony_cistatic const unsigned int i2c_mst_sck_ao_pins[] = { GPIOAO_4 };
3118c2ecf20Sopenharmony_cistatic const unsigned int i2c_mst_sda_ao_pins[] = { GPIOAO_5 };
3128c2ecf20Sopenharmony_cistatic const unsigned int clk_32k_in_out_pins[]	= { GPIOAO_6 };
3138c2ecf20Sopenharmony_cistatic const unsigned int remote_input_pins[]	= { GPIOAO_7 };
3148c2ecf20Sopenharmony_cistatic const unsigned int hdmi_cec_1_pins[]	= { GPIOAO_12 };
3158c2ecf20Sopenharmony_cistatic const unsigned int ir_blaster_pins[]	= { GPIOAO_13 };
3168c2ecf20Sopenharmony_ci
3178c2ecf20Sopenharmony_cistatic const unsigned int pwm_c2_pins[]		= { GPIOAO_3 };
3188c2ecf20Sopenharmony_cistatic const unsigned int i2c_sck_ao_pins[]	= { GPIOAO_4 };
3198c2ecf20Sopenharmony_cistatic const unsigned int i2c_sda_ao_pins[]	= { GPIOAO_5 };
3208c2ecf20Sopenharmony_cistatic const unsigned int ir_remote_out_pins[]	= { GPIOAO_7 };
3218c2ecf20Sopenharmony_cistatic const unsigned int i2s_am_clk_out_pins[]	= { GPIOAO_8 };
3228c2ecf20Sopenharmony_cistatic const unsigned int i2s_ao_clk_out_pins[]	= { GPIOAO_9 };
3238c2ecf20Sopenharmony_cistatic const unsigned int i2s_lr_clk_out_pins[]	= { GPIOAO_10 };
3248c2ecf20Sopenharmony_cistatic const unsigned int i2s_out_01_pins[]	= { GPIOAO_11 };
3258c2ecf20Sopenharmony_ci
3268c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_ao_b0_pins[]	= { GPIOAO_0 };
3278c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_ao_b0_pins[]	= { GPIOAO_1 };
3288c2ecf20Sopenharmony_cistatic const unsigned int uart_cts_ao_b_pins[]	= { GPIOAO_2 };
3298c2ecf20Sopenharmony_cistatic const unsigned int uart_rts_ao_b_pins[]	= { GPIOAO_3 };
3308c2ecf20Sopenharmony_cistatic const unsigned int uart_tx_ao_b1_pins[]	= { GPIOAO_4 };
3318c2ecf20Sopenharmony_cistatic const unsigned int uart_rx_ao_b1_pins[]	= { GPIOAO_5 };
3328c2ecf20Sopenharmony_cistatic const unsigned int spdif_out_1_pins[]	= { GPIOAO_6 };
3338c2ecf20Sopenharmony_ci
3348c2ecf20Sopenharmony_cistatic const unsigned int i2s_in_ch01_pins[]	= { GPIOAO_6 };
3358c2ecf20Sopenharmony_cistatic const unsigned int i2s_ao_clk_in_pins[]	= { GPIOAO_9 };
3368c2ecf20Sopenharmony_cistatic const unsigned int i2s_lr_clk_in_pins[]	= { GPIOAO_10 };
3378c2ecf20Sopenharmony_ci
3388c2ecf20Sopenharmony_ci/* bank DIF */
3398c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd1_pins[]	= { DIF_0_P };
3408c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd0_pins[]	= { DIF_0_N };
3418c2ecf20Sopenharmony_cistatic const unsigned int eth_rx_dv_pins[]	= { DIF_1_P };
3428c2ecf20Sopenharmony_cistatic const unsigned int eth_rx_clk_pins[]	= { DIF_1_N };
3438c2ecf20Sopenharmony_cistatic const unsigned int eth_txd0_1_pins[]	= { DIF_2_P };
3448c2ecf20Sopenharmony_cistatic const unsigned int eth_txd1_1_pins[]	= { DIF_2_N };
3458c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd3_pins[]	= { DIF_2_P };
3468c2ecf20Sopenharmony_cistatic const unsigned int eth_rxd2_pins[]	= { DIF_2_N };
3478c2ecf20Sopenharmony_cistatic const unsigned int eth_tx_en_pins[]	= { DIF_3_P };
3488c2ecf20Sopenharmony_cistatic const unsigned int eth_ref_clk_pins[]	= { DIF_3_N };
3498c2ecf20Sopenharmony_cistatic const unsigned int eth_mdc_pins[]	= { DIF_4_P };
3508c2ecf20Sopenharmony_cistatic const unsigned int eth_mdio_en_pins[]	= { DIF_4_N };
3518c2ecf20Sopenharmony_ci
3528c2ecf20Sopenharmony_cistatic struct meson_pmx_group meson8b_cbus_groups[] = {
3538c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_0),
3548c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_1),
3558c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_2),
3568c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_3),
3578c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_4),
3588c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_5),
3598c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_6),
3608c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_7),
3618c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_8),
3628c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_9),
3638c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_10),
3648c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_11),
3658c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_16),
3668c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_17),
3678c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_18),
3688c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_19),
3698c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_20),
3708c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOX_21),
3718c2ecf20Sopenharmony_ci
3728c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_0),
3738c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_1),
3748c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_3),
3758c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_6),
3768c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_7),
3778c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_8),
3788c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_9),
3798c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_10),
3808c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_11),
3818c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_12),
3828c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_13),
3838c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOY_14),
3848c2ecf20Sopenharmony_ci
3858c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_9),
3868c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_24),
3878c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_25),
3888c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_26),
3898c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_27),
3908c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_28),
3918c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIODV_29),
3928c2ecf20Sopenharmony_ci
3938c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_0),
3948c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_1),
3958c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_2),
3968c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_3),
3978c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_4),
3988c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_5),
3998c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_6),
4008c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_7),
4018c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_8),
4028c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOH_9),
4038c2ecf20Sopenharmony_ci
4048c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_0),
4058c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_1),
4068c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_2),
4078c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_3),
4088c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_4),
4098c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_5),
4108c2ecf20Sopenharmony_ci	GPIO_GROUP(CARD_6),
4118c2ecf20Sopenharmony_ci
4128c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_0),
4138c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_1),
4148c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_2),
4158c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_3),
4168c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_4),
4178c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_5),
4188c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_6),
4198c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_7),
4208c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_8),
4218c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_9),
4228c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_10),
4238c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_11),
4248c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_12),
4258c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_13),
4268c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_14),
4278c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_15),
4288c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_16),
4298c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_17),
4308c2ecf20Sopenharmony_ci	GPIO_GROUP(BOOT_18),
4318c2ecf20Sopenharmony_ci
4328c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_0_P),
4338c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_0_N),
4348c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_1_P),
4358c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_1_N),
4368c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_2_P),
4378c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_2_N),
4388c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_3_P),
4398c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_3_N),
4408c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_4_P),
4418c2ecf20Sopenharmony_ci	GPIO_GROUP(DIF_4_N),
4428c2ecf20Sopenharmony_ci
4438c2ecf20Sopenharmony_ci	/* bank X */
4448c2ecf20Sopenharmony_ci	GROUP(sd_d0_a,		8,	5),
4458c2ecf20Sopenharmony_ci	GROUP(sd_d1_a,		8,	4),
4468c2ecf20Sopenharmony_ci	GROUP(sd_d2_a,		8,	3),
4478c2ecf20Sopenharmony_ci	GROUP(sd_d3_a,		8,	2),
4488c2ecf20Sopenharmony_ci	GROUP(sdxc_d0_0_a,	5,	29),
4498c2ecf20Sopenharmony_ci	GROUP(sdxc_d47_a,	5,	12),
4508c2ecf20Sopenharmony_ci	GROUP(sdxc_d13_0_a,	5,	28),
4518c2ecf20Sopenharmony_ci	GROUP(sd_clk_a,		8,	1),
4528c2ecf20Sopenharmony_ci	GROUP(sd_cmd_a,		8,	0),
4538c2ecf20Sopenharmony_ci	GROUP(xtal_32k_out,	3,	22),
4548c2ecf20Sopenharmony_ci	GROUP(xtal_24m_out,	3,	20),
4558c2ecf20Sopenharmony_ci	GROUP(uart_tx_b0,	4,	9),
4568c2ecf20Sopenharmony_ci	GROUP(uart_rx_b0,	4,	8),
4578c2ecf20Sopenharmony_ci	GROUP(uart_cts_b0,	4,	7),
4588c2ecf20Sopenharmony_ci	GROUP(uart_rts_b0,	4,	6),
4598c2ecf20Sopenharmony_ci	GROUP(sdxc_d0_1_a,	5,	14),
4608c2ecf20Sopenharmony_ci	GROUP(sdxc_d13_1_a,	5,	13),
4618c2ecf20Sopenharmony_ci	GROUP(pcm_out_a,	3,	30),
4628c2ecf20Sopenharmony_ci	GROUP(pcm_in_a,		3,	29),
4638c2ecf20Sopenharmony_ci	GROUP(pcm_fs_a,		3,	28),
4648c2ecf20Sopenharmony_ci	GROUP(pcm_clk_a,	3,	27),
4658c2ecf20Sopenharmony_ci	GROUP(sdxc_clk_a,	5,	11),
4668c2ecf20Sopenharmony_ci	GROUP(sdxc_cmd_a,	5,	10),
4678c2ecf20Sopenharmony_ci	GROUP(pwm_vs_0,		7,	31),
4688c2ecf20Sopenharmony_ci	GROUP(pwm_e,		9,	19),
4698c2ecf20Sopenharmony_ci	GROUP(pwm_vs_1,		7,	30),
4708c2ecf20Sopenharmony_ci	GROUP(uart_tx_a,	4,	17),
4718c2ecf20Sopenharmony_ci	GROUP(uart_rx_a,	4,	16),
4728c2ecf20Sopenharmony_ci	GROUP(uart_cts_a,	4,	15),
4738c2ecf20Sopenharmony_ci	GROUP(uart_rts_a,	4,	14),
4748c2ecf20Sopenharmony_ci	GROUP(uart_tx_b1,	6,	19),
4758c2ecf20Sopenharmony_ci	GROUP(uart_rx_b1,	6,	18),
4768c2ecf20Sopenharmony_ci	GROUP(uart_cts_b1,	6,	17),
4778c2ecf20Sopenharmony_ci	GROUP(uart_rts_b1,	6,	16),
4788c2ecf20Sopenharmony_ci	GROUP(iso7816_0_clk,	5,	9),
4798c2ecf20Sopenharmony_ci	GROUP(iso7816_0_data,	5,	8),
4808c2ecf20Sopenharmony_ci	GROUP(spi_sclk_0,	4,	22),
4818c2ecf20Sopenharmony_ci	GROUP(spi_miso_0,	4,	24),
4828c2ecf20Sopenharmony_ci	GROUP(spi_mosi_0,	4,	23),
4838c2ecf20Sopenharmony_ci	GROUP(iso7816_det,	4,	21),
4848c2ecf20Sopenharmony_ci	GROUP(iso7816_reset,	4,	20),
4858c2ecf20Sopenharmony_ci	GROUP(iso7816_1_clk,	4,	19),
4868c2ecf20Sopenharmony_ci	GROUP(iso7816_1_data,	4,	18),
4878c2ecf20Sopenharmony_ci	GROUP(spi_ss0_0,	4,	25),
4888c2ecf20Sopenharmony_ci	GROUP(tsin_clk_b,	3,	6),
4898c2ecf20Sopenharmony_ci	GROUP(tsin_sop_b,	3,	7),
4908c2ecf20Sopenharmony_ci	GROUP(tsin_d0_b,	3,	8),
4918c2ecf20Sopenharmony_ci	GROUP(pwm_b,		2,	3),
4928c2ecf20Sopenharmony_ci	GROUP(i2c_sda_d0,	4,	5),
4938c2ecf20Sopenharmony_ci	GROUP(i2c_sck_d0,	4,	4),
4948c2ecf20Sopenharmony_ci	GROUP(tsin_d_valid_b,	3,	9),
4958c2ecf20Sopenharmony_ci
4968c2ecf20Sopenharmony_ci	/* bank Y */
4978c2ecf20Sopenharmony_ci	GROUP(tsin_d_valid_a,	3,	2),
4988c2ecf20Sopenharmony_ci	GROUP(tsin_sop_a,	3,	1),
4998c2ecf20Sopenharmony_ci	GROUP(tsin_d17_a,	3,	5),
5008c2ecf20Sopenharmony_ci	GROUP(tsin_clk_a,	3,	0),
5018c2ecf20Sopenharmony_ci	GROUP(tsin_d0_a,	3,	4),
5028c2ecf20Sopenharmony_ci	GROUP(spdif_out_0,	1,	7),
5038c2ecf20Sopenharmony_ci	GROUP(xtal_24m,		3,	18),
5048c2ecf20Sopenharmony_ci	GROUP(iso7816_2_clk,	5,	7),
5058c2ecf20Sopenharmony_ci	GROUP(iso7816_2_data,	5,	6),
5068c2ecf20Sopenharmony_ci
5078c2ecf20Sopenharmony_ci	/* bank DV */
5088c2ecf20Sopenharmony_ci	GROUP(pwm_d,		3,	26),
5098c2ecf20Sopenharmony_ci	GROUP(pwm_c0,		3,	25),
5108c2ecf20Sopenharmony_ci	GROUP(pwm_vs_2,		7,	28),
5118c2ecf20Sopenharmony_ci	GROUP(pwm_vs_3,		7,	27),
5128c2ecf20Sopenharmony_ci	GROUP(pwm_vs_4,		7,	26),
5138c2ecf20Sopenharmony_ci	GROUP(xtal24_out,	7,	25),
5148c2ecf20Sopenharmony_ci	GROUP(uart_tx_c,	6,	23),
5158c2ecf20Sopenharmony_ci	GROUP(uart_rx_c,	6,	22),
5168c2ecf20Sopenharmony_ci	GROUP(uart_cts_c,	6,	21),
5178c2ecf20Sopenharmony_ci	GROUP(uart_rts_c,	6,	20),
5188c2ecf20Sopenharmony_ci	GROUP(pwm_c1,		3,	24),
5198c2ecf20Sopenharmony_ci	GROUP(i2c_sda_a,	9,	31),
5208c2ecf20Sopenharmony_ci	GROUP(i2c_sck_a,	9,	30),
5218c2ecf20Sopenharmony_ci	GROUP(i2c_sda_b0,	9,	29),
5228c2ecf20Sopenharmony_ci	GROUP(i2c_sck_b0,	9,	28),
5238c2ecf20Sopenharmony_ci	GROUP(i2c_sda_c0,	9,	27),
5248c2ecf20Sopenharmony_ci	GROUP(i2c_sck_c0,	9,	26),
5258c2ecf20Sopenharmony_ci
5268c2ecf20Sopenharmony_ci	/* bank H */
5278c2ecf20Sopenharmony_ci	GROUP(hdmi_hpd,		1,	26),
5288c2ecf20Sopenharmony_ci	GROUP(hdmi_sda,		1,	25),
5298c2ecf20Sopenharmony_ci	GROUP(hdmi_scl,		1,	24),
5308c2ecf20Sopenharmony_ci	GROUP(hdmi_cec_0,	1,	23),
5318c2ecf20Sopenharmony_ci	GROUP(eth_txd1_0,	7,	21),
5328c2ecf20Sopenharmony_ci	GROUP(eth_txd0_0,	7,	20),
5338c2ecf20Sopenharmony_ci	GROUP(clk_24m_out,	4,	1),
5348c2ecf20Sopenharmony_ci	GROUP(spi_ss1,		8,	11),
5358c2ecf20Sopenharmony_ci	GROUP(spi_ss2,		8,	12),
5368c2ecf20Sopenharmony_ci	GROUP(spi_ss0_1,	9,	13),
5378c2ecf20Sopenharmony_ci	GROUP(spi_miso_1,	9,	12),
5388c2ecf20Sopenharmony_ci	GROUP(spi_mosi_1,	9,	11),
5398c2ecf20Sopenharmony_ci	GROUP(spi_sclk_1,	9,	10),
5408c2ecf20Sopenharmony_ci	GROUP(eth_rxd3_h,	6,	15),
5418c2ecf20Sopenharmony_ci	GROUP(eth_rxd2_h,	6,	14),
5428c2ecf20Sopenharmony_ci	GROUP(eth_txd3,		6,	13),
5438c2ecf20Sopenharmony_ci	GROUP(eth_txd2,		6,	12),
5448c2ecf20Sopenharmony_ci	GROUP(eth_tx_clk,	6,	11),
5458c2ecf20Sopenharmony_ci	GROUP(i2c_sda_b1,	5,	27),
5468c2ecf20Sopenharmony_ci	GROUP(i2c_sck_b1,	5,	26),
5478c2ecf20Sopenharmony_ci	GROUP(i2c_sda_c1,	5,	25),
5488c2ecf20Sopenharmony_ci	GROUP(i2c_sck_c1,	5,	24),
5498c2ecf20Sopenharmony_ci	GROUP(i2c_sda_d1,	4,	3),
5508c2ecf20Sopenharmony_ci	GROUP(i2c_sck_d1,	4,	2),
5518c2ecf20Sopenharmony_ci
5528c2ecf20Sopenharmony_ci	/* bank BOOT */
5538c2ecf20Sopenharmony_ci	GROUP(nand_io,		2,	26),
5548c2ecf20Sopenharmony_ci	GROUP(nand_io_ce0,	2,	25),
5558c2ecf20Sopenharmony_ci	GROUP(nand_io_ce1,	2,	24),
5568c2ecf20Sopenharmony_ci	GROUP(nand_io_rb0,	2,	17),
5578c2ecf20Sopenharmony_ci	GROUP(nand_ale,		2,	21),
5588c2ecf20Sopenharmony_ci	GROUP(nand_cle,		2,	20),
5598c2ecf20Sopenharmony_ci	GROUP(nand_wen_clk,	2,	19),
5608c2ecf20Sopenharmony_ci	GROUP(nand_ren_clk,	2,	18),
5618c2ecf20Sopenharmony_ci	GROUP(nand_dqs_15,	2,	27),
5628c2ecf20Sopenharmony_ci	GROUP(nand_dqs_18,	2,	28),
5638c2ecf20Sopenharmony_ci	GROUP(sdxc_d0_c,	4,	30),
5648c2ecf20Sopenharmony_ci	GROUP(sdxc_d13_c,	4,	29),
5658c2ecf20Sopenharmony_ci	GROUP(sdxc_d47_c,	4,	28),
5668c2ecf20Sopenharmony_ci	GROUP(sdxc_clk_c,	7,	19),
5678c2ecf20Sopenharmony_ci	GROUP(sdxc_cmd_c,	7,	18),
5688c2ecf20Sopenharmony_ci	GROUP(nor_d,		5,	1),
5698c2ecf20Sopenharmony_ci	GROUP(nor_q,		5,	3),
5708c2ecf20Sopenharmony_ci	GROUP(nor_c,		5,	2),
5718c2ecf20Sopenharmony_ci	GROUP(nor_cs,		5,	0),
5728c2ecf20Sopenharmony_ci	GROUP(sd_d0_c,		6,	29),
5738c2ecf20Sopenharmony_ci	GROUP(sd_d1_c,		6,	28),
5748c2ecf20Sopenharmony_ci	GROUP(sd_d2_c,		6,	27),
5758c2ecf20Sopenharmony_ci	GROUP(sd_d3_c,		6,	26),
5768c2ecf20Sopenharmony_ci	GROUP(sd_cmd_c,		6,	30),
5778c2ecf20Sopenharmony_ci	GROUP(sd_clk_c,		6,	31),
5788c2ecf20Sopenharmony_ci
5798c2ecf20Sopenharmony_ci	/* bank CARD */
5808c2ecf20Sopenharmony_ci	GROUP(sd_d1_b,		2,	14),
5818c2ecf20Sopenharmony_ci	GROUP(sd_d0_b,		2,	15),
5828c2ecf20Sopenharmony_ci	GROUP(sd_clk_b,		2,	11),
5838c2ecf20Sopenharmony_ci	GROUP(sd_cmd_b,		2,	10),
5848c2ecf20Sopenharmony_ci	GROUP(sd_d3_b,		2,	12),
5858c2ecf20Sopenharmony_ci	GROUP(sd_d2_b,		2,	13),
5868c2ecf20Sopenharmony_ci	GROUP(sdxc_d13_b,	2,	6),
5878c2ecf20Sopenharmony_ci	GROUP(sdxc_d0_b,	2,	7),
5888c2ecf20Sopenharmony_ci	GROUP(sdxc_clk_b,	2,	5),
5898c2ecf20Sopenharmony_ci	GROUP(sdxc_cmd_b,	2,	4),
5908c2ecf20Sopenharmony_ci
5918c2ecf20Sopenharmony_ci	/* bank DIF */
5928c2ecf20Sopenharmony_ci	GROUP(eth_rxd1,		6,	0),
5938c2ecf20Sopenharmony_ci	GROUP(eth_rxd0,		6,	1),
5948c2ecf20Sopenharmony_ci	GROUP(eth_rx_dv,	6,	2),
5958c2ecf20Sopenharmony_ci	GROUP(eth_rx_clk,	6,	3),
5968c2ecf20Sopenharmony_ci	GROUP(eth_txd0_1,	6,	4),
5978c2ecf20Sopenharmony_ci	GROUP(eth_txd1_1,	6,	5),
5988c2ecf20Sopenharmony_ci	GROUP(eth_tx_en,	6,	6),
5998c2ecf20Sopenharmony_ci	GROUP(eth_ref_clk,	6,	8),
6008c2ecf20Sopenharmony_ci	GROUP(eth_mdc,		6,	9),
6018c2ecf20Sopenharmony_ci	GROUP(eth_mdio_en,	6,	10),
6028c2ecf20Sopenharmony_ci	GROUP(eth_rxd3,		7,	22),
6038c2ecf20Sopenharmony_ci	GROUP(eth_rxd2,		7,	23),
6048c2ecf20Sopenharmony_ci};
6058c2ecf20Sopenharmony_ci
6068c2ecf20Sopenharmony_cistatic struct meson_pmx_group meson8b_aobus_groups[] = {
6078c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_0),
6088c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_1),
6098c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_2),
6108c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_3),
6118c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_4),
6128c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_5),
6138c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_6),
6148c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_7),
6158c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_8),
6168c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_9),
6178c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_10),
6188c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_11),
6198c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_12),
6208c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIOAO_13),
6218c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIO_BSD_EN),
6228c2ecf20Sopenharmony_ci	GPIO_GROUP(GPIO_TEST_N),
6238c2ecf20Sopenharmony_ci
6248c2ecf20Sopenharmony_ci	/* bank AO */
6258c2ecf20Sopenharmony_ci	GROUP(uart_tx_ao_a,	0,	12),
6268c2ecf20Sopenharmony_ci	GROUP(uart_rx_ao_a,	0,	11),
6278c2ecf20Sopenharmony_ci	GROUP(uart_cts_ao_a,	0,	10),
6288c2ecf20Sopenharmony_ci	GROUP(uart_rts_ao_a,	0,	9),
6298c2ecf20Sopenharmony_ci	GROUP(i2c_mst_sck_ao,	0,	6),
6308c2ecf20Sopenharmony_ci	GROUP(i2c_mst_sda_ao,	0,	5),
6318c2ecf20Sopenharmony_ci	GROUP(clk_32k_in_out,	0,	18),
6328c2ecf20Sopenharmony_ci	GROUP(remote_input,	0,	0),
6338c2ecf20Sopenharmony_ci	GROUP(hdmi_cec_1,	0,	17),
6348c2ecf20Sopenharmony_ci	GROUP(ir_blaster,	0,	31),
6358c2ecf20Sopenharmony_ci	GROUP(pwm_c2,		0,	22),
6368c2ecf20Sopenharmony_ci	GROUP(i2c_sck_ao,	0,	2),
6378c2ecf20Sopenharmony_ci	GROUP(i2c_sda_ao,	0,	1),
6388c2ecf20Sopenharmony_ci	GROUP(ir_remote_out,	0,	21),
6398c2ecf20Sopenharmony_ci	GROUP(i2s_am_clk_out,	0,	30),
6408c2ecf20Sopenharmony_ci	GROUP(i2s_ao_clk_out,	0,	29),
6418c2ecf20Sopenharmony_ci	GROUP(i2s_lr_clk_out,	0,	28),
6428c2ecf20Sopenharmony_ci	GROUP(i2s_out_01,	0,	27),
6438c2ecf20Sopenharmony_ci	GROUP(uart_tx_ao_b0,	0,	26),
6448c2ecf20Sopenharmony_ci	GROUP(uart_rx_ao_b0,	0,	25),
6458c2ecf20Sopenharmony_ci	GROUP(uart_cts_ao_b,	0,	8),
6468c2ecf20Sopenharmony_ci	GROUP(uart_rts_ao_b,	0,	7),
6478c2ecf20Sopenharmony_ci	GROUP(uart_tx_ao_b1,	0,	24),
6488c2ecf20Sopenharmony_ci	GROUP(uart_rx_ao_b1,	0,	23),
6498c2ecf20Sopenharmony_ci	GROUP(spdif_out_1,	0,	16),
6508c2ecf20Sopenharmony_ci	GROUP(i2s_in_ch01,	0,	13),
6518c2ecf20Sopenharmony_ci	GROUP(i2s_ao_clk_in,	0,	15),
6528c2ecf20Sopenharmony_ci	GROUP(i2s_lr_clk_in,	0,	14),
6538c2ecf20Sopenharmony_ci};
6548c2ecf20Sopenharmony_ci
6558c2ecf20Sopenharmony_cistatic const char * const gpio_periphs_groups[] = {
6568c2ecf20Sopenharmony_ci	"GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4",
6578c2ecf20Sopenharmony_ci	"GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9",
6588c2ecf20Sopenharmony_ci	"GPIOX_10", "GPIOX_11", "GPIOX_16", "GPIOX_17", "GPIOX_18",
6598c2ecf20Sopenharmony_ci	"GPIOX_19", "GPIOX_20", "GPIOX_21",
6608c2ecf20Sopenharmony_ci
6618c2ecf20Sopenharmony_ci	"GPIOY_0", "GPIOY_1", "GPIOY_3", "GPIOY_6", "GPIOY_7",
6628c2ecf20Sopenharmony_ci	"GPIOY_8", "GPIOY_9", "GPIOY_10", "GPIOY_11", "GPIOY_12",
6638c2ecf20Sopenharmony_ci	"GPIOY_13", "GPIOY_14",
6648c2ecf20Sopenharmony_ci
6658c2ecf20Sopenharmony_ci	"GPIODV_9", "GPIODV_24", "GPIODV_25", "GPIODV_26",
6668c2ecf20Sopenharmony_ci	"GPIODV_27", "GPIODV_28", "GPIODV_29",
6678c2ecf20Sopenharmony_ci
6688c2ecf20Sopenharmony_ci	"GPIOH_0", "GPIOH_1", "GPIOH_2", "GPIOH_3", "GPIOH_4",
6698c2ecf20Sopenharmony_ci	"GPIOH_5", "GPIOH_6", "GPIOH_7", "GPIOH_8", "GPIOH_9",
6708c2ecf20Sopenharmony_ci
6718c2ecf20Sopenharmony_ci	"CARD_0", "CARD_1", "CARD_2", "CARD_3", "CARD_4",
6728c2ecf20Sopenharmony_ci	"CARD_5", "CARD_6",
6738c2ecf20Sopenharmony_ci
6748c2ecf20Sopenharmony_ci	"BOOT_0", "BOOT_1", "BOOT_2", "BOOT_3", "BOOT_4",
6758c2ecf20Sopenharmony_ci	"BOOT_5", "BOOT_6", "BOOT_7", "BOOT_8", "BOOT_9",
6768c2ecf20Sopenharmony_ci	"BOOT_10", "BOOT_11", "BOOT_12", "BOOT_13", "BOOT_14",
6778c2ecf20Sopenharmony_ci	"BOOT_15", "BOOT_16", "BOOT_17", "BOOT_18",
6788c2ecf20Sopenharmony_ci
6798c2ecf20Sopenharmony_ci	"DIF_0_P", "DIF_0_N", "DIF_1_P", "DIF_1_N",
6808c2ecf20Sopenharmony_ci	"DIF_2_P", "DIF_2_N", "DIF_3_P", "DIF_3_N",
6818c2ecf20Sopenharmony_ci	"DIF_4_P", "DIF_4_N"
6828c2ecf20Sopenharmony_ci};
6838c2ecf20Sopenharmony_ci
6848c2ecf20Sopenharmony_cistatic const char * const gpio_aobus_groups[] = {
6858c2ecf20Sopenharmony_ci	"GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3",
6868c2ecf20Sopenharmony_ci	"GPIOAO_4", "GPIOAO_5", "GPIOAO_6", "GPIOAO_7",
6878c2ecf20Sopenharmony_ci	"GPIOAO_8", "GPIOAO_9", "GPIOAO_10", "GPIOAO_11",
6888c2ecf20Sopenharmony_ci	"GPIOAO_12", "GPIOAO_13", "GPIO_BSD_EN", "GPIO_TEST_N"
6898c2ecf20Sopenharmony_ci};
6908c2ecf20Sopenharmony_ci
6918c2ecf20Sopenharmony_cistatic const char * const sd_a_groups[] = {
6928c2ecf20Sopenharmony_ci	"sd_d0_a", "sd_d1_a", "sd_d2_a", "sd_d3_a", "sd_clk_a",
6938c2ecf20Sopenharmony_ci	"sd_cmd_a"
6948c2ecf20Sopenharmony_ci};
6958c2ecf20Sopenharmony_ci
6968c2ecf20Sopenharmony_cistatic const char * const sdxc_a_groups[] = {
6978c2ecf20Sopenharmony_ci	"sdxc_d0_0_a", "sdxc_d13_0_a", "sdxc_d47_a", "sdxc_clk_a",
6988c2ecf20Sopenharmony_ci	"sdxc_cmd_a", "sdxc_d0_1_a", "sdxc_d13_1_a"
6998c2ecf20Sopenharmony_ci};
7008c2ecf20Sopenharmony_ci
7018c2ecf20Sopenharmony_cistatic const char * const pcm_a_groups[] = {
7028c2ecf20Sopenharmony_ci	"pcm_out_a", "pcm_in_a", "pcm_fs_a", "pcm_clk_a"
7038c2ecf20Sopenharmony_ci};
7048c2ecf20Sopenharmony_ci
7058c2ecf20Sopenharmony_cistatic const char * const uart_a_groups[] = {
7068c2ecf20Sopenharmony_ci	"uart_tx_a", "uart_rx_a", "uart_cts_a", "uart_rts_a"
7078c2ecf20Sopenharmony_ci};
7088c2ecf20Sopenharmony_ci
7098c2ecf20Sopenharmony_cistatic const char * const uart_b_groups[] = {
7108c2ecf20Sopenharmony_ci	"uart_tx_b0", "uart_rx_b0", "uart_cts_b0", "uart_rts_b0",
7118c2ecf20Sopenharmony_ci	"uart_tx_b1", "uart_rx_b1", "uart_cts_b1", "uart_rts_b1"
7128c2ecf20Sopenharmony_ci};
7138c2ecf20Sopenharmony_ci
7148c2ecf20Sopenharmony_cistatic const char * const iso7816_groups[] = {
7158c2ecf20Sopenharmony_ci	"iso7816_det", "iso7816_reset", "iso7816_0_clk", "iso7816_0_data",
7168c2ecf20Sopenharmony_ci	"iso7816_1_clk", "iso7816_1_data", "iso7816_2_clk", "iso7816_2_data"
7178c2ecf20Sopenharmony_ci};
7188c2ecf20Sopenharmony_ci
7198c2ecf20Sopenharmony_cistatic const char * const i2c_d_groups[] = {
7208c2ecf20Sopenharmony_ci	"i2c_sda_d0", "i2c_sck_d0", "i2c_sda_d1", "i2c_sck_d1"
7218c2ecf20Sopenharmony_ci};
7228c2ecf20Sopenharmony_ci
7238c2ecf20Sopenharmony_cistatic const char * const xtal_groups[] = {
7248c2ecf20Sopenharmony_ci	"xtal_32k_out", "xtal_24m_out", "xtal_24m", "xtal24_out"
7258c2ecf20Sopenharmony_ci};
7268c2ecf20Sopenharmony_ci
7278c2ecf20Sopenharmony_cistatic const char * const uart_c_groups[] = {
7288c2ecf20Sopenharmony_ci	"uart_tx_c", "uart_rx_c", "uart_cts_c", "uart_rts_c"
7298c2ecf20Sopenharmony_ci};
7308c2ecf20Sopenharmony_ci
7318c2ecf20Sopenharmony_cistatic const char * const i2c_c_groups[] = {
7328c2ecf20Sopenharmony_ci	"i2c_sda_c0", "i2c_sck_c0", "i2c_sda_c1", "i2c_sck_c1"
7338c2ecf20Sopenharmony_ci};
7348c2ecf20Sopenharmony_ci
7358c2ecf20Sopenharmony_cistatic const char * const hdmi_groups[] = {
7368c2ecf20Sopenharmony_ci	"hdmi_hpd", "hdmi_sda", "hdmi_scl", "hdmi_cec_0"
7378c2ecf20Sopenharmony_ci};
7388c2ecf20Sopenharmony_ci
7398c2ecf20Sopenharmony_cistatic const char * const hdmi_cec_groups[] = {
7408c2ecf20Sopenharmony_ci	"hdmi_cec_1"
7418c2ecf20Sopenharmony_ci};
7428c2ecf20Sopenharmony_ci
7438c2ecf20Sopenharmony_cistatic const char * const spi_groups[] = {
7448c2ecf20Sopenharmony_ci	"spi_ss0_0", "spi_miso_0", "spi_mosi_0", "spi_sclk_0",
7458c2ecf20Sopenharmony_ci	"spi_ss0_1", "spi_ss1", "spi_sclk_1", "spi_mosi_1",
7468c2ecf20Sopenharmony_ci	"spi_miso_1", "spi_ss2"
7478c2ecf20Sopenharmony_ci};
7488c2ecf20Sopenharmony_ci
7498c2ecf20Sopenharmony_cistatic const char * const ethernet_groups[] = {
7508c2ecf20Sopenharmony_ci	"eth_tx_clk", "eth_tx_en", "eth_txd1_0", "eth_txd1_1",
7518c2ecf20Sopenharmony_ci	"eth_txd0_0", "eth_txd0_1", "eth_rx_clk", "eth_rx_dv",
7528c2ecf20Sopenharmony_ci	"eth_rxd1", "eth_rxd0", "eth_mdio_en", "eth_mdc", "eth_ref_clk",
7538c2ecf20Sopenharmony_ci	"eth_txd2", "eth_txd3", "eth_rxd3", "eth_rxd2",
7548c2ecf20Sopenharmony_ci	"eth_rxd3_h", "eth_rxd2_h"
7558c2ecf20Sopenharmony_ci};
7568c2ecf20Sopenharmony_ci
7578c2ecf20Sopenharmony_cistatic const char * const i2c_a_groups[] = {
7588c2ecf20Sopenharmony_ci	"i2c_sda_a", "i2c_sck_a",
7598c2ecf20Sopenharmony_ci};
7608c2ecf20Sopenharmony_ci
7618c2ecf20Sopenharmony_cistatic const char * const i2c_b_groups[] = {
7628c2ecf20Sopenharmony_ci	"i2c_sda_b0", "i2c_sck_b0", "i2c_sda_b1", "i2c_sck_b1"
7638c2ecf20Sopenharmony_ci};
7648c2ecf20Sopenharmony_ci
7658c2ecf20Sopenharmony_cistatic const char * const sd_c_groups[] = {
7668c2ecf20Sopenharmony_ci	"sd_d0_c", "sd_d1_c", "sd_d2_c", "sd_d3_c",
7678c2ecf20Sopenharmony_ci	"sd_cmd_c", "sd_clk_c"
7688c2ecf20Sopenharmony_ci};
7698c2ecf20Sopenharmony_ci
7708c2ecf20Sopenharmony_cistatic const char * const sdxc_c_groups[] = {
7718c2ecf20Sopenharmony_ci	"sdxc_d0_c", "sdxc_d13_c", "sdxc_d47_c", "sdxc_cmd_c",
7728c2ecf20Sopenharmony_ci	"sdxc_clk_c"
7738c2ecf20Sopenharmony_ci};
7748c2ecf20Sopenharmony_ci
7758c2ecf20Sopenharmony_cistatic const char * const nand_groups[] = {
7768c2ecf20Sopenharmony_ci	"nand_io", "nand_io_ce0", "nand_io_ce1",
7778c2ecf20Sopenharmony_ci	"nand_io_rb0", "nand_ale", "nand_cle",
7788c2ecf20Sopenharmony_ci	"nand_wen_clk", "nand_ren_clk", "nand_dqs_15",
7798c2ecf20Sopenharmony_ci	"nand_dqs_18"
7808c2ecf20Sopenharmony_ci};
7818c2ecf20Sopenharmony_ci
7828c2ecf20Sopenharmony_cistatic const char * const nor_groups[] = {
7838c2ecf20Sopenharmony_ci	"nor_d", "nor_q", "nor_c", "nor_cs"
7848c2ecf20Sopenharmony_ci};
7858c2ecf20Sopenharmony_ci
7868c2ecf20Sopenharmony_cistatic const char * const sd_b_groups[] = {
7878c2ecf20Sopenharmony_ci	"sd_d1_b", "sd_d0_b", "sd_clk_b", "sd_cmd_b",
7888c2ecf20Sopenharmony_ci	"sd_d3_b", "sd_d2_b"
7898c2ecf20Sopenharmony_ci};
7908c2ecf20Sopenharmony_ci
7918c2ecf20Sopenharmony_cistatic const char * const sdxc_b_groups[] = {
7928c2ecf20Sopenharmony_ci	"sdxc_d13_b", "sdxc_d0_b", "sdxc_clk_b", "sdxc_cmd_b"
7938c2ecf20Sopenharmony_ci};
7948c2ecf20Sopenharmony_ci
7958c2ecf20Sopenharmony_cistatic const char * const uart_ao_groups[] = {
7968c2ecf20Sopenharmony_ci	"uart_tx_ao_a", "uart_rx_ao_a", "uart_cts_ao_a", "uart_rts_ao_a"
7978c2ecf20Sopenharmony_ci};
7988c2ecf20Sopenharmony_ci
7998c2ecf20Sopenharmony_cistatic const char * const remote_groups[] = {
8008c2ecf20Sopenharmony_ci	"remote_input", "ir_blaster", "ir_remote_out"
8018c2ecf20Sopenharmony_ci};
8028c2ecf20Sopenharmony_ci
8038c2ecf20Sopenharmony_cistatic const char * const i2c_slave_ao_groups[] = {
8048c2ecf20Sopenharmony_ci	"i2c_sck_ao", "i2c_sda_ao"
8058c2ecf20Sopenharmony_ci};
8068c2ecf20Sopenharmony_ci
8078c2ecf20Sopenharmony_cistatic const char * const uart_ao_b_groups[] = {
8088c2ecf20Sopenharmony_ci	"uart_tx_ao_b0", "uart_rx_ao_b0", "uart_tx_ao_b1", "uart_rx_ao_b1",
8098c2ecf20Sopenharmony_ci	"uart_cts_ao_b", "uart_rts_ao_b"
8108c2ecf20Sopenharmony_ci};
8118c2ecf20Sopenharmony_ci
8128c2ecf20Sopenharmony_cistatic const char * const i2c_mst_ao_groups[] = {
8138c2ecf20Sopenharmony_ci	"i2c_mst_sck_ao", "i2c_mst_sda_ao"
8148c2ecf20Sopenharmony_ci};
8158c2ecf20Sopenharmony_ci
8168c2ecf20Sopenharmony_cistatic const char * const clk_24m_groups[] = {
8178c2ecf20Sopenharmony_ci	"clk_24m_out"
8188c2ecf20Sopenharmony_ci};
8198c2ecf20Sopenharmony_ci
8208c2ecf20Sopenharmony_cistatic const char * const clk_32k_groups[] = {
8218c2ecf20Sopenharmony_ci	"clk_32k_in_out"
8228c2ecf20Sopenharmony_ci};
8238c2ecf20Sopenharmony_ci
8248c2ecf20Sopenharmony_cistatic const char * const spdif_0_groups[] = {
8258c2ecf20Sopenharmony_ci	"spdif_out_0"
8268c2ecf20Sopenharmony_ci};
8278c2ecf20Sopenharmony_ci
8288c2ecf20Sopenharmony_cistatic const char * const spdif_1_groups[] = {
8298c2ecf20Sopenharmony_ci	"spdif_out_1"
8308c2ecf20Sopenharmony_ci};
8318c2ecf20Sopenharmony_ci
8328c2ecf20Sopenharmony_cistatic const char * const i2s_groups[] = {
8338c2ecf20Sopenharmony_ci	"i2s_am_clk_out", "i2s_ao_clk_out", "i2s_lr_clk_out",
8348c2ecf20Sopenharmony_ci	"i2s_out_01", "i2s_in_ch01", "i2s_ao_clk_in",
8358c2ecf20Sopenharmony_ci	"i2s_lr_clk_in"
8368c2ecf20Sopenharmony_ci};
8378c2ecf20Sopenharmony_ci
8388c2ecf20Sopenharmony_cistatic const char * const pwm_b_groups[] = {
8398c2ecf20Sopenharmony_ci	"pwm_b"
8408c2ecf20Sopenharmony_ci};
8418c2ecf20Sopenharmony_ci
8428c2ecf20Sopenharmony_cistatic const char * const pwm_c_groups[] = {
8438c2ecf20Sopenharmony_ci	"pwm_c0", "pwm_c1"
8448c2ecf20Sopenharmony_ci};
8458c2ecf20Sopenharmony_ci
8468c2ecf20Sopenharmony_cistatic const char * const pwm_c_ao_groups[] = {
8478c2ecf20Sopenharmony_ci	"pwm_c2"
8488c2ecf20Sopenharmony_ci};
8498c2ecf20Sopenharmony_ci
8508c2ecf20Sopenharmony_cistatic const char * const pwm_d_groups[] = {
8518c2ecf20Sopenharmony_ci	"pwm_d"
8528c2ecf20Sopenharmony_ci};
8538c2ecf20Sopenharmony_ci
8548c2ecf20Sopenharmony_cistatic const char * const pwm_e_groups[] = {
8558c2ecf20Sopenharmony_ci	"pwm_e"
8568c2ecf20Sopenharmony_ci};
8578c2ecf20Sopenharmony_ci
8588c2ecf20Sopenharmony_cistatic const char * const pwm_vs_groups[] = {
8598c2ecf20Sopenharmony_ci	"pwm_vs_0", "pwm_vs_1", "pwm_vs_2",
8608c2ecf20Sopenharmony_ci	"pwm_vs_3", "pwm_vs_4"
8618c2ecf20Sopenharmony_ci};
8628c2ecf20Sopenharmony_ci
8638c2ecf20Sopenharmony_cistatic const char * const tsin_a_groups[] = {
8648c2ecf20Sopenharmony_ci	"tsin_d0_a", "tsin_d17_a", "tsin_clk_a", "tsin_sop_a",
8658c2ecf20Sopenharmony_ci	"tsin_d_valid_a"
8668c2ecf20Sopenharmony_ci};
8678c2ecf20Sopenharmony_ci
8688c2ecf20Sopenharmony_cistatic const char * const tsin_b_groups[] = {
8698c2ecf20Sopenharmony_ci	"tsin_d0_b", "tsin_clk_b", "tsin_sop_b", "tsin_d_valid_b"
8708c2ecf20Sopenharmony_ci};
8718c2ecf20Sopenharmony_ci
8728c2ecf20Sopenharmony_cistatic struct meson_pmx_func meson8b_cbus_functions[] = {
8738c2ecf20Sopenharmony_ci	FUNCTION(gpio_periphs),
8748c2ecf20Sopenharmony_ci	FUNCTION(sd_a),
8758c2ecf20Sopenharmony_ci	FUNCTION(sdxc_a),
8768c2ecf20Sopenharmony_ci	FUNCTION(pcm_a),
8778c2ecf20Sopenharmony_ci	FUNCTION(uart_a),
8788c2ecf20Sopenharmony_ci	FUNCTION(uart_b),
8798c2ecf20Sopenharmony_ci	FUNCTION(iso7816),
8808c2ecf20Sopenharmony_ci	FUNCTION(i2c_d),
8818c2ecf20Sopenharmony_ci	FUNCTION(xtal),
8828c2ecf20Sopenharmony_ci	FUNCTION(uart_c),
8838c2ecf20Sopenharmony_ci	FUNCTION(i2c_c),
8848c2ecf20Sopenharmony_ci	FUNCTION(hdmi),
8858c2ecf20Sopenharmony_ci	FUNCTION(spi),
8868c2ecf20Sopenharmony_ci	FUNCTION(ethernet),
8878c2ecf20Sopenharmony_ci	FUNCTION(i2c_a),
8888c2ecf20Sopenharmony_ci	FUNCTION(i2c_b),
8898c2ecf20Sopenharmony_ci	FUNCTION(sd_c),
8908c2ecf20Sopenharmony_ci	FUNCTION(sdxc_c),
8918c2ecf20Sopenharmony_ci	FUNCTION(nand),
8928c2ecf20Sopenharmony_ci	FUNCTION(nor),
8938c2ecf20Sopenharmony_ci	FUNCTION(sd_b),
8948c2ecf20Sopenharmony_ci	FUNCTION(sdxc_b),
8958c2ecf20Sopenharmony_ci	FUNCTION(spdif_0),
8968c2ecf20Sopenharmony_ci	FUNCTION(pwm_b),
8978c2ecf20Sopenharmony_ci	FUNCTION(pwm_c),
8988c2ecf20Sopenharmony_ci	FUNCTION(pwm_d),
8998c2ecf20Sopenharmony_ci	FUNCTION(pwm_e),
9008c2ecf20Sopenharmony_ci	FUNCTION(pwm_vs),
9018c2ecf20Sopenharmony_ci	FUNCTION(tsin_a),
9028c2ecf20Sopenharmony_ci	FUNCTION(tsin_b),
9038c2ecf20Sopenharmony_ci	FUNCTION(clk_24m),
9048c2ecf20Sopenharmony_ci};
9058c2ecf20Sopenharmony_ci
9068c2ecf20Sopenharmony_cistatic struct meson_pmx_func meson8b_aobus_functions[] = {
9078c2ecf20Sopenharmony_ci	FUNCTION(gpio_aobus),
9088c2ecf20Sopenharmony_ci	FUNCTION(uart_ao),
9098c2ecf20Sopenharmony_ci	FUNCTION(uart_ao_b),
9108c2ecf20Sopenharmony_ci	FUNCTION(i2c_slave_ao),
9118c2ecf20Sopenharmony_ci	FUNCTION(i2c_mst_ao),
9128c2ecf20Sopenharmony_ci	FUNCTION(i2s),
9138c2ecf20Sopenharmony_ci	FUNCTION(remote),
9148c2ecf20Sopenharmony_ci	FUNCTION(clk_32k),
9158c2ecf20Sopenharmony_ci	FUNCTION(pwm_c_ao),
9168c2ecf20Sopenharmony_ci	FUNCTION(spdif_1),
9178c2ecf20Sopenharmony_ci	FUNCTION(hdmi_cec),
9188c2ecf20Sopenharmony_ci};
9198c2ecf20Sopenharmony_ci
9208c2ecf20Sopenharmony_cistatic struct meson_bank meson8b_cbus_banks[] = {
9218c2ecf20Sopenharmony_ci	/*   name        first          last        irq       pullen   pull     dir      out      in   */
9228c2ecf20Sopenharmony_ci	BANK("X0..11",	 GPIOX_0,	GPIOX_11,   97, 108,  4,  0,   4,  0,   0,  0,   1,  0,   2,  0),
9238c2ecf20Sopenharmony_ci	BANK("X16..21",	 GPIOX_16,	GPIOX_21,  113, 118,  4, 16,   4, 16,   0, 16,   1, 16,   2, 16),
9248c2ecf20Sopenharmony_ci	BANK("Y0..1",	 GPIOY_0,	GPIOY_1,    80,  81,  3,  0,   3,  0,   3,  0,   4,  0,   5,  0),
9258c2ecf20Sopenharmony_ci	BANK("Y3",	 GPIOY_3,	GPIOY_3,    83,  83,  3,  3,   3,  3,   3,  3,   4,  3,   5,  3),
9268c2ecf20Sopenharmony_ci	BANK("Y6..14",	 GPIOY_6,	GPIOY_14,   86,  94,  3,  6,   3,  6,   3,  6,   4,  6,   5,  6),
9278c2ecf20Sopenharmony_ci	BANK("DV9",	 GPIODV_9,	GPIODV_9,   59,  59,  0,  9,   0,  9,   7,  9,   8,  9,   9,  9),
9288c2ecf20Sopenharmony_ci	BANK("DV24..29", GPIODV_24,	GPIODV_29,  74,  79,  0, 24,   0, 24,   7, 24,   8, 24,   9, 24),
9298c2ecf20Sopenharmony_ci	BANK("H",	 GPIOH_0,	GPIOH_9,    14,  23,  1, 16,   1, 16,   9, 19,  10, 19,  11, 19),
9308c2ecf20Sopenharmony_ci	BANK("CARD",	 CARD_0,	CARD_6,     43,  49,  2, 20,   2, 20,   0, 22,   1, 22,   2, 22),
9318c2ecf20Sopenharmony_ci	BANK("BOOT",	 BOOT_0,	BOOT_18,    24,  42,  2,  0,   2,  0,   9,  0,  10,  0,  11,  0),
9328c2ecf20Sopenharmony_ci
9338c2ecf20Sopenharmony_ci	/*
9348c2ecf20Sopenharmony_ci	 * The following bank is not mentionned in the public datasheet
9358c2ecf20Sopenharmony_ci	 * There is no information whether it can be used with the gpio
9368c2ecf20Sopenharmony_ci	 * interrupt controller
9378c2ecf20Sopenharmony_ci	 */
9388c2ecf20Sopenharmony_ci	BANK("DIF",	 DIF_0_P,	DIF_4_N,    -1,  -1,  5,  8,   5,  8,  12, 12,  13, 12,  14, 12),
9398c2ecf20Sopenharmony_ci};
9408c2ecf20Sopenharmony_ci
9418c2ecf20Sopenharmony_cistatic struct meson_bank meson8b_aobus_banks[] = {
9428c2ecf20Sopenharmony_ci	/*   name    first     lastc        irq    pullen  pull    dir     out     in  */
9438c2ecf20Sopenharmony_ci	BANK("AO",   GPIOAO_0, GPIO_TEST_N, 0, 13, 0,  16, 0, 0,  0,  0,  0, 16,  1,  0),
9448c2ecf20Sopenharmony_ci};
9458c2ecf20Sopenharmony_ci
9468c2ecf20Sopenharmony_cistatic struct meson_pinctrl_data meson8b_cbus_pinctrl_data = {
9478c2ecf20Sopenharmony_ci	.name		= "cbus-banks",
9488c2ecf20Sopenharmony_ci	.pins		= meson8b_cbus_pins,
9498c2ecf20Sopenharmony_ci	.groups		= meson8b_cbus_groups,
9508c2ecf20Sopenharmony_ci	.funcs		= meson8b_cbus_functions,
9518c2ecf20Sopenharmony_ci	.banks		= meson8b_cbus_banks,
9528c2ecf20Sopenharmony_ci	.num_pins	= ARRAY_SIZE(meson8b_cbus_pins),
9538c2ecf20Sopenharmony_ci	.num_groups	= ARRAY_SIZE(meson8b_cbus_groups),
9548c2ecf20Sopenharmony_ci	.num_funcs	= ARRAY_SIZE(meson8b_cbus_functions),
9558c2ecf20Sopenharmony_ci	.num_banks	= ARRAY_SIZE(meson8b_cbus_banks),
9568c2ecf20Sopenharmony_ci	.pmx_ops	= &meson8_pmx_ops,
9578c2ecf20Sopenharmony_ci};
9588c2ecf20Sopenharmony_ci
9598c2ecf20Sopenharmony_cistatic struct meson_pinctrl_data meson8b_aobus_pinctrl_data = {
9608c2ecf20Sopenharmony_ci	.name		= "aobus-banks",
9618c2ecf20Sopenharmony_ci	.pins		= meson8b_aobus_pins,
9628c2ecf20Sopenharmony_ci	.groups		= meson8b_aobus_groups,
9638c2ecf20Sopenharmony_ci	.funcs		= meson8b_aobus_functions,
9648c2ecf20Sopenharmony_ci	.banks		= meson8b_aobus_banks,
9658c2ecf20Sopenharmony_ci	.num_pins	= ARRAY_SIZE(meson8b_aobus_pins),
9668c2ecf20Sopenharmony_ci	.num_groups	= ARRAY_SIZE(meson8b_aobus_groups),
9678c2ecf20Sopenharmony_ci	.num_funcs	= ARRAY_SIZE(meson8b_aobus_functions),
9688c2ecf20Sopenharmony_ci	.num_banks	= ARRAY_SIZE(meson8b_aobus_banks),
9698c2ecf20Sopenharmony_ci	.pmx_ops	= &meson8_pmx_ops,
9708c2ecf20Sopenharmony_ci	.parse_dt	= &meson8_aobus_parse_dt_extra,
9718c2ecf20Sopenharmony_ci};
9728c2ecf20Sopenharmony_ci
9738c2ecf20Sopenharmony_cistatic const struct of_device_id meson8b_pinctrl_dt_match[] = {
9748c2ecf20Sopenharmony_ci	{
9758c2ecf20Sopenharmony_ci		.compatible = "amlogic,meson8b-cbus-pinctrl",
9768c2ecf20Sopenharmony_ci		.data = &meson8b_cbus_pinctrl_data,
9778c2ecf20Sopenharmony_ci	},
9788c2ecf20Sopenharmony_ci	{
9798c2ecf20Sopenharmony_ci		.compatible = "amlogic,meson8b-aobus-pinctrl",
9808c2ecf20Sopenharmony_ci		.data = &meson8b_aobus_pinctrl_data,
9818c2ecf20Sopenharmony_ci	},
9828c2ecf20Sopenharmony_ci	{ },
9838c2ecf20Sopenharmony_ci};
9848c2ecf20Sopenharmony_ci
9858c2ecf20Sopenharmony_cistatic struct platform_driver meson8b_pinctrl_driver = {
9868c2ecf20Sopenharmony_ci	.probe		= meson_pinctrl_probe,
9878c2ecf20Sopenharmony_ci	.driver = {
9888c2ecf20Sopenharmony_ci		.name	= "meson8b-pinctrl",
9898c2ecf20Sopenharmony_ci		.of_match_table = meson8b_pinctrl_dt_match,
9908c2ecf20Sopenharmony_ci	},
9918c2ecf20Sopenharmony_ci};
9928c2ecf20Sopenharmony_cibuiltin_platform_driver(meson8b_pinctrl_driver);
993