Message ID | 20230507201225.89694-1-matti.lehtimaki@gmail.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1743212vqo; Sun, 7 May 2023 13:20:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ77W75w8jchJ0RIYNQk51shV+2gi6LIaiX4Vd4Nq2Gpt2dhUsuyGjRzEng37zuzZi6TAz3z X-Received: by 2002:a17:90a:31c6:b0:24d:ec21:b83c with SMTP id j6-20020a17090a31c600b0024dec21b83cmr7845185pjf.16.1683490855009; Sun, 07 May 2023 13:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683490854; cv=none; d=google.com; s=arc-20160816; b=xPQ+jw94b63kxk75Ojsf1aX5U5nY+xnRYTn42NhJE4stVylL6KeCwwxuFGbMoYYGUN 9uVm6j3Hl/bZzSSQBLH8/wEMyYpjuXiBEq8/5x1SLbqzcfKJlO52sbkxXCt7MWt4Teu+ wRDZ25fecjvk5PXiONXHzhxRKChIam0Z7XXsWp2vbaKU5UKBXCSFLmxx3AfzBEACzC3l XmbAeDoX9MZbQ5mvzSusQNuxDGga/WLucga4FNebyZnsLvI6HrApAiqVrUilkL1jVih5 HYTYEDYtbxlMp0eV6q+hcjVlIG/fDT29/iRJbD7aeJJ7/B8Lw7e4PZwNIorbN9QUes/b v/KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZkTrjWn9MXIx9ar7sdUfBpNB62vFCZeO4ohEw8FEUIo=; b=o4nFGSRi+CHKqBQHgcnB1GK/mdPDJfEmdJVTi4+WXC3V4Z+m0HXZlxDRSq0WOkHcmx r+575ya7hFKXwuPiTFRQynwaDGaT1w1JWwRiYPQ9UcYas2KueZ3k1hfzge/8+UTEFU7w j1ksAlZVMtKE5E0GIq71erw3WxmavD1RBRRIMBBDRJcXzBkO7mT9wK+hfZlqkzb7K5sb 77SesDZJ+IDdb9I/AsJ8Z8M5iQaZRAb9idYsxPttRGIiBlftTeX1M305vFjXXFLPZYod +E4a44gKAg5BfJuz+coVIWEfLsKIYp4i1Enr/+0484M654oVE/ncNUfupjL16JpaIIu8 OQNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=VdixB5Nj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t24-20020a17090a449800b00230a8355ff1si10802456pjg.181.2023.05.07.13.20.31; Sun, 07 May 2023 13:20:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=VdixB5Nj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231738AbjEGUMo (ORCPT <rfc822;baris.duru.linux@gmail.com> + 99 others); Sun, 7 May 2023 16:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231654AbjEGUMn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 7 May 2023 16:12:43 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFD9A269E; Sun, 7 May 2023 13:12:41 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2ac89e6a5a1so30151711fa.0; Sun, 07 May 2023 13:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683490361; x=1686082361; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZkTrjWn9MXIx9ar7sdUfBpNB62vFCZeO4ohEw8FEUIo=; b=VdixB5NjZcMvRHt8b1EKbYy8A/KU5sq5dWqBZLGQVLGcq751KXhSInQRhGRPNGy3DV nPlinNKv6AdF5FV4ecOTfUlwQdgO2CLTD21rtkRdPyZpr7cedoJsDJT6Cj4TGNvTjizm N2rUkMWqurGp2u7mpazlcLYHsBwDK02vFctv+trdUjqSXbyZbbnulNbd1ekFN1qoNBAO 0z2A0b/te1uVJctzUQTvZyEBiGL4WEsQsFWK1A6q5oWGPyt7sPBrLyYvXpXZcqd/jjfD JyUrVLrcIwQ2D1RxbeKgyUrukWH9h5NRxfh5un5DL5rQsHyKnPzdFCW2b+TPEcTLfdeM a89g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683490361; x=1686082361; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZkTrjWn9MXIx9ar7sdUfBpNB62vFCZeO4ohEw8FEUIo=; b=FUZHQoY89EmvfMkHlVuXnuerKilwrX1BAB7dL5RgHnkx9/+uTOgsGfglTgLgFzA8vJ Hp/N4Mt2tPukfqFINqjhEHdoub6puRlnzJYZbY2F2rLucqZVDqTW+thxEqjhmc+fL6yU iBMsJqPFX/e/caPIEOOLlaxaZErHDsb8u9CnPe179oFBmSuPEg2phqiU6XVr9jiWDGjh voYuEt/+GxGMcNrdLEj1ywP3OqNdJkm+eDGYUDM9HBqARWlHCDN5pv9rEhZ49ToVHWjV K9kpIRRhfoxSnVH9SR7VWVaNuDxLHI4bo1fBsCRN2RNOHu+AYH3z9qSFpzAeF8zrAJIb bolw== X-Gm-Message-State: AC+VfDw2fIBK9K5kobmsSjri4Q3SecGZeykHGyjHaC5O+zVf7ggdgruQ KZVxSN5Dx44X7/UjegxWUkoktPDhbDk= X-Received: by 2002:a05:651c:1044:b0:2a8:c858:fb9 with SMTP id x4-20020a05651c104400b002a8c8580fb9mr2289679ljm.29.1683490361330; Sun, 07 May 2023 13:12:41 -0700 (PDT) Received: from i-vetokaappi.home.lan (dsl-hkibng42-56733b-36.dhcp.inet.fi. [86.115.59.36]) by smtp.gmail.com with ESMTPSA id m19-20020a2e9113000000b00293d7c95df1sm918031ljg.78.2023.05.07.13.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 13:12:40 -0700 (PDT) From: =?utf-8?q?Matti_Lehtim=C3=A4ki?= <matti.lehtimaki@gmail.com> To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, =?utf-8?q?Matti_Lehtim=C3=A4ki?= <matti.lehtimaki@gmail.com>, Amit Kucheria <amitk@kernel.org>, devicetree@vger.kernel.org, Konrad Dybcio <konrad.dybcio@linaro.org>, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Zhang Rui <rui.zhang@intel.com> Subject: [PATCH 0/6] Enable MSM8226 TSENS support Date: Sun, 7 May 2023 23:12:18 +0300 Message-Id: <20230507201225.89694-1-matti.lehtimaki@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765268107111951198?= X-GMAIL-MSGID: =?utf-8?q?1765268107111951198?= |
Series |
Enable MSM8226 TSENS support
|
|
Message
Matti Lehtimäki
May 7, 2023, 8:12 p.m. UTC
Add support for tsens in MSM8226. Add qfprom compatible for MSM8226. Add device tree nodes for qfprom, tsens and thermal zones for MSM8226. Matti Lehtimäki (6): dt-bindings: nvmem: qfprom: Add compatible for MSM8226 dt-bindings: thermal: tsens: Add compatible for MSM8226 thermal/drivers/qcom/tsens-v0_1: Add support for MSM8226 ARM: dts: msm8226: Add qfprom node ARM: dts: msm8226: Add tsens node and related nvmem cells ARM: dts: msm8226: Add thermal zones node .../bindings/nvmem/qcom,qfprom.yaml | 1 + .../bindings/thermal/qcom-tsens.yaml | 1 + arch/arm/boot/dts/qcom-msm8226.dtsi | 164 ++++++++++++++++++ drivers/thermal/qcom/tsens-v0_1.c | 27 ++- drivers/thermal/qcom/tsens.c | 3 + drivers/thermal/qcom/tsens.h | 2 +- 6 files changed, 196 insertions(+), 2 deletions(-)
Comments
On Sonntag, 7. Mai 2023 22:12:19 CEST Matti Lehtimäki wrote: > Document QFPROM compatible for MSM8226. > > Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> Reviewed-by: Luca Weiss <luca@z3ntu.xyz> > --- > Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml index > 2173fe82317d..0baf7819ab46 100644 > --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > @@ -20,6 +20,7 @@ properties: > - qcom,apq8084-qfprom > - qcom,ipq8064-qfprom > - qcom,ipq8074-qfprom > + - qcom,msm8226-qfprom > - qcom,msm8916-qfprom > - qcom,msm8974-qfprom > - qcom,msm8976-qfprom
On Sonntag, 7. Mai 2023 22:12:22 CEST Matti Lehtimäki wrote: > Add missing QFPROM definition for MSM8226 SoC. > > Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> Reviewed-by: Luca Weiss <luca@z3ntu.xyz> > --- > arch/arm/boot/dts/qcom-msm8226.dtsi | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi > b/arch/arm/boot/dts/qcom-msm8226.dtsi index c373081bc21b..c34b8f3139ae > 100644 > --- a/arch/arm/boot/dts/qcom-msm8226.dtsi > +++ b/arch/arm/boot/dts/qcom-msm8226.dtsi > @@ -505,6 +505,13 @@ restart@fc4ab000 { > reg = <0xfc4ab000 0x4>; > }; > > + qfprom: qfprom@fc4bc000 { > + compatible = "qcom,msm8226-qfprom", "qcom,qfprom"; > + reg = <0xfc4bc000 0x1000>; > + #address-cells = <1>; > + #size-cells = <1>; > + }; > + > spmi_bus: spmi@fc4cf000 { > compatible = "qcom,spmi-pmic-arb"; > reg-names = "core", "intr", "cnfg";
On Sonntag, 7. Mai 2023 22:12:23 CEST Matti Lehtimäki wrote: > Specify pre-parsed per-sensor calibration nvmem cells in the qfprom > device node rather than parsing the whole data blob in the driver. I haven't double checked all the qfprom offsets but since you verified it twice on your side, I believe you ;) Reviewed-by: Luca Weiss <luca@z3ntu.xyz> > > 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 {
On Sun, 7 May 2023 23:12:18 +0300, Matti Lehtimäki wrote: > Add support for tsens in MSM8226. Add qfprom compatible for MSM8226. > Add device tree nodes for qfprom, tsens and thermal zones for MSM8226. > > Matti Lehtimäki (6): > dt-bindings: nvmem: qfprom: Add compatible for MSM8226 > dt-bindings: thermal: tsens: Add compatible for MSM8226 > thermal/drivers/qcom/tsens-v0_1: Add support for MSM8226 > ARM: dts: msm8226: Add qfprom node > ARM: dts: msm8226: Add tsens node and related nvmem cells > ARM: dts: msm8226: Add thermal zones node > > [...] Applied, thanks! [4/6] ARM: dts: msm8226: Add qfprom node commit: 16a9fa7ab27b69be3a34b97ff8c7b034fcc73b88 [5/6] ARM: dts: msm8226: Add tsens node and related nvmem cells commit: 0f8861c9fc7cc9af6d6f65d6657aa9cf2531b29c [6/6] ARM: dts: msm8226: Add thermal zones node commit: 8d4236f62f3acbc6a0def79106c13fe7344d8238 Best regards,