From nobody Thu Dec 18 08:32:14 2025 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 263AC264F9F for ; Mon, 24 Feb 2025 17:32:00 +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=1740418323; cv=none; b=c+lOiPNzRIuHL8Z+jZWm/KNxgGHOu0v1lIOPb9H1FU8mwM8fF5YyeoYi+6H6wRuGZJFff0KT7ugbc29vG30NigKYXF0y1DUeR0ip/WET2gId+v2Vka/PZQJEURxDMd0fUWMJ9fsFh8lnmrwtRMblV/QOSOEiFchxGFQtgM6PaTQ= 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.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="Be8RlvtA" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5e0516e7a77so7219640a12.1 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=rd7OOVhuroohHeKCx4TCCxakNtSWKHIefZYXLlOCrfyXeBPO8hwR8qmPc6qJe9KB4q 43xiPLCzNJ1MtCW9AjId7OnVps49heMshE/I53W88PqJ04rsCUEncBKTByyi8UEIt2H/ 0odChBDYvh0LTyUCx+2cyjY/j8srykXaNp6HGBLUDWZWhBNFl6xxp9gA8bpcCsdYkkFU TvH7sXPqOxXpC0Vlgubi054X1SO0pxnr3dGB7L099BGff8FyYs1ICCwhl8K1CTQjpIL3 uPCSXDmJGIcE5KVxWE1Wbkgry0ZAVBaZ/rcBjoIv62s1shQ449ijfbq9PEPWZ23C8KpB bN7A== X-Forwarded-Encrypted: i=1; AJvYcCWIlN8SdFHtoNA2j9PyDVybQUpzstfvqGk+/LIyn0tubfYvrbh9LmUMm6MdNpgh1LS+XuCxsdUWYCtWUg4=@vger.kernel.org X-Gm-Message-State: AOJu0Yzpf7NYCw6689BVA8yk/wnLVs2i9nkmECGbcLBieKlAYmx7ipjh NsZsGC/Bm+xnzxB+3txMsGlU2SApN5nsr8wKhtGDJXSJ1WnKTrDjo/TOMKLscVA= X-Gm-Gg: ASbGncsuzxbMhclI1vG8akJ2yAQzpwOy20+0boIPGm+/Jl23v0fZIY37cho6QFiBXK4 Ud/pzFsS0RwdDc2iBXjSJTwCZvG8a6jIGJv1sZRY1D+zRO/s0SU99gvyqvgFovaXP601Yy2Gf8H wmCLNpfccOXcolWnSRv1vdgzULx4jkrnp5akdOm9B1cDJjvCOhUklfnD3BB+0exh9hk+zE33qYf vTGUWM3x2X7kqmQzPAp8wV5Ow3FE5KyI/cAC9GHt3V0ZXZVsBy7XqgBhQ5KBq/12BJqHH8sMtR+ TFtRQ/z56pMq63JzwedQSrL/Ob8DCU3tUiWWttsdX3xMzYSm2EgebYw= 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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,r9a08= g045-tsu.yaml diff --git a/Documentation/devicetree/bindings/thermal/renesas,r9a08g045-ts= u.yaml b/Documentation/devicetree/bindings/thermal/renesas,r9a08g045-tsu.ya= ml 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 =3D "renesas,r9a08g045-tsu"; + reg =3D <0x10059000 0x1000>; + clocks =3D <&cpg CPG_MOD R9A08G045_TSU_PCLK>; + resets =3D <&cpg R9A08G045_TSU_PRESETN>; + power-domains =3D <&cpg>; + #thermal-sensor-cells =3D <0>; + io-channels =3D <&adc 8>; + io-channel-names =3D "tsu"; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive =3D <250>; + polling-delay =3D <1000>; + thermal-sensors =3D <&tsu>; + + trips { + sensor_crit: sensor-crit { + temperature =3D <125000>; + hysteresis =3D <1000>; + type =3D "critical"; + }; + target: trip-point { + temperature =3D <100000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + }; + }; + }; --=20 2.43.0 From nobody Thu Dec 18 08:32:14 2025 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0111926562A for ; Mon, 24 Feb 2025 17:32:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418326; cv=none; b=eaexHd+E2ieUJQZa2oUlS7TL/OcWPbXvewshHUjAvkN4DanxXvDdPmEZOKOpNYaPngU3St3QU3JHsl7ISMYgXn0qtDFRkQI/Wot8ygQooez7T7YOUv2SuJtpJNFCZy7SriL6fYxC78o6hZMBFW+ZqAwSl2uOa0uRF5ZnxE8RlS0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418326; c=relaxed/simple; bh=kNFPldhm2W3bHv5L4qigR68BEhuVlB5Rirl+9zoIjxo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BT4inc9UoGQhAEPbs3rE5XOxXaAI2awWU1+5TA6D8h8oXOZXxZwmc3tgP3Xtx9goew6h5AX2Ss51Ejfbfu3xcHiykTx9Rm9oEQSPGn8D4CsqAaskXukutCTw0ouGlaM3MpT1icDbGiVHQ4X7GPx9KWqH95RHUETslljL8OLJk8M= 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.52 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-f52.google.com with SMTP id 4fb4d7f45d1cf-5e0505275b7so7585350a12.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=n3O0kTkSPFdZL2a84UPjO7xbw2YzED+17DSyCapYoVbHE9dAEIMHDPc3uuLN7+KGBf gzLaOdooiHU25WSv1bQARil1RSpZcQD4PncShTa+cpWv15XGhofyPXMIM2wnx/CyKJ/N a54meMZ2pmksFpH7nY2VTbzlMbTHbf8XcDni1+FDg+goYj40Syyc2TXGMAzswWqutuxk wNjPlX0dJPPVCVC8JpUkCHVauBxdHBv4hRg79qZhBOwN5+4/3zFGnsB5hJkcNPgSpTwg TqItMRA4a6W2hxJMvMidLVqA6j6+YSmj9dbn7Zmsnpk28ZkX235P7fviPtg4eLlTX71W pBqg== X-Forwarded-Encrypted: i=1; AJvYcCUFxxwI+3ZrfyqNp1uQrQAFifgW88O9wLv3fogl+h5M6BWdBr/1S3VCfd2z4Oiy3kWcZhvXE3B0CJERl6I=@vger.kernel.org X-Gm-Message-State: AOJu0YwVdY+ifntqyWyWyY6oahsGDfsmB8G/bzjkOOv8pwY6NL25bvE1 w70kDxGOTNKF/I92fogMzvRQN6Hiz/UMakpycfC5LJjSblPDL+MLgwnZKHvBBpc= X-Gm-Gg: ASbGncsxLmhlkzJllUn+pKTrTIap/2cVbaAvgigzkLS9MalGFFUWb1TVTlSAVJc/kI+ XI2HaDIvEqWRQXUiLose84Cxhb/V7YzDdYOn8v8EQZrAcT1DVNx43OsYBOIz+z+RFk7PrhcC2t6 WdeiQmhret+qFBhHSHUwNUoC43hG2ID47mjXWiotYjGqmXF6BlsDktVqV9UM8KxSUVN/lkOfEVb KWOnRrb8C8CmjCKqMTgiFtUsvaOMNeE7lzt3uTnj7Rmud6tVwtZBtkVNUUBINSL5kr/N2a9iKdK 7GHD4fF3VASuVzcfXYl4nXHxIkegq3OSNPxLUwFwPzhBOPGxj9GK73I= 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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@b= p.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 =20 +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/Kcon= fig 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/Mak= efile index bf9cb3cb94d6..1feb5ab78827 100644 --- a/drivers/thermal/renesas/Makefile +++ b/drivers/thermal/renesas/Makefile @@ -3,3 +3,4 @@ obj-$(CONFIG_RCAR_GEN3_THERMAL) +=3D rcar_gen3_thermal.o obj-$(CONFIG_RCAR_THERMAL) +=3D rcar_thermal.o obj-$(CONFIG_RZG2L_THERMAL) +=3D rzg2l_thermal.o +obj-$(CONFIG_RZG3S_THERMAL) +=3D rzg3s_thermal.o diff --git a/drivers/thermal/renesas/rzg3s_thermal.c b/drivers/thermal/rene= sas/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 *tem= p) +{ + struct rzg3s_thermal_priv *priv =3D thermal_zone_device_priv(tz); + struct device *dev =3D priv->dev; + int ts_code_ave =3D 0; + int ret, val; + + if (priv->mode !=3D THERMAL_DEVICE_ENABLED) + return -EAGAIN; + + ret =3D pm_runtime_resume_and_get(dev); + if (ret) + return ret; + + for (u8 i =3D 0; i < TSU_READ_STEPS; i++) { + ret =3D iio_read_channel_raw(priv->channel, &val); + if (ret < 0) + goto rpm_put; + + ts_code_ave +=3D 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 =3D 0; + ts_code_ave =3D 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 =3D (ts_code_ave - priv->calib1) * 165 / (priv->calib0 - priv->cali= b1) - 40 + * + * Convert everything to mili Celsius before applying the formula to avoid + * losing precision. + */ + + *temp =3D 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 Celsi= us. */ + *temp =3D 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 =3D priv->dev; + int ret; + + ret =3D pm_runtime_resume_and_get(dev); + if (ret) + return; + + if (mode =3D=3D 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 =3D thermal_zone_device_priv(tz); + + if (priv->mode =3D=3D mode) + return 0; + + rzg3s_thermal_set_mode(priv, mode); + priv->mode =3D mode; + + return 0; +} + +static const struct thermal_zone_device_ops rzg3s_tz_of_ops =3D { + .get_temp =3D rzg3s_thermal_get_temp, + .change_mode =3D rzg3s_thermal_change_mode, +}; + +static int rzg3s_thermal_read_calib(struct rzg3s_thermal_priv *priv) +{ + struct device *dev =3D priv->dev; + u32 val; + int ret; + + ret =3D pm_runtime_resume_and_get(dev); + if (ret) + return ret; + + val =3D readl(priv->base + OTPTSUTRIM_REG(0)); + if (val & OTPTSUTRIM_EN_MASK) + priv->calib0 =3D FIELD_GET(OTPTSUTRIM_MASK, val); + else + priv->calib0 =3D SW_CALIB0_VAL; + + val =3D readl(priv->base + OTPTSUTRIM_REG(1)); + if (val & OTPTSUTRIM_EN_MASK) + priv->calib1 =3D FIELD_GET(OTPTSUTRIM_MASK, val); + else + priv->calib1 =3D 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 =3D &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 =3D devres_open_group(dev, NULL, GFP_KERNEL); + if (!devres_group_id) + return -ENOMEM; + + priv =3D devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) { + ret =3D -ENOMEM; + goto release_group; + } + priv->devres_group_id =3D devres_group_id; + + priv->base =3D devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(priv->base)) { + ret =3D PTR_ERR(priv->base); + goto release_group; + } + + priv->channel =3D devm_iio_channel_get(dev, "tsu"); + if (IS_ERR(priv->channel)) { + ret =3D dev_err_probe(dev, PTR_ERR(priv->channel), "Failed to get IIO ch= annel!\n"); + goto release_group; + } + + priv->rstc =3D devm_reset_control_get_exclusive_deasserted(dev, NULL); + if (IS_ERR(priv->rstc)) { + ret =3D dev_err_probe(dev, PTR_ERR(priv->rstc), "Failed to get reset!\n"= ); + goto release_group; + } + + priv->dev =3D dev; + priv->mode =3D THERMAL_DEVICE_DISABLED; + platform_set_drvdata(pdev, priv); + + pm_runtime_set_autosuspend_delay(dev, 300); + pm_runtime_use_autosuspend(dev); + ret =3D devm_pm_runtime_enable(dev); + if (ret) { + dev_err_probe(dev, ret, "Failed to enable runtime PM!\n"); + goto release_group; + } + + ret =3D rzg3s_thermal_read_calib(priv); + if (ret) { + dev_err_probe(dev, ret, "Failed to read calibration data!\n"); + goto release_group; + } + + priv->tz =3D devm_thermal_of_zone_register(dev, 0, priv, &rzg3s_tz_of_ops= ); + if (IS_ERR(priv->tz)) { + ret =3D dev_err_probe(dev, PTR_ERR(priv->tz), "Failed to register therma= l zone!\n"); + goto release_group; + } + + ret =3D 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 =3D 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 =3D 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 =3D dev_get_drvdata(dev); + int ret; + + ret =3D reset_control_deassert(priv->rstc); + if (ret) + return ret; + + if (priv->mode !=3D THERMAL_DEVICE_DISABLED) + rzg3s_thermal_set_mode(priv, priv->mode); + + return 0; +} + +static const struct dev_pm_ops rzg3s_thermal_pm_ops =3D { + SYSTEM_SLEEP_PM_OPS(rzg3s_thermal_suspend, rzg3s_thermal_resume) +}; + +static const struct of_device_id rzg3s_thermal_dt_ids[] =3D { + { .compatible =3D "renesas,r9a08g045-tsu" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, rzg3s_thermal_dt_ids); + +static struct platform_driver rzg3s_thermal_driver =3D { + .driver =3D { + .name =3D "rzg3s_thermal", + .of_match_table =3D rzg3s_thermal_dt_ids, + .pm =3D pm_ptr(&rzg3s_thermal_pm_ops), + }, + .probe =3D rzg3s_thermal_probe, + .remove =3D 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"); --=20 2.43.0 From nobody Thu Dec 18 08:32:14 2025 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D55F8265CAB for ; Mon, 24 Feb 2025 17:32:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418328; cv=none; b=DlN/vxBQUHn1+WBQWSVTXSDfQNkIh1R/GQF4yzDy8hu4c743+6Yu6m8PLkH+Q39gaqOF6nJQJef115xV2HrUro6p22rni3UfmI8t/Si30fSxlR57FihN8YDJgzGJRR/6KgR8Eb9Q1YGkEwvmveUYvUJhJ6eAi1PA8G/zStcvXCY= 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.52 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-f52.google.com with SMTP id 4fb4d7f45d1cf-5ded51d31f1so8266367a12.3 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=G6gkaDG1vzRhnhFkE0/7jDODK6w6CdxNjKwRWdcSCh7ZC06shW8VDbOLI2ZlrJgxkC kR7cX2KQtiRzxt3ckXLdJMYWh05eSxvSarRe9uNcn6E2ZQ0Q3LrYcSj35SWhbbnsafFq UUUJY7Kkrege/yor3zCq/Chkf05A1bHWCiOPPa+EQ017DhcpZbyDWnqYL0i3mhdjKpwE nThpZ8PzlSO8UAIqFbPedUQ5hC8OOiYsR7R0KFUXU7LC4b1f8l9Dv9oef2F0G2fO0Weq FGcrAeKVCEBIJ3cqQ4sg+uc74XQTub5uLRIPnEP7f2bgWDVW7NPyzE5ViApQUiWvVeCP sWXQ== X-Forwarded-Encrypted: i=1; AJvYcCUiggKjYSPek7XwRAbjsvCDUDcm9AG0C+ad8nKQstASq1SsI4m23zgZn1QUmj0Zzc0A8ZLLaZEBXqN818Q=@vger.kernel.org X-Gm-Message-State: AOJu0YyQq05IRzhbLJIfBTf2pZLAHwY30I+B1GviJaSG1+W5q5jHwNMw XoX3Smp+wdlfXn/GrRbNgV9WcOrBDkiaJitOkX9RGZdza9wR4d/cCYk4EYjAsd0= X-Gm-Gg: ASbGncsgbUDhjTbtP3fwQM25Dc4Zvje+luiZ6ii/+WxtzcVzscD/TqXG0hrIpNWQ18z Z26BrXodtSjDZWGcDwO9EX/s5T/RL0CZvVctg4JixxrHCnK39m3ORv/z0vIYjlp/9sMGV9Efv96 bu+60Afaq3gA/E4LpmjxrIrdf5c/rGdYn+ZZTZYeYQh5S/stJLJ6KjDe9gUddTwindb7QPDpSuf Wa8I/XdB11vOdxQzdlnvVdZx11UZvQxy9qDpUqFW5e8Pv1vy3ADYwn1/x2d3AaCm1dlyYp6QWh8 CXTwnKIrfwSRqLnk9eRYB9sPVMJNXfFa9Ao0eAXw3O6/foCh6f0dRXU= 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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/d= ts/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 =3D <1>; #size-cells =3D <0>; #io-channel-cells =3D <1>; - status =3D "disabled"; =20 channel@0 { reg =3D <0>; @@ -272,6 +271,17 @@ channel@8 { }; }; =20 + tsu: thermal@10059000 { + compatible =3D "renesas,r9a08g045-tsu"; + reg =3D <0 0x10059000 0 0x1000>; + clocks =3D <&cpg CPG_MOD R9A08G045_TSU_PCLK>; + resets =3D <&cpg R9A08G045_TSU_PRESETN>; + power-domains =3D <&cpg>; + #thermal-sensor-cells =3D <0>; + io-channels =3D <&adc 8>; + io-channel-names =3D "tsu"; + }; + vbattb: clock-controller@1005c000 { compatible =3D "renesas,r9a08g045-vbattb"; reg =3D <0 0x1005c000 0 0x1000>; @@ -717,6 +727,43 @@ timer { "hyp-virt"; }; =20 + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive =3D <250>; + polling-delay =3D <1000>; + thermal-sensors =3D <&tsu>; + sustainable-power =3D <423>; + + cooling-maps { + map0 { + trip =3D <&cpu_alert0>; + cooling-device =3D <&cpu0 0 2>; + contribution =3D <1024>; + }; + }; + + trips { + cpu_crit: cpu-critical { + temperature =3D <110000>; + hysteresis =3D <1000>; + type =3D "critical"; + }; + + cpu_alert1: trip-point1 { + temperature =3D <90000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + + cpu_alert0: trip-point0 { + temperature =3D <85000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + }; + }; + }; + vbattb_xtal: vbattb-xtal { compatible =3D "fixed-clock"; #clock-cells =3D <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 { }; }; =20 -&adc { - status =3D "okay"; -}; - #if SW_CONFIG3 =3D=3D SW_ON ð0 { pinctrl-0 =3D <ð0_pins>; --=20 2.43.0 From nobody Thu Dec 18 08:32:14 2025 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 51EAB265CD3 for ; Mon, 24 Feb 2025 17:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418331; cv=none; b=KgJ4Lrd8oRvIUt5K9j5qwRj992yJQVRJQkG5IPa5neNf2VeYarObc5EyEs4NpIfoDbSCAfI0OeClGnliCq78TEU9kVAzO4YDSOjLV7VMqS7hloygepZqiXwxAxKLG/c7anlqIR489gE0YAB4pfNi2K24YTOrC17ecA5YdUt817c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418331; c=relaxed/simple; bh=oIB0SGCz6w/sdFWz/voO0kJ/tz/pNsc4Pe98Mbdlmuk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=otEqsvlCQ+6XANiKR1xkOUR2R/XbvMO5X5evYVAW5c8FMLFAn8uyEgjKyuSyFXcQQyUDmGyr1Q7loSHYPOvN9eEhZuiAGZtaLgMsl0hmqwzXf5+WdvdWeEWDwOpYIF9VsGMcp+mHX6kMIy8yVq5JgeHcZCJsFVqLfqgF3SO5pDI= 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.46 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-f46.google.com with SMTP id 4fb4d7f45d1cf-5df07041c24so6940689a12.0 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=ZfiJ8oq+RWn9IfyvmPLEbA/BHKlLYY8qT/u29Gg8EI5zi2a44TxPt/LYD0KOBbcKNa 6LdeNL63eaOal4cpDm4yA6MPy29FiVuhujSYt/tBARG5n+LOA7s0SunU0xhlMRFSkwlR j8PIySnMYXxjYzNbVIWcZQWIzm0uIsOXp3mpCMWEbEFRttACMuYsHDtxPkoFOMEqBoDo Xm8fYlBRBdyDDzYns0RnI5QiAPptat9OORSKmNjy0UL+6oZdWUibUIma6Ph2LM+DuvMa CZVt7w83UYGRVizGSE4s7EYLPz+Xacu9WJ9/kGj71LgaiykUKILGOW9QoC7JgxzpVdBM w0aQ== X-Forwarded-Encrypted: i=1; AJvYcCVmvnEk/9cFOI1cUHZH0XpOHGoy7d2NCPiWSVjW3+338IjZeEjvKGahtK4PopmQqRU9wBJnQQANMQGTRhM=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3j4fsNq37TDEpMwOvwQoS9+jNkzVKTv3+db+e07l2ectyyZXP mWgGjTXy9Xjlr2RtrlCp7cEjrkoIpX4y8cPGmAKbCTQyPebRxvGqG+XKtVzfrJc= X-Gm-Gg: ASbGncvdL4/9Ji7EepObyqegttx3AGQ2XznLKVZUvgZW2R8575Wp5DsM/25pbokn1Ch DJxCDxiRL4JdOqs+kzYVdAG5X4fWACzl5rYWF0J83SQqvjFdvGT2k/4ghCu9vSOxWR+SPNGHaSv MziKKcpL6cTEHeiVHWthiIdVdmCHyRgqya4mOWm5PGScSPQZQis8qcI612AkVaCPrQPo9UPsQpq nkTpQ/bhhZGdx5L7yscxqe78qkPZEkI7gI6wyyuvLH5OHD5lksDW624vvcZ+kXlTBCNUX309PpP 301grq6mBiDEWzjaswYbOGg7jwTuyyuaHr5bxrVxyXXlLUUEs7tkW7M= 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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=3Dm CONFIG_RCAR_THERMAL=3Dy CONFIG_RCAR_GEN3_THERMAL=3Dy CONFIG_RZG2L_THERMAL=3Dy +CONFIG_RZG3S_THERMAL=3Dm CONFIG_ARMADA_THERMAL=3Dy CONFIG_MTK_THERMAL=3Dm CONFIG_MTK_LVTS_THERMAL=3Dm --=20 2.43.0