From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381005; b=uYrcQTldnI+gsXEcQBTQy3AosSwxZ5yWPyloky7RaHxS/FV9GrLGYcDs3zC+nv76emKC BgNeD+YiHvYft5WdCxwcBBlYF90+DH+RFyJ4hbewAQX+5doCZJl1tLd+ujK/DIOaRKT1O sOwCA4VkyCgr8TO9xJo8P/V7NefFOGevp70p+u0X+/SxJiaMP5E6hV/oTrT6Arak36jsg g9Te/IE3ohpGLD3n1LbXsh53W+qxd+t+AzH9GVS4e631Vrbij1nWcg4KfBX2lEO1rOxlZ Gs13zjzzhZcFtgSkZCguRlgLrdZrHeq5caBjmZ7CPNSauZ/xytRYQnutyHInN4JncZg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381005; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=nvC6jx7/1JwP/MOj2Lcqu7i+kotmPejHh6Ao7s9ZQ+w=; b=wXtXsJZN0T+CBB79zTRICifS2CNc+Huo/cgvuUSVSllhEZhVjaJkryJIPYZXgsjI7V25 Wk/sTAEV56rmzYIutbSx3CBNuPGSsrKFWSW5Wjar9BvzzTgfQUK/vqiBp3WmDJ3SpQnQj jn5sLVfxUi6Ehl6YMq/de4upop6qOQ+MCudGVijdIXxmhPAK2qxCU/xIvUIajHvDHxayx DZJLioVB9Kw8MIzF4Hk/Yo3P260IUqiZ2oA0B05MjncpJQ5oM2nha50/15YY+fihPkNMX zo6ZpstTbqm+MkCOaAsxZFT4/Va8raaXmMmrqMta0Zhzo/o0gyBiCNCc5WV7HdB6lhA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=aADy6a9y; arc=none smtp.remote-ip=209.85.215.173 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EB34606A32F for ; Fri, 4 Dec 2026 10:43:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6EB34606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=aADy6a9y Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-cdb2893531bso357364a12.1 for ; Fri, 04 Dec 2026 02:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796381005; x=1796985805; darn=lists.linux.dev; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nvC6jx7/1JwP/MOj2Lcqu7i+kotmPejHh6Ao7s9ZQ+w=; b=aADy6a9yfybJEeV9tVoyovCSoDL4IhVVZ0EP5KDISMWoIHbCO8XDtYbUPeK4j+oUo2 OA5PxYVbvBo1rm63MyCfXxthKvygN1J9yWY4j19wvTeqtYxFM10e1EwoZSzHgCzKRLMa NrkW/eO5tf1EchzlTFLcQMM6itaeOCDPcLWwx+QCaI3hPW9ID3yD1Gw7AwJemXC+mAFS 7PutA7JsJKHTf6dqJ+3DkofIUjUFlB3vkEnlDNGQv4D06ov2l6C2zQ0RoRcbDnR5B7ur ORsfjWfMn6/6EzCdVaQPkmcEc/2MAWVlHO/uZAvDt8umHQ8nOcwrddPkUmwBzB3dMbBF 00cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796381005; x=1796985805; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=nvC6jx7/1JwP/MOj2Lcqu7i+kotmPejHh6Ao7s9ZQ+w=; b=JiJGkQsoH0sZFr11Rq+rS9RsCqCFY9q3weDWxp5Y3jHgMhKqCE/wtVK9lVBNFHupEH TxgKNuWDtNFHjLsbqII6PghyNbIE0HbXtzndjxsBe4p4lOiSs1q0fYhDV19yawoidAmg nixVm7HiUPFrCeLMDzxsdE2fIX6JC7ADT+EA+aqyb/ezS4NsFEd4OrFHQgrQ07D8s06K cqd16bZBLMeoLaMWfx4GMqx8wqkZ6VT8PUIsyJ1gaI07lpspRJ+9XDcAle9b5jI8QpkV F9Bve/eDf4UXFmPV3ixqyExpqMRfCK3T62KvDuO9dDxTmQpRwNbGef+lLNRzDriaSGpH BXhg== X-Forwarded-Encrypted: i=1; AL+hErHdOnLsoFBRDnGEDni4TgIlF0JemfhzN3xkwxppqxTylL9hhsYxG3AL1OXU0XKTJSFkUsQTe+YIJRIRlw==@lists.linux.dev X-Gm-Message-State: APuU4Z8gbunfMP9AeyVTo6iCnnM4RyiI4YxzCv0bbS5LRlBI9HIgYuGm qmC4iRDMFH+vAVx3JDtKGhdx2JIXZLHrdzLgHQfb+g6Z9zuTub8xeO18 X-Gm-Gg: AZFdTZfD4v/DoHFmBb/h1QGo/IVNvGE0VagOXIOKo7GZtjIuCQAwIOJw61LT09pK13z kKkZ8+XutSCbO4xSMc43Hu/Gf2qx8pe++BGUxL9T5onmjuPWGImXQNq2xuexRcMnvqx+0WL+cD2 0CBUcB6JbAp7a5CfkNtgDZ6OiQkkQ0WDWLEqtfrSK7BYQ/MARO5XJOv7C8mkKZehuCyUOidu+cD lSiaNroHY3mOYkR4owCCwbxEmbTLp90ZfHCbKwonx3g0A3z0MyJO4/s0axjM9pfS24LXI1gdioz 721TlD8m3vi0qj3PhedCfspGYOUHhDlU4XVvQOB3U6Hid69TxW6VxDWQmz/9RmqsYx6vrJmlUuJ ZP0oi4I6YtEUvw1+USxIfefxe08Pvvrqr2eCbVK53CBM+oCZ18BDhlIs9PuA5vDyvcuYpldMS9G ffKH/1izYGqcTzq5Y49k23FCsDMQH+E2iefDfDWXuK2viDlpoe8hXQlQ7877fCvAHb5gdA1YyxY kemRhJ47+OkqpSLfwJKlR6/un3RdClKoSgBDKARAFO20V0QLDT8MAa+A+M0vnT00EEzBJsj X-Received: by 2002:a05:6a21:7314:b0:3e2:95fb:8cff with SMTP id adf61e73a8af0-4156282041fmr1733060637.55.1796381004658; Fri, 04 Dec 2026 02:43:24 -0800 (PST) Received: from archlinux ([2605:e440:15::152]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ce12a8d1edfsm399280a12.29.2026.12.04.02.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 02:43:24 -0800 (PST) From: Mikhail Kalashnikov To: Vasily Khoruzhick , Yangtao Li , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Philipp Zabel , =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Carrillo?= , Andre Przywara Subject: [PATCH v7 0/5] Allwinner: A523: add support for A523 THS0/1 controllers Date: Fri, 4 Dec 2026 18:43:01 +0800 Message-ID: X-Mailer: git-send-email 2.56.1 X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch series adds temperature sensor support for the Allwinner A523 family of processors (same die with H728/A527/T527). Based on 7.4-rc5. Only the commit message of patch 1 changed in this revision; the code is identical to v6. Changes v7~v6: 1) dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers - reworded the commit message to explain why THS0 and THS1 need separate compatibles: THS0 has a single sensor (DRAM) with #thermal-sensor-cells = <0>, THS1 has four sensors with #thermal-sensor-cells = <1>, and they use different module clocks and interrupts 2) thermal/drivers/sun8i: replace devm_reset_control_get to... - no changes 3) thermal/drivers/sun8i: get calibration data from two nvmem cells - no changes 4) thermal/drivers/sun8i: Add support for A523 THS0/1 controllers - no changes 5) arm64: dts: allwinner: sun55i: add thermal sensors - no changes v6 https://lore.kernel.org/linux-sunxi/20260913145527.18148-1-iuncuim@gmail.com/ Changes v6~v5: 1) dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers - removed the redundant clocks constraint for the A523 controllers - simplified the else branch to maxItems: 1 - dropped the extra example node 2) thermal/drivers/sun8i: replace devm_reset_control_get to... - no changes 3) thermal/drivers/sun8i: get calibration data from two nvmem cells - skip calibration instead of passing a NULL pointer to the calibration callback when no calibration cell is found 4) thermal/drivers/sun8i: Add support for A523 THS0/1 controllers - THS1 has four sensors; added the ths1_3 (NPU) calibration data - renamed the scale/offset constants to match the BSP naming - check caldata[1] instead of caldata[0] for the factory temperature - use SCALE_BELOW as the calibration divisor, as in the BSP - documented that the BSP CAL_COM(5000) is applied through ft_deviation - updated the commit description 5) arm64: dts: allwinner: sun55i: add thermal sensors - put nvmem-cell-names on a single line - dropped unused trip labels, kept the ones referenced by the cooling maps - renamed the "gpu-trips" container to "trips" - added the npu-thermal zone for the fourth THS1 sensor Changes v5~v4: 1) dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers - added empty line between what and context - clarified description - added missing period 2) thermal/drivers/sun8i: replace devm_reset_control_get to... - updated Reviewed-by tag 3) thermal/drivers/sun8i: get calibration data from two nvmem cells - removed dead IS_ERR(caldata) check - replaced NULL/IS_ERR check with IS_ERR_OR_NULL() 4) thermal/drivers/sun8i: Add support for A523 THS0/1 controllers - clarified description - added Reviewed-by tag 5) arm64: dts: allwinner: sun55i: add thermal sensors - fixed patch subject prefix - clarified description - sorted thermal-sensor nodes by base address - added empty lines between trip nodes (DT coding style) v4 https://lore.kernel.org/linux-sunxi/20260504050245.646078-1-iuncuim@gmail.com/ Changes v4~v3: 1) dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers - gpadc replaced to mod clock x) thermal/drivers/sun8i: add gpadc clock - removed 2) thermal/drivers/sun8i: replace devm_reset_control_get to - no functional changes 3) thermal/drivers/sun8i: get calibration data from two nvmem cells - no functional changes 4) thermal/drivers/sun8i: Add support for A523 THS0/1 controllers - gpadc replaced to mod clock 5) arm64: dts: allwinner: A523: Add thermal sensors and zones - gpadc replaced to mod clock v3 https://lore.kernel.org/linux-sunxi/20251025043129.160454-1-iuncuim@gmail.com Changes v3~v2: x) dt-bindings: nvmem: SID: Add binding for A523 SID controller - previously accepted, therefore removed from this version 1) dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers - added changes as requested by Rob 2) thermal/drivers/sun8i: add gpadc clock - removed undescribed changes spaces to tabs 3) thermal/drivers/sun8i: replace devm_reset_control_get to - changed the commit description to the version suggested by wens - added reviewed-by tag 4) thermal/drivers/sun8i: get calibration data from two nvmem cells - added spaces in the description block before "*" 5) thermal/drivers/sun8i: Add support for A523 THS0/1 controllers - added alignment of functions in compliance with open parenthesis x) arm64: dts: allwinner: A523: Add SID controller node - previously accepted, therefore removed from this version 6) arm64: dts: allwinner: A523: Add thermal sensors and zones - no functional changes Changes v2~v1: 1) dt-bindings: nvmem: SID: Add binding for A523 SID controller - added new patch 2) dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers - changed clock order - added additional nvmem cell with calibration data - added requirements for new controllers - added description 3) thermal/drivers/sun8i: add gpadc clock - removed unnecessary call to clk_prepare_enable() since devm_clk_get_enabled()includes this 4) thermal/drivers/sun8i: replace devm_reset_control_get to - original function replaced with devm_reset_control_get_shared_deasserted() - removed some of the repetitive code executed by devm_reset_control_get_shared_deasserted() 5) thermal/drivers/sun8i: get calibration data from two nvmem cells - added possibility to get calibration data from two independent cells 6) thermal/drivers/sun8i: Add support for A523 THS0/1 controllers - removed magic digits - changed description of calibration data procedure for A523 - changed numbers of array elements with calibration data 7) arm64: dts: allwinner: A523: Add SID controller node - fix typo (sun50i->sun55i) 8) arm64: dts: allwinner: A523: Add thermal sensors and zones - cell with calibration data divided into two - added passive trips for gpu - added information that information obtained from BSP v1: https://lore.kernel.org/linux-sunxi/20250411003827.782544-1-iuncuim@gmail.com Mikhail Kalashnikov (5): dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers thermal/drivers/sun8i: replace devm_reset_control_get to devm_reset_control_get_shared_deasserted thermal/drivers/sun8i: get calibration data from two nvmem cells thermal/drivers/sun8i: Add support for A523 THS0/1 controllers arm64: dts: allwinner: sun55i: add thermal sensors .../thermal/allwinner,sun8i-a83t-ths.yaml | 34 ++- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 172 +++++++++++++ drivers/thermal/sun8i_thermal.c | 242 +++++++++++++++--- 3 files changed, 403 insertions(+), 45 deletions(-) -- 2.56.1