* [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H
@ 2025-12-31 17:00 Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 01/17] dt-bindings: watchdog: renesas,wdt: Add " Lad Prabhakar
` (18 more replies)
0 siblings, 19 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
Hi All,
This series of patches adds support for the SDHI/eMMC controller as well as
the Watchdog Timer (WDT) found on the Renesas RZ/T2H (R9A09G077) and RZ/N2H
(R9A09G087) SoCs. The series includes device tree bindings, clock controller
support, and device tree nodes for the respective peripherals.
Note,
- All the patches have been cherry picked from the mainline Linux kernel.
- This series depends on the following series which has already been
submitted for review:
https://lore.kernel.org/all/20251229223911.8663-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
Cheers,
Prabhakar
Lad Prabhakar (17):
dt-bindings: watchdog: renesas,wdt: Add support for RZ/T2H and RZ/N2H
watchdog: rzv2h: Obtain clock-divider and timeout values from OF match
data
watchdog: rzv2h: Make "oscclk" and reset controller optional
watchdog: rzv2h: Add support for configurable count clock source
watchdog: rzv2h: Add support for RZ/T2H
dt-bindings: mmc: renesas,sdhi: Document RZ/T2H and RZ/N2H support
dt-bindings: clock: renesas,r9a09g077/87: Add SDHI_CLKHS clock ID
clk: renesas: cpg-mssr: Add read-back and delay handling for RZ/T2H
MSTP
clk: renesas: r9a09g077: Add PLL2 and SDHI clock support
arm64: dts: renesas: r9a09g077: Add SDHI nodes
arm64: dts: renesas: r9a09g087: Add SDHI nodes
arm64: dts: renesas: rzt2h-rzn2h-evk: Enable eMMC
arm64: dts: renesas: rzt2h-rzn2h-evk: Enable MicroSD card slot
arm64: dts: renesas: rzt2h-rzn2h-evk: Enable SD card slot
arm64: dts: renesas: r9a09g077: Add WDT nodes
arm64: dts: renesas: r9a09g087: Add WDT nodes
arm64: dts: renesas: rzt2h-n2h-evk-common: Enable WDT2
.../devicetree/bindings/mmc/renesas,sdhi.yaml | 85 +++++----
.../bindings/watchdog/renesas,wdt.yaml | 36 +++-
arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 100 +++++++++++
.../dts/renesas/r9a09g077m44-rzt2h-evk.dts | 23 +++
arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 100 +++++++++++
.../dts/renesas/r9a09g087m44-rzn2h-evk.dts | 25 +++
.../dts/renesas/rzt2h-n2h-evk-common.dtsi | 169 ++++++++++++++++++
drivers/clk/renesas/r9a09g077-cpg.c | 12 +-
drivers/clk/renesas/renesas-cpg-mssr.c | 15 +-
drivers/watchdog/rzv2h_wdt.c | 140 +++++++++++++--
.../clock/renesas,r9a09g077-cpg-mssr.h | 1 +
.../clock/renesas,r9a09g087-cpg-mssr.h | 1 +
12 files changed, 656 insertions(+), 51 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 01/17] dt-bindings: watchdog: renesas,wdt: Add support for RZ/T2H and RZ/N2H
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 02/17] watchdog: rzv2h: Obtain clock-divider and timeout values from OF match data Lad Prabhakar
` (17 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 5cacd26436a66e24b1f0335a5d2b71eed4ab0d74 upstream.
Extend the Renesas WDT device tree bindings to support the watchdog timer
found on the RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs.
The RZ/T2H WDT is mostly compatible with the one found on the RZ/V2H(P),
but includes an additional register and differs in the clock division
ratio settings for the WDTCR[CKS] field. To reflect these differences,
introduce a new compatible string, "renesas,r9a09g077-wdt".
The binding schema is updated accordingly. On RZ/T2H, the WDT does not
require the "resets" property. It also requires two register regions and
the presence of a "power-domains" property. The "clock-names" property is
limited to a single entry, "pclk", for this SoC.
The RZ/N2H SoC uses the same WDT IP as the RZ/T2H. It is supported by
using "renesas,r9a09g087-wdt" as the primary compatible string, with
"renesas,r9a09g077-wdt" listed as a fallback to describe the shared
hardware features.
Example:
wdt0: watchdog@80082000 {
compatible = "renesas,r9a09g077-wdt";
reg = <0 0x80082000 0 0x400>,
<0 0x81295100 0 0x04>;
clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKL>;
clock-names = "pclk";
power-domains = <&cpg>;
status = "disabled";
};
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
.../bindings/watchdog/renesas,wdt.yaml | 36 +++++++++++++++++--
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
index 78874b90c88c5..b6e60162c263c 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
@@ -81,10 +81,17 @@ properties:
- renesas,r9a09g056-wdt # RZ/V2N
- const: renesas,r9a09g057-wdt # RZ/V2H(P)
- - const: renesas,r9a09g057-wdt # RZ/V2H(P)
+ - enum:
+ - renesas,r9a09g057-wdt # RZ/V2H(P)
+ - renesas,r9a09g077-wdt # RZ/T2H
+
+ - items:
+ - const: renesas,r9a09g087-wdt # RZ/N2H
+ - const: renesas,r9a09g077-wdt # RZ/T2H
reg:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
interrupts:
minItems: 1
@@ -132,6 +139,7 @@ allOf:
compatible:
contains:
enum:
+ - renesas,r9a09g077-wdt
- renesas,rza-wdt
- renesas,rzn1-wdt
then:
@@ -183,7 +191,9 @@ allOf:
properties:
compatible:
contains:
- const: renesas,r9a09g057-wdt
+ enum:
+ - renesas,r9a09g057-wdt
+ - renesas,r9a09g077-wdt
then:
properties:
interrupts: false
@@ -192,6 +202,26 @@ allOf:
required:
- interrupts
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g077-wdt
+ then:
+ properties:
+ resets: false
+ clock-names:
+ maxItems: 1
+ reg:
+ minItems: 2
+ required:
+ - clock-names
+ - power-domains
+ else:
+ properties:
+ reg:
+ maxItems: 1
+
additionalProperties: false
examples:
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 02/17] watchdog: rzv2h: Obtain clock-divider and timeout values from OF match data
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 01/17] dt-bindings: watchdog: renesas,wdt: Add " Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 03/17] watchdog: rzv2h: Make "oscclk" and reset controller optional Lad Prabhakar
` (16 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 19f7eaec4d9d1dcd8b49e14dbad56a65810c2910 upstream.
Update the rzv2h_wdt driver to fetch clock configuration and timeout
parameters from device tree match data rather than relying on hardcoded
constants. Introduce a new structure rzv2h_of_data that encapsulates
minimum and maximum clock select values (cks_min and cks_max), clock
divider (cks_div), timeout cycle count (timeout_cycles), and the
timeout period select bits (tops). These values are provided through
the OF match table and retrieved via of_device_get_match_data() during
probe.
This change allows dynamic configuration of the watchdog timer for
different SoCs, such as the RZ/T2H, which require different settings.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/watchdog/rzv2h_wdt.c | 35 ++++++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/drivers/watchdog/rzv2h_wdt.c b/drivers/watchdog/rzv2h_wdt.c
index 8defd02412130..755067800ebb9 100644
--- a/drivers/watchdog/rzv2h_wdt.c
+++ b/drivers/watchdog/rzv2h_wdt.c
@@ -35,9 +35,6 @@
#define WDTRCR_RSTIRQS BIT(7)
-#define MAX_TIMEOUT_CYCLES 16384
-#define CLOCK_DIV_BY_256 256
-
#define WDT_DEFAULT_TIMEOUT 60U
static bool nowayout = WATCHDOG_NOWAYOUT;
@@ -45,12 +42,21 @@ module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+struct rzv2h_of_data {
+ u8 cks_min;
+ u8 cks_max;
+ u16 cks_div;
+ u8 tops;
+ u16 timeout_cycles;
+};
+
struct rzv2h_wdt_priv {
void __iomem *base;
struct clk *pclk;
struct clk *oscclk;
struct reset_control *rstc;
struct watchdog_device wdev;
+ const struct rzv2h_of_data *of_data;
};
static int rzv2h_wdt_ping(struct watchdog_device *wdev)
@@ -84,6 +90,7 @@ static void rzv2h_wdt_setup(struct watchdog_device *wdev, u16 wdtcr)
static int rzv2h_wdt_start(struct watchdog_device *wdev)
{
struct rzv2h_wdt_priv *priv = watchdog_get_drvdata(wdev);
+ const struct rzv2h_of_data *of_data = priv->of_data;
int ret;
ret = pm_runtime_resume_and_get(wdev->parent);
@@ -106,8 +113,8 @@ static int rzv2h_wdt_start(struct watchdog_device *wdev)
* - RPES[9:8] - Window End Position Select - 11b: 0%
* - TOPS[1:0] - Timeout Period Select - 11b: 16384 cycles (3FFFh)
*/
- rzv2h_wdt_setup(wdev, WDTCR_CKS_CLK_256 | WDTCR_RPSS_100 |
- WDTCR_RPES_0 | WDTCR_TOPS_16384);
+ rzv2h_wdt_setup(wdev, of_data->cks_max | WDTCR_RPSS_100 |
+ WDTCR_RPES_0 | of_data->tops);
/*
* Down counting starts after writing the sequence 00h -> FFh to the
@@ -184,7 +191,7 @@ static int rzv2h_wdt_restart(struct watchdog_device *wdev,
* - RPES[9:8] - Window End Position Select - 00b: 75%
* - TOPS[1:0] - Timeout Period Select - 00b: 1024 cycles (03FFh)
*/
- rzv2h_wdt_setup(wdev, WDTCR_CKS_CLK_1 | WDTCR_RPSS_25 |
+ rzv2h_wdt_setup(wdev, priv->of_data->cks_min | WDTCR_RPSS_25 |
WDTCR_RPES_75 | WDTCR_TOPS_1024);
rzv2h_wdt_ping(wdev);
@@ -213,6 +220,8 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
+ priv->of_data = of_device_get_match_data(dev);
+
priv->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
@@ -230,8 +239,8 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
return dev_err_probe(dev, PTR_ERR(priv->rstc),
"failed to get cpg reset");
- priv->wdev.max_hw_heartbeat_ms = (MILLI * MAX_TIMEOUT_CYCLES * CLOCK_DIV_BY_256) /
- clk_get_rate(priv->oscclk);
+ priv->wdev.max_hw_heartbeat_ms = (MILLI * priv->of_data->timeout_cycles *
+ priv->of_data->cks_div) / clk_get_rate(priv->oscclk);
dev_dbg(dev, "max hw timeout of %dms\n", priv->wdev.max_hw_heartbeat_ms);
ret = devm_pm_runtime_enable(dev);
@@ -254,8 +263,16 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
return devm_watchdog_register_device(dev, &priv->wdev);
}
+static const struct rzv2h_of_data rzv2h_wdt_of_data = {
+ .cks_min = WDTCR_CKS_CLK_1,
+ .cks_max = WDTCR_CKS_CLK_256,
+ .cks_div = 256,
+ .tops = WDTCR_TOPS_16384,
+ .timeout_cycles = 16384,
+};
+
static const struct of_device_id rzv2h_wdt_ids[] = {
- { .compatible = "renesas,r9a09g057-wdt", },
+ { .compatible = "renesas,r9a09g057-wdt", .data = &rzv2h_wdt_of_data },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, rzv2h_wdt_ids);
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 03/17] watchdog: rzv2h: Make "oscclk" and reset controller optional
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 01/17] dt-bindings: watchdog: renesas,wdt: Add " Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 02/17] watchdog: rzv2h: Obtain clock-divider and timeout values from OF match data Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 04/17] watchdog: rzv2h: Add support for configurable count clock source Lad Prabhakar
` (15 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 6229b35298af8c3cb983d866e9da1c1ad4803cc6 upstream.
Update the rzv2h_wdt driver to make the "oscclk" clock and reset
controller optional.
Use devm_clk_get_optional_prepared() to obtain the "oscclk" clock,
allowing the driver to work on platforms that do not provide this clock,
such as the RZ/T2H SoC.
Similarly, use devm_reset_control_get_optional_exclusive() to allow the
driver to function on platforms that lack a reset controller.
These changes are preparatory steps for supporting the RZ/T2H SoC, which
does not provide an "oscclk" clock or a reset controller.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/watchdog/rzv2h_wdt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/rzv2h_wdt.c b/drivers/watchdog/rzv2h_wdt.c
index 755067800ebb9..3c02960b65cf8 100644
--- a/drivers/watchdog/rzv2h_wdt.c
+++ b/drivers/watchdog/rzv2h_wdt.c
@@ -230,11 +230,11 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
if (IS_ERR(priv->pclk))
return dev_err_probe(dev, PTR_ERR(priv->pclk), "no pclk");
- priv->oscclk = devm_clk_get_prepared(dev, "oscclk");
+ priv->oscclk = devm_clk_get_optional_prepared(dev, "oscclk");
if (IS_ERR(priv->oscclk))
return dev_err_probe(dev, PTR_ERR(priv->oscclk), "no oscclk");
- priv->rstc = devm_reset_control_get_exclusive(dev, NULL);
+ priv->rstc = devm_reset_control_get_optional_exclusive(dev, NULL);
if (IS_ERR(priv->rstc))
return dev_err_probe(dev, PTR_ERR(priv->rstc),
"failed to get cpg reset");
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 04/17] watchdog: rzv2h: Add support for configurable count clock source
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (2 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 03/17] watchdog: rzv2h: Make "oscclk" and reset controller optional Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 05/17] watchdog: rzv2h: Add support for RZ/T2H Lad Prabhakar
` (14 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit ef6080fec60af92fc00b96743e85779927baf87b upstream.
Add support for selecting the count clock source used by the watchdog
timer. The RZ/V2H(P) SoC uses the LOCO as the count source, whereas on
RZ/T2H and RZ/N2H SoCs, the count source is the peripheral clock (PCLKL).
Introduce a `count_source` field in the SoC-specific data structure and
refactor the clock rate selection logic accordingly. This prepares the
driver for supporting the RZ/T2H and RZ/N2H SoCs, which differ in their
watchdog clocking architecture from RZ/V2H(P).
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/watchdog/rzv2h_wdt.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/watchdog/rzv2h_wdt.c b/drivers/watchdog/rzv2h_wdt.c
index 3c02960b65cf8..e71d1e108f697 100644
--- a/drivers/watchdog/rzv2h_wdt.c
+++ b/drivers/watchdog/rzv2h_wdt.c
@@ -42,12 +42,18 @@ module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+enum rzv2h_wdt_count_source {
+ COUNT_SOURCE_LOCO,
+ COUNT_SOURCE_PCLK,
+};
+
struct rzv2h_of_data {
u8 cks_min;
u8 cks_max;
u16 cks_div;
u8 tops;
u16 timeout_cycles;
+ enum rzv2h_wdt_count_source count_source;
};
struct rzv2h_wdt_priv {
@@ -214,6 +220,7 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct rzv2h_wdt_priv *priv;
+ struct clk *count_clk;
int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -239,8 +246,19 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
return dev_err_probe(dev, PTR_ERR(priv->rstc),
"failed to get cpg reset");
+ switch (priv->of_data->count_source) {
+ case COUNT_SOURCE_LOCO:
+ count_clk = priv->oscclk;
+ break;
+ case COUNT_SOURCE_PCLK:
+ count_clk = priv->pclk;
+ break;
+ default:
+ return dev_err_probe(dev, -EINVAL, "Invalid count source\n");
+ }
+
priv->wdev.max_hw_heartbeat_ms = (MILLI * priv->of_data->timeout_cycles *
- priv->of_data->cks_div) / clk_get_rate(priv->oscclk);
+ priv->of_data->cks_div) / clk_get_rate(count_clk);
dev_dbg(dev, "max hw timeout of %dms\n", priv->wdev.max_hw_heartbeat_ms);
ret = devm_pm_runtime_enable(dev);
@@ -269,6 +287,7 @@ static const struct rzv2h_of_data rzv2h_wdt_of_data = {
.cks_div = 256,
.tops = WDTCR_TOPS_16384,
.timeout_cycles = 16384,
+ .count_source = COUNT_SOURCE_LOCO,
};
static const struct of_device_id rzv2h_wdt_ids[] = {
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 05/17] watchdog: rzv2h: Add support for RZ/T2H
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (3 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 04/17] watchdog: rzv2h: Add support for configurable count clock source Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2026-01-05 11:33 ` [cip-dev] " Pavel Machek
2025-12-31 17:00 ` [PATCH 6.12.y-cip 06/17] dt-bindings: mmc: renesas,sdhi: Document RZ/T2H and RZ/N2H support Lad Prabhakar
` (13 subsequent siblings)
18 siblings, 1 reply; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 2b20697635276b0281a2a4abf70099c4377c51dc upstream.
Add support for the RZ/T2H watchdog timer. The RZ/T2H requires control of
the watchdog counter using the WDT Debug Control Register (WDTDCR), which
allows explicitly stopping and starting the counter. This behavior differs
from RZ/V2H, which doesn't have WDTDCR, so the driver is extended to handle
this requirement.
To support this, a new `wdtdcr` flag is introduced in the `rzv2h_of_data`
structure. When set, the driver maps the WDTDCR register and uses it to
control the watchdog counter in the start, stop, and restart callbacks.
Additionally, the clock divisor and count source for RZ/T2H are defined
to match its hardware configuration.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/watchdog/rzv2h_wdt.c | 84 ++++++++++++++++++++++++++++++++++--
1 file changed, 81 insertions(+), 3 deletions(-)
diff --git a/drivers/watchdog/rzv2h_wdt.c b/drivers/watchdog/rzv2h_wdt.c
index e71d1e108f697..ee3ed5a6d98ea 100644
--- a/drivers/watchdog/rzv2h_wdt.c
+++ b/drivers/watchdog/rzv2h_wdt.c
@@ -21,11 +21,17 @@
#define WDTSR 0x04 /* WDT Status Register RW, 16 */
#define WDTRCR 0x06 /* WDT Reset Control Register RW, 8 */
+/* This register is only available on RZ/T2H and RZ/N2H SoCs */
+#define WDTDCR 0x00 /* WDT Debug Control Register RW, 32 */
+
#define WDTCR_TOPS_1024 0x00
+#define WDTCR_TOPS_4096 0x01
#define WDTCR_TOPS_16384 0x03
#define WDTCR_CKS_CLK_1 0x00
+#define WDTCR_CKS_CLK_4 0x10
#define WDTCR_CKS_CLK_256 0x50
+#define WDTCR_CKS_CLK_8192 0x80
#define WDTCR_RPES_0 0x300
#define WDTCR_RPES_75 0x000
@@ -35,6 +41,8 @@
#define WDTRCR_RSTIRQS BIT(7)
+#define WDTDCR_WDTSTOPCTRL BIT(0)
+
#define WDT_DEFAULT_TIMEOUT 60U
static bool nowayout = WATCHDOG_NOWAYOUT;
@@ -54,10 +62,12 @@ struct rzv2h_of_data {
u8 tops;
u16 timeout_cycles;
enum rzv2h_wdt_count_source count_source;
+ bool wdtdcr;
};
struct rzv2h_wdt_priv {
void __iomem *base;
+ void __iomem *wdtdcr;
struct clk *pclk;
struct clk *oscclk;
struct reset_control *rstc;
@@ -79,6 +89,20 @@ static int rzv2h_wdt_ping(struct watchdog_device *wdev)
return 0;
}
+static void rzt2h_wdt_wdtdcr_count_stop(struct rzv2h_wdt_priv *priv)
+{
+ u32 reg = readl(priv->wdtdcr + WDTDCR);
+
+ writel(reg | WDTDCR_WDTSTOPCTRL, priv->wdtdcr + WDTDCR);
+}
+
+static void rzt2h_wdt_wdtdcr_count_start(struct rzv2h_wdt_priv *priv)
+{
+ u32 reg = readl(priv->wdtdcr + WDTDCR);
+
+ writel(reg & ~WDTDCR_WDTSTOPCTRL, priv->wdtdcr + WDTDCR);
+}
+
static void rzv2h_wdt_setup(struct watchdog_device *wdev, u16 wdtcr)
{
struct rzv2h_wdt_priv *priv = watchdog_get_drvdata(wdev);
@@ -114,14 +138,21 @@ static int rzv2h_wdt_start(struct watchdog_device *wdev)
/*
* WDTCR
- * - CKS[7:4] - Clock Division Ratio Select - 0101b: oscclk/256
+ * - CKS[7:4] - Clock Division Ratio Select
+ * - 0101b: oscclk/256 for RZ/V2H(P)
+ * - 1000b: pclkl/8192 for RZ/T2H
* - RPSS[13:12] - Window Start Position Select - 11b: 100%
* - RPES[9:8] - Window End Position Select - 11b: 0%
- * - TOPS[1:0] - Timeout Period Select - 11b: 16384 cycles (3FFFh)
+ * - TOPS[1:0] - Timeout Period Select
+ * - 11b: 16384 cycles (3FFFh) for RZ/V2H(P)
+ * - 01b: 4096 cycles (0FFFh) for RZ/T2H
*/
rzv2h_wdt_setup(wdev, of_data->cks_max | WDTCR_RPSS_100 |
WDTCR_RPES_0 | of_data->tops);
+ if (priv->of_data->wdtdcr)
+ rzt2h_wdt_wdtdcr_count_start(priv);
+
/*
* Down counting starts after writing the sequence 00h -> FFh to the
* WDTRR register. Hence, call the ping operation after loading the counter.
@@ -140,6 +171,9 @@ static int rzv2h_wdt_stop(struct watchdog_device *wdev)
if (ret)
return ret;
+ if (priv->of_data->wdtdcr)
+ rzt2h_wdt_wdtdcr_count_stop(priv);
+
ret = pm_runtime_put(wdev->parent);
if (ret < 0)
return ret;
@@ -192,7 +226,9 @@ static int rzv2h_wdt_restart(struct watchdog_device *wdev,
/*
* WDTCR
- * - CKS[7:4] - Clock Division Ratio Select - 0000b: oscclk/1
+ * - CKS[7:4] - Clock Division Ratio Select
+ * - 0000b: oscclk/1 for RZ/V2H(P)
+ * - 0100b: pclkl/4 for RZ/T2H
* - RPSS[13:12] - Window Start Position Select - 00b: 25%
* - RPES[9:8] - Window End Position Select - 00b: 75%
* - TOPS[1:0] - Timeout Period Select - 00b: 1024 cycles (03FFh)
@@ -200,6 +236,9 @@ static int rzv2h_wdt_restart(struct watchdog_device *wdev,
rzv2h_wdt_setup(wdev, priv->of_data->cks_min | WDTCR_RPSS_25 |
WDTCR_RPES_75 | WDTCR_TOPS_1024);
+ if (priv->of_data->wdtdcr)
+ rzt2h_wdt_wdtdcr_count_start(priv);
+
rzv2h_wdt_ping(wdev);
/* wait for underflow to trigger... */
@@ -216,6 +255,28 @@ static const struct watchdog_ops rzv2h_wdt_ops = {
.restart = rzv2h_wdt_restart,
};
+static int rzt2h_wdt_wdtdcr_init(struct platform_device *pdev,
+ struct rzv2h_wdt_priv *priv)
+{
+ int ret;
+
+ priv->wdtdcr = devm_platform_ioremap_resource(pdev, 1);
+ if (IS_ERR(priv->wdtdcr))
+ return PTR_ERR(priv->wdtdcr);
+
+ ret = pm_runtime_resume_and_get(&pdev->dev);
+ if (ret)
+ return ret;
+
+ rzt2h_wdt_wdtdcr_count_stop(priv);
+
+ ret = pm_runtime_put(&pdev->dev);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
static int rzv2h_wdt_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -265,6 +326,12 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
if (ret)
return ret;
+ if (priv->of_data->wdtdcr) {
+ ret = rzt2h_wdt_wdtdcr_init(pdev, priv);
+ if (ret)
+ return dev_err_probe(dev, ret, "WDTDCR init failed\n");
+ }
+
priv->wdev.min_timeout = 1;
priv->wdev.timeout = WDT_DEFAULT_TIMEOUT;
priv->wdev.info = &rzv2h_wdt_ident;
@@ -281,6 +348,16 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
return devm_watchdog_register_device(dev, &priv->wdev);
}
+static const struct rzv2h_of_data rzt2h_wdt_of_data = {
+ .cks_min = WDTCR_CKS_CLK_4,
+ .cks_max = WDTCR_CKS_CLK_8192,
+ .cks_div = 8192,
+ .tops = WDTCR_TOPS_4096,
+ .timeout_cycles = 4096,
+ .count_source = COUNT_SOURCE_PCLK,
+ .wdtdcr = true,
+};
+
static const struct rzv2h_of_data rzv2h_wdt_of_data = {
.cks_min = WDTCR_CKS_CLK_1,
.cks_max = WDTCR_CKS_CLK_256,
@@ -292,6 +369,7 @@ static const struct rzv2h_of_data rzv2h_wdt_of_data = {
static const struct of_device_id rzv2h_wdt_ids[] = {
{ .compatible = "renesas,r9a09g057-wdt", .data = &rzv2h_wdt_of_data },
+ { .compatible = "renesas,r9a09g077-wdt", .data = &rzt2h_wdt_of_data },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, rzv2h_wdt_ids);
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 06/17] dt-bindings: mmc: renesas,sdhi: Document RZ/T2H and RZ/N2H support
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (4 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 05/17] watchdog: rzv2h: Add support for RZ/T2H Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 07/17] dt-bindings: clock: renesas,r9a09g077/87: Add SDHI_CLKHS clock ID Lad Prabhakar
` (12 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit b93d8b1cab299bc76f574f9e3cb8aafcfafc0037 upstream.
Add SDHI bindings for the Renesas RZ/T2H (a.k.a R9A09G077) and RZ/N2H
(a.k.a R9A09G087) SoCs. Use `renesas,sdhi-r9a09g057` as a fallback since
the SD/MMC block on these SoCs is identical to the one on RZ/V2H(P),
allowing reuse of the existing driver without modifications.
Update the binding schema to reflect differences: unlike RZ/V2H(P),
RZ/T2H and RZ/N2H do not require the `resets` property and use only a
two clocks instead of four.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250617164914.158091-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
.../devicetree/bindings/mmc/renesas,sdhi.yaml | 85 ++++++++++++-------
1 file changed, 53 insertions(+), 32 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
index 7563623876fc0..ba15ccbda61ab 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
+++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
@@ -72,6 +72,8 @@ properties:
- enum:
- renesas,sdhi-r9a09g047 # RZ/G3E
- renesas,sdhi-r9a09g056 # RZ/V2N
+ - renesas,sdhi-r9a09g077 # RZ/T2H
+ - renesas,sdhi-r9a09g087 # RZ/N2H
- const: renesas,sdhi-r9a09g057 # RZ/V2H(P)
reg:
@@ -129,59 +131,78 @@ allOf:
compatible:
contains:
enum:
- - renesas,sdhi-r9a09g057
- - renesas,rzg2l-sdhi
+ - renesas,sdhi-r9a09g077
+ - renesas,sdhi-r9a09g087
then:
properties:
+ resets: false
clocks:
items:
- - description: IMCLK, SDHI channel main clock1.
- - description: CLK_HS, SDHI channel High speed clock which operates
- 4 times that of SDHI channel main clock1.
- - description: IMCLK2, SDHI channel main clock2. When this clock is
- turned off, external SD card detection cannot be
- detected.
- - description: ACLK, SDHI channel bus clock.
+ - description: ACLK, IMCLK, SDHI channel bus and main clocks.
+ - description: CLK_HS, SDHI channel High speed clock.
clock-names:
items:
- - const: core
- - const: clkh
- - const: cd
- const: aclk
- required:
- - clock-names
- - resets
+ - const: clkh
else:
if:
properties:
compatible:
contains:
enum:
- - renesas,rcar-gen2-sdhi
- - renesas,rcar-gen3-sdhi
- - renesas,rcar-gen4-sdhi
+ - renesas,sdhi-r9a09g057
+ - renesas,rzg2l-sdhi
then:
properties:
clocks:
- minItems: 1
- maxItems: 3
- clock-names:
- minItems: 1
- uniqueItems: true
items:
- - const: core
- - enum: [ clkh, cd ]
- - const: cd
- else:
- properties:
- clocks:
- minItems: 1
- maxItems: 2
+ - description: IMCLK, SDHI channel main clock1.
+ - description: CLK_HS, SDHI channel High speed clock which operates
+ 4 times that of SDHI channel main clock1.
+ - description: IMCLK2, SDHI channel main clock2. When this clock is
+ turned off, external SD card detection cannot be
+ detected.
+ - description: ACLK, SDHI channel bus clock.
clock-names:
- minItems: 1
items:
- const: core
+ - const: clkh
- const: cd
+ - const: aclk
+ required:
+ - clock-names
+ - resets
+ else:
+ if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,rcar-gen2-sdhi
+ - renesas,rcar-gen3-sdhi
+ - renesas,rcar-gen4-sdhi
+ then:
+ properties:
+ clocks:
+ minItems: 1
+ maxItems: 3
+ clock-names:
+ minItems: 1
+ uniqueItems: true
+ items:
+ - const: core
+ - enum: [ clkh, cd ]
+ - const: cd
+ else:
+ properties:
+ clocks:
+ minItems: 1
+ maxItems: 2
+ clock-names:
+ minItems: 1
+ items:
+ - const: core
+ - const: cd
- if:
properties:
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 07/17] dt-bindings: clock: renesas,r9a09g077/87: Add SDHI_CLKHS clock ID
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (5 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 06/17] dt-bindings: mmc: renesas,sdhi: Document RZ/T2H and RZ/N2H support Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 08/17] clk: renesas: cpg-mssr: Add read-back and delay handling for RZ/T2H MSTP Lad Prabhakar
` (11 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 2a76193f7cc03de5b2745d069926ebc431dd5ba4 upstream.
Add the SDHI high-speed clock (SDHI_CLKHS) definition for the Renesas
RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs. SDHI_CLKHS is used as
a core clock for the SDHI IP and operates at 800MHz.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250625141705.151383-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h | 1 +
include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h b/include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h
index f6e5f62b07c4a..7ecc4f0b235aa 100644
--- a/include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h
+++ b/include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h
@@ -24,5 +24,6 @@
#define R9A09G077_CLK_PCLKH 12
#define R9A09G077_CLK_PCLKM 13
#define R9A09G077_CLK_PCLKL 14
+#define R9A09G077_SDHI_CLKHS 15
#endif /* __DT_BINDINGS_CLOCK_RENESAS_R9A09G077_CPG_H__ */
diff --git a/include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h b/include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h
index f28166d6015f4..925e57703925d 100644
--- a/include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h
+++ b/include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h
@@ -24,5 +24,6 @@
#define R9A09G087_CLK_PCLKH 12
#define R9A09G087_CLK_PCLKM 13
#define R9A09G087_CLK_PCLKL 14
+#define R9A09G087_SDHI_CLKHS 15
#endif /* __DT_BINDINGS_CLOCK_RENESAS_R9A09G087_CPG_H__ */
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 08/17] clk: renesas: cpg-mssr: Add read-back and delay handling for RZ/T2H MSTP
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (6 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 07/17] dt-bindings: clock: renesas,r9a09g077/87: Add SDHI_CLKHS clock ID Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 09/17] clk: renesas: r9a09g077: Add PLL2 and SDHI clock support Lad Prabhakar
` (10 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 934dcccf3ffc7568fdeb363842bb9fc36e1be608 upstream.
On the RZ/T2H SoC, a specific sequence is required when releasing a
module from the module stop state (i.e. when clearing the corresponding
bit in the MSTPCRm register to '0'). After writing to the MSTPCRm
register, a read-back of the same register must be performed, followed
by at least seven dummy reads of any register within the IP block that
is being released.
To avoid mapping device registers for this purpose, a short delay is
introduced after the read-back to ensure proper hardware stabilization
before the module becomes accessible.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251014105348.93705-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/clk/renesas/renesas-cpg-mssr.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 4d2d945b3f5e2..68640959f6740 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -308,10 +308,21 @@ static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
spin_unlock_irqrestore(&priv->pub.rmw_lock, flags);
- if (!enable || priv->reg_layout == CLK_REG_LAYOUT_RZ_A ||
- priv->reg_layout == CLK_REG_LAYOUT_RZ_T2H)
+ if (!enable || priv->reg_layout == CLK_REG_LAYOUT_RZ_A)
return 0;
+ if (priv->reg_layout == CLK_REG_LAYOUT_RZ_T2H) {
+ /*
+ * For the RZ/T2H case, it is necessary to perform a read-back after
+ * accessing the MSTPCRm register and to dummy-read any register of
+ * the IP at least seven times. Instead of memory-mapping the IP
+ * register, we simply add a delay after the read operation.
+ */
+ cpg_rzt2h_mstp_read(hw, priv->control_regs[reg]);
+ udelay(10);
+ return 0;
+ }
+
error = readl_poll_timeout_atomic(priv->pub.base0 + priv->status_regs[reg],
value, !(value & bitmask), 0, 10);
if (error)
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 09/17] clk: renesas: r9a09g077: Add PLL2 and SDHI clock support
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (7 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 08/17] clk: renesas: cpg-mssr: Add read-back and delay handling for RZ/T2H MSTP Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 10/17] arm64: dts: renesas: r9a09g077: Add SDHI nodes Lad Prabhakar
` (9 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 09d50e09fab65f42d4656e9b01f225db7d311348 upstream.
Add support for PLL2 to the R9A09G077 (RZ/T2H) clock definitions and
register it as the source for the high-speed SDHI clock (SDHI_CLKHS)
operating at 800MHz.
Also add fixed-factor clock PCLKAM derived from CLK_PLL4D1, and define
module clocks for SDHI0 and SDHI1, both of which use PCLKAM as their
clock source.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250625141705.151383-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[PL:manually applied the changes.]
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/clk/renesas/r9a09g077-cpg.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/renesas/r9a09g077-cpg.c b/drivers/clk/renesas/r9a09g077-cpg.c
index 5e39f3afc3b7f..cb792aa5877ba 100644
--- a/drivers/clk/renesas/r9a09g077-cpg.c
+++ b/drivers/clk/renesas/r9a09g077-cpg.c
@@ -67,7 +67,7 @@ enum rzt2h_clk_types {
enum clk_ids {
/* Core Clock Outputs exported to DT */
- LAST_DT_CORE_CLK = R9A09G077_CLK_PCLKL,
+ LAST_DT_CORE_CLK = R9A09G077_SDHI_CLKHS,
/* External Input Clocks */
CLK_EXTAL,
@@ -76,9 +76,11 @@ enum clk_ids {
CLK_LOCO,
CLK_PLL0,
CLK_PLL1,
+ CLK_PLL2,
CLK_PLL4,
CLK_SEL_CLK_PLL0,
CLK_SEL_CLK_PLL1,
+ CLK_SEL_CLK_PLL2,
CLK_SEL_CLK_PLL4,
CLK_PLL4D1,
CLK_SCI0ASYNC,
@@ -105,6 +107,7 @@ static const struct clk_div_table dtable_24_25_30_32[] = {
static const char * const sel_clk_pll0[] = { ".loco", ".pll0" };
static const char * const sel_clk_pll1[] = { ".loco", ".pll1" };
+static const char * const sel_clk_pll2[] = { ".loco", ".pll2" };
static const char * const sel_clk_pll4[] = { ".loco", ".pll4" };
static const struct cpg_core_clk r9a09g077_core_clks[] __initconst = {
@@ -115,12 +118,15 @@ static const struct cpg_core_clk r9a09g077_core_clks[] __initconst = {
DEF_RATE(".loco", CLK_LOCO, 1000 * 1000),
DEF_FIXED(".pll0", CLK_PLL0, CLK_EXTAL, 1, 48),
DEF_FIXED(".pll1", CLK_PLL1, CLK_EXTAL, 1, 40),
+ DEF_FIXED(".pll2", CLK_PLL2, CLK_EXTAL, 1, 32),
DEF_FIXED(".pll4", CLK_PLL4, CLK_EXTAL, 1, 96),
DEF_MUX(".sel_clk_pll0", CLK_SEL_CLK_PLL0, SEL_PLL,
sel_clk_pll0, ARRAY_SIZE(sel_clk_pll0), CLK_MUX_READ_ONLY),
DEF_MUX(".sel_clk_pll1", CLK_SEL_CLK_PLL1, SEL_PLL,
sel_clk_pll1, ARRAY_SIZE(sel_clk_pll1), CLK_MUX_READ_ONLY),
+ DEF_MUX(".sel_clk_pll2", CLK_SEL_CLK_PLL2, SEL_PLL,
+ sel_clk_pll2, ARRAY_SIZE(sel_clk_pll2), CLK_MUX_READ_ONLY),
DEF_MUX(".sel_clk_pll4", CLK_SEL_CLK_PLL4, SEL_PLL,
sel_clk_pll4, ARRAY_SIZE(sel_clk_pll4), CLK_MUX_READ_ONLY),
@@ -142,6 +148,8 @@ static const struct cpg_core_clk r9a09g077_core_clks[] __initconst = {
DEF_FIXED("PCLKGPTL", R9A09G077_CLK_PCLKGPTL, CLK_SEL_CLK_PLL1, 2, 1),
DEF_FIXED("PCLKM", R9A09G077_CLK_PCLKM, CLK_SEL_CLK_PLL1, 8, 1),
DEF_FIXED("PCLKL", R9A09G077_CLK_PCLKL, CLK_SEL_CLK_PLL1, 16, 1),
+ DEF_FIXED("PCLKAM", R9A09G077_CLK_PCLKAM, CLK_PLL4D1, 12, 1),
+ DEF_FIXED("SDHI_CLKHS", R9A09G077_SDHI_CLKHS, CLK_SEL_CLK_PLL2, 1, 1),
};
static const struct mssr_mod_clk r9a09g077_mod_clks[] __initconst = {
@@ -149,6 +157,8 @@ static const struct mssr_mod_clk r9a09g077_mod_clks[] __initconst = {
DEF_MOD("iic0", 100, R9A09G077_CLK_PCLKL),
DEF_MOD("iic1", 101, R9A09G077_CLK_PCLKL),
DEF_MOD("iic2", 601, R9A09G077_CLK_PCLKL),
+ DEF_MOD("sdhi0", 1212, R9A09G077_CLK_PCLKAM),
+ DEF_MOD("sdhi1", 1213, R9A09G077_CLK_PCLKAM),
};
static struct clk * __init
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 10/17] arm64: dts: renesas: r9a09g077: Add SDHI nodes
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (8 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 09/17] clk: renesas: r9a09g077: Add PLL2 and SDHI clock support Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 11/17] arm64: dts: renesas: r9a09g087: " Lad Prabhakar
` (8 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit c5dbcd94fc78d67b6c0a7e55615ae2019300956f upstream.
Add the SDHI0-SDHI1 nodes to the RZ/T2H ("R9A09G077") SoC DTSI.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250707153533.287832-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 40 ++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
index d034a78c8e01b..da7aa2e3b043e 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
@@ -168,6 +168,46 @@ gic: interrupt-controller@83000000 {
interrupt-controller;
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
};
+
+ sdhi0: mmc@92080000 {
+ compatible = "renesas,sdhi-r9a09g077",
+ "renesas,sdhi-r9a09g057";
+ reg = <0x0 0x92080000 0 0x10000>;
+ interrupts = <GIC_SPI 782 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 783 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 1212>,
+ <&cpg CPG_CORE R9A09G077_SDHI_CLKHS>;
+ clock-names = "aclk", "clkh";
+ power-domains = <&cpg>;
+ status = "disabled";
+
+ sdhi0_vqmmc: vqmmc-regulator {
+ regulator-name = "SDHI0-VQMMC";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ status = "disabled";
+ };
+ };
+
+ sdhi1: mmc@92090000 {
+ compatible = "renesas,sdhi-r9a09g077",
+ "renesas,sdhi-r9a09g057";
+ reg = <0x0 0x92090000 0 0x10000>;
+ interrupts = <GIC_SPI 784 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 785 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 1213>,
+ <&cpg CPG_CORE R9A09G077_SDHI_CLKHS>;
+ clock-names = "aclk", "clkh";
+ power-domains = <&cpg>;
+ status = "disabled";
+
+ sdhi1_vqmmc: vqmmc-regulator {
+ regulator-name = "SDHI1-VQMMC";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ status = "disabled";
+ };
+ };
};
timer {
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 11/17] arm64: dts: renesas: r9a09g087: Add SDHI nodes
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (9 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 10/17] arm64: dts: renesas: r9a09g077: Add SDHI nodes Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 12/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable eMMC Lad Prabhakar
` (7 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit deab74707654cbfcd4b1e984d8f64479145b6895 upstream.
Add the SDHI0-SDHI1 nodes to the RZ/N2H ("R9A09G087") SoC DTSI.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250707153533.287832-5-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 40 ++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
index b222f518267e7..0e291c711d6b5 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
@@ -168,6 +168,46 @@ gic: interrupt-controller@83000000 {
interrupt-controller;
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
};
+
+ sdhi0: mmc@92080000 {
+ compatible = "renesas,sdhi-r9a09g087",
+ "renesas,sdhi-r9a09g057";
+ reg = <0x0 0x92080000 0 0x10000>;
+ interrupts = <GIC_SPI 782 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 783 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 1212>,
+ <&cpg CPG_CORE R9A09G087_SDHI_CLKHS>;
+ clock-names = "aclk", "clkh";
+ power-domains = <&cpg>;
+ status = "disabled";
+
+ sdhi0_vqmmc: vqmmc-regulator {
+ regulator-name = "SDHI0-VQMMC";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ status = "disabled";
+ };
+ };
+
+ sdhi1: mmc@92090000 {
+ compatible = "renesas,sdhi-r9a09g087",
+ "renesas,sdhi-r9a09g057";
+ reg = <0x0 0x92090000 0 0x10000>;
+ interrupts = <GIC_SPI 784 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 785 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 1213>,
+ <&cpg CPG_CORE R9A09G087_SDHI_CLKHS>;
+ clock-names = "aclk", "clkh";
+ power-domains = <&cpg>;
+ status = "disabled";
+
+ sdhi1_vqmmc: vqmmc-regulator {
+ regulator-name = "SDHI1-VQMMC";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ status = "disabled";
+ };
+ };
};
timer {
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 12/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable eMMC
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (10 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 11/17] arm64: dts: renesas: r9a09g087: " Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 13/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable MicroSD card slot Lad Prabhakar
` (6 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 4d7624fc85a27240ce35e0acc624dd165a314fca upstream.
Enable eMMC on RZ/T2H and RZ/N2H EVKs. As SDHI0 can be connected to
either eMMC0/SD0 `SD0_EMMC` macro is added.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250820200659.2048755-8-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
.../dts/renesas/r9a09g077m44-rzt2h-evk.dts | 9 +++
.../dts/renesas/r9a09g087m44-rzn2h-evk.dts | 10 +++
.../dts/renesas/rzt2h-n2h-evk-common.dtsi | 62 +++++++++++++++++++
3 files changed, 81 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
index 6aeb5cacead32..7f196f1d1a2d8 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
@@ -10,6 +10,15 @@
#include <dt-bindings/pinctrl/renesas,r9a09g077-pinctrl.h>
#include "r9a09g077m44.dtsi"
+
+/*
+ * SD0 can be connected to either eMMC (IC49) or SD card slot CN31
+ * Lets by default enable the eMMC, note we need the below SW settings
+ * for eMMC.
+ * SW2[1] = ON; SW2[2] = ON
+ */
+#define SD0_EMMC 1
+
#include "rzt2h-n2h-evk-common.dtsi"
/ {
diff --git a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
index a068661fc4429..87e362f6f09f7 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
@@ -8,6 +8,16 @@
/dts-v1/;
#include "r9a09g087m44.dtsi"
+
+/*
+ * SD0 can be connected to either eMMC (U33) or SD card slot CN21
+ * Lets by default enable the eMMC, note we need the below SW settings
+ * for eMMC.
+ * DSW5[1] = ON; DSW5[2] = ON
+ * DSW17[5] = OFF; DSW17[6] = ON
+ */
+#define SD0_EMMC 1
+
#include "rzt2h-n2h-evk-common.dtsi"
/*
diff --git a/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi b/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
index 1b7e16ffe6b69..68d493bf5e8cf 100644
--- a/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
@@ -13,12 +13,31 @@ / {
aliases {
i2c0 = &i2c0;
i2c1 = &i2c1;
+ mmc0 = &sdhi0;
serial0 = &sci0;
};
chosen {
stdout-path = "serial0:115200n8";
};
+
+ reg_1p8v: regulator-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
};
&extal_clk {
@@ -46,6 +65,34 @@ sci0_pins: sci0-pins {
pinmux = <RZT2H_PORT_PINMUX(27, 4, 0x14)>,
<RZT2H_PORT_PINMUX(27, 5, 0x14)>;
};
+
+#if SD0_EMMC
+ sdhi0-emmc-iovs-hog {
+ gpio-hog;
+ gpios = <RZT2H_GPIO(2, 6) GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "SD0_IOVS";
+ };
+#endif
+
+ sdhi0_emmc_pins: sd0-emmc-group {
+ data-pins {
+ pinmux = <RZT2H_PORT_PINMUX(12, 2, 0x29)>, /* SD0_DATA0 */
+ <RZT2H_PORT_PINMUX(12, 3, 0x29)>, /* SD0_DATA1 */
+ <RZT2H_PORT_PINMUX(12, 4, 0x29)>, /* SD0_DATA2 */
+ <RZT2H_PORT_PINMUX(12, 5, 0x29)>, /* SD0_DATA3 */
+ <RZT2H_PORT_PINMUX(12, 6, 0x29)>, /* SD0_DATA4 */
+ <RZT2H_PORT_PINMUX(12, 7, 0x29)>, /* SD0_DATA5 */
+ <RZT2H_PORT_PINMUX(13, 0, 0x29)>, /* SD0_DATA6 */
+ <RZT2H_PORT_PINMUX(13, 1, 0x29)>; /* SD0_DATA7 */
+ };
+
+ ctrl-pins {
+ pinmux = <RZT2H_PORT_PINMUX(12, 0, 0x29)>, /* SD0_CLK */
+ <RZT2H_PORT_PINMUX(12, 1, 0x29)>, /* SD0_CMD */
+ <RZT2H_PORT_PINMUX(13, 2, 0x29)>; /* SD0_RST# */
+ };
+ };
};
&sci0 {
@@ -53,3 +100,18 @@ &sci0 {
pinctrl-names = "default";
status = "okay";
};
+
+#if SD0_EMMC
+&sdhi0 {
+ pinctrl-0 = <&sdhi0_emmc_pins>;
+ pinctrl-1 = <&sdhi0_emmc_pins>;
+ pinctrl-names = "default", "state_uhs";
+ vmmc-supply = <®_3p3v>;
+ vqmmc-supply = <®_1p8v>;
+ bus-width = <8>;
+ non-removable;
+ mmc-hs200-1_8v;
+ fixed-emmc-driver-type = <1>;
+ status = "okay";
+};
+#endif
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 13/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable MicroSD card slot
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (11 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 12/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable eMMC Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 14/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable SD " Lad Prabhakar
` (5 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit dba8ee27c5de15c3c347816bb189af939092aea9 upstream.
Enable MicroSD card slot which is connected to SDHI1 on the RZ/T2H and
RZ/N2H EVKs.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250820200659.2048755-9-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
.../dts/renesas/r9a09g077m44-rzt2h-evk.dts | 9 ++++
.../dts/renesas/r9a09g087m44-rzn2h-evk.dts | 6 +++
.../dts/renesas/rzt2h-n2h-evk-common.dtsi | 51 +++++++++++++++++++
3 files changed, 66 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
index 7f196f1d1a2d8..e9c691d568448 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
@@ -19,6 +19,13 @@
*/
#define SD0_EMMC 1
+/*
+ * P17_4 = SD1_CD; SW2[3] = ON
+ * P08_5 = SD1_PWEN; SW2[3] = ON
+ * P08_6 = SD1_IOVS; SW2[3] = ON; SW5[3] = OFF; SW5[4] = ON
+ */
+#define SD1_MICRO_SD 1
+
#include "rzt2h-n2h-evk-common.dtsi"
/ {
@@ -51,6 +58,7 @@ led-2 {
function-enumerator = <2>;
};
+#if (!SD1_MICRO_SD)
led-3 {
/* SW2-3: OFF */
gpios = <&pinctrl RZT2H_GPIO(8, 5) GPIO_ACTIVE_HIGH>;
@@ -58,6 +66,7 @@ led-3 {
function = LED_FUNCTION_DEBUG;
function-enumerator = <3>;
};
+#endif
led-4 {
/* SW8-3: ON, SW8-4: OFF */
diff --git a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
index 87e362f6f09f7..87178933bee8d 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
@@ -18,6 +18,12 @@
*/
#define SD0_EMMC 1
+/*
+ * P17_4 = SD1_CD; DSW5[3] = ON; DSW19[1] = OFF; DSW19[2] = ON
+ * P08_6 = SD1_IOVS; DSW5[3] = ON
+ */
+#define SD1_MICRO_SD 1
+
#include "rzt2h-n2h-evk-common.dtsi"
/*
diff --git a/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi b/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
index 68d493bf5e8cf..34572630ecbe7 100644
--- a/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
@@ -14,6 +14,7 @@ aliases {
i2c0 = &i2c0;
i2c1 = &i2c1;
mmc0 = &sdhi0;
+ mmc1 = &sdhi1;
serial0 = &sci0;
};
@@ -38,6 +39,18 @@ reg_3p3v: regulator-3p3v {
regulator-boot-on;
regulator-always-on;
};
+
+#if SD1_MICRO_SD
+ vccq_sdhi1: regulator-vccq-sdhi1 {
+ compatible = "regulator-gpio";
+ regulator-name = "SDHI1 VccQ";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&pinctrl RZT2H_GPIO(8, 6) GPIO_ACTIVE_HIGH>;
+ gpios-states = <0>;
+ states = <3300000 0>, <1800000 1>;
+ };
+#endif
};
&extal_clk {
@@ -93,6 +106,30 @@ ctrl-pins {
<RZT2H_PORT_PINMUX(13, 2, 0x29)>; /* SD0_RST# */
};
};
+
+#if SD1_MICRO_SD
+ sdhi1-pwen-hog {
+ gpio-hog;
+ gpios = <RZT2H_GPIO(8, 5) GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "SD1_PWEN";
+ };
+#endif
+
+ sdhi1_pins: sd1-group {
+ data-pins {
+ pinmux = <RZT2H_PORT_PINMUX(16, 7, 0x29)>, /* SD1_DATA0 */
+ <RZT2H_PORT_PINMUX(17, 0, 0x29)>, /* SD1_DATA1 */
+ <RZT2H_PORT_PINMUX(17, 1, 0x29)>, /* SD1_DATA2 */
+ <RZT2H_PORT_PINMUX(17, 2, 0x29)>; /* SD1_DATA3 */
+ };
+
+ ctrl-pins {
+ pinmux = <RZT2H_PORT_PINMUX(16, 5, 0x29)>, /* SD1_CLK */
+ <RZT2H_PORT_PINMUX(16, 6, 0x29)>, /* SD1_CMD */
+ <RZT2H_PORT_PINMUX(17, 4, 0x29)>; /* SD1_CD */
+ };
+ };
};
&sci0 {
@@ -115,3 +152,17 @@ &sdhi0 {
status = "okay";
};
#endif
+
+#if SD1_MICRO_SD
+&sdhi1 {
+ pinctrl-0 = <&sdhi1_pins>;
+ pinctrl-1 = <&sdhi1_pins>;
+ pinctrl-names = "default", "state_uhs";
+ vmmc-supply = <®_3p3v>;
+ vqmmc-supply = <&vccq_sdhi1>;
+ bus-width = <4>;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ status = "okay";
+};
+#endif
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 14/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable SD card slot
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (12 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 13/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable MicroSD card slot Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 15/17] arm64: dts: renesas: r9a09g077: Add WDT nodes Lad Prabhakar
` (4 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit d065453e5ee097193e3da3f7a8aafcdfabbaf78f upstream.
Enable SD card slot which is connected to SDHI0 on the RZ/T2H and
RZ/N2H EVKs.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250820200659.2048755-10-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
.../dts/renesas/r9a09g077m44-rzt2h-evk.dts | 5 ++
.../dts/renesas/r9a09g087m44-rzn2h-evk.dts | 9 ++++
.../dts/renesas/rzt2h-n2h-evk-common.dtsi | 51 +++++++++++++++++++
3 files changed, 65 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
index e9c691d568448..7da3d23d2c0be 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
@@ -16,8 +16,13 @@
* Lets by default enable the eMMC, note we need the below SW settings
* for eMMC.
* SW2[1] = ON; SW2[2] = ON
+ *
+ * To enable SD card and disable eMMC on SDHI0 disable the below macro
+ * and set the below switch setting:
+ * SW2[1] = OFF; SW2[2] = ON
*/
#define SD0_EMMC 1
+#define SD0_SD (!SD0_EMMC)
/*
* P17_4 = SD1_CD; SW2[3] = ON
diff --git a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
index 87178933bee8d..80f358fb2d742 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
@@ -15,8 +15,17 @@
* for eMMC.
* DSW5[1] = ON; DSW5[2] = ON
* DSW17[5] = OFF; DSW17[6] = ON
+ *
+ * To enable SD card and disable eMMC on SDHI0 disable the below macro
+ * and set the below switch setting:
+ * DSW5[1] = OFF; DSW5[2] = ON
+ * P22_6 = SD0_WP; DSW15[1] = OFF; DSW15[2] = ON
+ * P22_5 = SD0_CD; DSW15[3] = OFF; DSW15[4] = ON
+ * P02_6 = SD0_IOVS; DSW17[5] = OFF; DSW17[6] = ON
+ * P02_5 = SD0_PWEN; DSW17[7] = OFF; DSW17[8] = ON
*/
#define SD0_EMMC 1
+#define SD0_SD (!SD0_EMMC)
/*
* P17_4 = SD1_CD; DSW5[3] = ON; DSW19[1] = OFF; DSW19[2] = ON
diff --git a/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi b/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
index 34572630ecbe7..8b9d04dce8ae0 100644
--- a/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
@@ -40,6 +40,18 @@ reg_3p3v: regulator-3p3v {
regulator-always-on;
};
+#if SD0_SD
+ vqmmc_sdhi0: regulator-vqmmc-sdhi0 {
+ compatible = "regulator-gpio";
+ regulator-name = "SDHI0 VqmmC";
+ gpios = <&pinctrl RZT2H_GPIO(2, 6) GPIO_ACTIVE_HIGH>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ gpios-states = <0>;
+ states = <3300000 0>, <1800000 1>;
+ };
+#endif
+
#if SD1_MICRO_SD
vccq_sdhi1: regulator-vccq-sdhi1 {
compatible = "regulator-gpio";
@@ -107,6 +119,31 @@ ctrl-pins {
};
};
+#if SD0_SD
+ sdhi0-pwen-hog {
+ gpio-hog;
+ gpios = <RZT2H_GPIO(2, 5) GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "SD0_PWEN";
+ };
+#endif
+
+ sdhi0_sd_pins: sd0-sd-group {
+ data-pins {
+ pinmux = <RZT2H_PORT_PINMUX(12, 2, 0x29)>, /* SD0_DATA0 */
+ <RZT2H_PORT_PINMUX(12, 3, 0x29)>, /* SD0_DATA1 */
+ <RZT2H_PORT_PINMUX(12, 4, 0x29)>, /* SD0_DATA2 */
+ <RZT2H_PORT_PINMUX(12, 5, 0x29)>; /* SD0_DATA3 */
+ };
+
+ ctrl-pins {
+ pinmux = <RZT2H_PORT_PINMUX(12, 0, 0x29)>, /* SD0_CLK */
+ <RZT2H_PORT_PINMUX(12, 1, 0x29)>, /* SD0_CMD */
+ <RZT2H_PORT_PINMUX(22, 5, 0x29)>, /* SD0_CD */
+ <RZT2H_PORT_PINMUX(22, 6, 0x29)>; /* SD0_WP */
+ };
+ };
+
#if SD1_MICRO_SD
sdhi1-pwen-hog {
gpio-hog;
@@ -153,6 +190,20 @@ &sdhi0 {
};
#endif
+#if SD0_SD
+&sdhi0 {
+ pinctrl-0 = <&sdhi0_sd_pins>;
+ pinctrl-1 = <&sdhi0_sd_pins>;
+ pinctrl-names = "default", "state_uhs";
+ vmmc-supply = <®_3p3v>;
+ vqmmc-supply = <&vqmmc_sdhi0>;
+ bus-width = <4>;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ status = "okay";
+};
+#endif
+
#if SD1_MICRO_SD
&sdhi1 {
pinctrl-0 = <&sdhi1_pins>;
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 15/17] arm64: dts: renesas: r9a09g077: Add WDT nodes
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (13 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 14/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable SD " Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 16/17] arm64: dts: renesas: r9a09g087: " Lad Prabhakar
` (3 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 19adb35f9dccd16df111f2d0ec265d572f8bb3f5 upstream.
Add WDT0-5 nodes to RZ/T2H (R9A09G077) SoC DTSI.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250821161946.1096033-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 60 ++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
index da7aa2e3b043e..74ab90b92c96d 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
@@ -90,6 +90,66 @@ sci0: serial@80005000 {
status = "disabled";
};
+ wdt0: watchdog@80082000 {
+ compatible = "renesas,r9a09g077-wdt";
+ reg = <0 0x80082000 0 0x400>,
+ <0 0x81295100 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt1: watchdog@80082400 {
+ compatible = "renesas,r9a09g077-wdt";
+ reg = <0 0x80082400 0 0x400>,
+ <0 0x81295104 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt2: watchdog@80082800 {
+ compatible = "renesas,r9a09g077-wdt";
+ reg = <0 0x80082800 0 0x400>,
+ <0 0x81295108 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt3: watchdog@80082c00 {
+ compatible = "renesas,r9a09g077-wdt";
+ reg = <0 0x80082c00 0 0x400>,
+ <0 0x8129510c 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt4: watchdog@80083000 {
+ compatible = "renesas,r9a09g077-wdt";
+ reg = <0 0x80083000 0 0x400>,
+ <0 0x81295110 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt5: watchdog@80083400 {
+ compatible = "renesas,r9a09g077-wdt";
+ reg = <0 0x80083400 0 0x400>,
+ <0 0x81295114 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
i2c0: i2c@80088000 {
compatible = "renesas,riic-r9a09g077";
reg = <0 0x80088000 0 0x400>;
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 16/17] arm64: dts: renesas: r9a09g087: Add WDT nodes
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (14 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 15/17] arm64: dts: renesas: r9a09g077: Add WDT nodes Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 17/17] arm64: dts: renesas: rzt2h-n2h-evk-common: Enable WDT2 Lad Prabhakar
` (2 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 283b465626a0fd2404a65de76a3485f09ccb32f0 upstream.
Add WDT0-5 nodes to RZ/N2H (R9A09G087) SoC DTSI.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250821161946.1096033-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 60 ++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
index 0e291c711d6b5..6cbee27a0c5ac 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
@@ -90,6 +90,66 @@ sci0: serial@80005000 {
status = "disabled";
};
+ wdt0: watchdog@80082000 {
+ compatible = "renesas,r9a09g087-wdt", "renesas,r9a09g077-wdt";
+ reg = <0 0x80082000 0 0x400>,
+ <0 0x81295100 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt1: watchdog@80082400 {
+ compatible = "renesas,r9a09g087-wdt", "renesas,r9a09g077-wdt";
+ reg = <0 0x80082400 0 0x400>,
+ <0 0x81295104 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt2: watchdog@80082800 {
+ compatible = "renesas,r9a09g087-wdt", "renesas,r9a09g077-wdt";
+ reg = <0 0x80082800 0 0x400>,
+ <0 0x81295108 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt3: watchdog@80082c00 {
+ compatible = "renesas,r9a09g087-wdt", "renesas,r9a09g077-wdt";
+ reg = <0 0x80082c00 0 0x400>,
+ <0 0x8129510c 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt4: watchdog@80083000 {
+ compatible = "renesas,r9a09g087-wdt", "renesas,r9a09g077-wdt";
+ reg = <0 0x80083000 0 0x400>,
+ <0 0x81295110 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ wdt5: watchdog@80083400 {
+ compatible = "renesas,r9a09g087-wdt", "renesas,r9a09g077-wdt";
+ reg = <0 0x80083400 0 0x400>,
+ <0 0x81295114 0 0x04>;
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKL>;
+ clock-names = "pclk";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
i2c0: i2c@80088000 {
compatible = "renesas,riic-r9a09g087", "renesas,riic-r9a09g077";
reg = <0 0x80088000 0 0x400>;
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6.12.y-cip 17/17] arm64: dts: renesas: rzt2h-n2h-evk-common: Enable WDT2
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (15 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 16/17] arm64: dts: renesas: r9a09g087: " Lad Prabhakar
@ 2025-12-31 17:00 ` Lad Prabhakar
2026-01-05 11:34 ` [cip-dev] [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Pavel Machek
2026-01-06 19:45 ` Pavel Machek
18 siblings, 0 replies; 23+ messages in thread
From: Lad Prabhakar @ 2025-12-31 17:00 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit da23f1bdce81712096601d9e5e59cfe071aa1c92 upstream.
Enable watchdog (WDT2) on RZ/T2H and RZ/N2H EVKs.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250821161946.1096033-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi b/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
index 8b9d04dce8ae0..91068042bec05 100644
--- a/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi
@@ -217,3 +217,8 @@ &sdhi1 {
status = "okay";
};
#endif
+
+&wdt2 {
+ status = "okay";
+ timeout-sec = <60>;
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [cip-dev] [PATCH 6.12.y-cip 05/17] watchdog: rzv2h: Add support for RZ/T2H
2025-12-31 17:00 ` [PATCH 6.12.y-cip 05/17] watchdog: rzv2h: Add support for RZ/T2H Lad Prabhakar
@ 2026-01-05 11:33 ` Pavel Machek
2026-01-05 13:40 ` Prabhakar Mahadev Lad
0 siblings, 1 reply; 23+ messages in thread
From: Pavel Machek @ 2026-01-05 11:33 UTC (permalink / raw)
To: prabhakar.mahadev-lad.rj; +Cc: cip-dev, Nobuhiro Iwamatsu, Biju Das
[-- Attachment #1: Type: text/plain, Size: 722 bytes --]
Hi!
Minor nit below:
> --- a/drivers/watchdog/rzv2h_wdt.c
> +++ b/drivers/watchdog/rzv2h_wdt.c
> +static int rzt2h_wdt_wdtdcr_init(struct platform_device *pdev,
> + struct rzv2h_wdt_priv *priv)
> +{
> + int ret;
> +
> + priv->wdtdcr = devm_platform_ioremap_resource(pdev, 1);
> + if (IS_ERR(priv->wdtdcr))
> + return PTR_ERR(priv->wdtdcr);
> +
> + ret = pm_runtime_resume_and_get(&pdev->dev);
> + if (ret)
> + return ret;
> +
> + rzt2h_wdt_wdtdcr_count_stop(priv);
> +
> + ret = pm_runtime_put(&pdev->dev);
> + if (ret < 0)
> + return ret;
> +
> + return 0;
> +}
I believe this can be simply "return pm_runtime_put()".
Best regards,
Pavel
--
In cooperation with Nabla.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [cip-dev] [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (16 preceding siblings ...)
2025-12-31 17:00 ` [PATCH 6.12.y-cip 17/17] arm64: dts: renesas: rzt2h-n2h-evk-common: Enable WDT2 Lad Prabhakar
@ 2026-01-05 11:34 ` Pavel Machek
2026-01-06 19:45 ` Pavel Machek
18 siblings, 0 replies; 23+ messages in thread
From: Pavel Machek @ 2026-01-05 11:34 UTC (permalink / raw)
To: prabhakar.mahadev-lad.rj; +Cc: cip-dev, Nobuhiro Iwamatsu, Biju Das
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
Hi!
> This series of patches adds support for the SDHI/eMMC controller as well as
> the Watchdog Timer (WDT) found on the Renesas RZ/T2H (R9A09G077) and RZ/N2H
> (R9A09G087) SoCs. The series includes device tree bindings, clock controller
> support, and device tree nodes for the respective peripherals.
I found a minor nit, but that should not block the merge.
This looks okay to me.
Reviewed-by: Pavel Machek <pavel@nabladev.com>
I can apply the series if it passes testing and there are no other
comments.
Best regards,
Pavel
--
In cooperation with Nabla.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [cip-dev] [PATCH 6.12.y-cip 05/17] watchdog: rzv2h: Add support for RZ/T2H
2026-01-05 11:33 ` [cip-dev] " Pavel Machek
@ 2026-01-05 13:40 ` Prabhakar Mahadev Lad
2026-01-07 13:44 ` Pavel Machek
0 siblings, 1 reply; 23+ messages in thread
From: Prabhakar Mahadev Lad @ 2026-01-05 13:40 UTC (permalink / raw)
To: Pavel Machek; +Cc: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu, Biju Das
Hi Pavel,
Thank you for the review.
> Subject: Re: [cip-dev] [PATCH 6.12.y-cip 05/17] watchdog: rzv2h: Add
> support for RZ/T2H
>
> Hi!
>
> Minor nit below:
>
> > --- a/drivers/watchdog/rzv2h_wdt.c
> > +++ b/drivers/watchdog/rzv2h_wdt.c
> > +static int rzt2h_wdt_wdtdcr_init(struct platform_device *pdev,
> > + struct rzv2h_wdt_priv *priv)
> > +{
> > + int ret;
> > +
> > + priv->wdtdcr = devm_platform_ioremap_resource(pdev, 1);
> > + if (IS_ERR(priv->wdtdcr))
> > + return PTR_ERR(priv->wdtdcr);
> > +
> > + ret = pm_runtime_resume_and_get(&pdev->dev);
> > + if (ret)
> > + return ret;
> > +
> > + rzt2h_wdt_wdtdcr_count_stop(priv);
> > +
> > + ret = pm_runtime_put(&pdev->dev);
> > + if (ret < 0)
> > + return ret;
> > +
> > + return 0;
> > +}
>
> I believe this can be simply "return pm_runtime_put()".
>
pm_runtime_put() may return 1 if the device is already suspended.
call trace:
pm_runtime_put() ->
__pm_runtime_idle() ->
rpm_idle() ->
rpm_suspend() ->
rpm_check_suspend_allowed() [0]
[0] https://elixir.bootlin.com/linux/v6.19-rc3/source/drivers/base/power/runtime.c#L292
Cheers,
Prabhakar
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [cip-dev] [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
` (17 preceding siblings ...)
2026-01-05 11:34 ` [cip-dev] [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Pavel Machek
@ 2026-01-06 19:45 ` Pavel Machek
18 siblings, 0 replies; 23+ messages in thread
From: Pavel Machek @ 2026-01-06 19:45 UTC (permalink / raw)
To: prabhakar.mahadev-lad.rj; +Cc: cip-dev, Nobuhiro Iwamatsu, Biju Das
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
Hi!
> This series of patches adds support for the SDHI/eMMC controller as well as
> the Watchdog Timer (WDT) found on the Renesas RZ/T2H (R9A09G077) and RZ/N2H
> (R9A09G087) SoCs. The series includes device tree bindings, clock controller
> support, and device tree nodes for the respective peripherals.
Thank you, applied.
Best regards,
Pavel
--
In cooperation with Nabla.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [cip-dev] [PATCH 6.12.y-cip 05/17] watchdog: rzv2h: Add support for RZ/T2H
2026-01-05 13:40 ` Prabhakar Mahadev Lad
@ 2026-01-07 13:44 ` Pavel Machek
0 siblings, 0 replies; 23+ messages in thread
From: Pavel Machek @ 2026-01-07 13:44 UTC (permalink / raw)
To: prabhakar.mahadev-lad.rj
Cc: Pavel Machek, cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu,
Biju Das
[-- Attachment #1: Type: text/plain, Size: 653 bytes --]
Hi!
> > > + ret = pm_runtime_put(&pdev->dev);
> > > + if (ret < 0)
> > > + return ret;
> > > +
> > > + return 0;
> > > +}
> >
> > I believe this can be simply "return pm_runtime_put()".
> >
> pm_runtime_put() may return 1 if the device is already suspended.
> call trace:
> pm_runtime_put() ->
> __pm_runtime_idle() ->
> rpm_idle() ->
> rpm_suspend() ->
> rpm_check_suspend_allowed() [0]
>
> [0] https://elixir.bootlin.com/linux/v6.19-rc3/source/drivers/base/power/runtime.c#L292
Aha. Patch is correct, sorry for the noise.
Best regards,
Pavel
--
In cooperation with Nabla.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2026-01-07 13:44 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-31 17:00 [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 01/17] dt-bindings: watchdog: renesas,wdt: Add " Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 02/17] watchdog: rzv2h: Obtain clock-divider and timeout values from OF match data Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 03/17] watchdog: rzv2h: Make "oscclk" and reset controller optional Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 04/17] watchdog: rzv2h: Add support for configurable count clock source Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 05/17] watchdog: rzv2h: Add support for RZ/T2H Lad Prabhakar
2026-01-05 11:33 ` [cip-dev] " Pavel Machek
2026-01-05 13:40 ` Prabhakar Mahadev Lad
2026-01-07 13:44 ` Pavel Machek
2025-12-31 17:00 ` [PATCH 6.12.y-cip 06/17] dt-bindings: mmc: renesas,sdhi: Document RZ/T2H and RZ/N2H support Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 07/17] dt-bindings: clock: renesas,r9a09g077/87: Add SDHI_CLKHS clock ID Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 08/17] clk: renesas: cpg-mssr: Add read-back and delay handling for RZ/T2H MSTP Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 09/17] clk: renesas: r9a09g077: Add PLL2 and SDHI clock support Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 10/17] arm64: dts: renesas: r9a09g077: Add SDHI nodes Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 11/17] arm64: dts: renesas: r9a09g087: " Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 12/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable eMMC Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 13/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable MicroSD card slot Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 14/17] arm64: dts: renesas: rzt2h-rzn2h-evk: Enable SD " Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 15/17] arm64: dts: renesas: r9a09g077: Add WDT nodes Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 16/17] arm64: dts: renesas: r9a09g087: " Lad Prabhakar
2025-12-31 17:00 ` [PATCH 6.12.y-cip 17/17] arm64: dts: renesas: rzt2h-n2h-evk-common: Enable WDT2 Lad Prabhakar
2026-01-05 11:34 ` [cip-dev] [PATCH 6.12.y-cip 00/17] Add SDHI/eMMC and WDT support for RZ/T2H and RZ/N2H Pavel Machek
2026-01-06 19:45 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox