generic: platform/mikrotik: add NVMEM layout driver

Currently, information from MikroTik hard_config is only available via
sysfs, meaning that we have to rely on userspace to for example setup MACs.

So, lets provide a basic NVMEM layout based driver to expose the same cells
as sysfs driver exposes.

Do note that the we dont extract the WLAN caldata and BDF-s at this point.

Reviewed-by: Thibaut VARÈNE <hacks@slashdirt.org>
Link: https://github.com/openwrt/openwrt/pull/15665
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Robert Marko
2024-06-09 12:14:25 +02:00
parent 6527619395
commit 73a9f9f857
6 changed files with 240 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_NET_DEVLINK=y
CONFIG_NET_DSA=y
CONFIG_NET_SWITCHDEV=y
# CONFIG_NVMEM_LAYOUT_MIKROTIK is not set
CONFIG_PHYLINK=y
CONFIG_PHY_AR7100_USB=y
CONFIG_PHY_AR7200_USB=y