f4ca1686dd08cdfa139cfaaef82473e6171cba95
[openwrt/staging/nbd.git] / target / linux / realtek / dts-5.10 / rtl8382_allnet_all-sg8208m.dts
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 compatible = "allnet,all-sg8208m", "realtek,rtl838x-soc";
10 model = "ALLNET ALL-SG8208M";
11
12 aliases {
13 led-boot = &led_sys;
14 led-failsafe = &led_sys;
15 led-running = &led_sys;
16 led-upgrade = &led_sys;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x8000000>;
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 poll-interval = <20>;
31
32 /* is this pin 3 on the external RTL8231 (&gpio1)? */
33 /*reset {
34 label = "reset";
35 gpios = <&gpio0 67 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };*/
38 };
39
40 leds {
41 pinctrl-names = "default";
42 pinctrl-0 = <&pinmux_disable_sys_led>;
43 compatible = "gpio-leds";
44
45 led_sys: sys {
46 label = "green:sys";
47 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
48 };
49 // GPIO 25: power on/off all port leds
50 };
51 };
52
53 &spi0 {
54 status = "okay";
55
56 flash@0 {
57 compatible = "jedec,spi-nor";
58 reg = <0>;
59 spi-max-frequency = <10000000>;
60
61 partitions {
62 compatible = "fixed-partitions";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 partition@0 {
67 label = "u-boot";
68 reg = <0x0 0x80000>;
69 read-only;
70 };
71
72 partition@80000 {
73 label = "u-boot-env";
74 reg = <0x80000 0x10000>;
75 read-only;
76 };
77
78 partition@90000 {
79 label = "u-boot-env2";
80 reg = <0x90000 0x10000>;
81 };
82
83 partition@a0000 {
84 label = "jffs";
85 reg = <0xa0000 0x100000>;
86 };
87
88 partition@1a0000 {
89 label = "jffs2";
90 reg = <0x1a0000 0x100000>;
91 };
92
93 partition@2a0000 {
94 label = "firmware";
95 reg = <0x2a0000 0xd60000>;
96 compatible = "openwrt,uimage", "denx,uimage";
97 openwrt,ih-magic = <0x00000006>;
98 };
99 };
100 };
101 };
102
103 &ethernet0 {
104 mdio: mdio-bus {
105 compatible = "realtek,rtl838x-mdio";
106 regmap = <&ethernet0>;
107 #address-cells = <1>;
108 #size-cells = <0>;
109
110 INTERNAL_PHY(8)
111 INTERNAL_PHY(9)
112 INTERNAL_PHY(10)
113 INTERNAL_PHY(11)
114 INTERNAL_PHY(12)
115 INTERNAL_PHY(13)
116 INTERNAL_PHY(14)
117 INTERNAL_PHY(15)
118 };
119 };
120
121 &switch0 {
122 ports {
123 #address-cells = <1>;
124 #size-cells = <0>;
125
126 SWITCH_PORT(8, 1, internal)
127 SWITCH_PORT(9, 2, internal)
128 SWITCH_PORT(10, 3, internal)
129 SWITCH_PORT(11, 4, internal)
130 SWITCH_PORT(12, 5, internal)
131 SWITCH_PORT(13, 6, internal)
132 SWITCH_PORT(14, 7, internal)
133 SWITCH_PORT(15, 8, internal)
134
135 port@28 {
136 ethernet = <&ethernet0>;
137 reg = <28>;
138 phy-mode = "internal";
139 fixed-link {
140 speed = <1000>;
141 full-duplex;
142 };
143 };
144 };
145 };