From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381006; b=arWqZkvADFTuK7qZdDxVKq3AvU00vZhVqvfdEDH/ZIjtpsaYPz5fIn91uClmc7T7bdeo hPy/jc9oweMhH6UoH3a0VpHPrwRtVZwEfxW9QQPtyb0E3u9rTo+M9NESYdboz48Mw0PI4 /4BtFlpt4t8ymwsJlJCY487Imr7gDgyoXX3PHtGaO0mhNdUmvlvRaBxJ86ofr2TQept0T ojWtIqXMMqvvt3FShAyW80jKDbpQFR4T8i2R0lntIn4Q2LZC6WaEt17lcQlDLTrJrKxxc VFGm22hqCaDFacHJfQyYEks0DY6ecWwbqiOMCwrYXztTCEtqzbt4trpqcvhJP95V+8A== 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-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=a0Kbr6mGWk3q2TZK79XvKJ7yERIB7hclW4QCReKSzSsGThOYZ5jadbplToM37J1FylVg la49Vh1lVIDCysGht7CuiIDE4fa7Z4EIqvFIawFZq3Qgr7gnvvGrXw8MfPw0SQy58BXK+ ZlqYg531bnUkMtmgI5BNkNBreQA2EeT2NgVJnV5Xl1gj0oNhBA1L4eLHnz5LCLZlsx4rM c6NeqP4rWwkikrq8TpxRR4x+Hc5ovOSXmsLVzOdPvnVoDPMR26IBRa1cX0ERfixYoybAh cJUZ2oKaMoZawm22L27/to0I+4LY9DWNnlMGeuuMFIIPJwoZ0alTZwDTRxUIWy5sIsQ== 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.172 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (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 6DFE5606A32C for ; Fri, 4 Dec 2026 10:43:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6DFE5606A32C 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-f172.google.com with SMTP id 41be03b00d2f7-cdb2893531bso357363a12.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=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=hUYlJMXHpimOP3EDftsvgqYJlp4x7LG/ygqx+UFQytI49thk5doJcd9KGKWEvJEmIX UrscqbguloW1/UR+dwPEldi1SNWljgvMgO4/aLKjKd9YyENX38NXNacO+LFW9fPPpiAw BeooR7BD8Lsg9sAY/iAmsynRdred0YU/J2Lj5hrO1Czc584r42nvnNh+OE66UpLJ04JI FKQlIhK1Q0JP6R/bDIAf4lj2WbZ+9VKToiMmqrv1nSJROBfPiLoRY2dgMy7Y7m4rN7mT 5P/u0Ol8usI4lQvuEag/y3N5anJigt0Mm/fd08+JkA8K/mEgP+oJbISzYQu870I/1Eqm +2/Q== X-Gm-Message-State: APuU4Z/vT9FNRkeo0233WOscoXz2ESumDGiEW9u7+gyQ4iKDVlLUdfYg 9ClEsYFu5u0d+IULqEZ7RjmecjBNn0iIC9phZ2spr8RE5w6fDYjHtmwk X-Gm-Gg: AZFdTZfuOII5NYuUxdAVuf2PKHXQ0AFl2TrcysLXX6HWsLvtELI3cXnqILdAD6kGoFT lH0gf9hyuHd0+JHSRns+bsjblx0MOEhMD+KDRUtsnDq7xE0ZO70+8p+dkPafMJbN/mOX2Z+KgE2 LhnsDKn1NmOu1oDdkV7HuzHKpLK6cwZms8kwmF7Hc7G2TOTbMLScZSqt1ojsjiuRSEGXPCI73Ij aVsNdsDYjXolZsIM1n/cycMuJEf7OD7EFGE7qxciw9EY+/rykp7kMmE95BxaU1VYr7+AjB7IElg E2NIZovF297x4wR9N7KEwKe2L871L+15AOOwroYabGiYoyzRZegv4XEZRpwIrjOXavgnd+TNtW8 RBmHWhZIFi44vbXwWN7atH2lGbs7inxbl7WvsfvoEEV6HMJzP32yazFt9HT/tNwEX/Sihw6rdv+ vVgSMbj0YTU7ntXp9RRlR04fc2V7HHS+xqCezWbmma6dw8ruWiL3pdYXs8Ujq8giGoCjaWH4IiD Wug5hSrR09szLlwGvSVOvkNCMNzlZUpRIknZyILwRIMKWFcQmO6Xty9dwYsohLF1OP48eKp 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-pm@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