diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-11-10 14:16:32 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-11-10 21:35:34 +0000 |
commit | e586de8dbf00fac72a37177ba08f74bb1091dd86 (patch) | |
tree | 88d02f55ad3d5639ef1a1708fef5eea8df11671e /target/linux/ath79/dts | |
parent | 04b8ad60fd92b375cf661a56afb853344c95ca99 (diff) | |
download | upstream-e586de8dbf00fac72a37177ba08f74bb1091dd86.tar.gz upstream-e586de8dbf00fac72a37177ba08f74bb1091dd86.tar.bz2 upstream-e586de8dbf00fac72a37177ba08f74bb1091dd86.zip |
ath79: add support for Teltonika RUT300
Add support for the Teltonika RUT300 rugged industrial Ethernet router
Hardware
--------
SoC: Qualcomm Atheros QCA9531
RAM: 64M DDR2 (EtronTech EM68B16CWQK-25IH)
FLASH: 16M SPI-NOR (Winbond W25Q128)
ETH: 4x 100M LAN (QCA9533 internal AR8229 switch, eth0)
1x 100M WAN (QCA9533 internal PHY, eth1)
UART: 115200 8n1, same debug port as other Teltonika devices
USB: 1 single USB 2.0 host port
BUTTON: Reset
LED: 1x green power LED (always on)
5x yellow Ethernet port LED (controlled by Linux)
WAN port LED is used as boot status and upgrade indicator as
the power LED cannot be controlled in software.
Use the *-factory.bin file to intially flash the device using the
vendor firmware's Web-UI.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/ath79/dts')
-rw-r--r-- | target/linux/ath79/dts/qca9531_teltonika_rut300.dts | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/target/linux/ath79/dts/qca9531_teltonika_rut300.dts b/target/linux/ath79/dts/qca9531_teltonika_rut300.dts new file mode 100644 index 0000000000..a4f5fb543b --- /dev/null +++ b/target/linux/ath79/dts/qca9531_teltonika_rut300.dts @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include "qca953x.dtsi" + +/ { + compatible = "teltonika,rut300", "teltonika,rut30x", "qca,qca9531"; + model = "TELTONIKA RUT300"; + + aliases { + label-mac-device = ð1; + led-boot = &led_wan; + led-failsafe = &led_wan; + led-running = &led_wan; + led-upgrade = &led_wan; + serial0 = &uart; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pmx_leds_switch>, <&jtag_disable_pins>; + + led_wan: wan { + label = "yellow:wan"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + + lan1 { + label = "yellow:lan1"; + gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; + }; + + lan2 { + label = "yellow:lan2"; + gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; + }; + + lan3 { + label = "yellow:lan3"; + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + }; + + lan4 { + label = "yellow:lan4"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = <KEY_RESTART>; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + config: partition@20000 { + label = "config"; + reg = <0x020000 0x010000>; + read-only; + }; + + partition@30000 { + label = "art"; + reg = <0x030000 0x010000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0xf30000>; + }; + + partition@f70000 { + label = "event-log"; + reg = <0xf70000 0x090000>; + }; + }; + }; +}; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; + +ð0 { + status = "okay"; + phy-handle = <&swphy0>; + + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +ð1 { + phy-handle = <&swphy4>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; + + gmac-config { + device = <&gmac>; + switch-phy-swap = <1>; + }; +}; + +&pinmux { + pmx_leds_switch: leds_switch { + // switch port LEDs on GPIO 0~4 + pinctrl-single,bits = <0x0 0x00000000 0xffffffff>, + <0x4 0x00000000 0x000000ff>; + }; +}; |