WIFI-12650 CIG-WF-186w-mac-addr-rtl-8367s-switch-patch

1. Using rtl8367c.c file for rtl8367S switch driver  to support vlan 
2. Configure eth0.1 as WAN and eth0.2 as LAN
3. Add mdio read/write in smi driver  followed 5.4 kernel driver
4. add mido clock setting followed 5.4 kernel driver for 186w board
5. Add eth and wifi mac address allocation based of BaseMacAddress
6. Update new bdf for 2G radio

Signed-off-by: Ken <xshi@actiontec.com>
This commit is contained in:
Ken
2023-05-31 16:56:50 +08:00
parent 224b327d4d
commit ff383a1dfc
4 changed files with 2577 additions and 3565 deletions

View File

@@ -63,7 +63,7 @@ qcom_setup_interfaces()
ucidef_set_interface_wan "eth0"
;;
cig,wf186w)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch0" "4:wan" "1:lan" "2:lan" "3:lan" "0:lan" "6@eth0"
;;
yuncore,fap650)
ucidef_set_interface_lan "eth3 eth2 eth1 eth0"
@@ -141,12 +141,12 @@ qcom_setup_macs()
mac=$(grep BaseMacAddress= $mtd | cut -dx -f2)
[ -z "$mac" ] && return;
wan_mac=$(macaddr_canonicalize $mac)
#lan_mac=$(macaddr_add "$wan_mac" 1)
lan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_network_device_mac eth0 $wan_mac
# ucidef_set_network_device_mac eth1 $wan_mac
ucidef_set_network_device_mac eth0.2 $lan_mac
ip link set eth0 address $wan_mac
# ip link set eth1 address $wan_mac
# ucidef_set_label_macaddr $wan_mac
ip link set eth0.2 address $lan_mac
ucidef_set_label_macaddr $wan_mac
;;
cybertan,eww631-a1|\
cybertan,eww631-b1)

View File

@@ -474,7 +474,6 @@
mdio0: mdio@88000 {
status = "ok";
ethernet-phy@0 {
reg = <7>;
};
@@ -485,16 +484,16 @@
pinctrl-0 = <&mdio1_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 35 0>;
cig_clk_div = <0xff>;
ethernet-phy@0 {
reg = <0x1d>;
};
};
realtek@29{
compatible = "realtek,rtl8367c";
compatible = "realtek,rtl8367s";
mii-bus = <&mdio1>;
realtek,extif0 = <0 0 12 1 0 1 1 1 1 2>;
realtek,extif0 = <0 0 10 1 1 1 1 1 2>;
switch = <&tlmm 35 0>;
phy-addr = <29>;
status = "ok";

File diff suppressed because it is too large Load Diff