mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
65cd6a6fec
This patch converts MT7613 and MT7615 WiFi calibration data to NVMEM format. The EEPROM size is 0x4da8. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
213 lines
3.6 KiB
Plaintext
213 lines
3.6 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "mt7621.dtsi"
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/input/input.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
|
|
/ {
|
|
compatible = "tplink,mr600-v2-eu", "mediatek,mt7621-soc";
|
|
model = "TP-Link MR600 v2 (EU)";
|
|
|
|
aliases {
|
|
led-boot = &led_power;
|
|
led-failsafe = &led_power;
|
|
led-running = &led_power;
|
|
led-upgrade = &led_power;
|
|
label-mac-device = &gmac0;
|
|
};
|
|
|
|
chosen {
|
|
bootargs = "console=ttyS0,115200";
|
|
};
|
|
|
|
keys {
|
|
compatible = "gpio-keys";
|
|
|
|
wlan {
|
|
label = "wlan";
|
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_WLAN>;
|
|
};
|
|
|
|
reset {
|
|
label = "reset";
|
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_RESTART>;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
led_power: power {
|
|
label = "white:power";
|
|
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
|
};
|
|
wlan {
|
|
label = "white:wlan";
|
|
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
|
linux,default-trigger = "phy1tpt";
|
|
};
|
|
wan {
|
|
label = "white:wan";
|
|
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
signal1 {
|
|
label = "white:signal1";
|
|
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
signal2 {
|
|
label = "white:signal2";
|
|
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
signal3 {
|
|
label = "white:signal3";
|
|
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
4g {
|
|
label = "white:4g";
|
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
|
};
|
|
lan {
|
|
label = "white:lan";
|
|
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
&spi0 {
|
|
status = "okay";
|
|
|
|
flash@0 {
|
|
compatible = "jedec,spi-nor";
|
|
reg = <0>;
|
|
spi-max-frequency = <80000000>;
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
label = "uboot";
|
|
reg = <0x00000 0x20000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@20000 {
|
|
compatible = "openwrt,uimage";
|
|
openwrt,offset = <512>; /* account for the 512-byte long header */
|
|
label = "firmware";
|
|
reg = <0x20000 0xfa0000>;
|
|
};
|
|
|
|
romfile: partition@fc0000 {
|
|
compatible = "nvmem-cells";
|
|
label = "romfile";
|
|
reg = <0xfc0000 0x10000>;
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
read-only;
|
|
|
|
macaddr_romfile_f100: romfile@f100 {
|
|
reg = <0xf100 0x6>;
|
|
};
|
|
};
|
|
|
|
partition@fd0000 {
|
|
label = "config";
|
|
reg = <0xfd0000 0x10000>;
|
|
read-only;
|
|
};
|
|
|
|
radio: partition@fe0000 {
|
|
compatible = "nvmem-cells";
|
|
label = "radio";
|
|
reg = <0xfe0000 0x10000>;
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
read-only;
|
|
|
|
eeprom_radio_0: eeprom@0 {
|
|
reg = <0x0 0x400>;
|
|
};
|
|
|
|
eeprom_radio_8000: eeprom@8000 {
|
|
reg = <0x8000 0x4da8>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&pcie {
|
|
status = "okay";
|
|
};
|
|
|
|
|
|
&pcie0 {
|
|
mt76@0,0 {
|
|
compatible = "mediatek,mt76";
|
|
reg = <0x0000 0 0 0 0>;
|
|
nvmem-cells = <&eeprom_radio_0>, <&macaddr_romfile_f100>;
|
|
nvmem-cell-names = "eeprom", "mac-address";
|
|
ieee80211-freq-limit = <2400000 2500000>;
|
|
};
|
|
};
|
|
|
|
&pcie1 {
|
|
mt76@0,0 {
|
|
compatible = "mediatek,mt76";
|
|
reg = <0x0000 0 0 0 0>;
|
|
ieee80211-freq-limit = <5000000 6000000>;
|
|
nvmem-cells = <&eeprom_radio_8000>, <&macaddr_romfile_f100>;
|
|
nvmem-cell-names = "eeprom", "mac-address";
|
|
mac-address-increment = <(-1)>;
|
|
};
|
|
};
|
|
|
|
&gmac0 {
|
|
nvmem-cells = <&macaddr_romfile_f100>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
&gmac1 {
|
|
status = "okay";
|
|
label = "wan";
|
|
phy-handle = <ðphy4>;
|
|
|
|
nvmem-cells = <&macaddr_romfile_f100>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
&mdio {
|
|
ethphy4: ethernet-phy@4 {
|
|
reg = <4>;
|
|
};
|
|
};
|
|
|
|
|
|
&switch0 {
|
|
ports {
|
|
port@1 {
|
|
status = "okay";
|
|
label = "lan1";
|
|
};
|
|
port@2 {
|
|
status = "okay";
|
|
label = "lan2";
|
|
};
|
|
port@3 {
|
|
status = "okay";
|
|
label = "lan3";
|
|
};
|
|
};
|
|
};
|