Re: [LEDE-DEV] [PATCH] ramips: Improve Archer C20i support

2016-07-28 Thread Piotr Dymacz
Hello Paul,

2016-07-28 14:39 GMT+02:00  :
> Hi Piotr,
>
> here we go. I've just sent in a PATCH v2 with the board name as the
> LED's name.

Thanks!

> Additionally I've create a patch for the C50 - is there any reason
> the LEDs of the C50 aren't renamed (yet)?

It seems that we didn't spot this and it just went to repository.
Anyway, thanks for fixing that too!

---
Cheers,
Piotr

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] ramips: Improve Archer C20i support

2016-07-28 Thread p . wassi
Hi Piotr,

here we go. I've just sent in a PATCH v2 with the board name as the
LED's name.
Additionally I've create a patch for the C50 - is there any reason
the LEDs of the C50 aren't renamed (yet)?

Best regards,
P. Wassi


> Hello Paul,
> 
> Please use board name instead of manufacturer name for LEDs as it's
> done in (almost, C50 should be fixed) all other DTS under ramips
> target.
> You should also provide full name in the SoB line.
> 
> ---
> Cheers,
> Piotr

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] ramips: Improve Archer C20i support

2016-07-28 Thread Piotr Dymacz
Hello Paul,

Please use board name instead of manufacturer name for LEDs as it's
done in (almost, C50 should be fixed) all other DTS under ramips
target.
You should also provide full name in the SoB line.

---
Cheers,
Piotr


2016-07-28 12:10 GMT+02:00  :
> From: P.Wassi 
>
> Improve / finalise TP-Link Archer C20i support.
>
> Signed-off-by: P.Wassi 
> ---
> This patch adds proper LED and Button support and
> sets up a correct switch configuration.
> The only missing thing (which is likely to never be fixed) is
> the 5GHz phy (Mediatek MT7610) - due to the missing driver.
> Additional info: https://pwassi.privatedns.org/lede/archerc20i/
> The added define in kernel config is needed for the LEDs
> to work properly (some are triggered by the switch0 device)
>
> linux/ramips/base-files/etc/board.d/01_leds|6 +
> linux/ramips/base-files/etc/board.d/02_network |1
> linux/ramips/dts/ArcherC20i.dts|   46 +--
> linux/ramips/mt7620/config-4.4 |1
> 4 files changed, 49 insertions(+), 5 deletions(-)
>
> diff -rupN a/target/linux/ramips/base-files/etc/board.d/01_leds 
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -78,6 +78,12 @@ broadway)
> set_usb_led "$board:red:diskmounted"
> set_wifi_led "$board:red:wps_active"
> ;;
> +c20i)
> +   ucidef_set_led_switch "lan" "lan" "tp-link:blue:lan" "switch0" "0x1e"
> +   ucidef_set_led_switch "wan" "wan" "tp-link:blue:wan" "switch0" "0x01"
> +   set_usb_led "tp-link:blue:usb" "2-1"
> +   ucidef_set_led_wlan "wlan" "wlan" "tp-link:blue:wlan" "phy0radio"
> +   ;;
>  c50)
> ucidef_set_led_default "power" "power" "tp-link:blue:power" "0"
> ucidef_set_led_netdev "lan" "lan" "tp-link:blue:lan" "eth0.2"
> diff -rupN a/target/linux/ramips/base-files/etc/board.d/02_network 
> b/target/linux/ramips/base-files/etc/board.d/02_network
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -114,6 +114,7 @@ ramips_setup_interfaces()
> atp-52b|\
> awm002-evb|\
> awm003-evb|\
> +   c20i|\
> c50|\
> dir-645|\
> dir-860l-b1|\
> diff -rupN a/target/linux/ramips/dts/ArcherC20i.dts 
> b/target/linux/ramips/dts/ArcherC20i.dts
> --- a/target/linux/ramips/dts/ArcherC20i.dts
> +++ b/target/linux/ramips/dts/ArcherC20i.dts
> @@ -12,20 +12,57 @@
>
> gpio-leds {
> compatible = "gpio-leds";
> +   lan {
> +   label = "tp-link:blue:lan";
> +   gpios = <&gpio0 1 1>;
> +   };
> +   usb {
> +   label = "tp-link:blue:usb";
> +   gpios = <&gpio0 11 1>;
> +   };
> +   wps {
> +   label = "tp-link:blue:wps";
> +   gpios = <&gpio1 15 1>;
> +   };
> +   wan {
> +   label = "tp-link:blue:wan";
> +   gpios = <&gpio2 0 1>;
> +   };
> +   wlan {
> +   label = "tp-link:blue:wlan";
> +   gpios = <&gpio3 0 1>;
> +   };
> };
>
> -   gpio-keys-polled {
> -   compatible = "gpio-keys-polled";
> +   gpio-keys {
> +   compatible = "gpio-keys";
> #address-cells = <1>;
> #size-cells = <0>;
> -   poll-interval = <20>;
> +   rfkill {
> +   label = "rfkill";
> +   gpios = <&gpio0 2 1>;
> +   linux,code = <0xf7>;
> +   };
> +   reset_wps {
> +   label = "reset_wps";
> +   gpios = <&gpio0 13 1>;
> +   linux,code = <0x198>;
> +   };
> };
>  };
>
> +&gpio1 {
> +   status = "okay";
> +};
> +
>  &gpio2 {
> status = "okay";
>  };
>
> +&gpio3 {
> +   status = "okay";
> +};
> +
>  &spi0 {
> status = "okay";
>
> @@ -73,7 +110,7 @@
>  &pinctrl {
> state_default: pinctrl0 {
> gpio {
> -   ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", 
> "wled", "nd_sd";
> +   ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", 
> "wled", "nd_sd", "ephy", "spi refclk";
> ralink,function = "gpio";
> };
> };
> @@ -81,7 +118,6 @@
>
>  ðernet {
> pinctrl-names = "default";
> -   pinctrl-0 = <&ephy_pins>;
> mtd-mac-address = <&rom 0xf100>;
> mediatek,portmap = "w";
> };
> diff -rupN a/target/linux/ramips/mt7620/config-4.4 
> b/target/linux/ramips/mt7620/config-4.4
> --- a/target/linux/ramips/mt7620/confi