2023-06-15 15:06:49

by Sridharan S N

[permalink] [raw]
Subject: [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons

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

Signed-off-by: Sridharan S N <[email protected]>
---
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



2023-06-15 15:26:11

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons

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 <[email protected]>
> ---
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";

2023-06-16 04:47:36

by Sridharan S N

[permalink] [raw]
Subject: Re: [PATCH V2 1/2] arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons


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 <[email protected]>
>> ---
> 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";