|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | +/dts-v1/; |
| 3 | + |
| 4 | +#include "rtl930x.dtsi" |
| 5 | + |
| 6 | +#include <dt-bindings/input/input.h> |
| 7 | +#include <dt-bindings/gpio/gpio.h> |
| 8 | +#include <dt-bindings/leds/common.h> |
| 9 | + |
| 10 | +/ { |
| 11 | + compatible = "hasivo,s1100wp-8gt-se"; |
| 12 | + model = "Hasivo S1100WP-8GT-SE"; |
| 13 | + |
| 14 | + memory@0 { |
| 15 | + device_type = "memory"; |
| 16 | + reg = <0x00000000 0x10000000>; /* 256 MiB */ |
| 17 | + }; |
| 18 | + |
| 19 | + aliases { |
| 20 | + led-boot = &led_sys; |
| 21 | + led-failsafe = &led_sys; |
| 22 | + led-running = &led_sys; |
| 23 | + led-upgrade = &led_sys; |
| 24 | + }; |
| 25 | + |
| 26 | + chosen { |
| 27 | + stdout-path = "serial0:115200n8"; |
| 28 | + }; |
| 29 | + |
| 30 | + keys { |
| 31 | + compatible = "gpio-keys"; |
| 32 | + |
| 33 | + button-reset { |
| 34 | + label = "reset"; |
| 35 | + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; |
| 36 | + linux,code = <KEY_RESTART>; |
| 37 | + }; |
| 38 | + }; |
| 39 | + |
| 40 | + leds { |
| 41 | + compatible = "gpio-leds"; |
| 42 | + |
| 43 | + pinctrl-names = "default"; |
| 44 | + pinctrl-0 = <&pinmux_disable_sys_led>; |
| 45 | + |
| 46 | + led_sys: led-0 { |
| 47 | + label = "green:system"; |
| 48 | + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; |
| 49 | + linux,default-trigger = "heartbeat"; |
| 50 | + }; |
| 51 | + }; |
| 52 | + |
| 53 | + led_set: led_set { |
| 54 | + compatible = "realtek,rtl9300-leds"; |
| 55 | + realtek,rtl93xx-led-sync; |
| 56 | + |
| 57 | + led_set0 = < |
| 58 | + ( // GREEN LEFT RJ45 |
| 59 | + RTL93XX_LED_SET_1G | |
| 60 | + RTL93XX_LED_SET_2P5G | |
| 61 | + RTL93XX_LED_SET_LINK |
| 62 | + ) |
| 63 | + ( // ORANGE LEFT RJ45 |
| 64 | + RTL93XX_LED_SET_10M | |
| 65 | + RTL93XX_LED_SET_100M | |
| 66 | + RTL93XX_LED_SET_2P5G | |
| 67 | + RTL93XX_LED_SET_LINK |
| 68 | + ) |
| 69 | + ( // GREEN RIGHT RJ45 |
| 70 | + RTL93XX_LED_SET_10M | |
| 71 | + RTL93XX_LED_SET_100M | |
| 72 | + RTL93XX_LED_SET_1G | |
| 73 | + RTL93XX_LED_SET_2P5G | |
| 74 | + RTL93XX_LED_SET_ACT |
| 75 | + ) |
| 76 | + >; |
| 77 | + }; |
| 78 | + |
| 79 | + i2c_scl23_sda22 { |
| 80 | + compatible = "i2c-gpio"; |
| 81 | + #address-cells = <1>; |
| 82 | + #size-cells = <0>; |
| 83 | + |
| 84 | + scl-gpios = <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 85 | + sda-gpios = <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 86 | + status = "okay"; |
| 87 | + |
| 88 | + clock-frequency = <100000>; |
| 89 | + |
| 90 | + pse-hs104_0@0x0d { |
| 91 | + compatible = "hasivo,hs104"; |
| 92 | + reg = <0x0d>; |
| 93 | + |
| 94 | + }; |
| 95 | + |
| 96 | + pse-hs104_1@0x15 { |
| 97 | + compatible = "hasivo,hs104"; |
| 98 | + reg = <0x15>; |
| 99 | + }; |
| 100 | + |
| 101 | + stc8@4d { |
| 102 | + compatible = "hasivo,stc8-mfd"; |
| 103 | + reg = <0x4d>; |
| 104 | + |
| 105 | + led_lan1_poe { |
| 106 | + compatible = "register-bit-led"; |
| 107 | + reg = <0x01>; |
| 108 | + mask = <0x08>; |
| 109 | + trigger = "pse-hs104_0@0x0d:port0delivering"; |
| 110 | + }; |
| 111 | + |
| 112 | + led_lan2_poe { |
| 113 | + compatible = "register-bit-led"; |
| 114 | + reg = <0x01>; |
| 115 | + mask = <0x04>; |
| 116 | + trigger = "pse-hs104_0@0x0d:port1delivering"; |
| 117 | + }; |
| 118 | + |
| 119 | + led_lan3_poe { |
| 120 | + compatible = "register-bit-led"; |
| 121 | + reg = <0x01>; |
| 122 | + mask = <0x02>; |
| 123 | + trigger = "pse-hs104_0@0x0d:port2delivering"; |
| 124 | + }; |
| 125 | + |
| 126 | + led_lan4_poe { |
| 127 | + compatible = "register-bit-led"; |
| 128 | + reg = <0x01>; |
| 129 | + mask = <0x01>; |
| 130 | + trigger = "pse-hs104_0@0x0d:port3delivering"; |
| 131 | + }; |
| 132 | + |
| 133 | + led_lan5_poe { |
| 134 | + compatible = "register-bit-led"; |
| 135 | + reg = <0x02>; |
| 136 | + mask = <0x08>; |
| 137 | + trigger = "pse-hs104_1:port0delivering"; |
| 138 | + }; |
| 139 | + |
| 140 | + led_lan6_poe { |
| 141 | + compatible = "register-bit-led"; |
| 142 | + reg = <0x02>; |
| 143 | + mask = <0x04>; |
| 144 | + trigger = "pse-hs104_1:port1delivering"; |
| 145 | + }; |
| 146 | + |
| 147 | + led_lan7_poe { |
| 148 | + compatible = "register-bit-led"; |
| 149 | + reg = <0x02>; |
| 150 | + mask = <0x02>; |
| 151 | + trigger = "pse-hs104_1:port2delivering"; |
| 152 | + }; |
| 153 | + |
| 154 | + led_lan8_poe { |
| 155 | + compatible = "register-bit-led"; |
| 156 | + reg = <0x02>; |
| 157 | + mask = <0x01>; |
| 158 | + trigger = "pse-hs104_1:port3delivering"; |
| 159 | + }; |
| 160 | + }; |
| 161 | + }; |
| 162 | +}; |
| 163 | + |
| 164 | +&spi0 { |
| 165 | + status = "okay"; |
| 166 | + |
| 167 | + flash@0 { |
| 168 | + compatible = "fudan,fm25q128", "winbond,w25q256jv", "jedec,spi-nor"; |
| 169 | + reg = <0>; |
| 170 | + spi-max-frequency = <10000000>; |
| 171 | + /*spi-tx-width = <4>;*/ |
| 172 | + /*spi-rx-width = <4>;*/ |
| 173 | + /*spi-max-frequency = <104000000>;*/ |
| 174 | + |
| 175 | + partitions { |
| 176 | + compatible = "fixed-partitions"; |
| 177 | + #address-cells = <1>; |
| 178 | + #size-cells = <1>; |
| 179 | + |
| 180 | + /* stock is LOADER */ |
| 181 | + partition@0 { |
| 182 | + label = "u-boot"; |
| 183 | + reg = <0x0000000 0x00e0000>; |
| 184 | + read-only; |
| 185 | + }; |
| 186 | + |
| 187 | + /* stock is BDINFO */ |
| 188 | + partition@e0000 { |
| 189 | + label = "u-boot-env"; |
| 190 | + reg = <0x00e0000 0x0010000>; |
| 191 | + }; |
| 192 | + |
| 193 | + /* stock is SYSINFO */ |
| 194 | + partition@f0000 { |
| 195 | + label = "u-boot-env2"; |
| 196 | + reg = <0x00f0000 0x0010000>; |
| 197 | + read-only; |
| 198 | + }; |
| 199 | + |
| 200 | + /* stock is JFFS2_CFG */ |
| 201 | + partition@100000 { |
| 202 | + label = "jffs"; |
| 203 | + reg = <0x0100000 0x0100000>; |
| 204 | + }; |
| 205 | + |
| 206 | + /* stock is JFFS2_LOG */ |
| 207 | + partition@200000 { |
| 208 | + label = "jffs2"; |
| 209 | + reg = <0x0200000 0x0100000>; |
| 210 | + }; |
| 211 | + |
| 212 | + /* stock is RUNTIME */ |
| 213 | + partition@300000 { |
| 214 | + compatible = "openwrt,uimage", "denx,uimage"; |
| 215 | + label = "firmware"; |
| 216 | + reg = <0x0300000 0x0c00000>; |
| 217 | + openwrt,ih-magic = <0x93030000>; |
| 218 | + }; |
| 219 | + |
| 220 | + /* stock is OEMINFO */ |
| 221 | + partition@f00000 { |
| 222 | + label = "oeminfo"; |
| 223 | + reg = <0x0f00000 0x0100000>; |
| 224 | + read-only; |
| 225 | + }; |
| 226 | + }; |
| 227 | + }; |
| 228 | +}; |
| 229 | + |
| 230 | +/* |
| 231 | +&crypto0 { |
| 232 | + status = "disabled"; |
| 233 | +}; |
| 234 | +*/ |
| 235 | + |
| 236 | +&mdio_bus0 { |
| 237 | + /* External RTL8221B PHY */ |
| 238 | + phy0: ethernet-phy@0 { |
| 239 | + reg = <0>; |
| 240 | + compatible = "ethernet-phy-ieee802.3-c45"; |
| 241 | + rtl9300,smi-address = <0 1>; |
| 242 | + }; |
| 243 | + |
| 244 | + /* External RTL8221B PHY */ |
| 245 | + phy8: ethernet-phy@8 { |
| 246 | + reg = <8>; |
| 247 | + compatible = "ethernet-phy-ieee802.3-c45"; |
| 248 | + rtl9300,smi-address = <0 2>; |
| 249 | + }; |
| 250 | + |
| 251 | + /* External RTL8221B PHY */ |
| 252 | + phy16: ethernet-phy@16 { |
| 253 | + reg = <16>; |
| 254 | + compatible = "ethernet-phy-ieee802.3-c45"; |
| 255 | + rtl9300,smi-address = <0 3>; |
| 256 | + }; |
| 257 | + |
| 258 | + /* External RTL8221B PHY */ |
| 259 | + phy20: ethernet-phy@20 { |
| 260 | + reg = <20>; |
| 261 | + compatible = "ethernet-phy-ieee802.3-c45"; |
| 262 | + rtl9300,smi-address = <0 4>; |
| 263 | + }; |
| 264 | + |
| 265 | + /* External RTL8221B PHY */ |
| 266 | + phy24: ethernet-phy@24 { |
| 267 | + reg = <24>; |
| 268 | + compatible = "ethernet-phy-ieee802.3-c45"; |
| 269 | + rtl9300,smi-address = <1 1>; |
| 270 | + }; |
| 271 | + |
| 272 | + /* External RTL8221B PHY */ |
| 273 | + phy25: ethernet-phy@25 { |
| 274 | + reg = <25>; |
| 275 | + compatible = "ethernet-phy-ieee802.3-c45"; |
| 276 | + rtl9300,smi-address = <1 2>; |
| 277 | + }; |
| 278 | + |
| 279 | + /* External RTL8221B PHY */ |
| 280 | + phy26: ethernet-phy@26 { |
| 281 | + reg = <26>; |
| 282 | + compatible = "ethernet-phy-ieee802.3-c45"; |
| 283 | + rtl9300,smi-address = <1 3>; |
| 284 | + }; |
| 285 | + |
| 286 | + /* External RTL8221B PHY */ |
| 287 | + phy27: ethernet-phy@27 { |
| 288 | + reg = <27>; |
| 289 | + compatible = "ethernet-phy-ieee802.3-c45"; |
| 290 | + rtl9300,smi-address = <1 4>; |
| 291 | + }; |
| 292 | +}; |
| 293 | + |
| 294 | +&switch0 { |
| 295 | + pinctrl-names = "default"; |
| 296 | + pinctrl-0 = <&pinmux_enable_led_sync>; |
| 297 | + |
| 298 | + ports { |
| 299 | + #address-cells = <1>; |
| 300 | + #size-cells = <0>; |
| 301 | + |
| 302 | + port@0 { |
| 303 | + reg = <0>; |
| 304 | + label = "lan1"; |
| 305 | + pcs-handle = <&serdes2>; |
| 306 | + phy-handle = <&phy0>; |
| 307 | + phy-mode = "2500base-x"; |
| 308 | + led-set = <0>; |
| 309 | + }; |
| 310 | + |
| 311 | + port@8 { |
| 312 | + reg = <8>; |
| 313 | + label = "lan2"; |
| 314 | + pcs-handle = <&serdes3>; |
| 315 | + phy-handle = <&phy8>; |
| 316 | + phy-mode = "2500base-x"; |
| 317 | + led-set = <0>; |
| 318 | + }; |
| 319 | + |
| 320 | + port@16 { |
| 321 | + reg = <16>; |
| 322 | + label = "lan3"; |
| 323 | + pcs-handle = <&serdes4>; |
| 324 | + phy-handle = <&phy16>; |
| 325 | + phy-mode = "2500base-x"; |
| 326 | + led-set = <0>; |
| 327 | + }; |
| 328 | + |
| 329 | + port@20 { |
| 330 | + reg = <20>; |
| 331 | + label = "lan4"; |
| 332 | + pcs-handle = <&serdes5>; |
| 333 | + phy-handle = <&phy20>; |
| 334 | + phy-mode = "2500base-x"; |
| 335 | + led-set = <0>; |
| 336 | + }; |
| 337 | + |
| 338 | + port@24 { |
| 339 | + reg = <24>; |
| 340 | + label = "lan5"; |
| 341 | + pcs-handle = <&serdes6>; |
| 342 | + phy-handle = <&phy24>; |
| 343 | + phy-mode = "2500base-x"; |
| 344 | + led-set = <0>; |
| 345 | + }; |
| 346 | + |
| 347 | + port@25 { |
| 348 | + reg = <25>; |
| 349 | + label = "lan6"; |
| 350 | + pcs-handle = <&serdes7>; |
| 351 | + phy-handle = <&phy25>; |
| 352 | + phy-mode = "2500base-x"; |
| 353 | + led-set = <0>; |
| 354 | + }; |
| 355 | + |
| 356 | + port@26 { |
| 357 | + reg = <26>; |
| 358 | + label = "lan7"; |
| 359 | + pcs-handle = <&serdes8>; |
| 360 | + phy-handle = <&phy26>; |
| 361 | + phy-mode = "2500base-x"; |
| 362 | + led-set = <0>; |
| 363 | + }; |
| 364 | + |
| 365 | + port@27 { |
| 366 | + reg = <27>; |
| 367 | + label = "lan8"; |
| 368 | + pcs-handle = <&serdes9>; |
| 369 | + phy-handle = <&phy27>; |
| 370 | + phy-mode = "2500base-x"; |
| 371 | + led-set = <0>; |
| 372 | + }; |
| 373 | + |
| 374 | + /* Internal SoC */ |
| 375 | + port@28 { |
| 376 | + ethernet = <ðernet0>; |
| 377 | + reg = <28>; |
| 378 | + phy-mode = "internal"; |
| 379 | + |
| 380 | + fixed-link { |
| 381 | + speed = <10000>; |
| 382 | + full-duplex; |
| 383 | + }; |
| 384 | + }; |
| 385 | + }; |
| 386 | +}; |
0 commit comments