realtek: dgs-1210-10mp: update sfp phy-handle
[openwrt/staging/aparcar.git] / target / linux / realtek / dts-5.15 / rtl8380_d-link_dgs-1210-10mp-f.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "rtl838x.dtsi"
4 #include "rtl83xx_d-link_dgs-1210_common.dtsi"
5 #include "rtl83xx_d-link_dgs-1210_gpio.dtsi"
6
7 / {
8 compatible = "d-link,dgs-1210-10mp-f", "realtek,rtl8382-soc", "realtek,rtl838x-soc";
9
10 model = "D-Link DGS-1210-10MP F";
11
12 /* i2c for sfp port9 */
13 i2c0: i2c-gpio-0 {
14 compatible = "i2c-gpio";
15 sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
16 scl-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
17 i2c-gpio,delay-us = <2>;
18 #address-cells = <1>;
19 #size-cells = <0>;
20 };
21
22 sfp0: sfp-p9 {
23 compatible = "sff,sfp";
24 i2c-bus = <&i2c0>;
25 los-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
26 mod-def0-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
27 tx-disable-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
28 };
29
30 /* i2c for sfp port10 */
31 i2c1: i2c-gpio-1 {
32 compatible = "i2c-gpio";
33 sda-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
34 scl-gpios = <&gpio1 2 (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-p10 {
41 compatible = "sff,sfp";
42 i2c-bus = <&i2c1>;
43 los-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
44 mod-def0-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
45 tx-disable-gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
46 };
47 };
48
49 &leds {
50 link_act {
51 label = "green:link_act";
52 gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
53 };
54
55 poe {
56 label = "green:poe";
57 gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
58 };
59
60 poe_max {
61 label = "yellow:poe_max";
62 gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
63 };
64 };
65
66 &keys {
67 mode {
68 label = "mode";
69 gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
70 linux,code = <KEY_LIGHTS_TOGGLE>;
71 };
72 };
73
74 &uart1 {
75 status = "okay";
76 };
77
78 &ethernet0 {
79 mdio: mdio-bus {
80 compatible = "realtek,rtl838x-mdio";
81 regmap = <&ethernet0>;
82 #address-cells = <1>;
83 #size-cells = <0>;
84
85 INTERNAL_PHY(8)
86 INTERNAL_PHY(9)
87 INTERNAL_PHY(10)
88 INTERNAL_PHY(11)
89 INTERNAL_PHY(12)
90 INTERNAL_PHY(13)
91 INTERNAL_PHY(14)
92 INTERNAL_PHY(15)
93 INTERNAL_PHY(24)
94 INTERNAL_PHY(26)
95 };
96 };
97
98 &switch0 {
99 ports {
100 #address-cells = <1>;
101 #size-cells = <0>;
102
103 SWITCH_PORT(8, 1, internal)
104 SWITCH_PORT(9, 2, internal)
105 SWITCH_PORT(10, 3, internal)
106 SWITCH_PORT(11, 4, internal)
107 SWITCH_PORT(12, 5, internal)
108 SWITCH_PORT(13, 6, internal)
109 SWITCH_PORT(14, 7, internal)
110 SWITCH_PORT(15, 8, internal)
111
112 port@24 {
113 reg = <24>;
114 label = "lan9";
115 phy-handle = <&phy24>;
116 phy-mode = "1000base-x";
117 managed = "in-band-status";
118 sfp = <&sfp0>;
119 };
120
121 port@26 {
122 reg = <26>;
123 label = "lan10";
124 phy-handle = <&phy26>;
125 phy-mode = "1000base-x";
126 managed = "in-band-status";
127 sfp = <&sfp1>;
128 };
129
130 port@28 {
131 ethernet = <&ethernet0>;
132 reg = <28>;
133 phy-mode = "internal";
134 fixed-link {
135 speed = <1000>;
136 full-duplex;
137 };
138 };
139 };
140 };