[openwrt/openwrt] ipq807x: add nvmem uboot-env support
LEDE Commits
lede-commits at lists.infradead.org
Thu Jan 19 04:26:27 PST 2023
ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/952c738c0fe360ae074fbf6a87d03883157bc2dd
commit 952c738c0fe360ae074fbf6a87d03883157bc2dd
Author: André Valentin <avalentin at marcant.net>
AuthorDate: Tue Jan 17 23:07:42 2023 +0100
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 at 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 at marcant.net>
---
target/linux/ipq807x/config-5.15 | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/linux/ipq807x/config-5.15 b/target/linux/ipq807x/config-5.15
index f979f9a28a..4a5aee7d9e 100644
--- a/target/linux/ipq807x/config-5.15
+++ b/target/linux/ipq807x/config-5.15
@@ -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
More information about the lede-commits
mailing list