Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3
Subsystems (11)
v2 cover Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3
Add support for the PMI632 PMIC in the spmi-gpio & qcom-lpg driver, add the dtsi for the PMIC and enable the notification LED on fairphone-fp3.
---
Changes in v2:
- Add qcom,pmi632-gpio to all the needed places in yaml
- Add patch documenting led path
- Pick up tags
- Drop vadc pre-scaling patch since it was applied
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Luca Weiss (8):
dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632
pinctrl: qcom: spmi-gpio: Add PMI632 support
dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block
leds: qcom-lpg: Add support for PMI632 LPG
dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible
arm64: dts: qcom: Add PMI632 PMIC
arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED
Documentation: leds: Add "rgb:status" path
.../devicetree/bindings/leds/leds-qcom-lpg.yaml | 1 + .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 + .../bindings/pinctrl/qcom,pmic-gpio.yaml | 3 + Documentation/leds/well-known-leds.txt | 1 + arch/arm64/boot/dts/qcom/pmi632.dtsi | 165 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 29 ++++ drivers/leds/rgb/leds-qcom-lpg.c | 15 ++ drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + 8 files changed, 216 insertions(+)
---
base-commit: 3f49aa65798675341eb9d4f947c40558564b2e6d
change-id: 20230414-pmi632-4ae03225ae75
Best regards,
Signature · 1 line
Luca Weiss <[email protected]>
PATCH v2 1/8 dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632
Document the 8 GPIOs found on PMI632.
--- Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml +3 -0
@@ -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
@@ -174,6 +175,7 @@ allOf: - qcom,pm8350b-gpio - qcom,pm8550ve-gpio - qcom,pm8950-gpio + - qcom,pmi632-gpio then: properties: gpio-line-names:
@@ -435,6 +437,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
Signature · 1 line
2.40.0
Re: [PATCH v2 1/8] dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632
Quoted 6 lines · Luca Weiss
Document the 8 GPIOs found on PMI632.
Signed-off-by Luca Weiss <[email protected]>--- Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 3 +++ 1 file changed, 3 insertions(+)
Best regards,
Krzysztof
PATCH v2 2/8 pinctrl: qcom: spmi-gpio: Add PMI632 support
In reply to Luca WeissAdd support for the 8 GPIOs found on PMI632.
--- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +1 -0
@@ -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 },
Signature · 1 line
2.40.0
Re: [PATCH v2 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support
Quoted 6 lines · Luca Weiss
Add support for the 8 GPIOs found on PMI632.
Signed-off-by Luca Weiss <[email protected]>--- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + 1 file changed, 1 insertion(+)
Signature · 2 lines
With best wishes Dmitry
PATCH v2 3/8 dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block
In reply to Luca WeissDocument the availability of an LPG configuration for the PMI632 PMIC in the Qualcomm Light Pulse Generator driver.
--- Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml +1 -0
@@ -25,6 +25,7 @@ properties: - qcom,pm8941-lpg - qcom,pm8994-lpg - qcom,pmc8180c-lpg + - qcom,pmi632-lpg - qcom,pmi8994-lpg - qcom,pmi8998-lpg
Signature · 1 line
2.40.0
Re: [PATCH v2 3/8] dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block
Quoted 8 lines · 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 <[email protected]>--- Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 1 + 1 file changed, 1 insertion(+)
Applied, thanks
Signature · 1 line
Lee Jones [李琼斯]
PATCH v2 4/8 leds: qcom-lpg: Add support for PMI632 LPG
In reply to Luca WeissThe 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.
--- drivers/leds/rgb/leds-qcom-lpg.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/leds/rgb/leds-qcom-lpg.c +15 -0
@@ -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 },
Signature · 1 line
2.40.0
Re: [PATCH v2 4/8] leds: qcom-lpg: Add support for PMI632 LPG
Quoted 7 lines · 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.
Quoted 6 lines
Acked-by Pavel Machek <[email protected]>Reviewed-by Konrad Dybcio <[email protected]>Signed-off-by Luca Weiss <[email protected]>--- drivers/leds/rgb/leds-qcom-lpg.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
Applied, thanks
Signature · 1 line
Lee Jones [李琼斯]
PATCH v2 5/8 dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible
In reply to Luca WeissDocument support for the pmi632, often found with the sdm632 SoC.
--- Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml +1 -0
@@ -71,6 +71,7 @@ properties: - qcom,pm8998 - qcom,pma8084 - qcom,pmd9635 + - qcom,pmi632 - qcom,pmi8950 - qcom,pmi8962 - qcom,pmi8994
Signature · 1 line
2.40.0
Re: [PATCH v2 5/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible
Quoted 8 lines · Luca Weiss
Document support for the pmi632, often found with the sdm632 SoC.
Acked-by Pavel Machek <[email protected]>Signed-off-by Luca Weiss <[email protected]>--- Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 + 1 file changed, 1 insertion(+)
Applied, thanks
Signature · 1 line
Lee Jones [李琼斯]
PATCH v2 6/8 arm64: dts: qcom: Add PMI632 PMIC
In reply to Luca WeissThe PMI632, commonly found on SoCs with SDM632 has various standard functions like ADC, GPIOs, LPG and more.
--- arch/arm64/boot/dts/qcom/pmi632.dtsi | 165 +++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+)
arch/arm64/boot/dts/qcom/pmi632.dtsi new file +165 -0
@@ -0,0 +1,165 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (C) 2023 Luca Weiss <[email protected]> + */ + +#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"; + }; + }; +};
Signature · 1 line
2.40.0
Re: [PATCH v2 6/8] arm64: dts: qcom: Add PMI632 PMIC
Quoted 5 lines · 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 <[email protected]>---
Looks good!
Konrad
Quoted 175 lines
arch/arm64/boot/dts/qcom/pmi632.dtsi | 165 +++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+)arch/arm64/boot/dts/qcom/pmi632.dtsi new file +165
-0@@ -0,0 +1,165 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (C) 2023 Luca Weiss <[email protected]> + */ + +#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"; + }; + }; +};
PATCH v2 7/8 arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED
In reply to Luca WeissThe phone features a notification LED connected to the pmi632. Configure the RGB led found on it.
--- arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+)
arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts +29 -0
@@ -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>;
Signature · 1 line
2.40.0
Re: [PATCH v2 7/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED
Quoted 5 lines · Luca Weiss
The phone features a notification LED connected to the pmi632. Configure the RGB led found on it.
Signed-off-by Luca Weiss <[email protected]>---
Konrad
Quoted 53 lines
arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+)arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts +29
-0@@ -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>;
PATCH v2 8/8 Documentation: leds: Add "rgb:status" path
In reply to Luca WeissThe path /sys/class/leds/rgb:status is already widely used with the qcom-lpg driver and others. Document it.
--- Documentation/leds/well-known-leds.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/leds/well-known-leds.txt +1 -0
@@ -58,6 +58,7 @@ LEDs on notebook body, indicating that sound input / output is muted. * System notification +Good: "rgb:status" Legacy: "status-led:{red,green,blue}" (Motorola Droid 4) Legacy: "lp5523:{r,g,b}" (Nokia N900)
Signature · 1 line
2.40.0
Lee Jones
maintainerRe: [PATCH v2 8/8] Documentation: leds: Add "rgb:status" path
Quoted 2 lines · Luca Weiss
The path /sys/class/leds/rgb:status is already widely used with the qcom-lpg driver and others. Document it.
Where is this used?
$ grep status drivers/leds/rgb/leds-qcom-lpg.c <no results>
Quoted 21 lines
Signed-off-by Luca Weiss <[email protected]>--- Documentation/leds/well-known-leds.txt | 1 + 1 file changed, 1 insertion(+)Documentation/leds/well-known-leds.txt +1
-0@@ -58,6 +58,7 @@ LEDs on notebook body, indicating that sound input / output is muted. * System notification +Good: "rgb:status" Legacy: "status-led:{red,green,blue}" (Motorola Droid 4) Legacy: "lp5523:{r,g,b}" (Nokia N900)Signature · 2 lines
-- 2.40.0
Signature · 1 line
Lee Jones [李琼斯]
Re: [PATCH v2 8/8] Documentation: leds: Add "rgb:status" path
Quoted 8 lines · On Donnerstag, 27. April 2023 18:05:59 CEST Lee Jones wrote:
Quoted 2 lines · Luca Weiss
The path /sys/class/leds/rgb:status is already widely used with the qcom-lpg driver and others. Document it.
Where is this used?
$ grep status drivers/leds/rgb/leds-qcom-lpg.c <no results>
This is set in devicetree, e.g. from qcom-msm8974pro-fairphone-fp2.dts[0]:
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STATUS;And then something in the LED core sets the name based on that, I'd have to dig to find where exactly.
Regards
Luca
Quoted 20 lines
Quoted 20 lines
Signed-off-by Luca Weiss <[email protected]>---
Documentation/leds/well-known-leds.txt | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/Documentation/leds/well-known-leds.txtindex2160382c86be..439d4dac4472100644Documentation/leds/well-known-leds.txt +0
-0@@ -58,6 +58,7 @@ LEDs on notebook body, indicating that sound input /output is muted.>
* System notification+Good: "rgb:status"
Legacy: "status-led:{red,green,blue}" (Motorola Droid 4)
Legacy: "lp5523:{r,g,b}" (Nokia N900)
Quoted 4 lines · Luca Weiss
Add support for the PMI632 PMIC in the spmi-gpio & qcom-lpg driver, add the dtsi for the PMIC and enable the notification LED on fairphone-fp3.
Signed-off-by Luca Weiss <[email protected]>
(...)
Quoted 3 lines
Luca Weiss (8):
dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632
pinctrl: qcom: spmi-gpio: Add PMI632 support
Patches 1 & 2 are finished so I applied them to the pinctrl tree so Luca does not need to keep reiterating these for the next kernel cycle.
Yours,
Linus Walleij
Lee Jones
maintainerQuoted 23 lines · Luca Weiss
Add support for the PMI632 PMIC in the spmi-gpio & qcom-lpg driver, add the dtsi for the PMIC and enable the notification LED on fairphone-fp3.
Signed-off-by Luca Weiss <[email protected]>---
Changes in v2:
- Add qcom,pmi632-gpio to all the needed places in yaml
- Add patch documenting led path
- Pick up tags
- Drop vadc pre-scaling patch since it was applied
- Link to v1: https://lore.kernel.org/r/[email protected]---
Luca Weiss (8):
dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632
pinctrl: qcom: spmi-gpio: Add PMI632 support
dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block
leds: qcom-lpg: Add support for PMI632 LPG
dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible
arm64: dts: qcom: Add PMI632 PMIC
arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED
Documentation: leds: Add "rgb:status" path
Quoted 9 lines
.../devicetree/bindings/leds/leds-qcom-lpg.yaml | 1 + .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 + .../bindings/pinctrl/qcom,pmic-gpio.yaml | 3 + Documentation/leds/well-known-leds.txt | 1 + arch/arm64/boot/dts/qcom/pmi632.dtsi | 165 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 29 ++++ drivers/leds/rgb/leds-qcom-lpg.c | 15 ++ drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + 8 files changed, 216 insertions(+)
Please rebase anything that is yet to be applied and submit a [RESEND].
Thank you.
Quoted 7 lines
---
base-commit:3f49aa65798675341eb9d4f947c40558564b2e6d
change-id: 20230414-pmi632-4ae03225ae75Best regards,
Signature · 1 line
Luca Weiss <[email protected]>
Signature · 1 line
Lee Jones [李琼斯]