realtek: Add support for Netgear S350 series switches GS308T and GS310TP
[openwrt/openwrt.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 &ethernet0 {
37 mdio: mdio-bus {
38 compatible = "realtek,rtl838x-mdio";
39 regmap = <&ethernet0>;
40 #address-cells = <1>;
41 #size-cells = <0>;
42
43 INTERNAL_PHY(8)
44 INTERNAL_PHY(9)
45 INTERNAL_PHY(10)
46 INTERNAL_PHY(11)
47 INTERNAL_PHY(12)
48 INTERNAL_PHY(13)
49 INTERNAL_PHY(14)
50 INTERNAL_PHY(15)
51 };
52 };
53
54 &switch0 {
55 ports {
56 #address-cells = <1>;
57 #size-cells = <0>;
58
59 SWITCH_PORT(8, 1, internal)
60 SWITCH_PORT(9, 2, internal)
61 SWITCH_PORT(10, 3, internal)
62 SWITCH_PORT(11, 4, internal)
63 SWITCH_PORT(12, 5, internal)
64 SWITCH_PORT(13, 6, internal)
65 SWITCH_PORT(14, 7, internal)
66 SWITCH_PORT(15, 8, internal)
67
68 port@28 {
69 ethernet = <&ethernet0>;
70 reg = <28>;
71 phy-mode = "internal";
72 fixed-link {
73 speed = <1000>;
74 full-duplex;
75 };
76 };
77 };
78 };