ramips: mt7628: move mtd-eeprom out of root DTSI
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 17 Aug 2021 12:07:57 +0000 (14:07 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 17 Aug 2021 16:41:17 +0000 (18:41 +0200)
The mt76x8 subtarget is the only one in ramips that stores the
mediatek,mtd-eeprom property directly in the "root" mt7628an.dtsi.

This is not optimal for a few different reasons:

 * If you don't really know it or are used to other (sub)targets,
   the property will be set somewhat magically.
 * The property is set based on &factory partition before (if at all)
   this partition is defined.
 * There are several devices that have different offset or even
   different partitions to read from, which will then be overwritten
   in the DTS files. Thus, definitions are scattered between root
   DTSI and individual files.

Based on these circumstances, the "root" definition is removed and
the property is added to the device-based DTS(I) files where needed
and applicable. This should be easier to grasp for unexperienced
developers and will move the property closer to the partition
definitions.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
44 files changed:
target/linux/ramips/dts/mt7628an.dtsi
target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts
target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi
target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts
target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts
target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts
target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi
target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts
target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts
target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts
target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi
target/linux/ramips/dts/mt7628an_iptime.dtsi
target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi
target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts
target/linux/ramips/dts/mt7628an_mediatek_mt7628an-eval-board.dts
target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts
target/linux/ramips/dts/mt7628an_minew_g1-c.dts
target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi
target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
target/linux/ramips/dts/mt7628an_skylab_skw92a.dts
target/linux/ramips/dts/mt7628an_tama_w06.dts
target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi
target/linux/ramips/dts/mt7628an_tplink_8m.dtsi
target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts
target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts
target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi
target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi
target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts
target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts
target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts
target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts
target/linux/ramips/dts/mt7628an_widora_neo.dtsi
target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts
target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts
target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts

index 0dafdc790e126092457dd3d4d9cb4585040f3abf..7bc001207bcf036d77403ab2b5013db9abde7c73 100644 (file)
                interrupts = <6>;
 
                status = "disabled";
-
-               mediatek,mtd-eeprom = <&factory 0x0000>;
        };
 };
index 2e01b974a8a2e33fa3075fabc75b5a782e72cb11..f5cff3bb609a63f165d7e396200aa289c88d5c2d 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index 3a2de12f6a875f74a8a515b91c52a57b44768e3d..8fd86dcb16f1dac8339d52b5f4335f55667e4e43 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &state_default {
index cb4c61ecbd230e9cde298b7f424c16a84e3d489e..41bad4e3edbda00ed6a60329ef162cb313f0d0eb 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
index 5a2962a31550a4800fd4edcd83049bb030f45083..82f0e7c690a0e7d0bd0b047d5b48b0f572ea0223 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index e4b5f31ada85b9957a5ae35616c9572d4266882f..f716ad9f23ba2776a22c1041b91ad47de148a6b2 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index e0445c61dd02411344e1b79b0d523abd2eda8498..48f0fbd92bb1b6a39b2c17ffeb3d6fe849bfe293 100644 (file)
@@ -87,6 +87,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &spi0 {
index 6e3f64632dd5cdb10d9bd5b94331105e4c7d9826..089a3f3c42780bcb45845af047fb73e64ea1e671 100644 (file)
@@ -59,6 +59,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &spi0 {
index 945f680618930b324e8b8b41ac84f937888b3cac..0b21724b1a856548f56701526ee57dd48014bfe7 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
 #include "mt7628an.dtsi"
+
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index 97acb3ff3f57393b8ffd9ac2628d274b1ecdb6ea..b7c3af796d5aa8442d39e03dbda8097f1380b69c 100644 (file)
@@ -88,6 +88,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index 8e07dff0f14841f7cfa2730f5afee7fa4d2d8c41..231aa15bfce63c43833b986b9eb5fe107e644983 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index dcdf0cddc77312f2c8af6d2c5df80d7bd09a8e0a..bfc510e06feae05bb0a605357acef98cca25d248 100644 (file)
@@ -96,6 +96,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index bc8965ca277fe22c343b678f9b3f05931da4cad4..ccc6debfc9bcf3b9244f4ac7e64e8081c392e40a 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &uboot {
index 8e73767dc283a65d1aaa1fab1b80f22f984e33b9..03de21224b1f824676ef900fb8f7e0c3779bd191 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index 7beda75806e64c0ab763ff422a5e0e7bbb1085b6..57624c302ebfa7e63e0a038258e154718fa892d9 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index 5418dac886ee4f8ef41edd2ce7ef05bf84ec2b27..4dede4287f59801aea6bf8e168a5e1af598076f8 100644 (file)
        };
 };
 
-&wmac {
-       status = "okay";
-};
-
 &spi0 {
        status = "okay";
 
@@ -58,4 +54,6 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
index f79d2d2641daca0ab361aa228e2bfc1921370bd5..3797565908225477781e4d9869a7592316f974a0 100644 (file)
@@ -85,6 +85,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
        ralink,mtd-eeprom = <&art 0x0>;
 };
 
index e741d2182c0a9defd9833263d2fd37bf59ea3e4e..eeee1c25ed2855c0194754fb01f6154fce6c38a7 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &sdhci {
index f811466c16f0eb684e722ec36544ec6e0d2c2a61..e6374e7bac829e6c1ef657af6778548107f0ee75 100644 (file)
@@ -96,6 +96,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index d4de7fe6a478a8b2b4546352415cd617c73f0c19..555a2a126170bd45ed9761e4ccfee5090e46dedb 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index bf5fbcc64efd85e78afaa563b30a7bb6faf1f340..61f78c162cbc922552325e8292fc5cc86f113200 100644 (file)
@@ -93,6 +93,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index 4775f8f0762d2f33bbb67b12351f7d6c02665663..5c3b14f87f2af34dd64f0d5a72dd6269ab4529d8 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index 4ceccde06d5a8f84b75e3dd3573adac8de5eec65..174272f95fdd0d3794e53af29ee90bbba7b92c5c 100644 (file)
@@ -53,6 +53,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &spi0 {
index def722832dadb044eaf7a35fab314de8a2887bee..7a202eb6ef7f085b733a0ac362806ce129a408a0 100644 (file)
@@ -97,6 +97,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index ef60f01002308f744aa978abdfffbb303f907430..9d1c930d762dd3111586d78dcc7d6e3e8b775e18 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index bbd66e113cc1e4e99efea787c7d6ef826b860a34..d7c65d4703e28f4c0f116174de125e6657ca1469 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&radio 0x0>;
+
        nvmem-cells = <&macaddr_rom_f100>;
        nvmem-cell-names = "mac-address";
-       mediatek,mtd-eeprom = <&radio 0x0>;
 };
 
 &ethernet {
index 8372f057cd68e34d2e1ff68b5ed7a976d2ec3d96..ecb6ce1e4eaf692433e3b08f53b8606eb42b94f8 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x20000>;
+
        nvmem-cells = <&macaddr_factory_f100>;
        nvmem-cell-names = "mac-address";
-       mediatek,mtd-eeprom = <&factory 0x20000>;
 };
 
 &ethernet {
index d221a5c7c88016e009926e3747381631f0e2e493..d6b06ba2fcb1a81cf0337649ae0ebe9d233f40f4 100644 (file)
        status = "okay";
 
        mediatek,mtd-eeprom = <&radio 0x0>;
+
        nvmem-cells = <&macaddr_config_2008>;
        nvmem-cell-names = "mac-address";
        mac-address-increment = <1>;
index 496f8db2ca0dcd88bbd694f9b5b8bcef3e37a25c..c90442da1f6c81473d2a7f4723aeed715febb94f 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x20000>;
+
        nvmem-cells = <&macaddr_factory_f100>;
        nvmem-cell-names = "mac-address";
-       mediatek,mtd-eeprom = <&factory 0x20000>;
 };
 
 &ethernet {
index ad65152a95fb126172679befafbaf21a5989e13b..01a1a7f09e288fef8431d1a21decc846a3ef7590 100644 (file)
@@ -88,6 +88,9 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
+
        nvmem-cells = <&macaddr_factory_f100>;
        nvmem-cell-names = "mac-address";
 };
index 9f1d667070508342153b7fe3dd9d33813e477943..ff2c8d48d152742d5b265c4bc0a7a416638fae57 100644 (file)
 &wmac {
        status = "okay";
 
+       mediatek,mtd-eeprom = <&factory 0x0>;
+
        nvmem-cells = <&macaddr_factory_f100>;
        nvmem-cell-names = "mac-address";
 };
index f0a6b1df5de769981ea9d8fdf06079500d8549da..805d5debf58e42b6d04ce4164e2e6245c411b658 100644 (file)
@@ -91,6 +91,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &state_default {
index bffcdf67c61e632d27ce02afb2094c1102330b91..06a80fdde7771f63656afafc8ae78dbeed7a4749 100644 (file)
@@ -23,6 +23,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index eb74c2ae51156b9f0fd72d8c0b11d84542e97e40..dcba4b64e28297e724db8730341a5617f5f37633 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index b12e1f71066e656e2ad8e13ea9c79e0961e13dd9..83e269b3660ab4bd616afac96f1b9a819b88f1ec 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index 5e19e331c88e05c3e9781ac27750a94493f5e330..b4e6905624a56b75e15d0d8e33ed51c8c7c495c4 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index 96633c062ed91a394779f4479507decf5fb705dc..1d5c99da31867520182e3cda31cf2b0ee1f6f8c5 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index 4c60ad95aaae384a55a75e3ad498ad1538968789..185f554df74d7319ec47c41bf81e3bc4b4eaf883 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
index a25f4d8d2855b3254c472755c80727589666f192..3f5db4441f15acba79469c7676d0a24a6c72a147 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index 7158101ab7024dea7e731406cc84da965514e1b8..9024fb711bdccef32c72bad0b1c4466fd72d468c 100644 (file)
@@ -88,6 +88,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &factory {
index d3f5e33be73226dc8a3db42c93ec7cb6b27f7047..0a48c060192166d11bea27bca4616c1125d23f69 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
index 37f409eee9fb9ba5e180fb082935b07d33b77365..f9adca9d71488e5ab5b1e083e362132d36539f58 100644 (file)
@@ -71,6 +71,8 @@
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index fef199ac34af1935515be4a64080b1a0fd4fcfd6..aca4555a40bd9e63a0b8cee1d6ff2148fbcc7229 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &ethernet {
index f3650dc6ae7b44a1b2a4abda7ad9555387552d11..50094a82dae10b0eba189bf17d05a5f3ee47ee13 100644 (file)
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &pcie {