linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Luca Weiss <luca@z3ntu.xyz>,
	~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Stephen Boyd <sboyd@kernel.org>, Jonathan Corbet <corbet@lwn.net>
Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-leds@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 6/8] arm64: dts: qcom: Add PMI632 PMIC
Date: Wed, 19 Apr 2023 12:27:47 +0200	[thread overview]
Message-ID: <deabba9d-5f6c-06c0-22d0-9bebeef3ad15@linaro.org> (raw)
In-Reply-To: <20230414-pmi632-v2-6-98bafa909c36@z3ntu.xyz>



On 18.04.2023 18:43, Luca Weiss wrote:
> 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>
> ---
Looks good!

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  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";
> +		};
> +	};
> +};
> 

  reply	other threads:[~2023-04-19 10:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 16:43 [PATCH v2 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
2023-04-18 16:43 ` [PATCH v2 1/8] dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632 Luca Weiss
2023-04-19 18:06   ` Krzysztof Kozlowski
2023-04-18 16:43 ` [PATCH v2 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support Luca Weiss
2023-04-20 10:12   ` Dmitry Baryshkov
2023-04-18 16:43 ` [PATCH v2 3/8] dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block Luca Weiss
2023-04-27 15:27   ` Lee Jones
2023-04-18 16:43 ` [PATCH v2 4/8] leds: qcom-lpg: Add support for PMI632 LPG Luca Weiss
2023-04-27 15:27   ` Lee Jones
2023-04-18 16:43 ` [PATCH v2 5/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible Luca Weiss
2023-04-27 15:28   ` Lee Jones
2023-04-18 16:43 ` [PATCH v2 6/8] arm64: dts: qcom: Add PMI632 PMIC Luca Weiss
2023-04-19 10:27   ` Konrad Dybcio [this message]
2023-04-18 16:43 ` [PATCH v2 7/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED Luca Weiss
2023-04-19 10:28   ` Konrad Dybcio
2023-04-18 16:43 ` [PATCH v2 8/8] Documentation: leds: Add "rgb:status" path Luca Weiss
2023-04-27 16:05   ` Lee Jones
2023-04-27 17:50     ` Luca Weiss
2023-04-21  8:29 ` [PATCH v2 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Linus Walleij
2023-05-15 12:17 ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=deabba9d-5f6c-06c0-22d0-9bebeef3ad15@linaro.org \
    --to=konrad.dybcio@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=luca@z3ntu.xyz \
    --cc=pavel@ucw.cz \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).