aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/files/arch/arm/boot/dts
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2022-10-25 09:12:16 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2022-11-12 18:15:55 +0100
commit2b2f14c959ad883e3859d957f5f8571e9c2ef547 (patch)
tree003459f65556113374b0a40b128a6717fb5b83f4 /target/linux/ipq40xx/files/arch/arm/boot/dts
parentc6bef1b83a75d2f69a4d8904882800405df1a7b8 (diff)
downloadupstream-2b2f14c959ad883e3859d957f5f8571e9c2ef547.tar.gz
upstream-2b2f14c959ad883e3859d957f5f8571e9c2ef547.tar.bz2
upstream-2b2f14c959ad883e3859d957f5f8571e9c2ef547.zip
ipq40xx: utilize nvmem-cells for openmesh,a42
The calibration data and mac addresses on this device are stored in the 0:ART partition. It is therefore possible to move the code to handle them directly to the devicetree instead of the various scripts. But the actual relevant information about the partition layout is provided by the bootloader via bootargs (mtdparts) and not via the devicetree itself. Instead of using a fixed-partition template, the mtd dynamic partitions support from the upstream kernel is used. Reported-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'target/linux/ipq40xx/files/arch/arm/boot/dts')
-rw-r--r--target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts38
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts
index 89f5183045..b6ff09a042 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts
@@ -71,6 +71,7 @@
led-failsafe = &led_status_green;
led-running = &led_status_green;
led-upgrade = &led_status_green;
+ label-mac-device = &swport5;
};
leds {
@@ -144,7 +145,32 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <24000000>;
+
/* partitions are passed via bootloader */
+ partitions {
+ partition-art {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ label = "0:ART";
+
+ precal_art_1000: precal@1000 {
+ reg = <0x1000 0x2f20>;
+ };
+
+ precal_art_5000: precal@5000 {
+ reg = <0x5000 0x2f20>;
+ };
+
+ macaddr_gmac0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_gmac1: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+ };
+ };
};
};
@@ -177,19 +203,31 @@
&swport4 {
status = "okay";
label = "ethernet2";
+
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&macaddr_gmac1>;
};
&swport5 {
status = "okay";
label = "ethernet1";
+
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&macaddr_gmac0>;
};
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "OM-A42";
+
+ nvmem-cell-names = "pre-calibration";
+ nvmem-cells = <&precal_art_1000>;
};
&wifi1 {
status = "okay";
qcom,ath10k-calibration-variant = "OM-A42";
+
+ nvmem-cell-names = "pre-calibration";
+ nvmem-cells = <&precal_art_5000>;
};