[OpenWrt-Devel] [PATCH] ramips: fix NETGEAR R6260 EEPROM offset

Mathias Kresin dev at kresin.me
Tue Jan 28 17:43:57 EST 2020


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 at 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 at 0,0 {
> +	wifi5: wifi at 0,0 {
>   		compatible = "mediatek,mt76";
>   		reg = <0x0 0 0 0 0>;
>   		mediatek,mtd-eeprom = <&factory 0x8000>;
> @@ -87,7 +87,7 @@
>   };
>   
>   &pcie1 {
> -	wifi at 0,0 {
> +	wifi2: wifi at 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

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list