mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
f1c9afd801
Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2 pins are available. This achieves 2 Gbps total bandwidth to the CPU using the second RGMII. The ports called "wan" are muxed where possible. On a minority of devices, this is not possible. Those cases: mt7621_ampedwireless_ally-r1900k.dts: lan3 mt7621_ubnt_edgerouter-x.dts: eth0 mt7621_gnubee_gb-pc1.dts: ethblue mt7621_linksys_re6500.dts: lan1 mt7621_netgear_wac104.dts: lan4 mt7621_tplink_eap235-wall-v1.dts: lan0 mt7621_tplink_eap615-wall-v1.dts: lan0 mt7621_ubnt_usw-flex.dts: lan1 The "wan" port is just what the vendor designated on the board/plastic chasis of the device. On a technical level, there is no difference between a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer connecting to WAN via the port described above for these devices to benefit the feature brought with this patch. mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks like it should, because the rgmii2 pins are wired to unused components. Tested on a range of devices documented on the GitHub PR. Link: https://github.com/openwrt/openwrt/pull/10238 Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
215 lines
3.1 KiB
Plaintext
215 lines
3.1 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
|
|
#include "mt7621.dtsi"
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
/ {
|
|
aliases {
|
|
led-boot = &led_power;
|
|
led-failsafe = &led_power;
|
|
led-running = &led_power;
|
|
led-upgrade = &led_power;
|
|
};
|
|
|
|
chosen {
|
|
bootargs = "console=ttyS0,115200";
|
|
};
|
|
|
|
keys {
|
|
compatible = "gpio-keys";
|
|
|
|
wps {
|
|
label = "wps";
|
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_WPS_BUTTON>;
|
|
};
|
|
|
|
reset {
|
|
label = "reset";
|
|
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_RESTART>;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
wan_green {
|
|
label = "green:wan";
|
|
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
lan1_green {
|
|
label = "green:lan1";
|
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
lan2_green {
|
|
label = "green:lan2";
|
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
lan3_green {
|
|
label = "green:lan3";
|
|
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
lan4_green {
|
|
label = "green:lan4";
|
|
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led_power: power {
|
|
label = "white:power";
|
|
gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
wps {
|
|
label = "green:wps";
|
|
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&nand {
|
|
status = "okay";
|
|
|
|
mediatek,bbt;
|
|
mediatek,bmt-remap-range =
|
|
<0x180000 0x580000>,
|
|
<0x2980000 0x2d80000>;
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
label = "boot";
|
|
reg = <0x0 0x80000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@80000 {
|
|
label = "u_env";
|
|
reg = <0x80000 0x40000>;
|
|
};
|
|
|
|
factory: partition@c0000 {
|
|
label = "factory";
|
|
reg = <0xc0000 0x40000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@100000 {
|
|
label = "s_env";
|
|
reg = <0x100000 0x40000>;
|
|
};
|
|
|
|
partition@140000 {
|
|
label = "devinfo";
|
|
reg = <0x140000 0x40000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@180000 {
|
|
label = "kernel";
|
|
reg = <0x180000 0x400000>;
|
|
};
|
|
|
|
partition@580000 {
|
|
label = "ubi";
|
|
reg = <0x580000 0x2400000>;
|
|
};
|
|
|
|
partition@2980000 {
|
|
label = "alt_kernel";
|
|
reg = <0x2980000 0x400000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@2d80000 {
|
|
label = "alt_rootfs";
|
|
reg = <0x2d80000 0x2400000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@5180000 {
|
|
label = "sysdiag";
|
|
reg = <0x5180000 0x100000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@5280000 {
|
|
label = "syscfg";
|
|
reg = <0x5280000 0x2d00000>;
|
|
read-only;
|
|
};
|
|
};
|
|
};
|
|
|
|
&state_default {
|
|
gpio {
|
|
groups = "i2c", "uart2", "uart3", "jtag", "wdt";
|
|
function = "gpio";
|
|
};
|
|
};
|
|
|
|
&pcie {
|
|
status = "okay";
|
|
};
|
|
|
|
&pcie0 {
|
|
mt76@0,0 {
|
|
compatible = "mediatek,mt76";
|
|
reg = <0x0000 0 0 0 0>;
|
|
mediatek,mtd-eeprom = <&factory 0x0000>;
|
|
};
|
|
};
|
|
|
|
&pcie1 {
|
|
mt76@0,0 {
|
|
compatible = "mediatek,mt76";
|
|
reg = <0x0000 0 0 0 0>;
|
|
mediatek,mtd-eeprom = <&factory 0x8000>;
|
|
};
|
|
};
|
|
|
|
&gmac1 {
|
|
status = "okay";
|
|
label = "wan";
|
|
phy-handle = <ðphy0>;
|
|
};
|
|
|
|
&mdio {
|
|
ethphy0: ethernet-phy@0 {
|
|
reg = <0>;
|
|
};
|
|
};
|
|
|
|
&switch0 {
|
|
ports {
|
|
port@1 {
|
|
status = "okay";
|
|
label = "lan1";
|
|
};
|
|
|
|
port@2 {
|
|
status = "okay";
|
|
label = "lan2";
|
|
};
|
|
|
|
port@3 {
|
|
status = "okay";
|
|
label = "lan3";
|
|
};
|
|
|
|
port@4 {
|
|
status = "okay";
|
|
label = "lan4";
|
|
};
|
|
};
|
|
};
|