From patchwork Mon Feb 24 17:31:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13988604 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.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 10E8A264A86 for ; Mon, 24 Feb 2025 17:32:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418323; cv=none; b=n31pFnd4GksO6AVJtYomloC7FAw+ShndqzkfRBvbzi+09DfkkzWCZfy6h4ti0Fian5mI+yU+NV/MpRuts7WD1CSa4vP2Qw9+kBlIxBtny3/xp5yB8H6vlVz3VvGWwFUESelOhodWzg3DR4rfld6x5lbkC7HOwdzXA/AEmhqgT2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418323; c=relaxed/simple; bh=ImOTi52Fq1zni/iFsL1Onf2S8Uv8Ca8bqVfaVlyZUAM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lKowS3BdWfnOGyXKV2Q237q6NTqVeciccH0mA/xNE/ReYFlOWqHuNxHBzeuN02nC/nKcRRWqJp6PNf1AjZYbQfVCBnXaZRijwFz4lPWEKxIRbBxuj5kyCgRQrL7KYiVRAo32WCmcYnIcqFMuNIZ+AcPI6ya7mW3gIO5wA73JZNs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Be8RlvtA; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Be8RlvtA" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5dedae49c63so8466092a12.0 for ; Mon, 24 Feb 2025 09:32:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1740418319; x=1741023119; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=420c+7A1+4JbduZFaI1FEUdQhJT2kTAJKMnNgK/61Ek=; b=Be8RlvtADCeVH+puTeNMW6jETTArRB0pny0ivF+OsVJix377fH6d8YI6QrGiV4BV9W hcoRQw0xlyVUu7horfJxkZiVYVOR0rreOtgFyZ65o98mGQfoC6jRBPDm4pC1VDa7oufU 6KgkQMdBbtQSxisW5WZxePR4AGfn+ATaxAqhxGVxHUthV0Vwvet4a7iynEKgkwewz609 oBjqXd5NmkuDcIr+GQaiW/NRUDIkFjVyL/pxFF7BkF15GwOaFK+cKhiEgKyK5a7aT5dD jkjDHqJsiGcmGCABf1HK1WtJbkLzmItbjr0MI4A7bLIQZcBhxK3noijYEt1kkz2wMSAW oayQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740418319; x=1741023119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=420c+7A1+4JbduZFaI1FEUdQhJT2kTAJKMnNgK/61Ek=; b=jBTfonoTTjYGxFUs3L4Yok8VxKlEWWpPgygZlerg/k6L8ccK5q/ztKrvP0nvoCH9lD OOWHgR4d1/sZ3XVu7RUenoHq1+Yd4rnuZ0NDTgT725h2jGGYM1ABg+bWAZJpHS6wYYzK QTgbILj9C8p6CV1b6OIEQWDCo+JmXzkuR+rojxQS1fCUaWEnYUQDmdvPwn5bbyZ21LuL jCLalrxBOGxpmrwRZSs4HT9GjljLsQpJc+Lh+m6ghjEbZO8lOyNHshL631sY+xmuZK6k 2TasFJ8RVCTHtOX83ty91mvvU7u0qU2rtMNb6Lj2UAJ1fmKVel0iyvPD3INS7umZMLrO vQWw== X-Forwarded-Encrypted: i=1; AJvYcCWQC7y19eAnPNUuwpbPFyGevnThqyFiTFgoFdTiTQ/mZgPxR0cHwgRdxIM3RQVAzhz5sBLJnG5fWQ==@vger.kernel.org X-Gm-Message-State: AOJu0YylBZsiV+VNbjOXf8nHSAuoNO/JeuofKr9s8Q+FrRhMOFEeW0iz LY63LBGPYP279La0SahsHC+oReKdmO5VxXxR+/e96bYIeLJ41RyqxgzVvi+QE4k= X-Gm-Gg: ASbGncvsagXHxOOTlNgK7Tn7peYmDiGZxYK1E26sAS1fSW6LkZ3doJ8YebK0BI+movF P9HML5Bjgr/JxzLqva3F4bFA1g/zo/5nulBqDMPhsF3hzOPiELXyuIWbnRzeuLseldK4tS3q44b Xb/vpwmPQRpQX042fVeX2jASNobytRN/LJCSFeOCMi5TUEIxbp2EelJK2yrMKK7gaok1ZTGGwCc 8k7ycf14ZKcJEMfQQ9N47/0rN/CmlhLZ+VRYqzdwyJmVbswKCZaIzjKIt6Z8/AZaDJWoBcdAOUr sphuYN/5Pv1KJytv8DANLWdcKJavRRybPY/JgNiXgiep+x/D1qQMOHk= X-Google-Smtp-Source: AGHT+IGZl4Iy4uZOUjM9U9IVmRSlfdQAcLT3D1dKp6aQmp4d42Kr2CFruUdsHT4wSp4NM1fW9G7V4Q== X-Received: by 2002:a05:6402:50c8:b0:5e0:9607:2669 with SMTP id 4fb4d7f45d1cf-5e0b71070a2mr14757051a12.17.1740418319292; Mon, 24 Feb 2025 09:31:59 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.25]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5dece270a7fsm18674357a12.58.2025.02.24.09.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2025 09:31:58 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: rafael@kernel.org, daniel.lezcano@linaro.org, rui.zhang@intel.com, lukasz.luba@arm.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, p.zabel@pengutronix.de Cc: claudiu.beznea@tuxon.dev, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Subject: [PATCH v2 1/4] dt-bindings: thermal: r9a08g045-tsu: Document the TSU unit Date: Mon, 24 Feb 2025 19:31:41 +0200 Message-ID: <20250224173144.1952801-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250224173144.1952801-1-claudiu.beznea.uj@bp.renesas.com> References: <20250224173144.1952801-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea The Renesas RZ/G3S SoC includes a Thermal Sensor Unit (TSU) block designed to measure the junction temperature. The temperature is measured using the RZ/G3S ADC, with a dedicated ADC channel directly connected to the TSU. Add documentation for it. Reviewed-by: Rob Herring (Arm) Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v2: - collected tags .../thermal/renesas,r9a08g045-tsu.yaml | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/renesas,r9a08g045-tsu.yaml diff --git a/Documentation/devicetree/bindings/thermal/renesas,r9a08g045-tsu.yaml b/Documentation/devicetree/bindings/thermal/renesas,r9a08g045-tsu.yaml new file mode 100644 index 000000000000..573e2b9d3752 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/renesas,r9a08g045-tsu.yaml @@ -0,0 +1,93 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/renesas,r9a08g045-tsu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas RZ/G3S Thermal Sensor Unit + +description: + The thermal sensor unit (TSU) measures the temperature(Tj) inside + the LSI. + +maintainers: + - Claudiu Beznea + +$ref: thermal-sensor.yaml# + +properties: + compatible: + const: renesas,r9a08g045-tsu + + reg: + maxItems: 1 + + clocks: + items: + - description: TSU module clock + + power-domains: + maxItems: 1 + + resets: + items: + - description: TSU module reset + + io-channels: + items: + - description: ADC channel which reports the TSU temperature + + io-channel-names: + items: + - const: tsu + + "#thermal-sensor-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - power-domains + - resets + - io-channels + - io-channel-names + - '#thermal-sensor-cells' + +additionalProperties: false + +examples: + - | + #include + + tsu: thermal@10059000 { + compatible = "renesas,r9a08g045-tsu"; + reg = <0x10059000 0x1000>; + clocks = <&cpg CPG_MOD R9A08G045_TSU_PCLK>; + resets = <&cpg R9A08G045_TSU_PRESETN>; + power-domains = <&cpg>; + #thermal-sensor-cells = <0>; + io-channels = <&adc 8>; + io-channel-names = "tsu"; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&tsu>; + + trips { + sensor_crit: sensor-crit { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + target: trip-point { + temperature = <100000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + }; From patchwork Mon Feb 24 17:31:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13988605 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.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 F2598265629 for ; Mon, 24 Feb 2025 17:32:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418327; cv=none; b=WN1GB4LGm0d5Np9XEQXqI/JkkfRhkUArDCMUtSHEvA4Fgo7ygAg4OshFJ9TuAvOlFPYrhptWElF9cC6ZSRkMXzK6KY9/iCXvYJdNn/0gkqTBE9KCmLaTx+H8yUPyARsZMP+794sFlhaAVmc4QxIAX8mgycQEhVxd112fzJA8SsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418327; c=relaxed/simple; bh=kNFPldhm2W3bHv5L4qigR68BEhuVlB5Rirl+9zoIjxo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BwIHK3hLw1mNYnQr6jQJ5FC50dy0vltECORKWBFzhCxIXOT1e5RfAYF4e7apz0UaHqVaw5YxNmWoxFe1GR0LQIt9DyFaucPScDe2q70ap2HeS1ByVQ4Ae7pbhChQG7wHbjxQ2m64OTLU4wd/reNhi1MgLapdFHbbdo2AFasTC18= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=DSyCeX1k; arc=none smtp.client-ip=209.85.208.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="DSyCeX1k" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5e0505275b7so7585351a12.3 for ; Mon, 24 Feb 2025 09:32:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1740418322; x=1741023122; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vnk3gh3LgHdCUikLOQiG60CSoKjMkn/o1mpGvpwpEfo=; b=DSyCeX1kDQrCxKRGYZRWEZ4IIKBH7o+vmdK2Uu1LAYSfruzegodc3cAsc5J6CzyIxp FgD+pnpsU7Y3b7wWxMriOdhy7h9OI7d5w3G4xvZrYyq5/X1F3QfXqMw30mD4PIHgaQLc JeD8BYBp6nuV6MOi+ZtVebg2EQM+TVO+jYFTJnyjK5Ds5zGjby4IqQIPs6z6ZzZlCglx UQM5Qzk5+Oy/e98x8wSMyVAtrVE3hZrdyaVsxlf0Im52dGyKkOIVU9xboSDzoxeb00nc aOXCZNhrp/oFBTEfx26BuhUl/e7GCoEpnyzns0eMK9mJreXZBxEt2A2PwqT+RiYOtl5g WpsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740418322; x=1741023122; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vnk3gh3LgHdCUikLOQiG60CSoKjMkn/o1mpGvpwpEfo=; b=lt613cmj4z1fbODRs0FcK/ORZFTjX6Rv3k0Gt+FMPptoLTFUSAChPYPOQ8u7woErZL znj+wgMmOQ6asB8ZLSMsBW3abuMFH5L8Q1MOeNewkAXt2TAH3xYq5jcomgqSWy6/6A6V jOx3FeA/3cW2J8BRiaYDwwa8PiE6zIsgphyiqmS2y8hLNohszL9XY4LXXN401RT+E5A3 7FW3qEAg1dtd3DZsXn47etkR4jYHbHJI7Mxjyc3LwuCEvnWZDZ0pIkJeqy92Z2L0RtHq r4YvNgZeLcdSj+J6CkwksmjAKxJDA+xBjQdLF2Ub9uFAwtzpb8UohHb7Z6o3UFs7a6g4 ZR4Q== X-Forwarded-Encrypted: i=1; AJvYcCV+I1PEaaLaGnc9Chrdw7RqHFlYN5bFz3kO0UZva48M4TlE33jGOhs4mA6iHCUCC6CDd4VJj4w42g==@vger.kernel.org X-Gm-Message-State: AOJu0YyP8buHXzY0M5Y5yUP6dhj5w7H6fwENflAPAsN/CX/d+DDFTAQR 6rrsL2RRD2vacxSC1TJfeotToFgwDugQ6Q56Bw728UZxKolIuLSlj98SPpsGN9A= X-Gm-Gg: ASbGncssZZZ0Tiz7YqrbBIfPIFm0WcdCHf5Z/F0ZAaoDdvUmoPnKKX9yuXeoeJ+fX76 qVBjLYrFNgdtF+/rqRLZUuYP545nh05QVVem4xE9q2XK/W4OpxqLCs227CM5+tl533j2SY6NIX8 HapOyNuxOeLtMoH3n0QyTq7ex64zC4MHxBii9HFhaKl0oQ/QYR2ZRdo5usDI+puTZ7TEdiWDd43 kcUbAlpRTimFsmIUegp81Ig02Ys0uOf1LhQu86K4EDLNj/B3mPyu+CHhj6AD+rDFzLL79R3B9V7 kfw8jAr/uKyNkdW7KYNhyhU6JWNZ9mMqk8dU1iFrgUvZ8onnwMBMTak= X-Google-Smtp-Source: AGHT+IGYy0MH+DqKI1kUPnuAEZZQAu7hFkJGLsuQYOGxMwzTzyvUzPtaIE08GRKEqourf3AcXBqJDA== X-Received: by 2002:a05:6402:e02:b0:5e0:88f4:1bc1 with SMTP id 4fb4d7f45d1cf-5e0b70cd6dcmr13284106a12.2.1740418322221; Mon, 24 Feb 2025 09:32:02 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.25]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5dece270a7fsm18674357a12.58.2025.02.24.09.31.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2025 09:32:01 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: rafael@kernel.org, daniel.lezcano@linaro.org, rui.zhang@intel.com, lukasz.luba@arm.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, p.zabel@pengutronix.de Cc: claudiu.beznea@tuxon.dev, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Subject: [PATCH v2 2/4] thermal: renesas: rzg3s: Add thermal driver for the Renesas RZ/G3S SoC Date: Mon, 24 Feb 2025 19:31:42 +0200 Message-ID: <20250224173144.1952801-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250224173144.1952801-1-claudiu.beznea.uj@bp.renesas.com> References: <20250224173144.1952801-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea The Renesas RZ/G3S SoC features a Thermal Sensor Unit (TSU) that reports the junction temperature. The temperature is reported through a dedicated ADC channel. Add a driver for the Renesas RZ/G3S TSU. Signed-off-by: Claudiu Beznea --- Changes in v2: - use a devres group for the devm resources obtained though this driver to avoid issue described in [1]; with this dropped the following calls: -- thermal_add_hwmon_sysfs(priv->tz); -- thermal_of_zone_register(priv->tz); -- pm_runtime_enable(priv->dev); and use devm variants - used signed variables for temperature computation - convert to mili degree Celsius before applying the computation formula to avoid losing precision [1] https://lore.kernel.org/all/20250215130849.227812-1-claudiu.beznea.uj@bp.renesas.com/ MAINTAINERS | 7 + drivers/thermal/renesas/Kconfig | 8 + drivers/thermal/renesas/Makefile | 1 + drivers/thermal/renesas/rzg3s_thermal.c | 329 ++++++++++++++++++++++++ 4 files changed, 345 insertions(+) create mode 100644 drivers/thermal/renesas/rzg3s_thermal.c diff --git a/MAINTAINERS b/MAINTAINERS index e223df29c1c0..0977042a678e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20330,6 +20330,13 @@ S: Maintained F: Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml F: drivers/iio/potentiometer/x9250.c +RENESAS RZ/G3S THERMAL SENSOR UNIT DRIVER +M: Claudiu Beznea +L: linux-pm@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/thermal/renesas,r9a08g045-tsu.yaml +F: drivers/thermal/renesas/rzg3s_thermal.c + RESET CONTROLLER FRAMEWORK M: Philipp Zabel S: Maintained diff --git a/drivers/thermal/renesas/Kconfig b/drivers/thermal/renesas/Kconfig index dcf5fc5ae08e..566478797095 100644 --- a/drivers/thermal/renesas/Kconfig +++ b/drivers/thermal/renesas/Kconfig @@ -26,3 +26,11 @@ config RZG2L_THERMAL help Enable this to plug the RZ/G2L thermal sensor driver into the Linux thermal framework. + +config RZG3S_THERMAL + tristate "Renesas RZ/G3S thermal driver" + depends on ARCH_R9A08G045 || COMPILE_TEST + depends on OF && IIO && RZG2L_ADC + help + Enable this to plug the RZ/G3S thermal sensor driver into the Linux + thermal framework. diff --git a/drivers/thermal/renesas/Makefile b/drivers/thermal/renesas/Makefile index bf9cb3cb94d6..1feb5ab78827 100644 --- a/drivers/thermal/renesas/Makefile +++ b/drivers/thermal/renesas/Makefile @@ -3,3 +3,4 @@ obj-$(CONFIG_RCAR_GEN3_THERMAL) += rcar_gen3_thermal.o obj-$(CONFIG_RCAR_THERMAL) += rcar_thermal.o obj-$(CONFIG_RZG2L_THERMAL) += rzg2l_thermal.o +obj-$(CONFIG_RZG3S_THERMAL) += rzg3s_thermal.o diff --git a/drivers/thermal/renesas/rzg3s_thermal.c b/drivers/thermal/renesas/rzg3s_thermal.c new file mode 100644 index 000000000000..3d934735c522 --- /dev/null +++ b/drivers/thermal/renesas/rzg3s_thermal.c @@ -0,0 +1,329 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Renesas RZ/G3S TSU Thermal Sensor Driver + * + * Copyright (C) 2024 Renesas Electronics Corporation + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../thermal_hwmon.h" + +#define TSU_SM 0x0 +#define TSU_SM_EN BIT(0) +#define TSU_SM_OE BIT(1) +#define OTPTSUTRIM_REG(n) (0x18 + (n) * 0x4) +#define OTPTSUTRIM_EN_MASK BIT(31) +#define OTPTSUTRIM_MASK GENMASK(11, 0) + +#define TSU_READ_STEPS 8 + +/* Default calibration values, if FUSE values are missing. */ +#define SW_CALIB0_VAL 1297 +#define SW_CALIB1_VAL 751 + +#define MCELSIUS(temp) ((temp) * MILLIDEGREE_PER_DEGREE) + +/** + * struct rzg3s_thermal_priv - RZ/G3S thermal private data structure + * @base: TSU base address + * @dev: device pointer + * @tz: thermal zone pointer + * @rstc: reset control + * @channel: IIO channel to read the TSU + * @devres_group_id: devres group for the driver devres resources + * obtained in probe + * @mode: current device mode + * @calib0: calibration value + * @calib1: calibration value + */ +struct rzg3s_thermal_priv { + void __iomem *base; + struct device *dev; + struct thermal_zone_device *tz; + struct reset_control *rstc; + struct iio_channel *channel; + void *devres_group_id; + enum thermal_device_mode mode; + u16 calib0; + u16 calib1; +}; + +static int rzg3s_thermal_get_temp(struct thermal_zone_device *tz, int *temp) +{ + struct rzg3s_thermal_priv *priv = thermal_zone_device_priv(tz); + struct device *dev = priv->dev; + int ts_code_ave = 0; + int ret, val; + + if (priv->mode != THERMAL_DEVICE_ENABLED) + return -EAGAIN; + + ret = pm_runtime_resume_and_get(dev); + if (ret) + return ret; + + for (u8 i = 0; i < TSU_READ_STEPS; i++) { + ret = iio_read_channel_raw(priv->channel, &val); + if (ret < 0) + goto rpm_put; + + ts_code_ave += val; + /* + * According to the HW manual (section 40.4.4 Procedure for Measuring the + * Temperature) we need to wait here at leat 3us. + */ + usleep_range(5, 10); + } + + ret = 0; + ts_code_ave = DIV_ROUND_CLOSEST(MCELSIUS(ts_code_ave), TSU_READ_STEPS); + + /* + * According to the HW manual (section 40.4.4 Procedure for Measuring the Temperature) + * the computation formula is as follows: + * + * Tj = (ts_code_ave - priv->calib1) * 165 / (priv->calib0 - priv->calib1) - 40 + * + * Convert everything to mili Celsius before applying the formula to avoid + * losing precision. + */ + + *temp = DIV_ROUND_CLOSEST((s64)(ts_code_ave - MCELSIUS(priv->calib1)) * MCELSIUS(165), + MCELSIUS(priv->calib0 - priv->calib1)) - MCELSIUS(40); + + /* Report it in mili degrees Celsius and round it up to 0.5 degrees Celsius. */ + *temp = roundup(*temp, 500); + +rpm_put: + pm_runtime_mark_last_busy(dev); + pm_runtime_put_autosuspend(dev); + + return ret; +} + +static void rzg3s_thermal_set_mode(struct rzg3s_thermal_priv *priv, + enum thermal_device_mode mode) +{ + struct device *dev = priv->dev; + int ret; + + ret = pm_runtime_resume_and_get(dev); + if (ret) + return; + + if (mode == THERMAL_DEVICE_DISABLED) { + writel(0, priv->base + TSU_SM); + } else { + writel(TSU_SM_EN, priv->base + TSU_SM); + /* + * According to the HW manual (section 40.4.1 Procedure for + * Starting the TSU) we need to wait here 30us or more. + */ + usleep_range(30, 40); + + writel(TSU_SM_OE | TSU_SM_EN, priv->base + TSU_SM); + /* + * According to the HW manual (section 40.4.1 Procedure for + * Starting the TSU) we need to wait here 50us or more. + */ + usleep_range(50, 60); + } + + pm_runtime_mark_last_busy(dev); + pm_runtime_put_autosuspend(dev); +} + +static int rzg3s_thermal_change_mode(struct thermal_zone_device *tz, + enum thermal_device_mode mode) +{ + struct rzg3s_thermal_priv *priv = thermal_zone_device_priv(tz); + + if (priv->mode == mode) + return 0; + + rzg3s_thermal_set_mode(priv, mode); + priv->mode = mode; + + return 0; +} + +static const struct thermal_zone_device_ops rzg3s_tz_of_ops = { + .get_temp = rzg3s_thermal_get_temp, + .change_mode = rzg3s_thermal_change_mode, +}; + +static int rzg3s_thermal_read_calib(struct rzg3s_thermal_priv *priv) +{ + struct device *dev = priv->dev; + u32 val; + int ret; + + ret = pm_runtime_resume_and_get(dev); + if (ret) + return ret; + + val = readl(priv->base + OTPTSUTRIM_REG(0)); + if (val & OTPTSUTRIM_EN_MASK) + priv->calib0 = FIELD_GET(OTPTSUTRIM_MASK, val); + else + priv->calib0 = SW_CALIB0_VAL; + + val = readl(priv->base + OTPTSUTRIM_REG(1)); + if (val & OTPTSUTRIM_EN_MASK) + priv->calib1 = FIELD_GET(OTPTSUTRIM_MASK, val); + else + priv->calib1 = SW_CALIB1_VAL; + + pm_runtime_mark_last_busy(dev); + pm_runtime_put_autosuspend(dev); + + return 0; +} + +static int rzg3s_thermal_probe(struct platform_device *pdev) +{ + struct rzg3s_thermal_priv *priv; + struct device *dev = &pdev->dev; + void *devres_group_id; + int ret; + + /* + * Open a devres group to allow using devm_pm_runtime_enable() + * w/o interfeering with dev_pm_genpd_detach() in the platform bus + * remove. Otherwise, durring repeated unbind/bind operations, + * the TSU may be runtime resumed when it is not part of its power + * domain, leading to accessing TSU registers (through + * rzg3s_thermal_change_mode()) without its clocks being enabled + * and its PM domain being turned on. + */ + devres_group_id = devres_open_group(dev, NULL, GFP_KERNEL); + if (!devres_group_id) + return -ENOMEM; + + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) { + ret = -ENOMEM; + goto release_group; + } + priv->devres_group_id = devres_group_id; + + priv->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(priv->base)) { + ret = PTR_ERR(priv->base); + goto release_group; + } + + priv->channel = devm_iio_channel_get(dev, "tsu"); + if (IS_ERR(priv->channel)) { + ret = dev_err_probe(dev, PTR_ERR(priv->channel), "Failed to get IIO channel!\n"); + goto release_group; + } + + priv->rstc = devm_reset_control_get_exclusive_deasserted(dev, NULL); + if (IS_ERR(priv->rstc)) { + ret = dev_err_probe(dev, PTR_ERR(priv->rstc), "Failed to get reset!\n"); + goto release_group; + } + + priv->dev = dev; + priv->mode = THERMAL_DEVICE_DISABLED; + platform_set_drvdata(pdev, priv); + + pm_runtime_set_autosuspend_delay(dev, 300); + pm_runtime_use_autosuspend(dev); + ret = devm_pm_runtime_enable(dev); + if (ret) { + dev_err_probe(dev, ret, "Failed to enable runtime PM!\n"); + goto release_group; + } + + ret = rzg3s_thermal_read_calib(priv); + if (ret) { + dev_err_probe(dev, ret, "Failed to read calibration data!\n"); + goto release_group; + } + + priv->tz = devm_thermal_of_zone_register(dev, 0, priv, &rzg3s_tz_of_ops); + if (IS_ERR(priv->tz)) { + ret = dev_err_probe(dev, PTR_ERR(priv->tz), "Failed to register thermal zone!\n"); + goto release_group; + } + + ret = devm_thermal_add_hwmon_sysfs(dev, priv->tz); + if (ret) { + dev_err_probe(dev, ret, "Failed to add hwmon sysfs!\n"); + goto release_group; + } + + return 0; + +release_group: + devres_release_group(dev, devres_group_id); + return ret; +} + +static void rzg3s_thermal_remove(struct platform_device *pdev) +{ + struct rzg3s_thermal_priv *priv = dev_get_drvdata(&pdev->dev); + + devres_release_group(priv->dev, priv->devres_group_id); +} + +static int rzg3s_thermal_suspend(struct device *dev) +{ + struct rzg3s_thermal_priv *priv = dev_get_drvdata(dev); + + rzg3s_thermal_set_mode(priv, THERMAL_DEVICE_DISABLED); + + return reset_control_assert(priv->rstc); +} + +static int rzg3s_thermal_resume(struct device *dev) +{ + struct rzg3s_thermal_priv *priv = dev_get_drvdata(dev); + int ret; + + ret = reset_control_deassert(priv->rstc); + if (ret) + return ret; + + if (priv->mode != THERMAL_DEVICE_DISABLED) + rzg3s_thermal_set_mode(priv, priv->mode); + + return 0; +} + +static const struct dev_pm_ops rzg3s_thermal_pm_ops = { + SYSTEM_SLEEP_PM_OPS(rzg3s_thermal_suspend, rzg3s_thermal_resume) +}; + +static const struct of_device_id rzg3s_thermal_dt_ids[] = { + { .compatible = "renesas,r9a08g045-tsu" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, rzg3s_thermal_dt_ids); + +static struct platform_driver rzg3s_thermal_driver = { + .driver = { + .name = "rzg3s_thermal", + .of_match_table = rzg3s_thermal_dt_ids, + .pm = pm_ptr(&rzg3s_thermal_pm_ops), + }, + .probe = rzg3s_thermal_probe, + .remove = rzg3s_thermal_remove, +}; +module_platform_driver(rzg3s_thermal_driver); + +MODULE_DESCRIPTION("Renesas RZ/G3S Thermal Sensor Unit Driver"); +MODULE_AUTHOR("Claudiu Beznea "); +MODULE_LICENSE("GPL"); From patchwork Mon Feb 24 17:31:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13988606 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.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 05A81265CAE for ; Mon, 24 Feb 2025 17:32:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418328; cv=none; b=GP6Xvl20zNAbrbRe2gvkmsZFeHvywioGd+18e89YVOjOuGVxnssD3ecshDsvOfHnfQexqmz2jDtnw+2+CMx9eahUw8HpM2ETlb22S/C6nTLcwEKJoOQWavyfF+/o8KEuCkL68BXXFsCwmqY8sTp2Os2fMml7MS7LvQZ8lugI5PQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418328; c=relaxed/simple; bh=JTUCCbCCWqHuncZ5oHBOQmD62rGMndm5FqoLy/lZso8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fD/85J5DJQOeVl7f7qmK0irBA9GSwCNFwaDjqfYQR4tRL1wmNtmOQx4QSucUZr8tcS8Tu6YqIKTEX6TH24Xm0+rOdRX84T/A1BPmI7vj+eiCYnTpoejDTh1g8ipKIqxLNK/VTO6V7ukAaIK/nG23j32WRU/Tdc3Dgb95+JiHlZg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=leDzknSq; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="leDzknSq" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5e0b70fb1daso5708478a12.1 for ; Mon, 24 Feb 2025 09:32:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1740418325; x=1741023125; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+1yo3qtSfIhFeGAEiRzmVMQo73ZalEAsSnX/cJq79kA=; b=leDzknSqCqtMKvI2s5QNRZEAmzUK7/zFE1HCb4C9M9pdUjBxLVSAFDWI/k7bUoxiCq 9TP+LX+26cTn4Vgo3ZB9xvKYQrRG5FYGP7fYYrIt2acEiMXB5l5u83mUPGZR9glr+W9D jwZ1rlQ0GkLW5TuFEuB8Kt6meJlqEesbGSLXD3To/oTjlgre3w4VXRDv/VmFs66Gr/gS AHcxITptoU6Ox+4y/BsW6bN/68yNVe5RrE1n+kLhCdEl3vAA/PlvF+4GJ36i62sFFgcQ JCzBjK1/YDxlLdPJslxZWLS+th6+F4YjmODsxm8uEwgPkAiXdHT9TTTooTU17f4dZw1W tfpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740418325; x=1741023125; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+1yo3qtSfIhFeGAEiRzmVMQo73ZalEAsSnX/cJq79kA=; b=mbieL35qGlhku3EOYIpmCBNJgVDeFWJ/MxTAX9YZqIfouIfo+fcLYPC59FnHC6Biy+ zLsxYd3kXzX2qwo605UoMFQDjoRJ1zRu6HLa3G3HFdb75OvHDnDfUzBdpANxFxXO26z8 Z7fi/gbvWFbKAZCK869WQZac1bHg1uE+uL4DIXD8jVIE6/ZPlr7Aj5tAxKPdA9aFPhVC /Ct/avK+q7QXXLrtgLd0yEkI7PaH4z/woK8/9+Q1NbrW0NNjDWrJ8GadLgznBgzB/l8P Sy6FhtTkp0Ri/ulvcHojqO/aKNwWIfHQ6cfWgIzv54+c2d9NbK40vKZi3ErLGkO74a5v MYYg== X-Forwarded-Encrypted: i=1; AJvYcCVFo1GjOvMASk3OKowwiyW2bVlG8AQvrYYfqseBr6h6CkA3DKFW9ZryGn/SPWwhJjizgUOCHFIw+A==@vger.kernel.org X-Gm-Message-State: AOJu0Yw0ex7rNLQjc1A4EBxiopXanSULxSDdGrdre6oPF3UQH1qmC15i mvwQj2CQEzTauzCQoTxoQ8WH/+/0hc2KQ8N99SST3Wo4NgX4KDpqfh2EhLhtjcY= X-Gm-Gg: ASbGncv0TEsECZuCtjcR+O59rlSF1lgKvCgRehL50Ek0ITZ9FerWCTv/V3oGOnvWaTG eHWPgJUceOB2Yxu98ZxBgIa6ZDqz3WANvZY1sd48toWkkyaYo/OJA+RkPd7YQGA5UyKqYPVxYL9 9xxZVVBz/2yYXGB0PeZYyJwNd1zKtDszFWNbgowj+F9vqCrCohiuW+L3oPF/4h2VQYkSMEQAyqr FSCbv9gtebpNJj+ACeg7RUSWoX8np1UCL3OMNpu6v1GDu5AtPxstFukUee8MKKFciEGkutDG7tP t9qO5qXQ+N1b4rXCJdjv1/v3khF3l16rZL5NN4QIV/prj+PxRHFDp2A= X-Google-Smtp-Source: AGHT+IEvfXereLG4YfzIby0vL8BC3Kca01jNjsC9KnxwSBKk7fKmr/umERW/k7CxUdOT/iVLoKfvqg== X-Received: by 2002:a17:907:6d02:b0:ab7:b5d6:2696 with SMTP id a640c23a62f3a-abc09b1470amr1217759666b.32.1740418325327; Mon, 24 Feb 2025 09:32:05 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.25]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5dece270a7fsm18674357a12.58.2025.02.24.09.32.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2025 09:32:04 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: rafael@kernel.org, daniel.lezcano@linaro.org, rui.zhang@intel.com, lukasz.luba@arm.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, p.zabel@pengutronix.de Cc: claudiu.beznea@tuxon.dev, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Subject: [PATCH v2 3/4] arm64: dts: renesas: r9a08g045: Add TSU node Date: Mon, 24 Feb 2025 19:31:43 +0200 Message-ID: <20250224173144.1952801-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250224173144.1952801-1-claudiu.beznea.uj@bp.renesas.com> References: <20250224173144.1952801-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea Add TSU node along with thermal zones and keep it enabled in the SoC DTSI. The temperature reported by the TSU can only be read through channel 8 of the ADC. Therefore, enable the ADC by default. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v2: - collected Geert's tag - adjusted the trip points temperature as suggested in the review process - added cpu_alert1 passive trip point as suggested in the review process; along with it changed the trip point nodes and label names Hi, Geert, I kept your Rb tag. Please let me know if it should be dropped. Thank you, Claudiu arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 49 ++++++++++++++++++- .../boot/dts/renesas/rzg3s-smarc-som.dtsi | 4 -- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi index 0364f89776e6..3f56fff7d9b0 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -233,7 +233,6 @@ adc: adc@10058000 { #address-cells = <1>; #size-cells = <0>; #io-channel-cells = <1>; - status = "disabled"; channel@0 { reg = <0>; @@ -272,6 +271,17 @@ channel@8 { }; }; + tsu: thermal@10059000 { + compatible = "renesas,r9a08g045-tsu"; + reg = <0 0x10059000 0 0x1000>; + clocks = <&cpg CPG_MOD R9A08G045_TSU_PCLK>; + resets = <&cpg R9A08G045_TSU_PRESETN>; + power-domains = <&cpg>; + #thermal-sensor-cells = <0>; + io-channels = <&adc 8>; + io-channel-names = "tsu"; + }; + vbattb: clock-controller@1005c000 { compatible = "renesas,r9a08g045-vbattb"; reg = <0 0x1005c000 0 0x1000>; @@ -717,6 +727,43 @@ timer { "hyp-virt"; }; + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&tsu>; + sustainable-power = <423>; + + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = <&cpu0 0 2>; + contribution = <1024>; + }; + }; + + trips { + cpu_crit: cpu-critical { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; + + cpu_alert1: trip-point1 { + temperature = <90000>; + hysteresis = <1000>; + type = "passive"; + }; + + cpu_alert0: trip-point0 { + temperature = <85000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + }; + vbattb_xtal: vbattb-xtal { compatible = "fixed-clock"; #clock-cells = <0>; diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi index 39845faec894..6f25ab617982 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi @@ -84,10 +84,6 @@ x3_clk: x3-clock { }; }; -&adc { - status = "okay"; -}; - #if SW_CONFIG3 == SW_ON ð0 { pinctrl-0 = <ð0_pins>; From patchwork Mon Feb 24 17:31:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13988607 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.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 6FF43265CB2 for ; Mon, 24 Feb 2025 17:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418332; cv=none; b=qT44bzJg+j28sDRLOJPmDGE7bwG0ww7EFArqK9X3rqHaMfO+ifjaJHQiqHO/yOLJcitvo8V+2TkeTqJc3Zo3XC2vm9heoQOoRuEdT3cL88BV1X0RhJnYdILpx3sY/rpsDIY3uRgFtU21sNbQiFTWV34fDs1qKYznlcGykl5SxjI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418332; c=relaxed/simple; bh=oIB0SGCz6w/sdFWz/voO0kJ/tz/pNsc4Pe98Mbdlmuk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q20YsxeC+FieesGTBOjegGl4lcXFoRJt3Fe2jbOLlI+VXw7QuI8e13Sbob0nYQBKymVX6WemC/AEWPKb3UX3tlMY2Q42NSG0wyEj4rSHiup7OqXYLqahrDw84WO+Ddm6hidmxBj5E2W8L7EypbwePrE6yb1NIUphgFiBGT0HqNA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=JtZNii9m; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="JtZNii9m" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5e08064b4ddso6282035a12.1 for ; Mon, 24 Feb 2025 09:32:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1740418328; x=1741023128; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XhxXNmQS7HiqcndJwzB1tfncWGWAmFhTQNVTNzL+Iew=; b=JtZNii9m2CclQdlEmJ8tK24LCj6XEuU3LqkFARNKiLvFT61QPErlqVStQvrREXP40V w+A1L3lgCtrozH3xOhaRz66a1n7CuWOfjoHeiWEu3luJbKfzNwOfr1OIhEErPIJI2EyC q5nKLA5INTlnHUEjGqBiTJWOSeHI5KelLduYCL/YH+mEc83wq6wIHIOrcCqidREb5Jwq Q6VJ2VYZdt1UhkgD+Paq5iy8S6du0Fia9Bei5NSPsCWf6SoI6uQE10+SZoMgEX3ier1m tFXMgJlJI8TFO4Ov3gPVP/1aThmsFKPX5U6QEN2MHUxPERrfTffo1f/lhUGEW6Q8WZw6 Cjyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740418328; x=1741023128; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XhxXNmQS7HiqcndJwzB1tfncWGWAmFhTQNVTNzL+Iew=; b=IDmm7Ou0+CJhWABZ9tIPxoG/G5Bg87RNtIcxQmFs+LUvsYbxb3ONkhwidBCWmLs1vm iwqqWVJcYiR56/NlsIsqIaLmmAal3K+fW86QUSe0x17EmAIRrhabdLj9Llqt1+zFBPxJ Snzx8B8Is/3YomOiIA4HKKvjtZDOynHDv5JYL5LukVoXnSmwn3Ha93boMQwdIUCRUrwh PjMxcwjRjqj0SBy2rrx0rGhq+ynR5S9QdItzV+B937r04ittKtlOc+rG4GXT6qQultIf 1GjGyjauP6mSSgKGSPWvkkIMRvdXoZNfabSOryec65vsO61jYUDFw7z73mNkg+ilHWJ7 GySg== X-Forwarded-Encrypted: i=1; AJvYcCXJrOAuN5s+HOFCdE5duCdRNhqWZJq7ciB2AjdadM7NMiRxKi0rdsOTUODLWTh+wM2U38R3Ftcbxg==@vger.kernel.org X-Gm-Message-State: AOJu0Yxjq+6jATyJhHgQMFHsHLdS3PcbQPhJIm/Iww2q9+215JSMv/aO G0WF643gKa3Ig1ChL1kcRZBOpwzQeuKn0evMIRRKCbnCnilc3UGNKyuZZQIuLXE= X-Gm-Gg: ASbGncuiUZgUWjfTRtx/sLJnH40lRhEKKHcZY+7vgs7JiNKWZhnW+3iXogo52I38t79 vc2Rop6C8NwLUVtkTkTP/6/4fObt/3alVUFpqR8ba/iKkBUTw+GFg9vYeGGntGqw8/RVMx9OHFb 0NyKdeu+Xx8vopF5OqM3kLPBe3xppRvEnzbuDFx1SG9gWN+U5n/vT4nMbVOtdS7+GxChquqiupU sKEiMR0OPGexE/9YScY0KUL0e4WYRuU9a3CRVA7m6sxhT+7syVMvD/kNvNGRWFYDfc4oqYXxrAi y81bGnN3fJR/KiGQn4PpFtMj66lhq23G0WB6cJHU6tZmEc5ZI7PvnOs= X-Google-Smtp-Source: AGHT+IEOW8+Mti0kStIcH2NN1v3JN2p1VlS2xp8UH5KoJEBDGTjvf4FDX9S2JYf1r+OelyXxGOdoUA== X-Received: by 2002:a17:907:970c:b0:abb:eec3:394c with SMTP id a640c23a62f3a-abc0d97e77amr1259252366b.5.1740418327678; Mon, 24 Feb 2025 09:32:07 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.25]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5dece270a7fsm18674357a12.58.2025.02.24.09.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2025 09:32:06 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: rafael@kernel.org, daniel.lezcano@linaro.org, rui.zhang@intel.com, lukasz.luba@arm.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, p.zabel@pengutronix.de Cc: claudiu.beznea@tuxon.dev, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Subject: [PATCH v2 4/4] arm64: defconfig: Enable RZ/G3S thermal Date: Mon, 24 Feb 2025 19:31:44 +0200 Message-ID: <20250224173144.1952801-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250224173144.1952801-1-claudiu.beznea.uj@bp.renesas.com> References: <20250224173144.1952801-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea Enable the CONFIG_RZG3S_THERMAL flag for the RZ/G3S SoC. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v2: - collected tags arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index a1cc3814b09b..c3336b1342c5 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -714,6 +714,7 @@ CONFIG_ROCKCHIP_THERMAL=m CONFIG_RCAR_THERMAL=y CONFIG_RCAR_GEN3_THERMAL=y CONFIG_RZG2L_THERMAL=y +CONFIG_RZG3S_THERMAL=m CONFIG_ARMADA_THERMAL=y CONFIG_MTK_THERMAL=m CONFIG_MTK_LVTS_THERMAL=m