From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74B3B606A333 for ; Fri, 4 Dec 2026 10:43:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=BV6p7j5N; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lGuhwKns DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=nvC6jx7/1JwP/MOj2Lcqu7i+kotmPejHh6Ao7s9ZQ+w=; b=BV6p7j5Nb+9YGWa0/LJgRB+m5b waGX8AX1KHonYzuf2BpPse7R5FvfDnuVfUJ6vVAToP36xNTdQDvyG5qXfEH79BSI8pq554PKCyE7N /1EIrRFYvjMn2GrQftD1Qv4VXM3c/bVdJJKK1BfkT2F4Ec0rWsNEwxDUM/bbTJftPVECc/N6gWMIr rWOX6c48hui5KGbTRLW1qQ8afavBVp4o2+9sbYSkDUgI1eQrbJy9n71zAbf4kioaevyGhpNkSixo8 q5Qg16YJ0nABEUh3GgJA7BQEHtnwV2NmCM3t0c9B+tJ7IdYoZdAy/MFZ4B9GnEjgeBDnInv2ay2qm jmrCqcUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZQlL-000000000TT-0c39; Fri, 04 Dec 2026 10:43:35 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZQlE-000000000Rj-2Wf2 for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 10:43:30 +0000 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-cdb2893531bso357365a12.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.infradead.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=lGuhwKnsZobhCLL71K16ON/SIEM/VS0R0PFqN4EncIKZ9B0Kkw4dQ9oRZTGOTFZthx hplwkgSKjONmCC8o6PKFUVr5y+fIZDZT3B3bE/37QnY3VTgSIbOqFoC439Iy28dpaIs4 5ggHbVW+KudLFVK6nvoJIny3NXoLxxedxvRizZHT+B/Ici2auIv5yVp0ijNrLV4ezutB k5XpN56zr4eLiYd44anXCZVoeAsztC7xl1TbeXUMUMK/6jFDES0ZKqSWnzoHPSYVU1OV pbDvIbUbQAdkCim2ah2QmpER6KNO3FykpiB4o9UGR/jG1qlGflMQYZhhsOuVHJRpPkcf yA2w== 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+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fJporNEuvGG0iiiP2YDcivnkfUIVZxKuUwxsSXVxg0SQ/DsF 6Xnl8NoKZp6RfFcq8Z7sLzlf7GvY4rH9Cv39sTj4JiaDgo+IvVz/c/bSdT37/p2fKa/XYqH 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-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_024328_652390_83B75A2D X-CRM114-Status: GOOD ( 19.05 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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