2019-05-16 07:09:07 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
|
|
|
|
|
|
#include "mt7628an.dtsi"
|
|
|
|
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
|
|
|
|
/ {
|
|
|
|
compatible = "totolink,lr1200", "mediatek,mt7628dan";
|
|
|
|
model = "TOTOLINK LR1200";
|
|
|
|
|
|
|
|
aliases {
|
|
|
|
led-boot = &led_sys;
|
|
|
|
led-failsafe = &led_sys;
|
|
|
|
led-running = &led_sys;
|
|
|
|
led-upgrade = &led_sys;
|
|
|
|
};
|
|
|
|
|
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
|
|
|
|
|
|
|
led_sys: sys {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:sys";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
2019-09-20 12:03:02 +00:00
|
|
|
|
2019-05-16 07:09:07 +00:00
|
|
|
sms {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:sms";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
2019-09-20 12:03:02 +00:00
|
|
|
|
2019-05-16 07:09:07 +00:00
|
|
|
wifi {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:wifi";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
linux,default-trigger = "phy0tpt";
|
|
|
|
};
|
2019-09-20 12:03:02 +00:00
|
|
|
|
2019-05-16 07:09:07 +00:00
|
|
|
3g {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:3g";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
2019-09-20 12:03:02 +00:00
|
|
|
|
2019-05-16 07:09:07 +00:00
|
|
|
4g {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:4g";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
2019-09-20 12:03:02 +00:00
|
|
|
|
2019-05-16 07:09:07 +00:00
|
|
|
rssi1 {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:rssi1";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
2019-09-20 12:03:02 +00:00
|
|
|
|
2019-05-16 07:09:07 +00:00
|
|
|
rssi2 {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:rssi2";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
2019-09-20 12:03:02 +00:00
|
|
|
|
2019-05-16 07:09:07 +00:00
|
|
|
rssi3 {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:rssi3";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
2019-09-20 12:03:02 +00:00
|
|
|
|
2019-05-16 07:09:07 +00:00
|
|
|
rssi4 {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:rssi4";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
keys {
|
2019-09-20 12:03:02 +00:00
|
|
|
compatible = "gpio-keys";
|
2019-05-16 07:09:07 +00:00
|
|
|
|
|
|
|
reset {
|
|
|
|
label = "reset";
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
2019-05-16 07:09:07 +00:00
|
|
|
linux,code = <KEY_RESTART>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-04-09 09:10:03 +00:00
|
|
|
&gpio {
|
2019-05-16 07:09:07 +00:00
|
|
|
gpio_modem_reset {
|
|
|
|
gpio-hog;
|
2020-04-09 09:10:03 +00:00
|
|
|
gpios = <45 GPIO_ACTIVE_HIGH>;
|
2019-05-16 07:09:07 +00:00
|
|
|
output-high;
|
|
|
|
line-name = "modem-reset";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-12-22 20:26:01 +00:00
|
|
|
&state_default {
|
|
|
|
gpio {
|
2020-04-12 12:58:29 +00:00
|
|
|
groups = "gpio", "i2c", "i2s", "refclk", "uart1", "wdt", "wled_an";
|
|
|
|
function = "gpio";
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&pcie {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&pcie0 {
|
|
|
|
mt76@0,0 {
|
|
|
|
reg = <0x0000 0 0 0 0>;
|
|
|
|
mediatek,mtd-eeprom = <&factory 0x8000>;
|
|
|
|
ieee80211-freq-limit = <5000000 6000000>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&wmac {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
ðernet {
|
2021-04-02 21:50:02 +00:00
|
|
|
nvmem-cells = <&macaddr_factory_28>;
|
|
|
|
nvmem-cell-names = "mac-address";
|
2019-05-16 07:09:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
&spi0 {
|
|
|
|
status = "okay";
|
|
|
|
|
2020-05-07 14:15:27 +00:00
|
|
|
flash@0 {
|
2019-05-16 07:09:07 +00:00
|
|
|
compatible = "jedec,spi-nor";
|
|
|
|
reg = <0>;
|
|
|
|
spi-max-frequency = <40000000>;
|
|
|
|
|
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
partition@0 {
|
|
|
|
label = "u-boot";
|
|
|
|
reg = <0x0 0x30000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@30000 {
|
|
|
|
label = "u-boot-env";
|
|
|
|
reg = <0x30000 0x10000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
factory: partition@40000 {
|
|
|
|
label = "factory";
|
|
|
|
reg = <0x40000 0x10000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@50000 {
|
|
|
|
compatible = "denx,uimage";
|
|
|
|
label = "firmware";
|
|
|
|
reg = <0x50000 0x7b0000>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-04-02 21:50:02 +00:00
|
|
|
|
|
|
|
&factory {
|
|
|
|
compatible = "nvmem-cells";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
macaddr_factory_28: macaddr@28 {
|
|
|
|
reg = <0x28 0x6>;
|
|
|
|
};
|
|
|
|
};
|