10f15f500SNeil Armstrong /* 20f15f500SNeil Armstrong * Pin controller and GPIO driver for Amlogic Meson GXL. 30f15f500SNeil Armstrong * 40f15f500SNeil Armstrong * Copyright (C) 2016 Endless Mobile, Inc. 50f15f500SNeil Armstrong * Author: Carlo Caione <carlo@endlessm.com> 60f15f500SNeil Armstrong * 70f15f500SNeil Armstrong * This program is free software; you can redistribute it and/or 80f15f500SNeil Armstrong * modify it under the terms of the GNU General Public License 90f15f500SNeil Armstrong * version 2 as published by the Free Software Foundation. 100f15f500SNeil Armstrong * 110f15f500SNeil Armstrong * You should have received a copy of the GNU General Public License 120f15f500SNeil Armstrong * along with this program. If not, see <http://www.gnu.org/licenses/>. 130f15f500SNeil Armstrong */ 140f15f500SNeil Armstrong 150f15f500SNeil Armstrong #include <dt-bindings/gpio/meson-gxl-gpio.h> 160f15f500SNeil Armstrong #include "pinctrl-meson.h" 170f15f500SNeil Armstrong 180f15f500SNeil Armstrong #define EE_OFF 10 190f15f500SNeil Armstrong 200f15f500SNeil Armstrong static const struct pinctrl_pin_desc meson_gxl_periphs_pins[] = { 210f15f500SNeil Armstrong MESON_PIN(GPIOZ_0, EE_OFF), 220f15f500SNeil Armstrong MESON_PIN(GPIOZ_1, EE_OFF), 230f15f500SNeil Armstrong MESON_PIN(GPIOZ_2, EE_OFF), 240f15f500SNeil Armstrong MESON_PIN(GPIOZ_3, EE_OFF), 250f15f500SNeil Armstrong MESON_PIN(GPIOZ_4, EE_OFF), 260f15f500SNeil Armstrong MESON_PIN(GPIOZ_5, EE_OFF), 270f15f500SNeil Armstrong MESON_PIN(GPIOZ_6, EE_OFF), 280f15f500SNeil Armstrong MESON_PIN(GPIOZ_7, EE_OFF), 290f15f500SNeil Armstrong MESON_PIN(GPIOZ_8, EE_OFF), 300f15f500SNeil Armstrong MESON_PIN(GPIOZ_9, EE_OFF), 310f15f500SNeil Armstrong MESON_PIN(GPIOZ_10, EE_OFF), 320f15f500SNeil Armstrong MESON_PIN(GPIOZ_11, EE_OFF), 330f15f500SNeil Armstrong MESON_PIN(GPIOZ_12, EE_OFF), 340f15f500SNeil Armstrong MESON_PIN(GPIOZ_13, EE_OFF), 350f15f500SNeil Armstrong MESON_PIN(GPIOZ_14, EE_OFF), 360f15f500SNeil Armstrong MESON_PIN(GPIOZ_15, EE_OFF), 370f15f500SNeil Armstrong 380f15f500SNeil Armstrong MESON_PIN(GPIOH_0, EE_OFF), 390f15f500SNeil Armstrong MESON_PIN(GPIOH_1, EE_OFF), 400f15f500SNeil Armstrong MESON_PIN(GPIOH_2, EE_OFF), 410f15f500SNeil Armstrong MESON_PIN(GPIOH_3, EE_OFF), 420f15f500SNeil Armstrong MESON_PIN(GPIOH_4, EE_OFF), 430f15f500SNeil Armstrong MESON_PIN(GPIOH_5, EE_OFF), 440f15f500SNeil Armstrong MESON_PIN(GPIOH_6, EE_OFF), 450f15f500SNeil Armstrong MESON_PIN(GPIOH_7, EE_OFF), 460f15f500SNeil Armstrong MESON_PIN(GPIOH_8, EE_OFF), 470f15f500SNeil Armstrong MESON_PIN(GPIOH_9, EE_OFF), 480f15f500SNeil Armstrong 490f15f500SNeil Armstrong MESON_PIN(BOOT_0, EE_OFF), 500f15f500SNeil Armstrong MESON_PIN(BOOT_1, EE_OFF), 510f15f500SNeil Armstrong MESON_PIN(BOOT_2, EE_OFF), 520f15f500SNeil Armstrong MESON_PIN(BOOT_3, EE_OFF), 530f15f500SNeil Armstrong MESON_PIN(BOOT_4, EE_OFF), 540f15f500SNeil Armstrong MESON_PIN(BOOT_5, EE_OFF), 550f15f500SNeil Armstrong MESON_PIN(BOOT_6, EE_OFF), 560f15f500SNeil Armstrong MESON_PIN(BOOT_7, EE_OFF), 570f15f500SNeil Armstrong MESON_PIN(BOOT_8, EE_OFF), 580f15f500SNeil Armstrong MESON_PIN(BOOT_9, EE_OFF), 590f15f500SNeil Armstrong MESON_PIN(BOOT_10, EE_OFF), 600f15f500SNeil Armstrong MESON_PIN(BOOT_11, EE_OFF), 610f15f500SNeil Armstrong MESON_PIN(BOOT_12, EE_OFF), 620f15f500SNeil Armstrong MESON_PIN(BOOT_13, EE_OFF), 630f15f500SNeil Armstrong MESON_PIN(BOOT_14, EE_OFF), 640f15f500SNeil Armstrong MESON_PIN(BOOT_15, EE_OFF), 650f15f500SNeil Armstrong 660f15f500SNeil Armstrong MESON_PIN(CARD_0, EE_OFF), 670f15f500SNeil Armstrong MESON_PIN(CARD_1, EE_OFF), 680f15f500SNeil Armstrong MESON_PIN(CARD_2, EE_OFF), 690f15f500SNeil Armstrong MESON_PIN(CARD_3, EE_OFF), 700f15f500SNeil Armstrong MESON_PIN(CARD_4, EE_OFF), 710f15f500SNeil Armstrong MESON_PIN(CARD_5, EE_OFF), 720f15f500SNeil Armstrong MESON_PIN(CARD_6, EE_OFF), 730f15f500SNeil Armstrong 740f15f500SNeil Armstrong MESON_PIN(GPIODV_0, EE_OFF), 750f15f500SNeil Armstrong MESON_PIN(GPIODV_1, EE_OFF), 760f15f500SNeil Armstrong MESON_PIN(GPIODV_2, EE_OFF), 770f15f500SNeil Armstrong MESON_PIN(GPIODV_3, EE_OFF), 780f15f500SNeil Armstrong MESON_PIN(GPIODV_4, EE_OFF), 790f15f500SNeil Armstrong MESON_PIN(GPIODV_5, EE_OFF), 800f15f500SNeil Armstrong MESON_PIN(GPIODV_6, EE_OFF), 810f15f500SNeil Armstrong MESON_PIN(GPIODV_7, EE_OFF), 820f15f500SNeil Armstrong MESON_PIN(GPIODV_8, EE_OFF), 830f15f500SNeil Armstrong MESON_PIN(GPIODV_9, EE_OFF), 840f15f500SNeil Armstrong MESON_PIN(GPIODV_10, EE_OFF), 850f15f500SNeil Armstrong MESON_PIN(GPIODV_11, EE_OFF), 860f15f500SNeil Armstrong MESON_PIN(GPIODV_12, EE_OFF), 870f15f500SNeil Armstrong MESON_PIN(GPIODV_13, EE_OFF), 880f15f500SNeil Armstrong MESON_PIN(GPIODV_14, EE_OFF), 890f15f500SNeil Armstrong MESON_PIN(GPIODV_15, EE_OFF), 900f15f500SNeil Armstrong MESON_PIN(GPIODV_16, EE_OFF), 910f15f500SNeil Armstrong MESON_PIN(GPIODV_17, EE_OFF), 92aa955695SNeil Armstrong MESON_PIN(GPIODV_18, EE_OFF), 930f15f500SNeil Armstrong MESON_PIN(GPIODV_19, EE_OFF), 940f15f500SNeil Armstrong MESON_PIN(GPIODV_20, EE_OFF), 950f15f500SNeil Armstrong MESON_PIN(GPIODV_21, EE_OFF), 960f15f500SNeil Armstrong MESON_PIN(GPIODV_22, EE_OFF), 970f15f500SNeil Armstrong MESON_PIN(GPIODV_23, EE_OFF), 980f15f500SNeil Armstrong MESON_PIN(GPIODV_24, EE_OFF), 990f15f500SNeil Armstrong MESON_PIN(GPIODV_25, EE_OFF), 1000f15f500SNeil Armstrong MESON_PIN(GPIODV_26, EE_OFF), 1010f15f500SNeil Armstrong MESON_PIN(GPIODV_27, EE_OFF), 1020f15f500SNeil Armstrong MESON_PIN(GPIODV_28, EE_OFF), 1030f15f500SNeil Armstrong MESON_PIN(GPIODV_29, EE_OFF), 1040f15f500SNeil Armstrong 1050f15f500SNeil Armstrong MESON_PIN(GPIOX_0, EE_OFF), 1060f15f500SNeil Armstrong MESON_PIN(GPIOX_1, EE_OFF), 1070f15f500SNeil Armstrong MESON_PIN(GPIOX_2, EE_OFF), 1080f15f500SNeil Armstrong MESON_PIN(GPIOX_3, EE_OFF), 1090f15f500SNeil Armstrong MESON_PIN(GPIOX_4, EE_OFF), 1100f15f500SNeil Armstrong MESON_PIN(GPIOX_5, EE_OFF), 1110f15f500SNeil Armstrong MESON_PIN(GPIOX_6, EE_OFF), 1120f15f500SNeil Armstrong MESON_PIN(GPIOX_7, EE_OFF), 1130f15f500SNeil Armstrong MESON_PIN(GPIOX_8, EE_OFF), 1140f15f500SNeil Armstrong MESON_PIN(GPIOX_9, EE_OFF), 1150f15f500SNeil Armstrong MESON_PIN(GPIOX_10, EE_OFF), 1160f15f500SNeil Armstrong MESON_PIN(GPIOX_11, EE_OFF), 1170f15f500SNeil Armstrong MESON_PIN(GPIOX_12, EE_OFF), 1180f15f500SNeil Armstrong MESON_PIN(GPIOX_13, EE_OFF), 1190f15f500SNeil Armstrong MESON_PIN(GPIOX_14, EE_OFF), 1200f15f500SNeil Armstrong MESON_PIN(GPIOX_15, EE_OFF), 1210f15f500SNeil Armstrong MESON_PIN(GPIOX_16, EE_OFF), 1220f15f500SNeil Armstrong MESON_PIN(GPIOX_17, EE_OFF), 1230f15f500SNeil Armstrong MESON_PIN(GPIOX_18, EE_OFF), 1240f15f500SNeil Armstrong 1250f15f500SNeil Armstrong MESON_PIN(GPIOCLK_0, EE_OFF), 1260f15f500SNeil Armstrong MESON_PIN(GPIOCLK_1, EE_OFF), 1270f15f500SNeil Armstrong 1280f15f500SNeil Armstrong MESON_PIN(GPIO_TEST_N, EE_OFF), 1290f15f500SNeil Armstrong }; 1300f15f500SNeil Armstrong 1310f15f500SNeil Armstrong static const unsigned int emmc_nand_d07_pins[] = { 1320f15f500SNeil Armstrong PIN(BOOT_0, EE_OFF), PIN(BOOT_1, EE_OFF), PIN(BOOT_2, EE_OFF), 1330f15f500SNeil Armstrong PIN(BOOT_3, EE_OFF), PIN(BOOT_4, EE_OFF), PIN(BOOT_5, EE_OFF), 1340f15f500SNeil Armstrong PIN(BOOT_6, EE_OFF), PIN(BOOT_7, EE_OFF), 1350f15f500SNeil Armstrong }; 1360f15f500SNeil Armstrong static const unsigned int emmc_clk_pins[] = { PIN(BOOT_8, EE_OFF) }; 1370f15f500SNeil Armstrong static const unsigned int emmc_cmd_pins[] = { PIN(BOOT_10, EE_OFF) }; 1380f15f500SNeil Armstrong static const unsigned int emmc_ds_pins[] = { PIN(BOOT_15, EE_OFF) }; 1390f15f500SNeil Armstrong 1406a0ab255SNeil Armstrong static const unsigned int nor_d_pins[] = { PIN(BOOT_11, EE_OFF) }; 1416a0ab255SNeil Armstrong static const unsigned int nor_q_pins[] = { PIN(BOOT_12, EE_OFF) }; 1426a0ab255SNeil Armstrong static const unsigned int nor_c_pins[] = { PIN(BOOT_13, EE_OFF) }; 1436a0ab255SNeil Armstrong static const unsigned int nor_cs_pins[] = { PIN(BOOT_15, EE_OFF) }; 1446a0ab255SNeil Armstrong 145477fa24eSNeil Armstrong static const unsigned int spi_mosi_pins[] = { PIN(GPIOX_8, EE_OFF) }; 146477fa24eSNeil Armstrong static const unsigned int spi_miso_pins[] = { PIN(GPIOX_9, EE_OFF) }; 147477fa24eSNeil Armstrong static const unsigned int spi_ss0_pins[] = { PIN(GPIOX_10, EE_OFF) }; 148477fa24eSNeil Armstrong static const unsigned int spi_sclk_pins[] = { PIN(GPIOX_11, EE_OFF) }; 149477fa24eSNeil Armstrong 1500f15f500SNeil Armstrong static const unsigned int sdcard_d0_pins[] = { PIN(CARD_1, EE_OFF) }; 1510f15f500SNeil Armstrong static const unsigned int sdcard_d1_pins[] = { PIN(CARD_0, EE_OFF) }; 1520f15f500SNeil Armstrong static const unsigned int sdcard_d2_pins[] = { PIN(CARD_5, EE_OFF) }; 1530f15f500SNeil Armstrong static const unsigned int sdcard_d3_pins[] = { PIN(CARD_4, EE_OFF) }; 1540f15f500SNeil Armstrong static const unsigned int sdcard_cmd_pins[] = { PIN(CARD_3, EE_OFF) }; 1550f15f500SNeil Armstrong static const unsigned int sdcard_clk_pins[] = { PIN(CARD_2, EE_OFF) }; 1560f15f500SNeil Armstrong 1570f15f500SNeil Armstrong static const unsigned int sdio_d0_pins[] = { PIN(GPIOX_0, EE_OFF) }; 1580f15f500SNeil Armstrong static const unsigned int sdio_d1_pins[] = { PIN(GPIOX_1, EE_OFF) }; 1590f15f500SNeil Armstrong static const unsigned int sdio_d2_pins[] = { PIN(GPIOX_2, EE_OFF) }; 1600f15f500SNeil Armstrong static const unsigned int sdio_d3_pins[] = { PIN(GPIOX_3, EE_OFF) }; 1610f15f500SNeil Armstrong static const unsigned int sdio_cmd_pins[] = { PIN(GPIOX_4, EE_OFF) }; 1620f15f500SNeil Armstrong static const unsigned int sdio_clk_pins[] = { PIN(GPIOX_5, EE_OFF) }; 1630f15f500SNeil Armstrong static const unsigned int sdio_irq_pins[] = { PIN(GPIOX_7, EE_OFF) }; 1640f15f500SNeil Armstrong 1650f15f500SNeil Armstrong static const unsigned int nand_ce0_pins[] = { PIN(BOOT_8, EE_OFF) }; 1660f15f500SNeil Armstrong static const unsigned int nand_ce1_pins[] = { PIN(BOOT_9, EE_OFF) }; 1670f15f500SNeil Armstrong static const unsigned int nand_rb0_pins[] = { PIN(BOOT_10, EE_OFF) }; 1680f15f500SNeil Armstrong static const unsigned int nand_ale_pins[] = { PIN(BOOT_11, EE_OFF) }; 1690f15f500SNeil Armstrong static const unsigned int nand_cle_pins[] = { PIN(BOOT_12, EE_OFF) }; 1700f15f500SNeil Armstrong static const unsigned int nand_wen_clk_pins[] = { PIN(BOOT_13, EE_OFF) }; 1710f15f500SNeil Armstrong static const unsigned int nand_ren_wr_pins[] = { PIN(BOOT_14, EE_OFF) }; 1720f15f500SNeil Armstrong static const unsigned int nand_dqs_pins[] = { PIN(BOOT_15, EE_OFF) }; 1730f15f500SNeil Armstrong 1740f15f500SNeil Armstrong static const unsigned int uart_tx_a_pins[] = { PIN(GPIOX_12, EE_OFF) }; 1750f15f500SNeil Armstrong static const unsigned int uart_rx_a_pins[] = { PIN(GPIOX_13, EE_OFF) }; 1760f15f500SNeil Armstrong static const unsigned int uart_cts_a_pins[] = { PIN(GPIOX_14, EE_OFF) }; 1770f15f500SNeil Armstrong static const unsigned int uart_rts_a_pins[] = { PIN(GPIOX_15, EE_OFF) }; 1780f15f500SNeil Armstrong 1790f15f500SNeil Armstrong static const unsigned int uart_tx_b_pins[] = { PIN(GPIODV_24, EE_OFF) }; 1800f15f500SNeil Armstrong static const unsigned int uart_rx_b_pins[] = { PIN(GPIODV_25, EE_OFF) }; 1816a0ab255SNeil Armstrong static const unsigned int uart_cts_b_pins[] = { PIN(GPIODV_26, EE_OFF) }; 1826a0ab255SNeil Armstrong static const unsigned int uart_rts_b_pins[] = { PIN(GPIODV_27, EE_OFF) }; 1830f15f500SNeil Armstrong 1840f15f500SNeil Armstrong static const unsigned int uart_tx_c_pins[] = { PIN(GPIOX_8, EE_OFF) }; 1850f15f500SNeil Armstrong static const unsigned int uart_rx_c_pins[] = { PIN(GPIOX_9, EE_OFF) }; 1866a0ab255SNeil Armstrong static const unsigned int uart_cts_c_pins[] = { PIN(GPIOX_10, EE_OFF) }; 1876a0ab255SNeil Armstrong static const unsigned int uart_rts_c_pins[] = { PIN(GPIOX_11, EE_OFF) }; 1880f15f500SNeil Armstrong 1890f15f500SNeil Armstrong static const unsigned int i2c_sck_a_pins[] = { PIN(GPIODV_25, EE_OFF) }; 1900f15f500SNeil Armstrong static const unsigned int i2c_sda_a_pins[] = { PIN(GPIODV_24, EE_OFF) }; 1910f15f500SNeil Armstrong 1920f15f500SNeil Armstrong static const unsigned int i2c_sck_b_pins[] = { PIN(GPIODV_27, EE_OFF) }; 1930f15f500SNeil Armstrong static const unsigned int i2c_sda_b_pins[] = { PIN(GPIODV_26, EE_OFF) }; 1940f15f500SNeil Armstrong 1950f15f500SNeil Armstrong static const unsigned int i2c_sck_c_pins[] = { PIN(GPIODV_29, EE_OFF) }; 1960f15f500SNeil Armstrong static const unsigned int i2c_sda_c_pins[] = { PIN(GPIODV_28, EE_OFF) }; 1970f15f500SNeil Armstrong 1986a0ab255SNeil Armstrong static const unsigned int i2c_sck_c_dv19_pins[] = { PIN(GPIODV_19, EE_OFF) }; 1996a0ab255SNeil Armstrong static const unsigned int i2c_sda_c_dv18_pins[] = { PIN(GPIODV_18, EE_OFF) }; 2006a0ab255SNeil Armstrong 2010f15f500SNeil Armstrong static const unsigned int eth_mdio_pins[] = { PIN(GPIOZ_0, EE_OFF) }; 2020f15f500SNeil Armstrong static const unsigned int eth_mdc_pins[] = { PIN(GPIOZ_1, EE_OFF) }; 2030f15f500SNeil Armstrong static const unsigned int eth_clk_rx_clk_pins[] = { PIN(GPIOZ_2, EE_OFF) }; 2040f15f500SNeil Armstrong static const unsigned int eth_rx_dv_pins[] = { PIN(GPIOZ_3, EE_OFF) }; 2050f15f500SNeil Armstrong static const unsigned int eth_rxd0_pins[] = { PIN(GPIOZ_4, EE_OFF) }; 2060f15f500SNeil Armstrong static const unsigned int eth_rxd1_pins[] = { PIN(GPIOZ_5, EE_OFF) }; 2070f15f500SNeil Armstrong static const unsigned int eth_rxd2_pins[] = { PIN(GPIOZ_6, EE_OFF) }; 2080f15f500SNeil Armstrong static const unsigned int eth_rxd3_pins[] = { PIN(GPIOZ_7, EE_OFF) }; 2090f15f500SNeil Armstrong static const unsigned int eth_rgmii_tx_clk_pins[] = { PIN(GPIOZ_8, EE_OFF) }; 2100f15f500SNeil Armstrong static const unsigned int eth_tx_en_pins[] = { PIN(GPIOZ_9, EE_OFF) }; 2110f15f500SNeil Armstrong static const unsigned int eth_txd0_pins[] = { PIN(GPIOZ_10, EE_OFF) }; 2120f15f500SNeil Armstrong static const unsigned int eth_txd1_pins[] = { PIN(GPIOZ_11, EE_OFF) }; 2130f15f500SNeil Armstrong static const unsigned int eth_txd2_pins[] = { PIN(GPIOZ_12, EE_OFF) }; 2140f15f500SNeil Armstrong static const unsigned int eth_txd3_pins[] = { PIN(GPIOZ_13, EE_OFF) }; 2150f15f500SNeil Armstrong 216cc97a95fSMartin Blumenstingl static const unsigned int pwm_a_pins[] = { PIN(GPIOX_6, EE_OFF) }; 217cc97a95fSMartin Blumenstingl 218cc97a95fSMartin Blumenstingl static const unsigned int pwm_b_pins[] = { PIN(GPIODV_29, EE_OFF) }; 219cc97a95fSMartin Blumenstingl 220cc97a95fSMartin Blumenstingl static const unsigned int pwm_c_pins[] = { PIN(GPIOZ_15, EE_OFF) }; 221cc97a95fSMartin Blumenstingl 222cc97a95fSMartin Blumenstingl static const unsigned int pwm_d_pins[] = { PIN(GPIODV_28, EE_OFF) }; 223cc97a95fSMartin Blumenstingl 2240f15f500SNeil Armstrong static const unsigned int pwm_e_pins[] = { PIN(GPIOX_16, EE_OFF) }; 2250f15f500SNeil Armstrong 226cc97a95fSMartin Blumenstingl static const unsigned int pwm_f_clk_pins[] = { PIN(GPIOCLK_1, EE_OFF) }; 227cc97a95fSMartin Blumenstingl static const unsigned int pwm_f_x_pins[] = { PIN(GPIOX_7, EE_OFF) }; 228cc97a95fSMartin Blumenstingl 2291fe8d6cbSNeil Armstrong static const unsigned int hdmi_hpd_pins[] = { PIN(GPIOH_0, EE_OFF) }; 2301fe8d6cbSNeil Armstrong static const unsigned int hdmi_sda_pins[] = { PIN(GPIOH_1, EE_OFF) }; 2311fe8d6cbSNeil Armstrong static const unsigned int hdmi_scl_pins[] = { PIN(GPIOH_2, EE_OFF) }; 2321fe8d6cbSNeil Armstrong 2332899adf0SJerome Brunet static const unsigned int i2s_am_clk_pins[] = { PIN(GPIOH_6, EE_OFF) }; 2342899adf0SJerome Brunet static const unsigned int i2s_out_ao_clk_pins[] = { PIN(GPIOH_7, EE_OFF) }; 2352899adf0SJerome Brunet static const unsigned int i2s_out_lr_clk_pins[] = { PIN(GPIOH_8, EE_OFF) }; 2362899adf0SJerome Brunet static const unsigned int i2s_out_ch01_pins[] = { PIN(GPIOH_9, EE_OFF) }; 2372899adf0SJerome Brunet static const unsigned int i2s_out_ch23_z_pins[] = { PIN(GPIOZ_5, EE_OFF) }; 2382899adf0SJerome Brunet static const unsigned int i2s_out_ch45_z_pins[] = { PIN(GPIOZ_6, EE_OFF) }; 2392899adf0SJerome Brunet static const unsigned int i2s_out_ch67_z_pins[] = { PIN(GPIOZ_7, EE_OFF) }; 2402899adf0SJerome Brunet 241b840d649SJerome Brunet static const unsigned int spdif_out_h_pins[] = { PIN(GPIOH_4, EE_OFF) }; 242b840d649SJerome Brunet 2430f15f500SNeil Armstrong static const struct pinctrl_pin_desc meson_gxl_aobus_pins[] = { 2440f15f500SNeil Armstrong MESON_PIN(GPIOAO_0, 0), 2450f15f500SNeil Armstrong MESON_PIN(GPIOAO_1, 0), 2460f15f500SNeil Armstrong MESON_PIN(GPIOAO_2, 0), 2470f15f500SNeil Armstrong MESON_PIN(GPIOAO_3, 0), 2480f15f500SNeil Armstrong MESON_PIN(GPIOAO_4, 0), 2490f15f500SNeil Armstrong MESON_PIN(GPIOAO_5, 0), 2500f15f500SNeil Armstrong MESON_PIN(GPIOAO_6, 0), 2510f15f500SNeil Armstrong MESON_PIN(GPIOAO_7, 0), 2520f15f500SNeil Armstrong MESON_PIN(GPIOAO_8, 0), 2530f15f500SNeil Armstrong MESON_PIN(GPIOAO_9, 0), 2540f15f500SNeil Armstrong }; 2550f15f500SNeil Armstrong 2560f15f500SNeil Armstrong static const unsigned int uart_tx_ao_a_pins[] = { PIN(GPIOAO_0, 0) }; 2570f15f500SNeil Armstrong static const unsigned int uart_rx_ao_a_pins[] = { PIN(GPIOAO_1, 0) }; 2586a0ab255SNeil Armstrong static const unsigned int uart_tx_ao_b_0_pins[] = { PIN(GPIOAO_0, 0) }; 2596a0ab255SNeil Armstrong static const unsigned int uart_rx_ao_b_1_pins[] = { PIN(GPIOAO_1, 0) }; 2600f15f500SNeil Armstrong static const unsigned int uart_cts_ao_a_pins[] = { PIN(GPIOAO_2, 0) }; 2610f15f500SNeil Armstrong static const unsigned int uart_rts_ao_a_pins[] = { PIN(GPIOAO_3, 0) }; 262b27e3648SMartin Blumenstingl static const unsigned int uart_tx_ao_b_pins[] = { PIN(GPIOAO_4, 0) }; 263b27e3648SMartin Blumenstingl static const unsigned int uart_rx_ao_b_pins[] = { PIN(GPIOAO_5, 0) }; 2640f15f500SNeil Armstrong static const unsigned int uart_cts_ao_b_pins[] = { PIN(GPIOAO_2, 0) }; 2650f15f500SNeil Armstrong static const unsigned int uart_rts_ao_b_pins[] = { PIN(GPIOAO_3, 0) }; 2660f15f500SNeil Armstrong 2676a0ab255SNeil Armstrong static const unsigned int i2c_sck_ao_pins[] = {PIN(GPIOAO_4, 0) }; 2686a0ab255SNeil Armstrong static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) }; 2696a0ab255SNeil Armstrong static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) }; 2706a0ab255SNeil Armstrong static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) }; 2716a0ab255SNeil Armstrong 2720f15f500SNeil Armstrong static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) }; 2730f15f500SNeil Armstrong 274cc97a95fSMartin Blumenstingl static const unsigned int pwm_ao_a_3_pins[] = { PIN(GPIOAO_3, 0) }; 275cc97a95fSMartin Blumenstingl static const unsigned int pwm_ao_a_8_pins[] = { PIN(GPIOAO_8, 0) }; 276cc97a95fSMartin Blumenstingl 277cff2b010SMartin Blumenstingl static const unsigned int pwm_ao_b_pins[] = { PIN(GPIOAO_9, 0) }; 2786a0ab255SNeil Armstrong static const unsigned int pwm_ao_b_6_pins[] = { PIN(GPIOAO_6, 0) }; 279cff2b010SMartin Blumenstingl 28013586b31SNeil Armstrong static const unsigned int i2s_out_ch23_ao_pins[] = { PIN(GPIOAO_8, 0) }; 28113586b31SNeil Armstrong static const unsigned int i2s_out_ch45_ao_pins[] = { PIN(GPIOAO_9, 0) }; 2822899adf0SJerome Brunet 283b840d649SJerome Brunet static const unsigned int spdif_out_ao_6_pins[] = { PIN(GPIOAO_6, EE_OFF) }; 284b840d649SJerome Brunet static const unsigned int spdif_out_ao_9_pins[] = { PIN(GPIOAO_9, EE_OFF) }; 285b840d649SJerome Brunet 2860f15f500SNeil Armstrong static struct meson_pmx_group meson_gxl_periphs_groups[] = { 2870f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_0, EE_OFF), 2880f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_1, EE_OFF), 2890f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_2, EE_OFF), 2900f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_3, EE_OFF), 2910f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_4, EE_OFF), 2920f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_5, EE_OFF), 2930f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_6, EE_OFF), 2940f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_7, EE_OFF), 2950f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_8, EE_OFF), 2960f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_9, EE_OFF), 2970f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_10, EE_OFF), 2980f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_11, EE_OFF), 2990f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_12, EE_OFF), 3000f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_13, EE_OFF), 3010f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_14, EE_OFF), 3020f15f500SNeil Armstrong GPIO_GROUP(GPIOZ_15, EE_OFF), 3030f15f500SNeil Armstrong 3040f15f500SNeil Armstrong GPIO_GROUP(GPIOH_0, EE_OFF), 3050f15f500SNeil Armstrong GPIO_GROUP(GPIOH_1, EE_OFF), 3060f15f500SNeil Armstrong GPIO_GROUP(GPIOH_2, EE_OFF), 3070f15f500SNeil Armstrong GPIO_GROUP(GPIOH_3, EE_OFF), 3080f15f500SNeil Armstrong GPIO_GROUP(GPIOH_4, EE_OFF), 3090f15f500SNeil Armstrong GPIO_GROUP(GPIOH_5, EE_OFF), 3100f15f500SNeil Armstrong GPIO_GROUP(GPIOH_6, EE_OFF), 3110f15f500SNeil Armstrong GPIO_GROUP(GPIOH_7, EE_OFF), 3120f15f500SNeil Armstrong GPIO_GROUP(GPIOH_8, EE_OFF), 3130f15f500SNeil Armstrong GPIO_GROUP(GPIOH_9, EE_OFF), 3140f15f500SNeil Armstrong 3150f15f500SNeil Armstrong GPIO_GROUP(BOOT_0, EE_OFF), 3160f15f500SNeil Armstrong GPIO_GROUP(BOOT_1, EE_OFF), 3170f15f500SNeil Armstrong GPIO_GROUP(BOOT_2, EE_OFF), 3180f15f500SNeil Armstrong GPIO_GROUP(BOOT_3, EE_OFF), 3190f15f500SNeil Armstrong GPIO_GROUP(BOOT_4, EE_OFF), 3200f15f500SNeil Armstrong GPIO_GROUP(BOOT_5, EE_OFF), 3210f15f500SNeil Armstrong GPIO_GROUP(BOOT_6, EE_OFF), 3220f15f500SNeil Armstrong GPIO_GROUP(BOOT_7, EE_OFF), 3230f15f500SNeil Armstrong GPIO_GROUP(BOOT_8, EE_OFF), 3240f15f500SNeil Armstrong GPIO_GROUP(BOOT_9, EE_OFF), 3250f15f500SNeil Armstrong GPIO_GROUP(BOOT_10, EE_OFF), 3260f15f500SNeil Armstrong GPIO_GROUP(BOOT_11, EE_OFF), 3270f15f500SNeil Armstrong GPIO_GROUP(BOOT_12, EE_OFF), 3280f15f500SNeil Armstrong GPIO_GROUP(BOOT_13, EE_OFF), 3290f15f500SNeil Armstrong GPIO_GROUP(BOOT_14, EE_OFF), 3300f15f500SNeil Armstrong GPIO_GROUP(BOOT_15, EE_OFF), 3310f15f500SNeil Armstrong 3320f15f500SNeil Armstrong GPIO_GROUP(CARD_0, EE_OFF), 3330f15f500SNeil Armstrong GPIO_GROUP(CARD_1, EE_OFF), 3340f15f500SNeil Armstrong GPIO_GROUP(CARD_2, EE_OFF), 3350f15f500SNeil Armstrong GPIO_GROUP(CARD_3, EE_OFF), 3360f15f500SNeil Armstrong GPIO_GROUP(CARD_4, EE_OFF), 3370f15f500SNeil Armstrong GPIO_GROUP(CARD_5, EE_OFF), 3380f15f500SNeil Armstrong GPIO_GROUP(CARD_6, EE_OFF), 3390f15f500SNeil Armstrong 3400f15f500SNeil Armstrong GPIO_GROUP(GPIODV_0, EE_OFF), 3410f15f500SNeil Armstrong GPIO_GROUP(GPIODV_1, EE_OFF), 3420f15f500SNeil Armstrong GPIO_GROUP(GPIODV_2, EE_OFF), 3430f15f500SNeil Armstrong GPIO_GROUP(GPIODV_3, EE_OFF), 3440f15f500SNeil Armstrong GPIO_GROUP(GPIODV_4, EE_OFF), 3450f15f500SNeil Armstrong GPIO_GROUP(GPIODV_5, EE_OFF), 3460f15f500SNeil Armstrong GPIO_GROUP(GPIODV_6, EE_OFF), 3470f15f500SNeil Armstrong GPIO_GROUP(GPIODV_7, EE_OFF), 3480f15f500SNeil Armstrong GPIO_GROUP(GPIODV_8, EE_OFF), 3490f15f500SNeil Armstrong GPIO_GROUP(GPIODV_9, EE_OFF), 3500f15f500SNeil Armstrong GPIO_GROUP(GPIODV_10, EE_OFF), 3510f15f500SNeil Armstrong GPIO_GROUP(GPIODV_11, EE_OFF), 3520f15f500SNeil Armstrong GPIO_GROUP(GPIODV_12, EE_OFF), 3530f15f500SNeil Armstrong GPIO_GROUP(GPIODV_13, EE_OFF), 3540f15f500SNeil Armstrong GPIO_GROUP(GPIODV_14, EE_OFF), 3550f15f500SNeil Armstrong GPIO_GROUP(GPIODV_15, EE_OFF), 3560f15f500SNeil Armstrong GPIO_GROUP(GPIODV_16, EE_OFF), 3570f15f500SNeil Armstrong GPIO_GROUP(GPIODV_17, EE_OFF), 3580f15f500SNeil Armstrong GPIO_GROUP(GPIODV_19, EE_OFF), 3590f15f500SNeil Armstrong GPIO_GROUP(GPIODV_20, EE_OFF), 3600f15f500SNeil Armstrong GPIO_GROUP(GPIODV_21, EE_OFF), 3610f15f500SNeil Armstrong GPIO_GROUP(GPIODV_22, EE_OFF), 3620f15f500SNeil Armstrong GPIO_GROUP(GPIODV_23, EE_OFF), 3630f15f500SNeil Armstrong GPIO_GROUP(GPIODV_24, EE_OFF), 3640f15f500SNeil Armstrong GPIO_GROUP(GPIODV_25, EE_OFF), 3650f15f500SNeil Armstrong GPIO_GROUP(GPIODV_26, EE_OFF), 3660f15f500SNeil Armstrong GPIO_GROUP(GPIODV_27, EE_OFF), 3670f15f500SNeil Armstrong GPIO_GROUP(GPIODV_28, EE_OFF), 3680f15f500SNeil Armstrong GPIO_GROUP(GPIODV_29, EE_OFF), 3690f15f500SNeil Armstrong 3700f15f500SNeil Armstrong GPIO_GROUP(GPIOX_0, EE_OFF), 3710f15f500SNeil Armstrong GPIO_GROUP(GPIOX_1, EE_OFF), 3720f15f500SNeil Armstrong GPIO_GROUP(GPIOX_2, EE_OFF), 3730f15f500SNeil Armstrong GPIO_GROUP(GPIOX_3, EE_OFF), 3740f15f500SNeil Armstrong GPIO_GROUP(GPIOX_4, EE_OFF), 3750f15f500SNeil Armstrong GPIO_GROUP(GPIOX_5, EE_OFF), 3760f15f500SNeil Armstrong GPIO_GROUP(GPIOX_6, EE_OFF), 3770f15f500SNeil Armstrong GPIO_GROUP(GPIOX_7, EE_OFF), 3780f15f500SNeil Armstrong GPIO_GROUP(GPIOX_8, EE_OFF), 3790f15f500SNeil Armstrong GPIO_GROUP(GPIOX_9, EE_OFF), 3800f15f500SNeil Armstrong GPIO_GROUP(GPIOX_10, EE_OFF), 3810f15f500SNeil Armstrong GPIO_GROUP(GPIOX_11, EE_OFF), 3820f15f500SNeil Armstrong GPIO_GROUP(GPIOX_12, EE_OFF), 3830f15f500SNeil Armstrong GPIO_GROUP(GPIOX_13, EE_OFF), 3840f15f500SNeil Armstrong GPIO_GROUP(GPIOX_14, EE_OFF), 3850f15f500SNeil Armstrong GPIO_GROUP(GPIOX_15, EE_OFF), 3860f15f500SNeil Armstrong GPIO_GROUP(GPIOX_16, EE_OFF), 3870f15f500SNeil Armstrong GPIO_GROUP(GPIOX_17, EE_OFF), 3880f15f500SNeil Armstrong GPIO_GROUP(GPIOX_18, EE_OFF), 3890f15f500SNeil Armstrong 3900f15f500SNeil Armstrong GPIO_GROUP(GPIOCLK_0, EE_OFF), 3910f15f500SNeil Armstrong GPIO_GROUP(GPIOCLK_1, EE_OFF), 3920f15f500SNeil Armstrong 3930f15f500SNeil Armstrong GPIO_GROUP(GPIO_TEST_N, EE_OFF), 3940f15f500SNeil Armstrong 3950f15f500SNeil Armstrong /* Bank X */ 3960f15f500SNeil Armstrong GROUP(sdio_d0, 5, 31), 3970f15f500SNeil Armstrong GROUP(sdio_d1, 5, 30), 3980f15f500SNeil Armstrong GROUP(sdio_d2, 5, 29), 3990f15f500SNeil Armstrong GROUP(sdio_d3, 5, 28), 4006a0ab255SNeil Armstrong GROUP(sdio_clk, 5, 27), 4016a0ab255SNeil Armstrong GROUP(sdio_cmd, 5, 26), 4020f15f500SNeil Armstrong GROUP(sdio_irq, 5, 24), 4030f15f500SNeil Armstrong GROUP(uart_tx_a, 5, 19), 4040f15f500SNeil Armstrong GROUP(uart_rx_a, 5, 18), 4050f15f500SNeil Armstrong GROUP(uart_cts_a, 5, 17), 4060f15f500SNeil Armstrong GROUP(uart_rts_a, 5, 16), 4070f15f500SNeil Armstrong GROUP(uart_tx_c, 5, 13), 4080f15f500SNeil Armstrong GROUP(uart_rx_c, 5, 12), 4096a0ab255SNeil Armstrong GROUP(uart_cts_c, 5, 11), 4106a0ab255SNeil Armstrong GROUP(uart_rts_c, 5, 10), 411cc97a95fSMartin Blumenstingl GROUP(pwm_a, 5, 25), 4120f15f500SNeil Armstrong GROUP(pwm_e, 5, 15), 413cc97a95fSMartin Blumenstingl GROUP(pwm_f_x, 5, 14), 414477fa24eSNeil Armstrong GROUP(spi_mosi, 5, 3), 415477fa24eSNeil Armstrong GROUP(spi_miso, 5, 2), 416477fa24eSNeil Armstrong GROUP(spi_ss0, 5, 1), 417477fa24eSNeil Armstrong GROUP(spi_sclk, 5, 0), 4180f15f500SNeil Armstrong 4190f15f500SNeil Armstrong /* Bank Z */ 4206a0ab255SNeil Armstrong GROUP(eth_mdio, 4, 23), 4216a0ab255SNeil Armstrong GROUP(eth_mdc, 4, 22), 4220f15f500SNeil Armstrong GROUP(eth_clk_rx_clk, 4, 21), 4230f15f500SNeil Armstrong GROUP(eth_rx_dv, 4, 20), 4240f15f500SNeil Armstrong GROUP(eth_rxd0, 4, 19), 4250f15f500SNeil Armstrong GROUP(eth_rxd1, 4, 18), 4260f15f500SNeil Armstrong GROUP(eth_rxd2, 4, 17), 4270f15f500SNeil Armstrong GROUP(eth_rxd3, 4, 16), 4280f15f500SNeil Armstrong GROUP(eth_rgmii_tx_clk, 4, 15), 4290f15f500SNeil Armstrong GROUP(eth_tx_en, 4, 14), 4300f15f500SNeil Armstrong GROUP(eth_txd0, 4, 13), 4310f15f500SNeil Armstrong GROUP(eth_txd1, 4, 12), 4320f15f500SNeil Armstrong GROUP(eth_txd2, 4, 11), 4330f15f500SNeil Armstrong GROUP(eth_txd3, 4, 10), 434cc97a95fSMartin Blumenstingl GROUP(pwm_c, 3, 20), 4352899adf0SJerome Brunet GROUP(i2s_out_ch23_z, 3, 26), 4362899adf0SJerome Brunet GROUP(i2s_out_ch45_z, 3, 25), 4372899adf0SJerome Brunet GROUP(i2s_out_ch67_z, 3, 24), 4380f15f500SNeil Armstrong 4391fe8d6cbSNeil Armstrong /* Bank H */ 4401fe8d6cbSNeil Armstrong GROUP(hdmi_hpd, 6, 31), 4411fe8d6cbSNeil Armstrong GROUP(hdmi_sda, 6, 30), 4421fe8d6cbSNeil Armstrong GROUP(hdmi_scl, 6, 29), 4432899adf0SJerome Brunet GROUP(i2s_am_clk, 6, 26), 4442899adf0SJerome Brunet GROUP(i2s_out_ao_clk, 6, 25), 4452899adf0SJerome Brunet GROUP(i2s_out_lr_clk, 6, 24), 4462899adf0SJerome Brunet GROUP(i2s_out_ch01, 6, 23), 447b840d649SJerome Brunet GROUP(spdif_out_h, 6, 28), 4481fe8d6cbSNeil Armstrong 4490f15f500SNeil Armstrong /* Bank DV */ 4500f15f500SNeil Armstrong GROUP(uart_tx_b, 2, 16), 4510f15f500SNeil Armstrong GROUP(uart_rx_b, 2, 15), 4526a0ab255SNeil Armstrong GROUP(uart_cts_b, 2, 14), 4536a0ab255SNeil Armstrong GROUP(uart_rts_b, 2, 13), 4546a0ab255SNeil Armstrong GROUP(i2c_sda_c_dv18, 1, 17), 4556a0ab255SNeil Armstrong GROUP(i2c_sck_c_dv19, 1, 16), 4566a0ab255SNeil Armstrong GROUP(i2c_sda_a, 1, 15), 4576a0ab255SNeil Armstrong GROUP(i2c_sck_a, 1, 14), 4586a0ab255SNeil Armstrong GROUP(i2c_sda_b, 1, 13), 4596a0ab255SNeil Armstrong GROUP(i2c_sck_b, 1, 12), 4606a0ab255SNeil Armstrong GROUP(i2c_sda_c, 1, 11), 4616a0ab255SNeil Armstrong GROUP(i2c_sck_c, 1, 10), 462cc97a95fSMartin Blumenstingl GROUP(pwm_b, 2, 11), 463cc97a95fSMartin Blumenstingl GROUP(pwm_d, 2, 12), 4640f15f500SNeil Armstrong 4650f15f500SNeil Armstrong /* Bank BOOT */ 4660f15f500SNeil Armstrong GROUP(emmc_nand_d07, 7, 31), 4670f15f500SNeil Armstrong GROUP(emmc_clk, 7, 30), 4680f15f500SNeil Armstrong GROUP(emmc_cmd, 7, 29), 4690f15f500SNeil Armstrong GROUP(emmc_ds, 7, 28), 4706a0ab255SNeil Armstrong GROUP(nor_d, 7, 13), 4716a0ab255SNeil Armstrong GROUP(nor_q, 7, 12), 4726a0ab255SNeil Armstrong GROUP(nor_c, 7, 11), 4736a0ab255SNeil Armstrong GROUP(nor_cs, 7, 10), 4740f15f500SNeil Armstrong GROUP(nand_ce0, 7, 7), 4750f15f500SNeil Armstrong GROUP(nand_ce1, 7, 6), 4760f15f500SNeil Armstrong GROUP(nand_rb0, 7, 5), 4770f15f500SNeil Armstrong GROUP(nand_ale, 7, 4), 4780f15f500SNeil Armstrong GROUP(nand_cle, 7, 3), 4790f15f500SNeil Armstrong GROUP(nand_wen_clk, 7, 2), 4800f15f500SNeil Armstrong GROUP(nand_ren_wr, 7, 1), 4810f15f500SNeil Armstrong GROUP(nand_dqs, 7, 0), 4820f15f500SNeil Armstrong 4830f15f500SNeil Armstrong /* Bank CARD */ 4840f15f500SNeil Armstrong GROUP(sdcard_d1, 6, 5), 4850f15f500SNeil Armstrong GROUP(sdcard_d0, 6, 4), 4860f15f500SNeil Armstrong GROUP(sdcard_d3, 6, 1), 4870f15f500SNeil Armstrong GROUP(sdcard_d2, 6, 0), 4880f15f500SNeil Armstrong GROUP(sdcard_cmd, 6, 2), 4890f15f500SNeil Armstrong GROUP(sdcard_clk, 6, 3), 490cc97a95fSMartin Blumenstingl 491cc97a95fSMartin Blumenstingl /* Bank CLK */ 492cc97a95fSMartin Blumenstingl GROUP(pwm_f_clk, 8, 30), 4930f15f500SNeil Armstrong }; 4940f15f500SNeil Armstrong 4950f15f500SNeil Armstrong static struct meson_pmx_group meson_gxl_aobus_groups[] = { 4960f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_0, 0), 4970f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_1, 0), 4980f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_2, 0), 4990f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_3, 0), 5000f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_4, 0), 5010f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_5, 0), 5020f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_6, 0), 5030f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_7, 0), 5040f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_8, 0), 5050f15f500SNeil Armstrong GPIO_GROUP(GPIOAO_9, 0), 5060f15f500SNeil Armstrong 5070f15f500SNeil Armstrong /* bank AO */ 5086a0ab255SNeil Armstrong GROUP(uart_tx_ao_b_0, 0, 26), 5096a0ab255SNeil Armstrong GROUP(uart_rx_ao_b_1, 0, 25), 510b27e3648SMartin Blumenstingl GROUP(uart_tx_ao_b, 0, 24), 5116a0ab255SNeil Armstrong GROUP(uart_rx_ao_b, 0, 23), 5120f15f500SNeil Armstrong GROUP(uart_tx_ao_a, 0, 12), 5130f15f500SNeil Armstrong GROUP(uart_rx_ao_a, 0, 11), 5140f15f500SNeil Armstrong GROUP(uart_cts_ao_a, 0, 10), 5150f15f500SNeil Armstrong GROUP(uart_rts_ao_a, 0, 9), 5160f15f500SNeil Armstrong GROUP(uart_cts_ao_b, 0, 8), 5170f15f500SNeil Armstrong GROUP(uart_rts_ao_b, 0, 7), 5186a0ab255SNeil Armstrong GROUP(i2c_sck_ao, 0, 6), 5196a0ab255SNeil Armstrong GROUP(i2c_sda_ao, 0, 5), 5206a0ab255SNeil Armstrong GROUP(i2c_slave_sck_ao, 0, 2), 5216a0ab255SNeil Armstrong GROUP(i2c_slave_sda_ao, 0, 1), 5220f15f500SNeil Armstrong GROUP(remote_input_ao, 0, 0), 523cc97a95fSMartin Blumenstingl GROUP(pwm_ao_a_3, 0, 22), 5246a0ab255SNeil Armstrong GROUP(pwm_ao_b_6, 0, 18), 525cc97a95fSMartin Blumenstingl GROUP(pwm_ao_a_8, 0, 17), 526cff2b010SMartin Blumenstingl GROUP(pwm_ao_b, 0, 3), 5272899adf0SJerome Brunet GROUP(i2s_out_ch23_ao, 1, 0), 5282899adf0SJerome Brunet GROUP(i2s_out_ch45_ao, 1, 1), 529b840d649SJerome Brunet GROUP(spdif_out_ao_6, 0, 16), 530b840d649SJerome Brunet GROUP(spdif_out_ao_9, 0, 4), 5310f15f500SNeil Armstrong }; 5320f15f500SNeil Armstrong 5330f15f500SNeil Armstrong static const char * const gpio_periphs_groups[] = { 5340f15f500SNeil Armstrong "GPIOZ_0", "GPIOZ_1", "GPIOZ_2", "GPIOZ_3", "GPIOZ_4", 5350f15f500SNeil Armstrong "GPIOZ_5", "GPIOZ_6", "GPIOZ_7", "GPIOZ_8", "GPIOZ_9", 5360f15f500SNeil Armstrong "GPIOZ_10", "GPIOZ_11", "GPIOZ_12", "GPIOZ_13", "GPIOZ_14", 5370f15f500SNeil Armstrong "GPIOZ_15", 5380f15f500SNeil Armstrong 5390f15f500SNeil Armstrong "GPIOH_0", "GPIOH_1", "GPIOH_2", "GPIOH_3", "GPIOH_4", 5400f15f500SNeil Armstrong "GPIOH_5", "GPIOH_6", "GPIOH_7", "GPIOH_8", "GPIOH_9", 5410f15f500SNeil Armstrong 5420f15f500SNeil Armstrong "BOOT_0", "BOOT_1", "BOOT_2", "BOOT_3", "BOOT_4", 5430f15f500SNeil Armstrong "BOOT_5", "BOOT_6", "BOOT_7", "BOOT_8", "BOOT_9", 5440f15f500SNeil Armstrong "BOOT_10", "BOOT_11", "BOOT_12", "BOOT_13", "BOOT_14", 5450f15f500SNeil Armstrong "BOOT_15", 5460f15f500SNeil Armstrong 5470f15f500SNeil Armstrong "CARD_0", "CARD_1", "CARD_2", "CARD_3", "CARD_4", 5480f15f500SNeil Armstrong "CARD_5", "CARD_6", 5490f15f500SNeil Armstrong 5500f15f500SNeil Armstrong "GPIODV_0", "GPIODV_1", "GPIODV_2", "GPIODV_3", "GPIODV_4", 5510f15f500SNeil Armstrong "GPIODV_5", "GPIODV_6", "GPIODV_7", "GPIODV_8", "GPIODV_9", 5520f15f500SNeil Armstrong "GPIODV_10", "GPIODV_11", "GPIODV_12", "GPIODV_13", "GPIODV_14", 5530f15f500SNeil Armstrong "GPIODV_15", "GPIODV_16", "GPIODV_17", "GPIODV_18", "GPIODV_19", 5540f15f500SNeil Armstrong "GPIODV_20", "GPIODV_21", "GPIODV_22", "GPIODV_23", "GPIODV_24", 5550f15f500SNeil Armstrong "GPIODV_25", "GPIODV_26", "GPIODV_27", "GPIODV_28", "GPIODV_29", 5560f15f500SNeil Armstrong 5570f15f500SNeil Armstrong "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4", 5580f15f500SNeil Armstrong "GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9", 5590f15f500SNeil Armstrong "GPIOX_10", "GPIOX_11", "GPIOX_12", "GPIOX_13", "GPIOX_14", 5600f15f500SNeil Armstrong "GPIOX_15", "GPIOX_16", "GPIOX_17", "GPIOX_18", 5610f15f500SNeil Armstrong 5620f15f500SNeil Armstrong "GPIO_TEST_N", 5630f15f500SNeil Armstrong }; 5640f15f500SNeil Armstrong 5650f15f500SNeil Armstrong static const char * const emmc_groups[] = { 5660f15f500SNeil Armstrong "emmc_nand_d07", "emmc_clk", "emmc_cmd", "emmc_ds", 5670f15f500SNeil Armstrong }; 5680f15f500SNeil Armstrong 5696a0ab255SNeil Armstrong static const char * const nor_groups[] = { 5706a0ab255SNeil Armstrong "nor_d", "nor_q", "nor_c", "nor_cs", 5716a0ab255SNeil Armstrong }; 5726a0ab255SNeil Armstrong 573477fa24eSNeil Armstrong static const char * const spi_groups[] = { 574477fa24eSNeil Armstrong "spi_mosi", "spi_miso", "spi_ss0", "spi_sclk", 575477fa24eSNeil Armstrong }; 576477fa24eSNeil Armstrong 5770f15f500SNeil Armstrong static const char * const sdcard_groups[] = { 5780f15f500SNeil Armstrong "sdcard_d0", "sdcard_d1", "sdcard_d2", "sdcard_d3", 5790f15f500SNeil Armstrong "sdcard_cmd", "sdcard_clk", 5800f15f500SNeil Armstrong }; 5810f15f500SNeil Armstrong 5820f15f500SNeil Armstrong static const char * const sdio_groups[] = { 5830f15f500SNeil Armstrong "sdio_d0", "sdio_d1", "sdio_d2", "sdio_d3", 5840f15f500SNeil Armstrong "sdio_cmd", "sdio_clk", "sdio_irq", 5850f15f500SNeil Armstrong }; 5860f15f500SNeil Armstrong 5870f15f500SNeil Armstrong static const char * const nand_groups[] = { 5880f15f500SNeil Armstrong "nand_ce0", "nand_ce1", "nand_rb0", "nand_ale", "nand_cle", 5890f15f500SNeil Armstrong "nand_wen_clk", "nand_ren_wr", "nand_dqs", 5900f15f500SNeil Armstrong }; 5910f15f500SNeil Armstrong 5920f15f500SNeil Armstrong static const char * const uart_a_groups[] = { 5930f15f500SNeil Armstrong "uart_tx_a", "uart_rx_a", "uart_cts_a", "uart_rts_a", 5940f15f500SNeil Armstrong }; 5950f15f500SNeil Armstrong 5960f15f500SNeil Armstrong static const char * const uart_b_groups[] = { 5976a0ab255SNeil Armstrong "uart_tx_b", "uart_rx_b", "uart_cts_b", "uart_rts_b", 5980f15f500SNeil Armstrong }; 5990f15f500SNeil Armstrong 6000f15f500SNeil Armstrong static const char * const uart_c_groups[] = { 6016a0ab255SNeil Armstrong "uart_tx_c", "uart_rx_c", "uart_cts_c", "uart_rts_c", 6020f15f500SNeil Armstrong }; 6030f15f500SNeil Armstrong 6040f15f500SNeil Armstrong static const char * const i2c_a_groups[] = { 6050f15f500SNeil Armstrong "i2c_sck_a", "i2c_sda_a", 6060f15f500SNeil Armstrong }; 6070f15f500SNeil Armstrong 6080f15f500SNeil Armstrong static const char * const i2c_b_groups[] = { 6090f15f500SNeil Armstrong "i2c_sck_b", "i2c_sda_b", 6100f15f500SNeil Armstrong }; 6110f15f500SNeil Armstrong 6120f15f500SNeil Armstrong static const char * const i2c_c_groups[] = { 6136a0ab255SNeil Armstrong "i2c_sck_c", "i2c_sda_c", "i2c_sda_c_dv18", "i2c_sck_c_dv19", 6140f15f500SNeil Armstrong }; 6150f15f500SNeil Armstrong 6160f15f500SNeil Armstrong static const char * const eth_groups[] = { 6170f15f500SNeil Armstrong "eth_mdio", "eth_mdc", "eth_clk_rx_clk", "eth_rx_dv", 6180f15f500SNeil Armstrong "eth_rxd0", "eth_rxd1", "eth_rxd2", "eth_rxd3", 6190f15f500SNeil Armstrong "eth_rgmii_tx_clk", "eth_tx_en", 6200f15f500SNeil Armstrong "eth_txd0", "eth_txd1", "eth_txd2", "eth_txd3", 6210f15f500SNeil Armstrong }; 6220f15f500SNeil Armstrong 623cc97a95fSMartin Blumenstingl static const char * const pwm_a_groups[] = { 624cc97a95fSMartin Blumenstingl "pwm_a", 625cc97a95fSMartin Blumenstingl }; 626cc97a95fSMartin Blumenstingl 627cc97a95fSMartin Blumenstingl static const char * const pwm_b_groups[] = { 628cc97a95fSMartin Blumenstingl "pwm_b", 629cc97a95fSMartin Blumenstingl }; 630cc97a95fSMartin Blumenstingl 631cc97a95fSMartin Blumenstingl static const char * const pwm_c_groups[] = { 632cc97a95fSMartin Blumenstingl "pwm_c", 633cc97a95fSMartin Blumenstingl }; 634cc97a95fSMartin Blumenstingl 635cc97a95fSMartin Blumenstingl static const char * const pwm_d_groups[] = { 636cc97a95fSMartin Blumenstingl "pwm_d", 637cc97a95fSMartin Blumenstingl }; 638cc97a95fSMartin Blumenstingl 6390f15f500SNeil Armstrong static const char * const pwm_e_groups[] = { 6400f15f500SNeil Armstrong "pwm_e", 6410f15f500SNeil Armstrong }; 6420f15f500SNeil Armstrong 643cc97a95fSMartin Blumenstingl static const char * const pwm_f_groups[] = { 644cc97a95fSMartin Blumenstingl "pwm_f_clk", "pwm_f_x", 645cc97a95fSMartin Blumenstingl }; 646cc97a95fSMartin Blumenstingl 6471fe8d6cbSNeil Armstrong static const char * const hdmi_hpd_groups[] = { 6481fe8d6cbSNeil Armstrong "hdmi_hpd", 6491fe8d6cbSNeil Armstrong }; 6501fe8d6cbSNeil Armstrong 6511fe8d6cbSNeil Armstrong static const char * const hdmi_i2c_groups[] = { 6521fe8d6cbSNeil Armstrong "hdmi_sda", "hdmi_scl", 6531fe8d6cbSNeil Armstrong }; 6541fe8d6cbSNeil Armstrong 6552899adf0SJerome Brunet static const char * const i2s_out_groups[] = { 6562899adf0SJerome Brunet "i2s_am_clk", "i2s_out_ao_clk", "i2s_out_lr_clk", 6572899adf0SJerome Brunet "i2s_out_ch01", "i2s_out_ch23_z", "i2s_out_ch45_z", "i2s_out_ch67_z", 6582899adf0SJerome Brunet }; 6592899adf0SJerome Brunet 660b840d649SJerome Brunet static const char * const spdif_out_groups[] = { 661b840d649SJerome Brunet "spdif_out_h", 662b840d649SJerome Brunet }; 663b840d649SJerome Brunet 6640f15f500SNeil Armstrong static const char * const gpio_aobus_groups[] = { 6650f15f500SNeil Armstrong "GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4", 6660f15f500SNeil Armstrong "GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9", 6670f15f500SNeil Armstrong }; 6680f15f500SNeil Armstrong 6690f15f500SNeil Armstrong static const char * const uart_ao_groups[] = { 6700f15f500SNeil Armstrong "uart_tx_ao_a", "uart_rx_ao_a", "uart_cts_ao_a", "uart_rts_ao_a", 6710f15f500SNeil Armstrong }; 6720f15f500SNeil Armstrong 6730f15f500SNeil Armstrong static const char * const uart_ao_b_groups[] = { 6740f15f500SNeil Armstrong "uart_tx_ao_b", "uart_rx_ao_b", "uart_cts_ao_b", "uart_rts_ao_b", 6756a0ab255SNeil Armstrong "uart_tx_ao_b_0", "uart_rx_ao_b_1", 6766a0ab255SNeil Armstrong }; 6776a0ab255SNeil Armstrong 6786a0ab255SNeil Armstrong static const char * const i2c_ao_groups[] = { 6796a0ab255SNeil Armstrong "i2c_sck_ao", "i2c_sda_ao", 6806a0ab255SNeil Armstrong }; 6816a0ab255SNeil Armstrong 6826a0ab255SNeil Armstrong static const char * const i2c_slave_ao_groups[] = { 6836a0ab255SNeil Armstrong "i2c_slave_sck_ao", "i2c_slave_sda_ao", 6840f15f500SNeil Armstrong }; 6850f15f500SNeil Armstrong 6860f15f500SNeil Armstrong static const char * const remote_input_ao_groups[] = { 6870f15f500SNeil Armstrong "remote_input_ao", 6880f15f500SNeil Armstrong }; 6890f15f500SNeil Armstrong 690cc97a95fSMartin Blumenstingl static const char * const pwm_ao_a_groups[] = { 691cc97a95fSMartin Blumenstingl "pwm_ao_a_3", "pwm_ao_a_8", 692cc97a95fSMartin Blumenstingl }; 693cc97a95fSMartin Blumenstingl 694cff2b010SMartin Blumenstingl static const char * const pwm_ao_b_groups[] = { 6956a0ab255SNeil Armstrong "pwm_ao_b", "pwm_ao_b_6", 696cff2b010SMartin Blumenstingl }; 697cff2b010SMartin Blumenstingl 6982899adf0SJerome Brunet static const char * const i2s_out_ao_groups[] = { 6992899adf0SJerome Brunet "i2s_out_ch23_ao", "i2s_out_ch45_ao", 7002899adf0SJerome Brunet }; 7012899adf0SJerome Brunet 702b840d649SJerome Brunet static const char * const spdif_out_ao_groups[] = { 703b840d649SJerome Brunet "spdif_out_ao_6", "spdif_out_ao_9", 704b840d649SJerome Brunet }; 705b840d649SJerome Brunet 7060f15f500SNeil Armstrong static struct meson_pmx_func meson_gxl_periphs_functions[] = { 7070f15f500SNeil Armstrong FUNCTION(gpio_periphs), 7080f15f500SNeil Armstrong FUNCTION(emmc), 7096a0ab255SNeil Armstrong FUNCTION(nor), 710477fa24eSNeil Armstrong FUNCTION(spi), 7110f15f500SNeil Armstrong FUNCTION(sdcard), 7120f15f500SNeil Armstrong FUNCTION(sdio), 7130f15f500SNeil Armstrong FUNCTION(nand), 7140f15f500SNeil Armstrong FUNCTION(uart_a), 7150f15f500SNeil Armstrong FUNCTION(uart_b), 7160f15f500SNeil Armstrong FUNCTION(uart_c), 7170f15f500SNeil Armstrong FUNCTION(i2c_a), 7180f15f500SNeil Armstrong FUNCTION(i2c_b), 7190f15f500SNeil Armstrong FUNCTION(i2c_c), 7200f15f500SNeil Armstrong FUNCTION(eth), 721cc97a95fSMartin Blumenstingl FUNCTION(pwm_a), 722cc97a95fSMartin Blumenstingl FUNCTION(pwm_b), 723cc97a95fSMartin Blumenstingl FUNCTION(pwm_c), 724cc97a95fSMartin Blumenstingl FUNCTION(pwm_d), 7250f15f500SNeil Armstrong FUNCTION(pwm_e), 726cc97a95fSMartin Blumenstingl FUNCTION(pwm_f), 7271fe8d6cbSNeil Armstrong FUNCTION(hdmi_hpd), 7281fe8d6cbSNeil Armstrong FUNCTION(hdmi_i2c), 7292899adf0SJerome Brunet FUNCTION(i2s_out), 730b840d649SJerome Brunet FUNCTION(spdif_out), 7310f15f500SNeil Armstrong }; 7320f15f500SNeil Armstrong 7330f15f500SNeil Armstrong static struct meson_pmx_func meson_gxl_aobus_functions[] = { 7340f15f500SNeil Armstrong FUNCTION(gpio_aobus), 7350f15f500SNeil Armstrong FUNCTION(uart_ao), 7360f15f500SNeil Armstrong FUNCTION(uart_ao_b), 7376a0ab255SNeil Armstrong FUNCTION(i2c_ao), 7386a0ab255SNeil Armstrong FUNCTION(i2c_slave_ao), 7390f15f500SNeil Armstrong FUNCTION(remote_input_ao), 740cc97a95fSMartin Blumenstingl FUNCTION(pwm_ao_a), 741cff2b010SMartin Blumenstingl FUNCTION(pwm_ao_b), 7422899adf0SJerome Brunet FUNCTION(i2s_out_ao), 743b840d649SJerome Brunet FUNCTION(spdif_out_ao), 7440f15f500SNeil Armstrong }; 7450f15f500SNeil Armstrong 7460f15f500SNeil Armstrong static struct meson_bank meson_gxl_periphs_banks[] = { 7470f15f500SNeil Armstrong /* name first last pullen pull dir out in */ 7480f15f500SNeil Armstrong BANK("X", PIN(GPIOX_0, EE_OFF), PIN(GPIOX_18, EE_OFF), 4, 0, 4, 0, 12, 0, 13, 0, 14, 0), 7490f15f500SNeil Armstrong BANK("DV", PIN(GPIODV_0, EE_OFF), PIN(GPIODV_29, EE_OFF), 0, 0, 0, 0, 0, 0, 1, 0, 2, 0), 7500f15f500SNeil Armstrong BANK("H", PIN(GPIOH_0, EE_OFF), PIN(GPIOH_9, EE_OFF), 1, 20, 1, 20, 3, 20, 4, 20, 5, 20), 7510f15f500SNeil Armstrong BANK("Z", PIN(GPIOZ_0, EE_OFF), PIN(GPIOZ_15, EE_OFF), 3, 0, 3, 0, 9, 0, 10, 0, 11, 0), 7520f15f500SNeil Armstrong BANK("CARD", PIN(CARD_0, EE_OFF), PIN(CARD_6, EE_OFF), 2, 20, 2, 20, 6, 20, 7, 20, 8, 20), 7530f15f500SNeil Armstrong BANK("BOOT", PIN(BOOT_0, EE_OFF), PIN(BOOT_15, EE_OFF), 2, 0, 2, 0, 6, 0, 7, 0, 8, 0), 7540f15f500SNeil Armstrong BANK("CLK", PIN(GPIOCLK_0, EE_OFF), PIN(GPIOCLK_1, EE_OFF), 3, 28, 3, 28, 9, 28, 10, 28, 11, 28), 7550f15f500SNeil Armstrong }; 7560f15f500SNeil Armstrong 7570f15f500SNeil Armstrong static struct meson_bank meson_gxl_aobus_banks[] = { 7580f15f500SNeil Armstrong /* name first last pullen pull dir out in */ 7590f15f500SNeil Armstrong BANK("AO", PIN(GPIOAO_0, 0), PIN(GPIOAO_9, 0), 0, 0, 0, 16, 0, 0, 0, 16, 1, 0), 7600f15f500SNeil Armstrong }; 7610f15f500SNeil Armstrong 7620f15f500SNeil Armstrong struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data = { 7630f15f500SNeil Armstrong .name = "periphs-banks", 7640f15f500SNeil Armstrong .pin_base = 10, 7650f15f500SNeil Armstrong .pins = meson_gxl_periphs_pins, 7660f15f500SNeil Armstrong .groups = meson_gxl_periphs_groups, 7670f15f500SNeil Armstrong .funcs = meson_gxl_periphs_functions, 7680f15f500SNeil Armstrong .banks = meson_gxl_periphs_banks, 7690f15f500SNeil Armstrong .num_pins = ARRAY_SIZE(meson_gxl_periphs_pins), 7700f15f500SNeil Armstrong .num_groups = ARRAY_SIZE(meson_gxl_periphs_groups), 7710f15f500SNeil Armstrong .num_funcs = ARRAY_SIZE(meson_gxl_periphs_functions), 7720f15f500SNeil Armstrong .num_banks = ARRAY_SIZE(meson_gxl_periphs_banks), 7730f15f500SNeil Armstrong }; 7740f15f500SNeil Armstrong 7750f15f500SNeil Armstrong struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data = { 7760f15f500SNeil Armstrong .name = "aobus-banks", 7770f15f500SNeil Armstrong .pin_base = 0, 7780f15f500SNeil Armstrong .pins = meson_gxl_aobus_pins, 7790f15f500SNeil Armstrong .groups = meson_gxl_aobus_groups, 7800f15f500SNeil Armstrong .funcs = meson_gxl_aobus_functions, 7810f15f500SNeil Armstrong .banks = meson_gxl_aobus_banks, 7820f15f500SNeil Armstrong .num_pins = ARRAY_SIZE(meson_gxl_aobus_pins), 7830f15f500SNeil Armstrong .num_groups = ARRAY_SIZE(meson_gxl_aobus_groups), 7840f15f500SNeil Armstrong .num_funcs = ARRAY_SIZE(meson_gxl_aobus_functions), 7850f15f500SNeil Armstrong .num_banks = ARRAY_SIZE(meson_gxl_aobus_banks), 7860f15f500SNeil Armstrong }; 787