ramips: mt7628: move mtd-eeprom out of root DTSI

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>
This commit is contained in:
Adrian Schmutzler 2021-08-17 14:07:57 +02:00
parent 9704d25da1
commit ad6b077049
44 changed files with 90 additions and 9 deletions

View File

@ -492,7 +492,5 @@
interrupts = <6>;
status = "disabled";
mediatek,mtd-eeprom = <&factory 0x0000>;
};
};

View File

@ -130,6 +130,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -100,6 +100,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&state_default {

View File

@ -173,4 +173,6 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};

View File

@ -131,6 +131,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -162,6 +162,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -87,6 +87,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&spi0 {

View File

@ -59,6 +59,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&spi0 {

View 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>
@ -122,6 +123,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -88,6 +88,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -113,6 +113,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -96,6 +96,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -104,6 +104,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&uboot {

View File

@ -123,6 +123,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -158,6 +158,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -12,10 +12,6 @@
};
};
&wmac {
status = "okay";
};
&spi0 {
status = "okay";
@ -58,4 +54,6 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};

View File

@ -85,6 +85,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
ralink,mtd-eeprom = <&art 0x0>;
};

View File

@ -135,6 +135,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&sdhci {

View File

@ -96,6 +96,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -163,6 +163,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -93,6 +93,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -182,6 +182,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -53,6 +53,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&spi0 {

View File

@ -97,6 +97,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -107,6 +107,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -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 {

View File

@ -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 {

View File

@ -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>;

View File

@ -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 {

View File

@ -88,6 +88,9 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_factory_f100>;
nvmem-cell-names = "mac-address";
};

View File

@ -100,6 +100,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_factory_f100>;
nvmem-cell-names = "mac-address";
};

View File

@ -91,6 +91,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&state_default {

View File

@ -23,6 +23,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -114,6 +114,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -109,6 +109,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -113,6 +113,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -143,6 +143,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -115,4 +115,6 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};

View File

@ -159,6 +159,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -88,6 +88,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&factory {

View File

@ -100,4 +100,6 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};

View File

@ -71,6 +71,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -102,6 +102,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&ethernet {

View File

@ -178,6 +178,8 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&pcie {