All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matti Lehtimäki" <matti.lehtimaki@gmail.com>
To: linux-arm-msm@vger.kernel.org
Cc: ~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org,
	"Matti Lehtimäki" <matti.lehtimaki@gmail.com>,
	"Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/6] ARM: dts: msm8226: Add tsens node and related nvmem cells
Date: Sun,  7 May 2023 23:12:23 +0300	[thread overview]
Message-ID: <20230507201225.89694-6-matti.lehtimaki@gmail.com> (raw)
In-Reply-To: <20230507201225.89694-1-matti.lehtimaki@gmail.com>

Specify pre-parsed per-sensor calibration nvmem cells in the qfprom
device node rather than parsing the whole data blob in the driver.

Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
---
 arch/arm/boot/dts/qcom-msm8226.dtsi | 113 ++++++++++++++++++++++++++++
 1 file changed, 113 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index c34b8f3139ae..a0c3d25eea65 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -500,6 +500,34 @@ data-pins {
 			};
 		};
 
+		tsens: thermal-sensor@fc4a9000 {
+			compatible = "qcom,msm8226-tsens", "qcom,tsens-v0_1";
+			reg = <0xfc4a9000 0x1000>, /* TM */
+			      <0xfc4a8000 0x1000>; /* SROT */
+			nvmem-cells = <&tsens_mode>,
+				      <&tsens_base1>, <&tsens_base2>,
+				      <&tsens_s0_p1>, <&tsens_s0_p2>,
+				      <&tsens_s1_p1>, <&tsens_s1_p2>,
+				      <&tsens_s2_p1>, <&tsens_s2_p2>,
+				      <&tsens_s3_p1>, <&tsens_s3_p2>,
+				      <&tsens_s4_p1>, <&tsens_s4_p2>,
+				      <&tsens_s5_p1>, <&tsens_s5_p2>,
+				      <&tsens_s6_p1>, <&tsens_s6_p2>;
+			nvmem-cell-names = "mode",
+					   "base1", "base2",
+					   "s0_p1", "s0_p2",
+					   "s1_p1", "s1_p2",
+					   "s2_p1", "s2_p2",
+					   "s3_p1", "s3_p2",
+					   "s4_p1", "s4_p2",
+					   "s5_p1", "s5_p2",
+					   "s6_p1", "s6_p2";
+			#qcom,sensors = <6>;
+			interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "uplow";
+			#thermal-sensor-cells = <1>;
+		};
+
 		restart@fc4ab000 {
 			compatible = "qcom,pshold";
 			reg = <0xfc4ab000 0x4>;
@@ -510,6 +538,91 @@ qfprom: qfprom@fc4bc000 {
 			reg = <0xfc4bc000 0x1000>;
 			#address-cells = <1>;
 			#size-cells = <1>;
+
+			tsens_base1: base1@1c1 {
+				reg = <0x1c1 0x2>;
+				bits = <5 8>;
+			};
+
+			tsens_s0_p1: s0-p1@1c2 {
+				reg = <0x1c2 0x2>;
+				bits = <5 6>;
+			};
+
+			tsens_s1_p1: s1-p1@1c4 {
+				reg = <0x1c4 0x1>;
+				bits = <0 6>;
+			};
+
+			tsens_s2_p1: s2-p1@1c4 {
+				reg = <0x1c4 0x2>;
+				bits = <6 6>;
+			};
+
+			tsens_s3_p1: s3-p1@1c5 {
+				reg = <0x1c5 0x2>;
+				bits = <4 6>;
+			};
+
+			tsens_s4_p1: s4-p1@1c6 {
+				reg = <0x1c6 0x1>;
+				bits = <2 6>;
+			};
+
+			tsens_s5_p1: s5-p1@1c7 {
+				reg = <0x1c7 0x1>;
+				bits = <0 6>;
+			};
+
+			tsens_s6_p1: s6-p1@1ca {
+				reg = <0x1ca 0x2>;
+				bits = <4 6>;
+			};
+
+			tsens_base2: base2@1cc {
+				reg = <0x1cc 0x1>;
+				bits = <0 8>;
+			};
+
+			tsens_s0_p2: s0-p2@1cd {
+				reg = <0x1cd 0x1>;
+				bits = <0 6>;
+			};
+
+			tsens_s1_p2: s1-p2@1cd {
+				reg = <0x1cd 0x2>;
+				bits = <6 6>;
+			};
+
+			tsens_s2_p2: s2-p2@1ce {
+				reg = <0x1ce 0x2>;
+				bits = <4 6>;
+			};
+
+			tsens_s3_p2: s3-p2@1cf {
+				reg = <0x1cf 0x1>;
+				bits = <2 6>;
+			};
+
+			tsens_s4_p2: s4-p2@446 {
+				reg = <0x446 0x2>;
+				bits = <4 6>;
+			};
+
+			tsens_s5_p2: s5-p2@447 {
+				reg = <0x447 0x1>;
+				bits = <2 6>;
+			};
+
+			tsens_s6_p2: s6-p2@44e {
+				reg = <0x44e 0x1>;
+				bits = <1 6>;
+			};
+
+			tsens_mode: mode@44f {
+				reg = <0x44f 0x1>;
+				bits = <5 3>;
+			};
 		};
 
 		spmi_bus: spmi@fc4cf000 {
-- 
2.34.1


  parent reply	other threads:[~2023-05-07 20:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-07 20:12 [PATCH 0/6] Enable MSM8226 TSENS support Matti Lehtimäki
2023-05-07 20:12 ` [PATCH 1/6] dt-bindings: nvmem: qfprom: Add compatible for MSM8226 Matti Lehtimäki
2023-05-07 20:19   ` Luca Weiss
2023-05-07 21:25   ` Rob Herring
2023-05-08  9:04     ` Konrad Dybcio
2023-05-10 13:57   ` Krzysztof Kozlowski
2023-07-13 10:11   ` Srinivas Kandagatla
2023-05-07 20:12 ` [PATCH 2/6] dt-bindings: thermal: tsens: " Matti Lehtimäki
2023-05-07 20:22   ` Luca Weiss
2023-05-07 21:25   ` Rob Herring
2023-05-10 13:57   ` Krzysztof Kozlowski
2023-06-05 14:39   ` Daniel Lezcano
2023-05-07 20:12 ` [PATCH 3/6] thermal/drivers/qcom/tsens-v0_1: Add support " Matti Lehtimäki
2023-05-07 20:26   ` Luca Weiss
2023-05-07 20:40   ` Dmitry Baryshkov
2023-05-07 21:11     ` Matti Lehtimäki
2023-05-07 22:49       ` Dmitry Baryshkov
2023-06-05 14:39   ` Daniel Lezcano
2023-05-07 20:12 ` [PATCH 4/6] ARM: dts: msm8226: Add qfprom node Matti Lehtimäki
2023-05-07 20:27   ` Luca Weiss
2023-05-07 20:50   ` Dmitry Baryshkov
2023-05-10 13:58   ` Krzysztof Kozlowski
2023-05-10 14:14     ` Dmitry Baryshkov
2023-05-07 20:12 ` Matti Lehtimäki [this message]
2023-05-07 20:31   ` [PATCH 5/6] ARM: dts: msm8226: Add tsens node and related nvmem cells Luca Weiss
2023-05-07 20:41   ` Dmitry Baryshkov
2023-05-07 20:12 ` [PATCH 6/6] ARM: dts: msm8226: Add thermal zones node Matti Lehtimäki
2023-05-07 20:48   ` Dmitry Baryshkov
2023-06-13 23:48 ` (subset) [PATCH 0/6] Enable MSM8226 TSENS support Bjorn Andersson

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=20230507201225.89694-6-matti.lehtimaki@gmail.com \
    --to=matti.lehtimaki@gmail.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.