lantiq: Fix ath9k LED for TDW8970.
authorJohn Crispin <john@openwrt.org>
Tue, 26 Apr 2016 07:51:58 +0000 (07:51 +0000)
committerJohn Crispin <john@openwrt.org>
Tue, 26 Apr 2016 07:51:58 +0000 (07:51 +0000)
Backport of r47911, r47912, r47969 to CC.

All other required patches have already been backported in r48822.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
SVN-Revision: 49229

target/linux/lantiq/base-files/etc/uci-defaults/01_leds
target/linux/lantiq/dts/TDW8970.dts
target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch

index 6956d616af75e7c716e1ae6d9c7a7cf129e104fa..5643f7f2be6abea6d7dd78abf11f5a45bef45b9d 100644 (file)
@@ -30,6 +30,9 @@ BTHOMEHUBV3A)
        ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt"
        ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan"
        ;;
+TDW8970)
+       ucidef_set_led_wlan "wifi" "wifi" "ath9k-phy0" "phy0tpt"
+       ;;
 VGV7510KW22)
        ucidef_set_led_default "power" "power" "power" "1"
        ucidef_set_led_default "power2" "power2" "power2" "0"
index d8dcb5d836626bd5107bda3d508e38c09615265b..cb4d88b1604afbc564b8ea0742470eb712b784f4 100644 (file)
                ath,mac-offset = <0xf100>;
                ath,mac-increment;
                ath,led-pin = <0>;
+               ath,disable-5ghz;
+               ath,led-active-high;
        };
 
        gpio-keys-polled {
index 04c2071f320ce76876a5128b69861050621f07ff..9198fe580a15ce05e4b0d7032022dc87aa3d8720 100644 (file)
@@ -51,13 +51,14 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o
 --- /dev/null
 +++ b/arch/mips/lantiq/xway/ath_eep.c
-@@ -0,0 +1,282 @@
+@@ -0,0 +1,298 @@
 +/*
 + *  Copyright (C) 2011 Luca Olivetti <luca@ventoso.org>
 + *  Copyright (C) 2011 John Crispin <blogic@openwrt.org>
 + *  Copyright (C) 2011 Andrej Vlašić <andrej.vlasic0@gmail.com>
 + *  Copyright (C) 2013 Álvaro Fernández Rojas <noltari@gmail.com>
 + *  Copyright (C) 2013 Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
++ *  Copyright (C) 2015 Vittorio Gambaletta <openwrt@vittgam.net>
 + *
 + *  This program is free software; you can redistribute it and/or modify it
 + *  under the terms of the GNU General Public License version 2 as published
@@ -192,6 +193,21 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +              dev_info(&pdev->dev, "using led pin %d.\n", led_pin);
 +      }
 +
++      if (of_property_read_bool(np, "ath,led-active-high")) {
++              ath9k_pdata.led_active_high = true;
++              dev_info(&pdev->dev, "inverted LED polarity\n");
++      }
++
++      if (of_property_read_bool(np, "ath,disable-2ghz")) {
++              ath9k_pdata.disable_2ghz = true;
++              dev_info(&pdev->dev, "disabled 2.4 GHz band\n");
++      }
++
++      if (of_property_read_bool(np, "ath,disable-5ghz")) {
++              ath9k_pdata.disable_5ghz = true;
++              dev_info(&pdev->dev, "disabled 5 GHz band\n");
++      }
++
 +      dev_info(&pdev->dev, "loaded ath9k eeprom\n");
 +
 +      return 0;