1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-13 10:49:13 +02:00
openwrt/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts
Liu Yu e422a3af69 ramips: fix Ethernet random MAC address for HILINK HLK-7628N
Set the ethernet address from flash.

MAC addresses as verified by OEM firmware:

  use   interface  source
  2g    wlan0      factory 0x04 (label)
  LAN   eth0.1     factory 0x28 (label+1)
  WAN   eth0.2     factory 0x2e (label+2)

Fixes: 671c9d16e3 ("ramips: add support for HILINK HLK-7628N")

Signed-off-by: Liu Yu <f78fk@live.com>
[drop old MAC address setup from 02_network, cut out state_default
changes, face-lift commit message, add Fixes:]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit ae9c5cd37b)
2021-06-12 11:01:43 +02:00

90 lines
1.3 KiB
Plaintext

// 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 = "hilink,hlk-7628n", "mediatek,mt7628an-soc";
model = "HILINK HLK-7628N";
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
wlan {
label = "green:wlan";
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
};
};
};
&state_default {
gpio {
groups = "i2c";
function = "gpio";
};
};
&uart1 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
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 0x1fb0000>;
};
};
};
};
&ethernet {
mtd-mac-address = <&factory 0x28>;
};
&wmac {
status = "okay";
};