Lines Matching +full:pin +full:- +full:function

1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2016 - Beniamino Galvani <b.galvani@gmail.com>
12 #include <dt-bindings/gpio/meson-gxl-gpio.h>
14 #include "pinctrl-meson-gx.h"
19 PIN(BOOT_0, EE_OFF), PIN(BOOT_1, EE_OFF), PIN(BOOT_2, EE_OFF),
20 PIN(BOOT_3, EE_OFF), PIN(BOOT_4, EE_OFF), PIN(BOOT_5, EE_OFF),
21 PIN(BOOT_6, EE_OFF), PIN(BOOT_7, EE_OFF),
23 static const unsigned int emmc_clk_pins[] = { PIN(BOOT_8, EE_OFF) };
24 static const unsigned int emmc_cmd_pins[] = { PIN(BOOT_10, EE_OFF) };
25 static const unsigned int emmc_ds_pins[] = { PIN(BOOT_15, EE_OFF) };
27 static const unsigned int nor_d_pins[] = { PIN(BOOT_11, EE_OFF) };
28 static const unsigned int nor_q_pins[] = { PIN(BOOT_12, EE_OFF) };
29 static const unsigned int nor_c_pins[] = { PIN(BOOT_13, EE_OFF) };
30 static const unsigned int nor_cs_pins[] = { PIN(BOOT_15, EE_OFF) };
32 static const unsigned int spi_mosi_pins[] = { PIN(GPIOX_8, EE_OFF) };
33 static const unsigned int spi_miso_pins[] = { PIN(GPIOX_9, EE_OFF) };
34 static const unsigned int spi_ss0_pins[] = { PIN(GPIOX_10, EE_OFF) };
35 static const unsigned int spi_sclk_pins[] = { PIN(GPIOX_11, EE_OFF) };
37 static const unsigned int sdcard_d0_pins[] = { PIN(CARD_1, EE_OFF) };
38 static const unsigned int sdcard_d1_pins[] = { PIN(CARD_0, EE_OFF) };
39 static const unsigned int sdcard_d2_pins[] = { PIN(CARD_5, EE_OFF) };
40 static const unsigned int sdcard_d3_pins[] = { PIN(CARD_4, EE_OFF) };
41 static const unsigned int sdcard_cmd_pins[] = { PIN(CARD_3, EE_OFF) };
42 static const unsigned int sdcard_clk_pins[] = { PIN(CARD_2, EE_OFF) };
44 static const unsigned int sdio_d0_pins[] = { PIN(GPIOX_0, EE_OFF) };
45 static const unsigned int sdio_d1_pins[] = { PIN(GPIOX_1, EE_OFF) };
46 static const unsigned int sdio_d2_pins[] = { PIN(GPIOX_2, EE_OFF) };
47 static const unsigned int sdio_d3_pins[] = { PIN(GPIOX_3, EE_OFF) };
48 static const unsigned int sdio_cmd_pins[] = { PIN(GPIOX_4, EE_OFF) };
49 static const unsigned int sdio_clk_pins[] = { PIN(GPIOX_5, EE_OFF) };
50 static const unsigned int sdio_irq_pins[] = { PIN(GPIOX_7, EE_OFF) };
52 static const unsigned int nand_ce0_pins[] = { PIN(BOOT_8, EE_OFF) };
53 static const unsigned int nand_ce1_pins[] = { PIN(BOOT_9, EE_OFF) };
54 static const unsigned int nand_rb0_pins[] = { PIN(BOOT_10, EE_OFF) };
55 static const unsigned int nand_ale_pins[] = { PIN(BOOT_11, EE_OFF) };
56 static const unsigned int nand_cle_pins[] = { PIN(BOOT_12, EE_OFF) };
57 static const unsigned int nand_wen_clk_pins[] = { PIN(BOOT_13, EE_OFF) };
58 static const unsigned int nand_ren_wr_pins[] = { PIN(BOOT_14, EE_OFF) };
59 static const unsigned int nand_dqs_pins[] = { PIN(BOOT_15, EE_OFF) };
61 static const unsigned int uart_tx_a_pins[] = { PIN(GPIOX_12, EE_OFF) };
62 static const unsigned int uart_rx_a_pins[] = { PIN(GPIOX_13, EE_OFF) };
63 static const unsigned int uart_cts_a_pins[] = { PIN(GPIOX_14, EE_OFF) };
64 static const unsigned int uart_rts_a_pins[] = { PIN(GPIOX_15, EE_OFF) };
66 static const unsigned int uart_tx_b_pins[] = { PIN(GPIODV_24, EE_OFF) };
67 static const unsigned int uart_rx_b_pins[] = { PIN(GPIODV_25, EE_OFF) };
68 static const unsigned int uart_cts_b_pins[] = { PIN(GPIODV_26, EE_OFF) };
69 static const unsigned int uart_rts_b_pins[] = { PIN(GPIODV_27, EE_OFF) };
71 static const unsigned int uart_tx_c_pins[] = { PIN(GPIOX_8, EE_OFF) };
72 static const unsigned int uart_rx_c_pins[] = { PIN(GPIOX_9, EE_OFF) };
73 static const unsigned int uart_cts_c_pins[] = { PIN(GPIOX_10, EE_OFF) };
74 static const unsigned int uart_rts_c_pins[] = { PIN(GPIOX_11, EE_OFF) };
76 static const unsigned int i2c_sck_a_pins[] = { PIN(GPIODV_25, EE_OFF) };
77 static const unsigned int i2c_sda_a_pins[] = { PIN(GPIODV_24, EE_OFF) };
79 static const unsigned int i2c_sck_b_pins[] = { PIN(GPIODV_27, EE_OFF) };
80 static const unsigned int i2c_sda_b_pins[] = { PIN(GPIODV_26, EE_OFF) };
82 static const unsigned int i2c_sck_c_pins[] = { PIN(GPIODV_29, EE_OFF) };
83 static const unsigned int i2c_sda_c_pins[] = { PIN(GPIODV_28, EE_OFF) };
85 static const unsigned int i2c_sck_c_dv19_pins[] = { PIN(GPIODV_19, EE_OFF) };
86 static const unsigned int i2c_sda_c_dv18_pins[] = { PIN(GPIODV_18, EE_OFF) };
88 static const unsigned int eth_mdio_pins[] = { PIN(GPIOZ_0, EE_OFF) };
89 static const unsigned int eth_mdc_pins[] = { PIN(GPIOZ_1, EE_OFF) };
90 static const unsigned int eth_clk_rx_clk_pins[] = { PIN(GPIOZ_2, EE_OFF) };
91 static const unsigned int eth_rx_dv_pins[] = { PIN(GPIOZ_3, EE_OFF) };
92 static const unsigned int eth_rxd0_pins[] = { PIN(GPIOZ_4, EE_OFF) };
93 static const unsigned int eth_rxd1_pins[] = { PIN(GPIOZ_5, EE_OFF) };
94 static const unsigned int eth_rxd2_pins[] = { PIN(GPIOZ_6, EE_OFF) };
95 static const unsigned int eth_rxd3_pins[] = { PIN(GPIOZ_7, EE_OFF) };
96 static const unsigned int eth_rgmii_tx_clk_pins[] = { PIN(GPIOZ_8, EE_OFF) };
97 static const unsigned int eth_tx_en_pins[] = { PIN(GPIOZ_9, EE_OFF) };
98 static const unsigned int eth_txd0_pins[] = { PIN(GPIOZ_10, EE_OFF) };
99 static const unsigned int eth_txd1_pins[] = { PIN(GPIOZ_11, EE_OFF) };
100 static const unsigned int eth_txd2_pins[] = { PIN(GPIOZ_12, EE_OFF) };
101 static const unsigned int eth_txd3_pins[] = { PIN(GPIOZ_13, EE_OFF) };
103 static const unsigned int pwm_a_pins[] = { PIN(GPIOX_6, EE_OFF) };
105 static const unsigned int pwm_b_pins[] = { PIN(GPIODV_29, EE_OFF) };
107 static const unsigned int pwm_c_pins[] = { PIN(GPIOZ_15, EE_OFF) };
109 static const unsigned int pwm_d_pins[] = { PIN(GPIODV_28, EE_OFF) };
111 static const unsigned int pwm_e_pins[] = { PIN(GPIOX_16, EE_OFF) };
113 static const unsigned int pwm_f_clk_pins[] = { PIN(GPIOCLK_1, EE_OFF) };
114 static const unsigned int pwm_f_x_pins[] = { PIN(GPIOX_7, EE_OFF) };
116 static const unsigned int hdmi_hpd_pins[] = { PIN(GPIOH_0, EE_OFF) };
117 static const unsigned int hdmi_sda_pins[] = { PIN(GPIOH_1, EE_OFF) };
118 static const unsigned int hdmi_scl_pins[] = { PIN(GPIOH_2, EE_OFF) };
120 static const unsigned int i2s_am_clk_pins[] = { PIN(GPIOH_6, EE_OFF) };
121 static const unsigned int i2s_out_ao_clk_pins[] = { PIN(GPIOH_7, EE_OFF) };
122 static const unsigned int i2s_out_lr_clk_pins[] = { PIN(GPIOH_8, EE_OFF) };
123 static const unsigned int i2s_out_ch01_pins[] = { PIN(GPIOH_9, EE_OFF) };
124 static const unsigned int i2s_out_ch23_z_pins[] = { PIN(GPIOZ_5, EE_OFF) };
125 static const unsigned int i2s_out_ch45_z_pins[] = { PIN(GPIOZ_6, EE_OFF) };
126 static const unsigned int i2s_out_ch67_z_pins[] = { PIN(GPIOZ_7, EE_OFF) };
128 static const unsigned int spdif_out_h_pins[] = { PIN(GPIOH_4, EE_OFF) };
130 static const unsigned int eth_link_led_pins[] = { PIN(GPIOZ_14, EE_OFF) };
131 static const unsigned int eth_act_led_pins[] = { PIN(GPIOZ_15, EE_OFF) };
133 static const unsigned int tsin_a_d0_pins[] = { PIN(GPIODV_0, EE_OFF) };
134 static const unsigned int tsin_a_d0_x_pins[] = { PIN(GPIOX_10, EE_OFF) };
135 static const unsigned int tsin_a_clk_pins[] = { PIN(GPIODV_8, EE_OFF) };
136 static const unsigned int tsin_a_clk_x_pins[] = { PIN(GPIOX_11, EE_OFF) };
137 static const unsigned int tsin_a_sop_pins[] = { PIN(GPIODV_9, EE_OFF) };
138 static const unsigned int tsin_a_sop_x_pins[] = { PIN(GPIOX_8, EE_OFF) };
139 static const unsigned int tsin_a_d_valid_pins[] = { PIN(GPIODV_10, EE_OFF) };
140 static const unsigned int tsin_a_d_valid_x_pins[] = { PIN(GPIOX_9, EE_OFF) };
141 static const unsigned int tsin_a_fail_pins[] = { PIN(GPIODV_11, EE_OFF) };
143 PIN(GPIODV_1, EE_OFF),
144 PIN(GPIODV_2, EE_OFF),
145 PIN(GPIODV_3, EE_OFF),
146 PIN(GPIODV_4, EE_OFF),
147 PIN(GPIODV_5, EE_OFF),
148 PIN(GPIODV_6, EE_OFF),
149 PIN(GPIODV_7, EE_OFF),
152 static const unsigned int uart_tx_ao_a_pins[] = { PIN(GPIOAO_0, 0) };
153 static const unsigned int uart_rx_ao_a_pins[] = { PIN(GPIOAO_1, 0) };
154 static const unsigned int uart_tx_ao_b_0_pins[] = { PIN(GPIOAO_0, 0) };
155 static const unsigned int uart_rx_ao_b_1_pins[] = { PIN(GPIOAO_1, 0) };
156 static const unsigned int uart_cts_ao_a_pins[] = { PIN(GPIOAO_2, 0) };
157 static const unsigned int uart_rts_ao_a_pins[] = { PIN(GPIOAO_3, 0) };
158 static const unsigned int uart_tx_ao_b_pins[] = { PIN(GPIOAO_4, 0) };
159 static const unsigned int uart_rx_ao_b_pins[] = { PIN(GPIOAO_5, 0) };
160 static const unsigned int uart_cts_ao_b_pins[] = { PIN(GPIOAO_2, 0) };
161 static const unsigned int uart_rts_ao_b_pins[] = { PIN(GPIOAO_3, 0) };
163 static const unsigned int i2c_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
164 static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
165 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
166 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
168 static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) };
170 static const unsigned int pwm_ao_a_3_pins[] = { PIN(GPIOAO_3, 0) };
171 static const unsigned int pwm_ao_a_8_pins[] = { PIN(GPIOAO_8, 0) };
173 static const unsigned int pwm_ao_b_pins[] = { PIN(GPIOAO_9, 0) };
174 static const unsigned int pwm_ao_b_6_pins[] = { PIN(GPIOAO_6, 0) };
176 static const unsigned int i2s_out_ch23_ao_pins[] = { PIN(GPIOAO_8, 0) };
177 static const unsigned int i2s_out_ch45_ao_pins[] = { PIN(GPIOAO_9, 0) };
179 static const unsigned int spdif_out_ao_6_pins[] = { PIN(GPIOAO_6, 0) };
180 static const unsigned int spdif_out_ao_9_pins[] = { PIN(GPIOAO_9, 0) };
182 static const unsigned int ao_cec_pins[] = { PIN(GPIOAO_8, 0) };
183 static const unsigned int ee_cec_pins[] = { PIN(GPIOAO_8, 0) };
634 FUNCTION(gpio_periphs),
635 FUNCTION(emmc),
636 FUNCTION(nor),
637 FUNCTION(spi),
638 FUNCTION(sdcard),
639 FUNCTION(sdio),
640 FUNCTION(nand),
641 FUNCTION(uart_a),
642 FUNCTION(uart_b),
643 FUNCTION(uart_c),
644 FUNCTION(i2c_a),
645 FUNCTION(i2c_b),
646 FUNCTION(i2c_c),
647 FUNCTION(eth),
648 FUNCTION(pwm_a),
649 FUNCTION(pwm_b),
650 FUNCTION(pwm_c),
651 FUNCTION(pwm_d),
652 FUNCTION(pwm_e),
653 FUNCTION(pwm_f),
654 FUNCTION(hdmi_hpd),
655 FUNCTION(hdmi_i2c),
656 FUNCTION(i2s_out),
657 FUNCTION(spdif_out),
658 FUNCTION(eth_led),
659 FUNCTION(tsin_a),
663 FUNCTION(gpio_aobus),
664 FUNCTION(uart_ao),
665 FUNCTION(uart_ao_b),
666 FUNCTION(i2c_ao),
667 FUNCTION(i2c_slave_ao),
668 FUNCTION(remote_input_ao),
669 FUNCTION(pwm_ao_a),
670 FUNCTION(pwm_ao_b),
671 FUNCTION(i2s_out_ao),
672 FUNCTION(spdif_out_ao),
673 FUNCTION(cec_ao),
678 BANK("X", PIN(GPIOX_0, EE_OFF), PIN(GPIOX_18, EE_OFF), 4, 0, 4, 0, 12, 0, 13, 0, 14, 0),
679 BANK("DV", PIN(GPIODV_0, EE_OFF), PIN(GPIODV_29, EE_OFF), 0, 0, 0, 0, 0, 0, 1, 0, 2, 0),
680 BANK("H", PIN(GPIOH_0, EE_OFF), PIN(GPIOH_9, EE_OFF), 1, 20, 1, 20, 3, 20, 4, 20, 5, 20),
681 BANK("Z", PIN(GPIOZ_0, EE_OFF), PIN(GPIOZ_15, EE_OFF), 3, 0, 3, 0, 9, 0, 10, 0, 11, 0),
682 BANK("CARD", PIN(CARD_0, EE_OFF), PIN(CARD_6, EE_OFF), 2, 20, 2, 20, 6, 20, 7, 20, 8, 20),
683 BANK("BOOT", PIN(BOOT_0, EE_OFF), PIN(BOOT_15, EE_OFF), 2, 0, 2, 0, 6, 0, 7, 0, 8, 0),
684 …BANK("CLK", PIN(GPIOCLK_0, EE_OFF), PIN(GPIOCLK_1, EE_OFF), 3, 28, 3, 28, 9, 28, 10, 28, 11, 28…
689 BANK("AO", PIN(GPIOAO_0, 0), PIN(GPIOAO_9, 0), 0, 0, 0, 16, 0, 0, 0, 16, 1, 0),
693 .name = "periphs-banks",
706 .name = "aobus-banks",
720 .compatible = "amlogic,meson-gxl-periphs-pinctrl",
724 .compatible = "amlogic,meson-gxl-aobus-pinctrl",
731 .name = "meson-gxl-pinctrl",