1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-15 11:43:54 +02:00

ipq807x: add nvmem uboot-env support

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>
This commit is contained in:
André Valentin 2023-01-17 23:07:42 +01:00 committed by Christian Marangi
parent 116c73fd71
commit 952c738c0f
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7

View 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