mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
ipq807x: zte mf269: optimize related code
Since this part will not be accepted by upstream.
This commit is contained in:
parent
edbd8d2e98
commit
4d5770a6cf
@ -16,9 +16,6 @@ ipq807x_setup_interfaces()
|
|||||||
;;
|
;;
|
||||||
zte,mf269)
|
zte,mf269)
|
||||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||||
hw_mac_addr=$(mtd_get_mac_binary "mac" 0x0)
|
|
||||||
ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
|
|
||||||
ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 1)"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported hardware. Network interfaces not initialized"
|
echo "Unsupported hardware. Network interfaces not initialized"
|
||||||
@ -26,9 +23,30 @@ ipq807x_setup_interfaces()
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ipq807x_setup_macs()
|
||||||
|
{
|
||||||
|
local board="$1"
|
||||||
|
local lan_mac=""
|
||||||
|
local wan_mac=""
|
||||||
|
local label_mac=""
|
||||||
|
|
||||||
|
case "$board" in
|
||||||
|
zte,mf269)
|
||||||
|
wan_mac=$(mtd_get_mac_binary mac 0x0)
|
||||||
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||||
|
label_mac=$wan_mac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
||||||
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
||||||
|
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
||||||
|
}
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
board=$(board_name)
|
board=$(board_name)
|
||||||
ipq807x_setup_interfaces $board
|
ipq807x_setup_interfaces $board
|
||||||
|
ipq807x_setup_macs $board
|
||||||
board_config_flush
|
board_config_flush
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
48
target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-mf269.dts
Executable file → Normal file
48
target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-mf269.dts
Executable file → Normal file
@ -106,42 +106,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
&blsp1_spi6 {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&spi_5_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
cs-select = <0>;
|
|
||||||
|
|
||||||
si3217x@0 {
|
|
||||||
compatible = "si3217x";
|
|
||||||
num_slic = <1>;
|
|
||||||
reg = <0>;
|
|
||||||
spi-cpha;
|
|
||||||
spi-cpol;
|
|
||||||
spi-max-frequency = <960000>;
|
|
||||||
pinctrl-0 = <&slic_ctl_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
ctl-gpio = <&tlmm 57 0>;
|
|
||||||
rst-gpio = <&tlmm 58 0>;
|
|
||||||
irq-gpio = <&tlmm 59 0>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&blsp1_i2c5 {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
pinctrl-0 = <&i2c_4_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
|
|
||||||
aw9106b@5b {
|
|
||||||
compatible = "aw9106b";
|
|
||||||
reg = <0x5b>;
|
|
||||||
reset-gpio = <&tlmm 54 0>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
&blsp1_uart5 {
|
&blsp1_uart5 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
@ -559,20 +523,10 @@
|
|||||||
output-high;
|
output-high;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
usb_cc_pins: usb_cc_pins {
|
|
||||||
mux {
|
|
||||||
pins = "gpio47", "gpio48";
|
|
||||||
function = "gpio";
|
|
||||||
drive-strength = <8>;
|
|
||||||
bias-disable;
|
|
||||||
output-high;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb_0 {
|
&usb_0 {
|
||||||
pinctrl-0 = <&usb_vbus_pins &usb_cc_pins>;
|
pinctrl-0 = <&usb_vbus_pins>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user