0d34ca5dc221b97f10fe0ef46ac9fae3dabf114e
[openwrt/staging/zorun.git] / target / linux / realtek / dts / rtl8380_netgear_gigabit.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 compatible = "realtek,rtl838x-soc";
10
11 chosen {
12 bootargs = "console=ttyS0,115200";
13 };
14
15 memory@0 {
16 device_type = "memory";
17 reg = <0x0 0x8000000>;
18 };
19
20 keys {
21 compatible = "gpio-keys-polled";
22 poll-interval = <20>;
23
24 mode {
25 label = "reset";
26 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29 };
30 };
31
32 &gpio0 {
33 indirect-access-bus-id = <0>;
34 };
35
36 &spi0 {
37 status = "okay";
38
39 flash@0 {
40 compatible = "jedec,spi-nor";
41 reg = <0>;
42 spi-max-frequency = <50000000>;
43
44 partitions {
45 compatible = "fixed-partitions";
46 #address-cells = <1>;
47 #size-cells = <1>;
48
49 partition@0 {
50 label = "u-boot";
51 reg = <0x0000000 0x00e0000>;
52 read-only;
53 };
54
55 partition@e0000 {
56 label = "u-boot-env";
57 reg = <0x00e0000 0x0010000>;
58 read-only;
59 };
60
61 partition@f0000 {
62 label = "u-boot-env2";
63 reg = <0x00f0000 0x0010000>;
64 };
65
66 partition@100000 {
67 label = "jffs";
68 reg = <0x0100000 0x0100000>;
69 read-only;
70 };
71
72 partition@200000 {
73 label = "jffs2";
74 reg = <0x0200000 0x0100000>;
75 read-only;
76 };
77
78 partition@300000 {
79 label = "firmware";
80 compatible = "openwrt,uimage", "denx,uimage";
81 openwrt,ih-magic = <0x4e474520>;
82 reg = <0x0300000 0x0e80000>;
83 };
84
85 partition@1180000 {
86 label = "runtime2";
87 reg = <0x1180000 0x0e80000>;
88 read-only;
89 };
90 };
91 };
92 };
93
94 &ethernet0 {
95 mdio: mdio-bus {
96 compatible = "realtek,rtl838x-mdio";
97 regmap = <&ethernet0>;
98 #address-cells = <1>;
99 #size-cells = <0>;
100
101 INTERNAL_PHY(8)
102 INTERNAL_PHY(9)
103 INTERNAL_PHY(10)
104 INTERNAL_PHY(11)
105 INTERNAL_PHY(12)
106 INTERNAL_PHY(13)
107 INTERNAL_PHY(14)
108 INTERNAL_PHY(15)
109 };
110 };
111
112 &switch0 {
113 ports {
114 #address-cells = <1>;
115 #size-cells = <0>;
116
117 SWITCH_PORT(8, 1, internal)
118 SWITCH_PORT(9, 2, internal)
119 SWITCH_PORT(10, 3, internal)
120 SWITCH_PORT(11, 4, internal)
121 SWITCH_PORT(12, 5, internal)
122 SWITCH_PORT(13, 6, internal)
123 SWITCH_PORT(14, 7, internal)
124 SWITCH_PORT(15, 8, internal)
125
126 port@28 {
127 ethernet = <&ethernet0>;
128 reg = <28>;
129 phy-mode = "internal";
130 fixed-link {
131 speed = <1000>;
132 full-duplex;
133 };
134 };
135 };
136 };