public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan@gerhold.net>
To: Dang Huynh <danct12@riseup.net>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Robert Marko <robimarko@gmail.com>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC
Date: Mon, 6 Nov 2023 18:21:53 +0100	[thread overview]
Message-ID: <ZUkgsW4pyojMBtD9@gerhold.net> (raw)
In-Reply-To: <20231106-pm8937-v1-7-ec51d9eeec53@riseup.net>

On Mon, Nov 06, 2023 at 07:08:35PM +0700, Dang Huynh wrote:
> The PM8937 features integrated peripherals like ADC, GPIO controller,
> MPPs, PON keys and others.
> 
> Add the device tree so that any boards with this PMIC can use it.
> 
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>  arch/arm64/boot/dts/qcom/pm8937.dtsi | 202 +++++++++++++++++++++++++++++++++++
>  1 file changed, 202 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm8937.dtsi b/arch/arm64/boot/dts/qcom/pm8937.dtsi
> new file mode 100644
> index 000000000000..6091d6938885
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/pm8937.dtsi
> @@ -0,0 +1,202 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
> + */
> +
> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
> +#include <dt-bindings/spmi/spmi.h>
> +
> [...]
> +&spmi_bus {
> +	pmic@0 {
> +		compatible = "qcom,pm8937", "qcom,spmi-pmic";
> +		reg = <0x0 SPMI_USID>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		pon@800 {
> +			compatible = "qcom,pm8916-pon";
> +			reg = <0x800>;
> +			mode-bootloader = <0x2>;
> +			mode-recovery = <0x1>;
> +
> +			pm8937_pwrkey: pwrkey {
> +				compatible = "qcom,pm8941-pwrkey";
> +				interrupts = <0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
> +				debounce = <15625>;
> +				bias-pull-up;
> +				linux,code = <KEY_POWER>;
> +			};
> +
> +			pm8937_resin: resin {
> +				compatible = "qcom,pm8941-resin";
> +				interrupts = <0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
> +				debounce = <15625>;
> +				bias-pull-up;
> +				linux,code = <KEY_VOLUMEDOWN>;

Please move the linux,code into the board-specific part and make this
status = "disabled" by default, like in the other PMIC dtsi files.

One could theoretically assign any other function to this key. Also,
some devices don't have this hooked up at all.

Thanks,
Stephan

  parent reply	other threads:[~2023-11-06 17:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
2023-11-06 12:08 ` [PATCH 1/8] mfd: qcom-spmi-pmic: Add support for PM8937 Dang Huynh
2023-11-06 13:55   ` Caleb Connolly
2023-11-06 12:08 ` [PATCH 2/8] dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC Dang Huynh
2023-11-06 13:11   ` Krzysztof Kozlowski
2023-11-06 12:08 ` [PATCH 3/8] regulator: qcom_spmi: Add PM8937 SPMI regulator Dang Huynh
2023-11-06 12:35   ` Dmitry Baryshkov
2023-11-06 12:08 ` [PATCH 4/8] dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC Dang Huynh
2023-11-06 13:12   ` Krzysztof Kozlowski
2023-11-06 12:08 ` [PATCH 5/8] regulator: qcom_smd: Add PM8937 regulators Dang Huynh
2023-11-06 12:15   ` Dmitry Baryshkov
2023-11-06 19:32     ` Stephan Gerhold
2023-11-06 12:08 ` [PATCH 6/8] dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC Dang Huynh
2023-11-06 13:13   ` Krzysztof Kozlowski
2023-11-06 12:08 ` [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC Dang Huynh
2023-11-06 12:20   ` Dmitry Baryshkov
2023-11-06 17:21   ` Stephan Gerhold [this message]
2023-11-07 21:29   ` Konrad Dybcio
2023-11-06 12:08 ` [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC Dang Huynh
2023-11-07 21:30   ` Konrad Dybcio
2023-11-08  5:38     ` Dang Huynh
2023-11-09 15:22     ` Bjorn Andersson
2023-11-06 12:16 ` [PATCH 0/8] Add PM8937 PMIC support Dmitry Baryshkov
2023-11-13 19:40 ` (subset) " Mark Brown

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=ZUkgsW4pyojMBtD9@gerhold.net \
    --to=stephan@gerhold.net \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=danct12@riseup.net \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robimarko@gmail.com \
    --cc=sboyd@kernel.org \
    /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