All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/2] Add support for GPIO based leds and buttons on IPQ5332/9574 devices
@ 2023-06-15 14:53 Sridharan S N
  2023-06-15 14:53 ` [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons Sridharan S N
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Sridharan S N @ 2023-06-15 14:53 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Sridharan S N

Add support for wlan-2g led and wps button available on IPQ5332 and
IPQ9574

Sridharan S N (2):
  arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons
  arm64: dts: qcom: ipq9574: enable GPIO based LEDs

 .../boot/dts/qcom/ipq5332-rdp-common.dtsi     | 39 +++++++++++++++++++
 .../boot/dts/qcom/ipq9574-rdp-common.dtsi     | 20 ++++++++++
 2 files changed, 59 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons
  2023-06-15 14:53 [PATCH V2 0/2] Add support for GPIO based leds and buttons on IPQ5332/9574 devices Sridharan S N
@ 2023-06-15 14:53 ` Sridharan S N
  2023-06-15 14:58   ` Konrad Dybcio
  2023-06-15 14:53 ` [PATCH V2 2/2] arm64: dts: qcom: ipq9574: enable GPIO based LEDs Sridharan S N
  2023-06-15 14:56 ` [PATCH V2 0/2] Add support for GPIO based leds and buttons on IPQ5332/9574 devices Konrad Dybcio
  2 siblings, 1 reply; 10+ messages in thread
From: Sridharan S N @ 2023-06-15 14:53 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Sridharan S N

Add support for wlan-2g LED on GPIO 36 and wps buttons on GPIO 35.

Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
---
Changes in V2:
	- Updated commit message

 .../boot/dts/qcom/ipq5332-rdp-common.dtsi     | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
index 97dc0e5c15f0..a8671a4ac2e4 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
@@ -19,6 +19,31 @@
 	chosen {
 		stdout-path = "serial0";
 	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&gpio_keys_default>;
+		pinctrl-names = "default";
+
+		button-wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-0 = <&gpio_leds_default>;
+		pinctrl-names = "default";
+
+		led-0 {
+			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy0tx";
+			default-state = "off";
+		};
+	};
 };
 
 &blsp1_i2c1 {
@@ -52,6 +77,20 @@
 /* PINCTRL */
 
 &tlmm {
+	gpio_keys_default: gpio-keys-default-state {
+		pins = "gpio35";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
+	gpio_leds_default: gpio-leds-default-state {
+		pins = "gpio36";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-down;
+	};
+
 	i2c_1_pins: i2c-1-state {
 		pins = "gpio29", "gpio30";
 		function = "blsp1_i2c0";
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH V2 2/2] arm64: dts: qcom: ipq9574: enable GPIO based LEDs
  2023-06-15 14:53 [PATCH V2 0/2] Add support for GPIO based leds and buttons on IPQ5332/9574 devices Sridharan S N
  2023-06-15 14:53 ` [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons Sridharan S N
@ 2023-06-15 14:53 ` Sridharan S N
  2023-06-15 14:58   ` Konrad Dybcio
  2023-06-15 14:56 ` [PATCH V2 0/2] Add support for GPIO based leds and buttons on IPQ5332/9574 devices Konrad Dybcio
  2 siblings, 1 reply; 10+ messages in thread
From: Sridharan S N @ 2023-06-15 14:53 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Sridharan S N

Add support for wlan-2g LED on GPIO 64.

Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
---
Changes in V2:
	- Updated commit message 

 .../boot/dts/qcom/ipq9574-rdp-common.dtsi     | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
index fd5326dc1773..25424cecd834 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
@@ -34,6 +34,18 @@
 			debounce-interval = <60>;
 		};
 	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-0 = <&gpio_leds_default>;
+		pinctrl-names = "default";
+
+		led-0 {
+			gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tx";
+			default-state = "off";
+		};
+	};
 };
 
 &blsp1_spi0 {
@@ -137,6 +149,14 @@
 		drive-strength = <8>;
 		bias-pull-up;
 	};
+
+	gpio_leds_default: gpio-leds-default-state {
+		pins = "gpio64";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
 };
 
 &xo_board_clk {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH V2 0/2] Add support for GPIO based leds and buttons on IPQ5332/9574 devices
  2023-06-15 14:53 [PATCH V2 0/2] Add support for GPIO based leds and buttons on IPQ5332/9574 devices Sridharan S N
  2023-06-15 14:53 ` [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons Sridharan S N
  2023-06-15 14:53 ` [PATCH V2 2/2] arm64: dts: qcom: ipq9574: enable GPIO based LEDs Sridharan S N
@ 2023-06-15 14:56 ` Konrad Dybcio
  2 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-06-15 14:56 UTC (permalink / raw)
  To: Sridharan S N, agross, andersson, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel

On 15.06.2023 16:53, Sridharan S N wrote:
> Add support for wlan-2g led and wps button available on IPQ5332 and
> IPQ9574
> 
> Sridharan S N (2):
>   arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons
>   arm64: dts: qcom: ipq9574: enable GPIO based LEDs
You sent a v*3* half an hour ago. There's no signs of [RESEND] or other
explanations and the changelog is gone.

Please now send a v4 after you get reviews on this one (which I assume
is the latest) so as not to confuse the patch workflow tools and explain
each of the previous submissions.

Konrad
> 
>  .../boot/dts/qcom/ipq5332-rdp-common.dtsi     | 39 +++++++++++++++++++
>  .../boot/dts/qcom/ipq9574-rdp-common.dtsi     | 20 ++++++++++
>  2 files changed, 59 insertions(+)
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons
  2023-06-15 14:53 ` [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons Sridharan S N
@ 2023-06-15 14:58   ` Konrad Dybcio
  2023-06-16  4:42     ` Sridharan S N
  0 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2023-06-15 14:58 UTC (permalink / raw)
  To: Sridharan S N, agross, andersson, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel

On 15.06.2023 16:53, Sridharan S N wrote:
> Add support for wlan-2g LED on GPIO 36 and wps buttons on GPIO 35.
> 
> Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
> ---
This patch references a file that does not exist in -next and does
not state any dependency on other patches. With the hundreds of
emails flowing in daily, it's impossible to keep track of it.

For the patch contents, lgtm.

Konrad
> Changes in V2:
> 	- Updated commit message
> 
>  .../boot/dts/qcom/ipq5332-rdp-common.dtsi     | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
> index 97dc0e5c15f0..a8671a4ac2e4 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
> @@ -19,6 +19,31 @@
>  	chosen {
>  		stdout-path = "serial0";
>  	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-0 = <&gpio_keys_default>;
> +		pinctrl-names = "default";
> +
> +		button-wps {
> +			label = "wps";
> +			linux,code = <KEY_WPS_BUTTON>;
> +			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
> +			debounce-interval = <60>;
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&gpio_leds_default>;
> +		pinctrl-names = "default";
> +
> +		led-0 {
> +			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "phy0tx";
> +			default-state = "off";
> +		};
> +	};
>  };
>  
>  &blsp1_i2c1 {
> @@ -52,6 +77,20 @@
>  /* PINCTRL */
>  
>  &tlmm {
> +	gpio_keys_default: gpio-keys-default-state {
> +		pins = "gpio35";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
> +	gpio_leds_default: gpio-leds-default-state {
> +		pins = "gpio36";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-down;
> +	};
> +
>  	i2c_1_pins: i2c-1-state {
>  		pins = "gpio29", "gpio30";
>  		function = "blsp1_i2c0";

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH V2 2/2] arm64: dts: qcom: ipq9574: enable GPIO based LEDs
  2023-06-15 14:53 ` [PATCH V2 2/2] arm64: dts: qcom: ipq9574: enable GPIO based LEDs Sridharan S N
@ 2023-06-15 14:58   ` Konrad Dybcio
  0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-06-15 14:58 UTC (permalink / raw)
  To: Sridharan S N, agross, andersson, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel

On 15.06.2023 16:53, Sridharan S N wrote:
> Add support for wlan-2g LED on GPIO 64.
> 
> Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
> ---
Same comments as on patch 1.

Konrad
> Changes in V2:
> 	- Updated commit message 
> 
>  .../boot/dts/qcom/ipq9574-rdp-common.dtsi     | 20 +++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
> index fd5326dc1773..25424cecd834 100644
> --- a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
> @@ -34,6 +34,18 @@
>  			debounce-interval = <60>;
>  		};
>  	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&gpio_leds_default>;
> +		pinctrl-names = "default";
> +
> +		led-0 {
> +			gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "phy0tx";
> +			default-state = "off";
> +		};
> +	};
>  };
>  
>  &blsp1_spi0 {
> @@ -137,6 +149,14 @@
>  		drive-strength = <8>;
>  		bias-pull-up;
>  	};
> +
> +	gpio_leds_default: gpio-leds-default-state {
> +		pins = "gpio64";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
>  };
>  
>  &xo_board_clk {

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons
  2023-06-15 14:58   ` Konrad Dybcio
@ 2023-06-16  4:42     ` Sridharan S N
  0 siblings, 0 replies; 10+ messages in thread
From: Sridharan S N @ 2023-06-16  4:42 UTC (permalink / raw)
  To: Konrad Dybcio, agross, andersson, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel


On 6/15/2023 8:28 PM, Konrad Dybcio wrote:
> On 15.06.2023 16:53, Sridharan S N wrote:
>> Add support for wlan-2g LED on GPIO 36 and wps buttons on GPIO 35.
>>
>> Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
>> ---
> This patch references a file that does not exist in -next and does
> not state any dependency on other patches. With the hundreds of
> emails flowing in daily, it's impossible to keep track of it.
>
> For the patch contents, lgtm.
>
> Konrad

will mention dependency in V4

Regards,

Sridharan S N

>> Changes in V2:
>> 	- Updated commit message
>>
>>   .../boot/dts/qcom/ipq5332-rdp-common.dtsi     | 39 +++++++++++++++++++
>>   1 file changed, 39 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
>> index 97dc0e5c15f0..a8671a4ac2e4 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
>> @@ -19,6 +19,31 @@
>>   	chosen {
>>   		stdout-path = "serial0";
>>   	};
>> +
>> +	gpio-keys {
>> +		compatible = "gpio-keys";
>> +		pinctrl-0 = <&gpio_keys_default>;
>> +		pinctrl-names = "default";
>> +
>> +		button-wps {
>> +			label = "wps";
>> +			linux,code = <KEY_WPS_BUTTON>;
>> +			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
>> +			debounce-interval = <60>;
>> +		};
>> +	};
>> +
>> +	leds {
>> +		compatible = "gpio-leds";
>> +		pinctrl-0 = <&gpio_leds_default>;
>> +		pinctrl-names = "default";
>> +
>> +		led-0 {
>> +			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "phy0tx";
>> +			default-state = "off";
>> +		};
>> +	};
>>   };
>>   
>>   &blsp1_i2c1 {
>> @@ -52,6 +77,20 @@
>>   /* PINCTRL */
>>   
>>   &tlmm {
>> +	gpio_keys_default: gpio-keys-default-state {
>> +		pins = "gpio35";
>> +		function = "gpio";
>> +		drive-strength = <8>;
>> +		bias-pull-up;
>> +	};
>> +
>> +	gpio_leds_default: gpio-leds-default-state {
>> +		pins = "gpio36";
>> +		function = "gpio";
>> +		drive-strength = <8>;
>> +		bias-pull-down;
>> +	};
>> +
>>   	i2c_1_pins: i2c-1-state {
>>   		pins = "gpio29", "gpio30";
>>   		function = "blsp1_i2c0";

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons
  2023-06-06 12:57   ` Konrad Dybcio
@ 2023-06-09 10:34     ` Sridharan S N
  0 siblings, 0 replies; 10+ messages in thread
From: Sridharan S N @ 2023-06-09 10:34 UTC (permalink / raw)
  To: Konrad Dybcio, agross, andersson, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel


On 6/6/2023 6:27 PM, Konrad Dybcio wrote:
>
> On 5.06.2023 07:29, Sridharan S N wrote:
>> Add support for wlan-2g LED on GPIO 36 and wps buttons on GPIO 35.
>>
>> Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
>> ---
>> Changes in V2:
>> 	- Used the hypen in node name instead of underscore
>> 	- Dropped the status property
>>   
>>   arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts | 42 +++++++++++++++++++++
>>   arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts | 42 +++++++++++++++++++++
>>   arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts | 42 +++++++++++++++++++++
>>   3 files changed, 126 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts b/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts
>> index 3af1d5556950..5bd4ff3ad86b 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts
>> +++ b/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts
>> @@ -7,6 +7,8 @@
>>   
>>   /dts-v1/;
>>   
>> +#include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/input/input.h>
>>   #include "ipq5332.dtsi"
>>   
>>   / {
>> @@ -20,6 +22,32 @@
>>   	chosen {
>>   		stdout-path = "serial0";
>>   	};
>> +
>> +	gpio-keys {
>> +		compatible = "gpio-keys";
>> +		pinctrl-0 = <&gpio_keys_default>;
>> +		pinctrl-names = "default";
>> +
>> +		button-wps {
>> +			label = "wps";
>> +			linux,code = <KEY_WPS_BUTTON>;
>> +			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
>> +			linux,input-type = <1>;
>> +			debounce-interval = <60>;
>> +		};
>> +	};
> All of these changes seem very repetetive.. Are these devboards based
> on a common design? Maybe ipq5332-rdp-common.dtsi would be beneficial
> here?
Will move all the common nodes to common dtsi in the next patch
> Thanks,
Sridharan
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&gpio_leds_default>;
> +		pinctrl-names = "default";
> +
> +		led-0 {
> +			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "phy0tx";
> +			default-state = "off";
> +		};
> +	};
>   };
>   
>   &blsp1_uart0 {
> @@ -57,6 +85,20 @@
>   /* PINCTRL */
>   
>   &tlmm {
> +	gpio_keys_default: gpio-keys-default-state {
> +		pins = "gpio35";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
> +	gpio_leds_default: gpio-leds-default-state {
> +		pins = "gpio36";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-down;
> +	};
> +
>   	i2c_1_pins: i2c-1-state {
>   		pins = "gpio29", "gpio30";
>   		function = "blsp1_i2c0";
> diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts b/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
> index bcf3b31c20e3..36cbebb75c48 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
> @@ -7,6 +7,8 @@
>   
>   /dts-v1/;
>   
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
>   #include "ipq5332.dtsi"
>   
>   / {
> @@ -20,6 +22,32 @@
>   	chosen {
>   		stdout-path = "serial0";
>   	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-0 = <&gpio_keys_default>;
> +		pinctrl-names = "default";
> +
> +		button-wps {
> +			label = "wps";
> +			linux,code = <KEY_WPS_BUTTON>;
> +			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <1>;
> +			debounce-interval = <60>;
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&gpio_leds_default>;
> +		pinctrl-names = "default";
> +
> +		led-0 {
> +			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "phy0tx";
> +			default-state = "off";
> +		};
> +	};
>   };
>   
>   &blsp1_uart0 {
> @@ -71,6 +99,20 @@
>   /* PINCTRL */
>   
>   &tlmm {
> +	gpio_keys_default: gpio-keys-default-state {
> +		pins = "gpio35";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
> +	gpio_leds_default: gpio-leds-default-state {
> +		pins = "gpio36";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-down;
> +	};
> +
>   	i2c_1_pins: i2c-1-state {
>   		pins = "gpio29", "gpio30";
>   		function = "blsp1_i2c0";
> diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts b/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts
> index 3b6a5cb8bf07..2d27f48f00c0 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts
> @@ -7,6 +7,8 @@
>   
>   /dts-v1/;
>   
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
>   #include "ipq5332.dtsi"
>   
>   / {
> @@ -20,6 +22,32 @@
>   	chosen {
>   		stdout-path = "serial0";
>   	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-0 = <&gpio_keys_default>;
> +		pinctrl-names = "default";
> +
> +		button-wps {
> +			label = "wps";
> +			linux,code = <KEY_WPS_BUTTON>;
> +			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <1>;
> +			debounce-interval = <60>;
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&gpio_leds_default>;
> +		pinctrl-names = "default";
> +
> +		led-0 {
> +			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "phy0tx";
> +			default-state = "off";
> +		};
> +	};
>   };
>   
>   &blsp1_uart0 {
> @@ -64,6 +92,20 @@
>   /* PINCTRL */
>   
>   &tlmm {
> +	gpio_keys_default: gpio-keys-default-state {
> +		pins = "gpio35";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
> +	gpio_leds_default: gpio-leds-default-state {
> +		pins = "gpio36";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-down;
> +	};
> +
>   	sdc_default_state: sdc-default-state {
>   		clk-pins {
>   			pins = "gpio13";

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons
  2023-06-05  5:29 ` [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons Sridharan S N
@ 2023-06-06 12:57   ` Konrad Dybcio
  2023-06-09 10:34     ` Sridharan S N
  0 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2023-06-06 12:57 UTC (permalink / raw)
  To: Sridharan S N, agross, andersson, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel



On 5.06.2023 07:29, Sridharan S N wrote:
> Add support for wlan-2g LED on GPIO 36 and wps buttons on GPIO 35.
> 
> Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
> ---
> Changes in V2:
> 	- Used the hypen in node name instead of underscore
> 	- Dropped the status property
>  
>  arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts | 42 +++++++++++++++++++++
>  arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts | 42 +++++++++++++++++++++
>  arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts | 42 +++++++++++++++++++++
>  3 files changed, 126 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts b/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts
> index 3af1d5556950..5bd4ff3ad86b 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts
> @@ -7,6 +7,8 @@
>  
>  /dts-v1/;
>  
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
>  #include "ipq5332.dtsi"
>  
>  / {
> @@ -20,6 +22,32 @@
>  	chosen {
>  		stdout-path = "serial0";
>  	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-0 = <&gpio_keys_default>;
> +		pinctrl-names = "default";
> +
> +		button-wps {
> +			label = "wps";
> +			linux,code = <KEY_WPS_BUTTON>;
> +			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <1>;
> +			debounce-interval = <60>;
> +		};
> +	};
All of these changes seem very repetetive.. Are these devboards based
on a common design? Maybe ipq5332-rdp-common.dtsi would be beneficial
here?

Konrad
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&gpio_leds_default>;
> +		pinctrl-names = "default";
> +
> +		led-0 {
> +			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "phy0tx";
> +			default-state = "off";
> +		};
> +	};
>  };
>  
>  &blsp1_uart0 {
> @@ -57,6 +85,20 @@
>  /* PINCTRL */
>  
>  &tlmm {
> +	gpio_keys_default: gpio-keys-default-state {
> +		pins = "gpio35";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
> +	gpio_leds_default: gpio-leds-default-state {
> +		pins = "gpio36";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-down;
> +	};
> +
>  	i2c_1_pins: i2c-1-state {
>  		pins = "gpio29", "gpio30";
>  		function = "blsp1_i2c0";
> diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts b/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
> index bcf3b31c20e3..36cbebb75c48 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
> @@ -7,6 +7,8 @@
>  
>  /dts-v1/;
>  
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
>  #include "ipq5332.dtsi"
>  
>  / {
> @@ -20,6 +22,32 @@
>  	chosen {
>  		stdout-path = "serial0";
>  	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-0 = <&gpio_keys_default>;
> +		pinctrl-names = "default";
> +
> +		button-wps {
> +			label = "wps";
> +			linux,code = <KEY_WPS_BUTTON>;
> +			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <1>;
> +			debounce-interval = <60>;
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&gpio_leds_default>;
> +		pinctrl-names = "default";
> +
> +		led-0 {
> +			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "phy0tx";
> +			default-state = "off";
> +		};
> +	};
>  };
>  
>  &blsp1_uart0 {
> @@ -71,6 +99,20 @@
>  /* PINCTRL */
>  
>  &tlmm {
> +	gpio_keys_default: gpio-keys-default-state {
> +		pins = "gpio35";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
> +	gpio_leds_default: gpio-leds-default-state {
> +		pins = "gpio36";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-down;
> +	};
> +
>  	i2c_1_pins: i2c-1-state {
>  		pins = "gpio29", "gpio30";
>  		function = "blsp1_i2c0";
> diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts b/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts
> index 3b6a5cb8bf07..2d27f48f00c0 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts
> @@ -7,6 +7,8 @@
>  
>  /dts-v1/;
>  
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
>  #include "ipq5332.dtsi"
>  
>  / {
> @@ -20,6 +22,32 @@
>  	chosen {
>  		stdout-path = "serial0";
>  	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-0 = <&gpio_keys_default>;
> +		pinctrl-names = "default";
> +
> +		button-wps {
> +			label = "wps";
> +			linux,code = <KEY_WPS_BUTTON>;
> +			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <1>;
> +			debounce-interval = <60>;
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&gpio_leds_default>;
> +		pinctrl-names = "default";
> +
> +		led-0 {
> +			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "phy0tx";
> +			default-state = "off";
> +		};
> +	};
>  };
>  
>  &blsp1_uart0 {
> @@ -64,6 +92,20 @@
>  /* PINCTRL */
>  
>  &tlmm {
> +	gpio_keys_default: gpio-keys-default-state {
> +		pins = "gpio35";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
> +	gpio_leds_default: gpio-leds-default-state {
> +		pins = "gpio36";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-down;
> +	};
> +
>  	sdc_default_state: sdc-default-state {
>  		clk-pins {
>  			pins = "gpio13";

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons
  2023-06-05  5:29 [PATCH V2 0/2] Add support for GPIO based leds and buttons Sridharan S N
@ 2023-06-05  5:29 ` Sridharan S N
  2023-06-06 12:57   ` Konrad Dybcio
  0 siblings, 1 reply; 10+ messages in thread
From: Sridharan S N @ 2023-06-05  5:29 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Sridharan S N

Add support for wlan-2g LED on GPIO 36 and wps buttons on GPIO 35.

Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
---
Changes in V2:
	- Used the hypen in node name instead of underscore
	- Dropped the status property
 
 arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts | 42 +++++++++++++++++++++
 arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts | 42 +++++++++++++++++++++
 arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts | 42 +++++++++++++++++++++
 3 files changed, 126 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts b/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts
index 3af1d5556950..5bd4ff3ad86b 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5332-mi01.2.dts
@@ -7,6 +7,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include "ipq5332.dtsi"
 
 / {
@@ -20,6 +22,32 @@
 	chosen {
 		stdout-path = "serial0";
 	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&gpio_keys_default>;
+		pinctrl-names = "default";
+
+		button-wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-0 = <&gpio_leds_default>;
+		pinctrl-names = "default";
+
+		led-0 {
+			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy0tx";
+			default-state = "off";
+		};
+	};
 };
 
 &blsp1_uart0 {
@@ -57,6 +85,20 @@
 /* PINCTRL */
 
 &tlmm {
+	gpio_keys_default: gpio-keys-default-state {
+		pins = "gpio35";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
+	gpio_leds_default: gpio-leds-default-state {
+		pins = "gpio36";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-down;
+	};
+
 	i2c_1_pins: i2c-1-state {
 		pins = "gpio29", "gpio30";
 		function = "blsp1_i2c0";
diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts b/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
index bcf3b31c20e3..36cbebb75c48 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
@@ -7,6 +7,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include "ipq5332.dtsi"
 
 / {
@@ -20,6 +22,32 @@
 	chosen {
 		stdout-path = "serial0";
 	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&gpio_keys_default>;
+		pinctrl-names = "default";
+
+		button-wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-0 = <&gpio_leds_default>;
+		pinctrl-names = "default";
+
+		led-0 {
+			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy0tx";
+			default-state = "off";
+		};
+	};
 };
 
 &blsp1_uart0 {
@@ -71,6 +99,20 @@
 /* PINCTRL */
 
 &tlmm {
+	gpio_keys_default: gpio-keys-default-state {
+		pins = "gpio35";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
+	gpio_leds_default: gpio-leds-default-state {
+		pins = "gpio36";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-down;
+	};
+
 	i2c_1_pins: i2c-1-state {
 		pins = "gpio29", "gpio30";
 		function = "blsp1_i2c0";
diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts b/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts
index 3b6a5cb8bf07..2d27f48f00c0 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp468.dts
@@ -7,6 +7,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include "ipq5332.dtsi"
 
 / {
@@ -20,6 +22,32 @@
 	chosen {
 		stdout-path = "serial0";
 	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&gpio_keys_default>;
+		pinctrl-names = "default";
+
+		button-wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-0 = <&gpio_leds_default>;
+		pinctrl-names = "default";
+
+		led-0 {
+			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy0tx";
+			default-state = "off";
+		};
+	};
 };
 
 &blsp1_uart0 {
@@ -64,6 +92,20 @@
 /* PINCTRL */
 
 &tlmm {
+	gpio_keys_default: gpio-keys-default-state {
+		pins = "gpio35";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
+	gpio_leds_default: gpio-leds-default-state {
+		pins = "gpio36";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-down;
+	};
+
 	sdc_default_state: sdc-default-state {
 		clk-pins {
 			pins = "gpio13";
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-16  4:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 14:53 [PATCH V2 0/2] Add support for GPIO based leds and buttons on IPQ5332/9574 devices Sridharan S N
2023-06-15 14:53 ` [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons Sridharan S N
2023-06-15 14:58   ` Konrad Dybcio
2023-06-16  4:42     ` Sridharan S N
2023-06-15 14:53 ` [PATCH V2 2/2] arm64: dts: qcom: ipq9574: enable GPIO based LEDs Sridharan S N
2023-06-15 14:58   ` Konrad Dybcio
2023-06-15 14:56 ` [PATCH V2 0/2] Add support for GPIO based leds and buttons on IPQ5332/9574 devices Konrad Dybcio
  -- strict thread matches above, loose matches on Subject: below --
2023-06-05  5:29 [PATCH V2 0/2] Add support for GPIO based leds and buttons Sridharan S N
2023-06-05  5:29 ` [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons Sridharan S N
2023-06-06 12:57   ` Konrad Dybcio
2023-06-09 10:34     ` Sridharan S N

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.