From nobody Mon Jun 8 08:31:44 2026 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 B952848095F for ; Wed, 3 Jun 2026 13:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491625; cv=none; b=CSB7TTf67f2OzFHo4J29OODzpsRUWdbzzA53vRzOlOAdMaz7AqeSG3nWpa5bj152YcQF/f0PYU0cIW9jgWdxtXsEi3wMy62zIKk0bdUC7FiuU+EctOZ7m8ldjj+mOJK4h07YOmvVcZd1G0t53IOkIU4uxUgU8xa3xicFwPEFzU0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491625; c=relaxed/simple; bh=2NgviHNZdxpicEM9rd/dWgHY01rnKmCVPlo7M+lrE2E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F2nOCdZVgMSOqN267wD1lByOoKfiBJ5BcZbBt5DSvb5HEVWJsMZkCc8WrjvuDwesU+4xjgdDOfYOayUeIdeiQ7j6kF5vT3OTjs9XZZx5YCc7PbWvDRSb+AejR+qEFR0TbDv+twGeHLN3r+7mU3GzXDbMXVn2T75WxOWPvPlv4NQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Rt0XiKF/; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Rt0XiKF/" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-490b09e4cccso17378305e9.0 for ; Wed, 03 Jun 2026 06:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780491619; x=1781096419; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0UJRcwfUx7m4tQO0H7dzGL7l03jX+wNFvSSTwQ2iw18=; b=Rt0XiKF/kE2Bzaw9uZMtgERZFKaVVkutUoZUlv2H2DzvyWIhpwxFu5kiQE253tLuK2 uKRe4WXUCRlQ4x7DJS1/ov55YulxEz77HnMsjmSnOtlq54uz7yZhApop5Ae/xGyF3WFn w7OBOfLMd25jOrEm/48kv683bmcussw48mH5HwvUEyVPpMFN3WVUgQ170cFn7KoQaNAf UOA+PZw2+xMExxf1KAvR7W090Ic+M0o0Ao03t0czuAkzG5PmXwRgoJoO0oNhj3StiI7f oIHDXNk5f8aoW4lF8FyyJLibQq2GXnaS+tX+TCFPrxyNYzISAcKMD3SI+ZJXq0VcCqL1 l4ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780491619; x=1781096419; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=0UJRcwfUx7m4tQO0H7dzGL7l03jX+wNFvSSTwQ2iw18=; b=fqV/1ONm5kdnXELdZp+DhBu0w9ZxBg1smFMa9+6INSo52SLXzcdxagEX2k12SK9mWJ 4CktToDkXGptRl2h/0J7c85FGRyO0o3cnQuDqx7Hh34YlsKSP2L6+MqlWgQ+DFrx6uMP amxZLDZYQEmT3UK82Ndq/WuVew9Bc0VfditrSHwoipJR5dbWr2ai1EHNt42LpWPeAwpz 1xK8kHzVW8vCpmONjBfFOZi2pHGkOUzqjSQrs46k30ZVExLRkDRc/ZK4qJHOT+xtH5Lt xlNYSFMhJtoqboYUpu1AnoShtselhuhL4iI5LvvDLkUmuyV2zfnRI0K+6nELZqR7d2vm fSWw== X-Forwarded-Encrypted: i=1; AFNElJ+BPKS+0JOgjUkWrKGLeghkuBhsqpSZBFCGZo+UCjswSCojtbUi6sGmN6SL6EvvIzQYvLGrcehHOr99f10=@vger.kernel.org X-Gm-Message-State: AOJu0YyZW/Zw7NUKE08cDxwWh8w5nyWA4uE7G776Gzr9nOejeGMLIQMB oINYzkrJnGUAcnNKSl77rGmcmEFvPIW1PPjjVBgdt3X5Nc564F4ll8MqDCu3/vVsWoA= X-Gm-Gg: Acq92OFeaUbPtnVXY8vzZQtdfbEymQyByRtU1BRlSP+32NOz4cFl7e3Bq/jH7M2CkZo /Yz33f5EkdXrqrBd0Gu3dyLPOorWMwA9PyARaSONJ9yH3fGi4SN9vUPwaP5lNqUs5/FpsV6yHpK 4gDCMjjx1DwBGQ1+bp82271tVreMpkf4OFOKtOAX8OySkp0d2CmZ97OYW1QXJ2yyy4ouH7Ms7cH xC8NXWgl4DmGxIp77xaun/8PunZHGto5r4DPqmt+rEX/0Lvkbc2JKee27Sfa2/o1J+fLVQx/WN7 u7nchTPw+3SCXog/6pBkndjwbZwpFZhypZvg3i0gy3P4xTb+CvnXf05dxwN8LU0dsAFWKgOaL6J gZw5qjqacA92e4aXaD+LIYJ8dTMLZ0/Mduroal9v8wuwGsaqL5un9NrtR65sqz9Dyc9HDB3zbsL wVWdk7PLywTPB3xLM6pJkryCWaYMhVtU9zcAA7NzJA+5UfquJq530OzLLiuoRwqg59dLH6mqfz+ WOqOXre01O0fho= X-Received: by 2002:a05:600c:314d:b0:485:9a50:3370 with SMTP id 5b1f17b1804b1-490b5ead1b7mr52139485e9.8.1780491619214; Wed, 03 Jun 2026 06:00:19 -0700 (PDT) Received: from ta2.c.googlers.com (213.53.77.34.bc.googleusercontent.com. [34.77.53.213]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490b0e88fdesm149179045e9.14.2026.06.03.06.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 06:00:18 -0700 (PDT) From: Tudor Ambarus Date: Wed, 03 Jun 2026 13:00:16 +0000 Subject: [PATCH v8 1/5] dt-bindings: thermal: Add Google GS101 TMU Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260603-acpm-tmu-v8-1-0f1810a356e6@linaro.org> References: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> In-Reply-To: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Kees Cook , "Gustavo A. R. Silva" , Peter Griffin , =?utf-8?q?Andr=C3=A9_Draszik?= , Alim Akhtar Cc: jyescas@google.com, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tudor Ambarus , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1780491617; l=3395; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=2NgviHNZdxpicEM9rd/dWgHY01rnKmCVPlo7M+lrE2E=; b=iPBfwCGJRkej/sxT+TtxA4HdlGWcPjWO694Z6qcPCKaUvKC1gLbqJWYHQRCMrbAH+I6HE7L1Q N4obNagGADtCS7KOAAHw3xE0kMuWt1vS+m5IVmg4jZfk1fneqUkTrV/ X-Developer-Key: i=tudor.ambarus@linaro.org; a=ed25519; pk=uQzE0NXo3dIjeowMTOPCpIiPHEz12IA/MbyzrZVh9WI= Document the Thermal Management Unit (TMU) found on the Google GS101 SoC. The GS101 TMU utilizes a hybrid control model shared between the Application Processor (AP) and the ACPM (Alive Clock and Power Manager) firmware. This hybrid ACPM TMU architecture is also present on other Samsung Exynos SoCs (e.g., AutoV920, Exynos850). While the TMU is a standard memory-mapped IP block, on this platform the AP's direct register access is restricted to the interrupt pending (INTPEND) registers for event identification. High-level functional tasks, such as sensor initialization, threshold programming, and temperature reads, are delegated to the ACPM firmware. Signed-off-by: Tudor Ambarus Reviewed-by: Krzysztof Kozlowski Reviewed-by: Peter Griffin --- .../bindings/thermal/google,gs101-tmu-top.yaml | 69 ++++++++++++++++++= ++++ 1 file changed, 69 insertions(+) diff --git a/Documentation/devicetree/bindings/thermal/google,gs101-tmu-top= .yaml b/Documentation/devicetree/bindings/thermal/google,gs101-tmu-top.yaml new file mode 100644 index 000000000000..75560ebca48d --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/google,gs101-tmu-top.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/google,gs101-tmu-top.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung Exynos ACPM Thermal Management Unit (TMU) + +maintainers: + - Tudor Ambarus + +description: + The Samsung Exynos ACPM TMU is a thermal sensor block found on Exynos + based platforms (such as Google GS101 and Exynos850). It supports + both direct register-level access and firmware-mediated management + via the ACPM (Alive Clock and Power Manager) firmware. + + On these platforms, the hardware is managed in a hybrid fashion. The + Application Processor (AP) maintains direct memory-mapped access + exclusively to the interrupt pending registers to identify thermal + events. All other functional aspects - including sensor + initialization, threshold configuration, and temperature acquisition + - are handled by the ACPM firmware. The AP coordinates these + operations through the ACPM IPC protocol. + +properties: + compatible: + const: google,gs101-tmu-top + + reg: + maxItems: 1 + + clocks: + items: + - description: APB peripheral clock (PCLK) for TMU register access. + + interrupts: + maxItems: 1 + + "#thermal-sensor-cells": + const: 1 + + samsung,acpm-ipc: + $ref: /schemas/types.yaml#/definitions/phandle + description: Phandle to the ACPM IPC node. + +required: + - compatible + - reg + - clocks + - interrupts + - "#thermal-sensor-cells" + - samsung,acpm-ipc + +additionalProperties: false + +examples: + - | + #include + #include + + thermal-sensor@100a0000 { + compatible =3D "google,gs101-tmu-top"; + reg =3D <0x100a0000 0x800>; + clocks =3D <&cmu_misc CLK_GOUT_MISC_TMU_TOP_PCLK>; + interrupts =3D ; + #thermal-sensor-cells =3D <1>; + samsung,acpm-ipc =3D <&acpm_ipc>; + }; --=20 2.54.0.1013.g208068f2d8-goog From nobody Mon Jun 8 08:31:44 2026 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 9A919480DC2 for ; Wed, 3 Jun 2026 13:00:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491627; cv=none; b=bH9veRCogvAjYvCm/6aHz3mPVwFAO0c9CUmvdF2irlTQ7zZvxL3hIpQ529g0SAAlHvqQWeHn14+aP84YkUZTvM707QbNpkeZtxX8/sbIK9SD1Rd56VnyZMXZkuGc8TQAi2+Xd+0b8KfCFz4Mx6oc/BtMq49aAlQoWPB9wrrQNq4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491627; c=relaxed/simple; bh=L8v3EYAUiT6C34JPD44o4/uuwglyWt1JMyCEvUEhSOQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uOJ1kKhPvAys/xtgwPZsv2RsgF8g5CTKnODe/STIZKIMByldnxxt+ar8SPBKPl2y0SpJgafABSqUhGyD/6wtxmX4TSyIOscKQUI9VaCJD6/IomwJ6vjQCkj37X1yQAVUL+6uOJv4O5+TawZJKxRRdfe48qtpHXOshmWXOhOF7zI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=DuIkDSJt; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DuIkDSJt" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-490b3637b90so16413395e9.3 for ; Wed, 03 Jun 2026 06:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780491620; x=1781096420; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=IfFF8/scD19d21SgsZGdSirdfz4/iCA8FkyPFLuIgVI=; b=DuIkDSJt7OwL3/89OXBByiqyn0AHgsMTJSkJAuDuDO9XW1nsFNiNJ+RVx25zuuqtMh 10aV+H0UB2D+lKNOCU6OOqIf8z82YH8r7NVtIf49ktJvCgBlID4cm2XbHX46wdyCb+bW vWhbroBfka7kw9JxQ8nKFPwdvnlmhUVlQ0T3CNP5ByZPUbpObMrJaR74w3LswVQrrsoD OM0K0vV+PuUCrRI1LsJtgKQ1EjMIQoeF3KpOukXNkxafF6/ZjjojOEZP3gmcu/r/M3OD TQt4JnkqZefi9s7qdB+2UHWgW2poPwwLlE+B/0deIw9VFR2Ny2zniiCCVA7yNu2uAy1J ENOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780491620; x=1781096420; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=IfFF8/scD19d21SgsZGdSirdfz4/iCA8FkyPFLuIgVI=; b=rxeJ8Yh6oSot/yR/xsi2tV1LCMGSL0Pv9mOV4TuDfCk4wYzOhYmxK31NJpALM59Avw vF4eBHCeasXYL7OEeDFDB5MnaeFKa6zJqJwHW4iQ+Zxbg3D2z15b/T6Kj4R/TiZZQ0ca ht1ph9oI+GV5TEsVUN0YqeaIMgh11ocMrgcubK9xrgqXm2oGr2y9Fq3YOeNugra72JEn KMiIqgi5PDojyseKuZOX7nOPZr/sG4ce2FHuuGadX7C1OPUIPuQuq1ySYPb3CzfarVHL FbIwpJh3FXup55gjv1HFDQ+H6n/vV0JyEMwcJheWNDgWwrnBFkPBXY45RU2HETxbGjLB U3xA== X-Forwarded-Encrypted: i=1; AFNElJ+izUif7tcrCqtMU+wLSw5AVBHNTzVhRgUu5sDA0Y5HiNDYYsSmAeDzH6WzFuOp+5l6yLCE4vHnvt3rbF0=@vger.kernel.org X-Gm-Message-State: AOJu0YwKhL1s3pLk/bCk7mD/zOh2nAdxI36iEn66YJ5X+LZMOF7pFCCh dQ4Z55S7dWi5I8IUEId8e8EN69ccG/6rItf61ULSzccAgdRvYmOnTf33y1DyclUBhEs= X-Gm-Gg: Acq92OEtMuhMN5S5tUez8LaN6WD5egVYdd7Kv7VmPLjeiFAs9Sj4iigvqiraIHhd1z+ VVuqsd8ekaumrCvh6pM29VTtjRvzzWfyfpNGqWjFxph7/+l8vzaA1TK9433u9Qzx+UmJ0HblNuy ASZ/kmC2BvLo5cXJJG6DCO6SPmi4zIYQpce5Q60hN2Rcavu7TwdMV3Eozh90j9vn5pxcfOVe6n2 MJZAFyMIpfODckfHYGACmZIFAXU6xvaiXaI8vGvpT5honXpgxRSPiW8KY0zsuRA9ZfgGhOiWhEv 3G8Fup1hUMPZX8eyg4eUfOllKVp4pyr/CHtkXIVDJwzVhGMJ6pVWy6eBdgR8q8IdvYfW2AeMxC8 ccmRXC/UiuUNzzf68jh5BSSAKFR9Tu5iNdMTjJnk1gPw6O3kF1V8t38JVAtGaWf8J4O1Icp5VtV IMmprCjsPpXvA56FFbs6leALDuH2ZZMx48qU4pdOzbbI3owcUHAfiK58Ydhdv7dKoX2UZPiGzUe UjfUHn2POZc7cM= X-Received: by 2002:a05:600c:154f:b0:490:af90:f9c2 with SMTP id 5b1f17b1804b1-490b5eae33dmr56495555e9.12.1780491619831; Wed, 03 Jun 2026 06:00:19 -0700 (PDT) Received: from ta2.c.googlers.com (213.53.77.34.bc.googleusercontent.com. [34.77.53.213]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490b0e88fdesm149179045e9.14.2026.06.03.06.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 06:00:19 -0700 (PDT) From: Tudor Ambarus Date: Wed, 03 Jun 2026 13:00:17 +0000 Subject: [PATCH v8 2/5] thermal: samsung: Add Exynos ACPM TMU driver GS101 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260603-acpm-tmu-v8-2-0f1810a356e6@linaro.org> References: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> In-Reply-To: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Kees Cook , "Gustavo A. R. Silva" , Peter Griffin , =?utf-8?q?Andr=C3=A9_Draszik?= , Alim Akhtar Cc: jyescas@google.com, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tudor Ambarus , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1780491617; l=20617; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=L8v3EYAUiT6C34JPD44o4/uuwglyWt1JMyCEvUEhSOQ=; b=PJLzP7zcqe1jYQd8/L6II0IAxz/+fXZecqXsL5O4m+IcStvy92N9peCTZHRs2ibSLwtZzRMNo 3Va/9Qv/mZXCMUeOVhC2KOtIIesCtViau+k6JnI4TJretpgONQwmzwt X-Developer-Key: i=tudor.ambarus@linaro.org; a=ed25519; pk=uQzE0NXo3dIjeowMTOPCpIiPHEz12IA/MbyzrZVh9WI= Add driver for the Thermal Management Unit (TMU) managed via the Alive Clock and Power Manager (ACPM), found on Samsung Exynos SoCs such as the Google GS101. The TMU on the GS101 utilizes a hybrid management model shared between the Application Processor (AP) and the ACPM firmware. The driver maintains direct memory-mapped access to the TMU interrupt pending registers to identify thermal events, while delegating functional tasks - such as sensor initialization, threshold configuration, and temperature acquisition, to the ACPM firmware via the ACPM IPC protocol. Signed-off-by: Tudor Ambarus Acked-by: Krzysztof Kozlowski Acked-by: Peter Griffin Reviewed-by: Alexey Klimov --- drivers/thermal/samsung/Kconfig | 19 ++ drivers/thermal/samsung/Makefile | 2 + drivers/thermal/samsung/acpm-tmu.c | 651 +++++++++++++++++++++++++++++++++= ++++ 3 files changed, 672 insertions(+) diff --git a/drivers/thermal/samsung/Kconfig b/drivers/thermal/samsung/Kcon= fig index f4eff5a41a84..bf9fb52e848e 100644 --- a/drivers/thermal/samsung/Kconfig +++ b/drivers/thermal/samsung/Kconfig @@ -9,3 +9,22 @@ config EXYNOS_THERMAL the TMU, reports temperature and handles cooling action if defined. This driver uses the Exynos core thermal APIs and TMU configuration data from the supported SoCs. + +config EXYNOS_ACPM_THERMAL + tristate "Exynos ACPM thermal management unit driver" + depends on THERMAL_OF + depends on HAS_IOMEM + depends on EXYNOS_ACPM_PROTOCOL + default ARCH_EXYNOS + help + Support for the Thermal Management Unit (TMU) on Samsung Exynos SoCs + utilizing the ACPM IPC protocol, such as the Google GS101. + + The TMU on these platforms is managed through a hybrid architecture. + This driver handles direct register access for thermal interrupt status + monitoring and communicates with the Alive Clock and Power Manager + (ACPM) firmware via the ACPM IPC protocol for functional sensor control + and configuration. + + Select this if you want to monitor device temperature and enable + thermal mitigation on Samsung Exynos ACPM based devices. diff --git a/drivers/thermal/samsung/Makefile b/drivers/thermal/samsung/Mak= efile index f139407150d2..daed80647c34 100644 --- a/drivers/thermal/samsung/Makefile +++ b/drivers/thermal/samsung/Makefile @@ -4,3 +4,5 @@ # obj-$(CONFIG_EXYNOS_THERMAL) +=3D exynos_thermal.o exynos_thermal-y :=3D exynos_tmu.o +obj-$(CONFIG_EXYNOS_ACPM_THERMAL) +=3D exynos_acpm_thermal.o +exynos_acpm_thermal-y :=3D acpm-tmu.o diff --git a/drivers/thermal/samsung/acpm-tmu.c b/drivers/thermal/samsung/a= cpm-tmu.c new file mode 100644 index 000000000000..f9802080acd7 --- /dev/null +++ b/drivers/thermal/samsung/acpm-tmu.c @@ -0,0 +1,651 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright 2019 Samsung Electronics Co., Ltd. + * Copyright 2025 Google LLC. + * Copyright 2026 Linaro Ltd. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../thermal_hwmon.h" + +#define EXYNOS_TMU_SENSOR(i) BIT(i) +#define EXYNOS_TMU_SENSORS_MAX_COUNT 16 + +#define GS101_CPUCL2_SENSOR_MASK (EXYNOS_TMU_SENSOR(0) | \ + EXYNOS_TMU_SENSOR(6) | \ + EXYNOS_TMU_SENSOR(7) | \ + EXYNOS_TMU_SENSOR(8) | \ + EXYNOS_TMU_SENSOR(9)) +#define GS101_CPUCL1_SENSOR_MASK (EXYNOS_TMU_SENSOR(4) | \ + EXYNOS_TMU_SENSOR(5)) +#define GS101_CPUCL0_SENSOR_MASK (EXYNOS_TMU_SENSOR(1) | \ + EXYNOS_TMU_SENSOR(2)) + +#define GS101_REG_INTPEND(i) ((i) * 0x50 + 0xf8) + +enum { + P0_INTPEND, + P1_INTPEND, + P2_INTPEND, + P3_INTPEND, + P4_INTPEND, + P5_INTPEND, + P6_INTPEND, + P7_INTPEND, + P8_INTPEND, + P9_INTPEND, + P10_INTPEND, + P11_INTPEND, + P12_INTPEND, + P13_INTPEND, + P14_INTPEND, + P15_INTPEND, + REG_INTPEND_COUNT, +}; + +struct acpm_tmu_sensor_group { + u16 mask; + u8 id; +}; + +struct acpm_tmu_sensor { + const struct acpm_tmu_sensor_group *group; + struct thermal_zone_device *tzd; + struct acpm_tmu_priv *priv; + struct mutex lock; /* protects sensor state */ + bool enabled; +}; + +struct acpm_tmu_priv { + struct regmap_field *regmap_fields[REG_INTPEND_COUNT]; + struct acpm_handle *handle; + struct device *dev; + struct clk *clk; + unsigned int mbox_chan_id; + unsigned int num_sensors; + int irq; + struct acpm_tmu_sensor sensors[] __counted_by(num_sensors); +}; + +struct acpm_tmu_driver_data { + const struct reg_field *reg_fields; + const struct acpm_tmu_sensor_group *sensor_groups; + unsigned int num_sensor_groups; + unsigned int mbox_chan_id; +}; + +#define ACPM_TMU_SENSOR_GROUP(_mask, _id) \ + { \ + .mask =3D _mask, \ + .id =3D _id, \ + } + +static const struct acpm_tmu_sensor_group gs101_sensor_groups[] =3D { + ACPM_TMU_SENSOR_GROUP(GS101_CPUCL2_SENSOR_MASK, 0), + ACPM_TMU_SENSOR_GROUP(GS101_CPUCL1_SENSOR_MASK, 1), + ACPM_TMU_SENSOR_GROUP(GS101_CPUCL0_SENSOR_MASK, 2), +}; + +static const struct reg_field gs101_reg_fields[REG_INTPEND_COUNT] =3D { + [P0_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(0), 0, 31), + [P1_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(1), 0, 31), + [P2_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(2), 0, 31), + [P3_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(3), 0, 31), + [P4_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(4), 0, 31), + [P5_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(5), 0, 31), + [P6_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(6), 0, 31), + [P7_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(7), 0, 31), + [P8_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(8), 0, 31), + [P9_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(9), 0, 31), + [P10_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(10), 0, 31), + [P11_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(11), 0, 31), + [P12_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(12), 0, 31), + [P13_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(13), 0, 31), + [P14_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(14), 0, 31), + [P15_INTPEND] =3D REG_FIELD(GS101_REG_INTPEND(15), 0, 31), +}; + +static const struct regmap_config gs101_regmap_config =3D { + .reg_bits =3D 32, + .reg_stride =3D 4, + .val_bits =3D 32, + .use_relaxed_mmio =3D true, + .max_register =3D GS101_REG_INTPEND(15), +}; + +static const struct acpm_tmu_driver_data acpm_tmu_gs101 =3D { + .reg_fields =3D gs101_reg_fields, + .sensor_groups =3D gs101_sensor_groups, + .num_sensor_groups =3D ARRAY_SIZE(gs101_sensor_groups), + .mbox_chan_id =3D 9, +}; + +static int acpm_tmu_op_tz_control(struct acpm_tmu_sensor *sensor, bool on) +{ + struct acpm_tmu_priv *priv =3D sensor->priv; + struct acpm_handle *handle =3D priv->handle; + const struct acpm_tmu_ops *ops =3D &handle->ops->tmu; + int ret; + + ret =3D ops->tz_control(handle, priv->mbox_chan_id, sensor->group->id, + on); + if (ret) + return ret; + + sensor->enabled =3D on; + + return 0; +} + +static void acpm_tmu_control_rollback(struct acpm_tmu_priv *priv, int star= t_idx) +{ + int i; + + for (i =3D start_idx; i >=3D 0; i--) { + struct acpm_tmu_sensor *sensor =3D &priv->sensors[i]; + int ret; + + if (!sensor->tzd) + continue; + + mutex_lock(&sensor->lock); + ret =3D acpm_tmu_op_tz_control(sensor, false); + mutex_unlock(&sensor->lock); + if (ret) + dev_err(priv->dev, "Rollback: Failed to disable sensor %d: %d\n", + i, ret); + } +} + +static int acpm_tmu_control(struct acpm_tmu_priv *priv, bool on, bool roll= back) +{ + struct device *dev =3D priv->dev; + int i, ret, err =3D 0; + + ret =3D pm_runtime_resume_and_get(dev); + if (ret < 0) + return ret; + + for (i =3D 0; i < priv->num_sensors; i++) { + struct acpm_tmu_sensor *sensor =3D &priv->sensors[i]; + + /* Skip sensors that weren't found in DT */ + if (!sensor->tzd) + continue; + + mutex_lock(&sensor->lock); + ret =3D acpm_tmu_op_tz_control(sensor, on); + mutex_unlock(&sensor->lock); + if (ret) { + if (!err) + err =3D ret; + + /* On enable, stop on first error if rollback is requested */ + if (on && rollback) { + acpm_tmu_control_rollback(priv, i - 1); + break; + } + } + } + + pm_runtime_put_sync(dev); + + return err; +} + +static int acpm_tmu_get_temp(struct thermal_zone_device *tz, int *temp) +{ + struct acpm_tmu_sensor *sensor =3D thermal_zone_device_priv(tz); + struct acpm_tmu_priv *priv =3D sensor->priv; + struct acpm_handle *handle =3D priv->handle; + const struct acpm_tmu_ops *ops =3D &handle->ops->tmu; + struct device *dev =3D priv->dev; + int acpm_temp =3D 0, ret; + + /* + * Fast path: check locklessly if the sensor is enabled to avoid + * expensive runtime PM operations when it is disabled. Any race with + * concurrent disabling is caught by the second check under the lock + * after PM resume. + */ + if (!sensor->enabled) + return -EAGAIN; + + ret =3D pm_runtime_resume_and_get(dev); + if (ret < 0) + return ret; + + scoped_guard(mutex, &sensor->lock) { + if (!sensor->enabled) { + ret =3D -EAGAIN; + } else { + ret =3D ops->read_temp(handle, priv->mbox_chan_id, + sensor->group->id, &acpm_temp); + } + } + + pm_runtime_put_autosuspend(dev); + + if (ret) + return ret; + + *temp =3D acpm_temp * MILLIDEGREE_PER_DEGREE; + + return 0; +} + +static int acpm_tmu_update_thresholds(struct acpm_tmu_sensor *sensor, + u8 thresholds[2], u8 inten) +{ + struct acpm_tmu_priv *priv =3D sensor->priv; + struct acpm_handle *handle =3D priv->handle; + const struct acpm_tmu_ops *ops =3D &handle->ops->tmu; + unsigned int mbox_chan_id =3D priv->mbox_chan_id; + u8 acpm_sensor_id =3D sensor->group->id; + bool was_enabled; + int ret, restore_ret; + + guard(mutex)(&sensor->lock); + + was_enabled =3D sensor->enabled; + + if (was_enabled) { + ret =3D acpm_tmu_op_tz_control(sensor, false); + if (ret) + return ret; + } + + ret =3D ops->set_threshold(handle, mbox_chan_id, acpm_sensor_id, + thresholds, 2); + if (!ret) { + ret =3D ops->set_interrupt_enable(handle, mbox_chan_id, + acpm_sensor_id, inten); + } + + if (was_enabled) { + restore_ret =3D acpm_tmu_op_tz_control(sensor, true); + if (restore_ret) + dev_err(priv->dev, "Failed to restore sensor state: %d\n", + restore_ret); + if (!ret) + ret =3D restore_ret; + } + + return ret; +} + +static int acpm_tmu_set_trips(struct thermal_zone_device *tz, int low, int= high) +{ + struct acpm_tmu_sensor *sensor =3D thermal_zone_device_priv(tz); + struct acpm_tmu_priv *priv =3D sensor->priv; + struct device *dev =3D priv->dev; + u8 thresholds[2] =3D {}; + u8 inten =3D 0; + int ret; + + /* If a valid lower bound exists, set the threshold and enable its interr= upt */ + if (low > -INT_MAX) { + thresholds[0] =3D clamp_val(low / MILLIDEGREE_PER_DEGREE, 0, 255); + inten |=3D BIT(0); + } + + /* If a valid upper bound exists, set the threshold and enable its interr= upt */ + if (high < INT_MAX) { + thresholds[1] =3D clamp_val(high / MILLIDEGREE_PER_DEGREE, 0, 255); + inten |=3D BIT(1); + } + + ret =3D pm_runtime_resume_and_get(dev); + if (ret) + return ret; + + ret =3D acpm_tmu_update_thresholds(sensor, thresholds, inten); + + pm_runtime_put_autosuspend(dev); + + return ret; +} + +static const struct thermal_zone_device_ops acpm_tmu_sensor_ops =3D { + .get_temp =3D acpm_tmu_get_temp, + .set_trips =3D acpm_tmu_set_trips, +}; + +static int acpm_tmu_has_pending_irq(struct acpm_tmu_sensor *sensor, + bool *pending_irq) +{ + struct acpm_tmu_priv *priv =3D sensor->priv; + unsigned long mask =3D sensor->group->mask; + int i, ret; + u32 val; + + guard(mutex)(&sensor->lock); + + for_each_set_bit(i, &mask, EXYNOS_TMU_SENSORS_MAX_COUNT) { + ret =3D regmap_field_read(priv->regmap_fields[i], &val); + if (ret) + return ret; + + if (val) { + *pending_irq =3D true; + break; + } + } + + return 0; +} + +static irqreturn_t acpm_tmu_thread_fn(int irq, void *id) +{ + struct acpm_tmu_priv *priv =3D id; + struct acpm_handle *handle =3D priv->handle; + const struct acpm_tmu_ops *ops =3D &handle->ops->tmu; + struct device *dev =3D priv->dev; + bool handled =3D false; + int i, ret; + + ret =3D pm_runtime_resume_and_get(dev); + if (ret) { + dev_err(dev, "Failed to resume: %d\n", ret); + return IRQ_NONE; + } + + for (i =3D 0; i < priv->num_sensors; i++) { + struct acpm_tmu_sensor *sensor =3D &priv->sensors[i]; + bool pending_irq =3D false; + + if (!sensor->tzd) + continue; + + ret =3D acpm_tmu_has_pending_irq(sensor, &pending_irq); + if (ret || !pending_irq) + continue; + + handled =3D true; + + scoped_guard(mutex, &sensor->lock) { + ret =3D ops->clear_tz_irq(handle, priv->mbox_chan_id, + sensor->group->id); + if (ret) + dev_err(priv->dev, "Sensor %d: failed to clear IRQ (%d)\n", + i, ret); + } + + thermal_zone_device_update(sensor->tzd, + THERMAL_EVENT_UNSPECIFIED); + } + + pm_runtime_put_autosuspend(dev); + + return handled ? IRQ_HANDLED : IRQ_NONE; +} + +static const struct of_device_id acpm_tmu_match[] =3D { + { .compatible =3D "google,gs101-tmu-top" }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, acpm_tmu_match); + +static int acpm_tmu_probe(struct platform_device *pdev) +{ + const struct acpm_tmu_driver_data *data =3D &acpm_tmu_gs101; + struct acpm_handle *acpm_handle; + struct device *dev =3D &pdev->dev; + struct acpm_tmu_priv *priv; + struct regmap *regmap; + void __iomem *base; + int i, ret; + + acpm_handle =3D devm_acpm_get_by_phandle(dev); + if (IS_ERR(acpm_handle)) + return dev_err_probe(dev, PTR_ERR(acpm_handle), + "Failed to get ACPM handle\n"); + + priv =3D devm_kzalloc(dev, + struct_size(priv, sensors, data->num_sensor_groups), + GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->dev =3D dev; + priv->handle =3D acpm_handle; + priv->mbox_chan_id =3D data->mbox_chan_id; + priv->num_sensors =3D data->num_sensor_groups; + + platform_set_drvdata(pdev, priv); + + base =3D devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return dev_err_probe(dev, PTR_ERR(base), "Failed to ioremap resource\n"); + + regmap =3D devm_regmap_init_mmio(dev, base, &gs101_regmap_config); + if (IS_ERR(regmap)) + return dev_err_probe(dev, PTR_ERR(regmap), "Failed to init regmap\n"); + + ret =3D devm_regmap_field_bulk_alloc(dev, regmap, priv->regmap_fields, + data->reg_fields, REG_INTPEND_COUNT); + if (ret) + return dev_err_probe(dev, ret, + "Unable to map syscon registers\n"); + + priv->clk =3D devm_clk_get(dev, NULL); + if (IS_ERR(priv->clk)) + return dev_err_probe(dev, PTR_ERR(priv->clk), + "Failed to get the clock\n"); + + priv->irq =3D platform_get_irq(pdev, 0); + if (priv->irq < 0) + return dev_err_probe(dev, priv->irq, "Failed to get irq\n"); + + pm_runtime_set_autosuspend_delay(dev, 100); + pm_runtime_use_autosuspend(dev); + + ret =3D devm_pm_runtime_enable(dev); + if (ret) + return dev_err_probe(dev, ret, "Failed to enable runtime PM\n"); + + ret =3D pm_runtime_resume_and_get(dev); + if (ret < 0) + return dev_err_probe(dev, ret, "Failed to resume device\n"); + + ret =3D acpm_handle->ops->tmu.init(acpm_handle, priv->mbox_chan_id); + if (ret) { + ret =3D dev_err_probe(dev, ret, "Failed to init TMU\n"); + goto err_pm_put; + } + + for (i =3D 0; i < priv->num_sensors; i++) { + struct acpm_tmu_sensor *sensor =3D &priv->sensors[i]; + + mutex_init(&sensor->lock); + sensor->group =3D &data->sensor_groups[i]; + sensor->priv =3D priv; + + sensor->tzd =3D devm_thermal_of_zone_register(dev, i, sensor, + &acpm_tmu_sensor_ops); + if (IS_ERR(sensor->tzd)) { + ret =3D PTR_ERR(sensor->tzd); + if (ret =3D=3D -ENODEV) { + sensor->tzd =3D NULL; + dev_dbg(dev, "Sensor %d not used in DT, skipping\n", i); + continue; + } + + ret =3D dev_err_probe(dev, ret, "Failed to register sensor %d\n", i); + goto err_rollback; + } + + mutex_lock(&sensor->lock); + ret =3D acpm_tmu_op_tz_control(sensor, true); + mutex_unlock(&sensor->lock); + if (ret) { + ret =3D dev_err_probe(dev, ret, "Failed to enable sensor %d\n", i); + goto err_rollback; + } + + thermal_zone_device_update(sensor->tzd, + THERMAL_EVENT_UNSPECIFIED); + + ret =3D devm_thermal_add_hwmon_sysfs(dev, sensor->tzd); + if (ret) + dev_warn(dev, "Failed to add hwmon sysfs!\n"); + } + + ret =3D devm_request_threaded_irq(dev, priv->irq, NULL, + acpm_tmu_thread_fn, IRQF_ONESHOT, + dev_name(dev), priv); + if (ret) { + ret =3D dev_err_probe(dev, ret, "Failed to request irq\n"); + goto err_rollback; + } + + pm_runtime_put_autosuspend(dev); + + return 0; + +err_rollback: + acpm_tmu_control_rollback(priv, i - 1); +err_pm_put: + pm_runtime_dont_use_autosuspend(dev); + pm_runtime_put_sync(dev); + return ret; +} + +static void acpm_tmu_remove(struct platform_device *pdev) +{ + struct acpm_tmu_priv *priv =3D platform_get_drvdata(pdev); + + /* Stop IRQ first to prevent race with thread_fn */ + disable_irq(priv->irq); + + /* + * Disable autosuspend to force the subsequent pm_runtime_put_sync() + * inside acpm_tmu_control() to synchronously suspend the device + * immediately, preventing clock leaks when the driver is removed. + */ + pm_runtime_dont_use_autosuspend(&pdev->dev); + acpm_tmu_control(priv, false, false); +} + +static int acpm_tmu_suspend(struct device *dev) +{ + struct acpm_tmu_priv *priv =3D dev_get_drvdata(dev); + struct acpm_handle *handle =3D priv->handle; + const struct acpm_tmu_ops *ops =3D &handle->ops->tmu; + int ret, restore_ret; + + ret =3D acpm_tmu_control(priv, false, false); + if (ret) + goto err_restore_sensors; + + /* APB clock not required for this specific msg */ + ret =3D ops->suspend(handle, priv->mbox_chan_id); + if (ret) + goto err_restore_sensors; + + ret =3D pm_runtime_force_suspend(dev); + if (ret) + goto err_resume_acpm; + + return 0; + +err_resume_acpm: + restore_ret =3D ops->resume(handle, priv->mbox_chan_id); + if (restore_ret) + dev_err(dev, "Failed to resume ACPM after force suspend failure: %d\n", + restore_ret); + +err_restore_sensors: + restore_ret =3D acpm_tmu_control(priv, true, false); + if (restore_ret) + dev_err(dev, "Failed to re-enable TMU after suspend failure: %d\n", + restore_ret); + + return ret; +} + +static int acpm_tmu_resume(struct device *dev) +{ + struct acpm_tmu_priv *priv =3D dev_get_drvdata(dev); + struct acpm_handle *handle =3D priv->handle; + const struct acpm_tmu_ops *ops =3D &handle->ops->tmu; + int ret, restore_ret; + + /* APB clock not required for this specific msg */ + ret =3D ops->resume(handle, priv->mbox_chan_id); + if (ret) + return ret; + + ret =3D pm_runtime_force_resume(dev); + if (ret) + goto err_suspend_acpm; + + ret =3D acpm_tmu_control(priv, true, true); + if (ret) + goto err_suspend_pm; + + return 0; + +err_suspend_pm: + restore_ret =3D pm_runtime_force_suspend(dev); + if (restore_ret) + dev_err(dev, "Failed to force suspend during resume rollback: %d\n", + restore_ret); +err_suspend_acpm: + restore_ret =3D ops->suspend(handle, priv->mbox_chan_id); + if (restore_ret) + dev_err(dev, "Failed to suspend ACPM during resume rollback: %d\n", + restore_ret); + return ret; +} + +static int acpm_tmu_runtime_suspend(struct device *dev) +{ + struct acpm_tmu_priv *priv =3D dev_get_drvdata(dev); + + clk_disable_unprepare(priv->clk); + + return 0; +} + +static int acpm_tmu_runtime_resume(struct device *dev) +{ + struct acpm_tmu_priv *priv =3D dev_get_drvdata(dev); + + return clk_prepare_enable(priv->clk); +} + +static const struct dev_pm_ops acpm_tmu_pm_ops =3D { + SYSTEM_SLEEP_PM_OPS(acpm_tmu_suspend, acpm_tmu_resume) + RUNTIME_PM_OPS(acpm_tmu_runtime_suspend, acpm_tmu_runtime_resume, NULL) +}; + +static struct platform_driver acpm_tmu_driver =3D { + .driver =3D { + .name =3D "gs-tmu", + .pm =3D pm_ptr(&acpm_tmu_pm_ops), + .of_match_table =3D acpm_tmu_match, + }, + .probe =3D acpm_tmu_probe, + .remove =3D acpm_tmu_remove, +}; +module_platform_driver(acpm_tmu_driver); + +MODULE_AUTHOR("Tudor Ambarus "); +MODULE_DESCRIPTION("Samsung Exynos ACPM TMU Driver"); +MODULE_LICENSE("GPL"); --=20 2.54.0.1013.g208068f2d8-goog From nobody Mon Jun 8 08:31:44 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 1EF7D480952 for ; Wed, 3 Jun 2026 13:00:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491626; cv=none; b=TVLY3JpB3mrTUPeFyZsyNJepaittJ3Ag74MqCWz12fOtZRZwfXtMp+WnMpD7wph3TkFaoEK5M0to1riHTyxK4M26HZbz+ZGx4m2JzgLNUMMtonFEj5jhhWOtn0DS7oRfO8iNbtiEzduglnOgw8zU4Sfb9+goGoB21CKe1QAo0iY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491626; c=relaxed/simple; bh=BuCPimd0wnIGZnAHNo8kq3fbLznVxR/5ajKR3GVVTto=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NN8m7sHvjxKZIJo2nE/ljwoTyRwuoElkKrAFAeDyJL4UzMi0U6YcebyWqVkwXamaKjloPBERLNXX/CSDsX/ElsK19s5B+9c2L2wrgZLZP7dH1/I60QAu2RcMBdoMpqdFbP2D+9DA0tkMUUS5JQQH7Gt9x889CXG+PDGjb7WLBrs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=eLhrpkLz; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eLhrpkLz" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-490b8a97b11so7587755e9.0 for ; Wed, 03 Jun 2026 06:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780491620; x=1781096420; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Sk5k1GMtYr/HULN9/BDkc9qWrRFDftSIlp3dBX3ccaI=; b=eLhrpkLzrMhpBdXJxSskzpA+dYNMjGSqQfyYFqyiowQZIeRUVXPB0uIBk3jXq2SCm2 2k6OORU+0vzcoYmcUemsCW3ul9SHVj0NSjk/2sD7lPWMm5ztBM+UbK3WyFDX4UQUrMDi GRKKxmBJRGJvrSi/8ZcyNhGZdvKjHRWVfBoiEcpaXIYma7urvPGqWgde+veYcFt6GjXQ J3d76/oPA3EP9rWn9oXqEVsHu5/3rZ/eyyHxMF5v3hKnRCOYRfv5yRIEM5kujy2B/Ma6 e+5ovPhP2Hjkh2RSqpWLN6hWRYrRnOquk5UZiP4wrDt0REWxEoXyxX8hAxv7Ilagunv2 /FpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780491620; x=1781096420; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Sk5k1GMtYr/HULN9/BDkc9qWrRFDftSIlp3dBX3ccaI=; b=P8DJinjlZjis8LNC+kwCR6WSRvGL9AS3u2cHqY028eH1uKZZm9PK57+tJ7zOGgLIOB DB9z5P5e43Y8acGMMly5+uwF9xjnh9TRPv1kz3qPFhWRbqzQ2/fj3R1d+BcOvEVdES5R hUk/LesqEC4tIu+yiTw5B7M5a/3t3s9FTm+4J5cYJAoOOdr3ytE4su8u9aePEjw9FebL /BMPDKMKhZyfSTU6iYhjrB978o9SOs/1ziE8HZkB3X5Ehum3GywyKTWMn2RkZonY8YUP NOY4Lu0gIZ8QCKAUoWMCnKdIW47ZR0hKQxyuuc+W0sjDepY7ypTJCd7ZNUUX7Y2DC2oA BvzQ== X-Forwarded-Encrypted: i=1; AFNElJ+84fTXncNwHUdMTyncSgtvtZMlzBDNy3MDJqIZQoSgkLwAXvsyVjER/RaDcNexks4qyspuY9yOP4lEhZ8=@vger.kernel.org X-Gm-Message-State: AOJu0YwUxDYnQIgMBT58rUJs8YvknOTe/Mb3rKmfZlWb7NwvR2A0SR4p rJIPBUGpgpMjwsV9casYPusy3CLSmqXOHGc+WUvCov0qZgVIQoNcYYz8LxEfxHNt+ro= X-Gm-Gg: Acq92OFilYQ5uPzKNHHu54/Z9FRkWVFpzKKTijw/y1GygtB+q5Mko1+KEAqBa2CvIk6 gn+19KwjfowFS8SuRhktqkeWpBSq6Pca48TizQXA+g6CGlGCWo2AwUhTHEkZJ9mrMo3P03VZrk1 mAAP5Ko6fBrnGaQLt04tjtteTH43hl6UKbvNruB++rlcrvpY1AujI7eYlCfGBuqNIfM1/0hepTH ydHbfsbJO6VwHJpv8gpVsLW3ed9ML/MPQboyfpQD9R9Iz8jDDY9EcYFyFY4ecTo7Yb8kvPmFPDz V59sxRFK5l7Xww3Pa2XmTtawtoJFpWvfEnxqM4FZQyw4iMHyOLW82ioP/3BjtnxFNv7ayJq3R6+ G6j5B7EoaTKGX3xp9pmdWynf5h5F0y+GepVCsOr03+8ND2ye5mRO9oH2DEEYlk00ENIjeQVlnkI nJ37ddN1m4P76HGmccKgYD0nhAUaZvWTM99LO2VyHk6UfbiiEngQIqp1b0i7hoBqqpCo2SBRu4D 7lAImelvxY84WA= X-Received: by 2002:a05:600c:35ca:b0:490:5527:3be2 with SMTP id 5b1f17b1804b1-490b60e3d76mr59120555e9.32.1780491620405; Wed, 03 Jun 2026 06:00:20 -0700 (PDT) Received: from ta2.c.googlers.com (213.53.77.34.bc.googleusercontent.com. [34.77.53.213]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490b0e88fdesm149179045e9.14.2026.06.03.06.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 06:00:19 -0700 (PDT) From: Tudor Ambarus Date: Wed, 03 Jun 2026 13:00:18 +0000 Subject: [PATCH v8 3/5] MAINTAINERS: Add entry for Samsung Exynos ACPM thermal driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260603-acpm-tmu-v8-3-0f1810a356e6@linaro.org> References: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> In-Reply-To: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Kees Cook , "Gustavo A. R. Silva" , Peter Griffin , =?utf-8?q?Andr=C3=A9_Draszik?= , Alim Akhtar Cc: jyescas@google.com, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tudor Ambarus , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1780491617; l=989; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=BuCPimd0wnIGZnAHNo8kq3fbLznVxR/5ajKR3GVVTto=; b=DDZhmy4QEP4ZUJ3uSYAEbuRQYdLBa/kBCUb/9RRroulU8b4Zq9zpGbgR2jB1y/YeZYSXwq35u DpIMVH9L39wDoT0TXUDdgkEeWc0sFgtrSbGO061VKn883T2zS0XCYWP X-Developer-Key: i=tudor.ambarus@linaro.org; a=ed25519; pk=uQzE0NXo3dIjeowMTOPCpIiPHEz12IA/MbyzrZVh9WI= Add a MAINTAINERS entry for the Samsung Exynos ACPM thermal driver. Signed-off-by: Tudor Ambarus Reviewed-by: Krzysztof Kozlowski Reviewed-by: Peter Griffin --- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e8218c2749b7..6a8521270daf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -23661,6 +23661,14 @@ F: drivers/clk/samsung/clk-acpm.c F: drivers/firmware/samsung/exynos-acpm* F: include/linux/firmware/samsung/exynos-acpm-protocol.h =20 +SAMSUNG EXYNOS ACPM THERMAL DRIVER +M: Tudor Ambarus +L: linux-kernel@vger.kernel.org +L: linux-samsung-soc@vger.kernel.org +S: Supported +F: Documentation/devicetree/bindings/thermal/google,gs101-tmu-top.yaml +F: drivers/thermal/samsung/acpm-tmu.c + SAMSUNG EXYNOS MAILBOX DRIVER M: Tudor Ambarus L: linux-kernel@vger.kernel.org --=20 2.54.0.1013.g208068f2d8-goog From nobody Mon Jun 8 08:31:44 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 D7D0A480DC6 for ; Wed, 3 Jun 2026 13:00:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491626; cv=none; b=mhl+ezTB4M0yoJHxqanU3EkUSvcKtwTpfbZnC1DWdHQkrtE8+8uGfQba29HANVN+x+3wGrNzp5OQFoBKkw2TbC7ZTum63wZ/AUoKZhucVsCbNvkuc+HjMYs799T7QdY5VuyiR74qoMtwaeBddXTB+ibbOKQ/31mqipCHoQ/eaYs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491626; c=relaxed/simple; bh=cWhAhaDFLAoUDdG0hR8RPClQQZ34eSbbH9qVOO1JS/c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Oe0nW89lUVx0iVZJjajWHGVmvl5SJ3aABdIH/uJhE6abCE7QWJaM/dMzar2vxsTxeRvzDWwKS4ljIqd8FwUY8JDn/s/6oA+3ftU393wNrbZVltgWVtVB6M26yt++2PEvcxZYct3KR+UWzQkKR5OH6xdNC1rQlZWtfz1/pxXq8cY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=CnFDO00c; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CnFDO00c" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-490b8a97b11so7588005e9.0 for ; Wed, 03 Jun 2026 06:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780491621; x=1781096421; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SDntjNasVGG8hcuxF4CdQbpDwBoTb2ZE5Gcryz3TjxU=; b=CnFDO00cJc/quJ1sGG42UA/Is6igTz/TVST2fimRM7HL9pgljiG3GuuCROFQXGFDXa eA9hA90gcs1PMoi7/ViGNNQoORCblIofSzUlnk6R49N+ibOlvbA8m4ueJ6RDbzAz2yoE bBTibEes7ftgKk/yDuGukiHnGpjnOovOPhW8i3vUUUcfg1sGyz9FLY13z4ylV7bqCYkB tkJ+erg2zw92uYe14Xp/hLOjgViXcZWrmVZvwCw4u0vYbPHNw4zyYAFccd+n3f5BYdFQ U480hAB8YsXcyAotERC2dHyJlh8d4QAZQQyb/Mlhlpgr/I7JynKBP5O4/TFkUBL8n8Ng be6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780491621; x=1781096421; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=SDntjNasVGG8hcuxF4CdQbpDwBoTb2ZE5Gcryz3TjxU=; b=Ktw6cghnACQvexaFLMkXpdNE+P0STXNUQ59yHsxZG/ONLmY4KGP/J6MRRJe6bcjfxE KBGWgzAgxaetqDhlwfxDmedULJtOp2POOpJBTApeHMkX6YPvxa5ITSYTocYfDtl8Fx9O PKtzAbdf2+6CR8UJtruUersI1IS9n1u8H61LLp5tgLhHQRUFP2En7ij8bqxz+ZePLBc8 gXT1NHIP1IVjDRUQg1gJiNIYQ3LTZACWC6tYJ0v7/MFWWzDRgDQnY13KlUdnrsVGoHfX Mq8T/c0ILL69hPTSr0Kaln1TBOKPRcT3j+EO+pr3Es7m1ucJd631jXia+rlOIukfJqJW 2+7g== X-Forwarded-Encrypted: i=1; AFNElJ/LIpqG9rKdg4HbJdCUcpbGF89ZyM+0yBwqkpekKLJYS3jIKwyT2mBuqDZQORzdHjVTFtjvIhIN5ZiqqBA=@vger.kernel.org X-Gm-Message-State: AOJu0YxuSJQwEn/9njCYuw7cmjivkpt9mjdEFzYttR86fUCHcRsDvR9n YNlFPHaz9aB6+8Y+zaqdZHVb1cHxBPCWoukUv6ti7Ndqfv/Rxt+coel5OWpv4IP5OkQ= X-Gm-Gg: Acq92OEhEGe/CxfouhpGKl6eMB6qGTJ0uXOWZqU2wqUyeWkoYpfFgxXuhFk+2bWT3y5 Ttu9gX9tF4E0S6jFvRRDhXAk3Ug3mPcW3IfVGL3lQn35vBJcYE3BtF2ASydlDUb8t42xA9rlAtb yhZed/Y/LXTgZyza+he8dQ2dx39TlChtj5pJ95ITon9euVaPikxoa4fgCGfIWJsUUbxL4ye8Xcp sRWUN1rAKQMBz7Z8RDc5/LA2Vs8Y04LoRrHIKCajB5iH1MWcVoAoXF7yGT3KLy1G3oubSadFFjF 1LMGjXcExQ+3jk2/NSm+P1x0JKAT1qikX074gnarWKI1LIYpBF5fAozbjxpINyJkAiO+eMKPTe5 m/PFbszhfoxX4zCqnzMxOrG0WOBlWpq0zEs2CZVm6X8vvBbxLPknsSvQr75KMDdX82kuVUK+WWE ng9NLTDHqfPU71kIsVK4/mauKfYSCMerxdUw6LNpx9UTHz7qsM0JKL85vtpWVa51VpmDe/rsZdP k36XbxRhHa46uo= X-Received: by 2002:a05:600c:8b2e:b0:490:50c5:8153 with SMTP id 5b1f17b1804b1-490b5e73ed4mr49003975e9.2.1780491621044; Wed, 03 Jun 2026 06:00:21 -0700 (PDT) Received: from ta2.c.googlers.com (213.53.77.34.bc.googleusercontent.com. [34.77.53.213]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490b0e88fdesm149179045e9.14.2026.06.03.06.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 06:00:20 -0700 (PDT) From: Tudor Ambarus Date: Wed, 03 Jun 2026 13:00:19 +0000 Subject: [PATCH v8 4/5] arm64: dts: exynos: gs101: Add thermal management unit Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260603-acpm-tmu-v8-4-0f1810a356e6@linaro.org> References: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> In-Reply-To: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Kees Cook , "Gustavo A. R. Silva" , Peter Griffin , =?utf-8?q?Andr=C3=A9_Draszik?= , Alim Akhtar Cc: jyescas@google.com, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tudor Ambarus X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1780491617; l=7066; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=cWhAhaDFLAoUDdG0hR8RPClQQZ34eSbbH9qVOO1JS/c=; b=ogaFOarH37mKKfZkKdM3JA6Ux75FZWCi5G1lm2w1RD+KSFoJrZ6p4E85O5NzxQnlgCIPF3ltT fTsN47poVh8Due6kgJIn4pdlJIj7wlqzaOQW/XRMu6bvTRqLvcc6k9b X-Developer-Key: i=tudor.ambarus@linaro.org; a=ed25519; pk=uQzE0NXo3dIjeowMTOPCpIiPHEz12IA/MbyzrZVh9WI= Add the Thermal Management Unit (TMU) support for the Google GS101 SoC. Describe the TMU using a consolidated SoC node that includes memory resources for interrupt identification and a phandle to the ACPM IPC interface for functional control. Define thermal zones for the little, mid, and big CPU clusters, including associated trip points and cooling-device maps to enable thermal mitigation. Signed-off-by: Tudor Ambarus --- arch/arm64/boot/dts/exynos/google/gs101-tmu.dtsi | 136 +++++++++++++++++++= ++++ arch/arm64/boot/dts/exynos/google/gs101.dtsi | 18 +++ 2 files changed, 154 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/gs101-tmu.dtsi b/arch/arm64/= boot/dts/exynos/google/gs101-tmu.dtsi new file mode 100644 index 000000000000..b27d1a539ec2 --- /dev/null +++ b/arch/arm64/boot/dts/exynos/google/gs101-tmu.dtsi @@ -0,0 +1,136 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Google GS101 TMU configurations device tree source + * + * Copyright 2020 Samsung Electronics Co., Ltd. + * Copyright 2020 Google LLC. + * Copyright 2026 Linaro Ltd. + */ + +#include + +/ { + thermal-zones { + cpucl2-thermal { + polling-delay-passive =3D <0>; + polling-delay =3D <0>; + thermal-sensors =3D <&tmu_top 0>; + + trips { + big_switch_on: big-switch-on { + temperature =3D <80000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + big_mitigate: big-mitigate { + temperature =3D <90000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + + big_hot: big-hot { + temperature =3D <100000>; + hysteresis =3D <5000>; + type =3D "hot"; + }; + + big_critical: big-critical { + temperature =3D <105000>; + hysteresis =3D <2000>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&big_mitigate>; + cooling-device =3D <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpucl1-thermal { + polling-delay-passive =3D <0>; + polling-delay =3D <0>; + thermal-sensors =3D <&tmu_top 1>; + + trips { + mid_switch_on: mid-switch-on { + temperature =3D <80000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + mid_mitigate: mid-mitigate { + temperature =3D <90000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + + mid_hot: mid-hot { + temperature =3D <100000>; + hysteresis =3D <5000>; + type =3D "hot"; + }; + + mid_critical: mid-critical { + temperature =3D <105000>; + hysteresis =3D <2000>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&mid_mitigate>; + cooling-device =3D <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpucl0-thermal { + polling-delay-passive =3D <0>; + polling-delay =3D <0>; + thermal-sensors =3D <&tmu_top 2>; + + trips { + little_switch_on: little-switch-on { + temperature =3D <80000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + little_mitigate: little-mitigate { + temperature =3D <90000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + + little_hot: little-hot { + temperature =3D <100000>; + hysteresis =3D <5000>; + type =3D "hot"; + }; + + little_critical: little-critical { + temperature =3D <105000>; + hysteresis =3D <2000>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&little_mitigate>; + cooling-device =3D <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot= /dts/exynos/google/gs101.dtsi index 86933f22647b..b6866ef99fb3 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi @@ -74,6 +74,7 @@ cpu0: cpu@0 { compatible =3D "arm,cortex-a55"; reg =3D <0x0000>; clocks =3D <&acpm_ipc GS101_CLK_ACPM_DVFS_CPUCL0>; + #cooling-cells =3D <2>; enable-method =3D "psci"; cpu-idle-states =3D <&ananke_cpu_sleep>; capacity-dmips-mhz =3D <250>; @@ -86,6 +87,7 @@ cpu1: cpu@100 { compatible =3D "arm,cortex-a55"; reg =3D <0x0100>; clocks =3D <&acpm_ipc GS101_CLK_ACPM_DVFS_CPUCL0>; + #cooling-cells =3D <2>; enable-method =3D "psci"; cpu-idle-states =3D <&ananke_cpu_sleep>; capacity-dmips-mhz =3D <250>; @@ -98,6 +100,7 @@ cpu2: cpu@200 { compatible =3D "arm,cortex-a55"; reg =3D <0x0200>; clocks =3D <&acpm_ipc GS101_CLK_ACPM_DVFS_CPUCL0>; + #cooling-cells =3D <2>; enable-method =3D "psci"; cpu-idle-states =3D <&ananke_cpu_sleep>; capacity-dmips-mhz =3D <250>; @@ -110,6 +113,7 @@ cpu3: cpu@300 { compatible =3D "arm,cortex-a55"; reg =3D <0x0300>; clocks =3D <&acpm_ipc GS101_CLK_ACPM_DVFS_CPUCL0>; + #cooling-cells =3D <2>; enable-method =3D "psci"; cpu-idle-states =3D <&ananke_cpu_sleep>; capacity-dmips-mhz =3D <250>; @@ -122,6 +126,7 @@ cpu4: cpu@400 { compatible =3D "arm,cortex-a76"; reg =3D <0x0400>; clocks =3D <&acpm_ipc GS101_CLK_ACPM_DVFS_CPUCL1>; + #cooling-cells =3D <2>; enable-method =3D "psci"; cpu-idle-states =3D <&enyo_cpu_sleep>; capacity-dmips-mhz =3D <620>; @@ -134,6 +139,7 @@ cpu5: cpu@500 { compatible =3D "arm,cortex-a76"; reg =3D <0x0500>; clocks =3D <&acpm_ipc GS101_CLK_ACPM_DVFS_CPUCL1>; + #cooling-cells =3D <2>; enable-method =3D "psci"; cpu-idle-states =3D <&enyo_cpu_sleep>; capacity-dmips-mhz =3D <620>; @@ -146,6 +152,7 @@ cpu6: cpu@600 { compatible =3D "arm,cortex-x1"; reg =3D <0x0600>; clocks =3D <&acpm_ipc GS101_CLK_ACPM_DVFS_CPUCL2>; + #cooling-cells =3D <2>; enable-method =3D "psci"; cpu-idle-states =3D <&hera_cpu_sleep>; capacity-dmips-mhz =3D <1024>; @@ -158,6 +165,7 @@ cpu7: cpu@700 { compatible =3D "arm,cortex-x1"; reg =3D <0x0700>; clocks =3D <&acpm_ipc GS101_CLK_ACPM_DVFS_CPUCL2>; + #cooling-cells =3D <2>; enable-method =3D "psci"; cpu-idle-states =3D <&hera_cpu_sleep>; capacity-dmips-mhz =3D <1024>; @@ -639,6 +647,15 @@ watchdog_cl1: watchdog@10070000 { status =3D "disabled"; }; =20 + tmu_top: thermal-sensor@100a0000 { + compatible =3D "google,gs101-tmu-top"; + reg =3D <0x100a0000 0x800>; + clocks =3D <&cmu_misc CLK_GOUT_MISC_TMU_TOP_PCLK>; + interrupts =3D ; + samsung,acpm-ipc =3D <&acpm_ipc>; + #thermal-sensor-cells =3D <1>; + }; + trng: rng@10141400 { compatible =3D "google,gs101-trng", "samsung,exynos850-trng"; @@ -1862,3 +1879,4 @@ timer { }; =20 #include "gs101-pinctrl.dtsi" +#include "gs101-tmu.dtsi" --=20 2.54.0.1013.g208068f2d8-goog From nobody Mon Jun 8 08:31:44 2026 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 6EED8480976 for ; Wed, 3 Jun 2026 13:00:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491626; cv=none; b=mpBDgjguMSqygBOhFspvo22QKTqW7GMtECK8mdRp/MyYgBOHqTnYzZ1ck9MqMb7ZoIlxyBToU3obwluKWvkg1ZV/hJnTLYoF18NqHrVh4xzrzXyUu+VWr9vDUBAKX55hJiXUKuKeO86B6xvUay2wkq46UWk+0q47UUjt0OHb+lU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780491626; c=relaxed/simple; bh=APjGOr4rSujMx24P1jDIzhjkfbHKcFK80a9vPvVqD0g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CVh5lf6uHzFOTrh9nVAkQitw/PO0at8FedUpy/p8kiSOEyDqN4Fo2v9lV5JGWL/8fGj8yvaW64po1mSn+zFkRqdbsQ4GuX0zt/tt32rwGlbOXs689gLmql5wFK2YFBjt71pEfjjuMuWHITxMrYe36r81h4b5vSpqSivFN0KzFHg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=H60+FdSI; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="H60+FdSI" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-45efb698ef2so2353464f8f.3 for ; Wed, 03 Jun 2026 06:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780491622; x=1781096422; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=b9xxE0a97UY7UPF7zz4jpUqke1DXutWR5PtyvwLwWtU=; b=H60+FdSIK0d3TQlXZqVLUkCtY/lctO0prfhYmP1S8D56KoexvFUQ6TKkoHr1o6uobv yECXpi74UwlsqROZbEacxQhfzQwScY8w5fiWTvPfV/N157MKzYsVsqExV6yFU/cbU4xY P6vhnrXVtLLBwJrrObutvjy2IYNcbWCXafLBpYrsDt+8tLetgVOL94dE2OZgr9ChJeMC UD4awGN1HEyKo6T7kVyjZCOEccZW+CahRv43up+sZWOkpw1B3MWFvEeJ4eos3x3blkai 4bsk2fq+nEPIilwRowP1meKxZkqrCr4eY5DLLXewDRmmUukz69mUhKmJ0JSrfGf1DWjh PWaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780491622; x=1781096422; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=b9xxE0a97UY7UPF7zz4jpUqke1DXutWR5PtyvwLwWtU=; b=pNbJ2ppu4jM3GsU3Z+f+8hZbx/jGq7G8noeEgNEDuLjX6IKEVlYTtRiQoXPcdfXdSh TWLi8l/qXd1ToBRTUtNOgbQA/eL6y40yQkEeIxmgt8FKyrJceYGUGIPVHotSmNrweIsa hdF6qukA6HCqQt1/Q9FgfjxWu6QM50sTL9CeQln5545K/DIiU82aijAyyebSwWSWmP5r cgauYx7Uw14SX3DcdGosol3hFzQGqDC4aJWDGXIZzYMO9tN7BuMK288PtQ3YqgivWbra Cj++v/FV7lHmT6UPa+JuhfqR2me5fs+2hAvmlLydKBqXPabrkqM7LQPT4YrJc+11S+oX T8Rw== X-Forwarded-Encrypted: i=1; AFNElJ8fz4so0jLhNxXyrGJW4goP1NEfSjCLhTJ+u9ew6AfxyWpJcsMvGbziTXgrOxK6oBX20bZJHuUb+8iNFo4=@vger.kernel.org X-Gm-Message-State: AOJu0YxpSE1mrcFs05XGe6iNAZg3Ro0ePudQbGb7yb6W78tX0MrKtvsf rtGdESRqbdJ7t0e3RVraValnPvj3qKS4TqNMnHSLMdRV3tV9yCV18e4N3B8BllzWVmk= X-Gm-Gg: Acq92OGx3Fe7RHjkeikB8dsuZgPDsSNRqmXGdQs3bR0D7oTEvYErKPrAEUn4+FBKNqE bfg8AAlG6dkMMI9q4lXrnaDmt4kDP4SwI5ke2ZCOUTivqmh8XXeYKUh769mxOCk0Nrz231dIDh3 exiYLS/2Swhq51MSa2a9JiZlmBUYZwC9IAHWHS2pyMVCEy1kHPuDTwe6RWXEr13bQ4XxfcYyoZD l2JCTMsa47Le3eOqjoCsKREYK/uk9qsYVqnKPQRtkI8rAxGOpry2l1c3w2twAmM9LxwsvhgjqdC 5IAx2ng14K5TLNYLIIsYUhTmvMQM9aMw7ClyJOuNZr39O+73OFidScDYVRHTeCDCoHFOZuA71II pjnVQ3ePm2amPCpeKKJqdSZFWMK9AyJfInnIqEM6VMY3T6TYDkeUWv4DiuMTDpUt0ivM/beHPDk R+JMuany67ToB5pBzlQlVxbiOFhxKiKMVtGK/4ddl68SunL81xmavASjs0JjdS74B2OdoOABr8I wobY1znOKgtRCc= X-Received: by 2002:a05:600c:c174:b0:490:b2a6:8c2b with SMTP id 5b1f17b1804b1-490b5eb82b2mr55987505e9.10.1780491621605; Wed, 03 Jun 2026 06:00:21 -0700 (PDT) Received: from ta2.c.googlers.com (213.53.77.34.bc.googleusercontent.com. [34.77.53.213]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490b0e88fdesm149179045e9.14.2026.06.03.06.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 06:00:21 -0700 (PDT) From: Tudor Ambarus Date: Wed, 03 Jun 2026 13:00:20 +0000 Subject: [PATCH v8 5/5] arm64: defconfig: enable Exynos ACPM thermal support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260603-acpm-tmu-v8-5-0f1810a356e6@linaro.org> References: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> In-Reply-To: <20260603-acpm-tmu-v8-0-0f1810a356e6@linaro.org> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Kees Cook , "Gustavo A. R. Silva" , Peter Griffin , =?utf-8?q?Andr=C3=A9_Draszik?= , Alim Akhtar Cc: jyescas@google.com, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tudor Ambarus X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1780491617; l=795; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=APjGOr4rSujMx24P1jDIzhjkfbHKcFK80a9vPvVqD0g=; b=gCX5AtDDJC3f+OxPmw3TNwWEn5IdXUI49obuY03uhwbjrXH3wrFPl2PrGLvyeK9L/I5KQ6xVA Fe+1lxEnh5cAHVbF9vZx+6xjJo7WU3pRmhyDsfkcxOP/ZiYgCxjet3d X-Developer-Key: i=tudor.ambarus@linaro.org; a=ed25519; pk=uQzE0NXo3dIjeowMTOPCpIiPHEz12IA/MbyzrZVh9WI= Enable the Exynos ACPM thermal driver (CONFIG_EXYNOS_ACPM_THERMAL) to allow temperature monitoring and thermal management on Samsung Exynos SoCs (like Google GS101), used on pixel phones. Signed-off-by: Tudor Ambarus Reviewed-by: Peter Griffin --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index d905a0777f93..3fe76a4c2633 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -793,6 +793,7 @@ CONFIG_BCM2711_THERMAL=3Dm CONFIG_BCM2835_THERMAL=3Dm CONFIG_BRCMSTB_THERMAL=3Dm CONFIG_EXYNOS_THERMAL=3Dy +CONFIG_EXYNOS_ACPM_THERMAL=3Dm CONFIG_TEGRA_SOCTHERM=3Dm CONFIG_TEGRA_BPMP_THERMAL=3Dm CONFIG_GENERIC_ADC_THERMAL=3Dm --=20 2.54.0.1013.g208068f2d8-goog