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>; };