From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381005; b=qCluCBiwx1y27OQ11tBe3voB42X/e0ueEDXjNju9CvG6c97Ejhjwcm/BeS8ldHVmF6OW ZPPvufhaI4XphD5OaHDacmm8vImzXQF4Swtf6YuxoPpJ34crv+BFtGJTG2OY/6iBcXGvE ojK308oZ2+oyKf6rKDhL9Fz/+PRbvCKtOSOxzNoEpGedra7xq2yN4Dq6+eGk7Xrjl/qGQ DhoVclai8SRKp3/2l4GO/OlCetJVEj9G3mcZNIK16aVuZIgHugXos6SEiVmiXYfdAO4OI AmJXylw9gUy3Fhs8ATp4QJ6cf7AWEW4SX6sQHSPwf7FfbCOUubr9e6/xMEbHvJblWuA== 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=YTS7QotCRbNw4tubn3Wie86dlAB8OFWTGwxWEDUK0T2fPbhgIJNMr42jQc7b8hkSu13q r/2swAPcD4Eiqx+WB+X8i7Hva6XcL84VBT69ucQU07jBnJnCKE2AIrHw6gPDrdzn6VQdq YQwgM2uTQm//vk4Op8tLOHSy3uWZQ5b3BfXbu1vOQzWdvul0y4pyB2dS7PDzG2AaPbkF8 fdq67ApH/P38WhJucOPCUbubM2Qo+We4oQ9/1ny19JUjPGe9/6r5xqSHQC5zh/kGTrB7H tPXdurvuElDFqFxKk+CNQDJHDigUEsOmAoQP9ui3icecGHfDEGYphcaSwGHimPaundg== 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=A6nFcC+n; arc=none smtp.remote-ip=209.85.215.179 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (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 7D2D9606A336 for ; Fri, 4 Dec 2026 10:43:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7D2D9606A336 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=A6nFcC+n Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-cc751eddf25so374958a12.3 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=vger.kernel.org; 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=A6nFcC+nzCEDickuxI/jWG0OPrgQgMGj3YJSpu5KfKRJPw16ShKolFmuCDo0/Yi6Ia nDDMOv6IHOMhxDY9M4tZB8trOlpZSQNQYjhHfqbNYpsPHnJIe7sECghzscNCNGTxpz9Z uQKCFFCZtbMl/kGIwfW1cqYQ8RPXIe031Ebamb75YiX+ndPiroe9EZzl4dPF7fmWpqoN f3HDKHkw8xWWnUmmGqt5gGlVn80xIOnLy8ysWQXO9uaxEtoaUSFhy4sFa3VAGJjj9U6r lHylUU75gNwBtAwrKVot0lPjayWM5lpVX+KhaSZ/QeTMDMaLr7vMV9a6Dc3EfqJZLyyu BeLg== 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=n+Y8MqHOhXtP/QJGIUc5HOZiB+x62R+wRcE3qG1m/z0+hMUjNbJi/XIJbHTsBYO0Ad ZzXztGELfVXMe+PUrW9zwj8LZ+jgMVO6PsMbfaVtFBEk31noVs70xGCI+ZxRhH3vdmpl axpJikKsmiHzcJJyAbER4zXXWp2DNCbCzikgROJ0eZP1dtxdPsU8ru6hnAtDe30CgvYC tAVgUFBdVHT/F6nVZICChhCLZ/+6dJ+6FXPhONX9Pan1d8yRJE46mffcVcGr6bSz28yW sweRSV/F6byTF9SGX3V9Yu/Ky7hAyLlK/s1p5ntpL3yNxwg/nCcMXDm2bkmT0JN14L86 FuNg== X-Forwarded-Encrypted: i=1; AL+hErGnpAjQw9DHYMO8H3PL5gF48I3gQSNZfCfV2efKX1Z/xlgizfq8X4ORlPvWQgacKit8u8hxQeFnZzMGuBs=@vger.kernel.org X-Gm-Message-State: APuU4Z8RtMdoO05lez0MDyRYrdtpxObwArmHPX6kCidnBkXxjzOc+tpf EcYqpi0vF2j7x21ozdkO5tIgrvc00va/iqYFmtAh6D0jbmo1pTQHWcj/ X-Gm-Gg: AZFdTZeLC8sQfUD8gx4vLnux8djOFflhIorHzcccoYxj1fBsOcXtg+CWdxYh0vS5ds5 OI2mYnYOgrA7n0u6YugGJ9JWi0WSRTlk1LmqeShHt5xfM1j6wNIxNmS+2L/Zqb23GJoMvhNaIKC Af0JgKaAdxz8JLgLnoi/JQhHLjUZPavNRK+rGqQvXvC3sgrv1HugmiWm6YwRvT6UmCBeNzd1u3c o9G0aXqSNBwqm9cyY32fpOi4Y8dYqQlh+OHgfCM/rm98Y+x4E0U2xgu6KvJPM+E98Fr/voqi5id YRBy5eE8JGf8bQUeJaCUWtiophrnQKiFupDT/K1f98xQNkXcwVC5NNt7GW1W9Y1Ss3jUrDUgFOs R8XjfaXxnih/g6OjYt2ZVF4jKmarDuAFTpFPzmZ4Gc6WbkjQoLYT3C6FLUbSGNOiB2wgMcBLkqJ WhQIYhQrf3fz90Pmu32+Hg4qOWxsx8AAz1j3hGODSRC75vMxWrPOw20H4MPw1gIlXZ0KVpO5GfH WF4n6u8HPjoDiKVPlbgv3MtssxSORo3YB2nIzuw6ZELpgSnw0enTP62e8IS4+XBVNC9rjQd 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-kernel@vger.kernel.org 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