Skip to content

Commit

Permalink
ramips: mt7628: move mtd-eeprom out of root DTSI
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
adschm committed Aug 17, 2021
1 parent 9704d25 commit ad6b077
Show file tree
Hide file tree
Showing 44 changed files with 90 additions and 9 deletions.
2 changes: 0 additions & 2 deletions target/linux/ramips/dts/mt7628an.dtsi
Expand Up @@ -492,7 +492,5 @@
interrupts = <6>;

status = "disabled";

mediatek,mtd-eeprom = <&factory 0x0000>;
};
};
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts
Expand Up @@ -130,6 +130,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi
Expand Up @@ -100,6 +100,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&state_default {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts
Expand Up @@ -173,4 +173,6 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
Expand Up @@ -131,6 +131,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts
Expand Up @@ -162,6 +162,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts
Expand Up @@ -87,6 +87,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&spi0 {
Expand Down
Expand Up @@ -59,6 +59,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&spi0 {
Expand Down
3 changes: 3 additions & 0 deletions target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts
@@ -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>

Expand Down Expand Up @@ -122,6 +123,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts
Expand Up @@ -88,6 +88,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts
Expand Up @@ -113,6 +113,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi
Expand Up @@ -96,6 +96,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_iptime.dtsi
Expand Up @@ -104,6 +104,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&uboot {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi
Expand Up @@ -123,6 +123,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
Expand Up @@ -158,6 +158,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
Expand Up @@ -12,10 +12,6 @@
};
};

&wmac {
status = "okay";
};

&spi0 {
status = "okay";

Expand Down Expand Up @@ -58,4 +54,6 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts
Expand Up @@ -85,6 +85,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
ralink,mtd-eeprom = <&art 0x0>;
};

Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_minew_g1-c.dts
Expand Up @@ -135,6 +135,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&sdhci {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi
Expand Up @@ -96,6 +96,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
Expand Up @@ -163,6 +163,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
Expand Up @@ -93,6 +93,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
Expand Up @@ -182,6 +182,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_skylab_skw92a.dts
Expand Up @@ -53,6 +53,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&spi0 {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_tama_w06.dts
Expand Up @@ -97,6 +97,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
Expand Up @@ -107,6 +107,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down
4 changes: 3 additions & 1 deletion target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi
Expand Up @@ -74,9 +74,11 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&radio 0x0>;

nvmem-cells = <&macaddr_rom_f100>;
nvmem-cell-names = "mac-address";
mediatek,mtd-eeprom = <&radio 0x0>;
};

&ethernet {
Expand Down
4 changes: 3 additions & 1 deletion target/linux/ramips/dts/mt7628an_tplink_8m.dtsi
Expand Up @@ -55,9 +55,11 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x20000>;

nvmem-cells = <&macaddr_factory_f100>;
nvmem-cell-names = "mac-address";
mediatek,mtd-eeprom = <&factory 0x20000>;
};

&ethernet {
Expand Down
1 change: 1 addition & 0 deletions target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
Expand Up @@ -138,6 +138,7 @@
status = "okay";

mediatek,mtd-eeprom = <&radio 0x0>;

nvmem-cells = <&macaddr_config_2008>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
Expand Down
4 changes: 3 additions & 1 deletion target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts
Expand Up @@ -123,9 +123,11 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x20000>;

nvmem-cells = <&macaddr_factory_f100>;
nvmem-cell-names = "mac-address";
mediatek,mtd-eeprom = <&factory 0x20000>;
};

&ethernet {
Expand Down
3 changes: 3 additions & 0 deletions target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts
Expand Up @@ -88,6 +88,9 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;

nvmem-cells = <&macaddr_factory_f100>;
nvmem-cell-names = "mac-address";
};
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
Expand Up @@ -100,6 +100,8 @@
&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;

nvmem-cells = <&macaddr_factory_f100>;
nvmem-cell-names = "mac-address";
};
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi
Expand Up @@ -91,6 +91,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&state_default {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi
Expand Up @@ -23,6 +23,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts
Expand Up @@ -114,6 +114,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts
Expand Up @@ -109,6 +109,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts
Expand Up @@ -113,6 +113,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts
Expand Up @@ -143,6 +143,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_widora_neo.dtsi
Expand Up @@ -115,4 +115,6 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts
Expand Up @@ -159,6 +159,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi
Expand Up @@ -88,6 +88,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&factory {
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
Expand Up @@ -100,4 +100,6 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};
2 changes: 2 additions & 0 deletions target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
Expand Up @@ -71,6 +71,8 @@

&wmac {
status = "okay";

mediatek,mtd-eeprom = <&factory 0x0>;
};

&ethernet {
Expand Down

0 comments on commit ad6b077

Please sign in to comment.