mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-15 07:02:09 +00:00
Remove GPIO hog for modem power, as well as define userspace GPIO switches for enabling and resetting the modem. While at that, define a switch for the external GPIO available on the power connector. Signed-off-by: Lech Perczak <lech.perczak@gmail.com> Link: https://github.com/openwrt/openwrt/pull/17503 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
204 lines
3.6 KiB
Plaintext
204 lines
3.6 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>
|
|
#include <dt-bindings/leds/common.h>
|
|
|
|
/ {
|
|
model = "Teltonika RUT230 v1";
|
|
compatible = "teltonika,rut230-v1", "qca,ar9331";
|
|
|
|
aliases {
|
|
label-mac-device = ð1;
|
|
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,input-type = <EV_SW>;
|
|
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-strength-4";
|
|
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>;
|
|
};
|
|
|
|
4g {
|
|
label = "green:4g";
|
|
gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
lan {
|
|
function = LED_FUNCTION_LAN;
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
|
/* GPIO 13 - ACTIVE HIGH for hwrev 0 */
|
|
};
|
|
|
|
wan {
|
|
function = LED_FUNCTION_WAN;
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
|
/* GPIO 14 - ACTIVE HIGH for hwrev 0 */
|
|
};
|
|
};
|
|
};
|
|
|
|
ð0 {
|
|
status = "okay";
|
|
|
|
nvmem-cells = <&macaddr_config_0 1>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
ð1 {
|
|
status = "okay";
|
|
|
|
nvmem-cells = <&macaddr_config_0 0>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
&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;
|
|
|
|
nvmem-layout {
|
|
compatible = "fixed-layout";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
macaddr_config_0: macaddr@0 {
|
|
compatible = "mac-base";
|
|
reg = <0x0 0x6>;
|
|
#nvmem-cell-cells = <1>;
|
|
};
|
|
};
|
|
};
|
|
|
|
partition@30000 {
|
|
label = "art";
|
|
reg = <0x30000 0x10000>;
|
|
read-only;
|
|
|
|
nvmem-layout {
|
|
compatible = "fixed-layout";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
cal_art_1000: calibration@1000 {
|
|
reg = <0x1000 0x440>;
|
|
};
|
|
};
|
|
};
|
|
|
|
partition@40000 {
|
|
compatible = "tplink,firmware";
|
|
label = "firmware";
|
|
reg = <0x40000 0xf30000>;
|
|
};
|
|
|
|
partition@f70000 {
|
|
label = "event-log";
|
|
reg = <0xf70000 0x90000>;
|
|
read-only;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&usb {
|
|
dr_mode = "host";
|
|
status = "okay";
|
|
};
|
|
|
|
&usb_phy {
|
|
status = "okay";
|
|
};
|
|
|
|
&wmac {
|
|
status = "okay";
|
|
|
|
nvmem-cells = <&macaddr_config_0 2>, <&cal_art_1000>;
|
|
nvmem-cell-names = "mac-address", "calibration";
|
|
};
|