From nobody Fri Apr 3 13:48:32 2026 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B907322A1F for ; Fri, 20 Feb 2026 09:19:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771579159; cv=none; b=aC7y3ZFttiYp1omLnbMoaJTHgjNyzfIQAjqNZPc3bJcM34Gb8DNuEumQHwU38zorG5Q5zITv3u/rSJrYMkqsIndcj3izvFi7oP4MQXM4J/+lI0SaxTWDpztwYyuv/mcyCG3t7CLynSIGd3ju8moe39xm6lh3RFMo24/wgX66R0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771579159; c=relaxed/simple; bh=K+CqafRoNbhWJwidHtfefGL/lwKA1vM+TFJ7gUSVsFU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QyZttXMrWns04LzK1g8hYPcBvnOnHvPvxLHAbTRhyAmAHUb3Y8gdmt+5QGoYa979XhDcGiODBJqpe2ihYJzNVo85H7s6NEk8Dasnjol9+GPRJMxmKqpnu7gIZCD7aas4MJi8rWHEsLUriOdipNu8hWnEU380Q4RYbLNqwso8OFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fairphone.com; spf=pass smtp.mailfrom=fairphone.com; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b=4JKgATCQ; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fairphone.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fairphone.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b="4JKgATCQ" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-65a11e565a9so2083669a12.3 for ; Fri, 20 Feb 2026 01:19:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1771579156; x=1772183956; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Az2Gne89A6GAMjOY0VwKNFOpXMxXx7RlCCQf3uV3H/c=; b=4JKgATCQvopyFKpt+KBch3EHlJkws120YJToW0tpiyA1nSmmGUIs6P4mXvO2V5Dq8+ NNoPucW8Vcq3G0s/twkLNye43PHJYoXnrGMWPIAKQ/xi1/nzAtXkpEHHfQu4EZ5rxUON JBblaUwBQwk26HPKXpA+aZJ+2EsAUge9ryNoqXos7WeIj7hu758xbPiVAUULKn2pQzZc ztECTvvD1+gkGxQ/8ViDavdiSc1Wu4APvedxuy1VBv8MQ2LOI9bBdvj2BG95Mtrak0wa s5BqXKo6J+UOZlvvDiri+2irK6zfZxHmkjKc2msXSyFQAICWmOiLamfAoU1pvljXvgXL gSxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771579156; x=1772183956; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Az2Gne89A6GAMjOY0VwKNFOpXMxXx7RlCCQf3uV3H/c=; b=DoJ5dLdb4Qr1cVKSSz9K64wFUcatMCuuy6LU6BGyp9ZQic2LoT7SdepHal9DqyNiZJ XLgAp+Ux36cNdy0IA/QgxihiRz/oYybxp8oLyAC8vMJGMN9R7VTh3BCE3TCkF4VYRsYg HPldAlyu9qqaoMBzdyGMtb1CBEy3tCfNkVdeLpNwYmqHFc29Z3TQNL6QWUCf/Anof4IE PatyU3hnCoS34vOObtRA7MKZR9iALSlNAiQxO/T6UAYW3WYP5kfiBKaoagD6xwQQxuEr MuVBzkNuhyJBN3TtGjLAN94eTsJGFw3s1zTy4Eq73ag+Xjy2wAGL+W56Vul+giXpEmvp liow== X-Forwarded-Encrypted: i=1; AJvYcCWGqgNf2/+6OQt7vD9Cf/xXAMJrVSj9IEc3KE2MytwMwFHhe0uaAHrhunMMaScOeF95oETGj/5/V4o4QdM=@vger.kernel.org X-Gm-Message-State: AOJu0YwsR3GYOzN8FNYmJkxPHRVnjRoIF/L9IKuF4r8z1nRjEZKJaQVi j/Mr0x9b17IVwpNuaI6h+kNzg0cyqdezNSgCChtTmRsyDKd62xiHL0OwNJNy6v3aiKo= X-Gm-Gg: AZuq6aLaFbiJDYFPhkAruaMofbUsS8VUx9tlkAWw6iLYgf1C+fDTJjVmQ+SEdgCIbgn 4knQ0TTwVu7BufkGPJmNknFAI2lR57jHMSE1o8m4Fc6evt3rJ3pl1d7rBuV9asUMRlTxaIPybCb 5K78B4tCeGk+31dh0eljHXcZoJGcP3UwhZOXSirqmjQD1bedYi3kU5xtQDN+MbvQvrA/zR7Hlga /YSEcG5WezWSXd4svpuI6SEo2HDeMi9ifE3t8ifuCpSeJUtHL+2eofFrILynKDBDk6FfR1ugj6I 16LDUgdKYbkYGDLRlp+YwAUqCev2g/3hbcVp9JyjRP2iHdfj/kjeyJkwabz65F4grqOC7B4X352 IG02iETq0ZGZO2fvvJxEff4wK3u23RcO/OJHOdtmyUgRVgzpBPMAuBR6WWvAl9thMg5uoxoseeO wCc9v5zPQZWJCWXxwwJb6yfCaQsgOW6AWjMoJYK+7k+6elsovAzBfRrOU2rKmcMT2sOpGj2nChJ LuFHA== X-Received: by 2002:a17:907:1c82:b0:b87:4c74:b316 with SMTP id a640c23a62f3a-b903dcbe5a5mr464115666b.50.1771579155584; Fri, 20 Feb 2026 01:19:15 -0800 (PST) Received: from [172.16.220.101] (144-178-202-139.static.ef-service.nl. [144.178.202.139]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8fc769111fsm667098666b.57.2026.02.20.01.19.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Feb 2026 01:19:15 -0800 (PST) From: Luca Weiss Date: Fri, 20 Feb 2026 10:19:09 +0100 Subject: [PATCH v2 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Add battery temperature node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260220-bat-temp-adc-v2-5-fe34ed4ea851@fairphone.com> References: <20260220-bat-temp-adc-v2-0-fe34ed4ea851@fairphone.com> In-Reply-To: <20260220-bat-temp-adc-v2-0-fe34ed4ea851@fairphone.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Laxman Dewangan , Bjorn Andersson , Konrad Dybcio , Hans de Goede , Jens Reidel , Casey Connolly Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, Luca Weiss X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1771579150; l=2583; i=luca.weiss@fairphone.com; s=20250611; h=from:subject:message-id; bh=K+CqafRoNbhWJwidHtfefGL/lwKA1vM+TFJ7gUSVsFU=; b=bu3/bXdv1SzWAXZKad3hnvwcT01WCRp6k2YidE2fc8+ocu3bhuTYKILbH5aznpEdD0t8v60nP oL7v7df2/LLCKw295K/bCQbnS5DjwDm+Xbcn6XugLRaQ4oaHLEMbI/e X-Developer-Key: i=luca.weiss@fairphone.com; a=ed25519; pk=O1aw+AAust5lEmgrNJ1Bs7PTY0fEsJm+mdkjExA69q8= Add a generic-adc-thermal node to convert the voltage read by the battery temperature ADC into degree Celsius using the provided lookup table. This will later be used as input for the fuel gauge node (QGauge on the PM7250B). Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 83 +++++++++++++++++++= ++++ 1 file changed, 83 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64= /boot/dts/qcom/sm7225-fairphone-fp4.dts index b697051a0aaa..7857003099a6 100644 --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts @@ -108,6 +108,89 @@ rear_cam_sensor: thermal-sensor-rear-cam { io-channel-names =3D "sensor-channel"; }; =20 + bat_therm_sensor: thermal-sensor-bat-therm { + compatible =3D "generic-adc-thermal"; + #thermal-sensor-cells =3D <0>; + #io-channel-cells =3D <0>; + io-channels =3D <&pm7250b_adc ADC5_BAT_THERM_30K_PU>; + io-channel-names =3D "sensor-channel"; + /* + * Voltage to temperature table for 10k=CE=A9 (B=3D3435K) NTC with a + * 1.875V reference and 30k=CE=A9 pull-up. + */ + temperature-lookup-table =3D < + (-40000) 1673 + (-38000) 1649 + (-36000) 1623 + (-34000) 1596 + (-32000) 1566 + (-30000) 1535 + (-28000) 1502 + (-26000) 1467 + (-24000) 1430 + (-22000) 1392 + (-20000) 1352 + (-18000) 1311 + (-16000) 1269 + (-14000) 1226 + (-12000) 1182 + (-10000) 1138 + (-8000) 1093 + (-6000) 1049 + (-4000) 1004 + (-2000) 960 + 0 917 + 2000 874 + 4000 832 + 6000 791 + 8000 752 + 10000 713 + 12000 676 + 14000 640 + 16000 606 + 18000 573 + 20000 541 + 22000 511 + 24000 483 + 26000 455 + 28000 430 + 30000 405 + 32000 382 + 34000 360 + 36000 340 + 38000 320 + 40000 302 + 42000 285 + 44000 269 + 46000 253 + 48000 239 + 50000 225 + 52000 213 + 54000 201 + 56000 190 + 58000 179 + 60000 169 + 62000 160 + 64000 152 + 66000 143 + 68000 136 + 70000 128 + 72000 122 + 74000 115 + 76000 109 + 78000 104 + 80000 98 + 82000 93 + 84000 89 + 86000 84 + 88000 80 + 90000 76 + 92000 73 + 94000 69 + 96000 66 + 98000 63>; + }; + thermal-zones { chg-skin-thermal { thermal-sensors =3D <&pm7250b_adc_tm 0>; --=20 2.53.0