9987316c21a9a2cb9508c61e9b771e6af4d607f3
[openwrt/staging/rmilecki.git] / target / linux / realtek / dts / rtl8382_d-link_dgs-1210-10p.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "rtl838x.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "d-link,dgs-1210-10p", "realtek,rtl838x-soc";
10 model = "D-Link DGS-1210-10P";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_power: power {
27 // GPIO 24 seems to provide power to the leds
28 label = "green:power";
29 gpios = <&gpio0 47 GPIO_ACTIVE_LOW>;
30 };
31 };
32
33 keys {
34 compatible = "gpio-keys-polled";
35 poll-interval = <20>;
36
37 mode {
38 label = "reset";
39 gpios = <&gpio0 94 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42 };
43 };
44
45
46 &gpio0 {
47 indirect-access-bus-id = <0>;
48 };
49
50 &spi0 {
51 status = "okay";
52 flash@0 {
53 compatible = "jedec,spi-nor";
54 reg = <0>;
55 spi-max-frequency = <10000000>;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 partition@0 {
63 label = "u-boot";
64 reg = <0x00000000 0x80000>;
65 read-only;
66 };
67 partition@80000 {
68 label = "u-boot-env";
69 reg = <0x00080000 0x40000>;
70 read-only;
71 };
72 partition@c0000 {
73 label = "u-boot-env2";
74 reg = <0x000c0000 0x40000>;
75 read-only;
76 };
77 partition@280000 {
78 label = "firmware";
79 compatible = "denx,uimage";
80 reg = <0x00100000 0xd80000>;
81 };
82 partition@be80000 {
83 label = "kernel2";
84 reg = <0x00e80000 0x180000>;
85 };
86 partition@1000000 {
87 label = "sysinfo";
88 reg = <0x01000000 0x40000>;
89 };
90 partition@1040000 {
91 label = "rootfs2";
92 reg = <0x01040000 0xc00000>;
93 };
94 partition@1c40000 {
95 label = "jffs2";
96 reg = <0x01c40000 0x3c0000>;
97 };
98 };
99 };
100 };
101
102 &ethernet0 {
103 mdio: mdio-bus {
104 compatible = "realtek,rtl838x-mdio";
105 regmap = <&ethernet0>;
106 #address-cells = <1>;
107 #size-cells = <0>;
108
109 INTERNAL_PHY(8)
110 INTERNAL_PHY(9)
111 INTERNAL_PHY(10)
112 INTERNAL_PHY(11)
113 INTERNAL_PHY(12)
114 INTERNAL_PHY(13)
115 INTERNAL_PHY(14)
116 INTERNAL_PHY(15)
117 INTERNAL_PHY(24)
118 INTERNAL_PHY(26)
119 };
120 };
121
122 &switch0 {
123 ports {
124 #address-cells = <1>;
125 #size-cells = <0>;
126
127 SWITCH_PORT(8, 1, internal)
128 SWITCH_PORT(9, 2, internal)
129 SWITCH_PORT(10, 3, internal)
130 SWITCH_PORT(11, 4, internal)
131 SWITCH_PORT(12, 5, internal)
132 SWITCH_PORT(13, 6, internal)
133 SWITCH_PORT(14, 7, internal)
134 SWITCH_PORT(15, 8, internal)
135 SWITCH_PORT(24, 9, internal)
136 SWITCH_PORT(26, 10, internal)
137
138 port@28 {
139 ethernet = <&ethernet0>;
140 reg = <28>;
141 phy-mode = "internal";
142 fixed-link {
143 speed = <1000>;
144 full-duplex;
145 };
146 };
147 };
148 };