From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 E5B82314D2A for ; Mon, 19 Jan 2026 12:08:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768824537; cv=none; b=m9xsnyv7L5fuk3zVCBJZ8l5uwXPQD00RSBGGDZELOeCB5h5pgYOdVbgXG84g48n+ypa2MNr36NTOA5lGhKZ81A0iBquNfWGwuuN++rKunTZKuFD1tkoLU+oFFqwHV+y20KVa6ol8fNo+LCJssPP/NNH1X/ZOAlff2q+V56yBqjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768824537; c=relaxed/simple; bh=vjxKctKqh1C+lpYUfF3aR59o+hjb5fIwKm+AM9mWzG8=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=t9SOME6Kr+Edq0RVxiF4CTLew462tfcwQcMRaXjoNa0cgZBicfNY2G8OVDF23Sxen+qEmwZi1gmVCLFjMtAJWhpjg2lDxogWNVQ1cUY6WU6FjrbMsLDgRPpTUZSXMURG3sxi847suei6ovW4tF//8DPesQxwD5iGfjInqTFzeb0= 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=nIN1Bb7q; arc=none smtp.client-ip=209.85.221.50 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="nIN1Bb7q" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-42fed090e5fso2304567f8f.1 for ; Mon, 19 Jan 2026 04:08:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768824533; x=1769429333; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=iKnIFFfc9VQE0U5sGGzfGa64S/N4XCAB3mzxFk6dO2I=; b=nIN1Bb7qawMvf+xAbBYQXZ1Ut0pvPCurNunxmtamD1NmJMUWeY5rvqNc4+QfttkYrh ceX50FnHKz3QsalFkZkouroQdbT2SilA6Gii8QVox9e+tqGDTl6tKZVqIEs7kdkscem4 siMOGsH4FBlnpOg+hfSKabGaDHv06hjsJYWoZDOK/YgAyK0GoR+RSd0yLlDVx2yI0N6e tioPAPSjLD58DuI5w1xC58v4gKaamkHoNkNNB09r1GkJpsD1+XLJ5vIRj4wfNMKX0sAh Mlydof1HPDXpowWnRZXThwO9B5O4ORtY0njHSOPwFmFmjgRPxkkHNMYm6PjIBW9yQGyr geCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768824533; x=1769429333; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iKnIFFfc9VQE0U5sGGzfGa64S/N4XCAB3mzxFk6dO2I=; b=koLdDiMftU7HImDwk6RFFlfepkLLcvI53uDQuR0J+fOO4uRsNVmfhz2R06K3g/lfZz PE0vFLSHTc7kraHMTX1E1i3mU0lwFKQa45BKF+S8MtiF+WzwfcTwfkUzu7fjzl/HMlw4 bA602p73hPogmKrTtCWDudFMQGQSAv06Wf8WCKvhnzZTtzsYmUBmyyejYPdO1Z63GxWC VweZ9xmYwPuq6XBZJq5GoAECG4eFd1awsVvZT6ecEleAyJYGJTJ2Z+iebS5N6GdxYxPE xper9sFMp1LElDcH78YqGkbhQgm2uVYnrSVRsHJW4+TvnHBn+WxSikyLg29CiDZOUh48 2Gmg== X-Forwarded-Encrypted: i=1; AJvYcCXutTfjRXYaPjm//6ORP9A6np1T+TTZLNQPVjgGUj0dfG199J3QLGN0IZ5RQnDaAaNyqf2nrZ2FoK7t0mU=@vger.kernel.org X-Gm-Message-State: AOJu0Yx2BQjkE1/uMT63hFfadanOufaprYk37zOhB5LMdOeQ1yJZqkH6 hFCiolWOXxMtCb7WgOYULNyWRXfBsTRR+4ujvhiIRRcOLfmRPiZkCqfvDqvCEjJuI3o= X-Gm-Gg: AZuq6aKD7O9ljWYddyOqwHllT+Na6v1ngsJPAjJd4ZqTx4mIXJUJ868aafYODRXYsLl JqwdWlkC43zSiODDwh44q7+VCWX8zO4VPBHwotfjlOLPUV5EKn+GX5tWpS6x2GIVYVpeKelwMx4 Apdw9GgDqYQW9dfOe/G1kQPRr5o8JnrQmbUkceIYASHdbZ8uSVmohOJg+XyCp2zQ4ZDoD7C5bck ZQ+PG6XcgypbQtB/Uz5gjxmrGtJpAB9WCMWPsnOKyKFbb29SDjDcEo7Gp09pcMqSiQtUJqkx9BV wdJPApfsoMjr0zIQMLcxN0Wk+ACSh2D+GPaAFVZQVToSCqNYjmr4xKScrd8QUavxtmtm1/4RP1H tJ/tenFl75vsSZcPRJx+L3fu5NtLKYx+tr/nVOV0MCfYKjinB131ne529g+9fKTjOYrFwBrFisi VHtNdvsLZd8tX1XeeSD26NIzMoKE6yNe2U6th8OLnlH0epzBeNYHMd7G1vM489JldL3pJ/LA== X-Received: by 2002:a05:6000:3109:b0:430:96bd:411b with SMTP id ffacd0b85a97d-43569bd47e7mr15049639f8f.58.1768824533142; Mon, 19 Jan 2026 04:08:53 -0800 (PST) Received: from ta2.c.googlers.com (164.102.240.35.bc.googleusercontent.com. [35.240.102.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356997e664sm20698421f8f.30.2026.01.19.04.08.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 04:08:52 -0800 (PST) From: Tudor Ambarus Subject: [PATCH v2 0/7] thermal: samsung: Add support for Google GS101 TMU Date: Mon, 19 Jan 2026 12:08:46 +0000 Message-Id: <20260119-acpm-tmu-v2-0-e02a834f04c6@linaro.org> 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: 7bit X-B4-Tracking: v=1; b=H4sIAM4ebmkC/0XMQQrCMBCF4auUWRtJJlqpq95DuojppB2wTUlqU ErubiyIy//x+DaIFJgiXKsNAiWO7OcSeKjAjmYeSHBfGlBiLZXSwthlEuv0FHghVE4SWn2Hcl8 COX7t1K0rPXJcfXjvclLf9Yec/khSQgrr6Fz3jaZGuvbBswn+6MMAXc75A46eC7ChAAAA X-Change-ID: 20260113-acpm-tmu-27e21f0e2c3b To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Krzysztof Kozlowski , Alim Akhtar , Bartlomiej Zolnierkiewicz , Kees Cook , "Gustavo A. R. Silva" , Peter Griffin , =?utf-8?q?Andr=C3=A9_Draszik?= Cc: willmcvicker@google.com, jyescas@google.com, shin.son@samsung.com, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hardening@vger.kernel.org, Tudor Ambarus X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768824532; l=4379; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=vjxKctKqh1C+lpYUfF3aR59o+hjb5fIwKm+AM9mWzG8=; b=wXnHsdPH6H91y8OZ1SvxH9pevq+ULVCQNWr1P0Do/JfHOlidnlm9D04J3aht/OhyxQt+CpmUS mfS2vbxsmfWAWC5izRW9M7ycjSgKXtMl+tIQ0mSkr9PsPJ5HylEv5TM X-Developer-Key: i=tudor.ambarus@linaro.org; a=ed25519; pk=uQzE0NXo3dIjeowMTOPCpIiPHEz12IA/MbyzrZVh9WI= Add support for the Thermal Management Unit (TMU) on the Google GS101 SoC. The GS101 TMU implementation utilizes a hybrid architecture where management is shared between the kernel and the Alive Clock and Power Manager (ACPM) firmware. Dependencies ============ - firmware patches 2, 3: required by the thermal driver (patch 4). - bindings (patch 1): required for DTS validation. - thermal driver patch 4: required by defconfig (patch 7) - logical dependency. Given the thermal driver is a new addition, I suggest everything to go through the Samsung SoC tree, with ACKs from the Thermal maintainers. If the Thermal maintainers prefer to take the bindings and the thermal driver patches via their tree we'll need: - an immutable branch containing the firmware patches (2 and 3) from the Samsung SoC tree to serve as a base for the thermal driver. - an immutable branch containing the bindings and the thermal driver from the thermal tree to serve as a base for the dts and defconfig. Architecture Overview ===================== The hardware supports two parallel control paths. For this implementation, responsibilities are split as follows: 1. Kernel Responsibility: - maintain direct memory-mapped access to the interrupt pending (INTPEND) registers to identify thermal events. - map physical hardware interrupts to logical thermal zones. - coordinate functional operations through the ACPM IPC protocol. 2. Firmware Responsibility (ACPM): - handle sensor initialization and calibration. - manage thermal thresholds and hysteresis configuration. - perform temperature acquisition and expose data via IPC. Sensor Mapping (One-to-Many) ============================ The SoC contains multiple physical temperature sensors, but the ACPM firmware abstracts these into logical groups (Clusters) for reporting: - ACPM Sensor 0 (Big Cluster): Aggregates physical sensors 0, 6, 7, 8, 9. - ACPM Sensor 1 (Mid Cluster): Aggregates physical sensors 4, 5. - ACPM Sensor 2 (Little Cluster): Aggregates physical sensors 1, 2. The driver maps physical interrupt bits back to these logical parents. When an interrupt fires, the driver checks the bitmask in the INTPEND registers and updates the corresponding logical thermal zone. Signed-off-by: Tudor Ambarus --- Changes in v2: - architecture: switch from a syscon/MFD approach to a thermal-sensor node with a phandle to the ACPM interface - bindings: address Krzysztof's feedback, drop redundencies, interrupts description. - firmware: introduce devm_acpm_get_by_phandle() to standardize IPC handle acquisition. - thermal driver: drop compatible's data and use the static data from the driver directly. - defconfig, make EXYNOS_ACPM_THERMAL a module - Link to v1: https://lore.kernel.org/r/20260114-acpm-tmu-v1-0-cfe56d93e90f@linaro.org --- Tudor Ambarus (7): dt-bindings: thermal: Add Google GS101 TMU firmware: samsung: acpm: Add TMU protocol support firmware: samsung: acpm: Add devm_acpm_get_by_phandle helper thermal: samsung: Add support for GS101 TMU MAINTAINERS: Add entry for Samsung Exynos ACPM thermal driver arm64: dts: exynos: gs101: Add thermal management unit arm64: defconfig: enable Exynos ACPM thermal support .../bindings/thermal/google,gs101-tmu-top.yaml | 67 +++ MAINTAINERS | 8 + arch/arm64/boot/dts/exynos/google/gs101-tmu.dtsi | 209 +++++++ arch/arm64/boot/dts/exynos/google/gs101.dtsi | 18 + arch/arm64/configs/defconfig | 1 + drivers/firmware/samsung/Makefile | 1 + drivers/firmware/samsung/exynos-acpm-tmu.c | 212 +++++++ drivers/firmware/samsung/exynos-acpm-tmu.h | 33 ++ drivers/firmware/samsung/exynos-acpm.c | 35 ++ drivers/thermal/samsung/Kconfig | 16 + drivers/thermal/samsung/Makefile | 2 + drivers/thermal/samsung/acpm-tmu.c | 643 +++++++++++++++++++++ .../linux/firmware/samsung/exynos-acpm-protocol.h | 30 + 13 files changed, 1275 insertions(+) --- base-commit: e2211f5d980086dd9fbdab3bcd86b715e12cae13 change-id: 20260113-acpm-tmu-27e21f0e2c3b Best regards, -- Tudor Ambarus