openwrt/target/linux/ramips/dts/mt7620n_netgear_pr2000.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

207 lines
3.4 KiB
Plaintext

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620n.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "netgear,pr2000", "ralink,mt7620n-soc";
model = "Netgear PR2000";
aliases {
label-mac-device = &ethernet;
};
leds {
compatible = "gpio-leds";
internet {
label = "green:internet";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
wifi {
label = "green:wifi";
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
usb {
label = "green:usb";
gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wireless {
label = "wireless";
gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
wired {
label = "wired";
gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
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>;
};
/* sercomm header for kernel starts at 0x3ffba
* can be safely ignored since not used by OpenWRT
*/
partition@40000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x40000 0xf20000>;
};
factory: partition@f60000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0xf60000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
};
board_data: partition@f70000 {
compatible = "nvmem-cells";
label = "board_data";
reg = <0xf70000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
macaddr_board_data_b0: macaddr@b0 {
reg = <0xb0 0x6>;
};
};
partition@f80000 {
label = "POT";
reg = <0xf80000 0x10000>;
read-only;
};
partition@f90000 {
label = "Traffic Meter";
reg = <0xf90000 0x10000>;
read-only;
};
partition@fa0000 {
label = "Traffic Meter2";
reg = <0xfa0000 0x10000>;
read-only;
};
partition@fb0000 {
label = "nvram";
reg = <0xfb0000 0x10000>;
};
partition@fc0000 {
label = "DPF";
reg = <0xfc0000 0x10000>;
read-only;
};
partition@fd0000 {
label = "ralink_nvram";
reg = <0xfd0000 0x10000>;
read-only;
};
partition@fe0000 {
label = "reserved1";
reg = <0xfe0000 0x10000>;
read-only;
};
partition@ff0000 {
label = "reserved2";
reg = <0xff0000 0x10000>;
read-only;
};
};
};
};
&ethernet {
mediatek,portmap = "wllll";
nvmem-cells = <&macaddr_board_data_b0>;
nvmem-cell-names = "mac-address";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>, <&macaddr_board_data_b0>;
nvmem-cell-names = "eeprom", "mac-address";
};
&state_default {
default {
groups = "ephy", "wled", "pa", "i2c";
function = "gpio";
};
};