realtek: add support for HPE 1920-8g-poe+
[openwrt/staging/hauke.git] / target / linux / realtek / dts-5.15 / rtl8380_hpe_1920-8g.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "rtl838x.dtsi"
4 #include "rtl838x_hpe_1920.dtsi"
5
6 / {
7 gpio1: rtl8231-gpio {
8 compatible = "realtek,rtl8231-gpio";
9 #gpio-cells = <2>;
10 gpio-controller;
11 indirect-access-bus-id = <0>;
12 };
13
14 i2c0: i2c-gpio-0 {
15 compatible = "i2c-gpio";
16 sda-gpios = <&gpio1 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
17 scl-gpios = <&gpio1 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
18 i2c-gpio,delay-us = <2>;
19 #address-cells = <1>;
20 #size-cells = <0>;
21 };
22
23 sfp0: sfp-0 {
24 compatible = "sff,sfp";
25 i2c-bus = <&i2c0>;
26 los-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
27 mod-def0-gpio = <&gpio1 25 GPIO_ACTIVE_LOW>;
28 // tx-fault and tx-disable unconnected
29 };
30
31 i2c1: i2c-gpio-1 {
32 compatible = "i2c-gpio";
33 sda-gpios = <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
34 scl-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
35 i2c-gpio,delay-us = <2>;
36 #address-cells = <1>;
37 #size-cells = <0>;
38 };
39
40 sfp1: sfp-1 {
41 compatible = "sff,sfp";
42 i2c-bus = <&i2c1>;
43 los-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
44 mod-def0-gpio = <&gpio1 21 GPIO_ACTIVE_LOW>;
45 // tx-fault and tx-disable unconnected
46 };
47 };
48
49 &ethernet0 {
50 mdio: mdio-bus {
51 compatible = "realtek,rtl838x-mdio";
52 regmap = <&ethernet0>;
53 #address-cells = <1>;
54 #size-cells = <0>;
55
56 INTERNAL_PHY(8)
57 INTERNAL_PHY(9)
58 INTERNAL_PHY(10)
59 INTERNAL_PHY(11)
60 INTERNAL_PHY(12)
61 INTERNAL_PHY(13)
62 INTERNAL_PHY(14)
63 INTERNAL_PHY(15)
64
65 INTERNAL_PHY(24)
66 INTERNAL_PHY(26)
67 };
68 };
69
70 &switch0 {
71 ports {
72 #address-cells = <1>;
73 #size-cells = <0>;
74
75 SWITCH_PORT(8, 1, internal)
76 SWITCH_PORT(9, 2, internal)
77 SWITCH_PORT(10, 3, internal)
78 SWITCH_PORT(11, 4, internal)
79 SWITCH_PORT(12, 5, internal)
80 SWITCH_PORT(13, 6, internal)
81 SWITCH_PORT(14, 7, internal)
82 SWITCH_PORT(15, 8, internal)
83
84 port@24 {
85 reg = <24>;
86 label = "lan9";
87 phy-handle = <&phy24>;
88 phy-mode = "1000base-x";
89 managed = "in-band-status";
90 sfp = <&sfp0>;
91 };
92
93 port@26 {
94 reg = <26>;
95 label = "lan10";
96 phy-handle = <&phy26>;
97 phy-mode = "1000base-x";
98 managed = "in-band-status";
99 sfp = <&sfp1>;
100 };
101
102 port@28 {
103 ethernet = <&ethernet0>;
104 reg = <28>;
105 phy-mode = "internal";
106 fixed-link {
107 speed = <1000>;
108 full-duplex;
109 };
110 };
111 };
112 };