blob: 4250e4e9dbbe1584c89e57ddc722dc2cda5c8d15 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001--- a/arch/arm/dts/Makefile
2+++ b/arch/arm/dts/Makefile
3@@ -539,7 +539,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
4 sun8i-h3-orangepi-plus.dtb \
5 sun8i-h3-orangepi-plus2e.dtb \
6 sun8i-h3-orangepi-zero-plus2.dtb \
7- sun8i-h3-rervision-dvk.dtb
8+ sun8i-h3-rervision-dvk.dtb \
9+ sun8i-h3-zeropi.dtb
10 dtb-$(CONFIG_MACH_SUN8I_R40) += \
11 sun8i-r40-bananapi-m2-ultra.dtb \
12 sun8i-v40-bananapi-m2-berry.dtb
13--- /dev/null
14+++ b/arch/arm/dts/sun8i-h3-zeropi.dts
15@@ -0,0 +1,66 @@
16+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
17+
18+#include "sun8i-h3-nanopi.dtsi"
19+
20+/ {
21+ model = "FriendlyElec ZeroPi";
22+ compatible = "friendlyarm,zeropi", "allwinner,sun8i-h3";
23+
24+ aliases {
25+ ethernet0 = &emac;
26+ };
27+
28+ reg_gmac_3v3: gmac-3v3 {
29+ compatible = "regulator-fixed";
30+ pinctrl-names = "default";
31+ pinctrl-0 = <&gmac_power_pin_nanopi>;
32+ regulator-name = "gmac-3v3";
33+ regulator-min-microvolt = <3300000>;
34+ regulator-max-microvolt = <3300000>;
35+ startup-delay-us = <100000>;
36+ enable-active-high;
37+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
38+ };
39+};
40+
41+&ehci0 {
42+ status = "okay";
43+};
44+
45+&ohci0 {
46+ status = "okay";
47+};
48+
49+&pio {
50+ gmac_power_pin_nanopi: gmac_power_pin@0 {
51+ pins = "PD6";
52+ function = "gpio_out";
53+ };
54+};
55+
56+&external_mdio {
57+ ext_rgmii_phy: ethernet-phy@1 {
58+ compatible = "ethernet-phy-ieee802.3-c22";
59+ reg = <7>;
60+ };
61+};
62+
63+&emac {
64+ pinctrl-names = "default";
65+ pinctrl-0 = <&emac_rgmii_pins>;
66+ phy-supply = <&reg_gmac_3v3>;
67+ phy-handle = <&ext_rgmii_phy>;
68+ phy-mode = "rgmii";
69+
70+ allwinner,leds-active-low;
71+ status = "okay";
72+};
73+
74+&usb_otg {
75+ status = "okay";
76+ dr_mode = "peripheral";
77+};
78+
79+&usbphy {
80+ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
81+};