ipq807x: add nvmem uboot-env support
authorAndré Valentin <avalentin@marcant.net>
Tue, 17 Jan 2023 22:07:42 +0000 (23:07 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Thu, 19 Jan 2023 12:26:15 +0000 (13:26 +0100)
Enabling kernel symbol CONFIG_NVMEM_U_BOOT_ENV allows to use u-boot
environement variable ethaddr with nvmen. That way it is possible to assign
the MAC address to the ethernet device driver.

Example of usage in dts:
....
partition@600000 {
compatible = "u-boot,env";
label = "0:appsblenv";
reg = <0x600000 0x10000>;

macaddr_lan: ethaddr {
};
};
....
&dp5 {
status = "okay";
phy-handle = <&qca8081>;
label = "wan";
nvmem-cells = <&macaddr_lan>;
nvmem-cell-names = "mac-address-ascii";
mac-address-increment = <1>;
};

This is needed for Zyxel NBG7815.

Signed-off-by: André Valentin <avalentin@marcant.net>
target/linux/ipq807x/config-5.15

index f979f9a28a2d9e4eb490ac5b29ae355379a29eb8..4a5aee7d9efa401585d7d0a2b357ff0dd6a5bc0b 100644 (file)
@@ -257,6 +257,7 @@ CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y
 CONFIG_NVMEM=y
 CONFIG_NVMEM_QCOM_QFPROM=y
 # CONFIG_NVMEM_SPMI_SDAM is not set
+CONFIG_NVMEM_U_BOOT_ENV=y
 CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y