From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.180 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381006; b=mpEi2G1aWzydO9JV+rLXbEcwDDT0aj8Lp1lDtTOUuEsoq5b5Mx06KIZzHJEcfcuMDHdc ODy4eMaFT3ct/O81Y9Mlc15ljhTJH52cxRr8eHi2CAfDRUpYgQAaknQj7dnYV7/t1uJJ2 Y2xHEHqS7rHEYJiwOXtoQalPMAScNNxO3BFZNmdwSoPQIC9ZLyY1R+ZVkPpQB2A9eO2tu yhJEE1/EPozw5LQrXItBCtOOM3tTjc0fHGdoyJL1fvCz+nfcAI6T1BpYWOHCcU4kWcXE9 +v1LAyHN5vf3KHkSwZHgg8egE0sjNxg2uIRD3wqAljPY39HIKpzjsF+1IfurqpZTCnQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381006; 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=2djA7dHH3t0W6a33WzAqMPgc6rEUzHjaSPF/37enyfugDZ+C44Z/LynRL6PW0QvSmylO irYOZjIh9KScPwmFVkKcZxmN5SSHnzzqFJeiggdA1ZIyDbPnvqMozvW7kzdxnD4/DTK+Y sPZsToMIZJkttNUfzz/JGbxhVIAfW1UWVFBmN6MI5y6KytTM3t+yvJh0GTXgQlOak8BNZ r5QRsSPEh06dprN/ErSLgPS4/PWfj37yPrgiZ9miuFzmPLbwMA88fwewMC+sfnuTyh1tY plkvXEqqkNG3RmAbiI1GyzlsyIWcwW57mwaKiYYxe1nnNjL1DRm6ROM+l/VQGRPGYCg== 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.180 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 766AE606A334 for ; Fri, 4 Dec 2026 10:43:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 766AE606A334 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-f180.google.com with SMTP id 41be03b00d2f7-cc751eddf25so374960a12.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=WN2k3f5LHxweIkessOLuOXQ+vRH9SDZe6LjgCK/0MRUijy1JpEtmKy8dRU6Ba6LGti 1h0nE3CShJwpYMOqbQXpvvmE5sSPl9zM1BBo1ONcltDmjI7ciOWToKQh3dwQCINAXFkH 0HD3ZxBiGfvjB4lJdf2qwsGGzmTymyNCYOLFpMr5d8Nol5+cNBFVG7yq7CSiu0aGsz8L ShSpgWFawSrPyP0US4oE67LhAxNRWKoXgK8V9mjku0uXVhRe+GoJvZBXg142TrI8VNEq 7KGt2vnnHEAsXwSYgZNHE4NRfZQI/BdDCO/4jHMjvat8dkZNI/6v/DOw4UFWJleJbw/4 F/vw== X-Forwarded-Encrypted: i=1; AL+hErFYOD1MxDpirBwsC4NA8WKjJoV9Mud1yBTGbI0WwrqEbvFHRQVNcSZJraMudZ8cluIEdL3M7Uv/SXwY@vger.kernel.org X-Gm-Message-State: APuU4Z8C2Fzo9mFo/PPCy190SSwfcah6bw3rGBKtZPfvCBL2/MVzP49Y WYhrMCsO7rg4+rBkp+YcmVB8TZMZpoe3DvqPJaMMnqrkXt7TPCEU6/59 X-Gm-Gg: AZFdTZd0sgTtiOC8a5y3xwMRlXo0D/6N0Ugo2nkZm0qD3hAP6NxnFsRtjbyGlH6mNvB v565eT/b3QivM055PC6wT2vPGPUlCWT4vznAbdhTLPZk08aFkdvCqMeVVkxED90EK7W1ZBF308X yDRPOUasEKHGSsJpH30V7tcy9ZdDmxqkLMNtnqKwnRad1hzNcp3Fdd5a6kOY4UcD/LbMCPBCFLA JiLTcgK5sLW7hXt9LZRYjlrFBt/8gwZc1zhso0gPwe5ebZ9n5M5qlSsNRyI/Rl7k163+IZyVRZS G7+8D1M5xPRzgaimP08QDlmSO8mJ1qh0rDVfpYt49Z8VbpcFNRlaUCs1mH2eLiubu2w4223lVDM ddE2iDCIlRkCc+Fj/lyjCCoUGIRWK6SJ7am+OGpZ9zFDxksx2JUkrcXsv0QtXZSzvJDAcSuGfow REgfZHtGUXApFCFKO5m7ZP7DdksBFVlmwHNep4lk9B9zEHrVYC8KyfSGGY1PjC4BqoeZBLHTWU/ xjsyi2zybqg3rN9W6VYagOo529GQPMMWXXr1jiOVtwU+cA96yMFVfquCmo9Jd4YGDnqcZ3x 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: devicetree@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