2018-05-07 10:52:03 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2018-05-06 08:20:11 +00:00
|
|
|
/dts-v1/;
|
|
|
|
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
|
|
|
|
#include "ar9331.dtsi"
|
|
|
|
|
|
|
|
/ {
|
2018-06-08 08:51:00 +00:00
|
|
|
model = "TP-Link TL-MR3020 V1";
|
|
|
|
compatible = "tplink,tl-mr3020-v1", "qca,ar9331";
|
2018-05-06 08:20:11 +00:00
|
|
|
|
|
|
|
aliases {
|
|
|
|
serial0 = &uart;
|
2019-11-05 18:23:33 +00:00
|
|
|
led-boot = &led_wps;
|
|
|
|
led-failsafe = &led_wps;
|
|
|
|
led-running = &led_wps;
|
|
|
|
led-upgrade = &led_wps;
|
ath79: provide label MAC address
This patch adds the label MAC address for several devices in
ath79.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- alfa-network,ap121f
- avm,fritz300e
- ubnt-xm devices
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- adtran,bsap1800-v2
- adtran,bsap1840
- dlink,dir-842-c1/-c2/-c3
- engenius,ecb1750
- iodata,etg3-r
- iodata,wn-ac1167dgr
- iodata,wn-ac1600dgr
- iodata,wn-ac1600dgr2
- iodata,wn-ag300dgr
- nec,wg800hp
- nec,wg1200cr
- trendnet,tew-823dru
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-08-15 13:13:33 +00:00
|
|
|
label-mac-device = ð0;
|
2018-05-06 08:20:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
|
|
|
|
|
|
|
wlan {
|
|
|
|
label = "tp-link:green:wlan";
|
|
|
|
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
|
2018-06-08 08:51:00 +00:00
|
|
|
linux,default-trigger = "phy0tpt";
|
2018-05-06 08:20:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
lan {
|
|
|
|
label = "tp-link:green:lan";
|
|
|
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
2019-11-05 18:23:33 +00:00
|
|
|
led_wps: wps {
|
2018-05-06 08:20:11 +00:00
|
|
|
label = "tp-link:green:wps";
|
|
|
|
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
|
|
|
led3g {
|
|
|
|
label = "tp-link:green:3g";
|
|
|
|
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
|
2018-06-08 08:51:00 +00:00
|
|
|
trigger-sources = <&hub_port>;
|
|
|
|
linux,default-trigger = "usbport";
|
2018-05-06 08:20:11 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
keys {
|
2018-06-08 08:51:00 +00:00
|
|
|
compatible = "gpio-keys";
|
2018-05-06 08:20:11 +00:00
|
|
|
|
2019-11-07 16:03:50 +00:00
|
|
|
reset {
|
2018-06-08 08:51:00 +00:00
|
|
|
label = "reset";
|
|
|
|
linux,code = <KEY_RESTART>;
|
2018-05-06 08:20:11 +00:00
|
|
|
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
2018-06-08 08:51:00 +00:00
|
|
|
debounce-interval = <60>;
|
2018-05-06 08:20:11 +00:00
|
|
|
};
|
|
|
|
|
2019-11-07 16:03:50 +00:00
|
|
|
sw1 {
|
2018-05-06 08:20:11 +00:00
|
|
|
label = "sw1";
|
2018-06-08 08:51:00 +00:00
|
|
|
linux,input-type = <EV_SW>;
|
2018-05-06 08:20:11 +00:00
|
|
|
linux,code = <BTN_0>;
|
|
|
|
gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
|
2018-06-08 08:51:00 +00:00
|
|
|
debounce-interval = <60>;
|
2018-05-06 08:20:11 +00:00
|
|
|
};
|
|
|
|
|
2019-11-07 16:03:50 +00:00
|
|
|
sw2 {
|
2018-05-06 08:20:11 +00:00
|
|
|
label = "sw2";
|
2018-06-08 08:51:00 +00:00
|
|
|
linux,input-type = <EV_SW>;
|
2018-05-06 08:20:11 +00:00
|
|
|
linux,code = <BTN_1>;
|
|
|
|
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
|
2018-06-08 08:51:00 +00:00
|
|
|
debounce-interval = <60>;
|
2018-05-06 08:20:11 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
reg_usb_vbus: reg_usb_vbus {
|
|
|
|
compatible = "regulator-fixed";
|
|
|
|
regulator-name = "usb_vbus";
|
|
|
|
regulator-min-microvolt = <5000000>;
|
|
|
|
regulator-max-microvolt = <5000000>;
|
|
|
|
gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
|
|
|
|
enable-active-high;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&ref {
|
|
|
|
clock-frequency = <25000000>;
|
|
|
|
};
|
|
|
|
|
|
|
|
&uart {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&gpio {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&usb {
|
2018-08-06 05:11:13 +00:00
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
2018-05-06 08:20:11 +00:00
|
|
|
dr_mode = "host";
|
|
|
|
vbus-supply = <®_usb_vbus>;
|
|
|
|
status = "okay";
|
2018-06-08 08:51:00 +00:00
|
|
|
|
|
|
|
hub_port: port@1 {
|
|
|
|
reg = <1>;
|
|
|
|
#trigger-source-cells = <0>;
|
|
|
|
};
|
2018-05-06 08:20:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
&usb_phy {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi {
|
|
|
|
status = "okay";
|
|
|
|
|
2019-11-05 18:23:33 +00:00
|
|
|
num-chipselects = <1>;
|
|
|
|
|
2018-05-06 08:20:11 +00:00
|
|
|
/* Spansion S25FL032PIF SPI flash */
|
2018-08-06 06:17:24 +00:00
|
|
|
flash@0 {
|
2018-06-08 08:51:00 +00:00
|
|
|
compatible = "jedec,spi-nor";
|
2020-02-27 10:55:36 +00:00
|
|
|
spi-max-frequency = <50000000>;
|
2018-05-06 08:20:11 +00:00
|
|
|
reg = <0>;
|
2018-06-08 08:51:00 +00:00
|
|
|
|
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
uboot: partition@0 {
|
|
|
|
label = "u-boot";
|
|
|
|
reg = <0x000000 0x020000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@20000 {
|
2018-11-29 13:07:59 +00:00
|
|
|
compatible = "tplink,firmware";
|
2018-06-08 08:51:00 +00:00
|
|
|
label = "firmware";
|
|
|
|
reg = <0x020000 0x3c0000>;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@3e0000 {
|
|
|
|
label = "config";
|
|
|
|
reg = <0x3e0000 0x010000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
art: partition@3f0000 {
|
|
|
|
label = "art";
|
|
|
|
reg = <0x3f0000 0x010000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-07-17 09:09:14 +00:00
|
|
|
ð0 {
|
2018-06-08 08:51:00 +00:00
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
mtd-mac-address = <&uboot 0x1fc00>;
|
|
|
|
gmac-config {
|
2018-07-17 09:09:14 +00:00
|
|
|
device = <&gmac>;
|
2018-06-08 08:51:00 +00:00
|
|
|
|
2018-07-17 09:09:14 +00:00
|
|
|
switch-phy-addr-swap = <0>;
|
|
|
|
switch-phy-swap = <0>;
|
2018-06-08 08:51:00 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-07-17 09:09:14 +00:00
|
|
|
ð1 {
|
|
|
|
status = "okay";
|
2019-11-05 18:23:33 +00:00
|
|
|
|
2018-07-17 09:09:14 +00:00
|
|
|
compatible = "syscon", "simple-mfd";
|
|
|
|
};
|
|
|
|
|
2018-06-08 08:51:00 +00:00
|
|
|
&wmac {
|
|
|
|
status = "okay";
|
2019-11-05 18:23:33 +00:00
|
|
|
|
2018-06-08 08:51:00 +00:00
|
|
|
mtd-cal-data = <&art 0x1000>;
|
|
|
|
mtd-mac-address = <&uboot 0x1fc00>;
|
|
|
|
};
|