openwrt/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
Shiji Yang da42c329c6
ramips: convert rt2x00 EEPROM to NVMEM format
This patch converts legacy Ralink SoCs and MT7620 WiFi calibration
data to NVMEM format. The EEPROM size is 0x200.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-10-17 12:07:26 +02:00

134 lines
2.2 KiB
Plaintext

#include "rt3883.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "trendnet,tew-691gr", "ralink,rt3883-soc";
model = "TRENDnet TEW-691GR";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
};
flash@1c000000 {
compatible = "cfi-flash";
reg = <0x1c000000 0x800000>;
bank-width = <2>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
reg = <0x0 0x0030000>;
label = "u-boot";
read-only;
};
partition@30000 {
reg = <0x00030000 0x00010000>;
label = "u-boot-env";
read-only;
};
factory: partition@40000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x00040000 0x00010000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
partition@50000 {
compatible = "denx,uimage";
reg = <0x00050000 0x007b0000>;
label = "firmware";
};
};
};
keys {
compatible = "gpio-keys-polled";
poll-interval = <100>;
reset {
label = "reset";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
rfkill {
label = "rfkill";
gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
};
leds {
compatible = "gpio-leds";
led_wps: wps {
label = "green:wps";
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
};
};
&gpio1 {
status = "okay";
};
&state_default {
gpio {
groups = "spi", "i2c", "jtag", "uartf";
function = "gpio";
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
port@0 {
phy-handle = <&phy0>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
};
};
&wmac {
status = "okay";
ralink,5ghz = <0>;
nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
nvmem-cell-names = "eeprom", "mac-address";
mac-address-increment = <1>;
};