CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y
CONFIG_NVMEM=y
CONFIG_NVMEM_LAYOUTS=y
+CONFIG_NVMEM_LAYOUT_ASCII_ENV=y
CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y
CONFIG_NVMEM_QCOM_QFPROM=y
# CONFIG_NVMEM_QCOM_SEC_QFPROM is not set
/ {
aliases {
- ethernet0 = &dp1;
- ethernet1 = &dp2;
led-boot = &led_system_blue;
led-failsafe = &led_system_red;
led-running = &led_system_blue;
label = "devinfo";
reg = <0x00680000 0x40000>;
read-only;
+
+ nvmem-layout {
+ compatible = "ascii-eq-delim-env";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ hw_mac_addr: hw_mac_addr {
+ compatible = "mac-base";
+
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition@6c0000 {
// MAC1 ---SGMII---> QCA8337 SerDes
&dp2 {
status = "okay";
+
phy-mode = "sgmii";
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
+
fixed-link {
speed = <1000>;
full-duplex;
// MAC1 ---SGMII---> QCA8337 SerDes
&dp2 {
status = "okay";
+
phy-mode = "sgmii";
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
+
fixed-link {
speed = <1000>;
full-duplex;
// MAC0 -> GE Phy
&dp1 {
status = "okay";
+
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
};
// MAC1 ---SGMII---> QCA8081
label = "wan";
phy-handle = <&qca8081>;
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
};
&mdio0 {
esac
}
-ipq50xx_setup_macs()
-{
- local board="$1"
- local lan_mac=""
- local wan_mac=""
- local label_mac=""
-
- case "$board" in
- linksys,mx2000|\
- linksys,mx5500|\
- linksys,spnmx56)
- label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
- lan_mac=$label_mac
- wan_mac=$label_mac
- ucidef_set_network_device_mac eth0 $label_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=$(board_name)
ipq50xx_setup_interfaces $board
-ipq50xx_setup_macs $board
board_config_flush
exit 0