Просмотр исходного кода

lantiq: use new ADSL nvmem support

Can now set through DTS.

Signed-off-by: Rosen Penev <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19910
Signed-off-by: Hauke Mehrtens <[email protected]>
Rosen Penev 4 месяцев назад
Родитель
Сommit
4eae48d9dc

+ 1 - 1
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9.dtsi

@@ -391,7 +391,7 @@
 			lantiq,rx-burst-length = <8>;
 		};
 
-		ppe@e234000 {
+		ppe: ppe@e234000 {
 			compatible = "lantiq,ppe-arx100";
 			reg = <0xe234000 0x3ffd>;
 			interrupt-parent = <&icu0>;

+ 5 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts

@@ -115,6 +115,11 @@
 	};
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_ath9k_cal_a91 1>;
+	nvmem-cell-names = "mac-address";
+};
+
 &localbus {
 	flash@0 {
 		compatible = "lantiq,nor";

+ 5 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts

@@ -116,6 +116,11 @@
 	};
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_ath9k_cal_a91 1>;
+	nvmem-cell-names = "mac-address";
+};
+
 &gpio {
 	pinctrl-names = "default";
 	pinctrl-0 = <&state_default>;

+ 1 - 1
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi

@@ -303,7 +303,7 @@
 			lantiq,rx-burst-length = <4>;
 		};
 
-		ppe@e234000 {
+		ppe: ppe@e234000 {
 			compatible = "lantiq,ppe-danube";
 			reg = <0xe234000 0x40000>;
 			interrupt-parent = <&icu0>;

+ 5 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts

@@ -108,6 +108,11 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_boardconfig_16 2>;
+	nvmem-cell-names = "mac-address";
+};
+
 &localbus {
 	flash@0 {
 		compatible = "lantiq,nor";

+ 8 - 1
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts

@@ -143,7 +143,12 @@
 
 &gsw {
 	phy-mode = "mii";
-	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cells = <&macaddr_boardconfig_16 0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&ppe {
+	nvmem-cells = <&macaddr_boardconfig_16 1>;
 	nvmem-cell-names = "mac-address";
 };
 
@@ -185,7 +190,9 @@
 					#size-cells = <1>;
 
 					macaddr_boardconfig_16: macaddr@16 {
+						compatible = "mac-base";
 						reg = <0x16 0x6>;
+						#nvmem-cell-cells = <1>;
 					};
 				};
 			};

+ 8 - 1
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts

@@ -98,7 +98,12 @@
 };
 
 &eth0 {
-	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cells = <&macaddr_boardconfig_16 0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&ppe {
+	nvmem-cells = <&macaddr_boardconfig_16 1>;
 	nvmem-cell-names = "mac-address";
 };
 
@@ -218,7 +223,9 @@
 					#size-cells = <1>;
 
 					macaddr_boardconfig_16: macaddr@16 {
+						compatible = "mac-base";
 						reg = <0x16 0x6>;
+						#nvmem-cell-cells = <1>;
 					};
 				};
 			};

+ 5 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi

@@ -136,6 +136,11 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_boardconfig_16 0>;
+	nvmem-cell-names = "mac-address";
+};
+
 &gphy0 {
 	lantiq,gphy-mode = <GPHY_MODE_GE>;
 };

+ 5 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vrv9510kwac23.dts

@@ -224,6 +224,11 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_boardconfig_16 0>;
+	nvmem-cell-names = "mac-address";
+};
+
 &gphy0 {
 	lantiq,gphy-mode = <GPHY_MODE_GE>;
 };

+ 5 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts

@@ -86,6 +86,11 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_urlader_a91 1>;
+	nvmem-cell-names = "mac-address";
+};
+
 &phy0 {
 	reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
 };

+ 5 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts

@@ -156,6 +156,11 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_caldata_110c 4>;
+	nvmem-cell-names = "mac-address";
+};
+
 &gswip {
 	pinctrl-0 = <&mdio_pins>;
 	pinctrl-names = "default";

+ 22 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts

@@ -87,6 +87,16 @@
 	};
 };
 
+&eth0 {
+	nvmem-cells = <&macaddr_art_0 0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&ppe {
+	nvmem-cells = <&macaddr_art_0 1>;
+	nvmem-cell-names = "mac-address";
+};
+
 &gphy1 {
 	lantiq,gphy-mode = <GPHY_MODE_FE>;
 };
@@ -156,6 +166,18 @@
 				reg = <0x7f2000 0x1000>;
 				label = "ART";
 				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_art_0: macaddr@0 {
+						compatible = "mac-base";
+						reg = <0x0 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
 			};
 
 			partition@7f3000 {

+ 5 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi

@@ -117,6 +117,11 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_ath9k_cal_f100 1>;
+	nvmem-cell-names = "mac-address";
+};
+
 &gphy0 {
 	lantiq,gphy-mode = <GPHY_MODE_GE>;
 };

+ 5 - 0
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi

@@ -109,6 +109,11 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_romfile_f100 1>;
+	nvmem-cell-names = "mac-address";
+};
+
 &gphy0 {
 	lantiq,gphy-mode = <GPHY_MODE_GE>;
 };