1 --- a/arch/arm/boot/dts/Makefile
2 +++ b/arch/arm/boot/dts/Makefile
3 @@ -1352,6 +1352,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
4 sun8i-a83t-cubietruck-plus.dtb \
5 sun8i-a83t-tbs-a711.dtb \
6 sun8i-h2-plus-bananapi-m2-zero.dtb \
7 + sun8i-h2-plus-bananapi-p2-zero.dtb \
8 sun8i-h2-plus-libretech-all-h3-cc.dtb \
9 sun8i-h2-plus-orangepi-r1.dtb \
10 sun8i-h2-plus-orangepi-zero.dtb \
12 +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-p2-zero.dts
14 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
16 + * Copyright (C) 2023 Zoltan HERPAI <wigyori@uid0.hu>
18 + * Based on sun8i-h2-plus-bananapi-m2-zero.dts, which is:
19 + * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
23 +#include "sun8i-h3.dtsi"
24 +#include "sunxi-common-regulators.dtsi"
26 +#include <dt-bindings/gpio/gpio.h>
27 +#include <dt-bindings/input/input.h>
30 + model = "Banana Pi BPI-P2-Zero";
31 + compatible = "sinovoip,bpi-p2-zero", "allwinner,sun8i-h2-plus";
39 + stdout-path = "serial0:115200n8";
43 + compatible = "hdmi-connector";
47 + hdmi_con_in: endpoint {
48 + remote-endpoint = <&hdmi_out_con>;
54 + compatible = "gpio-leds";
57 + label = "bananapi-p2-zero:red:pwr";
58 + gpios = <&r_pio 0 10 GPIO_ACTIVE_LOW>; /* PL10 */
59 + default-state = "on";
64 + compatible = "gpio-keys";
68 + linux,code = <BTN_0>;
69 + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
73 + reg_vdd_cpux: vdd-cpux-regulator {
74 + compatible = "regulator-gpio";
75 + regulator-name = "vdd-cpux";
76 + regulator-type = "voltage";
78 + regulator-always-on;
79 + regulator-min-microvolt = <1100000>;
80 + regulator-max-microvolt = <1300000>;
81 + regulator-ramp-delay = <50>; /* 4ms */
83 + gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */
85 + gpios-states = <0x1>;
86 + states = <1100000 0>, <1300000 1>;
89 + reg_vcc_dram: vcc-dram {
90 + compatible = "regulator-fixed";
91 + regulator-name = "vcc-dram";
92 + regulator-min-microvolt = <1500000>;
93 + regulator-max-microvolt = <1500000>;
94 + regulator-always-on;
97 + gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
98 + vin-supply = <®_vcc5v0>;
101 + reg_vcc1v2: vcc1v2 {
102 + compatible = "regulator-fixed";
103 + regulator-name = "vcc1v2";
104 + regulator-min-microvolt = <1200000>;
105 + regulator-max-microvolt = <1200000>;
106 + regulator-always-on;
108 + enable-active-high;
109 + gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
110 + vin-supply = <®_vcc5v0>;
114 + compatible = "regulator-poweroff";
115 + cpu-supply = <®_vcc1v2>;
118 + wifi_pwrseq: wifi_pwrseq {
119 + compatible = "mmc-pwrseq-simple";
120 + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
122 + clock-names = "ext_clock";
127 + cpu-supply = <®_vdd_cpux>;
139 + phy-handle = <&int_mii_phy>;
141 + allwinner,leds-active-low;
150 + hdmi_out_con: endpoint {
151 + remote-endpoint = <&hdmi_con_in>;
156 + vmmc-supply = <®_vcc3v3>;
159 + * On the production batch of this board the card detect GPIO is
160 + * high active (card inserted), although on the early samples it's
163 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
168 + vmmc-supply = <®_vcc3v3>;
169 + vqmmc-supply = <®_vcc3v3>;
170 + mmc-pwrseq = <&wifi_pwrseq>;
177 + compatible = "brcm,bcm4329-fmac";
178 + interrupt-parent = <&pio>;
179 + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
180 + interrupt-names = "host-wake";
189 + pinctrl-names = "default";
190 + pinctrl-0 = <&uart0_pa_pins>;
195 + pinctrl-names = "default";
196 + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
201 + compatible = "brcm,bcm43438-bt";
202 + max-speed = <1500000>;
204 + clock-names = "lpo";
205 + vbat-supply = <®_vcc3v3>;
206 + vddio-supply = <®_vcc3v3>;
207 + device-wakeup-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
208 + host-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
209 + shutdown-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
217 + "CON2-P13", "CON2-P11", "CON2-P22", "CON2-P15",
218 + "CON3-P03", "CON3-P02", "CON2-P07", "CON2-P29",
219 + "CON2-P31", "CON2-P33", "CON2-P35", "CON2-P05",
220 + "CON2-P03", "CON2-P08", "CON2-P10", "CON2-P16",
221 + "CON2-P12", "CON2-P37", "CON2-P28", "CON2-P27",
222 + "CON2-P40", "CON2-P38", "", "",
223 + "", "", "", "", "", "", "", "",
226 + "", "", "", "", "", "", "", "",
227 + "", "", "", "", "", "", "", "",
228 + "", "", "", "", "", "", "", "",
229 + "", "", "", "", "", "", "", "",
232 + "CON2-P19", "CON2-P21", "CON2-P23", "CON2-P24",
233 + "CON2-P18", "", "", "CON2-P26",
234 + "", "", "", "", "", "", "", "",
235 + "", "", "", "", "", "", "", "",
236 + "", "", "", "", "", "", "", "",
239 + "", "", "", "", "", "", "", "",
240 + "", "", "", "", "", "", "CSI-PWR-EN", "",
241 + "", "", "", "", "", "", "", "",
242 + "", "", "", "", "", "", "", "",
245 + "CN3-P17", "CN3-P13", "CN3-P09", "CN3-P07",
246 + "CN3-P19", "CN3-P21", "CN3-P22", "CN3-P20",
247 + "CN3-P18", "CN3-P16", "CN3-P14", "CN3-P12",
248 + "CN3-P05", "CN3-P03", "CN3-P06", "CN3-P08",
249 + "", "", "", "", "", "", "", "",
250 + "", "", "", "", "", "", "", "",
253 + "SDC0-D1", "SDC0-D0", "SDC0-CLK", "SDC0-CMD", "SDC0-D3",
254 + "SDC0-D2", "SDC0-DET", "",
255 + "", "", "", "", "", "", "", "",
256 + "", "", "", "", "", "", "", "",
257 + "", "", "", "", "", "", "", "",
260 + "WL-SDIO-CLK", "WL-SDIO-CMD", "WL-SDIO-D0", "WL-SDIO-D1",
261 + "WL-SDIO-D2", "WL-SDIO-D3", "BT-UART-TX", "BT-UART-RX",
262 + "BT-UART-RTS", "BT-UART-CTS", "WL-WAKE-AP", "BT-WAKE-AP",
263 + "BT-RST-N", "AP-WAKE-BT", "", "",
264 + "", "", "", "", "", "", "", "",
265 + "", "", "", "", "", "", "", "";
271 + "", "CPUX-SET", "CON2-P32", "POWER-KEY", "CON2-P36",
272 + "VCC-IO-EN", "USB0-ID", "WL-PWR-EN",
273 + "PWR-STB", "PWR-DRAM", "PWR-LED", "IR-RX", "", "", "", "",
274 + "", "", "", "", "", "", "", "",
275 + "", "", "", "", "", "", "", "";
284 + usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
286 + * There're two micro-USB connectors, one is power-only and another is
287 + * OTG. The Vbus of these two connectors are connected together, so
288 + * the external USB device will be powered just by the power input
289 + * from the power-only USB port.