All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support
@ 2026-07-08  8:10 Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 01/27] clk: renesas: r9a08g045: Add clocks, resets and power domains for USB Claudiu Beznea
                   ` (27 more replies)
  0 siblings, 28 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

Hi,

Patches backport the Renesas RZ/G3S USB support.

Thank you,
Claudiu

Changes in v2:
- added patch "clk: renesas: rzg2l: Deassert reset on assert timeout"
- adjusted the code from the patches:
-- "usb: host: ehci-platform: Call reset assert/deassert on suspend/resume"
-- "usb: host: ohci-platform: Call reset assert/deassert on suspend/resume"
 to execute only for the Renesas RZ/G3S

Biju Das (1):
  clk: renesas: rzg2l: Deassert reset on assert timeout

Christophe JAILLET (1):
  phy: renesas: rcar-gen3-usb2: Fix an error handling path in
    rcar_gen3_phy_usb2_probe()

Claudiu Beznea (22):
  clk: renesas: r9a08g045: Add clocks, resets and power domains for USB
  pinctrl: renesas: rzg2l: Add suspend/resume support for pull up/down
  reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY
  dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S support
  reset: rzg2l-usbphy-ctrl: Add support for RZ/G3S SoC
  reset: rzg2l-usbphy-ctrl: Propagate the return value of
    regmap_field_update_bits()
  reset: rzg2l-usbphy-ctrl: Add suspend/resume support
  reset: rzg2l-usbphy-ctrl: Check pwrrdy is valid before using it
  usb: host: Do not check priv->clks[clk]
  usb: host: ehci-platform: Call reset assert/deassert on suspend/resume
  usb: host: ohci-platform: Call reset assert/deassert on suspend/resume
  dt-bindings: usb: renesas,usbhs: Document RZ/G3S SoC
  usb: renesas_usbhs: Assert/de-assert reset signals on suspend/resume
  dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S phy bindings
  dt-bindings: phy: renesas,usb2-phy: Mark resets as required for RZ/G3S
  phy: renesas: rcar-gen3-usb2: Add support to initialize the bus
  phy: renesas: rcar-gen3-usb2: Add support for the RZ/G3S SoC
  phy: renesas: rcar-gen3-usb2: Move phy_data->init_bus check
  phy: renesas: rcar-gen3-usb2: Add suspend/resume support
  arm64: dts: renesas: r9a08g045: Add USB support
  arm64: dts: renesas: rzg3s-smarc: Enable USB support
  usb: renesas: Suppress binding attributes

Dan Carpenter (1):
  reset: rzg2l-usbphy-ctrl: Fix a NULL vs IS_ERR() bug in probe

Lad Prabhakar (2):
  pinctrl: renesas: rzg2l: Add support for pull-up/down
  phy: renesas: rcar-gen3-usb2: store drvdata pointer in channel

 .../bindings/phy/renesas,usb2-phy.yaml        |   8 +-
 .../reset/renesas,rzg2l-usbphy-ctrl.yaml      |  41 ++++-
 .../bindings/usb/renesas,usbhs.yaml           |   2 +
 arch/arm64/boot/dts/renesas/r9a08g045.dtsi    | 118 ++++++++++++++
 arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi  |  57 +++++++
 drivers/clk/renesas/r9a08g045-cpg.c           |  12 ++
 drivers/clk/renesas/rzg2l-cpg.c               |  12 +-
 drivers/phy/renesas/phy-rcar-gen3-usb2.c      | 117 ++++++++++++--
 drivers/pinctrl/renesas/pinctrl-rzg2l.c       |  91 ++++++++++-
 drivers/reset/Kconfig                         |   1 +
 drivers/reset/reset-rzg2l-usbphy-ctrl.c       | 152 +++++++++++++++++-
 drivers/usb/host/ehci-platform.c              |  42 ++++-
 drivers/usb/host/ohci-platform.c              |  41 ++++-
 drivers/usb/renesas_usbhs/common.c            |  35 ++--
 14 files changed, 679 insertions(+), 50 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 01/27] clk: renesas: r9a08g045: Add clocks, resets and power domains for USB
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 02/27] clk: renesas: rzg2l: Deassert reset on assert timeout Claudiu Beznea
                   ` (26 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit f0fe60cae63573c801246204414e70035770bdc6 upstream.

Add clocks, resets and power domains for USB modules available on the
Renesas RZ/G3S SoC.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20240822152801.602318-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[claudiu.beznea:
 - fixed conflict in r9a08g045_mod_clks[] array by keeping the code from
   v6.1 CIP and adding USB clocks along with filling the MSTOP
   information (as this was not present in the original commit)
 - fixed conflict in r9a08g045_resets[] array by keeping both the SSI
   and USB nodes
 - dropped the r9a08g045_pm_domains[] as this is not available in v5.10
   CIP
 - kept r9a08g045_no_pm_mod_clks[] array]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/clk/renesas/r9a08g045-cpg.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/clk/renesas/r9a08g045-cpg.c b/drivers/clk/renesas/r9a08g045-cpg.c
index 3e8eae79af09..937a044cd5d3 100644
--- a/drivers/clk/renesas/r9a08g045-cpg.c
+++ b/drivers/clk/renesas/r9a08g045-cpg.c
@@ -245,6 +245,14 @@ static const struct rzg2l_mod_clk r9a08g045_mod_clks[] = {
 					MSTOP(BUS_MCPU1, BIT(13))),
 	DEF_MOD("ssi3_sfr",		R9A08G045_SSI3_PCLK_SFR, R9A08G045_CLK_P0, 0x570, 7,
 					MSTOP(BUS_MCPU1, BIT(13))),
+	DEF_MOD("usb0_host",		R9A08G045_USB_U2H0_HCLK, R9A08G045_CLK_P1, 0x578, 0,
+					MSTOP(BUS_PERI_COM, BIT(5))),
+	DEF_MOD("usb1_host",		R9A08G045_USB_U2H1_HCLK, R9A08G045_CLK_P1, 0x578, 1,
+					MSTOP(BUS_PERI_COM, BIT(7))),
+	DEF_MOD("usb0_func",		R9A08G045_USB_U2P_EXR_CPUCLK, R9A08G045_CLK_P1, 0x578, 2,
+					MSTOP(BUS_PERI_COM, BIT(6))),
+	DEF_MOD("usb_pclk",		R9A08G045_USB_PCLK, R9A08G045_CLK_P1, 0x578, 3,
+					MSTOP(BUS_PERI_COM, BIT(4))),
 	DEF_COUPLED("eth0_axi",		R9A08G045_ETH0_CLK_AXI, R9A08G045_CLK_M0, 0x57c, 0,
 					MSTOP(BUS_PERI_COM, BIT(2))),
 	DEF_COUPLED("eth0_chi",		R9A08G045_ETH0_CLK_CHI, R9A08G045_CLK_ZT, 0x57c, 0,
@@ -305,6 +313,10 @@ static const struct rzg2l_reset r9a08g045_resets[] = {
 	DEF_RST(R9A08G045_SSI1_RST_M2_REG, 0x870, 1),
 	DEF_RST(R9A08G045_SSI2_RST_M2_REG, 0x870, 2),
 	DEF_RST(R9A08G045_SSI3_RST_M2_REG, 0x870, 3),
+	DEF_RST(R9A08G045_USB_U2H0_HRESETN, 0x878, 0),
+	DEF_RST(R9A08G045_USB_U2H1_HRESETN, 0x878, 1),
+	DEF_RST(R9A08G045_USB_U2P_EXL_SYSRST, 0x878, 2),
+	DEF_RST(R9A08G045_USB_PRESETN, 0x878, 3),
 	DEF_RST(R9A08G045_ETH0_RST_HW_N, 0x87c, 0),
 	DEF_RST(R9A08G045_ETH1_RST_HW_N, 0x87c, 1),
 	DEF_RST(R9A08G045_I2C0_MRST, 0x880, 0),
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 02/27] clk: renesas: rzg2l: Deassert reset on assert timeout
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 01/27] clk: renesas: r9a08g045: Add clocks, resets and power domains for USB Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 03/27] pinctrl: renesas: rzg2l: Add support for pull-up/down Claudiu Beznea
                   ` (25 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Biju Das <biju.das.jz@bp.renesas.com>

commit 0b0201f259e1158a875c5fd01adf318ae5d32352 upstream.

If the assert() fails due to timeout error, set the reset register bit
back to deasserted state. This change is needed especially for handling
assert error in suspend() callback that expect the device to be in
operational state in case of failure.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260108123433.104464-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[claudiu.beznea: fixed conflict]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none; this patch is new

 drivers/clk/renesas/rzg2l-cpg.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c
index 8cb0403b43c3..ebb2f6e44003 100644
--- a/drivers/clk/renesas/rzg2l-cpg.c
+++ b/drivers/clk/renesas/rzg2l-cpg.c
@@ -1777,6 +1777,8 @@ static int rzg2l_cpg_assert(struct reset_controller_dev *rcdev,
 	u32 mask = BIT(info->resets[id].bit);
 	s8 monbit = info->resets[id].monbit;
 	u32 value = mask << 16;
+	u32 mon;
+	int ret;
 
 	dev_dbg(rcdev->dev, "assert id:%ld offset:0x%x\n", id, CLK_RST_R(reg));
 
@@ -1793,8 +1795,14 @@ static int rzg2l_cpg_assert(struct reset_controller_dev *rcdev,
 		return 0;
 	}
 
-	return readl_poll_timeout_atomic(priv->base + reg, value,
-					 value & mask, 10, 200);
+	ret = readl_poll_timeout_atomic(priv->base + reg, mon,
+					!!(mon & mask), 10, 200);
+	if (ret) {
+		value ^= mask;
+		writel(value, priv->base + CLK_RST_R(info->resets[id].off));
+	}
+
+	return ret;
 }
 
 static int rzg2l_cpg_deassert(struct reset_controller_dev *rcdev,
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 03/27] pinctrl: renesas: rzg2l: Add support for pull-up/down
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 01/27] clk: renesas: r9a08g045: Add clocks, resets and power domains for USB Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 02/27] clk: renesas: rzg2l: Deassert reset on assert timeout Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 04/27] pinctrl: renesas: rzg2l: Add suspend/resume support for pull up/down Claudiu Beznea
                   ` (24 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

commit 19d4bce9ce876ad0ee4240ebd849b730b3dc3763 upstream.

Add support to configure bias-disable, bias-pull-up, and bias-pull-down
properties of the pin.

Two new function pointers, hw_to_bias_param() and bias_param_to_hw(),
are introduced in the struct rzg2l_pinctrl_data to configure bias
settings, as the values in the PUPD register differ when compared to the
RZ/G2L family and the RZ/V2H(P) SoC.

Value | RZ/G2L        | RZ/V2H
---------------------------------
00b:  | Bias Disabled | Pull up/down disabled
01b:  | Pull-up       | Pull up/down disabled
10b:  | Pull-down     | Pull-down
11b:  | Prohibited    | Pull-up

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/r/20240530173857.164073-12-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[claudiu.beznea: fixed conflict by dropping slew rate code and
 initialization of pwpr_pfc_lock_unlock, pmc_writeb, oen_read, oen_write
 in driver specific data]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/pinctrl/renesas/pinctrl-rzg2l.c | 72 +++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index bcdbf1362fa3..16e32a090131 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -117,6 +117,7 @@
 #define PIN(off)		(0x0800 + (off))
 #define IOLH(off)		(0x1000 + (off) * 8)
 #define IEN(off)		(0x1800 + (off) * 8)
+#define PUPD(off)		(0x1C00 + (off) * 8)
 #define ISEL(off)		(0x2C00 + (off) * 8)
 #define SD_CH(off, ch)		((off) + (ch) * 4)
 #define ETH_POC(off, ch)	((off) + (ch) * 4)
@@ -134,6 +135,7 @@
 #define PFC_MASK		0x07
 #define IEN_MASK		0x01
 #define IOLH_MASK		0x03
+#define PUPD_MASK		0x03
 
 #define PM_INPUT		0x1
 #define PM_OUTPUT		0x2
@@ -252,6 +254,8 @@ struct rzg2l_pinctrl_data {
 	const struct rzg2l_hwcfg *hwcfg;
 	const struct rzg2l_variable_pin_cfg *variable_pin_cfg;
 	unsigned int n_variable_pin_cfg;
+	int (*hw_to_bias_param)(unsigned int val);
+	int (*bias_param_to_hw)(enum pin_config_param param);
 };
 
 /**
@@ -1068,6 +1072,38 @@ static int rzg2l_write_oen(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8
 	return 0;
 }
 
+static int rzg2l_hw_to_bias_param(unsigned int bias)
+{
+	switch (bias) {
+	case 0:
+		return PIN_CONFIG_BIAS_DISABLE;
+	case 1:
+		return PIN_CONFIG_BIAS_PULL_UP;
+	case 2:
+		return PIN_CONFIG_BIAS_PULL_DOWN;
+	default:
+		break;
+	}
+
+	return -EINVAL;
+}
+
+static int rzg2l_bias_param_to_hw(enum pin_config_param param)
+{
+	switch (param) {
+	case PIN_CONFIG_BIAS_DISABLE:
+		return 0;
+	case PIN_CONFIG_BIAS_PULL_UP:
+		return 1;
+	case PIN_CONFIG_BIAS_PULL_DOWN:
+		return 2;
+	default:
+		break;
+	}
+
+	return -EINVAL;
+}
+
 static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev,
 				     unsigned int _pin,
 				     unsigned long *config)
@@ -1118,6 +1154,23 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev,
 		arg = ret;
 		break;
 
+	case PIN_CONFIG_BIAS_DISABLE:
+	case PIN_CONFIG_BIAS_PULL_UP:
+	case PIN_CONFIG_BIAS_PULL_DOWN:
+		if (!(cfg & PIN_CFG_PUPD))
+			return -EINVAL;
+
+		arg = rzg2l_read_pin_config(pctrl, PUPD(off), bit, PUPD_MASK);
+		ret = pctrl->data->hw_to_bias_param(arg);
+		if (ret < 0)
+			return ret;
+
+		if (ret != param)
+			return -EINVAL;
+		/* for PIN_CONFIG_BIAS_PULL_UP/DOWN when enabled we just return 1 */
+		arg = 1;
+		break;
+
 	case PIN_CONFIG_DRIVE_STRENGTH: {
 		unsigned int index;
 
@@ -1223,6 +1276,19 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
 			settings.power_source = pinconf_to_config_argument(_configs[i]);
 			break;
 
+		case PIN_CONFIG_BIAS_DISABLE:
+		case PIN_CONFIG_BIAS_PULL_UP:
+		case PIN_CONFIG_BIAS_PULL_DOWN:
+			if (!(cfg & PIN_CFG_PUPD))
+				return -EINVAL;
+
+			ret = pctrl->data->bias_param_to_hw(param);
+			if (ret < 0)
+				return ret;
+
+			rzg2l_rmw_pin_config(pctrl, PUPD(off), bit, PUPD_MASK, ret);
+			break;
+
 		case PIN_CONFIG_DRIVE_STRENGTH:
 			arg = pinconf_to_config_argument(_configs[i]);
 
@@ -2705,6 +2771,8 @@ static struct rzg2l_pinctrl_data r9a07g043_data = {
 	.variable_pin_cfg = r9a07g043f_variable_pin_cfg,
 	.n_variable_pin_cfg = ARRAY_SIZE(r9a07g043f_variable_pin_cfg),
 #endif
+	.hw_to_bias_param = &rzg2l_hw_to_bias_param,
+	.bias_param_to_hw = &rzg2l_bias_param_to_hw,
 };
 
 static struct rzg2l_pinctrl_data r9a07g044_data = {
@@ -2716,6 +2784,8 @@ static struct rzg2l_pinctrl_data r9a07g044_data = {
 	.n_dedicated_pins = ARRAY_SIZE(rzg2l_dedicated_pins.common) +
 		ARRAY_SIZE(rzg2l_dedicated_pins.rzg2l_pins),
 	.hwcfg = &rzg2l_hwcfg,
+	.hw_to_bias_param = &rzg2l_hw_to_bias_param,
+	.bias_param_to_hw = &rzg2l_bias_param_to_hw,
 };
 
 static struct rzg2l_pinctrl_data r9a08g045_data = {
@@ -2726,6 +2796,8 @@ static struct rzg2l_pinctrl_data r9a08g045_data = {
 	.n_port_pins = ARRAY_SIZE(r9a08g045_gpio_configs) * RZG2L_PINS_PER_PORT,
 	.n_dedicated_pins = ARRAY_SIZE(rzg3s_dedicated_pins),
 	.hwcfg = &rzg3s_hwcfg,
+	.hw_to_bias_param = &rzg2l_hw_to_bias_param,
+	.bias_param_to_hw = &rzg2l_bias_param_to_hw,
 };
 
 static const struct of_device_id rzg2l_pinctrl_of_table[] = {
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 04/27] pinctrl: renesas: rzg2l: Add suspend/resume support for pull up/down
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (2 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 03/27] pinctrl: renesas: rzg2l: Add support for pull-up/down Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 05/27] reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY Claudiu Beznea
                   ` (23 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit b2bd65fbb617353e3c46ba5206b3b030fa0f260c upstream.

The Renesas RZ/G3S supports a power-saving mode where power to most of
the SoC components is lost, including the PIN controller.  Save and
restore the pull-up/pull-down register contents to ensure the
functionality is preserved after a suspend/resume cycle.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250205100116.2032765-1-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[claudiu.beznea: fixed conflict in rzg2l_pinctrl_pm_setup_regs()]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/pinctrl/renesas/pinctrl-rzg2l.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index 16e32a090131..404b96d4d54d 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -275,6 +275,7 @@ struct rzg2l_pinctrl_pin_settings {
  * @pmc: PMC registers cache
  * @pfc: PFC registers cache
  * @iolh: IOLH registers cache
+ * @pupd: PUPD registers cache
  * @ien: IEN registers cache
  * @sd_ch: SD_CH registers cache
  * @eth_poc: ET_POC registers cache
@@ -288,6 +289,7 @@ struct rzg2l_pinctrl_reg_cache {
 	u32	*pfc;
 	u32	*iolh[2];
 	u32	*ien[2];
+	u32	*pupd[2];
 	u8	sd_ch[2];
 	u8	eth_poc[2];
 	u8	eth_mode;
@@ -2256,6 +2258,11 @@ static int rzg2l_pinctrl_reg_cache_alloc(struct rzg2l_pinctrl *pctrl)
 		if (!cache->ien[i])
 			return -ENOMEM;
 
+		cache->pupd[i] = devm_kcalloc(pctrl->dev, nports, sizeof(*cache->pupd[i]),
+					      GFP_KERNEL);
+		if (!cache->pupd[i])
+			return -ENOMEM;
+
 		/* Allocate dedicated cache. */
 		dedicated_cache->iolh[i] = devm_kcalloc(pctrl->dev, n_dedicated_pins,
 							sizeof(*dedicated_cache->iolh[i]),
@@ -2498,7 +2505,7 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen
 	u32 port;
 
 	for (port = 0; port < nports; port++) {
-		bool has_iolh, has_ien;
+		bool has_iolh, has_ien, has_pupd;
 		u32 off, caps;
 		u8 pincnt;
 		u64 cfg;
@@ -2510,6 +2517,7 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen
 		caps = FIELD_GET(PIN_CFG_MASK, cfg);
 		has_iolh = !!(caps & (PIN_CFG_IOLH_A | PIN_CFG_IOLH_B | PIN_CFG_IOLH_C));
 		has_ien = !!(caps & PIN_CFG_IEN);
+		has_pupd = !!(caps & PIN_CFG_PUPD);
 
 		if (suspend)
 			RZG2L_PCTRL_REG_ACCESS32(suspend, pctrl->base + PFC(off), cache->pfc[port]);
@@ -2528,6 +2536,15 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen
 			}
 		}
 
+		if (has_pupd) {
+			RZG2L_PCTRL_REG_ACCESS32(suspend, pctrl->base + PUPD(off),
+						 cache->pupd[0][port]);
+			if (pincnt >= 4) {
+				RZG2L_PCTRL_REG_ACCESS32(suspend, pctrl->base + PUPD(off),
+							 cache->pupd[1][port]);
+			}
+		}
+
 		RZG2L_PCTRL_REG_ACCESS16(suspend, pctrl->base + PM(off), cache->pm[port]);
 		RZG2L_PCTRL_REG_ACCESS8(suspend, pctrl->base + P(off), cache->p[port]);
 
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 05/27] reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (3 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 04/27] pinctrl: renesas: rzg2l: Add suspend/resume support for pull up/down Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 06/27] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S support Claudiu Beznea
                   ` (22 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 78f2d64e484753bfede6a0e9eab0ef35830c34fb upstream.

On the Renesas RZ/G3S SoC, the USB PHY block has an input signal called
PWRRDY. This signal is managed by the system controller and must be
de-asserted after powering on the area where USB PHY resides and asserted
before powering it off.

On power-on/resume the USB PWRRDY signal need to be de-asserted before
enabling clock and switching the module to normal state (through MSTOP
support). The power-on/resume configuration sequence must be:

1/ PWRRDY=0
2/ CLK_ON=1
3/ MSTOP=0

On power-off/suspend the configuration sequence should be:

1/ MSTOP=1
2/ CLK_ON=0
3/ PWRRDY=1

The CLK_ON and MSTOP functionalities are controlled by clock drivers.
The suspend/resume support will be handled by different patches.

After long discussions with the internal HW team, it has been confirmed
that the HW connection b/w USB PHY block, the USB channels, the system
controller, clock, MSTOP, PWRRDY signal is as follows:

                               ┌──────────────────────────────┐
                               │                              │◄── CPG_CLKON_USB.CLK0_ON
                               │     USB CH0                  │
┌──────────────────────────┐   │┌───────────────────────────┐ │◄── CPG_CLKON_USB.CLK2_ON
│                 ┌────────┐   ││host controller registers  │ │
│                 │        │   ││function controller registers│
│                 │ PHY0   │◄──┤└───────────────────────────┘ │
│     USB PHY     │        │   └────────────▲─────────────────┘
│                 └────────┘                │
│                          │    CPG_BUS_PERI_COM_MSTOP.MSTOP{6, 5}_ON
│┌──────────────┐ ┌────────┐
││USHPHY control│ │        │
││  registers   │ │ PHY1   │   ┌──────────────────────────────┐
│└──────────────┘ │        │◄──┤     USB CH1                  │
│                 └────────┘   │┌───────────────────────────┐ │◄── CPG_CLKON_USB.CLK1_ON
└─▲───────▲─────────▲──────┘   ││ host controller registers │ │
  │       │         │          │└───────────────────────────┘ │
  │       │         │          └────────────▲─────────────────┘
  │       │         │                       │
  │       │         │           CPG_BUS_PERI_COM_MSTOP.MSTOP7_ON
  │PWRRDY │         │
  │       │   CPG_CLK_ON_USB.CLK3_ON
  │       │
  │  CPG_BUS_PERI_COM_MSTOP.MSTOP4_ON
  │
┌────┐
│SYSC│
└────┘

where:
- CPG_CLKON_USB.CLK.CLKX_ON is the register bit controlling the clock X
  of different USB blocks, X in {0, 1, 2, 3}
- CPG_BUS_PERI_COM_MSTOP.MSTOPX_ON is the register bit controlling the
  MSTOP of different USB blocks, X in {4, 5, 6, 7}
- USB PHY is the USB PHY block exposing 2 ports, port0 and port1, used
  by the USB CH0, USB CH1
- SYSC is the system controller block controlling the PWRRDY signal
- USB CHx are individual USB block with host and function capabilities
  (USB CH0 have both host and function capabilities, USB CH1 has only
  host capabilities)

The USBPHY control registers are controlled though the
reset-rzg2l-usbphy-ctrl driver. The USB PHY ports are controlled by
phy_rcar_gen3_usb2 (drivers/phy/renesas/phy-rcar-gen3-usb2.c file). The
USB PHY ports request resets from the reset-rzg2l-usbphy-ctrl driver.

The connection b/w the system controller and the USB PHY CTRL driver is
implemented through the renesas,sysc-pwrrdy device tree property
proposed in this patch. This property specifies the register offset and the
bitmask required to control the PWRRDY signal.

Since the USB PHY CTRL driver needs to be probed before any other
USB-specific driver on RZ/G3S, control of PWRRDY is passed exclusively
to it. This guarantees the correct configuration sequence between clocks,
MSTOP bits, and the PWRRDY bit on probe/resume and remove/suspend. At the
same time, changes are kept minimal by avoiding modifications to the USB
PHY driver to also handle the PWRRDY itself.

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none


 drivers/reset/Kconfig                   |  1 +
 drivers/reset/reset-rzg2l-usbphy-ctrl.c | 56 +++++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index 66adfe6d6889..4df20a4a8a24 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -157,6 +157,7 @@ config RESET_RASPBERRYPI
 config RESET_RZG2L_USBPHY_CTRL
 	tristate "Renesas RZ/G2L USBPHY control driver"
 	depends on ARCH_RZG2L || COMPILE_TEST
+	select MFD_SYSCON
 	help
 	  Support for USBPHY Control found on RZ/G2L family. It mainly
 	  controls reset and power down of the USB/PHY.
diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
index 255c894a4782..aac947dc467b 100644
--- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
+++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
@@ -13,6 +13,7 @@
 #include <linux/regmap.h>
 #include <linux/reset.h>
 #include <linux/reset-controller.h>
+#include <linux/mfd/syscon.h>
 
 #define RESET			0x000
 #define VBENCTL			0x03c
@@ -91,6 +92,8 @@ static int rzg2l_usbphy_ctrl_status(struct reset_controller_dev *rcdev,
 	return !!(readl(priv->base + RESET) & port_mask);
 }
 
+#define RZG2L_USBPHY_CTRL_PWRRDY	1
+
 static const struct of_device_id rzg2l_usbphy_ctrl_match_table[] = {
 	{ .compatible = "renesas,rzg2l-usbphy-ctrl" },
 	{ /* Sentinel */ }
@@ -110,6 +113,55 @@ static const struct regmap_config rzg2l_usb_regconf = {
 	.max_register = 1,
 };
 
+static void rzg2l_usbphy_ctrl_set_pwrrdy(struct regmap_field *pwrrdy,
+					 bool power_on)
+{
+	u32 val = power_on ? 0 : 1;
+
+	/* The initialization path guarantees that the mask is 1 bit long. */
+	regmap_field_update_bits(pwrrdy, 1, val);
+}
+
+static void rzg2l_usbphy_ctrl_pwrrdy_off(void *data)
+{
+	rzg2l_usbphy_ctrl_set_pwrrdy(data, false);
+}
+
+static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev)
+{
+	struct regmap_field *pwrrdy;
+	struct reg_field field;
+	struct regmap *regmap;
+	const int *data;
+	u32 args[2];
+
+	data = device_get_match_data(dev);
+	if ((uintptr_t)data != RZG2L_USBPHY_CTRL_PWRRDY)
+		return 0;
+
+	regmap = syscon_regmap_lookup_by_phandle_args(dev->of_node,
+						      "renesas,sysc-pwrrdy",
+						      ARRAY_SIZE(args), args);
+	if (IS_ERR(regmap))
+		return PTR_ERR(regmap);
+
+	/* Don't allow more than one bit in mask. */
+	if (hweight32(args[1]) != 1)
+		return -EINVAL;
+
+	field.reg = args[0];
+	field.lsb = __ffs(args[1]);
+	field.msb = __fls(args[1]);
+
+	pwrrdy = devm_regmap_field_alloc(dev, regmap, field);
+	if (!pwrrdy)
+		return -ENOMEM;
+
+	rzg2l_usbphy_ctrl_set_pwrrdy(pwrrdy, true);
+
+	return devm_add_action_or_reset(dev, rzg2l_usbphy_ctrl_pwrrdy_off, pwrrdy);
+}
+
 static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -132,6 +184,10 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
 	if (IS_ERR(regmap))
 		return PTR_ERR(regmap);
 
+	error = rzg2l_usbphy_ctrl_pwrrdy_init(dev);
+	if (error)
+		return error;
+
 	priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
 	if (IS_ERR(priv->rstc))
 		return dev_err_probe(dev, PTR_ERR(priv->rstc),
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 06/27] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S support
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (4 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 05/27] reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 07/27] reset: rzg2l-usbphy-ctrl: Add support for RZ/G3S SoC Claudiu Beznea
                   ` (21 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 20eee0f69c9034a0f613528f829dcaca192740d5 upstream.

The Renesas USB PHY hardware block needs to have the PWRRDY bit in the
system controller set before applying any other settings. The PWRRDY bit
must be controlled during power-on, power-off, and system suspend/resume
sequences as follows:
- during power-on/resume, it must be set to zero before enabling clocks and
  modules
- during power-off/suspend, it must be set to one after disabling clocks
  and modules

Add the renesas,sysc-pwrrdy device tree property, which allows the
reset-rzg2l-usbphy-ctrl driver to parse, map, and control the system
controller PWRRDY bit at the appropriate time. Along with it add a new
compatible for the RZ/G3S SoC.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[claudiu.beznea: fixed conflict by dropping the "and RZ/Five" string
 from the description of renesas,r9a07g043-usbphy-ctrl compatible]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 .../reset/renesas,rzg2l-usbphy-ctrl.yaml      | 41 ++++++++++++++++---
 1 file changed, 35 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
index ca6a3002546e..c04176315af1 100644
--- a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
+++ b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
@@ -15,12 +15,14 @@ description:
 
 properties:
   compatible:
-    items:
-      - enum:
-          - renesas,r9a07g043-usbphy-ctrl # RZ/G2UL
-          - renesas,r9a07g044-usbphy-ctrl # RZ/G2{L,LC}
-          - renesas,r9a07g054-usbphy-ctrl # RZ/V2L
-      - const: renesas,rzg2l-usbphy-ctrl
+    oneOf:
+      - items:
+          - enum:
+              - renesas,r9a07g043-usbphy-ctrl # RZ/G2UL
+              - renesas,r9a07g044-usbphy-ctrl # RZ/G2{L,LC}
+              - renesas,r9a07g054-usbphy-ctrl # RZ/V2L
+          - const: renesas,rzg2l-usbphy-ctrl
+      - const: renesas,r9a08g045-usbphy-ctrl # RZ/G3S
 
   reg:
     maxItems: 1
@@ -48,6 +50,20 @@ properties:
     $ref: /schemas/regulator/regulator.yaml#
     unevaluatedProperties: false
 
+  renesas,sysc-pwrrdy:
+    description:
+      The system controller PWRRDY indicates to the USB PHY if the power supply
+      is ready. PWRRDY needs to be set during power-on before applying any
+      other settings. It also needs to be set before powering off the USB.
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    items:
+      - items:
+          - description:
+              System controller phandle required by USB PHY CTRL driver to set
+              PWRRDY
+          - description: Register offset associated with PWRRDY
+          - description: Register bitmask associated with PWRRDY
+
 required:
   - compatible
   - reg
@@ -57,6 +73,19 @@ required:
   - '#reset-cells'
   - regulator-vbus
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: renesas,r9a08g045-usbphy-ctrl
+    then:
+      required:
+        - renesas,sysc-pwrrdy
+    else:
+      properties:
+        renesas,sysc-pwrrdy: false
+
 additionalProperties: false
 
 examples:
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 07/27] reset: rzg2l-usbphy-ctrl: Add support for RZ/G3S SoC
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (5 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 06/27] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S support Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 08/27] reset: rzg2l-usbphy-ctrl: Fix a NULL vs IS_ERR() bug in probe Claudiu Beznea
                   ` (20 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 819ac6b055350c559dbb111f970a96e2c1c812ff upstream.

The Renesas RZ/G3S SoC USB PHY HW block receives as input the USB PWRRDY
signal from the system controller. Add support for the Renesas RZ/G3S SoC.

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/reset/reset-rzg2l-usbphy-ctrl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
index aac947dc467b..4bdef864c331 100644
--- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
+++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
@@ -96,6 +96,10 @@ static int rzg2l_usbphy_ctrl_status(struct reset_controller_dev *rcdev,
 
 static const struct of_device_id rzg2l_usbphy_ctrl_match_table[] = {
 	{ .compatible = "renesas,rzg2l-usbphy-ctrl" },
+	{
+		.compatible = "renesas,r9a08g045-usbphy-ctrl",
+		.data = (void *)RZG2L_USBPHY_CTRL_PWRRDY
+	},
 	{ /* Sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, rzg2l_usbphy_ctrl_match_table);
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 08/27] reset: rzg2l-usbphy-ctrl: Fix a NULL vs IS_ERR() bug in probe
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (6 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 07/27] reset: rzg2l-usbphy-ctrl: Add support for RZ/G3S SoC Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 09/27] reset: rzg2l-usbphy-ctrl: Propagate the return value of regmap_field_update_bits() Claudiu Beznea
                   ` (19 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Dan Carpenter <dan.carpenter@linaro.org>

commit cea5d43b63b221522f8532a7894149f3d8d11f4b upstream.

The devm_regmap_field_alloc() function never returns NULL, it returns
error pointers.  Update the error checking to match.

Fixes: 58128aa88867 ("reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/reset/reset-rzg2l-usbphy-ctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
index 4bdef864c331..feb537aaf918 100644
--- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
+++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
@@ -158,8 +158,8 @@ static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev)
 	field.msb = __fls(args[1]);
 
 	pwrrdy = devm_regmap_field_alloc(dev, regmap, field);
-	if (!pwrrdy)
-		return -ENOMEM;
+	if (IS_ERR(pwrrdy))
+		return PTR_ERR(pwrrdy);
 
 	rzg2l_usbphy_ctrl_set_pwrrdy(pwrrdy, true);
 
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 09/27] reset: rzg2l-usbphy-ctrl: Propagate the return value of regmap_field_update_bits()
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (7 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 08/27] reset: rzg2l-usbphy-ctrl: Fix a NULL vs IS_ERR() bug in probe Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 10/27] reset: rzg2l-usbphy-ctrl: Add suspend/resume support Claudiu Beznea
                   ` (18 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 2289ccd753deeb2cfe300d97e8697680c1ce556c upstream.

Propagate the return value of regmap_field_update_bits() to avoid losing
any possible error. With this, the return type of
rzg2l_usbphy_ctrl_set_pwrrdy() was updated accordingly.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/reset/reset-rzg2l-usbphy-ctrl.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
index feb537aaf918..a75de9b2e9ef 100644
--- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
+++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
@@ -117,13 +117,13 @@ static const struct regmap_config rzg2l_usb_regconf = {
 	.max_register = 1,
 };
 
-static void rzg2l_usbphy_ctrl_set_pwrrdy(struct regmap_field *pwrrdy,
-					 bool power_on)
+static int rzg2l_usbphy_ctrl_set_pwrrdy(struct regmap_field *pwrrdy,
+					bool power_on)
 {
 	u32 val = power_on ? 0 : 1;
 
 	/* The initialization path guarantees that the mask is 1 bit long. */
-	regmap_field_update_bits(pwrrdy, 1, val);
+	return regmap_field_update_bits(pwrrdy, 1, val);
 }
 
 static void rzg2l_usbphy_ctrl_pwrrdy_off(void *data)
@@ -138,6 +138,7 @@ static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev)
 	struct regmap *regmap;
 	const int *data;
 	u32 args[2];
+	int ret;
 
 	data = device_get_match_data(dev);
 	if ((uintptr_t)data != RZG2L_USBPHY_CTRL_PWRRDY)
@@ -161,7 +162,9 @@ static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev)
 	if (IS_ERR(pwrrdy))
 		return PTR_ERR(pwrrdy);
 
-	rzg2l_usbphy_ctrl_set_pwrrdy(pwrrdy, true);
+	ret = rzg2l_usbphy_ctrl_set_pwrrdy(priv->pwrrdy, true);
+	if (ret)
+		return ret;
 
 	return devm_add_action_or_reset(dev, rzg2l_usbphy_ctrl_pwrrdy_off, pwrrdy);
 }
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 10/27] reset: rzg2l-usbphy-ctrl: Add suspend/resume support
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (8 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 09/27] reset: rzg2l-usbphy-ctrl: Propagate the return value of regmap_field_update_bits() Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 11/27] reset: rzg2l-usbphy-ctrl: Check pwrrdy is valid before using it Claudiu Beznea
                   ` (17 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit c5b7cd9adefc5c060facaff6f54d3187480e4e1b upstream.

The RZ/G2L USBPHY control driver is also used on the RZ/G3S SoC.
The RZ/G3S SoC supports a power-saving mode in which power to most USB
components (including the USBPHY control block) is turned off. Because of
this, the USBPHY control block needs to be reconfigured when returning
from power-saving mode.

Add suspend/resume support to handle runtime suspend/resume of the device,
assert/deassert the reset signal, and reinitialize the USBPHY control
block.

Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[claudiu.beznea: use SIMPLE_DEV_PM_OPS() instead of
 DEFINE_SIMPLE_DEV_PM_OPS()]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/reset/reset-rzg2l-usbphy-ctrl.c | 99 +++++++++++++++++++++----
 1 file changed, 84 insertions(+), 15 deletions(-)

diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
index a75de9b2e9ef..5a8483e44165 100644
--- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
+++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
@@ -36,6 +36,7 @@ struct rzg2l_usbphy_ctrl_priv {
 	struct reset_control *rstc;
 	void __iomem *base;
 	struct platform_device *vdev;
+	struct regmap_field *pwrrdy;
 
 	spinlock_t lock;
 };
@@ -92,6 +93,19 @@ static int rzg2l_usbphy_ctrl_status(struct reset_controller_dev *rcdev,
 	return !!(readl(priv->base + RESET) & port_mask);
 }
 
+/* put pll and phy into reset state */
+static void rzg2l_usbphy_ctrl_init(struct rzg2l_usbphy_ctrl_priv *priv)
+{
+	unsigned long flags;
+	u32 val;
+
+	spin_lock_irqsave(&priv->lock, flags);
+	val = readl(priv->base + RESET);
+	val |= RESET_SEL_PLLRESET | RESET_PLLRESET | PHY_RESET_PORT2 | PHY_RESET_PORT1;
+	writel(val, priv->base + RESET);
+	spin_unlock_irqrestore(&priv->lock, flags);
+}
+
 #define RZG2L_USBPHY_CTRL_PWRRDY	1
 
 static const struct of_device_id rzg2l_usbphy_ctrl_match_table[] = {
@@ -131,9 +145,9 @@ static void rzg2l_usbphy_ctrl_pwrrdy_off(void *data)
 	rzg2l_usbphy_ctrl_set_pwrrdy(data, false);
 }
 
-static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev)
+static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev,
+					 struct rzg2l_usbphy_ctrl_priv *priv)
 {
-	struct regmap_field *pwrrdy;
 	struct reg_field field;
 	struct regmap *regmap;
 	const int *data;
@@ -158,15 +172,15 @@ static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev)
 	field.lsb = __ffs(args[1]);
 	field.msb = __fls(args[1]);
 
-	pwrrdy = devm_regmap_field_alloc(dev, regmap, field);
-	if (IS_ERR(pwrrdy))
-		return PTR_ERR(pwrrdy);
+	priv->pwrrdy = devm_regmap_field_alloc(dev, regmap, field);
+	if (IS_ERR(priv->pwrrdy))
+		return PTR_ERR(priv->pwrrdy);
 
 	ret = rzg2l_usbphy_ctrl_set_pwrrdy(priv->pwrrdy, true);
 	if (ret)
 		return ret;
 
-	return devm_add_action_or_reset(dev, rzg2l_usbphy_ctrl_pwrrdy_off, pwrrdy);
+	return devm_add_action_or_reset(dev, rzg2l_usbphy_ctrl_pwrrdy_off, priv->pwrrdy);
 }
 
 static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
@@ -175,9 +189,7 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
 	struct rzg2l_usbphy_ctrl_priv *priv;
 	struct platform_device *vdev;
 	struct regmap *regmap;
-	unsigned long flags;
 	int error;
-	u32 val;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
@@ -191,7 +203,7 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
 	if (IS_ERR(regmap))
 		return PTR_ERR(regmap);
 
-	error = rzg2l_usbphy_ctrl_pwrrdy_init(dev);
+	error = rzg2l_usbphy_ctrl_pwrrdy_init(dev, priv);
 	if (error)
 		return error;
 
@@ -214,12 +226,7 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
 		goto err_pm_disable_reset_deassert;
 	}
 
-	/* put pll and phy into reset state */
-	spin_lock_irqsave(&priv->lock, flags);
-	val = readl(priv->base + RESET);
-	val |= RESET_SEL_PLLRESET | RESET_PLLRESET | PHY_RESET_PORT2 | PHY_RESET_PORT1;
-	writel(val, priv->base + RESET);
-	spin_unlock_irqrestore(&priv->lock, flags);
+	rzg2l_usbphy_ctrl_init(priv);
 
 	priv->rcdev.ops = &rzg2l_usbphy_ctrl_reset_ops;
 	priv->rcdev.of_reset_n_cells = 1;
@@ -267,10 +274,72 @@ static int rzg2l_usbphy_ctrl_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static int rzg2l_usbphy_ctrl_suspend(struct device *dev)
+{
+	struct rzg2l_usbphy_ctrl_priv *priv = dev_get_drvdata(dev);
+	u32 val;
+	int ret;
+
+	val = readl(priv->base + RESET);
+	if (!(val & PHY_RESET_PORT2) || !(val & PHY_RESET_PORT1))
+		WARN(1, "Suspend with resets de-asserted\n");
+
+	pm_runtime_put_sync(dev);
+
+	ret = reset_control_assert(priv->rstc);
+	if (ret)
+		goto rpm_resume;
+
+	ret = rzg2l_usbphy_ctrl_set_pwrrdy(priv->pwrrdy, false);
+	if (ret)
+		goto reset_deassert;
+
+	return 0;
+
+reset_deassert:
+	reset_control_deassert(priv->rstc);
+rpm_resume:
+	pm_runtime_resume_and_get(dev);
+	return ret;
+}
+
+static int rzg2l_usbphy_ctrl_resume(struct device *dev)
+{
+	struct rzg2l_usbphy_ctrl_priv *priv = dev_get_drvdata(dev);
+	int ret;
+
+	ret = rzg2l_usbphy_ctrl_set_pwrrdy(priv->pwrrdy, true);
+	if (ret)
+		return ret;
+
+	ret = reset_control_deassert(priv->rstc);
+	if (ret)
+		goto pwrrdy_off;
+
+	ret = pm_runtime_resume_and_get(dev);
+	if (ret)
+		goto reset_assert;
+
+	rzg2l_usbphy_ctrl_init(priv);
+
+	return 0;
+
+reset_assert:
+	reset_control_assert(priv->rstc);
+pwrrdy_off:
+	rzg2l_usbphy_ctrl_set_pwrrdy(priv->pwrrdy, false);
+	return ret;
+}
+
+static SIMPLE_DEV_PM_OPS(rzg2l_usbphy_ctrl_pm_ops,
+			 rzg2l_usbphy_ctrl_suspend,
+			 rzg2l_usbphy_ctrl_resume);
+
 static struct platform_driver rzg2l_usbphy_ctrl_driver = {
 	.driver = {
 		.name		= "rzg2l_usbphy_ctrl",
 		.of_match_table	= rzg2l_usbphy_ctrl_match_table,
+		.pm		= pm_ptr(&rzg2l_usbphy_ctrl_pm_ops),
 	},
 	.probe	= rzg2l_usbphy_ctrl_probe,
 	.remove	= rzg2l_usbphy_ctrl_remove,
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 11/27] reset: rzg2l-usbphy-ctrl: Check pwrrdy is valid before using it
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (9 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 10/27] reset: rzg2l-usbphy-ctrl: Add suspend/resume support Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 12/27] usb: host: Do not check priv->clks[clk] Claudiu Beznea
                   ` (16 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit e0cf84109bc6c6768337123f1de24ff56b41c91b upstream.

The pwrrdy regmap_filed is allocated in rzg2l_usbphy_ctrl_pwrrdy_init()
only if the driver data is set to RZG2L_USBPHY_CTRL_PWRRDY. Check that
pwrrdy is valid before using it to avoid "Unable to handle kernel NULL
pointer dereference at virtual address" errors.

Fixes: c5b7cd9adefc ("reset: rzg2l-usbphy-ctrl: Add suspend/resume support")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/reset/reset-rzg2l-usbphy-ctrl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
index 5a8483e44165..4f06654e3133 100644
--- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
+++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
@@ -136,6 +136,9 @@ static int rzg2l_usbphy_ctrl_set_pwrrdy(struct regmap_field *pwrrdy,
 {
 	u32 val = power_on ? 0 : 1;
 
+	if (!pwrrdy)
+		return 0;
+
 	/* The initialization path guarantees that the mask is 1 bit long. */
 	return regmap_field_update_bits(pwrrdy, 1, val);
 }
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 12/27] usb: host: Do not check priv->clks[clk]
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (10 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 11/27] reset: rzg2l-usbphy-ctrl: Check pwrrdy is valid before using it Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 13/27] usb: host: ehci-platform: Call reset assert/deassert on suspend/resume Claudiu Beznea
                   ` (15 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit a7d5fe02059af66c9759cbf9199e7ed381cc592a upstream.

There is no need to check the entries in priv->clks[] array before passing
it to clk_disable_unprepare() as the clk_disable_unprepare() already
check if it receives a NULL or error pointer as argument. Remove this
check. This makes the code simpler.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251106143625.3050119-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/usb/host/ehci-platform.c | 3 +--
 drivers/usb/host/ohci-platform.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 2dcfc67f2ba8..9140f6aade89 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -114,8 +114,7 @@ static void ehci_platform_power_off(struct platform_device *dev)
 	int clk;
 
 	for (clk = EHCI_MAX_CLKS - 1; clk >= 0; clk--)
-		if (priv->clks[clk])
-			clk_disable_unprepare(priv->clks[clk]);
+		clk_disable_unprepare(priv->clks[clk]);
 }
 
 static struct hc_driver __read_mostly ehci_platform_hc_driver;
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index 365021e608d5..d8242a681ff3 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -70,8 +70,7 @@ static void ohci_platform_power_off(struct platform_device *dev)
 	int clk;
 
 	for (clk = OHCI_MAX_CLKS - 1; clk >= 0; clk--)
-		if (priv->clks[clk])
-			clk_disable_unprepare(priv->clks[clk]);
+		clk_disable_unprepare(priv->clks[clk]);
 }
 
 static struct hc_driver __read_mostly ohci_platform_hc_driver;
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 13/27] usb: host: ehci-platform: Call reset assert/deassert on suspend/resume
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (11 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 12/27] usb: host: Do not check priv->clks[clk] Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 14/27] usb: host: ohci-platform: " Claudiu Beznea
                   ` (14 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit c31a401fe7abedabb5c05b5cbf36e2fdb3e6be63 upstream.

The Renesas RZ/G3S SoC supports a power-saving mode in which power to most
of the SoC components is turned off, including the USB blocks. On the
resume path, the reset signal must be de-asserted before applying any
settings to the USB registers. To handle this properly, call
reset_control_assert() and reset_control_deassert() during suspend and
resume, respectively.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://patch.msgid.link/20251106143625.3050119-3-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[claudiu.beznea: execute the code based on the
 ehci_platform_reset_control_allowed() return value]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- added ehci_platform_reset_control_allowed() and use it in suspend/resume
  path to avoid executing code introduced by commit
  c31a401fe7abedabb5c05b5cbf36e2fdb3e6be63 on targets other than the
  Renesas RZ/G3S

 drivers/usb/host/ehci-platform.c | 39 ++++++++++++++++++++++++++++++--
 1 file changed, 37 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 9140f6aade89..b954e63648f7 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -423,6 +423,16 @@ static int ehci_platform_remove(struct platform_device *dev)
 	return 0;
 }
 
+static bool __maybe_unused ehci_platform_reset_control_allowed(void)
+{
+	static const char * const reset_control_allow_list[] = {
+		"renesas,r9a08g045", /* Renesas RZ/G3S */
+		NULL
+	};
+
+	return of_machine_compatible_match(reset_control_allow_list);
+}
+
 static int __maybe_unused ehci_platform_suspend(struct device *dev)
 {
 	struct usb_hcd *hcd = dev_get_drvdata(dev);
@@ -442,6 +452,20 @@ static int __maybe_unused ehci_platform_suspend(struct device *dev)
 	if (pdata->power_suspend)
 		pdata->power_suspend(pdev);
 
+	if (!ehci_platform_reset_control_allowed())
+		return ret;
+
+	ret = reset_control_assert(priv->rsts);
+	if (ret) {
+		if (pdata->power_on)
+			pdata->power_on(pdev);
+
+		ehci_resume(hcd, false);
+
+		if (priv->quirk_poll)
+			quirk_poll_init(priv);
+	}
+
 	return ret;
 }
 
@@ -451,12 +475,23 @@ static int __maybe_unused ehci_platform_resume(struct device *dev)
 	struct usb_ehci_pdata *pdata = dev_get_platdata(dev);
 	struct platform_device *pdev = to_platform_device(dev);
 	struct ehci_platform_priv *priv = hcd_to_ehci_priv(hcd);
+	bool reset_control_allowed = ehci_platform_reset_control_allowed();
 	struct device *companion_dev;
+	int err;
+
+	if (reset_control_allowed) {
+		err = reset_control_deassert(priv->rsts);
+		if (err)
+			return err;
+	}
 
 	if (pdata->power_on) {
-		int err = pdata->power_on(pdev);
-		if (err < 0)
+		err = pdata->power_on(pdev);
+		if (err < 0) {
+			if (reset_control_allowed)
+				reset_control_assert(priv->rsts);
 			return err;
+		}
 	}
 
 	companion_dev = usb_of_get_companion_dev(hcd->self.controller);
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 14/27] usb: host: ohci-platform: Call reset assert/deassert on suspend/resume
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (12 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 13/27] usb: host: ehci-platform: Call reset assert/deassert on suspend/resume Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 15/27] dt-bindings: usb: renesas,usbhs: Document RZ/G3S SoC Claudiu Beznea
                   ` (13 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit e4d9da32bf6059cb485caac4c9c0a2e36cdd5573 upstream.

The Renesas RZ/G3S SoC supports a power-saving mode in which power to most
of the SoC components is turned off, including the USB blocks. On the
resume path, the reset signal must be de-asserted before applying any
settings to the USB registers. To handle this properly, call
reset_control_assert() and reset_control_deassert() during suspend and
resume, respectively.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20251106143625.3050119-4-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[claudiu.beznea: execute the code based on the
 ohci_platform_reset_control_allowed() return value]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- added ohci_platform_reset_control_allowed() and use it in suspend/resume
  path to avoid executing code introduced by commit
  e4d9da32bf6059cb485caac4c9c0a2e36cdd5573 on targets other than the
  Renesas RZ/G3S

 drivers/usb/host/ohci-platform.c | 38 ++++++++++++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index d8242a681ff3..4b2da3290fbf 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -267,11 +267,22 @@ static int ohci_platform_remove(struct platform_device *dev)
 }
 
 #ifdef CONFIG_PM_SLEEP
+static bool ohci_platform_reset_control_allowed(void)
+{
+	static const char * const reset_control_allow_list[] = {
+		"renesas,r9a08g045", /* Renesas RZ/G3S */
+		NULL
+	};
+
+	return of_machine_compatible_match(reset_control_allow_list);
+}
+
 static int ohci_platform_suspend(struct device *dev)
 {
 	struct usb_hcd *hcd = dev_get_drvdata(dev);
 	struct usb_ohci_pdata *pdata = dev->platform_data;
 	struct platform_device *pdev = to_platform_device(dev);
+	struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd);
 	bool do_wakeup = device_may_wakeup(dev);
 	int ret;
 
@@ -282,6 +293,17 @@ static int ohci_platform_suspend(struct device *dev)
 	if (pdata->power_suspend)
 		pdata->power_suspend(pdev);
 
+	if (!ohci_platform_reset_control_allowed())
+		return ret;
+
+	ret = reset_control_assert(priv->resets);
+	if (ret) {
+		if (pdata->power_on)
+			pdata->power_on(pdev);
+
+		ohci_resume(hcd, false);
+	}
+
 	return ret;
 }
 
@@ -290,11 +312,23 @@ static int ohci_platform_resume(struct device *dev)
 	struct usb_hcd *hcd = dev_get_drvdata(dev);
 	struct usb_ohci_pdata *pdata = dev_get_platdata(dev);
 	struct platform_device *pdev = to_platform_device(dev);
+	struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd);
+	bool reset_control_allowed = ohci_platform_reset_control_allowed();
+	int err;
+
+	if (reset_control_allowed) {
+		err = reset_control_deassert(priv->resets);
+		if (err)
+			return err;
+	}
 
 	if (pdata->power_on) {
-		int err = pdata->power_on(pdev);
-		if (err < 0)
+		err = pdata->power_on(pdev);
+		if (err < 0) {
+			if (reset_control_allowed)
+				reset_control_assert(priv->resets);
 			return err;
+		}
 	}
 
 	ohci_resume(hcd, false);
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 15/27] dt-bindings: usb: renesas,usbhs: Document RZ/G3S SoC
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (13 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 14/27] usb: host: ohci-platform: " Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 16/27] usb: renesas_usbhs: Assert/de-assert reset signals on suspend/resume Claudiu Beznea
                   ` (12 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 3b56774fa25d46bd2ff3707546e30829f52dde9e upstream.

The USBHS IP block on RZ/G3S SoC is identitcal to the one found on the
RZ/G2L device. Document the RZ/G3S USBHS IP block.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/r/20241126092050.1825607-7-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 Documentation/devicetree/bindings/usb/renesas,usbhs.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml b/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml
index c83b6e8e2040..c93459fe6245 100644
--- a/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml
+++ b/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml
@@ -26,6 +26,7 @@ properties:
               - renesas,usbhs-r9a07g043 # RZ/G2UL and RZ/Five
               - renesas,usbhs-r9a07g044 # RZ/G2{L,LC}
               - renesas,usbhs-r9a07g054 # RZ/V2L
+              - renesas,usbhs-r9a08g045 # RZ/G3S
           - const: renesas,rzg2l-usbhs
 
       - items:
@@ -131,6 +132,7 @@ allOf:
               - renesas,usbhs-r9a07g043
               - renesas,usbhs-r9a07g044
               - renesas,usbhs-r9a07g054
+              - renesas,usbhs-r9a08g045
     then:
       properties:
         interrupts:
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 16/27] usb: renesas_usbhs: Assert/de-assert reset signals on suspend/resume
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (14 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 15/27] dt-bindings: usb: renesas,usbhs: Document RZ/G3S SoC Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 17/27] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S phy bindings Claudiu Beznea
                   ` (11 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 3578b1cde59496efc4625ba3fbd14eb2918807a2 upstream.

The Renesas RZ/G3S SoC supports a power-saving mode in which power to most
SoC components is turned off, including the USB subsystem.

To properly restore from such a state, the reset signal needs to be
asserted/de-asserted during suspend/resume. Add reset assert/de-assert on
suspend/resume.

The resume code has been moved into a separate function to allow reusing
it in case reset_control_assert() from suspend fails.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20251106143625.3050119-5-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[claudiu.beznea:
 - fixed conflict by keeping usbhsc_restore() function introduced by
   commit 3578b1cde59496efc4625ba3fbd14eb2918807a2
 - kept __maybe_unused on suspend/resume functions]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/usb/renesas_usbhs/common.c | 35 ++++++++++++++++++++++--------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 5f5cd15e92bf..742290515326 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -838,10 +838,26 @@ static int usbhs_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static void usbhsc_restore(struct device *dev)
+{
+	struct usbhs_priv *priv = dev_get_drvdata(dev);
+	struct platform_device *pdev = usbhs_priv_to_pdev(priv);
+
+	if (!usbhs_get_dparam(priv, runtime_pwctrl)) {
+		usbhsc_power_ctrl(priv, 1);
+		usbhs_mod_autonomy_mode(priv);
+	}
+
+	usbhs_platform_call(priv, phy_reset, pdev);
+
+	usbhsc_schedule_notify_hotplug(pdev);
+}
+
 static __maybe_unused int usbhsc_suspend(struct device *dev)
 {
 	struct usbhs_priv *priv = dev_get_drvdata(dev);
 	struct usbhs_mod *mod = usbhs_mod_get_current(priv);
+	int ret;
 
 	if (mod) {
 		usbhs_mod_call(priv, stop, priv);
@@ -851,22 +867,23 @@ static __maybe_unused int usbhsc_suspend(struct device *dev)
 	if (mod || !usbhs_get_dparam(priv, runtime_pwctrl))
 		usbhsc_power_ctrl(priv, 0);
 
-	return 0;
+	ret = reset_control_assert(priv->rsts);
+	if (ret)
+		usbhsc_restore(dev);
+
+	return ret;
 }
 
 static __maybe_unused int usbhsc_resume(struct device *dev)
 {
 	struct usbhs_priv *priv = dev_get_drvdata(dev);
-	struct platform_device *pdev = usbhs_priv_to_pdev(priv);
-
-	if (!usbhs_get_dparam(priv, runtime_pwctrl)) {
-		usbhsc_power_ctrl(priv, 1);
-		usbhs_mod_autonomy_mode(priv);
-	}
+	int ret;
 
-	usbhs_platform_call(priv, phy_reset, pdev);
+	ret = reset_control_deassert(priv->rsts);
+	if (ret)
+		return ret;
 
-	usbhsc_schedule_notify_hotplug(pdev);
+	usbhsc_restore(dev);
 
 	return 0;
 }
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 17/27] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S phy bindings
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (15 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 16/27] usb: renesas_usbhs: Assert/de-assert reset signals on suspend/resume Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 18/27] dt-bindings: phy: renesas,usb2-phy: Mark resets as required for RZ/G3S Claudiu Beznea
                   ` (10 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit f3c8498551146dfb014be0d85d3a7df98be16aa2 upstream.

Document the RZ/G3S PHY bindings. The RZ/G3S USB PHY is almost identical
with the RZ/G2L USB PHY. The difference is that there is a hardware
limitation on the max burst size used when the BUS master interface
issues a transfer request for RZ/G3S that is configured though PHY
registers.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240822152801.602318-12-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
index 349c48fabb0a..e623fd21898f 100644
--- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
@@ -13,7 +13,9 @@ properties:
   compatible:
     oneOf:
       - items:
-          - const: renesas,usb2-phy-r8a77470 # RZ/G1C
+          - enum:
+              - renesas,usb2-phy-r8a77470  # RZ/G1C
+              - renesas,usb2-phy-r9a08g045 # RZ/G3S
 
       - items:
           - enum:
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 18/27] dt-bindings: phy: renesas,usb2-phy: Mark resets as required for RZ/G3S
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (16 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 17/27] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S phy bindings Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 19/27] phy: renesas: rcar-gen3-usb2: Add support to initialize the bus Claudiu Beznea
                   ` (9 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit bc6f8b756c89d831c91a65ef9f3b5ceabdbae441 upstream.

The reset lines are mandatory for the Renesas RZ/G3S platform and must be
explicitly defined in device tree.

Fixes: f3c849855114 ("dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S phy bindings")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20251023135810.1688415-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
[claudiu.beznea: fixed conflict in allOf section using an enum with
 renesas,usb2-phy-r9a08g045 and renesas,rzg2l-usb2-phy]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
index e623fd21898f..358f543cd36e 100644
--- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
@@ -108,7 +108,9 @@ allOf:
       properties:
         compatible:
           contains:
-            const: renesas,rzg2l-usb2-phy
+            enum:
+              - renesas,usb2-phy-r9a08g045
+              - renesas,rzg2l-usb2-phy
     then:
       required:
         - resets
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 19/27] phy: renesas: rcar-gen3-usb2: Add support to initialize the bus
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (17 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 18/27] dt-bindings: phy: renesas,usb2-phy: Mark resets as required for RZ/G3S Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 20/27] phy: renesas: rcar-gen3-usb2: Add support for the RZ/G3S SoC Claudiu Beznea
                   ` (8 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 4eae16375357a2a7e8501be5469532f7636064b3 upstream.

The Renesas RZ/G3S need to initialize the USB BUS before transferring data
due to hardware limitation. As the register that need to be touched for
this is in the address space of the USB PHY, and the UBS PHY need to be
initialized before any other USB drivers handling data transfer, add
support to initialize the USB BUS.

As the USB PHY is probed before any other USB drivers that enables
clocks and de-assert the reset signals and the BUS initialization is done
in the probe phase, we need to add code to de-assert reset signal and
runtime resume the device (which enables its clocks) before accessing
the registers.

As the reset signals are not required by the USB PHY driver for the other
USB PHY hardware variants, the reset signals and runtime PM was handled
only in the function that initialize the USB BUS.

The PHY initialization was done right after runtime PM enable to have
all in place when the PHYs are registered.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/r/20240822152801.602318-11-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
[claudiu.beznea: fixed conflict by keeping the code from v5.10 CIP,
 dropped the platform_set_drvdata() near platform_get_irq_optional()]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 50 ++++++++++++++++++++++--
 1 file changed, 47 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index a8f4c69d6177..87ee9ec54302 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -22,12 +22,14 @@
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/regulator/consumer.h>
+#include <linux/reset.h>
 #include <linux/string.h>
 #include <linux/usb/of.h>
 #include <linux/workqueue.h>
 
 /******* USB2.0 Host registers (original offset is +0x200) *******/
 #define USB2_INT_ENABLE		0x000
+#define USB2_AHB_BUS_CTR	0x008
 #define USB2_USBCTR		0x00c
 #define USB2_SPD_RSM_TIMSET	0x10c
 #define USB2_OC_TIMSET		0x110
@@ -43,6 +45,10 @@
 #define USB2_INT_ENABLE_USBH_INTB_EN	BIT(2)	/* For EHCI */
 #define USB2_INT_ENABLE_USBH_INTA_EN	BIT(1)	/* For OHCI */
 
+/* AHB_BUS_CTR */
+#define USB2_AHB_BUS_CTR_MBL_MASK	GENMASK(1, 0)
+#define USB2_AHB_BUS_CTR_MBL_INCR4	2
+
 /* USBCTR */
 #define USB2_USBCTR_DIRPD	BIT(2)
 #define USB2_USBCTR_PLL_RST	BIT(1)
@@ -113,6 +119,7 @@ struct rcar_gen3_chan {
 	struct extcon_dev *extcon;
 	struct rcar_gen3_phy rphys[NUM_OF_PHYS];
 	struct regulator *vbus;
+	struct reset_control *rstc;
 	struct work_struct work;
 	spinlock_t lock;	/* protects access to hardware and driver data structure. */
 	enum usb_dr_mode dr_mode;
@@ -126,6 +133,7 @@ struct rcar_gen3_chan {
 struct rcar_gen3_phy_drv_data {
 	const struct phy_ops *phy_usb2_ops;
 	bool no_adp_ctrl;
+	bool init_bus;
 };
 
 /*
@@ -662,6 +670,35 @@ static enum usb_dr_mode rcar_gen3_get_dr_mode(struct device_node *np)
 	return candidate;
 }
 
+static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
+{
+	struct device *dev = channel->dev;
+	int ret;
+	u32 val;
+
+	channel->rstc = devm_reset_control_array_get_shared(dev);
+	if (IS_ERR(channel->rstc))
+		return PTR_ERR(channel->rstc);
+
+	ret = pm_runtime_resume_and_get(dev);
+	if (ret)
+		return ret;
+
+	ret = reset_control_deassert(channel->rstc);
+	if (ret)
+		goto rpm_put;
+
+	val = readl(channel->base + USB2_AHB_BUS_CTR);
+	val &= ~USB2_AHB_BUS_CTR_MBL_MASK;
+	val |= USB2_AHB_BUS_CTR_MBL_INCR4;
+	writel(val, channel->base + USB2_AHB_BUS_CTR);
+
+rpm_put:
+	pm_runtime_put(dev);
+
+	return ret;
+}
+
 static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 {
 	const struct rcar_gen3_phy_drv_data *phy_data;
@@ -713,6 +750,15 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 		goto error;
 	}
 
+	platform_set_drvdata(pdev, channel);
+	channel->dev = dev;
+
+	if (phy_data->init_bus) {
+		ret = rcar_gen3_phy_usb2_init_bus(channel);
+		if (ret)
+			goto error;
+	}
+
 	channel->soc_no_adp_ctrl = phy_data->no_adp_ctrl;
 	if (phy_data->no_adp_ctrl)
 		channel->obint_enable_bits = USB2_OBINT_IDCHG_EN;
@@ -744,9 +790,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 		channel->vbus = NULL;
 	}
 
-	platform_set_drvdata(pdev, channel);
-	channel->dev = dev;
-
 	irq = platform_get_irq_optional(pdev, 0);
 	if (irq < 0 && irq != -ENXIO) {
 		ret = irq;
@@ -787,6 +830,7 @@ static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
 	if (channel->is_otg_channel)
 		device_remove_file(&pdev->dev, &dev_attr_role);
 
+	reset_control_assert(channel->rstc);
 	pm_runtime_disable(&pdev->dev);
 
 	return 0;
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 20/27] phy: renesas: rcar-gen3-usb2: Add support for the RZ/G3S SoC
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (18 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 19/27] phy: renesas: rcar-gen3-usb2: Add support to initialize the bus Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 21/27] phy: renesas: rcar-gen3-usb2: store drvdata pointer in channel Claudiu Beznea
                   ` (7 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 3c2ea12a625dbf5a864f4920235fa1c739d06e7d upstream.

Add support for the Renesas RZ/G3S SoC. The support is similar with the
rest of RZ/G2 devices with the except that the RZ/G3S needs bus
initialization due to hardware limitation.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/r/20240822152801.602318-13-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index 87ee9ec54302..afd706a3b0c7 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -595,6 +595,12 @@ static const struct rcar_gen3_phy_drv_data rz_g2l_phy_usb2_data = {
 	.no_adp_ctrl = true,
 };
 
+static const struct rcar_gen3_phy_drv_data rz_g3s_phy_usb2_data = {
+	.phy_usb2_ops = &rcar_gen3_phy_usb2_ops,
+	.no_adp_ctrl = true,
+	.init_bus = true,
+};
+
 static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = {
 	{
 		.compatible = "renesas,usb2-phy-r8a77470",
@@ -616,6 +622,10 @@ static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = {
 		.compatible = "renesas,rzg2l-usb2-phy",
 		.data = &rz_g2l_phy_usb2_data,
 	},
+	{
+		.compatible = "renesas,usb2-phy-r9a08g045",
+		.data = &rz_g3s_phy_usb2_data,
+	},
 	{
 		.compatible = "renesas,rcar-gen3-usb2-phy",
 		.data = &rcar_gen3_phy_usb2_data,
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 21/27] phy: renesas: rcar-gen3-usb2: store drvdata pointer in channel
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (19 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 20/27] phy: renesas: rcar-gen3-usb2: Add support for the RZ/G3S SoC Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 22/27] phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe() Claudiu Beznea
                   ` (6 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

commit f75806d26318c08ddb79652cce89086e4da17257 upstream.

Store the SoC-specific driver data pointer (struct rcar_gen3_phy_drv_data)
directly in struct rcar_gen3_chan instead of copying individual flags into
separate channel members.

Obtain the drvdata with of_device_get_match_data() in probe and assign it
to channel->phy_data. Update all call sites to reference
`channel->phy_data->*` for SoC-specific behaviour (for example no_adp_ctrl
and utmi_ctrl). Remove the redundant soc_no_adp_ctrl and utmi_ctrl fields
from struct rcar_gen3_chan.

This simplifies the probe path, reduces duplication, and makes it easier
to extend the driver with additional platform-specific fields in the
future.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20250808215209.3692744-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
[claudiu.beznea:
 - fixed conflict in struct rcar_gen3_chan
 - dropped channel->phy_data->utmi_ctrl check in rcar_gen3_phy_usb2_init()
   along with the code block that followed it, as it doesn't apply to
   v5.10 CIP]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index afd706a3b0c7..b7f5305b6b38 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -116,6 +116,7 @@ struct rcar_gen3_phy {
 struct rcar_gen3_chan {
 	void __iomem *base;
 	struct device *dev;	/* platform_device's device */
+	const struct rcar_gen3_phy_drv_data *phy_data;
 	struct extcon_dev *extcon;
 	struct rcar_gen3_phy rphys[NUM_OF_PHYS];
 	struct regulator *vbus;
@@ -127,7 +128,6 @@ struct rcar_gen3_chan {
 	bool extcon_host;
 	bool is_otg_channel;
 	bool uses_otg_pins;
-	bool soc_no_adp_ctrl;
 };
 
 struct rcar_gen3_phy_drv_data {
@@ -196,7 +196,7 @@ static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus)
 	u32 val;
 
 	dev_vdbg(ch->dev, "%s: %08x, %d\n", __func__, val, vbus);
-	if (ch->soc_no_adp_ctrl) {
+	if (ch->phy_data->no_adp_ctrl) {
 		if (ch->vbus)
 			regulator_hardware_enable(ch->vbus, vbus);
 
@@ -282,7 +282,7 @@ static bool rcar_gen3_check_id(struct rcar_gen3_chan *ch)
 	if (!ch->uses_otg_pins)
 		return (ch->dr_mode == USB_DR_MODE_HOST) ? false : true;
 
-	if (ch->soc_no_adp_ctrl)
+	if (ch->phy_data->no_adp_ctrl)
 		return !!(readl(ch->base + USB2_LINECTRL1) & USB2_LINECTRL1_USB2_IDMON);
 
 	return !!(readl(ch->base + USB2_ADPCTRL) & USB2_ADPCTRL_IDDIG);
@@ -414,7 +414,7 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
 	      USB2_LINECTRL1_DMRPD_EN | USB2_LINECTRL1_DM_RPD;
 	writel(val, usb2_base + USB2_LINECTRL1);
 
-	if (!ch->soc_no_adp_ctrl) {
+	if (!ch->phy_data->no_adp_ctrl) {
 		val = readl(usb2_base + USB2_VBCTRL);
 		val &= ~USB2_VBCTRL_OCCLREN;
 		writel(val | USB2_VBCTRL_DRVVBUSSEL, usb2_base + USB2_VBCTRL);
@@ -711,7 +711,6 @@ static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
 
 static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 {
-	const struct rcar_gen3_phy_drv_data *phy_data;
 	struct device *dev = &pdev->dev;
 	struct rcar_gen3_chan *channel;
 	struct phy_provider *provider;
@@ -754,8 +753,8 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 	 */
 	pm_runtime_enable(dev);
 
-	phy_data = of_device_get_match_data(dev);
-	if (!phy_data) {
+	channel->phy_data = of_device_get_match_data(dev);
+	if (!channel->phy_data) {
 		ret = -EINVAL;
 		goto error;
 	}
@@ -763,21 +762,20 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, channel);
 	channel->dev = dev;
 
-	if (phy_data->init_bus) {
+	if (channel->phy_data->init_bus) {
 		ret = rcar_gen3_phy_usb2_init_bus(channel);
 		if (ret)
 			goto error;
 	}
 
-	channel->soc_no_adp_ctrl = phy_data->no_adp_ctrl;
-	if (phy_data->no_adp_ctrl)
+	if (channel->phy_data->no_adp_ctrl)
 		channel->obint_enable_bits = USB2_OBINT_IDCHG_EN;
 
 	spin_lock_init(&channel->lock);
 
 	for (i = 0; i < NUM_OF_PHYS; i++) {
 		channel->rphys[i].phy = devm_phy_create(dev, NULL,
-							phy_data->phy_usb2_ops);
+							channel->phy_data->phy_usb2_ops);
 		if (IS_ERR(channel->rphys[i].phy)) {
 			dev_err(dev, "Failed to create USB2 PHY\n");
 			ret = PTR_ERR(channel->rphys[i].phy);
@@ -788,7 +786,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 		phy_set_drvdata(channel->rphys[i].phy, &channel->rphys[i]);
 	}
 
-	if (channel->soc_no_adp_ctrl && channel->is_otg_channel)
+	if (channel->phy_data->no_adp_ctrl && channel->is_otg_channel)
 		channel->vbus = devm_regulator_get_exclusive(dev, "vbus");
 	else
 		channel->vbus = devm_regulator_get_optional(dev, "vbus");
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 22/27] phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe()
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (20 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 21/27] phy: renesas: rcar-gen3-usb2: store drvdata pointer in channel Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 23/27] phy: renesas: rcar-gen3-usb2: Move phy_data->init_bus check Claudiu Beznea
                   ` (5 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

commit 662bb179d3381c7c069e44bb177396bcaee31cc8 upstream.

If an error occurs after the reset_control_deassert(),
reset_control_assert() must be called, as already done in the remove
function.

Use devm_add_action_or_reset() to add the missing call and simplify the
.remove() function accordingly.

While at it, drop struct rcar_gen3_chan::rstc as it is not used aymore.

[claudiu.beznea: removed "struct reset_control *rstc = data;" from
 rcar_gen3_reset_assert(), dropped struct rcar_gen3_chan::rstc]

Fixes: 4eae16375357 ("phy: renesas: rcar-gen3-usb2: Add support to initialize the bus")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20251023135810.1688415-3-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index b7f5305b6b38..1dc6abe7fa5b 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -120,7 +120,6 @@ struct rcar_gen3_chan {
 	struct extcon_dev *extcon;
 	struct rcar_gen3_phy rphys[NUM_OF_PHYS];
 	struct regulator *vbus;
-	struct reset_control *rstc;
 	struct work_struct work;
 	spinlock_t lock;	/* protects access to hardware and driver data structure. */
 	enum usb_dr_mode dr_mode;
@@ -680,21 +679,31 @@ static enum usb_dr_mode rcar_gen3_get_dr_mode(struct device_node *np)
 	return candidate;
 }
 
+static void rcar_gen3_reset_assert(void *data)
+{
+	reset_control_assert(data);
+}
+
 static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
 {
 	struct device *dev = channel->dev;
+	struct reset_control *rstc;
 	int ret;
 	u32 val;
 
-	channel->rstc = devm_reset_control_array_get_shared(dev);
-	if (IS_ERR(channel->rstc))
-		return PTR_ERR(channel->rstc);
+	rstc = devm_reset_control_array_get_shared(dev);
+	if (IS_ERR(rstc))
+		return PTR_ERR(rstc);
 
 	ret = pm_runtime_resume_and_get(dev);
 	if (ret)
 		return ret;
 
-	ret = reset_control_deassert(channel->rstc);
+	ret = reset_control_deassert(rstc);
+	if (ret)
+		goto rpm_put;
+
+	ret = devm_add_action_or_reset(dev, rcar_gen3_reset_assert, rstc);
 	if (ret)
 		goto rpm_put;
 
@@ -838,7 +847,6 @@ static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
 	if (channel->is_otg_channel)
 		device_remove_file(&pdev->dev, &dev_attr_role);
 
-	reset_control_assert(channel->rstc);
 	pm_runtime_disable(&pdev->dev);
 
 	return 0;
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 23/27] phy: renesas: rcar-gen3-usb2: Move phy_data->init_bus check
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (21 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 22/27] phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe() Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 24/27] phy: renesas: rcar-gen3-usb2: Add suspend/resume support Claudiu Beznea
                   ` (4 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 79d9db7f7a0c94b2b505666513879ac470c7e12f upstream.

Move the check of phy_data->init_bus from rcar_gen3_phy_usb2_init_bus()
to rcar_gen3_phy_usb2_probe() to avoid having it duplicated in both the
probe path and the upcoming resume code. This is a preparatory patch.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20251119120418.686224-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index 1dc6abe7fa5b..33816e60f0d1 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -691,6 +691,9 @@ static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
 	int ret;
 	u32 val;
 
+	if (!channel->phy_data->init_bus)
+		return 0;
+
 	rstc = devm_reset_control_array_get_shared(dev);
 	if (IS_ERR(rstc))
 		return PTR_ERR(rstc);
@@ -771,11 +774,9 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, channel);
 	channel->dev = dev;
 
-	if (channel->phy_data->init_bus) {
-		ret = rcar_gen3_phy_usb2_init_bus(channel);
-		if (ret)
-			goto error;
-	}
+	ret = rcar_gen3_phy_usb2_init_bus(channel);
+	if (ret)
+		goto error;
 
 	if (channel->phy_data->no_adp_ctrl)
 		channel->obint_enable_bits = USB2_OBINT_IDCHG_EN;
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 24/27] phy: renesas: rcar-gen3-usb2: Add suspend/resume support
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (22 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 23/27] phy: renesas: rcar-gen3-usb2: Move phy_data->init_bus check Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 25/27] arm64: dts: renesas: r9a08g045: Add USB support Claudiu Beznea
                   ` (3 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 942a7a6bf4c6a8661324539f686a34c9448610bd upstream.

The Renesas RZ/G3S supports a power saving mode where power to most of the
SoC components is turned off. The USB PHY is among these components.
Because of this the settings applied in driver probe need to be executed
also on resume path. On suspend path only reset signal need to be asserted.
Add suspend/resume support.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20251119120418.686224-3-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
[claudiu.beznea: use SIMPLE_DEV_PM_OPS() instead of
 DEFINE_SIMPLE_DEV_PM_OPS()]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 57 +++++++++++++++++-------
 1 file changed, 42 insertions(+), 15 deletions(-)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index 33816e60f0d1..f879208d9e6c 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -118,6 +118,7 @@ struct rcar_gen3_chan {
 	struct device *dev;	/* platform_device's device */
 	const struct rcar_gen3_phy_drv_data *phy_data;
 	struct extcon_dev *extcon;
+	struct reset_control *rstc;
 	struct rcar_gen3_phy rphys[NUM_OF_PHYS];
 	struct regulator *vbus;
 	struct work_struct work;
@@ -687,38 +688,24 @@ static void rcar_gen3_reset_assert(void *data)
 static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
 {
 	struct device *dev = channel->dev;
-	struct reset_control *rstc;
 	int ret;
 	u32 val;
 
 	if (!channel->phy_data->init_bus)
 		return 0;
 
-	rstc = devm_reset_control_array_get_shared(dev);
-	if (IS_ERR(rstc))
-		return PTR_ERR(rstc);
-
 	ret = pm_runtime_resume_and_get(dev);
 	if (ret)
 		return ret;
 
-	ret = reset_control_deassert(rstc);
-	if (ret)
-		goto rpm_put;
-
-	ret = devm_add_action_or_reset(dev, rcar_gen3_reset_assert, rstc);
-	if (ret)
-		goto rpm_put;
-
 	val = readl(channel->base + USB2_AHB_BUS_CTR);
 	val &= ~USB2_AHB_BUS_CTR_MBL_MASK;
 	val |= USB2_AHB_BUS_CTR_MBL_INCR4;
 	writel(val, channel->base + USB2_AHB_BUS_CTR);
 
-rpm_put:
 	pm_runtime_put(dev);
 
-	return ret;
+	return 0;
 }
 
 static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
@@ -759,6 +746,18 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 		}
 	}
 
+	channel->rstc = devm_reset_control_array_get_optional_shared(dev);
+	if (IS_ERR(channel->rstc))
+		return PTR_ERR(channel->rstc);
+
+	ret = reset_control_deassert(channel->rstc);
+	if (ret)
+		return ret;
+
+	ret = devm_add_action_or_reset(dev, rcar_gen3_reset_assert, channel->rstc);
+	if (ret)
+		return ret;
+
 	/*
 	 * devm_phy_create() will call pm_runtime_enable(&phy->dev);
 	 * And then, phy-core will manage runtime pm for this device.
@@ -853,10 +852,38 @@ static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
 	return 0;
 };
 
+static int rcar_gen3_phy_usb2_suspend(struct device *dev)
+{
+	struct rcar_gen3_chan *channel = dev_get_drvdata(dev);
+
+	return reset_control_assert(channel->rstc);
+}
+
+static int rcar_gen3_phy_usb2_resume(struct device *dev)
+{
+	struct rcar_gen3_chan *channel = dev_get_drvdata(dev);
+	int ret;
+
+	ret = reset_control_deassert(channel->rstc);
+	if (ret)
+		return ret;
+
+	ret = rcar_gen3_phy_usb2_init_bus(channel);
+	if (ret)
+		reset_control_assert(channel->rstc);
+
+	return ret;
+}
+
+static SIMPLE_DEV_PM_OPS(rcar_gen3_phy_usb2_pm_ops,
+			 rcar_gen3_phy_usb2_suspend,
+			 rcar_gen3_phy_usb2_resume);
+
 static struct platform_driver rcar_gen3_phy_usb2_driver = {
 	.driver = {
 		.name		= "phy_rcar_gen3_usb2",
 		.of_match_table	= rcar_gen3_phy_usb2_match_table,
+		.pm		= pm_ptr(&rcar_gen3_phy_usb2_pm_ops),
 	},
 	.probe	= rcar_gen3_phy_usb2_probe,
 	.remove = rcar_gen3_phy_usb2_remove,
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 25/27] arm64: dts: renesas: r9a08g045: Add USB support
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (23 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 24/27] phy: renesas: rcar-gen3-usb2: Add suspend/resume support Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 26/27] arm64: dts: renesas: rzg3s-smarc: Enable " Claudiu Beznea
                   ` (2 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit c837ad879e7110227bac0096a32a7c610e430a8e upstream.

Add USB nodes for the Renesas RZ/G3S SoC. This consists of PHY reset,
host and device support.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20251023135810.1688415-7-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[claudiu.beznea: fixed conflict with the PCIe node by keeping both PCIe
 and USB nodes and moving the PCIe after USB node to maintain the
 sorting by block address]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 118 +++++++++++++++++++++
 1 file changed, 118 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi
index ecca25467163..c386d92499e1 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi
@@ -691,6 +691,124 @@ eth1: ethernet@11c40000 {
 			status = "disabled";
 		};
 
+		phyrst: usbphy-ctrl@11e00000 {
+			compatible = "renesas,r9a08g045-usbphy-ctrl";
+			reg = <0 0x11e00000 0 0x10000>;
+			clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>;
+			resets = <&cpg R9A08G045_USB_PRESETN>;
+			power-domains = <&cpg>;
+			#reset-cells = <1>;
+			renesas,sysc-pwrrdy = <&sysc 0xd70 0x1>;
+			status = "disabled";
+
+			usb0_vbus_otg: regulator-vbus {
+				regulator-name = "vbus";
+			};
+		};
+
+		ohci0: usb@11e10000 {
+			compatible = "generic-ohci";
+			reg = <0 0x11e10000 0 0x100>;
+			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>,
+				 <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>;
+			resets = <&phyrst 0>,
+				 <&cpg R9A08G045_USB_U2H0_HRESETN>;
+			phys = <&usb2_phy0 1>;
+			phy-names = "usb";
+			power-domains = <&cpg>;
+			status = "disabled";
+		};
+
+		ohci1: usb@11e30000 {
+			compatible = "generic-ohci";
+			reg = <0 0x11e30000 0 0x100>;
+			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>,
+				 <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>;
+			resets = <&phyrst 1>,
+				 <&cpg R9A08G045_USB_U2H1_HRESETN>;
+			phys = <&usb2_phy1 1>;
+			phy-names = "usb";
+			power-domains = <&cpg>;
+			status = "disabled";
+		};
+
+		ehci0: usb@11e10100 {
+			compatible = "generic-ehci";
+			reg = <0 0x11e10100 0 0x100>;
+			interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>,
+				 <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>;
+			resets = <&phyrst 0>,
+				 <&cpg R9A08G045_USB_U2H0_HRESETN>;
+			phys = <&usb2_phy0 2>;
+			phy-names = "usb";
+			companion = <&ohci0>;
+			power-domains = <&cpg>;
+			status = "disabled";
+		};
+
+		ehci1: usb@11e30100 {
+			compatible = "generic-ehci";
+			reg = <0 0x11e30100 0 0x100>;
+			interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>,
+				 <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>;
+			resets = <&phyrst 1>,
+				 <&cpg R9A08G045_USB_U2H1_HRESETN>;
+			phys = <&usb2_phy1 2>;
+			phy-names = "usb";
+			companion = <&ohci1>;
+			power-domains = <&cpg>;
+			status = "disabled";
+		};
+
+		usb2_phy0: usb-phy@11e10200 {
+			compatible = "renesas,usb2-phy-r9a08g045";
+			reg = <0 0x11e10200 0 0x700>;
+			interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>,
+				 <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>;
+			resets = <&phyrst 0>,
+				 <&cpg R9A08G045_USB_U2H0_HRESETN>;
+			#phy-cells = <1>;
+			power-domains = <&cpg>;
+			status = "disabled";
+		};
+
+		usb2_phy1: usb-phy@11e30200 {
+			compatible = "renesas,usb2-phy-r9a08g045";
+			reg = <0 0x11e30200 0 0x700>;
+			interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>,
+				 <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>;
+			resets = <&phyrst 1>,
+				 <&cpg R9A08G045_USB_U2H1_HRESETN>;
+			#phy-cells = <1>;
+			power-domains = <&cpg>;
+			status = "disabled";
+		};
+
+		hsusb: usb@11e20000 {
+			compatible = "renesas,usbhs-r9a08g045",
+				     "renesas,rzg2l-usbhs";
+			reg = <0 0x11e20000 0 0x10000>;
+			interrupts = <GIC_SPI 85 IRQ_TYPE_EDGE_RISING>,
+				     <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>,
+				 <&cpg CPG_MOD R9A08G045_USB_U2P_EXR_CPUCLK>;
+			resets = <&phyrst 0>,
+				 <&cpg R9A08G045_USB_U2P_EXL_SYSRST>;
+			renesas,buswait = <7>;
+			phys = <&usb2_phy0 3>;
+			phy-names = "usb";
+			power-domains = <&cpg>;
+			status = "disabled";
+		};
+
 		pcie: pcie@11e40000 {
 			compatible = "renesas,r9a08g045-pcie";
 			reg = <0 0x11e40000 0 0x10000>;
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 26/27] arm64: dts: renesas: rzg3s-smarc: Enable USB support
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (24 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 25/27] arm64: dts: renesas: r9a08g045: Add USB support Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 27/27] usb: renesas: Suppress binding attributes Claudiu Beznea
  2026-07-27 12:40 ` [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Pavel Machek
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 0926e6e69852a450dc2f6e3f8412ae58f773e29b upstream.

Enable USB support (host, device, USB PHYs).

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20251023135810.1688415-8-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 57 ++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi
index 203656961bdf..6fc795a51ebb 100644
--- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi
@@ -96,6 +96,20 @@ &audio_clk2 {
 	clock-frequency = <12288000>;
 };
 
+&ehci0 {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
+
+&hsusb {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -129,6 +143,19 @@ &pcie {
 	status = "okay";
 };
 
+&ohci0 {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&ohci1 {
+	status = "okay";
+};
+
+&phyrst {
+	status = "okay";
+};
+
 &pinctrl {
 	audio_clock_pins: audio-clock {
 		pins = "AUDIO_CLK1", "AUDIO_CLK2";
@@ -209,6 +236,23 @@ ssi3_pins: ssi3 {
 			 <RZG2L_PORT_PINMUX(18, 4, 8)>, /* TXD */
 			 <RZG2L_PORT_PINMUX(18, 5, 8)>; /* RXD */
 	};
+
+	usb0_pins: usb0 {
+		peri {
+			pinmux = <RZG2L_PORT_PINMUX(5, 0, 1)>, /* VBUS */
+				 <RZG2L_PORT_PINMUX(5, 2, 1)>; /* OVC */
+		};
+
+		otg {
+			pinmux = <RZG2L_PORT_PINMUX(5, 3, 1)>; /* OTG_ID */
+			bias-pull-up;
+		};
+	};
+
+	usb1_pins: usb1 {
+		pinmux = <RZG2L_PORT_PINMUX(5, 4, 5)>, /* OVC */
+			 <RZG2L_PORT_PINMUX(6, 0, 1)>; /* VBUS */
+	};
 };
 
 &scif0 {
@@ -244,3 +288,16 @@ &ssi3 {
 	pinctrl-0 = <&ssi3_pins>, <&audio_clock_pins>;
 	status = "okay";
 };
+
+&usb2_phy0 {
+	pinctrl-0 = <&usb0_pins>;
+	pinctrl-names = "default";
+	vbus-supply = <&usb0_vbus_otg>;
+	status = "okay";
+};
+
+&usb2_phy1 {
+	pinctrl-0 = <&usb1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5.10.y-cip v2 27/27] usb: renesas: Suppress binding attributes
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (25 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 26/27] arm64: dts: renesas: rzg3s-smarc: Enable " Claudiu Beznea
@ 2026-07-08  8:10 ` Claudiu Beznea
  2026-07-27 12:40 ` [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Pavel Machek
  27 siblings, 0 replies; 29+ messages in thread
From: Claudiu Beznea @ 2026-07-08  8:10 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, pavel; +Cc: cip-dev

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

In v5.10 CIP the drivers that are involved for the USB to work on the
Renesas RZ/G2L based devices are the following:
- rzg2l_usbphy_ctrl
- phy_rcar_gen3_usb2
- ochi, echi, renesas_usbhs

The drivers tree is as follows:

        +-----------------------------------------------------------+
        |                                                           |
       \ /                                                          |
        `                                                           |
rzg2l_usbphy_ctrl <--> phy_rcar_gen3_usb2 <--+--> ohci <------------+
                                             +--> ehci <------------+
                                             +--> renesas_usbhs  <--+

Where:
- rzg2l_usbphy_ctrl provides reset signals to phy_rcar_gen3_usb2 and
  OHCI, EHCI, renesas_usbhs drivers
- phy_rcar_gen3_usb3_usb2 request reset signals from rzg2l_usbphy_ctrl
  and provides PHYs to OHCI, EHCI, renesas_usbhs
- OHCI, EHCI, renesas_usbhs drivers gets resets from rzg2l_usbphy_ctrl
  driver and PHYs from phy_rcar_gen3_usb2

In the current v5.10 CIP tree, unbinding any of the providers in the
mentioned diagram does not force the unbinding of the consumers. In these
scenarios, the consumers remain with stale resources. Subsequent
operations that require resources from the providers will fail, either
silently or loudly (crashes). Rebinding the previously unbound provider
does not resolve the issue either.

The only way the unbind/bind sequence works for the above-mentioned
scenario is to perform the unbind starting with the consumers and ending
with the providers, and to perform the bind starting with the providers
and ending with the consumers.

Suppress the binding attributes.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- none

 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 1 +
 drivers/reset/reset-rzg2l-usbphy-ctrl.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index f879208d9e6c..53feeae07df3 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -884,6 +884,7 @@ static struct platform_driver rcar_gen3_phy_usb2_driver = {
 		.name		= "phy_rcar_gen3_usb2",
 		.of_match_table	= rcar_gen3_phy_usb2_match_table,
 		.pm		= pm_ptr(&rcar_gen3_phy_usb2_pm_ops),
+		.suppress_bind_attrs = true,
 	},
 	.probe	= rcar_gen3_phy_usb2_probe,
 	.remove = rcar_gen3_phy_usb2_remove,
diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
index 4f06654e3133..384613519379 100644
--- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
+++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
@@ -343,6 +343,7 @@ static struct platform_driver rzg2l_usbphy_ctrl_driver = {
 		.name		= "rzg2l_usbphy_ctrl",
 		.of_match_table	= rzg2l_usbphy_ctrl_match_table,
 		.pm		= pm_ptr(&rzg2l_usbphy_ctrl_pm_ops),
+		.suppress_bind_attrs = true,
 	},
 	.probe	= rzg2l_usbphy_ctrl_probe,
 	.remove	= rzg2l_usbphy_ctrl_remove,
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support
  2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
                   ` (26 preceding siblings ...)
  2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 27/27] usb: renesas: Suppress binding attributes Claudiu Beznea
@ 2026-07-27 12:40 ` Pavel Machek
  27 siblings, 0 replies; 29+ messages in thread
From: Pavel Machek @ 2026-07-27 12:40 UTC (permalink / raw)
  To: Claudiu Beznea; +Cc: nobuhiro.iwamatsu.x90, pavel, cip-dev

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Hi!

> Patches backport the Renesas RZ/G3S USB support.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2026-07-27 12:40 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08  8:10 [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 01/27] clk: renesas: r9a08g045: Add clocks, resets and power domains for USB Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 02/27] clk: renesas: rzg2l: Deassert reset on assert timeout Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 03/27] pinctrl: renesas: rzg2l: Add support for pull-up/down Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 04/27] pinctrl: renesas: rzg2l: Add suspend/resume support for pull up/down Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 05/27] reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 06/27] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S support Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 07/27] reset: rzg2l-usbphy-ctrl: Add support for RZ/G3S SoC Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 08/27] reset: rzg2l-usbphy-ctrl: Fix a NULL vs IS_ERR() bug in probe Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 09/27] reset: rzg2l-usbphy-ctrl: Propagate the return value of regmap_field_update_bits() Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 10/27] reset: rzg2l-usbphy-ctrl: Add suspend/resume support Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 11/27] reset: rzg2l-usbphy-ctrl: Check pwrrdy is valid before using it Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 12/27] usb: host: Do not check priv->clks[clk] Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 13/27] usb: host: ehci-platform: Call reset assert/deassert on suspend/resume Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 14/27] usb: host: ohci-platform: " Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 15/27] dt-bindings: usb: renesas,usbhs: Document RZ/G3S SoC Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 16/27] usb: renesas_usbhs: Assert/de-assert reset signals on suspend/resume Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 17/27] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S phy bindings Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 18/27] dt-bindings: phy: renesas,usb2-phy: Mark resets as required for RZ/G3S Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 19/27] phy: renesas: rcar-gen3-usb2: Add support to initialize the bus Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 20/27] phy: renesas: rcar-gen3-usb2: Add support for the RZ/G3S SoC Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 21/27] phy: renesas: rcar-gen3-usb2: store drvdata pointer in channel Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 22/27] phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe() Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 23/27] phy: renesas: rcar-gen3-usb2: Move phy_data->init_bus check Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 24/27] phy: renesas: rcar-gen3-usb2: Add suspend/resume support Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 25/27] arm64: dts: renesas: r9a08g045: Add USB support Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 26/27] arm64: dts: renesas: rzg3s-smarc: Enable " Claudiu Beznea
2026-07-08  8:10 ` [PATCH 5.10.y-cip v2 27/27] usb: renesas: Suppress binding attributes Claudiu Beznea
2026-07-27 12:40 ` [PATCH 5.10.y-cip v2 00/27] Backport RZ/G3S USB support Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.