2019-07-19 12:58:51 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
|
|
|
2020-09-25 19:52:57 +00:00
|
|
|
#include "ar9344.dtsi"
|
|
|
|
|
2019-07-19 12:58:51 +00:00
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
#include <dt-bindings/input/input.h>
|
2021-05-05 03:32:00 +00:00
|
|
|
#include <dt-bindings/mtd/partitions/uimage.h>
|
2019-07-19 12:58:51 +00:00
|
|
|
|
|
|
|
/ {
|
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
|
|
|
aliases {
|
|
|
|
label-mac-device = &wmac;
|
|
|
|
};
|
|
|
|
|
2019-07-19 12:58:51 +00:00
|
|
|
keys {
|
|
|
|
compatible = "gpio-keys";
|
|
|
|
|
|
|
|
reset {
|
|
|
|
linux,code = <KEY_RESTART>;
|
|
|
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
|
|
|
debounce-interval = <60>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&ref {
|
|
|
|
clock-frequency = <40000000>;
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi {
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
flash@0 {
|
|
|
|
compatible = "jedec,spi-nor";
|
|
|
|
reg = <0>;
|
|
|
|
spi-max-frequency = <25000000>;
|
|
|
|
|
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
uboot: partition@0 {
|
|
|
|
label = "u-boot";
|
|
|
|
reg = <0x000000 0x020000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@20000 {
|
|
|
|
label = "partition-table";
|
|
|
|
reg = <0x020000 0x010000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
info: partition@30000 {
|
|
|
|
label = "info";
|
|
|
|
reg = <0x030000 0x010000>;
|
|
|
|
read-only;
|
2023-11-26 03:31:17 +00:00
|
|
|
|
|
|
|
nvmem-layout {
|
|
|
|
compatible = "fixed-layout";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
macaddr_info_8: macaddr@8 {
|
|
|
|
reg = <0x8 0x6>;
|
|
|
|
};
|
|
|
|
};
|
2019-07-19 12:58:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
partition@40000 {
|
|
|
|
label = "firmware";
|
|
|
|
reg = <0x040000 0x780000>;
|
2021-05-05 03:32:00 +00:00
|
|
|
compatible = "openwrt,uimage", "denx,uimage";
|
|
|
|
openwrt,ih-magic = <IH_MAGIC_OKLI>;
|
|
|
|
openwrt,offset = <0x3000>;
|
2019-07-19 12:58:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
partition@7c0000 {
|
|
|
|
label = "config";
|
|
|
|
reg = <0x7c0000 0x030000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
2024-02-17 05:17:20 +00:00
|
|
|
partition@7f0000 {
|
2019-07-19 12:58:51 +00:00
|
|
|
label = "art";
|
|
|
|
reg = <0x7f0000 0x010000>;
|
|
|
|
read-only;
|
2024-02-17 05:17:20 +00:00
|
|
|
|
|
|
|
nvmem-layout {
|
|
|
|
compatible = "fixed-layout";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
cal_art_1000: calibration@1000 {
|
|
|
|
reg = <0x1000 0x440>;
|
|
|
|
};
|
|
|
|
};
|
2019-07-19 12:58:51 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&wmac {
|
|
|
|
status = "okay";
|
|
|
|
|
2024-02-17 05:17:20 +00:00
|
|
|
nvmem-cells = <&macaddr_info_8>, <&cal_art_1000>;
|
|
|
|
nvmem-cell-names = "mac-address", "calibration";
|
2019-07-19 12:58:51 +00:00
|
|
|
};
|
2019-11-06 12:51:20 +00:00
|
|
|
|
|
|
|
ð0 {
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
phy-handle = <&swphy4>;
|
|
|
|
|
2021-04-02 21:47:31 +00:00
|
|
|
nvmem-cells = <&macaddr_info_8>;
|
|
|
|
nvmem-cell-names = "mac-address";
|
2019-11-06 12:51:20 +00:00
|
|
|
};
|
2020-06-18 20:31:11 +00:00
|
|
|
|
|
|
|
ð1 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
2020-12-02 10:24:07 +00:00
|
|
|
|
|
|
|
&gpio {
|
|
|
|
gpio_ext_lna0 {
|
|
|
|
gpio-hog;
|
|
|
|
gpios = <18 GPIO_ACTIVE_HIGH>;
|
|
|
|
output-high;
|
|
|
|
line-name = "tp-link:ext:lna0";
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio_ext_lna1 {
|
|
|
|
gpio-hog;
|
|
|
|
gpios = <19 GPIO_ACTIVE_HIGH>;
|
|
|
|
output-high;
|
|
|
|
line-name = "tp-link:ext:lna1";
|
|
|
|
};
|
|
|
|
};
|