mbox series

[v2,0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3

Message ID 20230414-pmi632-v2-0-98bafa909c36@z3ntu.xyz
Headers show
Series Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 | expand

Message

Luca Weiss April 18, 2023, 4:43 p.m. UTC
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 <luca@z3ntu.xyz>
---
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/20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz

---
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,

Comments

Konrad Dybcio April 19, 2023, 10:28 a.m. UTC | #1
On 18.04.2023 18:43, 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>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  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>;
>
Lee Jones May 15, 2023, 12:17 p.m. UTC | #2
On Tue, 18 Apr 2023, Luca Weiss wrote:

> 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 <luca@z3ntu.xyz>
> ---
> 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/20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz
> 
> ---
> 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(+)

Please rebase anything that is yet to be applied and submit a [RESEND].

Thank you.

> ---
> base-commit: 3f49aa65798675341eb9d4f947c40558564b2e6d
> change-id: 20230414-pmi632-4ae03225ae75
> 
> Best regards,
> -- 
> Luca Weiss <luca@z3ntu.xyz>