From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.175 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381018; b=4wmyIY0uyK5VdvnXgyZYoDyIdtSH8S9R/fodvPLxM/XOhk6zOX/+reno9K7DoF43XiJW X07PN1xC9b9RE+6bZP3dDkkz01VGwbMYrg8f6XTwsbVGvf7C3J+4R5PJG+YPvZ17VtAJL GGzug69VuF1JGPJurTYBhZEHusOVsK/JrOtIsGGKSUmwjXWdPbapwf6cu3NkTPHDWgs7n QhYomuNkMlUBQGQsAcevFXH6ahlur0SVgBtYdmCSvy7IVxHKUrugv25lDPJ7rssRcj+yz uXk1dhINkE08AMNql3YR3HkOcw8PGRGGvGcuysxhyaICf405vV2s0LmQNsm/mxXw14g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381018; 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=ZRtoAWswo5SBQP58MtA+f4CvqKqls4oj32MQU/scUtgGS2XBdziYIw9t+XRSt18U2bJs t1IUjkbTp+pt6G2Z9JeQmykk1i34ber6QF9P8wQylRz6ZyxD7kKOX41IOqZYYaQ/zVhXu EIzqTtRJidK1HIXxWLBXvMXXSl6eKQqk8L6BrGzvPdUdocrZ4lEJ1RjK6az22dE4qJ/ls W19FVg5lvBfkwpFqJxXJDP4/n2X/+0hAlI40sWH15RY/iAeAgKPfNZx+tqlND/vZwawNf bCX07BQxVTfY9dqEUjAIg5iP2g6x4ATctYu10SE7IrjUFJf/XSDSlJF4ADCMYFCQ+Vw== 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.175 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (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 490AD606A334 for ; Fri, 4 Dec 2026 10:43:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 490AD606A334 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-f175.google.com with SMTP id 41be03b00d2f7-cddc597d062so498531a12.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=N3uOtowgGbQlL09eVi6GiTAwXx/BzHWRGG22QYkuCXSXwBECqR+qndWuz//zsQvUwA ONHPaxW12yI8WCD5EYP2kxJzgQOo2D/Y7X73pkSOsxW/J4eowKsyjmAXOGk7hwHI2lpr qv3BYU/BbMYluMKAdvc9z719d9i9YMouIA8rqiY8SLwuleBTQQGHJuWZqDxSSGTmZn93 ZYCW9DCPe0eZzgGnitnTlHzGaMNrqM6k+aHeup52xk7az3VOvS0G90VK5nyUoY9Rwih2 ZydFGntva8N3KJIE81SPBJEj1vH64oOmGtBWuJH80YWfXhVLgcApVB/slgOuLxNnRmzJ wGYg== X-Forwarded-Encrypted: i=1; AL+hErG1zwFfEhny6PzpbiKSVf1bgTCaOExQd9ApPvPObkXtKlBilVvgiC5SprcGGeBU4J3t3vqi+woA3/nIvI4=@vger.kernel.org X-Gm-Message-State: APuU4Z88jlC1b72NNaLssibwjg50WsVKNQB+3RYD6idLmQoML39gXVVG HsvRNDBGo0T1HG+w5lmgZkBeUZYcXJ6fyEbKkTwqCZiX7lUFMbYqKtOj X-Gm-Gg: AZFdTZdmCZcL5gM39wpMQVxXgrlWcxIOyZo+vsQRhcXl33VQ7h/KLdmaJRR7B6KEnNA mbqXF4qJcVqDCtpukLbNGHPQjc5tq06JFwIHATBS7iYsmTsXCLRJWKQgpCnWUJPDkzGIh0aZfwD MH6E6L+ZLM7NwahhcSxCm0rkqQpL8svEiA5vpD/gvv3K2b4tI5xXtbmZEdir8giWUzdjXc/PCLW 8HEmTS3THXYPqscXbIW8NHmEBwRzIrt9fCR2C6/N2YK0ZhqISaDASl/dtP/j45q7NLcWe22ddK4 N8YDoLZS+ZEcPN7e6R0QDeLD8FiG7vTwTfmIXu0Brqz+D7DlPYaZ8OdQeU/WePlndVNn3NhivwE TpFxd87eesC1aFZ7LyvxnvzE8q+u1XjM8Uf193nMybpaUt2Nv1iLBduMEs7JkDaKaC2gO9qNzMh X4O8NuzpsMmOUTmhhet1FZ0Sa3D7CYnXMpo5G2OzanYF4SvhQlUqtOvH+VdZCBmJuBR810LDVkc Fs6JGYEqCFPYE7y5FjukJvYViBmJy132JP+394yKrbOam8XCWXaKJPzc5Qm9wO7tOImAdyH 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: linux-kernel@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