From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 706C5372ED7 for ; Sat, 4 Jul 2026 17:14:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783185299; cv=none; b=rSicSatDGHYeeZDEOVsvIDuII3ahtCRqIJ6QyLYb3AOnJr0icQqqZ3nHogUM9Wjx/wbRLJcf+bXTxkjvw0/2E+BBlYJXO/PmVWEbu/CSZINyNzRx46FsP+aOyPHqOYZadyhnLgaX3uQDovkMtbvS/EWuUDpqiNGrv8ofo3Duqaw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783185299; c=relaxed/simple; bh=NNneVdy0HhxnlGFqTwE8omGAtOyN6+sEw6Qa8xG+YSU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HPLKpzPakWUkb8v0ZXzZKi51KC4BG8A3k57zH6cbqA/o+CkUYTxqqW1Sk4ATaOCGersPfAg+x+MtIlW6gXXMZEKaVqR64V+cPB/CriUyxTXcjKVlocFKZBRxSZhBXgv63s/crGuv6/jZSWjOc5wGELdI1FG/jxt1xVirSeLcGOU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cbfJ0Jxz; arc=none smtp.client-ip=209.85.210.181 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.b="cbfJ0Jxz" Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-847a52edeb2so1185573b3a.0 for ; Sat, 04 Jul 2026 10:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783185298; x=1783790098; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k6kKI5J8Ttv5I5yUn+NLV5sWRapXSwcPAxycZh/dkxc=; b=cbfJ0JxznZueHu7afssZnib+ma3xmpWl9ynuEYQPl2wTJfq3N6TKcSIPPQFaMr2mMW 83b7uvAiVUJUirC4A/YI7y3jAYLid340UzF4ic04/gJf1jLccjjri+bGyg/nc8BsmXB3 Pzbx01yC+hCt5FdDy9pFvBVFaGEc+3PAG7pmn0odc3Yq7YSsusjIY1nWxt7TVNvu04fC PjFnu2QVhklOM4LPjGmIQdnVHg3Ai3TFXpCnD0r1/2DRYRkZHv1YisSNTxLP+ffmqLLS Y62pbXu+LO/IfCbZgkAzQ7CpipNODBPPb/OPlCTc7d0X+FoHuxQM45JJEaesuQ2Ob0GK bPZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783185298; x=1783790098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=k6kKI5J8Ttv5I5yUn+NLV5sWRapXSwcPAxycZh/dkxc=; b=V4cQGOMAtYQ1DcGnYmP8CU1dqTxwg8p8koEhl0nYoqZvY8/qmGipRj0xEbStGc/8II mb/EYRNyc5lN3WUrC8Z2NVIGk5AOh3/oUB368u7yAaUI3RpGBI7R8GasqDGakRPZxEZk XEXt7x9RFhMK9X+vUoqaOxiWLJqBzZJU3GjxV5DXP/wOniCzo0mSmO8j9Q9fKvdl2BgF J0wXG8pDJQUsz1lnq2GH5pvKL13a77akxZTByJLSR1bSZy2aPa/8H7fEyL8S+J5HWyeu Bv0ugRNZvd0Fb5eHYGSx2Hv1/atyeLLfpneWv8YIolWVEHkc//Sf9yZsnoZ/hdV3PfZt iI3A== X-Forwarded-Encrypted: i=1; AFNElJ/uOVzwiRKLtHlG9PBiwyIsUvRBbmpQHzdaX6NqQ9rQnjRdzVtxS5/3qjH733N/vkK8LuyGz96LS7eL/Ps=@vger.kernel.org X-Gm-Message-State: AOJu0YyBa2pYLkiXyg5QTkluYd1wFcxjoCfKStMdaDzmgjoE4nDy+1OV QNxX6dUWSfLTMgVFikGjZBkF1Gkt8Dbf/QSq82o0pdLjKeazX+hFGRy2 X-Gm-Gg: AfdE7cnB1MtnEMGZWKzAH8YI/zPWhoAQ/+UyivltSZ1YmwsiisQirWD63T7g7jvkYIo LTpjVXNlJ08MkJdnfrNhZ2MVtBDy/kkmSap34slNr2rgzr3Rah4lmztxJ1uWHXe5WOpBHsun5WA CmpWAygGxEeg5H54Q+Pjeq0tZJK2rb+qhNIoWIQcYUyzzpsutnB0A6bqaOWPShqeuf09dXHFHED X1JyhQf6i3E5IObkg79pOZLRAxNnTv9KVKWoqRWMteqf1M123wZKyTwpHqtaLVgD3fG7X7CLNMz sCuKY2mF+7dt3k82y2gvjvZ2yAWxItA8Qp4owHGl8tMaF0De6snsDjvm0X6GyerlNH3WsfTa1j3 JIqbliTgcW8hg4lp7Hh32My+xkhUO3MhFp5Pm6WFNnPJTyMP6TBrP+EWqbq0uu0ACZBgEAUcO4f ddpMJ9 X-Received: by 2002:a05:6a00:4f92:b0:842:2ddb:e305 with SMTP id d2e1a72fcca58-847f6f69949mr3837076b3a.43.1783185297621; Sat, 04 Jul 2026 10:14:57 -0700 (PDT) Received: from archlinux ([212.192.12.80]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847f6d498adsm1379101b3a.32.2026.07.04.10.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2026 10:14:56 -0700 (PDT) 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 , Philipp Zabel 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 Subject: [PATCH v5 1/5] dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers Date: Sun, 5 Jul 2026 01:14:07 +0800 Message-ID: <20260704171411.1413349-2-iuncuim@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260704171411.1413349-1-iuncuim@gmail.com> References: <20260704171411.1413349-1-iuncuim@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add dt-bindings description of the thermal sensors in the A523 processor. The controllers require activation of the additional frequency of the associated gpadc controller, so a mod clock property required. The calibration data for both thermal controllers (THS0, THS1) is split across two nvmem cells at different offsets, requiring the two cells to be read and merged. To maintain backward compatibility, the name of the old cell remains "calibration" and the new cell is named "calibration-second-part". Signed-off-by: Mikhail Kalashnikov Reviewed-by: Chen-Yu Tsai --- .../thermal/allwinner,sun8i-a83t-ths.yaml | 54 +++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml index 3e61689f6..6f5b2f3b9 100644 --- a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml +++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml @@ -24,6 +24,8 @@ properties: - allwinner,sun50i-h5-ths - allwinner,sun50i-h6-ths - allwinner,sun50i-h616-ths + - allwinner,sun55i-a523-ths0 + - allwinner,sun55i-a523-ths1 clocks: minItems: 1 @@ -47,11 +49,16 @@ properties: maxItems: 1 nvmem-cells: - maxItems: 1 - description: Calibration data for thermal sensors + minItems: 1 + items: + - description: Calibration data for thermal sensors + - description: Additional cell in case of separate calibration data nvmem-cell-names: - const: calibration + minItems: 1 + items: + - const: calibration + - const: calibration-second-part allwinner,sram: maxItems: 1 @@ -107,6 +114,7 @@ allOf: enum: - allwinner,sun8i-h3-ths - allwinner,sun20i-d1-ths + - allwinner,sun55i-a523-ths0 then: properties: @@ -132,6 +140,29 @@ allOf: - clock-names - resets + - if: + properties: + compatible: + contains: + enum: + - allwinner,sun55i-a523-ths0 + - allwinner,sun55i-a523-ths1 + then: + properties: + clocks: + minItems: 2 + nvmem-cells: + minItems: 2 + nvmem-cell-names: + minItems: 2 + else: + properties: + nvmem-cells: + maxItems: 1 + nvmem-cell-names: + items: + - const: calibration + required: - compatible - reg @@ -176,4 +207,21 @@ examples: #thermal-sensor-cells = <1>; }; + - | + #include + #include + #include + + thermal-sensor@2009400 { + compatible = "allwinner,sun55i-a523-ths1"; + reg = <0x02009400 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_GPADC1>; + clock-names = "bus", "mod"; + resets = <&ccu RST_BUS_THS>; + nvmem-cells = <&ths_calibration0>, <&ths_calibration1>; + nvmem-cell-names = "calibration", + "calibration-second-part"; + #thermal-sensor-cells = <1>; + }; ... -- 2.55.0