[OpenWrt-Devel] ramips: fix NETGEAR R6260 EEPROM offset
diff mbox series

Message ID 20200128212143.278955-1-mail@david-bauer.net
State Accepted
Delegated to: David Bauer
Headers show
Series
  • [OpenWrt-Devel] ramips: fix NETGEAR R6260 EEPROM offset
Related show

Commit Message

David Bauer Jan. 28, 2020, 9:21 p.m. UTC
The EEPROM offset for the NETGEAR R6260 is incorrect, thus no valid
calibration data is used.

Fix this only for the NETGEAR R6260, as it's currently unknown whether
or not other boards are affected.

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 target/linux/ramips/dts/mt7621_netgear_r6260.dts        | 8 ++++++++
 target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

Comments

Mathias Kresin Jan. 28, 2020, 10:43 p.m. UTC | #1
28/01/2020 22:21, David Bauer:
> The EEPROM offset for the NETGEAR R6260 is incorrect, thus no valid
> calibration data is used.
> 
> Fix this only for the NETGEAR R6260, as it's currently unknown whether
> or not other boards are affected.
> 
> Signed-off-by: David Bauer <mail@david-bauer.net>
> ---
>   target/linux/ramips/dts/mt7621_netgear_r6260.dts        | 8 ++++++++
>   target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi | 4 ++--
>   2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/target/linux/ramips/dts/mt7621_netgear_r6260.dts b/target/linux/ramips/dts/mt7621_netgear_r6260.dts
> index 8251fe595c..2f2dbb05f8 100644
> --- a/target/linux/ramips/dts/mt7621_netgear_r6260.dts
> +++ b/target/linux/ramips/dts/mt7621_netgear_r6260.dts
> @@ -23,3 +23,11 @@
>   &led_wifi {
>   	label = "r6260:green:wifi";
>   };
> +
> +&wifi2 {
> +	mediatek,mtd-eeprom = <&factory 0x20000>;
> +};
> +
> +&wifi5 {
> +	mediatek,mtd-eeprom = <&factory 0x28000>;
> +};
> diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
> index 52af14723e..7626973121 100644
> --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
> +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
> @@ -78,7 +78,7 @@
>   };
>   
>   &pcie0 {
> -	wifi@0,0 {
> +	wifi5: wifi@0,0 {
>   		compatible = "mediatek,mt76";
>   		reg = <0x0 0 0 0 0>;
>   		mediatek,mtd-eeprom = <&factory 0x8000>;
> @@ -87,7 +87,7 @@
>   };
>   
>   &pcie1 {
> -	wifi@0,0 {
> +	wifi2: wifi@0,0 {
>   		compatible = "mediatek,mt76";
>   		reg = <0x0 0 0 0 0>;
>   		mediatek,mtd-eeprom = <&factory 0x0>;
> 

Hey David,

if a property defined in a dtsi doesn't match for all cases, it should 
be moved to the dts files, instead of being overwritten in some cases.

This way it's way more readable as one doesn't have to check if a 
property is overwritten/redfined in a later device tree source file.

Regards
Mathias

Patch
diff mbox series

diff --git a/target/linux/ramips/dts/mt7621_netgear_r6260.dts b/target/linux/ramips/dts/mt7621_netgear_r6260.dts
index 8251fe595c..2f2dbb05f8 100644
--- a/target/linux/ramips/dts/mt7621_netgear_r6260.dts
+++ b/target/linux/ramips/dts/mt7621_netgear_r6260.dts
@@ -23,3 +23,11 @@ 
 &led_wifi {
 	label = "r6260:green:wifi";
 };
+
+&wifi2 {
+	mediatek,mtd-eeprom = <&factory 0x20000>;
+};
+
+&wifi5 {
+	mediatek,mtd-eeprom = <&factory 0x28000>;
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
index 52af14723e..7626973121 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
@@ -78,7 +78,7 @@ 
 };
 
 &pcie0 {
-	wifi@0,0 {
+	wifi5: wifi@0,0 {
 		compatible = "mediatek,mt76";
 		reg = <0x0 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
@@ -87,7 +87,7 @@ 
 };
 
 &pcie1 {
-	wifi@0,0 {
+	wifi2: wifi@0,0 {
 		compatible = "mediatek,mt76";
 		reg = <0x0 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x0>;