2 +++ b/arch/arm/dts/sun8i-h2-plus-bananapi-p2-zero.dts
4 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
6 + * Copyright (C) 2023 Zoltan HERPAI <wigyori@uid0.hu>
8 + * Based on sun8i-h2-plus-bananapi-m2-zero.dts, which is:
9 + * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
13 +#include "sun8i-h3.dtsi"
14 +#include "sunxi-common-regulators.dtsi"
16 +#include <dt-bindings/gpio/gpio.h>
17 +#include <dt-bindings/input/input.h>
20 + model = "Banana Pi BPI-P2-Zero";
21 + compatible = "sinovoip,bpi-p2-zero", "allwinner,sun8i-h2-plus";
30 + stdout-path = "serial0:115200n8";
34 + compatible = "hdmi-connector";
38 + hdmi_con_in: endpoint {
39 + remote-endpoint = <&hdmi_out_con>;
45 + compatible = "gpio-leds";
48 + label = "bananapi-p2-zero:red:pwr";
49 + gpios = <&r_pio 0 10 GPIO_ACTIVE_LOW>; /* PL10 */
50 + default-state = "on";
55 + compatible = "gpio-keys";
59 + linux,code = <KEY_POWER>;
60 + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
65 + reg_vdd_cpux: vdd-cpux-regulator {
66 + compatible = "regulator-gpio";
67 + regulator-name = "vdd-cpux";
68 + regulator-type = "voltage";
70 + regulator-always-on;
71 + regulator-min-microvolt = <1100000>;
72 + regulator-max-microvolt = <1300000>;
73 + regulator-ramp-delay = <50>; /* 4ms */
75 + gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */
77 + gpios-states = <0x1>;
78 + states = <1100000 0>, <1300000 1>;
81 + reg_vcc_dram: vcc-dram {
82 + compatible = "regulator-fixed";
83 + regulator-name = "vcc-dram";
84 + regulator-min-microvolt = <1500000>;
85 + regulator-max-microvolt = <1500000>;
86 + regulator-always-on;
89 + gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
90 + vin-supply = <®_vcc5v0>;
93 + reg_vcc1v2: vcc1v2 {
94 + compatible = "regulator-fixed";
95 + regulator-name = "vcc1v2";
96 + regulator-min-microvolt = <1200000>;
97 + regulator-max-microvolt = <1200000>;
98 + regulator-always-on;
100 + enable-active-high;
101 + gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
102 + vin-supply = <®_vcc5v0>;
106 + compatible = "regulator-poweroff";
107 + cpu-supply = <®_vcc1v2>;
110 + wifi_pwrseq: wifi_pwrseq {
111 + compatible = "mmc-pwrseq-simple";
112 + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
113 + clocks = <&rtc CLK_OSC32K_FANOUT>;
114 + clock-names = "ext_clock";
119 + cpu-supply = <®_vdd_cpux>;
131 + phy-handle = <&int_mii_phy>;
133 + allwinner,leds-active-low;
142 + hdmi_out_con: endpoint {
143 + remote-endpoint = <&hdmi_con_in>;
148 + vmmc-supply = <®_vcc3v3>;
151 + * On the production batch of this board the card detect GPIO is
152 + * high active (card inserted), although on the early samples it's
155 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
160 + vmmc-supply = <®_vcc3v3>;
161 + vqmmc-supply = <®_vcc3v3>;
162 + mmc-pwrseq = <&wifi_pwrseq>;
169 + compatible = "brcm,bcm4329-fmac";
170 + interrupt-parent = <&pio>;
171 + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
172 + interrupt-names = "host-wake";
177 + pinctrl-names = "default";
178 + pinctrl-0 = <&mmc2_8bit_pins>;
179 + vmmc-supply = <®_vcc3v3>;
180 + vqmmc-supply = <®_vcc3v3>;
191 + pinctrl-names = "default";
192 + pinctrl-0 = <&uart0_pa_pins>;
197 + pinctrl-names = "default";
198 + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
203 + compatible = "brcm,bcm43438-bt";
204 + max-speed = <1500000>;
205 + clocks = <&rtc CLK_OSC32K_FANOUT>;
206 + clock-names = "lpo";
207 + vbat-supply = <®_vcc3v3>;
208 + vddio-supply = <®_vcc3v3>;
209 + device-wakeup-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
210 + host-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
211 + shutdown-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
219 + "CON2-P13", "CON2-P11", "CON2-P22", "CON2-P15",
220 + "CON3-P03", "CON3-P02", "CON2-P07", "CON2-P29",
221 + "CON2-P31", "CON2-P33", "CON2-P35", "CON2-P05",
222 + "CON2-P03", "CON2-P08", "CON2-P10", "CON2-P16",
223 + "CON2-P12", "CON2-P37", "CON2-P28", "CON2-P27",
224 + "CON2-P40", "CON2-P38", "", "",
225 + "", "", "", "", "", "", "", "",
228 + "", "", "", "", "", "", "", "",
229 + "", "", "", "", "", "", "", "",
230 + "", "", "", "", "", "", "", "",
231 + "", "", "", "", "", "", "", "",
234 + "CON2-P19", "CON2-P21", "CON2-P23", "CON2-P24",
235 + "CON2-P18", "", "", "CON2-P26",
236 + "", "", "", "", "", "", "", "",
237 + "", "", "", "", "", "", "", "",
238 + "", "", "", "", "", "", "", "",
241 + "", "", "", "", "", "", "", "",
242 + "", "", "", "", "", "", "CSI-PWR-EN", "",
243 + "", "", "", "", "", "", "", "",
244 + "", "", "", "", "", "", "", "",
247 + "CN3-P17", "CN3-P13", "CN3-P09", "CN3-P07",
248 + "CN3-P19", "CN3-P21", "CN3-P22", "CN3-P20",
249 + "CN3-P18", "CN3-P16", "CN3-P14", "CN3-P12",
250 + "CN3-P05", "CN3-P03", "CN3-P06", "CN3-P08",
251 + "", "", "", "", "", "", "", "",
252 + "", "", "", "", "", "", "", "",
255 + "SDC0-D1", "SDC0-D0", "SDC0-CLK", "SDC0-CMD", "SDC0-D3",
256 + "SDC0-D2", "SDC0-DET", "",
257 + "", "", "", "", "", "", "", "",
258 + "", "", "", "", "", "", "", "",
259 + "", "", "", "", "", "", "", "",
262 + "WL-SDIO-CLK", "WL-SDIO-CMD", "WL-SDIO-D0", "WL-SDIO-D1",
263 + "WL-SDIO-D2", "WL-SDIO-D3", "BT-UART-TX", "BT-UART-RX",
264 + "BT-UART-RTS", "BT-UART-CTS", "WL-WAKE-AP", "BT-WAKE-AP",
265 + "BT-RST-N", "AP-WAKE-BT", "", "",
266 + "", "", "", "", "", "", "", "",
267 + "", "", "", "", "", "", "", "";
273 + "", "CPUX-SET", "CON2-P32", "POWER-KEY", "CON2-P36",
274 + "VCC-IO-EN", "USB0-ID", "WL-PWR-EN",
275 + "PWR-STB", "PWR-DRAM", "PWR-LED", "IR-RX", "", "", "", "",
276 + "", "", "", "", "", "", "", "",
277 + "", "", "", "", "", "", "", "";
286 + usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
288 + * There're two micro-USB connectors, one is power-only and another is
289 + * OTG. The Vbus of these two connectors are connected together, so
290 + * the external USB device will be powered just by the power input
291 + * from the power-only USB port.
296 +++ b/configs/bananapi_p2_zero_defconfig
300 +CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-bananapi-p2-zero"
302 +CONFIG_MACH_SUN8I_H3=y
304 +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
305 +CONFIG_MMC_SUNXI_SLOT_EXTRA=2
307 +CONFIG_USB_EHCI_HCD=y