diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2021-08-18 20:06:29 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2021-08-18 23:46:02 +0200 |
commit | e826b642945ee7b196044a07faddd71c1bd6c6ef (patch) | |
tree | 06dc9a1c433de229f67899b0c1da70bbadb930da /target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts | |
parent | ba3d92c5a087cd4d28124fc366fc63a34732ff3d (diff) | |
download | upstream-e826b642945ee7b196044a07faddd71c1bd6c6ef.tar.gz upstream-e826b642945ee7b196044a07faddd71c1bd6c6ef.tar.bz2 upstream-e826b642945ee7b196044a07faddd71c1bd6c6ef.zip |
ath79: convert remaining mtd-mac-address cases to nvmem
Since the nvmem-based approach for retrieving MAC addresses
appears to depend on the addresses being set up after the
partitions, it is no longer possible to keep the MAC address
setup in shared DTSI files while the partitions itself are
set up in DTS files for the individual devices.
In ath79 the firmware partition is typically located somewhere
"in the middle" of the partition table. Thus, it's not trivial
to share the partitions containing MAC address information in
a common DTSI (like we did in some cases on ramips).
In this commit, MAC address setup is thus moved to the relevant
partitions, and in most cases needs to be duplicated. While
the duplication is not really nice, it eventually provides a
cleaner and more tidy setup, making the DTS(I) file
fragmentation a bit more logical. This should also help
with adding new devices, as information is distributed across
less locations.
For consistency, this commit also moves the mtd-cal-data property
"down" together with the MAC address setup, so it's not based
on a partition before the latter is defined either. (This is
only done for those files touched due to nvmem conversion.)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts')
-rw-r--r-- | target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts index e8d92419c6..a477b50417 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts @@ -1,13 +1,35 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "qca9563_tplink_tl-wpa8630p-v2.dtsi" +#include "qca9563_tplink_tl-wpa8630.dtsi" / { compatible = "tplink,tl-wpa8630p-v2.1-eu", "qca,qca9563"; model = "TP-Link WPA8630P v2.1 (EU)"; + + aliases { + label-mac-device = ð0; + }; }; &partitions { + partition@0 { + label = "factory-uboot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "u-boot"; + reg = <0x020000 0x020000>; + read-only; + }; + + partition@40000 { + compatible = "tplink,firmware"; + label = "firmware"; + reg = <0x040000 0x5e0000>; + }; + /* 0x620000 to 0x680000 is empty in OEM partitioning */ partition@680000 { @@ -28,3 +50,25 @@ read-only; }; }; + +ð0 { + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + mtd-cal-data = <&art 0x1000>; + + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; |