From nobody Thu Jan 30 17:31:42 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 5042A33998; Fri, 24 Jan 2025 07:02:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737702182; cv=none; b=iyUwGaRejxY+jUOJyEf2IAhC927evlRoruPVg1e7tkLnt75a25Jm8inz3t/B2gzez9HN5zdg5U4Nq8XZ0iENaOc2RSMaAprXjliX2r35b84OqekUBwKbcys77VjaXrPeUNlohHB/11c8UCz9kMvAAopxpWcixDW3sfiLdSXFNFQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737702182; c=relaxed/simple; bh=nnlEBVk1jxhmHgFYfAEFpcxrAr/uogfknvTcEIlJDd4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=W9j3AHt2Q23W8WqE9hI6VVCwpjVQCgRV2QB32MU+JJv8cf5dIk30ZxYnWqXT8655+m7J1fmyMIlVt/RhwicKvd6LpXICVwP9Mox5l8pp8Kdz68juFgHe/+nPsFqlwjLCiLrGmflfhxRoARFO0pHtCtiRkCiJgsGDo213jRE4OeU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=bTK3aQ6Y; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="bTK3aQ6Y" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50O3reAE029827; Fri, 24 Jan 2025 07:02:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=i0oxH3Fos2XsDeiAGgDM+u iGKrA38Z+sPZ/9rmsrEz0=; b=bTK3aQ6YRY2VB0y0fUbp3mlDWp/EAKfH0n2/j9 qA2maNWw13wMFNItGf2B4V+eQpJyYaaKyRY0BcbBgkl9obHNVaS7XVLliM1ApAvt z4of97cQQglEaPmm3mGOkDaIVB0xlKim6OzBzIH+M12Xox4rX00bW9UXAhcbyG4I qGoj2Y5oRz9tKjYNXqgbSXOv13MYn3n7vAXmAgCUxI4yTB1/vkjeRUdbgEo0Z5cb vvnWD47EuNMG3NH56VSFNicxR0JBs/0ZXCeFK9pztDzcqpvnWo1gE7F4scXSDeo5 YgGhQ/GmyL52TqP9PlkaAlsNVpLOSPEOo8Wgc+Fb53ic5T0A== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44c3bxrbeu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Jan 2025 07:02:56 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50O72tMO020255 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Jan 2025 07:02:55 GMT Received: from hu-kotarake-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Thu, 23 Jan 2025 23:02:51 -0800 From: Rakesh Kota To: , , , , , , , CC: , , Subject: [PATCH] arm64: dts: qcs6490-rb3gen2: Add vadc and adc-tm channels Date: Fri, 24 Jan 2025 12:32:00 +0530 Message-ID: <20250124070200.3969230-1-quic_kotarake@quicinc.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: HaTk3155XBG1dDCH_hqP-XuyGVxJWK90 X-Proofpoint-GUID: HaTk3155XBG1dDCH_hqP-XuyGVxJWK90 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-24_02,2025-01-23_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=926 clxscore=1011 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 mlxscore=0 spamscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501240049 Content-Type: text/plain; charset="utf-8" Add support for vadc and adc-tm channels which are used for monitoring thermistors present on the platform. - Add the necessary includes for qcom,spmi-adc7-pm7325 and qcom,spmi-adc7-pmk8350. - Add thermal zones for quiet-thermal, sdm-skin-thermal, and xo-thermal, and define their polling delays and thermal sensors. - Configure the pm7325_temp_alarm node to use the pmk8350_vadc channel for thermal monitoring. - Configure the pmk8350_adc_tm node to enable its thermal sensors and define their registers and settings. - Configure the pmk8350_vadc node to define its channels and settings Signed-off-by: Rakesh Kota --- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 114 +++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot= /dts/qcom/qcs6490-rb3gen2.dts index 7a36c90ad4ec..642bc1c5cace 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts @@ -9,6 +9,8 @@ #define PM7250B_SID 8 #define PM7250B_SID1 9 =20 +#include +#include #include #include #include @@ -212,6 +214,50 @@ pmic_glink_sbu_in: endpoint { }; }; =20 + thermal-zones { + sdm-skin-thermal { + polling-delay-passive =3D <0>; + polling-delay =3D <0>; + thermal-sensors =3D <&pmk8350_adc_tm 3>; + + trips { + active-config0 { + temperature =3D <125000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + }; + }; + + quiet-thermal { + polling-delay-passive =3D <0>; + polling-delay =3D <0>; + thermal-sensors =3D <&pmk8350_adc_tm 1>; + + trips { + active-config0 { + temperature =3D <125000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + }; + }; + + xo-thermal { + polling-delay-passive =3D <0>; + polling-delay =3D <0>; + thermal-sensors =3D <&pmk8350_adc_tm 0>; + + trips { + active-config0 { + temperature =3D <125000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + }; + }; + }; + vph_pwr: vph-pwr-regulator { compatible =3D "regulator-fixed"; regulator-name =3D "vph_pwr"; @@ -745,6 +791,36 @@ kypd_vol_up_n: kypd-vol-up-n-state { }; }; =20 +&pm7325_temp_alarm { + io-channels =3D <&pmk8350_vadc PM7325_ADC7_DIE_TEMP>; + io-channel-names =3D "thermal"; +}; + +&pmk8350_adc_tm { + status =3D "okay"; + + sdm-skin-therm@3 { + reg =3D <3>; + io-channels =3D <&pmk8350_vadc PM7325_ADC7_AMUX_THM3_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us =3D <200>; + }; + + quiet-therm@1 { + reg =3D <1>; + io-channels =3D <&pmk8350_vadc PM7325_ADC7_AMUX_THM1_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us =3D <200>; + }; + + xo-therm@0 { + reg =3D <0>; + io-channels =3D <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us =3D <200>; + }; +}; + &pm8350c_pwm { nvmem =3D <&pmk8350_sdam_21>, <&pmk8350_sdam_22>; @@ -789,6 +865,44 @@ &pmk8350_rtc { status =3D "okay"; }; =20 +&pmk8350_vadc { + channel@44 { + reg =3D ; + label =3D "xo_therm"; + qcom,hw-settle-time =3D <200>; + qcom,pre-scaling =3D <1 1>; + qcom,ratiometric; + }; + + channel@103 { + reg =3D ; + label =3D "pm7325_die_temp"; + qcom,pre-scaling =3D <1 1>; + }; + + channel@144 { + reg =3D ; + qcom,ratiometric; + qcom,hw-settle-time =3D <200>; + qcom,pre-scaling =3D <1 1>; + label =3D "pm7325_quiet_therm"; + }; + + channel@146 { + reg =3D ; + qcom,ratiometric; + qcom,hw-settle-time =3D <200>; + qcom,pre-scaling =3D <1 1>; + label =3D "pm7325_sdm_skin_therm"; + }; + + pmk8350-die-temp@3 { + reg =3D ; + label =3D "pmk8350_die_temp"; + qcom,pre-scaling =3D <1 1>; + }; +}; + &pon_pwrkey { status =3D "okay"; }; --=20 2.34.1