openwrt/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts
David Bauer 6cf1dfd7e1 ath79: add support for Teltonika RUT230 v1
This commit adds support for the Teltonika RUT230 v1, a Atheros AR9331
based router with a Quectel UC20 UMTS modem.

Hardware
--------
Atheros AR9331
16 MB SPI-NOR XTX XT25F128B
64M DDR2 memory
Atheros AR9331 1T1R 802.11bgn Wireless
Boootloader: pepe2k U-Boot mod

Hardware-Revision
-----------------
There are two board revisions of the RUT230, a v0 and v1.

A HW version is silkscreened on the top of the PCBs front side as well
as shown in the Teltonika UI. However, this looks to be a different
identifier, as the GPl dump shows this silkscreened / UI shown version
are internally treated identically.

Th following mapping has been obtained from the latest GPl dump.

HW Ver   01 - 04 --> v0
HW Ver > 05      --> v1

My board was a HW Ver 09 and is treated as a v1.

Installation
------------
While attaching power, hold down the reset button and release it after
the signal LEDs flashed 3 times.

Attach your Computer with the devices LAN port and assign yourself the
IPv4 address 192.168.1.10/24. Open a web browser, navigate to
192.168.1.1. Upload the OpenWrt factory image.

The device will install OpenWrt and automatically reboots afterwards.

You can use the smae procedure with the stock firmware to return back to
the vendor firmware.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-30 21:39:59 +02:00

194 lines
3.3 KiB
Plaintext

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar9331.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
model = "Teltonika RUT230 v1";
compatible = "teltonika,rut230-v1", "qca,ar9331";
aliases {
label-mac-device = &wmac;
led-boot = &led_ss0;
led-failsafe = &led_ss0;
led-upgrade = &led_ss0;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
input {
label = "input";
linux,code = <BTN_0>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
sim-tray {
label = "sim-tray";
linux,code = <BTN_1>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&switch_led_disable_pins>;
led_ss0: signal-strength-0 {
label = "green:signal-strength-0";
gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
};
signal-strength-1 {
label = "green:signal-strength-1";
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
signal-strength-2 {
label = "green:signal-strength-2";
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
};
signal-strength-3 {
label = "green:signal-strength-3";
gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
};
signal-strength-4 {
label = "green:signal-strength4";
gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
};
2g {
label = "green:2g";
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
};
3g {
label = "green:3g";
gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
};
lan {
label = "green:lan";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
/* GPIO 13 - ACTIVE HIGH for hwrev 0 */
};
wan {
label = "green:wan";
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
/* GPIO 14 - ACTIVE HIGH for hwrev 0 */
};
/* 4G LED - GPIO21 ACTIVE_HIGH for RUT240 */
};
reg_usb_vbus: reg_usb_vbus {
compatible = "regulator-fixed";
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio 19 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
&eth0 {
status = "okay";
mtd-mac-address = <&config 0x0>;
};
&eth1 {
status = "okay";
mtd-mac-address = <&config 0x0>;
mtd-mac-address-increment = <1>;
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <30000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x20000>;
read-only;
};
config: partition@20000 {
label = "config";
reg = <0x20000 0x10000>;
read-only;
};
art: partition@30000 {
label = "art";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
compatible = "tplink,firmware";
label = "firmware";
reg = <0x40000 0xf30000>;
};
partition@f70000 {
label = "event-log";
reg = <0xf70000 0x90000>;
read-only;
};
};
};
};
&usb {
dr_mode = "host";
vbus-supply = <&reg_usb_vbus>;
status = "okay";
};
&gpio {
modem-power {
gpio-hog;
output-low;
gpios = <18 GPIO_ACTIVE_HIGH>;
line-name = "modem-power";
};
};
&usb_phy {
status = "okay";
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
mtd-mac-address = <&config 0x0>;
mtd-mac-address-increment = <2>;
};