183d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+ 216ec5ebdSNeil Armstrong /* 316ec5ebdSNeil Armstrong * (C) Copyright 2016 - Beniamino Galvani <b.galvani@gmail.com> 416ec5ebdSNeil Armstrong * 516ec5ebdSNeil Armstrong * Based on code from Linux kernel: 616ec5ebdSNeil Armstrong * Copyright (C) 2016 Endless Mobile, Inc. 716ec5ebdSNeil Armstrong */ 816ec5ebdSNeil Armstrong 916ec5ebdSNeil Armstrong #include <common.h> 1016ec5ebdSNeil Armstrong #include <dm.h> 1116ec5ebdSNeil Armstrong #include <dm/pinctrl.h> 1216ec5ebdSNeil Armstrong #include <dt-bindings/gpio/meson-gxl-gpio.h> 1316ec5ebdSNeil Armstrong 1416ec5ebdSNeil Armstrong #include "pinctrl-meson.h" 1516ec5ebdSNeil Armstrong 16*42de6522SNeil Armstrong #define EE_OFF 11 1716ec5ebdSNeil Armstrong 1816ec5ebdSNeil Armstrong static const unsigned int emmc_nand_d07_pins[] = { 1916ec5ebdSNeil Armstrong PIN(BOOT_0, EE_OFF), PIN(BOOT_1, EE_OFF), PIN(BOOT_2, EE_OFF), 2016ec5ebdSNeil Armstrong PIN(BOOT_3, EE_OFF), PIN(BOOT_4, EE_OFF), PIN(BOOT_5, EE_OFF), 2116ec5ebdSNeil Armstrong PIN(BOOT_6, EE_OFF), PIN(BOOT_7, EE_OFF), 2216ec5ebdSNeil Armstrong }; 2316ec5ebdSNeil Armstrong static const unsigned int emmc_clk_pins[] = { PIN(BOOT_8, EE_OFF) }; 2416ec5ebdSNeil Armstrong static const unsigned int emmc_cmd_pins[] = { PIN(BOOT_10, EE_OFF) }; 2516ec5ebdSNeil Armstrong static const unsigned int emmc_ds_pins[] = { PIN(BOOT_15, EE_OFF) }; 2616ec5ebdSNeil Armstrong 2716ec5ebdSNeil Armstrong static const unsigned int nor_d_pins[] = { PIN(BOOT_11, EE_OFF) }; 2816ec5ebdSNeil Armstrong static const unsigned int nor_q_pins[] = { PIN(BOOT_12, EE_OFF) }; 2916ec5ebdSNeil Armstrong static const unsigned int nor_c_pins[] = { PIN(BOOT_13, EE_OFF) }; 3016ec5ebdSNeil Armstrong static const unsigned int nor_cs_pins[] = { PIN(BOOT_15, EE_OFF) }; 3116ec5ebdSNeil Armstrong 3216ec5ebdSNeil Armstrong static const unsigned int spi_mosi_pins[] = { PIN(GPIOX_8, EE_OFF) }; 3316ec5ebdSNeil Armstrong static const unsigned int spi_miso_pins[] = { PIN(GPIOX_9, EE_OFF) }; 3416ec5ebdSNeil Armstrong static const unsigned int spi_ss0_pins[] = { PIN(GPIOX_10, EE_OFF) }; 3516ec5ebdSNeil Armstrong static const unsigned int spi_sclk_pins[] = { PIN(GPIOX_11, EE_OFF) }; 3616ec5ebdSNeil Armstrong 3716ec5ebdSNeil Armstrong static const unsigned int sdcard_d0_pins[] = { PIN(CARD_1, EE_OFF) }; 3816ec5ebdSNeil Armstrong static const unsigned int sdcard_d1_pins[] = { PIN(CARD_0, EE_OFF) }; 3916ec5ebdSNeil Armstrong static const unsigned int sdcard_d2_pins[] = { PIN(CARD_5, EE_OFF) }; 4016ec5ebdSNeil Armstrong static const unsigned int sdcard_d3_pins[] = { PIN(CARD_4, EE_OFF) }; 4116ec5ebdSNeil Armstrong static const unsigned int sdcard_cmd_pins[] = { PIN(CARD_3, EE_OFF) }; 4216ec5ebdSNeil Armstrong static const unsigned int sdcard_clk_pins[] = { PIN(CARD_2, EE_OFF) }; 4316ec5ebdSNeil Armstrong 4416ec5ebdSNeil Armstrong static const unsigned int sdio_d0_pins[] = { PIN(GPIOX_0, EE_OFF) }; 4516ec5ebdSNeil Armstrong static const unsigned int sdio_d1_pins[] = { PIN(GPIOX_1, EE_OFF) }; 4616ec5ebdSNeil Armstrong static const unsigned int sdio_d2_pins[] = { PIN(GPIOX_2, EE_OFF) }; 4716ec5ebdSNeil Armstrong static const unsigned int sdio_d3_pins[] = { PIN(GPIOX_3, EE_OFF) }; 4816ec5ebdSNeil Armstrong static const unsigned int sdio_cmd_pins[] = { PIN(GPIOX_4, EE_OFF) }; 4916ec5ebdSNeil Armstrong static const unsigned int sdio_clk_pins[] = { PIN(GPIOX_5, EE_OFF) }; 5016ec5ebdSNeil Armstrong static const unsigned int sdio_irq_pins[] = { PIN(GPIOX_7, EE_OFF) }; 5116ec5ebdSNeil Armstrong 5216ec5ebdSNeil Armstrong static const unsigned int nand_ce0_pins[] = { PIN(BOOT_8, EE_OFF) }; 5316ec5ebdSNeil Armstrong static const unsigned int nand_ce1_pins[] = { PIN(BOOT_9, EE_OFF) }; 5416ec5ebdSNeil Armstrong static const unsigned int nand_rb0_pins[] = { PIN(BOOT_10, EE_OFF) }; 5516ec5ebdSNeil Armstrong static const unsigned int nand_ale_pins[] = { PIN(BOOT_11, EE_OFF) }; 5616ec5ebdSNeil Armstrong static const unsigned int nand_cle_pins[] = { PIN(BOOT_12, EE_OFF) }; 5716ec5ebdSNeil Armstrong static const unsigned int nand_wen_clk_pins[] = { PIN(BOOT_13, EE_OFF) }; 5816ec5ebdSNeil Armstrong static const unsigned int nand_ren_wr_pins[] = { PIN(BOOT_14, EE_OFF) }; 5916ec5ebdSNeil Armstrong static const unsigned int nand_dqs_pins[] = { PIN(BOOT_15, EE_OFF) }; 6016ec5ebdSNeil Armstrong 6116ec5ebdSNeil Armstrong static const unsigned int uart_tx_a_pins[] = { PIN(GPIOX_12, EE_OFF) }; 6216ec5ebdSNeil Armstrong static const unsigned int uart_rx_a_pins[] = { PIN(GPIOX_13, EE_OFF) }; 6316ec5ebdSNeil Armstrong static const unsigned int uart_cts_a_pins[] = { PIN(GPIOX_14, EE_OFF) }; 6416ec5ebdSNeil Armstrong static const unsigned int uart_rts_a_pins[] = { PIN(GPIOX_15, EE_OFF) }; 6516ec5ebdSNeil Armstrong 6616ec5ebdSNeil Armstrong static const unsigned int uart_tx_b_pins[] = { PIN(GPIODV_24, EE_OFF) }; 6716ec5ebdSNeil Armstrong static const unsigned int uart_rx_b_pins[] = { PIN(GPIODV_25, EE_OFF) }; 6816ec5ebdSNeil Armstrong static const unsigned int uart_cts_b_pins[] = { PIN(GPIODV_26, EE_OFF) }; 6916ec5ebdSNeil Armstrong static const unsigned int uart_rts_b_pins[] = { PIN(GPIODV_27, EE_OFF) }; 7016ec5ebdSNeil Armstrong 7116ec5ebdSNeil Armstrong static const unsigned int uart_tx_c_pins[] = { PIN(GPIOX_8, EE_OFF) }; 7216ec5ebdSNeil Armstrong static const unsigned int uart_rx_c_pins[] = { PIN(GPIOX_9, EE_OFF) }; 7316ec5ebdSNeil Armstrong static const unsigned int uart_cts_c_pins[] = { PIN(GPIOX_10, EE_OFF) }; 7416ec5ebdSNeil Armstrong static const unsigned int uart_rts_c_pins[] = { PIN(GPIOX_11, EE_OFF) }; 7516ec5ebdSNeil Armstrong 7616ec5ebdSNeil Armstrong static const unsigned int i2c_sck_a_pins[] = { PIN(GPIODV_25, EE_OFF) }; 7716ec5ebdSNeil Armstrong static const unsigned int i2c_sda_a_pins[] = { PIN(GPIODV_24, EE_OFF) }; 7816ec5ebdSNeil Armstrong 7916ec5ebdSNeil Armstrong static const unsigned int i2c_sck_b_pins[] = { PIN(GPIODV_27, EE_OFF) }; 8016ec5ebdSNeil Armstrong static const unsigned int i2c_sda_b_pins[] = { PIN(GPIODV_26, EE_OFF) }; 8116ec5ebdSNeil Armstrong 8216ec5ebdSNeil Armstrong static const unsigned int i2c_sck_c_pins[] = { PIN(GPIODV_29, EE_OFF) }; 8316ec5ebdSNeil Armstrong static const unsigned int i2c_sda_c_pins[] = { PIN(GPIODV_28, EE_OFF) }; 8416ec5ebdSNeil Armstrong 8516ec5ebdSNeil Armstrong static const unsigned int i2c_sck_c_dv19_pins[] = { PIN(GPIODV_19, EE_OFF) }; 8616ec5ebdSNeil Armstrong static const unsigned int i2c_sda_c_dv18_pins[] = { PIN(GPIODV_18, EE_OFF) }; 8716ec5ebdSNeil Armstrong 8816ec5ebdSNeil Armstrong static const unsigned int eth_mdio_pins[] = { PIN(GPIOZ_0, EE_OFF) }; 8916ec5ebdSNeil Armstrong static const unsigned int eth_mdc_pins[] = { PIN(GPIOZ_1, EE_OFF) }; 9016ec5ebdSNeil Armstrong static const unsigned int eth_clk_rx_clk_pins[] = { PIN(GPIOZ_2, EE_OFF) }; 9116ec5ebdSNeil Armstrong static const unsigned int eth_rx_dv_pins[] = { PIN(GPIOZ_3, EE_OFF) }; 9216ec5ebdSNeil Armstrong static const unsigned int eth_rxd0_pins[] = { PIN(GPIOZ_4, EE_OFF) }; 9316ec5ebdSNeil Armstrong static const unsigned int eth_rxd1_pins[] = { PIN(GPIOZ_5, EE_OFF) }; 9416ec5ebdSNeil Armstrong static const unsigned int eth_rxd2_pins[] = { PIN(GPIOZ_6, EE_OFF) }; 9516ec5ebdSNeil Armstrong static const unsigned int eth_rxd3_pins[] = { PIN(GPIOZ_7, EE_OFF) }; 9616ec5ebdSNeil Armstrong static const unsigned int eth_rgmii_tx_clk_pins[] = { PIN(GPIOZ_8, EE_OFF) }; 9716ec5ebdSNeil Armstrong static const unsigned int eth_tx_en_pins[] = { PIN(GPIOZ_9, EE_OFF) }; 9816ec5ebdSNeil Armstrong static const unsigned int eth_txd0_pins[] = { PIN(GPIOZ_10, EE_OFF) }; 9916ec5ebdSNeil Armstrong static const unsigned int eth_txd1_pins[] = { PIN(GPIOZ_11, EE_OFF) }; 10016ec5ebdSNeil Armstrong static const unsigned int eth_txd2_pins[] = { PIN(GPIOZ_12, EE_OFF) }; 10116ec5ebdSNeil Armstrong static const unsigned int eth_txd3_pins[] = { PIN(GPIOZ_13, EE_OFF) }; 10216ec5ebdSNeil Armstrong 10316ec5ebdSNeil Armstrong static const unsigned int pwm_a_pins[] = { PIN(GPIOX_6, EE_OFF) }; 10416ec5ebdSNeil Armstrong 10516ec5ebdSNeil Armstrong static const unsigned int pwm_b_pins[] = { PIN(GPIODV_29, EE_OFF) }; 10616ec5ebdSNeil Armstrong 10716ec5ebdSNeil Armstrong static const unsigned int pwm_c_pins[] = { PIN(GPIOZ_15, EE_OFF) }; 10816ec5ebdSNeil Armstrong 10916ec5ebdSNeil Armstrong static const unsigned int pwm_d_pins[] = { PIN(GPIODV_28, EE_OFF) }; 11016ec5ebdSNeil Armstrong 11116ec5ebdSNeil Armstrong static const unsigned int pwm_e_pins[] = { PIN(GPIOX_16, EE_OFF) }; 11216ec5ebdSNeil Armstrong 11316ec5ebdSNeil Armstrong static const unsigned int pwm_f_clk_pins[] = { PIN(GPIOCLK_1, EE_OFF) }; 11416ec5ebdSNeil Armstrong static const unsigned int pwm_f_x_pins[] = { PIN(GPIOX_7, EE_OFF) }; 11516ec5ebdSNeil Armstrong 11616ec5ebdSNeil Armstrong static const unsigned int hdmi_hpd_pins[] = { PIN(GPIOH_0, EE_OFF) }; 11716ec5ebdSNeil Armstrong static const unsigned int hdmi_sda_pins[] = { PIN(GPIOH_1, EE_OFF) }; 11816ec5ebdSNeil Armstrong static const unsigned int hdmi_scl_pins[] = { PIN(GPIOH_2, EE_OFF) }; 11916ec5ebdSNeil Armstrong 12016ec5ebdSNeil Armstrong static const unsigned int i2s_am_clk_pins[] = { PIN(GPIOH_6, EE_OFF) }; 12116ec5ebdSNeil Armstrong static const unsigned int i2s_out_ao_clk_pins[] = { PIN(GPIOH_7, EE_OFF) }; 12216ec5ebdSNeil Armstrong static const unsigned int i2s_out_lr_clk_pins[] = { PIN(GPIOH_8, EE_OFF) }; 12316ec5ebdSNeil Armstrong static const unsigned int i2s_out_ch01_pins[] = { PIN(GPIOH_9, EE_OFF) }; 12416ec5ebdSNeil Armstrong static const unsigned int i2s_out_ch23_z_pins[] = { PIN(GPIOZ_5, EE_OFF) }; 12516ec5ebdSNeil Armstrong static const unsigned int i2s_out_ch45_z_pins[] = { PIN(GPIOZ_6, EE_OFF) }; 12616ec5ebdSNeil Armstrong static const unsigned int i2s_out_ch67_z_pins[] = { PIN(GPIOZ_7, EE_OFF) }; 12716ec5ebdSNeil Armstrong 12816ec5ebdSNeil Armstrong static const unsigned int spdif_out_h_pins[] = { PIN(GPIOH_4, EE_OFF) }; 12916ec5ebdSNeil Armstrong 13016ec5ebdSNeil Armstrong static const unsigned int eth_link_led_pins[] = { PIN(GPIOZ_14, EE_OFF) }; 13116ec5ebdSNeil Armstrong static const unsigned int eth_act_led_pins[] = { PIN(GPIOZ_15, EE_OFF) }; 13216ec5ebdSNeil Armstrong 13316ec5ebdSNeil Armstrong static const unsigned int tsin_a_d0_pins[] = { PIN(GPIODV_0, EE_OFF) }; 13416ec5ebdSNeil Armstrong static const unsigned int tsin_a_d0_x_pins[] = { PIN(GPIOX_10, EE_OFF) }; 13516ec5ebdSNeil Armstrong static const unsigned int tsin_a_clk_pins[] = { PIN(GPIODV_8, EE_OFF) }; 13616ec5ebdSNeil Armstrong static const unsigned int tsin_a_clk_x_pins[] = { PIN(GPIOX_11, EE_OFF) }; 13716ec5ebdSNeil Armstrong static const unsigned int tsin_a_sop_pins[] = { PIN(GPIODV_9, EE_OFF) }; 13816ec5ebdSNeil Armstrong static const unsigned int tsin_a_sop_x_pins[] = { PIN(GPIOX_8, EE_OFF) }; 13916ec5ebdSNeil Armstrong static const unsigned int tsin_a_d_valid_pins[] = { PIN(GPIODV_10, EE_OFF) }; 14016ec5ebdSNeil Armstrong static const unsigned int tsin_a_d_valid_x_pins[] = { PIN(GPIOX_9, EE_OFF) }; 14116ec5ebdSNeil Armstrong static const unsigned int tsin_a_fail_pins[] = { PIN(GPIODV_11, EE_OFF) }; 14216ec5ebdSNeil Armstrong static const unsigned int tsin_a_dp_pins[] = { 14316ec5ebdSNeil Armstrong PIN(GPIODV_1, EE_OFF), 14416ec5ebdSNeil Armstrong PIN(GPIODV_2, EE_OFF), 14516ec5ebdSNeil Armstrong PIN(GPIODV_3, EE_OFF), 14616ec5ebdSNeil Armstrong PIN(GPIODV_4, EE_OFF), 14716ec5ebdSNeil Armstrong PIN(GPIODV_5, EE_OFF), 14816ec5ebdSNeil Armstrong PIN(GPIODV_6, EE_OFF), 14916ec5ebdSNeil Armstrong PIN(GPIODV_7, EE_OFF), 15016ec5ebdSNeil Armstrong }; 15116ec5ebdSNeil Armstrong 15216ec5ebdSNeil Armstrong static const unsigned int uart_tx_ao_a_pins[] = { PIN(GPIOAO_0, 0) }; 15316ec5ebdSNeil Armstrong static const unsigned int uart_rx_ao_a_pins[] = { PIN(GPIOAO_1, 0) }; 15416ec5ebdSNeil Armstrong static const unsigned int uart_tx_ao_b_0_pins[] = { PIN(GPIOAO_0, 0) }; 15516ec5ebdSNeil Armstrong static const unsigned int uart_rx_ao_b_1_pins[] = { PIN(GPIOAO_1, 0) }; 15616ec5ebdSNeil Armstrong static const unsigned int uart_cts_ao_a_pins[] = { PIN(GPIOAO_2, 0) }; 15716ec5ebdSNeil Armstrong static const unsigned int uart_rts_ao_a_pins[] = { PIN(GPIOAO_3, 0) }; 15816ec5ebdSNeil Armstrong static const unsigned int uart_tx_ao_b_pins[] = { PIN(GPIOAO_4, 0) }; 15916ec5ebdSNeil Armstrong static const unsigned int uart_rx_ao_b_pins[] = { PIN(GPIOAO_5, 0) }; 16016ec5ebdSNeil Armstrong static const unsigned int uart_cts_ao_b_pins[] = { PIN(GPIOAO_2, 0) }; 16116ec5ebdSNeil Armstrong static const unsigned int uart_rts_ao_b_pins[] = { PIN(GPIOAO_3, 0) }; 16216ec5ebdSNeil Armstrong 16316ec5ebdSNeil Armstrong static const unsigned int i2c_sck_ao_pins[] = {PIN(GPIOAO_4, 0) }; 16416ec5ebdSNeil Armstrong static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) }; 16516ec5ebdSNeil Armstrong static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) }; 16616ec5ebdSNeil Armstrong static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) }; 16716ec5ebdSNeil Armstrong 16816ec5ebdSNeil Armstrong static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) }; 16916ec5ebdSNeil Armstrong 17016ec5ebdSNeil Armstrong static const unsigned int pwm_ao_a_3_pins[] = { PIN(GPIOAO_3, 0) }; 17116ec5ebdSNeil Armstrong static const unsigned int pwm_ao_a_8_pins[] = { PIN(GPIOAO_8, 0) }; 17216ec5ebdSNeil Armstrong 17316ec5ebdSNeil Armstrong static const unsigned int pwm_ao_b_pins[] = { PIN(GPIOAO_9, 0) }; 17416ec5ebdSNeil Armstrong static const unsigned int pwm_ao_b_6_pins[] = { PIN(GPIOAO_6, 0) }; 17516ec5ebdSNeil Armstrong 17616ec5ebdSNeil Armstrong static const unsigned int i2s_out_ch23_ao_pins[] = { PIN(GPIOAO_8, 0) }; 17716ec5ebdSNeil Armstrong static const unsigned int i2s_out_ch45_ao_pins[] = { PIN(GPIOAO_9, 0) }; 17816ec5ebdSNeil Armstrong 17916ec5ebdSNeil Armstrong static const unsigned int spdif_out_ao_6_pins[] = { PIN(GPIOAO_6, 0) }; 18016ec5ebdSNeil Armstrong static const unsigned int spdif_out_ao_9_pins[] = { PIN(GPIOAO_9, 0) }; 18116ec5ebdSNeil Armstrong 18216ec5ebdSNeil Armstrong static const unsigned int ao_cec_pins[] = { PIN(GPIOAO_8, 0) }; 18316ec5ebdSNeil Armstrong static const unsigned int ee_cec_pins[] = { PIN(GPIOAO_8, 0) }; 18416ec5ebdSNeil Armstrong 18516ec5ebdSNeil Armstrong static struct meson_pmx_group meson_gxl_periphs_groups[] = { 18616ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_0, EE_OFF), 18716ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_1, EE_OFF), 18816ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_2, EE_OFF), 18916ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_3, EE_OFF), 19016ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_4, EE_OFF), 19116ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_5, EE_OFF), 19216ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_6, EE_OFF), 19316ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_7, EE_OFF), 19416ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_8, EE_OFF), 19516ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_9, EE_OFF), 19616ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_10, EE_OFF), 19716ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_11, EE_OFF), 19816ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_12, EE_OFF), 19916ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_13, EE_OFF), 20016ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_14, EE_OFF), 20116ec5ebdSNeil Armstrong GPIO_GROUP(GPIOZ_15, EE_OFF), 20216ec5ebdSNeil Armstrong 20316ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_0, EE_OFF), 20416ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_1, EE_OFF), 20516ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_2, EE_OFF), 20616ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_3, EE_OFF), 20716ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_4, EE_OFF), 20816ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_5, EE_OFF), 20916ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_6, EE_OFF), 21016ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_7, EE_OFF), 21116ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_8, EE_OFF), 21216ec5ebdSNeil Armstrong GPIO_GROUP(GPIOH_9, EE_OFF), 21316ec5ebdSNeil Armstrong 21416ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_0, EE_OFF), 21516ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_1, EE_OFF), 21616ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_2, EE_OFF), 21716ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_3, EE_OFF), 21816ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_4, EE_OFF), 21916ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_5, EE_OFF), 22016ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_6, EE_OFF), 22116ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_7, EE_OFF), 22216ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_8, EE_OFF), 22316ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_9, EE_OFF), 22416ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_10, EE_OFF), 22516ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_11, EE_OFF), 22616ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_12, EE_OFF), 22716ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_13, EE_OFF), 22816ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_14, EE_OFF), 22916ec5ebdSNeil Armstrong GPIO_GROUP(BOOT_15, EE_OFF), 23016ec5ebdSNeil Armstrong 23116ec5ebdSNeil Armstrong GPIO_GROUP(CARD_0, EE_OFF), 23216ec5ebdSNeil Armstrong GPIO_GROUP(CARD_1, EE_OFF), 23316ec5ebdSNeil Armstrong GPIO_GROUP(CARD_2, EE_OFF), 23416ec5ebdSNeil Armstrong GPIO_GROUP(CARD_3, EE_OFF), 23516ec5ebdSNeil Armstrong GPIO_GROUP(CARD_4, EE_OFF), 23616ec5ebdSNeil Armstrong GPIO_GROUP(CARD_5, EE_OFF), 23716ec5ebdSNeil Armstrong GPIO_GROUP(CARD_6, EE_OFF), 23816ec5ebdSNeil Armstrong 23916ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_0, EE_OFF), 24016ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_1, EE_OFF), 24116ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_2, EE_OFF), 24216ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_3, EE_OFF), 24316ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_4, EE_OFF), 24416ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_5, EE_OFF), 24516ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_6, EE_OFF), 24616ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_7, EE_OFF), 24716ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_8, EE_OFF), 24816ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_9, EE_OFF), 24916ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_10, EE_OFF), 25016ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_11, EE_OFF), 25116ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_12, EE_OFF), 25216ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_13, EE_OFF), 25316ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_14, EE_OFF), 25416ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_15, EE_OFF), 25516ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_16, EE_OFF), 25616ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_17, EE_OFF), 25716ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_19, EE_OFF), 25816ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_20, EE_OFF), 25916ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_21, EE_OFF), 26016ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_22, EE_OFF), 26116ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_23, EE_OFF), 26216ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_24, EE_OFF), 26316ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_25, EE_OFF), 26416ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_26, EE_OFF), 26516ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_27, EE_OFF), 26616ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_28, EE_OFF), 26716ec5ebdSNeil Armstrong GPIO_GROUP(GPIODV_29, EE_OFF), 26816ec5ebdSNeil Armstrong 26916ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_0, EE_OFF), 27016ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_1, EE_OFF), 27116ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_2, EE_OFF), 27216ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_3, EE_OFF), 27316ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_4, EE_OFF), 27416ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_5, EE_OFF), 27516ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_6, EE_OFF), 27616ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_7, EE_OFF), 27716ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_8, EE_OFF), 27816ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_9, EE_OFF), 27916ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_10, EE_OFF), 28016ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_11, EE_OFF), 28116ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_12, EE_OFF), 28216ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_13, EE_OFF), 28316ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_14, EE_OFF), 28416ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_15, EE_OFF), 28516ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_16, EE_OFF), 28616ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_17, EE_OFF), 28716ec5ebdSNeil Armstrong GPIO_GROUP(GPIOX_18, EE_OFF), 28816ec5ebdSNeil Armstrong 28916ec5ebdSNeil Armstrong GPIO_GROUP(GPIOCLK_0, EE_OFF), 29016ec5ebdSNeil Armstrong GPIO_GROUP(GPIOCLK_1, EE_OFF), 29116ec5ebdSNeil Armstrong 292*42de6522SNeil Armstrong GPIO_GROUP(GPIO_TEST_N, 0), 29316ec5ebdSNeil Armstrong 29416ec5ebdSNeil Armstrong /* Bank X */ 29516ec5ebdSNeil Armstrong GROUP(sdio_d0, 5, 31), 29616ec5ebdSNeil Armstrong GROUP(sdio_d1, 5, 30), 29716ec5ebdSNeil Armstrong GROUP(sdio_d2, 5, 29), 29816ec5ebdSNeil Armstrong GROUP(sdio_d3, 5, 28), 29916ec5ebdSNeil Armstrong GROUP(sdio_clk, 5, 27), 30016ec5ebdSNeil Armstrong GROUP(sdio_cmd, 5, 26), 30116ec5ebdSNeil Armstrong GROUP(sdio_irq, 5, 24), 30216ec5ebdSNeil Armstrong GROUP(uart_tx_a, 5, 19), 30316ec5ebdSNeil Armstrong GROUP(uart_rx_a, 5, 18), 30416ec5ebdSNeil Armstrong GROUP(uart_cts_a, 5, 17), 30516ec5ebdSNeil Armstrong GROUP(uart_rts_a, 5, 16), 30616ec5ebdSNeil Armstrong GROUP(uart_tx_c, 5, 13), 30716ec5ebdSNeil Armstrong GROUP(uart_rx_c, 5, 12), 30816ec5ebdSNeil Armstrong GROUP(uart_cts_c, 5, 11), 30916ec5ebdSNeil Armstrong GROUP(uart_rts_c, 5, 10), 31016ec5ebdSNeil Armstrong GROUP(pwm_a, 5, 25), 31116ec5ebdSNeil Armstrong GROUP(pwm_e, 5, 15), 31216ec5ebdSNeil Armstrong GROUP(pwm_f_x, 5, 14), 31316ec5ebdSNeil Armstrong GROUP(spi_mosi, 5, 3), 31416ec5ebdSNeil Armstrong GROUP(spi_miso, 5, 2), 31516ec5ebdSNeil Armstrong GROUP(spi_ss0, 5, 1), 31616ec5ebdSNeil Armstrong GROUP(spi_sclk, 5, 0), 31716ec5ebdSNeil Armstrong GROUP(tsin_a_sop_x, 6, 3), 31816ec5ebdSNeil Armstrong GROUP(tsin_a_d_valid_x, 6, 2), 31916ec5ebdSNeil Armstrong GROUP(tsin_a_d0_x, 6, 1), 32016ec5ebdSNeil Armstrong GROUP(tsin_a_clk_x, 6, 0), 32116ec5ebdSNeil Armstrong 32216ec5ebdSNeil Armstrong /* Bank Z */ 32316ec5ebdSNeil Armstrong GROUP(eth_mdio, 4, 23), 32416ec5ebdSNeil Armstrong GROUP(eth_mdc, 4, 22), 32516ec5ebdSNeil Armstrong GROUP(eth_clk_rx_clk, 4, 21), 32616ec5ebdSNeil Armstrong GROUP(eth_rx_dv, 4, 20), 32716ec5ebdSNeil Armstrong GROUP(eth_rxd0, 4, 19), 32816ec5ebdSNeil Armstrong GROUP(eth_rxd1, 4, 18), 32916ec5ebdSNeil Armstrong GROUP(eth_rxd2, 4, 17), 33016ec5ebdSNeil Armstrong GROUP(eth_rxd3, 4, 16), 33116ec5ebdSNeil Armstrong GROUP(eth_rgmii_tx_clk, 4, 15), 33216ec5ebdSNeil Armstrong GROUP(eth_tx_en, 4, 14), 33316ec5ebdSNeil Armstrong GROUP(eth_txd0, 4, 13), 33416ec5ebdSNeil Armstrong GROUP(eth_txd1, 4, 12), 33516ec5ebdSNeil Armstrong GROUP(eth_txd2, 4, 11), 33616ec5ebdSNeil Armstrong GROUP(eth_txd3, 4, 10), 33716ec5ebdSNeil Armstrong GROUP(pwm_c, 3, 20), 33816ec5ebdSNeil Armstrong GROUP(i2s_out_ch23_z, 3, 26), 33916ec5ebdSNeil Armstrong GROUP(i2s_out_ch45_z, 3, 25), 34016ec5ebdSNeil Armstrong GROUP(i2s_out_ch67_z, 3, 24), 34116ec5ebdSNeil Armstrong GROUP(eth_link_led, 4, 25), 34216ec5ebdSNeil Armstrong GROUP(eth_act_led, 4, 24), 34316ec5ebdSNeil Armstrong 34416ec5ebdSNeil Armstrong /* Bank H */ 34516ec5ebdSNeil Armstrong GROUP(hdmi_hpd, 6, 31), 34616ec5ebdSNeil Armstrong GROUP(hdmi_sda, 6, 30), 34716ec5ebdSNeil Armstrong GROUP(hdmi_scl, 6, 29), 34816ec5ebdSNeil Armstrong GROUP(i2s_am_clk, 6, 26), 34916ec5ebdSNeil Armstrong GROUP(i2s_out_ao_clk, 6, 25), 35016ec5ebdSNeil Armstrong GROUP(i2s_out_lr_clk, 6, 24), 35116ec5ebdSNeil Armstrong GROUP(i2s_out_ch01, 6, 23), 35216ec5ebdSNeil Armstrong GROUP(spdif_out_h, 6, 28), 35316ec5ebdSNeil Armstrong 35416ec5ebdSNeil Armstrong /* Bank DV */ 35516ec5ebdSNeil Armstrong GROUP(uart_tx_b, 2, 16), 35616ec5ebdSNeil Armstrong GROUP(uart_rx_b, 2, 15), 35716ec5ebdSNeil Armstrong GROUP(uart_cts_b, 2, 14), 35816ec5ebdSNeil Armstrong GROUP(uart_rts_b, 2, 13), 35916ec5ebdSNeil Armstrong GROUP(i2c_sda_c_dv18, 1, 17), 36016ec5ebdSNeil Armstrong GROUP(i2c_sck_c_dv19, 1, 16), 36116ec5ebdSNeil Armstrong GROUP(i2c_sda_a, 1, 15), 36216ec5ebdSNeil Armstrong GROUP(i2c_sck_a, 1, 14), 36316ec5ebdSNeil Armstrong GROUP(i2c_sda_b, 1, 13), 36416ec5ebdSNeil Armstrong GROUP(i2c_sck_b, 1, 12), 36516ec5ebdSNeil Armstrong GROUP(i2c_sda_c, 1, 11), 36616ec5ebdSNeil Armstrong GROUP(i2c_sck_c, 1, 10), 36716ec5ebdSNeil Armstrong GROUP(pwm_b, 2, 11), 36816ec5ebdSNeil Armstrong GROUP(pwm_d, 2, 12), 36916ec5ebdSNeil Armstrong GROUP(tsin_a_d0, 2, 4), 37016ec5ebdSNeil Armstrong GROUP(tsin_a_dp, 2, 3), 37116ec5ebdSNeil Armstrong GROUP(tsin_a_clk, 2, 2), 37216ec5ebdSNeil Armstrong GROUP(tsin_a_sop, 2, 1), 37316ec5ebdSNeil Armstrong GROUP(tsin_a_d_valid, 2, 0), 37416ec5ebdSNeil Armstrong GROUP(tsin_a_fail, 1, 31), 37516ec5ebdSNeil Armstrong 37616ec5ebdSNeil Armstrong /* Bank BOOT */ 37716ec5ebdSNeil Armstrong GROUP(emmc_nand_d07, 7, 31), 37816ec5ebdSNeil Armstrong GROUP(emmc_clk, 7, 30), 37916ec5ebdSNeil Armstrong GROUP(emmc_cmd, 7, 29), 38016ec5ebdSNeil Armstrong GROUP(emmc_ds, 7, 28), 38116ec5ebdSNeil Armstrong GROUP(nor_d, 7, 13), 38216ec5ebdSNeil Armstrong GROUP(nor_q, 7, 12), 38316ec5ebdSNeil Armstrong GROUP(nor_c, 7, 11), 38416ec5ebdSNeil Armstrong GROUP(nor_cs, 7, 10), 38516ec5ebdSNeil Armstrong GROUP(nand_ce0, 7, 7), 38616ec5ebdSNeil Armstrong GROUP(nand_ce1, 7, 6), 38716ec5ebdSNeil Armstrong GROUP(nand_rb0, 7, 5), 38816ec5ebdSNeil Armstrong GROUP(nand_ale, 7, 4), 38916ec5ebdSNeil Armstrong GROUP(nand_cle, 7, 3), 39016ec5ebdSNeil Armstrong GROUP(nand_wen_clk, 7, 2), 39116ec5ebdSNeil Armstrong GROUP(nand_ren_wr, 7, 1), 39216ec5ebdSNeil Armstrong GROUP(nand_dqs, 7, 0), 39316ec5ebdSNeil Armstrong 39416ec5ebdSNeil Armstrong /* Bank CARD */ 39516ec5ebdSNeil Armstrong GROUP(sdcard_d1, 6, 5), 39616ec5ebdSNeil Armstrong GROUP(sdcard_d0, 6, 4), 39716ec5ebdSNeil Armstrong GROUP(sdcard_d3, 6, 1), 39816ec5ebdSNeil Armstrong GROUP(sdcard_d2, 6, 0), 39916ec5ebdSNeil Armstrong GROUP(sdcard_cmd, 6, 2), 40016ec5ebdSNeil Armstrong GROUP(sdcard_clk, 6, 3), 40116ec5ebdSNeil Armstrong 40216ec5ebdSNeil Armstrong /* Bank CLK */ 40316ec5ebdSNeil Armstrong GROUP(pwm_f_clk, 8, 30), 40416ec5ebdSNeil Armstrong }; 40516ec5ebdSNeil Armstrong 40616ec5ebdSNeil Armstrong static struct meson_pmx_group meson_gxl_aobus_groups[] = { 40716ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_0, 0), 40816ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_1, 0), 40916ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_2, 0), 41016ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_3, 0), 41116ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_4, 0), 41216ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_5, 0), 41316ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_6, 0), 41416ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_7, 0), 41516ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_8, 0), 41616ec5ebdSNeil Armstrong GPIO_GROUP(GPIOAO_9, 0), 41716ec5ebdSNeil Armstrong 41816ec5ebdSNeil Armstrong /* bank AO */ 41916ec5ebdSNeil Armstrong GROUP(uart_tx_ao_b_0, 0, 26), 42016ec5ebdSNeil Armstrong GROUP(uart_rx_ao_b_1, 0, 25), 42116ec5ebdSNeil Armstrong GROUP(uart_tx_ao_b, 0, 24), 42216ec5ebdSNeil Armstrong GROUP(uart_rx_ao_b, 0, 23), 42316ec5ebdSNeil Armstrong GROUP(uart_tx_ao_a, 0, 12), 42416ec5ebdSNeil Armstrong GROUP(uart_rx_ao_a, 0, 11), 42516ec5ebdSNeil Armstrong GROUP(uart_cts_ao_a, 0, 10), 42616ec5ebdSNeil Armstrong GROUP(uart_rts_ao_a, 0, 9), 42716ec5ebdSNeil Armstrong GROUP(uart_cts_ao_b, 0, 8), 42816ec5ebdSNeil Armstrong GROUP(uart_rts_ao_b, 0, 7), 42916ec5ebdSNeil Armstrong GROUP(i2c_sck_ao, 0, 6), 43016ec5ebdSNeil Armstrong GROUP(i2c_sda_ao, 0, 5), 43116ec5ebdSNeil Armstrong GROUP(i2c_slave_sck_ao, 0, 2), 43216ec5ebdSNeil Armstrong GROUP(i2c_slave_sda_ao, 0, 1), 43316ec5ebdSNeil Armstrong GROUP(remote_input_ao, 0, 0), 43416ec5ebdSNeil Armstrong GROUP(pwm_ao_a_3, 0, 22), 43516ec5ebdSNeil Armstrong GROUP(pwm_ao_b_6, 0, 18), 43616ec5ebdSNeil Armstrong GROUP(pwm_ao_a_8, 0, 17), 43716ec5ebdSNeil Armstrong GROUP(pwm_ao_b, 0, 3), 43816ec5ebdSNeil Armstrong GROUP(i2s_out_ch23_ao, 1, 0), 43916ec5ebdSNeil Armstrong GROUP(i2s_out_ch45_ao, 1, 1), 44016ec5ebdSNeil Armstrong GROUP(spdif_out_ao_6, 0, 16), 44116ec5ebdSNeil Armstrong GROUP(spdif_out_ao_9, 0, 4), 44216ec5ebdSNeil Armstrong GROUP(ao_cec, 0, 15), 44316ec5ebdSNeil Armstrong GROUP(ee_cec, 0, 14), 44416ec5ebdSNeil Armstrong }; 44516ec5ebdSNeil Armstrong 44616ec5ebdSNeil Armstrong static const char * const gpio_periphs_groups[] = { 44716ec5ebdSNeil Armstrong "GPIOZ_0", "GPIOZ_1", "GPIOZ_2", "GPIOZ_3", "GPIOZ_4", 44816ec5ebdSNeil Armstrong "GPIOZ_5", "GPIOZ_6", "GPIOZ_7", "GPIOZ_8", "GPIOZ_9", 44916ec5ebdSNeil Armstrong "GPIOZ_10", "GPIOZ_11", "GPIOZ_12", "GPIOZ_13", "GPIOZ_14", 45016ec5ebdSNeil Armstrong "GPIOZ_15", 45116ec5ebdSNeil Armstrong 45216ec5ebdSNeil Armstrong "GPIOH_0", "GPIOH_1", "GPIOH_2", "GPIOH_3", "GPIOH_4", 45316ec5ebdSNeil Armstrong "GPIOH_5", "GPIOH_6", "GPIOH_7", "GPIOH_8", "GPIOH_9", 45416ec5ebdSNeil Armstrong 45516ec5ebdSNeil Armstrong "BOOT_0", "BOOT_1", "BOOT_2", "BOOT_3", "BOOT_4", 45616ec5ebdSNeil Armstrong "BOOT_5", "BOOT_6", "BOOT_7", "BOOT_8", "BOOT_9", 45716ec5ebdSNeil Armstrong "BOOT_10", "BOOT_11", "BOOT_12", "BOOT_13", "BOOT_14", 45816ec5ebdSNeil Armstrong "BOOT_15", 45916ec5ebdSNeil Armstrong 46016ec5ebdSNeil Armstrong "CARD_0", "CARD_1", "CARD_2", "CARD_3", "CARD_4", 46116ec5ebdSNeil Armstrong "CARD_5", "CARD_6", 46216ec5ebdSNeil Armstrong 46316ec5ebdSNeil Armstrong "GPIODV_0", "GPIODV_1", "GPIODV_2", "GPIODV_3", "GPIODV_4", 46416ec5ebdSNeil Armstrong "GPIODV_5", "GPIODV_6", "GPIODV_7", "GPIODV_8", "GPIODV_9", 46516ec5ebdSNeil Armstrong "GPIODV_10", "GPIODV_11", "GPIODV_12", "GPIODV_13", "GPIODV_14", 46616ec5ebdSNeil Armstrong "GPIODV_15", "GPIODV_16", "GPIODV_17", "GPIODV_18", "GPIODV_19", 46716ec5ebdSNeil Armstrong "GPIODV_20", "GPIODV_21", "GPIODV_22", "GPIODV_23", "GPIODV_24", 46816ec5ebdSNeil Armstrong "GPIODV_25", "GPIODV_26", "GPIODV_27", "GPIODV_28", "GPIODV_29", 46916ec5ebdSNeil Armstrong 47016ec5ebdSNeil Armstrong "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4", 47116ec5ebdSNeil Armstrong "GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9", 47216ec5ebdSNeil Armstrong "GPIOX_10", "GPIOX_11", "GPIOX_12", "GPIOX_13", "GPIOX_14", 47316ec5ebdSNeil Armstrong "GPIOX_15", "GPIOX_16", "GPIOX_17", "GPIOX_18", 47416ec5ebdSNeil Armstrong }; 47516ec5ebdSNeil Armstrong 47616ec5ebdSNeil Armstrong static const char * const emmc_groups[] = { 47716ec5ebdSNeil Armstrong "emmc_nand_d07", "emmc_clk", "emmc_cmd", "emmc_ds", 47816ec5ebdSNeil Armstrong }; 47916ec5ebdSNeil Armstrong 48016ec5ebdSNeil Armstrong static const char * const nor_groups[] = { 48116ec5ebdSNeil Armstrong "nor_d", "nor_q", "nor_c", "nor_cs", 48216ec5ebdSNeil Armstrong }; 48316ec5ebdSNeil Armstrong 48416ec5ebdSNeil Armstrong static const char * const spi_groups[] = { 48516ec5ebdSNeil Armstrong "spi_mosi", "spi_miso", "spi_ss0", "spi_sclk", 48616ec5ebdSNeil Armstrong }; 48716ec5ebdSNeil Armstrong 48816ec5ebdSNeil Armstrong static const char * const sdcard_groups[] = { 48916ec5ebdSNeil Armstrong "sdcard_d0", "sdcard_d1", "sdcard_d2", "sdcard_d3", 49016ec5ebdSNeil Armstrong "sdcard_cmd", "sdcard_clk", 49116ec5ebdSNeil Armstrong }; 49216ec5ebdSNeil Armstrong 49316ec5ebdSNeil Armstrong static const char * const sdio_groups[] = { 49416ec5ebdSNeil Armstrong "sdio_d0", "sdio_d1", "sdio_d2", "sdio_d3", 49516ec5ebdSNeil Armstrong "sdio_cmd", "sdio_clk", "sdio_irq", 49616ec5ebdSNeil Armstrong }; 49716ec5ebdSNeil Armstrong 49816ec5ebdSNeil Armstrong static const char * const nand_groups[] = { 49916ec5ebdSNeil Armstrong "nand_ce0", "nand_ce1", "nand_rb0", "nand_ale", "nand_cle", 50016ec5ebdSNeil Armstrong "nand_wen_clk", "nand_ren_wr", "nand_dqs", 50116ec5ebdSNeil Armstrong }; 50216ec5ebdSNeil Armstrong 50316ec5ebdSNeil Armstrong static const char * const uart_a_groups[] = { 50416ec5ebdSNeil Armstrong "uart_tx_a", "uart_rx_a", "uart_cts_a", "uart_rts_a", 50516ec5ebdSNeil Armstrong }; 50616ec5ebdSNeil Armstrong 50716ec5ebdSNeil Armstrong static const char * const uart_b_groups[] = { 50816ec5ebdSNeil Armstrong "uart_tx_b", "uart_rx_b", "uart_cts_b", "uart_rts_b", 50916ec5ebdSNeil Armstrong }; 51016ec5ebdSNeil Armstrong 51116ec5ebdSNeil Armstrong static const char * const uart_c_groups[] = { 51216ec5ebdSNeil Armstrong "uart_tx_c", "uart_rx_c", "uart_cts_c", "uart_rts_c", 51316ec5ebdSNeil Armstrong }; 51416ec5ebdSNeil Armstrong 51516ec5ebdSNeil Armstrong static const char * const i2c_a_groups[] = { 51616ec5ebdSNeil Armstrong "i2c_sck_a", "i2c_sda_a", 51716ec5ebdSNeil Armstrong }; 51816ec5ebdSNeil Armstrong 51916ec5ebdSNeil Armstrong static const char * const i2c_b_groups[] = { 52016ec5ebdSNeil Armstrong "i2c_sck_b", "i2c_sda_b", 52116ec5ebdSNeil Armstrong }; 52216ec5ebdSNeil Armstrong 52316ec5ebdSNeil Armstrong static const char * const i2c_c_groups[] = { 52416ec5ebdSNeil Armstrong "i2c_sck_c", "i2c_sda_c", "i2c_sda_c_dv18", "i2c_sck_c_dv19", 52516ec5ebdSNeil Armstrong }; 52616ec5ebdSNeil Armstrong 52716ec5ebdSNeil Armstrong static const char * const eth_groups[] = { 52816ec5ebdSNeil Armstrong "eth_mdio", "eth_mdc", "eth_clk_rx_clk", "eth_rx_dv", 52916ec5ebdSNeil Armstrong "eth_rxd0", "eth_rxd1", "eth_rxd2", "eth_rxd3", 53016ec5ebdSNeil Armstrong "eth_rgmii_tx_clk", "eth_tx_en", 53116ec5ebdSNeil Armstrong "eth_txd0", "eth_txd1", "eth_txd2", "eth_txd3", 53216ec5ebdSNeil Armstrong }; 53316ec5ebdSNeil Armstrong 53416ec5ebdSNeil Armstrong static const char * const pwm_a_groups[] = { 53516ec5ebdSNeil Armstrong "pwm_a", 53616ec5ebdSNeil Armstrong }; 53716ec5ebdSNeil Armstrong 53816ec5ebdSNeil Armstrong static const char * const pwm_b_groups[] = { 53916ec5ebdSNeil Armstrong "pwm_b", 54016ec5ebdSNeil Armstrong }; 54116ec5ebdSNeil Armstrong 54216ec5ebdSNeil Armstrong static const char * const pwm_c_groups[] = { 54316ec5ebdSNeil Armstrong "pwm_c", 54416ec5ebdSNeil Armstrong }; 54516ec5ebdSNeil Armstrong 54616ec5ebdSNeil Armstrong static const char * const pwm_d_groups[] = { 54716ec5ebdSNeil Armstrong "pwm_d", 54816ec5ebdSNeil Armstrong }; 54916ec5ebdSNeil Armstrong 55016ec5ebdSNeil Armstrong static const char * const pwm_e_groups[] = { 55116ec5ebdSNeil Armstrong "pwm_e", 55216ec5ebdSNeil Armstrong }; 55316ec5ebdSNeil Armstrong 55416ec5ebdSNeil Armstrong static const char * const pwm_f_groups[] = { 55516ec5ebdSNeil Armstrong "pwm_f_clk", "pwm_f_x", 55616ec5ebdSNeil Armstrong }; 55716ec5ebdSNeil Armstrong 55816ec5ebdSNeil Armstrong static const char * const hdmi_hpd_groups[] = { 55916ec5ebdSNeil Armstrong "hdmi_hpd", 56016ec5ebdSNeil Armstrong }; 56116ec5ebdSNeil Armstrong 56216ec5ebdSNeil Armstrong static const char * const hdmi_i2c_groups[] = { 56316ec5ebdSNeil Armstrong "hdmi_sda", "hdmi_scl", 56416ec5ebdSNeil Armstrong }; 56516ec5ebdSNeil Armstrong 56616ec5ebdSNeil Armstrong static const char * const i2s_out_groups[] = { 56716ec5ebdSNeil Armstrong "i2s_am_clk", "i2s_out_ao_clk", "i2s_out_lr_clk", 56816ec5ebdSNeil Armstrong "i2s_out_ch01", "i2s_out_ch23_z", "i2s_out_ch45_z", "i2s_out_ch67_z", 56916ec5ebdSNeil Armstrong }; 57016ec5ebdSNeil Armstrong 57116ec5ebdSNeil Armstrong static const char * const spdif_out_groups[] = { 57216ec5ebdSNeil Armstrong "spdif_out_h", 57316ec5ebdSNeil Armstrong }; 57416ec5ebdSNeil Armstrong 57516ec5ebdSNeil Armstrong static const char * const eth_led_groups[] = { 57616ec5ebdSNeil Armstrong "eth_link_led", "eth_act_led", 57716ec5ebdSNeil Armstrong }; 57816ec5ebdSNeil Armstrong 57916ec5ebdSNeil Armstrong static const char * const tsin_a_groups[] = { 58016ec5ebdSNeil Armstrong "tsin_a_clk", "tsin_a_clk_x", "tsin_a_sop", "tsin_a_sop_x", 58116ec5ebdSNeil Armstrong "tsin_a_d_valid", "tsin_a_d_valid_x", "tsin_a_d0", "tsin_a_d0_x", 58216ec5ebdSNeil Armstrong "tsin_a_dp", "tsin_a_fail", 58316ec5ebdSNeil Armstrong }; 58416ec5ebdSNeil Armstrong 58516ec5ebdSNeil Armstrong static const char * const gpio_aobus_groups[] = { 58616ec5ebdSNeil Armstrong "GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4", 58716ec5ebdSNeil Armstrong "GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9", 588*42de6522SNeil Armstrong 589*42de6522SNeil Armstrong "GPIO_TEST_N", 59016ec5ebdSNeil Armstrong }; 59116ec5ebdSNeil Armstrong 59216ec5ebdSNeil Armstrong static const char * const uart_ao_groups[] = { 59316ec5ebdSNeil Armstrong "uart_tx_ao_a", "uart_rx_ao_a", "uart_cts_ao_a", "uart_rts_ao_a", 59416ec5ebdSNeil Armstrong }; 59516ec5ebdSNeil Armstrong 59616ec5ebdSNeil Armstrong static const char * const uart_ao_b_groups[] = { 59716ec5ebdSNeil Armstrong "uart_tx_ao_b", "uart_rx_ao_b", "uart_cts_ao_b", "uart_rts_ao_b", 59816ec5ebdSNeil Armstrong "uart_tx_ao_b_0", "uart_rx_ao_b_1", 59916ec5ebdSNeil Armstrong }; 60016ec5ebdSNeil Armstrong 60116ec5ebdSNeil Armstrong static const char * const i2c_ao_groups[] = { 60216ec5ebdSNeil Armstrong "i2c_sck_ao", "i2c_sda_ao", 60316ec5ebdSNeil Armstrong }; 60416ec5ebdSNeil Armstrong 60516ec5ebdSNeil Armstrong static const char * const i2c_slave_ao_groups[] = { 60616ec5ebdSNeil Armstrong "i2c_slave_sck_ao", "i2c_slave_sda_ao", 60716ec5ebdSNeil Armstrong }; 60816ec5ebdSNeil Armstrong 60916ec5ebdSNeil Armstrong static const char * const remote_input_ao_groups[] = { 61016ec5ebdSNeil Armstrong "remote_input_ao", 61116ec5ebdSNeil Armstrong }; 61216ec5ebdSNeil Armstrong 61316ec5ebdSNeil Armstrong static const char * const pwm_ao_a_groups[] = { 61416ec5ebdSNeil Armstrong "pwm_ao_a_3", "pwm_ao_a_8", 61516ec5ebdSNeil Armstrong }; 61616ec5ebdSNeil Armstrong 61716ec5ebdSNeil Armstrong static const char * const pwm_ao_b_groups[] = { 61816ec5ebdSNeil Armstrong "pwm_ao_b", "pwm_ao_b_6", 61916ec5ebdSNeil Armstrong }; 62016ec5ebdSNeil Armstrong 62116ec5ebdSNeil Armstrong static const char * const i2s_out_ao_groups[] = { 62216ec5ebdSNeil Armstrong "i2s_out_ch23_ao", "i2s_out_ch45_ao", 62316ec5ebdSNeil Armstrong }; 62416ec5ebdSNeil Armstrong 62516ec5ebdSNeil Armstrong static const char * const spdif_out_ao_groups[] = { 62616ec5ebdSNeil Armstrong "spdif_out_ao_6", "spdif_out_ao_9", 62716ec5ebdSNeil Armstrong }; 62816ec5ebdSNeil Armstrong 62916ec5ebdSNeil Armstrong static const char * const cec_ao_groups[] = { 63016ec5ebdSNeil Armstrong "ao_cec", "ee_cec", 63116ec5ebdSNeil Armstrong }; 63216ec5ebdSNeil Armstrong 63316ec5ebdSNeil Armstrong static struct meson_pmx_func meson_gxl_periphs_functions[] = { 63416ec5ebdSNeil Armstrong FUNCTION(gpio_periphs), 63516ec5ebdSNeil Armstrong FUNCTION(emmc), 63616ec5ebdSNeil Armstrong FUNCTION(nor), 63716ec5ebdSNeil Armstrong FUNCTION(spi), 63816ec5ebdSNeil Armstrong FUNCTION(sdcard), 63916ec5ebdSNeil Armstrong FUNCTION(sdio), 64016ec5ebdSNeil Armstrong FUNCTION(nand), 64116ec5ebdSNeil Armstrong FUNCTION(uart_a), 64216ec5ebdSNeil Armstrong FUNCTION(uart_b), 64316ec5ebdSNeil Armstrong FUNCTION(uart_c), 64416ec5ebdSNeil Armstrong FUNCTION(i2c_a), 64516ec5ebdSNeil Armstrong FUNCTION(i2c_b), 64616ec5ebdSNeil Armstrong FUNCTION(i2c_c), 64716ec5ebdSNeil Armstrong FUNCTION(eth), 64816ec5ebdSNeil Armstrong FUNCTION(pwm_a), 64916ec5ebdSNeil Armstrong FUNCTION(pwm_b), 65016ec5ebdSNeil Armstrong FUNCTION(pwm_c), 65116ec5ebdSNeil Armstrong FUNCTION(pwm_d), 65216ec5ebdSNeil Armstrong FUNCTION(pwm_e), 65316ec5ebdSNeil Armstrong FUNCTION(pwm_f), 65416ec5ebdSNeil Armstrong FUNCTION(hdmi_hpd), 65516ec5ebdSNeil Armstrong FUNCTION(hdmi_i2c), 65616ec5ebdSNeil Armstrong FUNCTION(i2s_out), 65716ec5ebdSNeil Armstrong FUNCTION(spdif_out), 65816ec5ebdSNeil Armstrong FUNCTION(eth_led), 65916ec5ebdSNeil Armstrong FUNCTION(tsin_a), 66016ec5ebdSNeil Armstrong }; 66116ec5ebdSNeil Armstrong 66216ec5ebdSNeil Armstrong static struct meson_pmx_func meson_gxl_aobus_functions[] = { 66316ec5ebdSNeil Armstrong FUNCTION(gpio_aobus), 66416ec5ebdSNeil Armstrong FUNCTION(uart_ao), 66516ec5ebdSNeil Armstrong FUNCTION(uart_ao_b), 66616ec5ebdSNeil Armstrong FUNCTION(i2c_ao), 66716ec5ebdSNeil Armstrong FUNCTION(i2c_slave_ao), 66816ec5ebdSNeil Armstrong FUNCTION(remote_input_ao), 66916ec5ebdSNeil Armstrong FUNCTION(pwm_ao_a), 67016ec5ebdSNeil Armstrong FUNCTION(pwm_ao_b), 67116ec5ebdSNeil Armstrong FUNCTION(i2s_out_ao), 67216ec5ebdSNeil Armstrong FUNCTION(spdif_out_ao), 67316ec5ebdSNeil Armstrong FUNCTION(cec_ao), 67416ec5ebdSNeil Armstrong }; 67516ec5ebdSNeil Armstrong 67616ec5ebdSNeil Armstrong static struct meson_bank meson_gxl_periphs_banks[] = { 67716ec5ebdSNeil Armstrong /* name first last pullen pull dir out in */ 67816ec5ebdSNeil Armstrong BANK("X", PIN(GPIOX_0, EE_OFF), PIN(GPIOX_18, EE_OFF), 4, 0, 4, 0, 12, 0, 13, 0, 14, 0), 67916ec5ebdSNeil Armstrong BANK("DV", PIN(GPIODV_0, EE_OFF), PIN(GPIODV_29, EE_OFF), 0, 0, 0, 0, 0, 0, 1, 0, 2, 0), 68016ec5ebdSNeil Armstrong BANK("H", PIN(GPIOH_0, EE_OFF), PIN(GPIOH_9, EE_OFF), 1, 20, 1, 20, 3, 20, 4, 20, 5, 20), 68116ec5ebdSNeil Armstrong BANK("Z", PIN(GPIOZ_0, EE_OFF), PIN(GPIOZ_15, EE_OFF), 3, 0, 3, 0, 9, 0, 10, 0, 11, 0), 68216ec5ebdSNeil Armstrong BANK("CARD", PIN(CARD_0, EE_OFF), PIN(CARD_6, EE_OFF), 2, 20, 2, 20, 6, 20, 7, 20, 8, 20), 68316ec5ebdSNeil Armstrong BANK("BOOT", PIN(BOOT_0, EE_OFF), PIN(BOOT_15, EE_OFF), 2, 0, 2, 0, 6, 0, 7, 0, 8, 0), 68416ec5ebdSNeil Armstrong BANK("CLK", PIN(GPIOCLK_0, EE_OFF), PIN(GPIOCLK_1, EE_OFF), 3, 28, 3, 28, 9, 28, 10, 28, 11, 28), 68516ec5ebdSNeil Armstrong }; 68616ec5ebdSNeil Armstrong 68716ec5ebdSNeil Armstrong static struct meson_bank meson_gxl_aobus_banks[] = { 68816ec5ebdSNeil Armstrong /* name first last pullen pull dir out in */ 68916ec5ebdSNeil Armstrong BANK("AO", PIN(GPIOAO_0, 0), PIN(GPIOAO_9, 0), 0, 0, 0, 16, 0, 0, 0, 16, 1, 0), 69016ec5ebdSNeil Armstrong }; 69116ec5ebdSNeil Armstrong 69216ec5ebdSNeil Armstrong struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data = { 69316ec5ebdSNeil Armstrong .name = "periphs-banks", 694*42de6522SNeil Armstrong .pin_base = 11, 69516ec5ebdSNeil Armstrong .groups = meson_gxl_periphs_groups, 69616ec5ebdSNeil Armstrong .funcs = meson_gxl_periphs_functions, 69716ec5ebdSNeil Armstrong .banks = meson_gxl_periphs_banks, 698*42de6522SNeil Armstrong .num_pins = 100, 69916ec5ebdSNeil Armstrong .num_groups = ARRAY_SIZE(meson_gxl_periphs_groups), 70016ec5ebdSNeil Armstrong .num_funcs = ARRAY_SIZE(meson_gxl_periphs_functions), 70116ec5ebdSNeil Armstrong .num_banks = ARRAY_SIZE(meson_gxl_periphs_banks), 70216ec5ebdSNeil Armstrong }; 70316ec5ebdSNeil Armstrong 70416ec5ebdSNeil Armstrong struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data = { 70516ec5ebdSNeil Armstrong .name = "aobus-banks", 70616ec5ebdSNeil Armstrong .pin_base = 0, 70716ec5ebdSNeil Armstrong .groups = meson_gxl_aobus_groups, 70816ec5ebdSNeil Armstrong .funcs = meson_gxl_aobus_functions, 70916ec5ebdSNeil Armstrong .banks = meson_gxl_aobus_banks, 710*42de6522SNeil Armstrong .num_pins = 11, 71116ec5ebdSNeil Armstrong .num_groups = ARRAY_SIZE(meson_gxl_aobus_groups), 71216ec5ebdSNeil Armstrong .num_funcs = ARRAY_SIZE(meson_gxl_aobus_functions), 71316ec5ebdSNeil Armstrong .num_banks = ARRAY_SIZE(meson_gxl_aobus_banks), 71416ec5ebdSNeil Armstrong }; 71516ec5ebdSNeil Armstrong 71616ec5ebdSNeil Armstrong static const struct udevice_id meson_gxl_pinctrl_match[] = { 71716ec5ebdSNeil Armstrong { 71816ec5ebdSNeil Armstrong .compatible = "amlogic,meson-gxl-periphs-pinctrl", 71916ec5ebdSNeil Armstrong .data = (ulong)&meson_gxl_periphs_pinctrl_data, 72016ec5ebdSNeil Armstrong }, 72116ec5ebdSNeil Armstrong { 72216ec5ebdSNeil Armstrong .compatible = "amlogic,meson-gxl-aobus-pinctrl", 72316ec5ebdSNeil Armstrong .data = (ulong)&meson_gxl_aobus_pinctrl_data, 72416ec5ebdSNeil Armstrong }, 72516ec5ebdSNeil Armstrong { /* sentinel */ } 72616ec5ebdSNeil Armstrong }; 72716ec5ebdSNeil Armstrong 72816ec5ebdSNeil Armstrong U_BOOT_DRIVER(meson_gxl_pinctrl) = { 72916ec5ebdSNeil Armstrong .name = "meson-gxl-pinctrl", 73016ec5ebdSNeil Armstrong .id = UCLASS_PINCTRL, 73116ec5ebdSNeil Armstrong .of_match = of_match_ptr(meson_gxl_pinctrl_match), 73216ec5ebdSNeil Armstrong .probe = meson_pinctrl_probe, 73316ec5ebdSNeil Armstrong .priv_auto_alloc_size = sizeof(struct meson_pinctrl), 73416ec5ebdSNeil Armstrong .ops = &meson_pinctrl_ops, 73516ec5ebdSNeil Armstrong }; 736