Skip to content

Commit

Permalink
bmips: convert mtd-mac-address to nvmem implementation
Browse files Browse the repository at this point in the history
Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
The conversion is done with an automated script.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
  • Loading branch information
Ansuel authored and ynezz committed Jul 19, 2021
1 parent 821b664 commit 32adbfc
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 13 deletions.
13 changes: 12 additions & 1 deletion target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts
Expand Up @@ -44,7 +44,8 @@
&ethernet {
status = "okay";

mtd-mac-address = <&cferom 0x6a0>;
nvmem-cells = <&macaddr_cferom_6a0>;
nvmem-cell-names = "mac-address";
};

&leds {
Expand Down Expand Up @@ -224,3 +225,13 @@
&usbh {
status = "okay";
};

&cferom {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_cferom_6a0: macaddr@6a0 {
reg = <0x6a0 0x6>;
};
};
18 changes: 15 additions & 3 deletions target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts
Expand Up @@ -42,8 +42,9 @@
pci-bus = <1>;
pci-dev = <0>;

mtd-mac-address = <&cfe 0x6a0>;
mtd-mac-address-increment = <1>;
nvmem-cells = <&macaddr_cfe_6a0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;

brcm,sprom-fixups = <6 0x1c00>,
<65 0x1255>,
Expand All @@ -66,7 +67,8 @@
&ethernet {
status = "okay";

mtd-mac-address = <&cfe 0x6a0>;
nvmem-cells = <&macaddr_cfe_6a0>;
nvmem-cell-names = "mac-address";
};

&hsspi {
Expand Down Expand Up @@ -243,3 +245,13 @@
&usbh {
status = "okay";
};

&cfe {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_cfe_6a0: macaddr@6a0 {
reg = <0x6a0 0x6>;
};
};
18 changes: 15 additions & 3 deletions target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts
Expand Up @@ -34,8 +34,9 @@
pci-bus = <1>;
pci-dev = <0>;

mtd-mac-address = <&cfe 0x6a0>;
mtd-mac-address-increment = <1>;
nvmem-cells = <&macaddr_cfe_6a0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;

brcm,sprom-fixups = <2 0x05bb>,
<65 0x1204>,
Expand Down Expand Up @@ -71,7 +72,8 @@
&ethernet {
status = "okay";

mtd-mac-address = <&cfe 0x6a0>;
nvmem-cells = <&macaddr_cfe_6a0>;
nvmem-cell-names = "mac-address";
};

&hsspi {
Expand Down Expand Up @@ -200,3 +202,13 @@
&usbh {
status = "okay";
};

&cfe {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_cfe_6a0: macaddr@6a0 {
reg = <0x6a0 0x6>;
};
};
15 changes: 13 additions & 2 deletions target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts
Expand Up @@ -125,8 +125,9 @@

pci-dev = <1>;

mtd-mac-address = <&cfe 0x6a0>;
mtd-mac-address-increment = <1>;
nvmem-cells = <&macaddr_cfe_6a0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;

ath,eeprom = <&cal_data 0x1e000>;
ath,endian-check;
Expand Down Expand Up @@ -187,3 +188,13 @@
&usbh {
status = "okay";
};

&cfe {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_cfe_6a0: macaddr@6a0 {
reg = <0x6a0 0x6>;
};
};
13 changes: 12 additions & 1 deletion target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
Expand Up @@ -67,7 +67,8 @@
&ethernet {
status = "okay";

mtd-mac-address = <&cferom 0x6a0>;
nvmem-cells = <&macaddr_cferom_6a0>;
nvmem-cell-names = "mac-address";
};

&leds {
Expand Down Expand Up @@ -245,3 +246,13 @@
&usbh {
status = "okay";
};

&cferom {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_cferom_6a0: macaddr@6a0 {
reg = <0x6a0 0x6>;
};
};
18 changes: 15 additions & 3 deletions target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts
Expand Up @@ -63,8 +63,9 @@
pci-bus = <0>;
pci-dev = <1>;

mtd-mac-address = <&cfe 0x6a0>;
mtd-mac-address-increment = <1>;
nvmem-cells = <&macaddr_cfe_6a0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;

brcm,sprom-fixups = <97 0xfeb3>,
<98 0x1618>,
Expand All @@ -82,7 +83,8 @@
&ethernet {
status = "okay";

mtd-mac-address = <&cfe 0x6a0>;
nvmem-cells = <&macaddr_cfe_6a0>;
nvmem-cell-names = "mac-address";
};

&ohci {
Expand Down Expand Up @@ -165,3 +167,13 @@
&usbh {
status = "okay";
};

&cfe {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_cfe_6a0: macaddr@6a0 {
reg = <0x6a0 0x6>;
};
};

0 comments on commit 32adbfc

Please sign in to comment.