mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +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>
183 lines
2.7 KiB
Plaintext
183 lines
2.7 KiB
Plaintext
#include "mt7621.dtsi"
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
/ {
|
|
model = "Ubiquiti UniFi Switch Flex";
|
|
compatible = "ubnt,usw-flex", "mediatek,mt7621-soc";
|
|
|
|
aliases {
|
|
led-boot = &led_white;
|
|
led-failsafe = &led_white;
|
|
led-running = &led_blue;
|
|
led-upgrade = &led_blue;
|
|
label-mac-device = &gmac0;
|
|
};
|
|
|
|
chosen {
|
|
bootargs-override = "console=ttyS0,115200";
|
|
};
|
|
|
|
keys {
|
|
compatible = "gpio-keys";
|
|
|
|
reset {
|
|
label = "reset";
|
|
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_RESTART>;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
led_blue: status_blue {
|
|
label = "blue:status";
|
|
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
led_white: status_white {
|
|
label = "white:status";
|
|
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
i2c-gpio {
|
|
compatible = "i2c-gpio";
|
|
|
|
sda-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
|
|
scl-gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
|
|
|
|
i2c-gpio,delay-us = <50>;
|
|
|
|
/* Microsemi PD69104B1 PSE controller */
|
|
};
|
|
};
|
|
|
|
&gmac0 {
|
|
nvmem-cells = <&macaddr_eeprom>;
|
|
nvmem-cell-names = "mac-address";
|
|
label = "dsa";
|
|
};
|
|
|
|
&gmac1 {
|
|
status = "okay";
|
|
label = "lan1";
|
|
phy-handle = <ðphy4>;
|
|
|
|
nvmem-cells = <&macaddr_eeprom>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
&mdio {
|
|
ethphy4: ethernet-phy@4 {
|
|
reg = <4>;
|
|
};
|
|
};
|
|
|
|
&switch0 {
|
|
ports {
|
|
port@0 {
|
|
status = "okay";
|
|
label = "lan5";
|
|
};
|
|
|
|
port@1 {
|
|
status = "okay";
|
|
label = "lan4";
|
|
};
|
|
|
|
port@2 {
|
|
status = "okay";
|
|
label = "lan3";
|
|
};
|
|
|
|
port@3 {
|
|
status = "okay";
|
|
label = "lan2";
|
|
};
|
|
};
|
|
};
|
|
|
|
&state_default {
|
|
gpio {
|
|
groups = "i2c", "uart2", "uart3", "jtag";
|
|
function = "gpio";
|
|
};
|
|
};
|
|
|
|
&spi0 {
|
|
status = "okay";
|
|
|
|
flash@0 {
|
|
compatible = "jedec,spi-nor";
|
|
reg = <0>;
|
|
spi-max-frequency = <30000000>;
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
label = "u-boot";
|
|
reg = <0x0 0x60000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@60000 {
|
|
label = "u-boot-env";
|
|
reg = <0x60000 0x10000>;
|
|
};
|
|
|
|
partition@70000 {
|
|
label = "factory";
|
|
reg = <0x70000 0x10000>;
|
|
read-only;
|
|
};
|
|
|
|
part_eeprom: partition@80000 {
|
|
compatible = "nvmem-cells";
|
|
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
label = "eeprom";
|
|
reg = <0x80000 0x10000>;
|
|
read-only;
|
|
|
|
macaddr_eeprom: macaddr@0 {
|
|
reg = <0x0 0x6>;
|
|
};
|
|
};
|
|
|
|
partition@90000 {
|
|
label = "bs";
|
|
reg = <0x90000 0x10000>;
|
|
};
|
|
|
|
partition@a0000 {
|
|
label = "cfg";
|
|
reg = <0xa0000 0x100000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@1a0000 {
|
|
compatible = "denx,fit";
|
|
label = "firmware";
|
|
reg = <0x1a0000 0x730000>;
|
|
};
|
|
|
|
partition@8d0000 {
|
|
label = "kernel1";
|
|
reg = <0x8d0000 0x730000>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&xhci {
|
|
status = "disabled";
|
|
};
|