realtek: tl-sg2008p: use correct i2c address for TPS23861
[openwrt/openwrt.git] / target / linux / realtek / dts-5.10 / rtl8380_tplink_sg2008p-v1.dts
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 = "tplink,sg2008p-v1", "realtek,rtl838x-soc";
10 model = "TP-Link SG2008P v1";
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 memory@0 {
20 device_type = "memory";
21 reg = <0x0 0x10000000>;
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 gpio-restart {
35 compatible = "gpio-restart";
36 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_power: led-0 {
43 label = "green:power";
44 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
45 };
46 };
47
48 i2c1: i2c-gpio-1 {
49 compatible = "i2c-gpio";
50 scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
51 sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
52 i2c-gpio,delay-us = <2>;
53 #address-cells = <1>;
54 #size-cells = <0>;
55
56 tps23861@28 {
57 compatible = "ti,tps23861";
58 reg = <0x28>;
59 shunt-resistor-micro-ohms = <255000>;
60 };
61 };
62
63 watchdog {
64 compatible = "linux,wdt-gpio";
65 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
66 hw_algo = "toggle";
67 /* SGM706 specs: typical 1.6s, but minimum 1.0s. */
68 hw_margin_ms = <1000>;
69 };
70
71 virtual_flash {
72 compatible = "mtd-concat";
73
74 devices = <&syspart &usrpart>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 compatible = "denx,uimage";
83 label = "firmware";
84 reg = <0x0 0x1a00000>;
85 };
86 };
87 };
88 };
89
90 &gpio0 {
91 watchdog-enable {
92 gpio-hog;
93 gpios = <14 GPIO_ACTIVE_LOW>;
94 output-low;
95 line-name = "watchdog-enable";
96 };
97 };
98
99 &spi0 {
100 status = "okay";
101
102 flash@0 {
103 compatible = "jedec,spi-nor";
104 reg = <0>;
105 spi-max-frequency = <10000000>;
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 label = "u-boot";
114 reg = <0x0 0xe0000>;
115 read-only;
116 };
117 partition@e0000 {
118 label = "u-boot-env";
119 reg = <0xe0000 0x20000>;
120 };
121 syspart: partition@100000 {
122 label = "sys";
123 reg = <0x100000 0x600000>;
124 };
125 usrpart: partition@700000 {
126 label = "usrimg1";
127 reg = <0x700000 0x1400000>;
128 };
129 partition@1b00000 {
130 label = "usrappfs";
131 reg = <0x1b00000 0x400000>;
132 };
133 partition@1f00000 {
134 label = "para";
135 reg = <0x1f00000 0x100000>;
136 read-only;
137 };
138 };
139 };
140 };
141
142 &ethernet0 {
143 mdio: mdio-bus {
144 compatible = "realtek,rtl838x-mdio";
145 #address-cells = <1>;
146 #size-cells = <0>;
147
148 INTERNAL_PHY(8)
149 INTERNAL_PHY(9)
150 INTERNAL_PHY(10)
151 INTERNAL_PHY(11)
152 INTERNAL_PHY(12)
153 INTERNAL_PHY(13)
154 INTERNAL_PHY(14)
155 INTERNAL_PHY(15)
156 };
157 };
158
159 &switch0 {
160 ports {
161 #address-cells = <1>;
162 #size-cells = <0>;
163
164 SWITCH_PORT(8, 1, internal)
165 SWITCH_PORT(9, 2, internal)
166 SWITCH_PORT(10, 3, internal)
167 SWITCH_PORT(11, 4, internal)
168 SWITCH_PORT(12, 5, internal)
169 SWITCH_PORT(13, 6, internal)
170 SWITCH_PORT(14, 7, internal)
171 SWITCH_PORT(15, 8, internal)
172
173 port@28 {
174 ethernet = <&ethernet0>;
175 reg = <28>;
176 phy-mode = "internal";
177
178 fixed-link {
179 speed = <1000>;
180 full-duplex;
181 };
182 };
183 };
184 };