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