mediatek: jdc-re-cp-03: using gsw instead of dsa

This commit is contained in:
hanwckf 2024-10-16 10:56:19 +08:00
parent 6f6235024c
commit 8f6d8e2aa6
2 changed files with 52 additions and 54 deletions

View File

@ -20,15 +20,22 @@
};
chosen {
bootargs = "console=ttyS0,115200n1 loglevel=8 \
earlycon=uart8250,mmio32,0x11002000 \
root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
bootargs = "console=ttyS0,115200n1 loglevel=8 \
earlycon=uart8250,mmio32,0x11002000 \
root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
};
memory {
reg = <0 0x40000000 0 0x40000000>;
};
gsw: gsw@0 {
compatible = "mediatek,mt753x";
mediatek,ethsys = <&ethsys>;
#address-cells = <1>;
#size-cells = <0>;
};
gpio-keys {
compatible = "gpio-keys";
@ -116,25 +123,55 @@
mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
phy5: phy@5 {
compatible = "ethernet-phy-id67c9.de0a";
reg = <5>;
};
phy6: phy@6 {
compatible = "ethernet-phy-ieee802.3-c45";
reg = <6>;
};
};
};
&hnat {
mtketh-wan = "eth1";
mtketh-lan = "lan";
mtketh-lan = "eth0";
mtketh-max-gmac = <2>;
status = "okay";
};
&mdio {
switch: switch@1f {
compatible = "mediatek,mt7531";
reg = <31>;
reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&pio>;
interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
&gsw {
mediatek,mdio = <&mdio>;
mediatek,portmap = "lllll";
mediatek,mdio_master_pinmux = <0>;
reset-gpios = <&pio 5 0>;
interrupt-parent = <&pio>;
interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
status = "okay";
port5: port@5 {
compatible = "mediatek,mt753x-port";
reg = <5>;
phy-mode = "sgmii";
fixed-link {
speed = <2500>;
full-duplex;
};
};
port6: port@6 {
compatible = "mediatek,mt753x-port";
mediatek,ssc-on;
reg = <6>;
phy-mode = "sgmii";
fixed-link {
speed = <2500>;
full-duplex;
};
};
};
@ -233,46 +270,6 @@
};
};
&switch {
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
label = "lan1";
};
port@2 {
reg = <2>;
label = "lan2";
};
port@3 {
reg = <3>;
label = "lan3";
};
port@4 {
reg = <4>;
label = "lan4";
};
port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac0>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
};
&uart0 {
status = "okay";
};

View File

@ -40,7 +40,8 @@ mediatek_setup_interfaces()
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" eth1
;;
jdcloud,re-cp-03)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "eth1"
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" "1:lan" "2:lan" "3:lan" "4:lan" "6u@eth0"
;;
tplink,tl-xdr6086)
ucidef_set_interfaces_lan_wan "lan1 lan2" eth1