2016-05-09 06:32:52 +00:00
|
|
|
#include "mt7620a.dtsi"
|
2015-02-02 09:01:07 +00:00
|
|
|
|
2017-07-29 02:14:07 +00:00
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
2016-11-11 21:43:08 +00:00
|
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
|
2015-02-02 09:01:07 +00:00
|
|
|
/ {
|
2015-08-17 05:58:15 +00:00
|
|
|
compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc";
|
2015-02-02 09:01:07 +00:00
|
|
|
model = "Xiaomi MiWiFi Mini";
|
|
|
|
|
2018-07-16 08:27:22 +00:00
|
|
|
aliases {
|
2023-08-02 05:23:02 +00:00
|
|
|
led-boot = &led_yellow;
|
|
|
|
led-failsafe = &led_red;
|
2018-08-28 04:54:27 +00:00
|
|
|
led-running = &led_blue;
|
|
|
|
led-upgrade = &led_blue;
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
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:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
label-mac-device = ðernet;
|
2018-07-16 08:27:22 +00:00
|
|
|
};
|
|
|
|
|
2015-02-02 09:01:07 +00:00
|
|
|
chosen {
|
|
|
|
bootargs = "console=ttyS0,115200";
|
|
|
|
};
|
|
|
|
|
2018-12-30 11:42:53 +00:00
|
|
|
leds {
|
2015-02-02 09:01:07 +00:00
|
|
|
compatible = "gpio-leds";
|
|
|
|
|
2018-07-16 08:27:22 +00:00
|
|
|
led_blue: blue {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "blue:status";
|
2017-07-29 02:14:07 +00:00
|
|
|
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
|
2015-02-02 09:01:07 +00:00
|
|
|
};
|
|
|
|
|
2023-08-02 05:23:02 +00:00
|
|
|
led_yellow: yellow {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "yellow:status";
|
2017-07-29 02:14:07 +00:00
|
|
|
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
|
2015-02-02 09:01:07 +00:00
|
|
|
};
|
|
|
|
|
2023-08-02 05:23:02 +00:00
|
|
|
led_red: red {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "red:status";
|
2017-07-29 02:14:07 +00:00
|
|
|
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
|
2015-02-02 09:01:07 +00:00
|
|
|
};
|
2021-07-11 15:17:43 +00:00
|
|
|
|
|
|
|
wan {
|
|
|
|
label = "green:wan";
|
|
|
|
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
|
|
|
lan1 {
|
|
|
|
label = "green:lan1";
|
|
|
|
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
|
|
|
lan2 {
|
|
|
|
label = "green:lan2";
|
|
|
|
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
2015-02-02 09:01:07 +00:00
|
|
|
};
|
|
|
|
|
2018-12-30 11:17:25 +00:00
|
|
|
keys {
|
2019-09-20 12:03:02 +00:00
|
|
|
compatible = "gpio-keys";
|
2015-08-17 05:57:18 +00:00
|
|
|
|
2015-02-02 09:01:07 +00:00
|
|
|
reset {
|
|
|
|
label = "reset";
|
2017-07-29 02:14:07 +00:00
|
|
|
gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
|
2016-11-11 21:43:08 +00:00
|
|
|
linux,code = <KEY_RESTART>;
|
2015-02-02 09:01:07 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2016-05-10 10:41:46 +00:00
|
|
|
|
|
|
|
&gpio1 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2021-07-11 15:17:43 +00:00
|
|
|
&gpio2 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2016-05-10 10:41:46 +00:00
|
|
|
&spi0 {
|
|
|
|
status = "okay";
|
|
|
|
|
2020-05-07 14:15:27 +00:00
|
|
|
flash@0 {
|
2016-05-10 10:41:46 +00:00
|
|
|
compatible = "jedec,spi-nor";
|
2016-05-14 17:22:08 +00:00
|
|
|
reg = <0>;
|
2021-07-11 14:13:21 +00:00
|
|
|
spi-max-frequency = <70000000>;
|
|
|
|
m25p,fast-read;
|
2016-05-10 10:41:46 +00:00
|
|
|
|
2018-08-01 20:32:34 +00:00
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
partition@0 {
|
|
|
|
label = "u-boot";
|
|
|
|
reg = <0x0 0x30000>;
|
2021-07-11 14:16:54 +00:00
|
|
|
read-only;
|
2018-08-01 20:32:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
partition@30000 {
|
|
|
|
label = "u-boot-env";
|
|
|
|
reg = <0x30000 0x10000>;
|
|
|
|
};
|
|
|
|
|
|
|
|
factory: partition@40000 {
|
|
|
|
label = "factory";
|
|
|
|
reg = <0x40000 0x10000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@50000 {
|
2018-11-28 03:28:35 +00:00
|
|
|
compatible = "denx,uimage";
|
2018-08-01 20:32:34 +00:00
|
|
|
label = "firmware";
|
|
|
|
reg = <0x50000 0xf80000>;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@fd0000 {
|
|
|
|
label = "crash";
|
|
|
|
reg = <0xfd0000 0x10000>;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@fe0000 {
|
|
|
|
label = "reserved";
|
|
|
|
reg = <0xfe0000 0x10000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@ff0000 {
|
|
|
|
label = "Bdata";
|
|
|
|
reg = <0xff0000 0x10000>;
|
|
|
|
};
|
2016-05-10 10:41:46 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&ehci {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&ohci {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
ðernet {
|
2021-04-02 21:50:02 +00:00
|
|
|
nvmem-cells = <&macaddr_factory_28>;
|
|
|
|
nvmem-cell-names = "mac-address";
|
2020-05-14 13:41:31 +00:00
|
|
|
|
2016-05-10 10:41:46 +00:00
|
|
|
mediatek,portmap = "llllw";
|
|
|
|
};
|
|
|
|
|
|
|
|
&wmac {
|
2020-05-07 13:13:27 +00:00
|
|
|
ralink,mtd-eeprom = <&factory 0x0>;
|
2022-07-28 11:40:12 +00:00
|
|
|
|
|
|
|
pinctrl-names = "default", "pa_gpio";
|
2017-11-18 21:05:16 +00:00
|
|
|
pinctrl-0 = <&pa_pins>;
|
2022-07-28 11:40:12 +00:00
|
|
|
pinctrl-1 = <&pa_gpio_pins>;
|
2016-05-10 10:41:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
&pcie {
|
|
|
|
status = "okay";
|
2018-07-21 14:19:46 +00:00
|
|
|
};
|
2016-05-10 10:41:46 +00:00
|
|
|
|
2018-07-21 14:19:46 +00:00
|
|
|
&pcie0 {
|
|
|
|
mt76@0,0 {
|
|
|
|
reg = <0x0000 0 0 0 0>;
|
|
|
|
mediatek,mtd-eeprom = <&factory 0x8000>;
|
|
|
|
ieee80211-freq-limit = <5000000 6000000>;
|
2016-05-10 10:41:46 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-12-22 20:26:01 +00:00
|
|
|
&state_default {
|
|
|
|
gpio {
|
2021-07-11 15:17:43 +00:00
|
|
|
groups = "ephy", "i2c", "rgmii1";
|
2020-04-12 12:58:29 +00:00
|
|
|
function = "gpio";
|
2016-05-10 10:41:46 +00:00
|
|
|
};
|
|
|
|
};
|
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>;
|
|
|
|
};
|
|
|
|
};
|