From nobody Mon Jun 8 15:47:53 2026 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 2797A3E4C72 for ; Thu, 28 May 2026 11:36:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968186; cv=none; b=Xe7je0jG6g1d5vrlHudybNP3bgaMBZwsjKw/UfXnosu7jUUKQ/rfs48tsjyeBWHoyh4sC8eB5UmcRc8RmZ+lHTQZ7LwopSRTpt0zXALPu3MG2RMD/1JJJ9b0t9G6R+5DIRi6D45xUJEp2ZZQM27cmJG7SdPMQ5Des7DG71AwfBk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968186; c=relaxed/simple; bh=YiVpGFmnk6c+4tCGKYqMcU8qmH5daodRYRGzWhkV0LI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CalXNQgwMVzsGIi7KvjfnRMhN4pg49aVeC0DnwabaBPRRDycFOy479nUUoI5MDnrhdvV7V36p52msNifIKFJwJZnrpSrF54nJfh5FOWVTNbkP9L/5hR073+1u4sqIKQQcCIfYXvgGXcVaZRTb8atCc1OmJLl9PN/5+rWqmQvEWg= 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=LQFvEqVk; arc=none smtp.client-ip=209.85.128.48 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="LQFvEqVk" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4905e190c71so51476225e9.3 for ; Thu, 28 May 2026 04:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779968181; x=1780572981; 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=+8X0F5bMpj7Hkv7PmV60JbdJxUXi1oD+oGZuG7k+zKY=; b=LQFvEqVkiU4BxT3z+BIF1rAzW0RamAdjFg5QhS+H+r2TMRHc7+WyZdDQr1T/pcW0ib dNwYDvhm7pnQfmLF8Xp7fB2rvUe0VcfoEnS7UzKJfw8DgvZtU39OuGHk5QO4dc68RyFD NvmnDGuCMnDY7MUqB7FgHPIYeYQgho1hxucuY/8GBm6pmmyb1U23/v4u62SeCII7O24V rWvZsVcGNtK6OeMUqGLG2n4Xwwoxt+Xq0uJir+L15lm1SGyuA5gk8k+bx6nzX+DMiVh7 YpqmHdDOnGb4JVFZuztiq8P3HHTUpC/9ccebZEvPK3VxI9GFkAR34mKdQNI0Qdfl1mbi mzVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779968181; x=1780572981; 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=+8X0F5bMpj7Hkv7PmV60JbdJxUXi1oD+oGZuG7k+zKY=; b=FgmI6zEPwgnbcF9S1QoniKSD3jltgLlvvUF3qvjS1Y6bFvAcFMlPMGSICiMtPYks61 aF0Ky15C4b8Ee59Kxipk23m+9pTaq9/26qrrpsTDbXxxt3B9UTHAiSu53vnY3NMyzJF0 EezuOqgVVD0p5Cp2x3CU62YJbtVsPjEOw8h0iChxycMaFTpOw6J3baeHEm0LBEKENQG5 JXdfMRRbbCS97bHgbs4j8cOnDXxHKGQC2SbXt3Zfq210m8sX7dggw23WNNv3y9TE7McH tp4mh3zaQfpMU9PJuTY6k1xQQgAzW6rw9KI3gudI95ZyNzLbWzx7xgGk/dthDevLbg11 EBGw== X-Forwarded-Encrypted: i=1; AFNElJ8XTCFKVBuXQS6j1nTsjQKjClnZmmmnV6fkPRdoGm5kl8DXknnTn8lngvytKyAteFlueu59+QQuL0LFlz8=@vger.kernel.org X-Gm-Message-State: AOJu0YxTa3BWEy+iO1zS24HRlbl3pRqMSgJdmsykKbxlM3xkjeulD9xi TYH8pahCA5hrMYqob776H2MNZcgUVauYe35xrlGKtrctaVrDM/uOOT3a6FKJLMxNRww= X-Gm-Gg: Acq92OHYEyo0srIviv48hBg+mpCZGXYW6zQmkOA5I5TWNif3fwr6I4ozXWkHNYr5/VW VzDJdXut0HZGNEoyhH+5nHZiihSFrLcjMFmKeBfwEDYf0Rm0aKioOJNQNozjUw15sAiF7OXsjVR i7qqcPyLOGoezhUtampoLnKzOCVXQQttxi7BQt8Iywumz8Vn8xJIjOkJe/S9V2V5iLCPNShlYw2 1KpdP32KC2p1NtNBl/T1VhyeNavSMqKQ+UGrqWdW/XpgskswP30/2NFHQxdxXlN6stV0L2qM63c A8krJ82iMlH/1TC9qQTvapw8cT82HzKjczQjkivzUw5QwtMHWORj2saqDuYAkl9B4r8QeJq288Z 5z/SXf4q7dgaWZdhjXWXttSdAQoT7hT8mhDWOYQN9wAjL2+fxH5PRkT0DdSGFpXV7gIRTBX1gIP JB1vaXNaGgTOuMgqZcV2LsgU9qc0lutQgj86L9Dupa1PXeSBTl2Ig0IC2lq6/feMai7PRKhXoWC N5uByzF6dnT1ChaZg== X-Received: by 2002:a05:600c:45c9:b0:490:5cb3:e94a with SMTP id 5b1f17b1804b1-4905cb3eb81mr310813075e9.2.1779968181393; Thu, 28 May 2026 04:36:21 -0700 (PDT) Received: from ta2.c.googlers.com (231.141.38.34.bc.googleusercontent.com. [34.38.141.231]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49092a902bfsm60385715e9.12.2026.05.28.04.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 04:36:21 -0700 (PDT) From: Tudor Ambarus Date: Thu, 28 May 2026 11:36:14 +0000 Subject: [PATCH v6 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: <20260528-acpm-tmu-v6-1-b4d7ce57594b@linaro.org> References: <20260528-acpm-tmu-v6-0-b4d7ce57594b@linaro.org> In-Reply-To: <20260528-acpm-tmu-v6-0-b4d7ce57594b@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=1779968180; l=3394; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=YiVpGFmnk6c+4tCGKYqMcU8qmH5daodRYRGzWhkV0LI=; b=KtZZyG3wFMX+r73Y0exw3WifuUFyiDSfnquCr3zbzt8yf/d1DHw1KK3E58IWx64pXNkgFEDQX NMbQp4qP6EUCyGu1lg/K1lswYaAFwiDzq2ttHrLzeJ2KBMkuaBie3CW 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 --- .../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.794.g4f17f83d09-goog From nobody Mon Jun 8 15:47:53 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 01E863E1721 for ; Thu, 28 May 2026 11:36:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968188; cv=none; b=Txv3mPvahLTUofB5+2btxv1jD34hrWsIoy5IOBO7Ny2GA3inQDOWjXsfEfWbkm78f77JKapTtnqqXdyaofYpX0rbs/2R/IMNV6WbTJiONwIH3WJWvdi1WV2wklXyelwSE7PDfipR1jSebj3Hnh9YElkVVGJL6RUS6tJQmtoy074= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968188; c=relaxed/simple; bh=iXQqXA4zn1HJGzSp/hVf9/UfdsqmSFFSHnsvgO7vS2Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GNuN3QyzxyoJdc06ruuN0SOuCAjnH8i7lr/dL36LxPs3DYeuPRvgUsJDIdL/W290wQZqg/SumA6tfuZk5KGNfexFdypIIPUZXeedAy7IZsMVKoSYFQK1BdnZFWRh6OswHwL0RX1dWfcaW3WqgkEAXYl4W8r8TNswW4z5hT1tnlg= 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=g8luDqej; arc=none smtp.client-ip=209.85.128.51 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="g8luDqej" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4908b92904fso8725155e9.0 for ; Thu, 28 May 2026 04:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779968182; x=1780572982; 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=+wPmuRvkf+zzfvANKYGi8/K1eKEL3CEATmGnhv/3KRU=; b=g8luDqejJ0STak0fkP3ZVQU077cDX0zaZkVJ3fHldR2cRjW8LQV0zrRLN7t2vnTw6F Hl1Ny+JY15wIcRJ6+Fcmxvr0i+EJUfrNvCE6vfdDWbworIrQUnMaSAxdAnyITOKRk2rf npe5H+fnblypkNygYReHJgBi9IelII6nQSw+v4JnbGMrPVuDJ+ChwYjpT6oQKHuVnocr cjrJD7/uIWCHdhRP/U3NySPS632Vi5S14CHUrEnaJ7x83a7VQfpsglpnG9jeXjAZswaL vNUPlyi4F3ElTeCMZk/7VA5iDGiF1Cc9beOhPx7w5kSEao7GLJArJOOTptQ9KQlSAiTM J/6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779968182; x=1780572982; 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=+wPmuRvkf+zzfvANKYGi8/K1eKEL3CEATmGnhv/3KRU=; b=sSbaiwL1C+88Qu81zmG7TaFW/T4i9FfxRpWlZ/U1D6O4YmDZQj7MuVyTY34YyXP18m AKWnmnHLASbomTppc4okBZytohowjai7106D4QsdpikOUd8OwGQcWLFW+WE6iGM6RhII 7MXPX/YLwkYPahO2Z+MUvO+8KOW2c2T+J1nsz1FPXz3p4IHBjnzV6NbbGP3xonBvu9sR UZPBmd79DtxSUxIUuQVYKg8ku+4s9L99jXOFNq0rBW6NdJV5Us/IAeAZjB5RfGSVzpm7 X8hFnyEyxY7Tbhoqxx5AfmYFeVsQM2+g2kpk6RjfXp80by54BIc4h/XEpK9PLkdQ1BWH 4ZPQ== X-Forwarded-Encrypted: i=1; AFNElJ/p532Hha9Kjgn6c/Cu2jxRz8dX69BqoCRjDhHzXuM/dy5BD0cN9wKUmrddOC5fPln7bdDz6V4FJOAinSQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yx7YSElWCWrW8OgWBenQJ7zymNmkPJbVHTrCIputeDkmlD4dLlc CIM2sxutSxG842EVKnGTKUz/TDtDTocRhWxSX0UB5F0KTBvmGb3MdqQqMu0ZGI8Hg1I= X-Gm-Gg: Acq92OEbd3BOVzjH5xVloxiueE1GiosTkZpnaTLqZ9o4/bcwTJQMfjrpqKz5MAL45ze zgmjfIXrza/uBYiDpwiBWNs7OEsMgoDil00oRXJtflIWu3e8agowdfSQxPpKfwbgUYONw8V2aN/ A84nck4+lXdO9GVJNISVtNhMZgPI52l4zMeoFsl5Zp1nooLPNKCn7v2D4N+JCwF7wmdI1mOlFBV 7oVG8N5+2RxF3HKRNG3neAGZWmZlo1Q8TIhL28Wn72B7ULBTarLa0hVVjqwzhkbaKY6hmVAtAKF T16blx44B8USXZUbP5Su2gazr0EtZo1XCVUkTKf7OVDDQYndap1f7rHnaiFFvnYDG29YfZ4Y7wj JrOrXQOI2Q5JYTW26dV4A8zpAkf9pRCHoqooc/kB0oMIqNb9DCKzT7+OtCK/ri2DJ8XIK6+jJPF 12DM31IruEL89ufS1AXzHMHZK2veKwwcYsNTZxZOX/lAGNo6PM7sDCvoTncyGtENhrwiAX6HGBT xfPlS2Hf1TlpfnsRg== X-Received: by 2002:a05:600c:474d:b0:490:467e:a3d7 with SMTP id 5b1f17b1804b1-490467ea4a4mr413960935e9.30.1779968181918; Thu, 28 May 2026 04:36:21 -0700 (PDT) Received: from ta2.c.googlers.com (231.141.38.34.bc.googleusercontent.com. [34.38.141.231]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49092a902bfsm60385715e9.12.2026.05.28.04.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 04:36:21 -0700 (PDT) From: Tudor Ambarus Date: Thu, 28 May 2026 11:36:15 +0000 Subject: [PATCH v6 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: <20260528-acpm-tmu-v6-2-b4d7ce57594b@linaro.org> References: <20260528-acpm-tmu-v6-0-b4d7ce57594b@linaro.org> In-Reply-To: <20260528-acpm-tmu-v6-0-b4d7ce57594b@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=1779968180; l=18267; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=iXQqXA4zn1HJGzSp/hVf9/UfdsqmSFFSHnsvgO7vS2Y=; b=P0oDFv6mjs2ffzUgoeF5gAc7iY0ND71j6XKUcgWQxJlJrAFvdnViIR7FHQfOhe22KkHPL+Lq7 t2fnH6hyA3lC2QZpmMtbCkrd/e29iepwC/57tRiqPf1g5zlBFvBT5Dr 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 Google GS101 (and Exynos850, autov920, etc.). The TMU on 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 --- drivers/thermal/samsung/Kconfig | 19 ++ drivers/thermal/samsung/Makefile | 2 + drivers/thermal/samsung/acpm-tmu.c | 571 +++++++++++++++++++++++++++++++++= ++++ 3 files changed, 592 insertions(+) diff --git a/drivers/thermal/samsung/Kconfig b/drivers/thermal/samsung/Kcon= fig index f4eff5a41a84..383ae3f56cbb 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 || (COMPILE_TEST && !EXYNOS_ACPM_PROTOCOL) + default ARCH_EXYNOS + help + Support for the Thermal Management Unit (TMU) on Samsung Exynos SoCs + (such as Google GS101 and Exynos850). + + 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..b56869c9fc3b --- /dev/null +++ b/drivers/thermal/samsung/acpm-tmu.c @@ -0,0 +1,571 @@ +// 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 int acpm_tmu_control(struct acpm_tmu_priv *priv, bool on) +{ + 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. On disable, keep going */ + if (on) + 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; + + if (!sensor->enabled) + return -EAGAIN; + + ret =3D pm_runtime_resume_and_get(dev); + if (ret < 0) + return ret; + + scoped_guard(mutex, &sensor->lock) { + 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) + goto err_restore; + + ret =3D ops->set_interrupt_enable(handle, mbox_chan_id, acpm_sensor_id, + inten); + if (ret) + goto err_restore; + + /* Restore based on cached state. */ + if (was_enabled) + ret =3D acpm_tmu_op_tz_control(sensor, true); + + return ret; + +err_restore: + 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); + } + + 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; + + thermal_zone_device_update(sensor->tzd, + THERMAL_EVENT_UNSPECIFIED); + + 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); + } + } + + 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_pm_put; + } + + 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_pm_put; + } + + ret =3D acpm_tmu_control(priv, true); + if (ret) { + ret =3D dev_err_probe(dev, ret, "Failed to enable TMU\n"); + goto err_pm_put; + } + + pm_runtime_put_autosuspend(dev); + + return 0; + +err_pm_put: + 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); + + acpm_tmu_control(priv, 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; + + ret =3D acpm_tmu_control(priv, false); + if (ret) + return ret; + + /* APB clock not required for this specific msg */ + return ops->suspend(handle, priv->mbox_chan_id); +} + +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; + + /* APB clock not required for this specific msg */ + ret =3D ops->resume(handle, priv->mbox_chan_id); + if (ret) + return ret; + + return acpm_tmu_control(priv, true); +} + +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.794.g4f17f83d09-goog From nobody Mon Jun 8 15:47:53 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 23B7E3E51C7 for ; Thu, 28 May 2026 11:36:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968187; cv=none; b=Rz3Y0cmHYb4PwdCgIWduDXWL32UAxzSCEImzisgiGDPcxW2mKGGSuaQLIgwp7Hviic0tiobt7t67RCMeuCdsCV6YBaqjQVE6hTROYZXw5MW7kZUZP/wRvpkinZMpTikXdyV7LC58ZBs66lQFmGmsxYg2GcrROBAosi63AVxABjM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968187; c=relaxed/simple; bh=xJKlJC7dGl0wGAvaj+do2NaPXo539auehvyu06PLQZg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SOwZOi9/QipFg0yg7dS0g8OpIeoqcFecze9CSLgIgDK2eu+/iYio8gTgM8E6exkFcCPXuShE9f02qQUXmUBpaOrwR6Bv/Ll8g7D0ddfZse9EGfEmnNP5nHDLrgCLi+hY+Zl0abcduqbvb0+ClwS71ZL1zXAoVMp/LtPN6H0NcO4= 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=X6WaRSKR; arc=none smtp.client-ip=209.85.128.53 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="X6WaRSKR" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-48fde648a71so84392985e9.0 for ; Thu, 28 May 2026 04:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779968182; x=1780572982; 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=BekxfQF8PLQVYHupI67TdA6JhqhQbbku1rpfflIBCq0=; b=X6WaRSKRsbGXDV8YF7KPF4mNShE1bdhYsuKSHf+d6GZZvfds8tC2lWHX3FfjtEcctH nTYNwDd+5atzb7ffM/+PScAT2V+0o/bJBmUrcaW7iHdTAZl+hnALWlm6zBNP35TM7XtW NoiZBGhISuBGUgLsiN2tdkp3LuopcMvPqWSW4PiAmelR/vzCr/gFFNYMzIjDCK1WvewB LVMRLFpoGDIer3sRvLohHUMiv+Mv9wYFP7WS8Zqvzx+APnBxLPdHebFQenRxSONJQREl yVvh+stSRD14nCfDSh0gTR9vJxx1IsBbtXHZ2u1S/4TLoM8VV3fk6xRUCrNPo++xMUSe ek4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779968182; x=1780572982; 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=BekxfQF8PLQVYHupI67TdA6JhqhQbbku1rpfflIBCq0=; b=XLNNRjSw+P0OyYgogVaCUoRlBcM3WNuw8JipUfgMH5lfpYVYe58CCu4idOKv/mcrAG /VV+fh+Wim8kkiYrIkeVl9pQT45pcDvMz51DeqHgl+t+BVsxeR+LO/jhD38mjv68aduB S3dcY2c2wRN0QWxP7IFkss3pv8y1vIz+PN+mok3OTNA+lnRTv0g5cg9AyoU3mJpRh8jY X+tP2JxJsD7av13nqAlEqKRzIOk5sd/owAgyV/v3d4HM5AbDuSCyqXyh4GWIbM/fCfUa LQilIiVPDy6ANSFm9nAVVVrx3VsPy/RDVZz3GMCVgXfKa/mDDlWLnpNxMBs15kE1xeTg jN0A== X-Forwarded-Encrypted: i=1; AFNElJ+HhCfx70wmMaCFVzblYc2iqu+F4OWEht/57Thb4nw+8Yq29sWdGrbfibYQmhQP4FfdYqeulSMSxPvXNg8=@vger.kernel.org X-Gm-Message-State: AOJu0YzsFk8DaphwbQFQhkWzOTH1gv+bzli3ep5V/ByfGkyAKYlDA8ks RCtpMNpBDvghYx6hGAFpigvJ4LxnQbQSmkw8o5gXsn6x4IWW0LrzbjODZi9Lw5OCg8g= X-Gm-Gg: Acq92OGs+UQJQD7AoJqts9SMlGlQP3cwHYk4VfyYSRc73fFZxaDaFvfqnjIm29/7jDc BQWPWFHPZDwNXx4NjHMjUfsUShlVlYw9JfHEC4yZyJA15pUqcawjU3qvdTSIVQ14w813sRUfYSQ 6eK8hqeu8k6jNeHhgZf/DF82wocPFViUElS0ebgcz+vGw3jWB/Vm7v/8mmXeuIVgI1p8Y77sCIm UMgYsikSN1YICl5X9geuDpfQg61b4Iw0h/bnVZaGLytoGoSVuWXWYs8aSJkNcO2aB4yQgkEMSCO 3rIccmOduTUXpLgbC+Ae5Qo3sDgJBa+PcBwVoUsSv4UO7tNB3UbKRvVwLS4DqsHWIRkj3xcYF/N SIydTGNTyYyE0iEtsLb3y0HyjNgJ3aJOvf/Gkbj0iyzXXv/f1IO2wo8HXpm0f9yMWi7hwoJDkPO oBoa50DBgiubgFnA/OzcJfH1gHkZhjkEzGjQXX5CHuI3GZhApBqP5CXQvZbFPUtQlkNoYPKLbDf vi7qxvs9oRAZ01Exw== X-Received: by 2002:a05:600c:3ba5:b0:490:8b0b:d3b1 with SMTP id 5b1f17b1804b1-490947b0929mr17354425e9.12.1779968182422; Thu, 28 May 2026 04:36:22 -0700 (PDT) Received: from ta2.c.googlers.com (231.141.38.34.bc.googleusercontent.com. [34.38.141.231]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49092a902bfsm60385715e9.12.2026.05.28.04.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 04:36:22 -0700 (PDT) From: Tudor Ambarus Date: Thu, 28 May 2026 11:36:16 +0000 Subject: [PATCH v6 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: <20260528-acpm-tmu-v6-3-b4d7ce57594b@linaro.org> References: <20260528-acpm-tmu-v6-0-b4d7ce57594b@linaro.org> In-Reply-To: <20260528-acpm-tmu-v6-0-b4d7ce57594b@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=1779968180; l=988; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=xJKlJC7dGl0wGAvaj+do2NaPXo539auehvyu06PLQZg=; b=/RrV08zJwcGs+ddtnbcR46GfaRC7OfWZyTRmTT0RYZwhRTifb8P4BFHNCQhv5h1Ki92YZBkoZ NPR7YdMiLPgBcKDzpqdf42dJ2N6zsZtFSV6gfm3ESwzL0rOq/+LKlIW 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 --- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2fb1c75afd16..7ea3b9d95ccd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -23660,6 +23660,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.794.g4f17f83d09-goog From nobody Mon Jun 8 15:47:53 2026 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 1349A3B960B for ; Thu, 28 May 2026 11:36:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968190; cv=none; b=FjyIBxL9SNuhyosQJCsPO3WCf6Lqm/bSa1H6vL1qPVQ6gIpWk2L06pN1Is93c77rIQSubY8lhzuWD0mgwZUkX1E/OivohXbkhOPc07VLbemJoKVP9E7cju9w62TDdEcKvuygHGgSfDGIj6LhpZFLLsckVc1jnRJ5ui/9++QmWWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968190; c=relaxed/simple; bh=aW8MRzxlrtqMcgmlagejlVwxQvsAP/LKSxlocnHfymw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TBlfGAbIndqpjDbj800EwbPFvLx7pthSmXlcqOaux8nqb1GDBf0qzfkbqfvx9xhHK/golgSzyy/xDd1Ajs6mmyiNvTJzndgSpylznYBdKfxsFDdlMHX3l8vaWkbkB5xTYxWw10mybLQn58i+nggUgS1r36PVCTpxW8R6RQTCpNU= 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=ZJhzjZHP; arc=none smtp.client-ip=209.85.128.41 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="ZJhzjZHP" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-490686877a1so30439025e9.0 for ; Thu, 28 May 2026 04:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779968183; x=1780572983; 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=zdeV8V9Ljv//xjqgiKACO7GJKqkjM3XcI5AvSVUQXQ0=; b=ZJhzjZHPjIXLjkSUbBW0NKQZ7ecieS24kztYP3ahLIv8lsSVXB8xnrxD0xbzhOYp5B x572qezxqFEehwdHVgxbcPiOq07VpXjFZoAEXDD/SS58UVE5Vl5yRaANxoViiUQyjVEg vK8eqNHRgDquwaz6PhpywxBH7RbPGdD/lbE5tiwEZtzuKi/4nSsCcEfPN4yHaeZnrF8k 7xZbd01a4aRhDXiW+KOhrSt3Y70ViBSj+3o4aCBs3t8PETEFx14iUFCWpMXL9N5qA9XN zix4JkAwEQPAx2tkG0d9WlWXs90X5IpvFQaat3FBF4ADJ+qbjnex/lERVXJJ+lHXB06I Rneg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779968183; x=1780572983; 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=zdeV8V9Ljv//xjqgiKACO7GJKqkjM3XcI5AvSVUQXQ0=; b=r/Rs9aX5c5QwLECqNMEoqkIMFO6uC0PMz8bMJOnwmUKSO8i5qPdFKVjWG9Mtbmn08i WBU3J2DAthMyEjeHY5JBsKFxzGVawyMBjafml45tFWfISfv1Gv57qaAQbtaxb5FKYfXT TTsicjd7OxaQgqfByChnBB1hnG4z2gKy4O4mCMhv0vrmLMH82GVehia4tJzpshV22aUK 4o3JNYEFcA+YkpSkT4hu9tFF99Ww1QADej8kMBSuEu7mDMuv6QLJggYcuX7THKaJMuvQ vLfXvgz+jAmuvd0jUej+1VqsDZ3Nd09ZAkzBbwjEV+gcsJI0qv9wrbDuXbs3B0BPrzPw jrfw== X-Forwarded-Encrypted: i=1; AFNElJ+WahbTIO+VWAgzZjlWTqiRYm5SIOaqoL42nC+Wiq1tc62QrLsMogbHeshtVhiRdwPMF2Tadrp1KA/6pu8=@vger.kernel.org X-Gm-Message-State: AOJu0YwXW/uIdXZxoTlSjV+doAFaMsqP0UtRrlv1KVXYDbb1/LU5ihe0 ndRbhZ/9XY0OPLKSMh4gkoJuM1nH9Jy2jtkpHbWQS1JHNg0d/fosjOZ6aXq9QtlHA50= X-Gm-Gg: Acq92OGULxt4yOFtf1W0RYx8Cpjvb/+H0nfD6jynoeIHJcMjCSySt7V35db+Dfw8MLA lGwTwoycqAytFAEZy08VxCuS+ym0b2UKnBB9jns44cyoQ0Q1FTbiIVMbzRVxlcuw2iRfIyv8NFx aAZbRCH+9HXC1BUOZrowDSWwn0xqHHR54XvJ+ycN8XZdMj1alwxQtIwp6hCGCHDut5yq/TBBdAq 90GAaGKkOdjnrni/8/OcG2wRT8a29fXLCQuRti4TxkX/IlGU+i4NbB0hx/9Macd08H81ty27fvD cJTBxBplNivhGXJchxz3Iopc1l5sWrcvgvl6p7dmRr0Ie1QJ3l/ZK0/1oOBa3nAduo78NJsDd0W h/uaYJDcUdBVoBhYlSHAXD5aztchZcZmyzqV+PkiKP8/4jMt5GASu3Ppp9oWZzveUlF/Q4wTnoO TE11xqBvdVimvz5vNNB6DWuCKhPdVX1du1X3qmO+0RpHpN3BVbZXB/YafRlt6/2v09EcySvH6u4 nXyQbdUSvVdeFLzFCi86ZhwzmYf X-Received: by 2002:a05:600c:8214:b0:490:5000:917 with SMTP id 5b1f17b1804b1-490947855eamr19309345e9.1.1779968182928; Thu, 28 May 2026 04:36:22 -0700 (PDT) Received: from ta2.c.googlers.com (231.141.38.34.bc.googleusercontent.com. [34.38.141.231]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49092a902bfsm60385715e9.12.2026.05.28.04.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 04:36:22 -0700 (PDT) From: Tudor Ambarus Date: Thu, 28 May 2026 11:36:17 +0000 Subject: [PATCH v6 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: <20260528-acpm-tmu-v6-4-b4d7ce57594b@linaro.org> References: <20260528-acpm-tmu-v6-0-b4d7ce57594b@linaro.org> In-Reply-To: <20260528-acpm-tmu-v6-0-b4d7ce57594b@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=1779968180; l=7065; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=aW8MRzxlrtqMcgmlagejlVwxQvsAP/LKSxlocnHfymw=; b=sw9kx9pHSRNxRvNEoRgNMsk+qdRknCW/qGodqhzNuLSyjpJDUfVlZWGYFYvEz4EdhIHfV7N40 Ui1sKduQ+RUBVyMBv0BadzeCtkOdFDBID7s1kcVTN2NBX6NmRtI5x1M 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.794.g4f17f83d09-goog From nobody Mon Jun 8 15:47:53 2026 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 AE74B3E4C7E for ; Thu, 28 May 2026 11:36:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968189; cv=none; b=CxJhwKMZ7cm7R7l7yZn2nNAcpGV/r7uTzFbGhZjxWDmHEqYRi0k7MfW8rw2yqpyQaZnjSRv8v5YW/4ncVrAHhY7UGn29KeUYCLs00m3jmKJPIXbevKEKeG/DYwFGJ5GLziw9vyFOu4+4mIzNbJN/xxBs1BV9vYKRkKvd2f87Nfw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968189; c=relaxed/simple; bh=Aobvj69DN8F6w0+Jb0r9TFQ6oCGfBu7fy/EjQhPy1lI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oj43omDJVEw2OaVgYlhRY56QPF7NVS8qFWdIcb8nhMFOHgbOU5vuDQVCfy5H2/9GaUPgFI6j7L2PerV1zJtKVvTIXpMr3h/lYiEy4mPk8T9tox+CM2PCRuaoonAlW9Aqa8tzmwMFcrNHQXe+h0VP7k8Ab8rqeJ+VeQE2FhUn9lw= 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=JS80tqNZ; arc=none smtp.client-ip=209.85.128.44 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="JS80tqNZ" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-48984d29fe3so133292155e9.0 for ; Thu, 28 May 2026 04:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779968183; x=1780572983; 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=wpUOS+9fsWY0UqlgRlGBSremc/v/5gxyA5J8k3968CI=; b=JS80tqNZjTwx+lUJcz3qQiVMLsMc6hrU6LFf9NvYdWVr8mxXyg3rHxnIcJNkOg7OEO creHdT/CzuN+IbwOun69wCtQvMuJtT9BEj3Dzc0533ZsFZCSgMLGsvyVJvroiy1EFXFJ 5AgxNjKVnKnBv6Y3ocT7vso1iCyrGue6okSRqIuFNkUtHDLzpdTcCSndrG/Xa8eW/mO3 lM/h8kbs5PalzV6AZ1m9ZjADEOuflA2xeZsO54iISgBUxv9XYb5U7wlpYOFU4eh1ugCS aw1hm0EXiaImxpkSd2x3KytsgicKWobpSSek9RO+bBQOlZyYksEiKfjT4cOsDvtBxJAr 3tVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779968183; x=1780572983; 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=wpUOS+9fsWY0UqlgRlGBSremc/v/5gxyA5J8k3968CI=; b=LxixfF98vRNxrSQu2wr965jAiTevxFcUcMRr8m7WN4EKxsbdkahi5x785kpBkh6QG8 dyMzDVmuQZFWbOsIPsVeLYvn5R7DbYYtJXa2eirErileIpo3QGCKwo2u9qjUBTcxe74q PFb46nwSj9/polzXu9122AwlPkMTWzYCscqKaT1IC7qQDANvl/ik9JiqWM3rhezbapTo Mf1XYyK5NvGEPL0u0VY5O3r7Rbg29gyZdVwNYqkCwBLoM1V3/RZXqLFRxFVZv8Vv7KEB h0GCR+AKdbNyyhbjwHxuJgnZhSu1fVT0AHkPZxDNkVzF1sZZWdv78MDBUGTwShm88bXL irsg== X-Forwarded-Encrypted: i=1; AFNElJ/6AcX0rjNgm80mlBU2WK7uqrsf2TnLiQ/KhuVQJSYiAQBIVB5EfOp0SmYsa+DAghdPPCvWL1EEVggAbDU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy5cCHNhCyL4s5+V+xOHCfrFpjHvZsrzg+izK6a6tpgMR+dNI2O GkV4X0Gvs/3Fh2mqN9wWCDETa9zuamN0p5L6bFLpzV9pgOk+wFxnGGXkR46DKjh42+M= X-Gm-Gg: Acq92OEqxZzMt+Y6A6mLokxToGXn0oGuc5p/f+4HVE5D/kKzVA1pIEugXqqADd5dqNB +Qhu5ib7gDmIhujgQWFb/FRi93iaGtGooxe870S4oR8RgkatkF6rzQPHkU91uLB9h+2TUDij7bv fezDdZg5RlbAm6cri/zHoqYRTLGBGrwtY4Qty0AQRF7lbq9j8BDvFJOVpA0YOjHjDCsZ2ZHf30l 1Mw/OkQE+uqBgCyxBdYXjcEjp9+TIAa2kNzGokGyMkTixd3JaNa0Vgw7bBHTTRvcTI8WGQy5bB6 ycrpOU3g8zbCLGifAe39CfkRmPcAZJ0Tk7sNhrhWSVJAfOFaTPzVDPqEVAKOIvn8luSzZmJYZrG OlTxVBgfqav5HXowNpWRSiFL+Lc1809CFp+j8L49mjuGVrXkUDwQzsGn0OWxUnd1DjfYXYyPgL2 6OLCBIxdJykaQ0f1zC5lCDCgfVxKSfZBxKvXRxmfvzAZ//ObcD+Gj8t2D6Zi0ONL+QmMHhk35Kr kZmTTAxts8lTqNptjpef27CKAKi X-Received: by 2002:a05:600c:8484:b0:48a:906b:14ca with SMTP id 5b1f17b1804b1-490426cd8c4mr466725355e9.20.1779968183364; Thu, 28 May 2026 04:36:23 -0700 (PDT) Received: from ta2.c.googlers.com (231.141.38.34.bc.googleusercontent.com. [34.38.141.231]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49092a902bfsm60385715e9.12.2026.05.28.04.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 04:36:23 -0700 (PDT) From: Tudor Ambarus Date: Thu, 28 May 2026 11:36:18 +0000 Subject: [PATCH v6 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: <20260528-acpm-tmu-v6-5-b4d7ce57594b@linaro.org> References: <20260528-acpm-tmu-v6-0-b4d7ce57594b@linaro.org> In-Reply-To: <20260528-acpm-tmu-v6-0-b4d7ce57594b@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=1779968180; l=794; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=Aobvj69DN8F6w0+Jb0r9TFQ6oCGfBu7fy/EjQhPy1lI=; b=IrVw2lxVCkAd6zW/JJPCyuIUKwWUWmwU9qRVAfB/8ZYIYZEo8nd4c6wq7R9RZmeF123hMczZw 7EaqfiU+KYjBsr+EB35bTx2qZFhGyzz8N0BhvF5UIvxX1zl1H7Zm7/j 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 --- 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.794.g4f17f83d09-goog