From patchwork Sun Feb 11 04:41:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson via B4 Relay X-Patchwork-Id: 199369 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1772926dyd; Sat, 10 Feb 2024 20:38:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFvzer3aYRrGPqhNsjuVqKxesPnoY/VmjoS/ukjmRqKKs0OsdnIsIHPmP4g0vv8q4O8cPk X-Received: by 2002:a05:6402:5406:b0:561:3b53:d0af with SMTP id ev6-20020a056402540600b005613b53d0afmr4564260edb.12.1707626309254; Sat, 10 Feb 2024 20:38:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707626309; cv=pass; d=google.com; s=arc-20160816; b=z7Q8t6M1jU0uFvCYd8/sl/rprISGxY6y+FZU0O7orYoftHFXfhE4eRbcNOLzFvb/oN GYu+RLHothg95/OPcUwBktl5BwC4OT9nR/mXqpNifmZESjSl5JtWLy7KWq+5YpVZJZIF XWsh+mXPt+pS2rROwdjNO86DxMYz/48iy3xK6fM1Mws9fWm47sLNAmr4lWpA+QRvbDvS 0zyVeFQZaVDwLFDQoq8SlYbjiBDfABnEtCSgAeuqZT7YRcO8w0maBE1pmXVxDYswBOSO jWMu7vUbeiMyRTwPdaVQYFZuVKI1zSOyQbNxgU6qq4SF6F94AIRHumsE4kG2ZSeCMh/I EnFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=ZHF+fZ65X81EaRWIoOn5/qIQ74ku0Ixy/ZncuksO68E=; fh=vRrM8G59uZEGYMmGAq7k4m/PLQZRnrQluD0BWHdtSbg=; b=jJPuojnEDSPKHEpSUka0aaA27hEgbRxcpUnpPCdkjydG34KOV9QqrgZG/j5cOGqgm2 G27cs8wJ8RQfTevA5o1DlLhN68RXisbzDlJR45ctTp0ec9egnDvKQw7+iXMAsN34E4Ma shOeTawBfwMOYOz0uew6fHYXF5Uuqdg28BPueHkU4FBMkSq/a/EeWWZKxZR96OrRHBGZ q4vE6lCRmgcY1k8NPdnWMDLi2XO/o2QHGnuhjBUvy9w2eBdFC8NdTtgtJ+1czL0tRaSN c175KlRZuMtyRTumMjwJBvUDRlCqTyzbllS5Raop1B9jvWWjdW19XieyzPQZnrC2GFDT 013A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a9IqMTrV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-60635-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60635-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWSTYEk/fk9+k0LJ0NgfDOZB2QOLODCUjvzUD5MT9q8+CzgpnKDcLAd9R2HefIl4KsRkTpSHKizaDoqqZZywAKPlHKYhQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q27-20020a50cc9b000000b0056148f8cf9asi1476414edi.264.2024.02.10.20.38.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 20:38:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60635-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a9IqMTrV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-60635-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60635-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A16821F23EFF for ; Sun, 11 Feb 2024 04:38:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9116517757; Sun, 11 Feb 2024 04:37:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a9IqMTrV" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 598FC187F; Sun, 11 Feb 2024 04:37:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707626253; cv=none; b=Qrj5kg7xCFHMBLGcTeOZFRd6nIeXNXMHY5DqINhvSdu1zSxPPQoFqRFODe5Gb83lH5riM3PD9FOff4aOD1VtBMEqgM/FUWxwFflya2fs90D7GkKpndCLXRm4OTXbRy0b5p2RR057rW7IVN7iWASzEX4IASzVsmkln4e1KurTRFw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707626253; c=relaxed/simple; bh=3kdaHklZ7qs2X5runW2E7tzMn/ra6AmKvRJeohJIfKQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UNBULM8XfAPsHUOWKwb9F9+jwfBoWON2nI2ed+pjLFWNue35kU7OzPBtDI5mvrhgtGMOTn9l7eLq2O0UBynvDhM7DV9HPwwUPGFPEEGHAqYwoOKO56FakCNs97l79wXOVyMr1okTzv9GkylMT1+0HOxSrOvufWQCfqtk9Dgvu0M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a9IqMTrV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id C95EFC433C7; Sun, 11 Feb 2024 04:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707626252; bh=3kdaHklZ7qs2X5runW2E7tzMn/ra6AmKvRJeohJIfKQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=a9IqMTrVQpkEnNj+k45caj9xYcU+1e4kzPoJKuhxW0WeaD9FiVufxNjma6JelMBLc wo1jDW2CJasPvwp1d5x/WE0uzspilV5670XTzQOFpP8P0Dmxui5cvDKSuZqfd9mhdY efidrdaPgEkFfhchfdamf3jgrjAof3bT7yH/BDs2reLeIm7I2tHpzQ8DUqwqJeN4SN mdHcD5xI976MyPIT4Uql8o/ugEeXxdaVxHsczaKTuJkiWHBtVmoK6WK01iwfKE+9B1 VfKcw3UFhng00OlFEVPjklJEDYFRxyfdWeyEVW1Tsph52W9mdWcCtaU5sVYTvKBUqN AXGDRv5qhn4fg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A080AC4829A; Sun, 11 Feb 2024 04:37:32 +0000 (UTC) From: Bjorn Andersson via B4 Relay Date: Sat, 10 Feb 2024 20:41:59 -0800 Subject: [PATCH 1/2] arm64: dts: qcom: sc8280xp-crd: Add PMIC die-temp vadc channels Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240210-sc8280xp-pmic-thermal-v1-1-a1c215a17d10@quicinc.com> References: <20240210-sc8280xp-pmic-thermal-v1-0-a1c215a17d10@quicinc.com> In-Reply-To: <20240210-sc8280xp-pmic-thermal-v1-0-a1c215a17d10@quicinc.com> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=4497; i=quic_bjorande@quicinc.com; h=from:subject:message-id; bh=JE6dXqJeCJwTlMybhGWArcVWwFZnYe1FeEabXIeH8MU=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBlyFAX6WBiHumNqoBNjl4WQ1BZEzjukhy4hmA4A FbFN9C0UjmJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZchQFxUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcWMlw//dUSEEopXhApys7H1JJr+bphVigTOYenqWCVVrYR 3x+WUGFN8tp3O1FZQs0QSAOiGzG3k32BRZEhxzRMAvLULB6j3DjLkAHLp4NmAf1bZEJFmM7bRxz AWc7Jp56xniCY541Z0WLfqSn5G77BrS0xcohYYxv3zwaujV2HzPiFXDd8BkJu7DQQK5ThnJ0/cJ Y8uJwi4YOKNRTjVjYsbaIyS6XwO8KfK/dbAhcuU9us/mwH+jiFUY7O6QkbIpJVN697gwybVDNjf bXItqYDPwnI+oNfLmYhReAzoXJKAUoZGhw6BE1NNfukodgRq6zBRKL4bXl9rcTmFMfuY9gPLcK8 SdPIFwX0mBoT91yYjZ8pPXzONWgllv1Ay2nKjLPNXaXnEnHZAdqKKI+/7pKnGRi1382Afy2HiyN pkwdBCBOcThKjY9KcsFvJFdPbES3+A4/2c6w4aj4mAtHY1Lg4N0KZJMrNP+vN5yFqJE6PJDLJWJ zDA6vRPY5PasLgF853GaBoqW3ecT1j5XYQT/xWc02QJ7lLAWJIWOVWE7w14UeSrSPpxXwXsCEuL paHz6frEbSXFWlgpWpiW5cTl/T6IN5fTq1ioOu3vnFiBcOCGa9A12BN7BCGdbS9OpvBrWGobisx ecngBcsg0lpXbYMJi1o1OU8qpxHyPhhiPY9cJQqhX6u4= X-Developer-Key: i=quic_bjorande@quicinc.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Endpoint-Received: by B4 Relay for quic_bjorande@quicinc.com/default with auth_id=118 X-Original-From: Bjorn Andersson Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790575965202842919 X-GMAIL-MSGID: 1790575965202842919 From: Bjorn Andersson The die-temp vadc channels are not defined for the CRD, but describing them directly would directly duplicate the definition from the Lenovo Thinkpad X13s DeviceTree. The sc8280xp-pmics file describes the common configuration of PMK8280, two PMC8280, PMC8280C, and PMR735a. As such, even though these vadc channels makes references across PMICs, it's suitable to define them in the shared file. Do this, and enable the pmk8280 vadc for the CRD. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 +++ .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 35 +--------------------- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 34 +++++++++++++++++++++ 3 files changed, 39 insertions(+), 34 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index ffc4406422ae..22f10813aa3c 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -604,6 +604,10 @@ rtc_offset: rtc-offset@bc { }; }; +&pmk8280_vadc { + status = "okay"; +}; + &qup0 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index def3976bd5bb..ce2564a6c26e 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -6,10 +6,8 @@ /dts-v1/; -#include #include -#include -#include +#include #include #include #include @@ -855,25 +853,6 @@ rtc_offset: rtc-offset@bc { &pmk8280_vadc { status = "okay"; - channel@3 { - reg = ; - qcom,pre-scaling = <1 1>; - label = "pmk8350_die_temp"; - }; - - channel@44 { - reg = ; - qcom,hw-settle-time = <200>; - qcom,ratiometric; - label = "pmk8350_xo_therm"; - }; - - channel@103 { - reg = ; - qcom,pre-scaling = <1 1>; - label = "pmc8280_1_die_temp"; - }; - channel@144 { reg = ; qcom,hw-settle-time = <200>; @@ -902,12 +881,6 @@ channel@147 { label = "sys_therm4"; }; - channel@303 { - reg = ; - qcom,pre-scaling = <1 1>; - label = "pmc8280_2_die_temp"; - }; - channel@344 { reg = ; qcom,hw-settle-time = <200>; @@ -935,12 +908,6 @@ channel@347 { qcom,ratiometric; label = "sys_therm8"; }; - - channel@403 { - reg = ; - qcom,pre-scaling = <1 1>; - label = "pmr735a_die_temp"; - }; }; &qup0 { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index 80ee12ded4f4..58fea376f0e2 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -3,6 +3,9 @@ * Copyright (c) 2022, Linaro Limited */ +#include +#include +#include #include #include #include @@ -85,6 +88,37 @@ pmk8280_vadc: adc@3100 { #size-cells = <0>; #io-channel-cells = <1>; status = "disabled"; + + channel@3 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "pmk8350_die_temp"; + }; + + channel@44 { + reg = ; + qcom,hw-settle-time = <200>; + qcom,ratiometric; + label = "pmk8350_xo_therm"; + }; + + channel@103 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "pmc8280_1_die_temp"; + }; + + channel@303 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "pmc8280_2_die_temp"; + }; + + channel@403 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "pmr735a_die_temp"; + }; }; pmk8280_adc_tm: adc-tm@3400 { From patchwork Sun Feb 11 04:42:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson via B4 Relay X-Patchwork-Id: 199368 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1772903dyd; Sat, 10 Feb 2024 20:38:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxx9ibXkCsRhRJ2UjQOK3TGvG6vBDyZPp7SFjHKBlXPhgSpbZAT6x+ZggH21EaCROmm7Hi X-Received: by 2002:a17:902:d48b:b0:1d9:b5d8:854c with SMTP id c11-20020a170902d48b00b001d9b5d8854cmr4368031plg.58.1707626304733; Sat, 10 Feb 2024 20:38:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707626304; cv=pass; d=google.com; s=arc-20160816; b=LuWZqA7mXxwlKAfsJvssarNVsvTw5LdoJzESR9uBxdm6r01eM1UID40i6KDPTadBw1 uphJKjkDg0U9XErgR71DriT9iDiVWxvT4qvEC7uEvy753T1Cw3KC4B5mWTsfqCpghjoG 77rRDkT4FfOAB5skV15jL9ezczV2OX421qOji0n9G2vAtVY3wpViZLDAXDQ7J7qoUprV yj/hwWEtUQZL/jHYHBPDSVxm0VDehfaJGwGcePCJAE9/zSCb6umVAEKCwC+QNkDAzjK9 lyR8rvDDKAlap2EUM9bECH54jz0gYxMxsP0JvniKubHz14o3KhjOQEUpPLMUj86d42aU JmfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=OTdQELjteDS4VfNnEZ+2c0qnN2dl0K6VLCJL0mGzJdI=; fh=rbcyaHI1SZgWwlJb1/FeiAxlVrlU6BZYYHs+X0thQv8=; b=nZJrvWUMa5fkQkOtB9BVtOOYH0WG35HPjaFZlD5rsmkwo6qXhsPveHOeD7Ii3lLxwS Y7aL4xcRxMH+18we376l+1bHYbRcHcheUCDf3Ztj2JkEWugIwuFL3F6qjYZ0NPi5EMRx 3mZFIIvEgGNXMjsBLXxZeC6bkgc1GRtQP/sqkwk59Y619+YCmHqjtyd61xMTyiXcNo8H V1r5S69wNaEZsSUaICKFD+XE9SJZsTPZV5zTL6GX1GmTLI/Y6uHNUsrXkajzTi2PpRnE EjVadk/ZAcSeBhiD4OVg+p+ymcifO0nXnQzs3t/wa8WGJWRS9dTH5TrhNMk7Z92XghO5 WOaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pOnI5HGU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-60634-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60634-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCW4bxitfyi/XZS0hoYrQPpiwRpYYrwlSo3lWXYfbUrHNpFkLWfVin8Q+hzORtgXvxKeHpdoxOvKheFUNWBivEobpXixQg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j6-20020a170903028600b001d9c3294754si4335525plr.361.2024.02.10.20.38.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 20:38:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60634-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pOnI5HGU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-60634-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60634-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 81918284465 for ; Sun, 11 Feb 2024 04:38:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53F2C1774A; Sun, 11 Feb 2024 04:37:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pOnI5HGU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 598B817D5; Sun, 11 Feb 2024 04:37:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707626253; cv=none; b=csqDVk8ULuYZfSEZGAPng229arhgPOlOKrGj62b+vuGjiAoBC86mVhYCMmuTl/PyVcFtbrceqVfk7Bq299uQie3MSsKAelbZZF+VHGYKGz9wLdv0q7bezUTIux/7JlK2G/i5Gjgf9n9W8xzmTQcF2bxjA1RdqbKHk3ZINdFeQYc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707626253; c=relaxed/simple; bh=7Tgpfgy2gZK7gG0Vu57dji3vdBwL3zjCkXajRYIQiEc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Mx/Y8fPnULeXjYGulR4DtkxZCfV8VLrFG3wBrlNOYrh2Bh5Ds57opyn974Smvzz+w51tIb++b2wKFIK15FCD51hWjuqyKCe7vdmzlB3uejaQaePX+NFwavYV4M8JyV0kqZArxnNW/afUR1vUW4h/H330kGaflPkkolIc3AAO7MQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pOnI5HGU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id CE828C43394; Sun, 11 Feb 2024 04:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707626252; bh=7Tgpfgy2gZK7gG0Vu57dji3vdBwL3zjCkXajRYIQiEc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=pOnI5HGUNJoLJtuXDQKaPUAiwdcrwlWOMsba7NMOE560N96lOOB4oVSXhgoNiN+l5 WKi23x933LfRp/IRX+8urCfqBjcv7D6lmUpHAlDIfoUkKMrBDRrfkzLo3gEQ6d5TvY RW/wSRMb1h0RtvTKqMxZ3Ym48oOk15fFe5y7hJ20Vr3dduZmWJzehZHnrWyitrbJbU cvMsxrVUFNmfxGV/oTxYM/XsCxetaKihxufvNIePOugBRxMAS69dz8WhjNIlxlrODe OjiR8qmWNq8NfkYacnMuCygwWhWRlW6QngkeLMWTEejzistOmBkxwm1nl/irPKWEkZ hI4OOXnyODthQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB3CBC4829F; Sun, 11 Feb 2024 04:37:32 +0000 (UTC) From: Bjorn Andersson via B4 Relay Date: Sat, 10 Feb 2024 20:42:00 -0800 Subject: [PATCH 2/2] arm64: dts: qcom: sc8280xp-pmics: Define adc for temp-alarms Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240210-sc8280xp-pmic-thermal-v1-2-a1c215a17d10@quicinc.com> References: <20240210-sc8280xp-pmic-thermal-v1-0-a1c215a17d10@quicinc.com> In-Reply-To: <20240210-sc8280xp-pmic-thermal-v1-0-a1c215a17d10@quicinc.com> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2888; i=quic_bjorande@quicinc.com; h=from:subject:message-id; bh=K7rQywm19ZMJOEqTCjhdaKmYaGUNjH5+Bg7BEu/x3tU=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBlyFAXylL8zK5qj0ajAD7+jN8JFAwl72hjdDBAR evaltzZSm6JAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZchQFxUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcUwFhAAp6X19C1/915JgP6bSfzLi13eAGiI3IFxPXxGKP1 Cg91LS/4pyv0OygvGP8BrhXm9R5fNyMIxjbhRAjazIfkWdPriIGdMEUUTBco+2BFrB4vEGkiXH+ 98DDKC4UErvnb3c0rodDZkvycqsbMKhKeo/8y/GeisD58oMWSqMV8nCv0lifkO2tD2IYak7MOcZ SZH9xN1q6p2YSYi5kerWUWrgjf1Q7OjRtYavFmBWn9+nPnvItCRNd2GW8/H72WOvtEHKHgjYT60 1gTRNGZnk3L4sciH+5DRceJpD0GmA8uCJmWf2HPbc5KYai+ThNu2ieRcwGVMZ9rASSH7BOVkd9c VVkQCfHmq2aj7WtRcG4m9bRutSI9A7TyFIAEcJojJXP+E2esmq7xGRhnN7MjMnFEVVYc4C1G+5g +0naX0Myh24lJLzA7EcJK9D1BiW3Xwm1Hr7/UhFMccptwfZ2HJdZ9aFjcIeCM+HXlkSVsp8QCIh ZEQVCKJRrKdr3GKyhCmO3+3LlqJ1KkwWvTBZKIimsRrmI2hxIt9Qlk8aF9X+Kf4zc/YXQEsDJId 7ZjtCI9mWgcIlOxY0NsWr8bhv8/rZyJRnnKBtf3I03q68HWiMqgQD1DFPDt85Uzl26X762jHzik jmEe1WS8LdIxgSvxVL5YpBKbgdEtK8gcnsbTalMyWtMs= X-Developer-Key: i=quic_bjorande@quicinc.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Endpoint-Received: by B4 Relay for quic_bjorande@quicinc.com/default with auth_id=118 X-Original-From: Bjorn Andersson Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790575960251235513 X-GMAIL-MSGID: 1790575960251235513 From: Bjorn Andersson sc8280xp-pmics define the two thermal zones "pm8280-1-thermal" and "pm8280-2-thermal", but the related temp-alarm instances are not tied to any adc channels, and as such continuously report the bogus temperature of 37C. After previously defining these adc channels across all boards using sc8280xp-pmics.dtsi, we can now add these references. This does however mean that we have a non-disabled node referencing default-disabled nodes, requiring each board to enable the pmk8280_vadc. Avoid this by marking pmk8280_vadc okay. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 ---- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 -- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 5 ++++- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 22f10813aa3c..ffc4406422ae 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -604,10 +604,6 @@ rtc_offset: rtc-offset@bc { }; }; -&pmk8280_vadc { - status = "okay"; -}; - &qup0 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index ce2564a6c26e..ad42966c94e5 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -851,8 +851,6 @@ rtc_offset: rtc-offset@bc { }; &pmk8280_vadc { - status = "okay"; - channel@144 { reg = ; qcom,hw-settle-time = <200>; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index 58fea376f0e2..945de77911de 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -87,7 +87,6 @@ pmk8280_vadc: adc@3100 { #address-cells = <1>; #size-cells = <0>; #io-channel-cells = <1>; - status = "disabled"; channel@3 { reg = ; @@ -160,6 +159,8 @@ pm8280_1_temp_alarm: temp-alarm@a00 { compatible = "qcom,spmi-temp-alarm"; reg = <0xa00>; interrupts-extended = <&spmi_bus 0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&pmk8280_vadc PM8350_ADC7_DIE_TEMP(1)>; + io-channel-names = "thermal"; #thermal-sensor-cells = <0>; }; @@ -212,6 +213,8 @@ pm8280_2_temp_alarm: temp-alarm@a00 { compatible = "qcom,spmi-temp-alarm"; reg = <0xa00>; interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&pmk8280_vadc PM8350_ADC7_DIE_TEMP(3)>; + io-channel-names = "thermal"; #thermal-sensor-cells = <0>; };