Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.176 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381017; b=TktQtMozZLCbEJdb8K1oCWlXvAcRMc3HLeMmddq6M+88zUtCME8Z7pZaACBbaah5REIm lIYW8E7Y9cT5VI6tb5JP/nOck/ZOOhCpaQq4wI46M6JwOOrYIrYVo9Ij1DIAO7wQ5Y+8S ldZz3yvhwpr9NMDCugCiaZ6KwzwWM3phY7GFxyWIN4SSbcCbVxOzx+61xYmh3OhdWxOQs dhuRWRZv8d0b0plzd2SxbmKB/7M3+HIRLIDOR8lqkLVljI+JAIxjcj0SI5txfUw5i/jYH eWn/efN5SRKrXmnzlDy08O/pq/8B3uD9mcn+o1R/8AUj4qMEQ0PJe+pfSWTjxd14+aA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381017; 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:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=m7W0eIIPljak/EtTZzjqJwyhzSWtrV4oUPK30v6sxy4=; b=uNwA+kkm2edGgke0VXUU5XzumjeYz8kUW1eUKn+Jzz0Vg7WZmNLpSYthKoW8R9mQMHhf ZTAohsuomBfcKMZmM0sOAyFmUUvAHDcHEIs52IXUZU6Lj4HBczZ9qpkVVmOvWK4tcByC0 /Z6hb3qa7yXSlgitg2+ebwm8Pwyfwlie3GIexcZuPc+sy3VQvSRCQZlRjuSFPkGAlzrcR nF/TmKdaI7ouEhUllkMWZ09SFLTwbkGvus4wzdW2HH1aIR0AMo2Qxl923mJL2TjYlw/F2 jioSroWKz1NCtL/juF+iihPGQoqC05ssBUSsl8d6WX45h1whXXHITHCvzhRdy8NPYzw== 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=LQt5g+0R; arc=none smtp.remote-ip=209.85.215.176 Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) (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 1F83C606A337 for ; Fri, 4 Dec 2026 10:43:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1F83C606A337 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=LQt5g+0R Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-cddc597d062so498534a12.3 for ; Fri, 04 Dec 2026 02:43:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796381016; x=1796985816; 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:content-type; bh=m7W0eIIPljak/EtTZzjqJwyhzSWtrV4oUPK30v6sxy4=; b=LQt5g+0Rpoerws9/1MkExHQxeuFoxRAT810NWqCKdiNy2eYqjohOJQKjmhiMDIOLY6 jrzx2vA4eGRPBclQf5RXQ/2ErzCE8gzvm3CLo+vvXzpEg/XnfE7QnWwlXFAXzxsjR4vu LxzO/CYAtqXzfgTS4Vom9mo6Z4lzqiKkZQvOfQSBYkbKyWD5aTKERh/PFT3cWZEc33Y1 IMuiTlMiBpJ1J5hwLvDsqkh3OfNsiVm9kcp3Z5vX1bc+GiCWWNAqgxeWOG/g5K9O4tYJ kuCUUgcUk4G3N43xRlR/1k8Uv4uzjVC32ldVd83bef9JsYlOyG7OTML4Lg7spyd69Ui1 E35w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796381016; x=1796985816; 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:content-type; bh=m7W0eIIPljak/EtTZzjqJwyhzSWtrV4oUPK30v6sxy4=; b=slaGgURmSkLL4wsWxSnJmCiwZQVFzQyD7zY+CnYYqm7N6SmL/k6rGvKqh2Ky2BvOul 4kvdNAZiSLIha8qzEGlngzcdUJo4/3pXHNiCJ1KVz/rUc9XuAN4EUki/+M0p7hmChDhf QPPxFGD1vliPLmhqOpH+M3WVSdPLPDTKdiFrecGmFpBBfHdHhM7B6/DMRoqj5KULfhKY W3yufLLTmWumv4qMZZNxNf9oCTSn7W8bfnqht0gmQx5xGixawjX7HJv6h7BPo7KaaQJe az41Bff0veH+G9f4jqZ4wKojjNS9BUSoXRJbAPnwh3aUXjVtxjEyP2+4k6LgJw1e9qoa 8nYA== X-Forwarded-Encrypted: i=1; AL+hErFkDwpAY4J9BM3ZIcwbGNpvsIEj3WjJASPEASj1dCW9GaYWsH5yU/K1tIFucAcrVXNj1n1WOl2nNdCH@vger.kernel.org X-Gm-Message-State: APuU4Z+4OoJwVX6XXD7ZjarzajdnE2Q7Cpj2ViIr6Ax3QYq/res54Do8 0kSqrfBuOfEyUBDAxd+kNxg1wPFMCN5DpxDfe0R1RKNqWMc3q84cmRNO X-Gm-Gg: AZFdTZc08fpbP9x7ZaZ/5gyW98eKYeKq8fRQ0Cae8tPoeSCt86Pw8R0oJjUNQeGTzPS PVXFmFqjU8Vv9M+uJZ8d8Egn3qkPycCVXe5F3giXKNuLKuI0uXxfMNubCzWykOJHOyTVjhP9vT3 NkGodMlPeyGwcgbIVT/TOMK1eDgOExeVG+0Bj/zFqr75AKVXp2FFXQFnwKp5NtW3n5TzZM9Mfjf gkk80ztxbkGlI2i8nwWOxdrZsYtxQodlfjH/1RWgi3bDz5RQSc3nWImjkqAB7PPx90XMaj/7/gY OjzSIVvcPm51sQMwt5iFvcZUOnm1Y10WQDZpQPe7MKmACYre6a/IY2j101RKkv45sh+SXU/QP7h 4P34PUFlcIwhvoRsLl8gS4evHSi13XC3soSi/0i4WP7t/WVzxtntNsL5S294aknvZoegQmdbp10 b1IqPPIV/1G8v3UMSa8tPKrTRqQhd4ziWsYH4zNI3iR8lERK9+mLuW/4YwJxa4o7BkOQOsMVqv4 IpoSRh0YpgQlla7NAsFdFCHo52PL57fT/kgwz0mgytSz4EOa3VlYRaPQc1mIZPLb1SW/qQd X-Received: by 2002:a05:6a21:888e:b0:3dd:a197:ede6 with SMTP id adf61e73a8af0-41562918c07mr1538128637.53.1796381016407; Fri, 04 Dec 2026 02:43:36 -0800 (PST) Received: from archlinux ([2605:e440:15::152]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ce12a8d1edfsm399280a12.29.2026.12.04.02.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 02:43:35 -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 1/5] dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers Date: Fri, 4 Dec 2026 18:43:02 +0800 Message-ID: <05f62012c04954682f3090459e680de14e6eea37.1796378254.git.iuncuim@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: 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-Transfer-Encoding: 8bit The A523 has two thermal controllers built from the same register block, but they are wired differently and are not interchangeable in the device tree, so they need separate compatibles: * THS0 has a single sensor (DRAM) and is addressed without a sensor index, i.e. #thermal-sensor-cells = <0>. It uses CLK_GPADC0 and its own interrupt. * THS1 has four sensors (big CPU cluster, little CPU cluster, GPU and NPU) that are addressed by index, i.e. #thermal-sensor-cells = <1>. It uses CLK_GPADC1 and its own interrupt. A single compatible cannot describe both: #thermal-sensor-cells differs between them, and the driver also needs the sensor count to tell which calibration fields in the eFuse belong to which controller. Both controllers share the bus clock and the reset line, and both take their calibration data from the same two nvmem cells. 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 | 34 +++++++++++++++++-- 1 file changed, 31 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..792081af5 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,26 @@ allOf: - clock-names - resets + - if: + properties: + compatible: + contains: + enum: + - allwinner,sun55i-a523-ths0 + - allwinner,sun55i-a523-ths1 + then: + properties: + nvmem-cells: + minItems: 2 + nvmem-cell-names: + minItems: 2 + else: + properties: + nvmem-cells: + maxItems: 1 + nvmem-cell-names: + maxItems: 1 + required: - compatible - reg -- 2.56.1