public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, agross@kernel.org,
	krzysztof.kozlowski@linaro.org, patches@linaro.org,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 03/10] arm64: dts: qcom: Add a device tree for PMK8350 on SID6
Date: Wed, 9 Nov 2022 21:52:19 -0600	[thread overview]
Message-ID: <20221110035219.3ohl2637fou6427t@builder.lan> (raw)
In-Reply-To: <20221109111236.46003-4-konrad.dybcio@linaro.org>

On Wed, Nov 09, 2022 at 12:12:28PM +0100, Konrad Dybcio wrote:
> PMK8350 is shipped on SID6 with some SoCs, for example with SM6375.
> Add a DT with the SID changed to allow it to work.
> 
> Unfortunately, the entire DT needs to be copied even if the diff is
> very little, as the node names are not unique. Including pm6125 and
> pmk8350 together for example, would make pmk8350 overwrite the pm6125
> node, as both are defined as 'pmic@0'.
> 

This seems to work in this case, but we have the same situation in other
places where the labels just don't add up with the schematics.

That's why I ended up just defining all the pmics in sc8280xp-pmics.dtsi
and then the separate set in sa8295p-adp.dts.

Regards,
Bjorn

> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/pmk8350_sid6.dtsi | 73 ++++++++++++++++++++++
>  1 file changed, 73 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/pmk8350_sid6.dtsi
> 
> diff --git a/arch/arm64/boot/dts/qcom/pmk8350_sid6.dtsi b/arch/arm64/boot/dts/qcom/pmk8350_sid6.dtsi
> new file mode 100644
> index 000000000000..00390f8b9c97
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/pmk8350_sid6.dtsi
> @@ -0,0 +1,73 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2022, Linaro Limited
> + */
> +
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/spmi/spmi.h>
> +
> +&spmi_bus {
> +	pmk8350: pmic@6 {
> +		compatible = "qcom,pmk8350", "qcom,spmi-pmic";
> +		reg = <0x6 SPMI_USID>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		pmk8350_pon: pon@1300 {
> +			compatible = "qcom,pm8998-pon";
> +			reg = <0x1300>;
> +
> +			pon_pwrkey: pwrkey {
> +				compatible = "qcom,pmk8350-pwrkey";
> +				interrupts = <0x6 0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
> +				linux,code = <KEY_POWER>;
> +				status = "disabled";
> +			};
> +
> +			pon_resin: resin {
> +				compatible = "qcom,pmk8350-resin";
> +				interrupts = <0x6 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
> +				status = "disabled";
> +			};
> +		};
> +
> +		pmk8350_vadc: adc@3100 {
> +			compatible = "qcom,spmi-adc7";
> +			reg = <0x3100>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			interrupts = <0x6 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
> +			#io-channel-cells = <1>;
> +		};
> +
> +		pmk8350_adc_tm: adc-tm@3400 {
> +			compatible = "qcom,adc-tm7";
> +			reg = <0x3400>;
> +			interrupts = <0x6 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			#thermal-sensor-cells = <1>;
> +			status = "disabled";
> +		};
> +
> +		pmk8350_rtc: rtc@6100 {
> +			compatible = "qcom,pmk8350-rtc";
> +			reg = <0x6100>, <0x6200>;
> +			reg-names = "rtc", "alarm";
> +			interrupts = <0x6 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
> +			status = "disabled";
> +		};
> +
> +		pmk8350_gpios: gpio@b000 {
> +			compatible = "qcom,pmk8350-gpio", "qcom,spmi-gpio";
> +			reg = <0xb000>;
> +			gpio-controller;
> +			gpio-ranges = <&pmk8350_gpios 0 0 4>;
> +			#gpio-cells = <2>;
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +		};
> +	};
> +};
> -- 
> 2.38.1
> 

  reply	other threads:[~2022-11-10  3:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221109111236.46003-1-konrad.dybcio@linaro.org>
2022-11-09 11:12 ` [PATCH 01/10] dt-bindings: arm-smmu: Allow up to 3 power-domains Konrad Dybcio
2022-11-09 21:09   ` Rob Herring
2022-11-11 15:02   ` Krzysztof Kozlowski
2022-11-09 11:12 ` [PATCH 02/10] dt-bindings: dmaengine: qcom: gpi: add compatible for SM6375 Konrad Dybcio
2022-11-11 15:01   ` Krzysztof Kozlowski
2022-11-13 22:25   ` Vinod Koul
2022-11-09 11:12 ` [PATCH 03/10] arm64: dts: qcom: Add a device tree for PMK8350 on SID6 Konrad Dybcio
2022-11-10  3:52   ` Bjorn Andersson [this message]
2022-11-10  9:12   ` Dmitry Baryshkov
2022-11-10 12:07     ` Konrad Dybcio
2022-11-11 20:37     ` Bjorn Andersson
2022-11-09 11:12 ` [PATCH 04/10] arm64: dts: qcom: sm6375: Add GPI DMA nodes Konrad Dybcio
2022-11-09 11:12 ` [PATCH 05/10] arm64: dts: qcom: sm6375: Add pin configs for some QUP configurations Konrad Dybcio
2022-11-11 15:04   ` Krzysztof Kozlowski
2022-11-09 11:12 ` [PATCH 06/10] arm64: dts: qcom: sm6375: Add QUPs and corresponding SPI/I2C hosts Konrad Dybcio
2022-11-09 11:12 ` [PATCH 07/10] arm64: dts: qcom: sm6375-pdx225: Enable QUPs & GPI DMA Konrad Dybcio
2022-11-09 11:12 ` [PATCH 08/10] arm64: dts: qcom: sm6375-pdx225: Add PMIC peripherals Konrad Dybcio
2022-11-09 11:12 ` [PATCH 09/10] arm64: dts: qcom: sm6375-pdx225: Configure SMD RPM regulators Konrad Dybcio
2022-11-09 11:12 ` [PATCH 10/10] arm64: dts: qcom: sm6375-pdx225: Configure Samsung touchscreen Konrad Dybcio

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=20221110035219.3ohl2637fou6427t@builder.lan \
    --to=andersson@kernel.org \
    --cc=agross@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=robh+dt@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