a2ebdad11be012fda0f8d19f4e82696363fc214e
[openwrt/staging/mkresin.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 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x8000000>;
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 led_power: power {
32 // GPIO 24 seems to provide power to the leds
33 label = "green:power";
34 gpios = <&gpio0 47 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys-polled";
40 poll-interval = <20>;
41
42 mode {
43 label = "reset";
44 gpios = <&gpio0 94 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47 };
48 };
49
50
51 &gpio0 {
52 indirect-access-bus-id = <0>;
53 };
54
55 &spi0 {
56 status = "okay";
57 flash@0 {
58 compatible = "jedec,spi-nor";
59 reg = <0>;
60 spi-max-frequency = <10000000>;
61
62 partitions {
63 compatible = "fixed-partitions";
64 #address-cells = <1>;
65 #size-cells = <1>;
66
67 partition@0 {
68 label = "u-boot";
69 reg = <0x00000000 0x80000>;
70 read-only;
71 };
72 partition@80000 {
73 label = "u-boot-env";
74 reg = <0x00080000 0x40000>;
75 read-only;
76 };
77 partition@c0000 {
78 label = "u-boot-env2";
79 reg = <0x000c0000 0x40000>;
80 read-only;
81 };
82 partition@280000 {
83 label = "firmware";
84 compatible = "denx,uimage";
85 reg = <0x00100000 0xd80000>;
86 };
87 partition@be80000 {
88 label = "kernel2";
89 reg = <0x00e80000 0x180000>;
90 };
91 partition@1000000 {
92 label = "sysinfo";
93 reg = <0x01000000 0x40000>;
94 };
95 partition@1040000 {
96 label = "rootfs2";
97 reg = <0x01040000 0xc00000>;
98 };
99 partition@1c40000 {
100 label = "jffs2";
101 reg = <0x01c40000 0x3c0000>;
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 INTERNAL_PHY(24)
123 INTERNAL_PHY(26)
124 };
125 };
126
127 &switch0 {
128 ports {
129 #address-cells = <1>;
130 #size-cells = <0>;
131
132 SWITCH_PORT(8, 1, internal)
133 SWITCH_PORT(9, 2, internal)
134 SWITCH_PORT(10, 3, internal)
135 SWITCH_PORT(11, 4, internal)
136 SWITCH_PORT(12, 5, internal)
137 SWITCH_PORT(13, 6, internal)
138 SWITCH_PORT(14, 7, internal)
139 SWITCH_PORT(15, 8, internal)
140 SWITCH_SFP_PORT(24, 9, rgmii-id)
141 SWITCH_SFP_PORT(26, 10, rgmii-id)
142
143 port@28 {
144 ethernet = <&ethernet0>;
145 reg = <28>;
146 phy-mode = "internal";
147 fixed-link {
148 speed = <1000>;
149 full-duplex;
150 };
151 };
152 };
153 };