7233f6086c6fb057812cf09105bda8bcd7ed330b
[openwrt/staging/nbd.git] / target / linux / realtek / dts-5.10 / rtl8380_zyxel_gs1900.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "rtl838x.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 aliases {
10 led-boot = &led_sys;
11 led-failsafe = &led_sys;
12 led-running = &led_sys;
13 led-upgrade = &led_sys;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x8000000>;
23 };
24
25 keys {
26 compatible = "gpio-keys-polled";
27 poll-interval = <20>;
28
29 reset {
30 label = "reset";
31 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 leds {
37 pinctrl-names = "default";
38 pinctrl-0 = <&pinmux_disable_sys_led>;
39 compatible = "gpio-leds";
40
41 led_sys: sys {
42 label = "green:sys";
43 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
44 };
45 };
46 };
47
48 &gpio1 {
49 status = "okay";
50
51 poe_enable {
52 gpio-hog;
53 gpios = <13 0>;
54 output-high;
55 };
56 };
57
58 &spi0 {
59 status = "okay";
60
61 flash@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <10000000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x40000>;
74 read-only;
75 };
76 partition@40000 {
77 label = "u-boot-env";
78 reg = <0x40000 0x10000>;
79 read-only;
80 };
81 partition@50000 {
82 label = "u-boot-env2";
83 reg = <0x50000 0x10000>;
84 };
85 partition@60000 {
86 label = "jffs";
87 reg = <0x60000 0x100000>;
88 };
89 partition@160000 {
90 label = "jffs2";
91 reg = <0x160000 0x100000>;
92 };
93 partition@b260000 {
94 label = "firmware";
95 reg = <0x260000 0x6d0000>;
96 compatible = "openwrt,uimage", "denx,uimage";
97 openwrt,ih-magic = <0x83800000>;
98 };
99 partition@930000 {
100 label = "runtime2";
101 reg = <0x930000 0x6d0000>;
102 };
103 };
104 };
105 };
106
107 &ethernet0 {
108 mdio: mdio-bus {
109 compatible = "realtek,rtl838x-mdio";
110 regmap = <&ethernet0>;
111 #address-cells = <1>;
112 #size-cells = <0>;
113
114 INTERNAL_PHY(8)
115 INTERNAL_PHY(9)
116 INTERNAL_PHY(10)
117 INTERNAL_PHY(11)
118 INTERNAL_PHY(12)
119 INTERNAL_PHY(13)
120 INTERNAL_PHY(14)
121 INTERNAL_PHY(15)
122 };
123 };
124
125 &switch0 {
126 ports {
127 #address-cells = <1>;
128 #size-cells = <0>;
129
130 SWITCH_PORT(8, 1, internal)
131 SWITCH_PORT(9, 2, internal)
132 SWITCH_PORT(10, 3, internal)
133 SWITCH_PORT(11, 4, internal)
134 SWITCH_PORT(12, 5, internal)
135 SWITCH_PORT(13, 6, internal)
136 SWITCH_PORT(14, 7, internal)
137 SWITCH_PORT(15, 8, internal)
138
139 port@28 {
140 ethernet = <&ethernet0>;
141 reg = <28>;
142 phy-mode = "internal";
143
144 fixed-link {
145 speed = <1000>;
146 full-duplex;
147 };
148 };
149 };
150 };