* [PATCH 1/8] dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632
2023-04-13 23:17 [PATCH 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
@ 2023-04-13 23:17 ` Luca Weiss
2023-04-14 7:55 ` Krzysztof Kozlowski
2023-04-13 23:17 ` [PATCH 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support Luca Weiss
` (6 subsequent siblings)
7 siblings, 1 reply; 23+ messages in thread
From: Luca Weiss @ 2023-04-13 23:17 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio, Luca Weiss
Document the 8 GPIOs found on PMI632.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
index 1096655961f7..2179444b7a83 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
@@ -52,6 +52,7 @@ properties:
- qcom,pm8994-gpio
- qcom,pm8998-gpio
- qcom,pma8084-gpio
+ - qcom,pmi632-gpio
- qcom,pmi8950-gpio
- qcom,pmi8994-gpio
- qcom,pmi8998-gpio
@@ -434,6 +435,7 @@ $defs:
- gpio1-gpio22 for pm8994
- gpio1-gpio26 for pm8998
- gpio1-gpio22 for pma8084
+ - gpio1-gpio8 for pmi632
- gpio1-gpio2 for pmi8950
- gpio1-gpio10 for pmi8994
- gpio1-gpio4 for pmk8350
--
2.40.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 1/8] dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632
2023-04-13 23:17 ` [PATCH 1/8] dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632 Luca Weiss
@ 2023-04-14 7:55 ` Krzysztof Kozlowski
0 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-14 7:55 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio
On 14/04/2023 01:17, Luca Weiss wrote:
> Document the 8 GPIOs found on PMI632.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> index 1096655961f7..2179444b7a83 100644
> --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> @@ -52,6 +52,7 @@ properties:
> - qcom,pm8994-gpio
> - qcom,pm8998-gpio
> - qcom,pma8084-gpio
> + - qcom,pmi632-gpio
You missed update to other places.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support
2023-04-13 23:17 [PATCH 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
2023-04-13 23:17 ` [PATCH 1/8] dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632 Luca Weiss
@ 2023-04-13 23:17 ` Luca Weiss
2023-04-13 23:27 ` Konrad Dybcio
2023-04-21 8:26 ` Linus Walleij
2023-04-13 23:17 ` [PATCH 3/8] dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block Luca Weiss
` (5 subsequent siblings)
7 siblings, 2 replies; 23+ messages in thread
From: Luca Weiss @ 2023-04-13 23:17 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio, Luca Weiss
Add support for the 8 GPIOs found on PMI632.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index ea3485344f06..40cab13e5a83 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -1232,6 +1232,7 @@ static const struct of_device_id pmic_gpio_of_match[] = {
{ .compatible = "qcom,pm8994-gpio", .data = (void *) 22 },
{ .compatible = "qcom,pm8998-gpio", .data = (void *) 26 },
{ .compatible = "qcom,pma8084-gpio", .data = (void *) 22 },
+ { .compatible = "qcom,pmi632-gpio", .data = (void *) 8 },
{ .compatible = "qcom,pmi8950-gpio", .data = (void *) 2 },
{ .compatible = "qcom,pmi8994-gpio", .data = (void *) 10 },
{ .compatible = "qcom,pmi8998-gpio", .data = (void *) 14 },
--
2.40.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support
2023-04-13 23:17 ` [PATCH 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support Luca Weiss
@ 2023-04-13 23:27 ` Konrad Dybcio
2023-04-21 8:26 ` Linus Walleij
1 sibling, 0 replies; 23+ messages in thread
From: Konrad Dybcio @ 2023-04-13 23:27 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Linus Walleij, Rob Herring, Krzysztof Kozlowski,
Pavel Machek, Lee Jones, Jonathan Cameron, Lars-Peter Clausen,
Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio
On 14.04.2023 01:17, Luca Weiss wrote:
> Add support for the 8 GPIOs found on PMI632.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
As I've started doing more and more lately, I'll hijack this
patch to discuss the general approach..
I have a feeling that you'll get some comments about
this match list growing, especially since the driver data
is already filled in dt (gpio-ranges).. perhaps we can improve
this..
Especially considering the "qcom,spmi-gpio" fallback is there
(unless we care about 2015 DTs like 0804308fdd3c) that are
unlikely to still work nowadays. Old DTs also used interrupts=<>
to list out all the GPIOs (among the other SPMI fluff) individually
(see e.g. 5f540fb4821a).
Krzysztof, WDYT? Would it be worth taking all of that old junk into
account, or should we keep it as-is?
Konrad
> drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> index ea3485344f06..40cab13e5a83 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> @@ -1232,6 +1232,7 @@ static const struct of_device_id pmic_gpio_of_match[] = {
> { .compatible = "qcom,pm8994-gpio", .data = (void *) 22 },
> { .compatible = "qcom,pm8998-gpio", .data = (void *) 26 },
> { .compatible = "qcom,pma8084-gpio", .data = (void *) 22 },
> + { .compatible = "qcom,pmi632-gpio", .data = (void *) 8 },
> { .compatible = "qcom,pmi8950-gpio", .data = (void *) 2 },
> { .compatible = "qcom,pmi8994-gpio", .data = (void *) 10 },
> { .compatible = "qcom,pmi8998-gpio", .data = (void *) 14 },
>
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support
2023-04-13 23:17 ` [PATCH 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support Luca Weiss
2023-04-13 23:27 ` Konrad Dybcio
@ 2023-04-21 8:26 ` Linus Walleij
1 sibling, 0 replies; 23+ messages in thread
From: Linus Walleij @ 2023-04-21 8:26 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Pavel Machek, Lee Jones, Jonathan Cameron, Lars-Peter Clausen,
Stephen Boyd, linux-arm-msm, linux-gpio, devicetree, linux-kernel,
linux-leds, linux-iio
On Fri, Apr 14, 2023 at 1:18 AM Luca Weiss <luca@z3ntu.xyz> wrote:
> Add support for the 8 GPIOs found on PMI632.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
This patch (2/8) applied as uncontroversial.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 3/8] dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block
2023-04-13 23:17 [PATCH 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
2023-04-13 23:17 ` [PATCH 1/8] dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632 Luca Weiss
2023-04-13 23:17 ` [PATCH 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support Luca Weiss
@ 2023-04-13 23:17 ` Luca Weiss
2023-04-14 7:55 ` Krzysztof Kozlowski
2023-04-13 23:17 ` [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG Luca Weiss
` (4 subsequent siblings)
7 siblings, 1 reply; 23+ messages in thread
From: Luca Weiss @ 2023-04-13 23:17 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio, Luca Weiss
Document the availability of an LPG configuration for the PMI632 PMIC in
the Qualcomm Light Pulse Generator driver.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
index 1df837798249..2e4426894bed 100644
--- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
@@ -25,6 +25,7 @@ properties:
- qcom,pm8941-lpg
- qcom,pm8994-lpg
- qcom,pmc8180c-lpg
+ - qcom,pmi632-lpg
- qcom,pmi8994-lpg
- qcom,pmi8998-lpg
--
2.40.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 3/8] dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block
2023-04-13 23:17 ` [PATCH 3/8] dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block Luca Weiss
@ 2023-04-14 7:55 ` Krzysztof Kozlowski
0 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-14 7:55 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio
On 14/04/2023 01:17, Luca Weiss wrote:
> Document the availability of an LPG configuration for the PMI632 PMIC in
> the Qualcomm Light Pulse Generator driver.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG
2023-04-13 23:17 [PATCH 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
` (2 preceding siblings ...)
2023-04-13 23:17 ` [PATCH 3/8] dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block Luca Weiss
@ 2023-04-13 23:17 ` Luca Weiss
2023-04-13 23:33 ` Konrad Dybcio
2023-04-14 12:22 ` Pavel Machek
2023-04-13 23:17 ` [PATCH 5/8] dt-bindings: iio: adc: qcom,spmi-vadc: Allow 1/16 for pre-scaling Luca Weiss
` (3 subsequent siblings)
7 siblings, 2 replies; 23+ messages in thread
From: Luca Weiss @ 2023-04-13 23:17 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio, Luca Weiss
The PMI632 PMIC contains 5 PWM channels, 3 of which can be used for
LEDs.
For the LED pattern it doesn't have LUT like other PMICs but uses SDAM
instead. This is not currently implemented in the driver but since LPG
works fine without it, add support for the PMIC now.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
drivers/leds/rgb/leds-qcom-lpg.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
index 67f48f222109..51763ecb8c1e 100644
--- a/drivers/leds/rgb/leds-qcom-lpg.c
+++ b/drivers/leds/rgb/leds-qcom-lpg.c
@@ -1353,6 +1353,20 @@ static const struct lpg_data pm8994_lpg_data = {
},
};
+/* PMI632 uses SDAM instead of LUT for pattern */
+static const struct lpg_data pmi632_lpg_data = {
+ .triled_base = 0xd000,
+
+ .num_channels = 5,
+ .channels = (const struct lpg_channel_data[]) {
+ { .base = 0xb300, .triled_mask = BIT(7) },
+ { .base = 0xb400, .triled_mask = BIT(6) },
+ { .base = 0xb500, .triled_mask = BIT(5) },
+ { .base = 0xb600 },
+ { .base = 0xb700 },
+ },
+};
+
static const struct lpg_data pmi8994_lpg_data = {
.lut_base = 0xb000,
.lut_size = 24,
@@ -1436,6 +1450,7 @@ static const struct of_device_id lpg_of_table[] = {
{ .compatible = "qcom,pm8916-pwm", .data = &pm8916_pwm_data },
{ .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data },
{ .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data },
+ { .compatible = "qcom,pmi632-lpg", .data = &pmi632_lpg_data },
{ .compatible = "qcom,pmi8994-lpg", .data = &pmi8994_lpg_data },
{ .compatible = "qcom,pmi8998-lpg", .data = &pmi8998_lpg_data },
{ .compatible = "qcom,pmc8180c-lpg", .data = &pm8150l_lpg_data },
--
2.40.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG
2023-04-13 23:17 ` [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG Luca Weiss
@ 2023-04-13 23:33 ` Konrad Dybcio
2023-04-14 12:22 ` Pavel Machek
1 sibling, 0 replies; 23+ messages in thread
From: Konrad Dybcio @ 2023-04-13 23:33 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Linus Walleij, Rob Herring, Krzysztof Kozlowski,
Pavel Machek, Lee Jones, Jonathan Cameron, Lars-Peter Clausen,
Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio
On 14.04.2023 01:17, Luca Weiss wrote:
> The PMI632 PMIC contains 5 PWM channels, 3 of which can be used for
> LEDs.
>
> For the LED pattern it doesn't have LUT like other PMICs but uses SDAM
> instead. This is not currently implemented in the driver but since LPG
> works fine without it, add support for the PMIC now.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
Matches everything i see in 4.19!
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> drivers/leds/rgb/leds-qcom-lpg.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
> index 67f48f222109..51763ecb8c1e 100644
> --- a/drivers/leds/rgb/leds-qcom-lpg.c
> +++ b/drivers/leds/rgb/leds-qcom-lpg.c
> @@ -1353,6 +1353,20 @@ static const struct lpg_data pm8994_lpg_data = {
> },
> };
>
> +/* PMI632 uses SDAM instead of LUT for pattern */
> +static const struct lpg_data pmi632_lpg_data = {
> + .triled_base = 0xd000,
> +
> + .num_channels = 5,
> + .channels = (const struct lpg_channel_data[]) {
> + { .base = 0xb300, .triled_mask = BIT(7) },
> + { .base = 0xb400, .triled_mask = BIT(6) },
> + { .base = 0xb500, .triled_mask = BIT(5) },
> + { .base = 0xb600 },
> + { .base = 0xb700 },
> + },
> +};
> +
> static const struct lpg_data pmi8994_lpg_data = {
> .lut_base = 0xb000,
> .lut_size = 24,
> @@ -1436,6 +1450,7 @@ static const struct of_device_id lpg_of_table[] = {
> { .compatible = "qcom,pm8916-pwm", .data = &pm8916_pwm_data },
> { .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data },
> { .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data },
> + { .compatible = "qcom,pmi632-lpg", .data = &pmi632_lpg_data },
> { .compatible = "qcom,pmi8994-lpg", .data = &pmi8994_lpg_data },
> { .compatible = "qcom,pmi8998-lpg", .data = &pmi8998_lpg_data },
> { .compatible = "qcom,pmc8180c-lpg", .data = &pm8150l_lpg_data },
>
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG
2023-04-13 23:17 ` [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG Luca Weiss
2023-04-13 23:33 ` Konrad Dybcio
@ 2023-04-14 12:22 ` Pavel Machek
1 sibling, 0 replies; 23+ messages in thread
From: Pavel Machek @ 2023-04-14 12:22 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd, linux-arm-msm, linux-gpio,
devicetree, linux-kernel, linux-leds, linux-iio
[-- Attachment #1: Type: text/plain, Size: 502 bytes --]
On Fri 2023-04-14 01:17:48, Luca Weiss wrote:
> The PMI632 PMIC contains 5 PWM channels, 3 of which can be used for
> LEDs.
>
> For the LED pattern it doesn't have LUT like other PMICs but uses SDAM
> instead. This is not currently implemented in the driver but since LPG
> works fine without it, add support for the PMIC now.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Acked-by: Pavel Machek <pavel@ucw.cz>
--
People of Russia, stop Putin before his war on Ukraine escalates.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 5/8] dt-bindings: iio: adc: qcom,spmi-vadc: Allow 1/16 for pre-scaling
2023-04-13 23:17 [PATCH 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
` (3 preceding siblings ...)
2023-04-13 23:17 ` [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG Luca Weiss
@ 2023-04-13 23:17 ` Luca Weiss
2023-04-14 7:56 ` Krzysztof Kozlowski
2023-04-13 23:17 ` [PATCH 6/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible Luca Weiss
` (2 subsequent siblings)
7 siblings, 1 reply; 23+ messages in thread
From: Luca Weiss @ 2023-04-13 23:17 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio, Luca Weiss
The channel ADC5_USB_IN_V_16 is using 1/16 pre-scaling on at least
pm7250b and pmi632. Allow that in the schema.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
index bd6e0d6f6e0c..365aa3528a87 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
@@ -101,7 +101,7 @@ patternProperties:
oneOf:
- items:
- const: 1
- - enum: [ 1, 3, 4, 6, 20, 8, 10 ]
+ - enum: [ 1, 3, 4, 6, 20, 8, 10, 16 ]
- items:
- const: 10
- const: 81
--
2.40.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 5/8] dt-bindings: iio: adc: qcom,spmi-vadc: Allow 1/16 for pre-scaling
2023-04-13 23:17 ` [PATCH 5/8] dt-bindings: iio: adc: qcom,spmi-vadc: Allow 1/16 for pre-scaling Luca Weiss
@ 2023-04-14 7:56 ` Krzysztof Kozlowski
2023-04-15 16:20 ` Jonathan Cameron
0 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-14 7:56 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio
On 14/04/2023 01:17, Luca Weiss wrote:
> The channel ADC5_USB_IN_V_16 is using 1/16 pre-scaling on at least
> pm7250b and pmi632. Allow that in the schema.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 5/8] dt-bindings: iio: adc: qcom,spmi-vadc: Allow 1/16 for pre-scaling
2023-04-14 7:56 ` Krzysztof Kozlowski
@ 2023-04-15 16:20 ` Jonathan Cameron
0 siblings, 0 replies; 23+ messages in thread
From: Jonathan Cameron @ 2023-04-15 16:20 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Luca Weiss, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Lars-Peter Clausen,
Stephen Boyd, linux-arm-msm, linux-gpio, devicetree, linux-kernel,
linux-leds, linux-iio
On Fri, 14 Apr 2023 09:56:07 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 14/04/2023 01:17, Luca Weiss wrote:
> > The channel ADC5_USB_IN_V_16 is using 1/16 pre-scaling on at least
> > pm7250b and pmi632. Allow that in the schema.
> >
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> > Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
>
>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> Best regards,
> Krzysztof
>
Applied this patch to the IIO togreg branch initially pushed out as testing
for 0-day to poke at it.
I'm doubtful this one will make the upcoming merge window but seems unlikely
the rest will all make it either so that shouldn't be a problem.
Jonathan
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 6/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible
2023-04-13 23:17 [PATCH 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
` (4 preceding siblings ...)
2023-04-13 23:17 ` [PATCH 5/8] dt-bindings: iio: adc: qcom,spmi-vadc: Allow 1/16 for pre-scaling Luca Weiss
@ 2023-04-13 23:17 ` Luca Weiss
2023-04-14 7:56 ` Krzysztof Kozlowski
2023-04-14 12:26 ` Pavel Machek
2023-04-13 23:17 ` [PATCH 7/8] arm64: dts: qcom: Add PMI632 PMIC Luca Weiss
2023-04-13 23:17 ` [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED Luca Weiss
7 siblings, 2 replies; 23+ messages in thread
From: Luca Weiss @ 2023-04-13 23:17 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio, Luca Weiss
Document support for the pmi632, often found with the sdm632 SoC.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
index 84620ebc1efe..09e7195c622b 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
@@ -71,6 +71,7 @@ properties:
- qcom,pm8998
- qcom,pma8084
- qcom,pmd9635
+ - qcom,pmi632
- qcom,pmi8950
- qcom,pmi8962
- qcom,pmi8994
--
2.40.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 6/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible
2023-04-13 23:17 ` [PATCH 6/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible Luca Weiss
@ 2023-04-14 7:56 ` Krzysztof Kozlowski
2023-04-14 12:26 ` Pavel Machek
1 sibling, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-14 7:56 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio
On 14/04/2023 01:17, Luca Weiss wrote:
> Document support for the pmi632, often found with the sdm632 SoC.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 +
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 6/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible
2023-04-13 23:17 ` [PATCH 6/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible Luca Weiss
2023-04-14 7:56 ` Krzysztof Kozlowski
@ 2023-04-14 12:26 ` Pavel Machek
1 sibling, 0 replies; 23+ messages in thread
From: Pavel Machek @ 2023-04-14 12:26 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd, linux-arm-msm, linux-gpio,
devicetree, linux-kernel, linux-leds, linux-iio
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
On Fri 2023-04-14 01:17:50, Luca Weiss wrote:
> Document support for the pmi632, often found with the sdm632 SoC.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
5,6: Acked-by: Pavel Machek <pavel@ucw.cz>
--
People of Russia, stop Putin before his war on Ukraine escalates.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 7/8] arm64: dts: qcom: Add PMI632 PMIC
2023-04-13 23:17 [PATCH 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
` (5 preceding siblings ...)
2023-04-13 23:17 ` [PATCH 6/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible Luca Weiss
@ 2023-04-13 23:17 ` Luca Weiss
2023-04-13 23:17 ` [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED Luca Weiss
7 siblings, 0 replies; 23+ messages in thread
From: Luca Weiss @ 2023-04-13 23:17 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio, Luca Weiss
The PMI632, commonly found on SoCs with SDM632 has various standard
functions like ADC, GPIOs, LPG and more.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
arch/arm64/boot/dts/qcom/pmi632.dtsi | 165 +++++++++++++++++++++++++++++++++++
1 file changed, 165 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pmi632.dtsi b/arch/arm64/boot/dts/qcom/pmi632.dtsi
new file mode 100644
index 000000000000..4eb79e0ce40a
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/pmi632.dtsi
@@ -0,0 +1,165 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (C) 2023 Luca Weiss <luca@z3ntu.xyz>
+ */
+
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+/ {
+ thermal-zones {
+ pmi632-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&pmi632_temp>;
+
+ trips {
+ trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "hot";
+ };
+
+ trip2 {
+ temperature = <125000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
+&spmi_bus {
+ pmic@2 {
+ compatible = "qcom,pmi632", "qcom,spmi-pmic";
+ reg = <0x2 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmi632_temp: temp-alarm@2400 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0x2400>;
+ interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
+ #thermal-sensor-cells = <0>;
+ };
+
+ pmi632_adc: adc@3100 {
+ compatible = "qcom,spmi-adc5";
+ reg = <0x3100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #io-channel-cells = <1>;
+ interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+
+ channel@0 {
+ reg = <ADC5_REF_GND>;
+ qcom,pre-scaling = <1 1>;
+ label = "ref_gnd";
+ };
+
+ channel@1 {
+ reg = <ADC5_1P25VREF>;
+ qcom,pre-scaling = <1 1>;
+ label = "vref_1p25";
+ };
+
+ channel@6 {
+ reg = <ADC5_DIE_TEMP>;
+ qcom,pre-scaling = <1 1>;
+ label = "die_temp";
+ };
+
+ channel@7 {
+ reg = <ADC5_USB_IN_I>;
+ qcom,pre-scaling = <1 1>;
+ label = "usb_in_i_uv";
+ };
+
+ channel@8 {
+ reg = <ADC5_USB_IN_V_16>;
+ qcom,pre-scaling = <1 16>;
+ label = "usb_in_v_div_16";
+ };
+
+ channel@9 {
+ reg = <ADC5_CHG_TEMP>;
+ qcom,pre-scaling = <1 1>;
+ label = "chg_temp";
+ };
+
+ channel@4b {
+ reg = <ADC5_BAT_ID_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ qcom,ratiometric;
+ label = "bat_id";
+ };
+
+ channel@83 {
+ reg = <ADC5_VPH_PWR>;
+ qcom,pre-scaling = <1 3>;
+ label = "vph_pwr";
+ };
+
+ channel@84 {
+ reg = <ADC5_VBAT_SNS>;
+ qcom,pre-scaling = <1 3>;
+ label = "vbat_sns";
+ };
+ };
+
+ pmi632_adc_tm: adc-tm@3500 {
+ compatible = "qcom,spmi-adc-tm5";
+ reg = <0x3500>;
+ interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
+ #thermal-sensor-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ pmi632_sdam_7: nvram@b600 {
+ compatible = "qcom,spmi-sdam";
+ reg = <0xb600>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xb600 0x100>;
+ };
+
+ pmi632_gpios: gpio@c000 {
+ compatible = "qcom,pmi632-gpio", "qcom,spmi-gpio";
+ reg = <0xc000>;
+ gpio-controller;
+ gpio-ranges = <&pmi632_gpios 0 0 8>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+
+ pmic@3 {
+ compatible = "qcom,pmi632", "qcom,spmi-pmic";
+ reg = <0x3 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmi632_lpg: pwm {
+ compatible = "qcom,pmi632-lpg";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #pwm-cells = <2>;
+
+ status = "disabled";
+ };
+ };
+};
--
2.40.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED
2023-04-13 23:17 [PATCH 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
` (6 preceding siblings ...)
2023-04-13 23:17 ` [PATCH 7/8] arm64: dts: qcom: Add PMI632 PMIC Luca Weiss
@ 2023-04-13 23:17 ` Luca Weiss
2023-04-13 23:36 ` Konrad Dybcio
2023-04-14 12:24 ` Pavel Machek
7 siblings, 2 replies; 23+ messages in thread
From: Luca Weiss @ 2023-04-13 23:17 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Pavel Machek, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio, Luca Weiss
The phone features a notification LED connected to the pmi632. Configure
the RGB led found on it.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 29 +++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
index 70e683b7e4fc..301eca9a4f31 100644
--- a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
+++ b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
@@ -4,8 +4,10 @@
*/
/dts-v1/;
+#include <dt-bindings/leds/common.h>
#include "sdm632.dtsi"
#include "pm8953.dtsi"
+#include "pmi632.dtsi"
/ {
model = "Fairphone 3";
@@ -83,6 +85,33 @@ &pm8953_resin {
linux,code = <KEY_VOLUMEDOWN>;
};
+&pmi632_lpg {
+ status = "okay";
+
+ multi-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@3 {
+ reg = <3>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+};
+
&sdhc_1 {
status = "okay";
vmmc-supply = <&pm8953_l8>;
--
2.40.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED
2023-04-13 23:17 ` [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED Luca Weiss
@ 2023-04-13 23:36 ` Konrad Dybcio
2023-04-14 15:49 ` Luca Weiss
2023-04-14 12:24 ` Pavel Machek
1 sibling, 1 reply; 23+ messages in thread
From: Konrad Dybcio @ 2023-04-13 23:36 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Linus Walleij, Rob Herring, Krzysztof Kozlowski,
Pavel Machek, Lee Jones, Jonathan Cameron, Lars-Peter Clausen,
Stephen Boyd
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio
On 14.04.2023 01:17, Luca Weiss wrote:
> The phone features a notification LED connected to the pmi632. Configure
> the RGB led found on it.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 29 +++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
> index 70e683b7e4fc..301eca9a4f31 100644
> --- a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
> @@ -4,8 +4,10 @@
> */
> /dts-v1/;
>
> +#include <dt-bindings/leds/common.h>
> #include "sdm632.dtsi"
> #include "pm8953.dtsi"
> +#include "pmi632.dtsi"
>
> / {
> model = "Fairphone 3";
> @@ -83,6 +85,33 @@ &pm8953_resin {
> linux,code = <KEY_VOLUMEDOWN>;
> };
>
> +&pmi632_lpg {
qcom,power-source?
Konrad
> + status = "okay";
> +
> + multi-led {
> + color = <LED_COLOR_ID_RGB>;
> + function = LED_FUNCTION_STATUS;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + led@1 {
> + reg = <1>;
> + color = <LED_COLOR_ID_RED>;
> + };
> +
> + led@2 {
> + reg = <2>;
> + color = <LED_COLOR_ID_GREEN>;
> + };
> +
> + led@3 {
> + reg = <3>;
> + color = <LED_COLOR_ID_BLUE>;
> + };
> + };
> +};
> +
> &sdhc_1 {
> status = "okay";
> vmmc-supply = <&pm8953_l8>;
>
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED
2023-04-13 23:36 ` Konrad Dybcio
@ 2023-04-14 15:49 ` Luca Weiss
0 siblings, 0 replies; 23+ messages in thread
From: Luca Weiss @ 2023-04-14 15:49 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Linus Walleij, Rob Herring, Krzysztof Kozlowski,
Pavel Machek, Lee Jones, Jonathan Cameron, Lars-Peter Clausen,
Stephen Boyd, Konrad Dybcio
Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel, linux-leds,
linux-iio
On Freitag, 14. April 2023 01:36:38 CEST Konrad Dybcio wrote:
> On 14.04.2023 01:17, Luca Weiss wrote:
> > The phone features a notification LED connected to the pmi632. Configure
> > the RGB led found on it.
> >
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> >
> > arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 29
> > +++++++++++++++++++++++ 1 file changed, 29 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
> > b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts index
> > 70e683b7e4fc..301eca9a4f31 100644
> > --- a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
> > +++ b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
> > @@ -4,8 +4,10 @@
> >
> > */
> >
> > /dts-v1/;
> >
> > +#include <dt-bindings/leds/common.h>
> >
> > #include "sdm632.dtsi"
> > #include "pm8953.dtsi"
> >
> > +#include "pmi632.dtsi"
> >
> > / {
> >
> > model = "Fairphone 3";
> >
> > @@ -83,6 +85,33 @@ &pm8953_resin {
> >
> > linux,code = <KEY_VOLUMEDOWN>;
> >
> > };
> >
> > +&pmi632_lpg {
>
> qcom,power-source?
This property is only used if triled_has_src_sel is set in the driver (which
it isn't on pmi632), only on pm8941 & pmi8994 it is set.
Regards
Luca
>
> Konrad
>
> > + status = "okay";
> > +
> > + multi-led {
> > + color = <LED_COLOR_ID_RGB>;
> > + function = LED_FUNCTION_STATUS;
> > +
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + led@1 {
> > + reg = <1>;
> > + color = <LED_COLOR_ID_RED>;
> > + };
> > +
> > + led@2 {
> > + reg = <2>;
> > + color = <LED_COLOR_ID_GREEN>;
> > + };
> > +
> > + led@3 {
> > + reg = <3>;
> > + color = <LED_COLOR_ID_BLUE>;
> > + };
> > + };
> > +};
> > +
> >
> > &sdhc_1 {
> >
> > status = "okay";
> > vmmc-supply = <&pm8953_l8>;
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED
2023-04-13 23:17 ` [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED Luca Weiss
2023-04-13 23:36 ` Konrad Dybcio
@ 2023-04-14 12:24 ` Pavel Machek
2023-04-14 15:48 ` Luca Weiss
1 sibling, 1 reply; 23+ messages in thread
From: Pavel Machek @ 2023-04-14 12:24 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd, linux-arm-msm, linux-gpio,
devicetree, linux-kernel, linux-leds, linux-iio
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
On Fri 2023-04-14 01:17:52, Luca Weiss wrote:
> The phone features a notification LED connected to the pmi632. Configure
> the RGB led found on it.
Could you document the usage in Documentation/leds/well-known-leds.txt
so that all phones share the same name for the RGB notification LED?
Thanks,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED
2023-04-14 12:24 ` Pavel Machek
@ 2023-04-14 15:48 ` Luca Weiss
0 siblings, 0 replies; 23+ messages in thread
From: Luca Weiss @ 2023-04-14 15:48 UTC (permalink / raw)
To: Pavel Machek
Cc: ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Lee Jones, Jonathan Cameron,
Lars-Peter Clausen, Stephen Boyd, linux-arm-msm, linux-gpio,
devicetree, linux-kernel, linux-leds, linux-iio
On Freitag, 14. April 2023 14:24:06 CEST Pavel Machek wrote:
> On Fri 2023-04-14 01:17:52, Luca Weiss wrote:
> > The phone features a notification LED connected to the pmi632. Configure
> > the RGB led found on it.
>
> Could you document the usage in Documentation/leds/well-known-leds.txt
> so that all phones share the same name for the RGB notification LED?
This dts results in /sys/class/leds/rgb:status like (presumably) all of these
existing in-tree users:
* qcom-msm8974-lge-nexus5-hammerhead.dts
* qcom-msm8974-sony-xperia-rhine.dtsi
* qcom-msm8974pro-fairphone-fp2.dts
* qcom-msm8974pro-sony-xperia-shinano-castor.dts
* freescale/imx8mq-librem5.dtsi
* qcom/msm8996-xiaomi-common.dtsi
* qcom/sdm630-sony-xperia-nile.dtsi
* qcom/sdm845-shift-axolotl.dts
However I can send a patch adding it to this txt doc since it doesn't seem to
be there yet.
Regards
Luca
>
> Thanks,
>
Pavel
^ permalink raw reply [flat|nested] 23+ messages in thread