Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382152; b=hQJfkIQXKTJmEvBs5NSAle75bw/UrBW0ABohTnY7nBXze8rKcqQOd7YZEMag2rCdE8s8 sKD4m8iseZKYiF8E5YBGf5LtdsKBO4P4GB4TdrHNrmvoW159hwcx3eyRgc4iLj3KiZHk0 PLKr1S4+nbEkE0C3D1Epac6R99dpuYxR41HCnmRgGXUyNhI5kd8r8rfhAgYcs3z/Ok+h/ hX69H5qj+lHDTqxoma7ndBJjgXOyYzsRKgQ8LeDqShrNK6I9JZW6CISLSHZL4C7O7AKkK yynihsaXnQIqjrNziP8udSzqYJiJdDZCg/L7IfhrwFS57u1V0j47TkqnUfVsxo4Tnig== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382152; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=zKeZNGbYyL2DGAyaMgZ9m8z2ygQTgy4F72YMJ4hAUfc=; b=H28n6OF7RbXRQ0ov4N4AAetbUtvg6Ji0XlPtJzsE5/TAHHuiubvMxPV8tjXAp+62qNOP cH4Gctqq7ZTq6wNDj2taNnln9Cc35LCLpiBuyAUbsdUAahDh1+D/IAlRX/DLbSaNpuN5B FLO1as+zWjEFnKoiV9+IO/WaWcQksUsYQM7WPV4sHxWCwSKJ41vIM6Q7/4qgD4xvOKJJr OKStaNjTJ8eDHMqUHAdFuaNKYLHKUaX4xhDHyzr1YYSKcZrBiCV4mIQFPcB1gs/mDCeF3 qsbtj7pOMDjdSbSr+iiEAAUDiGeshvrF8boesm27bQN6baFlmpe5YBG5am5txxkXwqQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ApJUMdyZ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BE8E606A335; Fri, 4 Dec 2026 11:02:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ApJUMdyZ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CAF11F00933; Fri, 4 Dec 2026 11:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796382152; bh=zKeZNGbYyL2DGAyaMgZ9m8z2ygQTgy4F72YMJ4hAUfc=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=ApJUMdyZSoafj9ShI8j68MHB7KscXSH5JidoencV1FwkLFN4sZC2eZzfvhj/l7Mf4 dKzr3zIopXCowgtuwIligg9HwMsm9F75PPIB1Skp7vzG4q4gR5XgbN1CcaOsM+dlD1 qYlpLfSrQWZ/IVPPmxdBEopoUohCsqp2m3HrMNMNWKikaYBhReun3qlZHOuRcfsZbv AIAg7PWP7/188pSPEDBqcHjor3tjCHEsykob8K/W2Zy3jUvj5UM1kRwhHPnC0B2+NZ VX/mVRRC8IdX7R8jf/78Ssfl6sXGh7atrMPaLzv2sTLUimP2oFOF+A7CLJ6kxkejnX zVxQNJfD3KU5Q== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v7 5/5] arm64: dts: allwinner: sun55i: add thermal sensors Reply-To: sashiko-reviews@lists.linux.dev To: "Mikhail Kalashnikov" Cc: devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <662a31b046d756f60cd58253bc06cc519b35a6af.1796378254.git.iuncuim@gmail.com> References: <662a31b046d756f60cd58253bc06cc519b35a6af.1796378254.git.iuncuim@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 11:02:31 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [Medium] thermal: sun8i: wrong caldata[1] zero check in sun55i_a523_ths_calibrate() - [Low] arm64: dts: allwinner: non-generic indexed SID calibration node names - [Low] arm64: dts: allwinner: deprecated direct NVMEM cell syntax under sid - [Low] arm64: dts: allwinner: redundant polling delays on interrupt-driven ths1 zones -- commit f5933b3e1e2b516aea8e35cf8facb2a52106a490 Author: Mikhail Kalashnikov arm64: dts: allwinner: sun55i: add thermal sensors This commit adds the THS0 and THS1 thermal sensor nodes, their SID calibration cells, CPU cooling cells, and the corresponding thermal zones for the Allwinner A523 SoC. > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/= boot/dts/allwinner/sun55i-a523.dtsi > index 85ef492ffeae7..ced54415419ef 100644 > --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi [ ... ] > @@ -611,6 +644,14 @@ sid: efuse@3006000 { > reg =3D <0x03006000 0x1000>; > #address-cells =3D <1>; > #size-cells =3D <1>; > + > + ths_calibration0: ths-calibration0@38 { > + reg =3D <0x38 0x8>; > + }; [Severity: Medium] Can wiring ths_calibration0 into sun55i_a523_ths_calibrate() (added in commit "thermal/drivers/sun8i: Add support for A523 THS0/1 controllers") skip valid calibration or calibrate with a zero ft_temp? drivers/thermal/sun8i_thermal.c:sun55i_a523_ths_calibrate() { ... if (!caldata[1]) return -EINVAL; ft_temp =3D (((caldata[2] << 8) | (caldata[1] >> 8)) & FT_TEMP_MASK) * 100; ... } The 12-bit factory temperature spans the upper byte of caldata[1] and the lower nibble of caldata[2], while byte 0x3a in caldata[1] is outside it. With a 25.6 C factory temperature (0x100) and a zero byte at 0x3a, caldata[1] is 0 and calibration fails with -EINVAL, leaving all THS0 and THS1 sensors uncalibrated. Checking ft_temp after extraction avoids this. > + > + ths_calibration1: ths-calibration1@44 { > + reg =3D <0x44 0x8>; > + }; > }; [Severity: Low] Should these nodes use generic names without instance numbers, such as thermal-sensor-calibration@38 and thermal-sensor-calibration@44? The unit addresses already distinguish the two sibling nodes, and other Allwinner dtsi files follow that convention. [Severity: Low] Should these new cells be placed under an nvmem-layout node with compatible =3D "fixed-layout"? Direct NVMEM cell subnodes are marked deprecated in nvmem-deprecated-cells.yaml, and sid in sun55i-a523.dtsi has no existing legacy cells to maintain compatibility with. [ ... ] > @@ -1145,4 +1186,135 @@ npu: npu@7122000 { > power-domains =3D <&ppu PD_NPU>; > }; > }; > + > + thermal-zones { > + cpu0-thermal { > + polling-delay-passive =3D <100>; > + polling-delay =3D <1000>; > + thermal-sensors =3D <&ths1 1>; > + sustainable-power =3D <1200>; [ ... ] > + npu-thermal { > + polling-delay-passive =3D <100>; > + polling-delay =3D <1000>; > + thermal-sensors =3D <&ths1 3>; [Severity: Low] Do the ths1 thermal zones need non-zero polling-delay and a 100 ms polling-delay-passive? sun50i_h6_thermal_init() configures a 250 ms sample period with data interrupts enabled, so sun8i_irq_thread() already updates all four zones every 250 ms. With polling-delay =3D <1000>, monitor_thermal_zone() cancels and re-arms each poll timer on every interrupt without it ever expiring. Once gpu-thermal reaches 60 C or a CPU zone reaches 70 C, the 100 ms polling-delay-passive wakes the thermal workqueue twice between hardware samples to re-read unchanged registers. npu-thermal also has no passive trips or cooling-maps, so both delays can be 0 as in ddr-thermal. Setting polling-delay =3D <0> on the interrupt-driven zones and using at least 250 ms for any needed polling-delay-passive avoids this extra work. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/cover.1796378254.gi= t.iuncuim@gmail.com?part=3D5