* [PATCH v7 1/2] dt-bindings: mux: Remove nodename pattern constraints
2026-01-29 16:48 [PATCH v7 0/2] Add USB2.0 support for RZ/G3E Tommaso Merciai
@ 2026-01-29 16:48 ` Tommaso Merciai
2026-03-05 2:37 ` Rob Herring
2026-01-29 16:48 ` [PATCH v7 2/2] mux: Add driver for Renesas RZ/V2H USB VBENCTL VBUS_SEL mux Tommaso Merciai
2026-02-09 14:20 ` [PATCH v7 0/2] Add USB2.0 support for RZ/G3E Tommaso Merciai
2 siblings, 1 reply; 5+ messages in thread
From: Tommaso Merciai @ 2026-01-29 16:48 UTC (permalink / raw)
To: tomm.merciai, p.zabel
Cc: linux-renesas-soc, biju.das.jz, Tommaso Merciai, Peter Rosin,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sebastian Reichel,
Andi Shyti, Uwe Kleine-König, Arnd Bergmann,
Greg Kroah-Hartman, devicetree, linux-kernel, Conor Dooley
The nodename pattern in created an unnecessary restriction that forced
all mux nodes to be named with the 'mux-controller' prefix.
This prevented valid use cases where mux functionality is part of other
hardware blocks that should use more specific naming conventions.
Remove the $nodename pattern constraints from both the 'select' keyword
and the properties section of the mux-controller schema.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
---
v6->v7:
- No changes.
v5->v6:
- No changes.
v4->v5:
- Added Reviewed-by tag from Conor Dooley.
v3->v4:
- New patch.
Documentation/devicetree/bindings/mux/mux-controller.yaml | 6 ------
1 file changed, 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/mux/mux-controller.yaml b/Documentation/devicetree/bindings/mux/mux-controller.yaml
index 78340bbe4df6..6defb9da10f7 100644
--- a/Documentation/devicetree/bindings/mux/mux-controller.yaml
+++ b/Documentation/devicetree/bindings/mux/mux-controller.yaml
@@ -63,18 +63,12 @@ description: |
select:
anyOf:
- - properties:
- $nodename:
- pattern: '^mux-controller'
- required:
- '#mux-control-cells'
- required:
- '#mux-state-cells'
properties:
- $nodename:
- pattern: '^mux-controller(@.*|-([0-9]|[1-9][0-9]+))?$'
-
'#mux-control-cells':
enum: [ 0, 1 ]
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v7 1/2] dt-bindings: mux: Remove nodename pattern constraints
2026-01-29 16:48 ` [PATCH v7 1/2] dt-bindings: mux: Remove nodename pattern constraints Tommaso Merciai
@ 2026-03-05 2:37 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2026-03-05 2:37 UTC (permalink / raw)
To: Tommaso Merciai
Cc: tomm.merciai, p.zabel, linux-renesas-soc, biju.das.jz,
Peter Rosin, Krzysztof Kozlowski, Conor Dooley, Sebastian Reichel,
Andi Shyti, Uwe Kleine-König, Arnd Bergmann,
Greg Kroah-Hartman, devicetree, linux-kernel, Conor Dooley
On Thu, Jan 29, 2026 at 05:48:48PM +0100, Tommaso Merciai wrote:
> The nodename pattern in created an unnecessary restriction that forced
> all mux nodes to be named with the 'mux-controller' prefix.
> This prevented valid use cases where mux functionality is part of other
> hardware blocks that should use more specific naming conventions.
>
> Remove the $nodename pattern constraints from both the 'select' keyword
> and the properties section of the mux-controller schema.
>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> ---
> v6->v7:
> - No changes.
>
> v5->v6:
> - No changes.
>
> v4->v5:
> - Added Reviewed-by tag from Conor Dooley.
>
> v3->v4:
> - New patch.
>
> Documentation/devicetree/bindings/mux/mux-controller.yaml | 6 ------
> 1 file changed, 6 deletions(-)
Applied, because someone else needs the same thing now and it is
independent from the rest of the series.
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v7 2/2] mux: Add driver for Renesas RZ/V2H USB VBENCTL VBUS_SEL mux
2026-01-29 16:48 [PATCH v7 0/2] Add USB2.0 support for RZ/G3E Tommaso Merciai
2026-01-29 16:48 ` [PATCH v7 1/2] dt-bindings: mux: Remove nodename pattern constraints Tommaso Merciai
@ 2026-01-29 16:48 ` Tommaso Merciai
2026-02-09 14:20 ` [PATCH v7 0/2] Add USB2.0 support for RZ/G3E Tommaso Merciai
2 siblings, 0 replies; 5+ messages in thread
From: Tommaso Merciai @ 2026-01-29 16:48 UTC (permalink / raw)
To: tomm.merciai, p.zabel
Cc: linux-renesas-soc, biju.das.jz, Tommaso Merciai, Peter Rosin,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sebastian Reichel,
Andi Shyti, Uwe Kleine-König, Arnd Bergmann,
Greg Kroah-Hartman, devicetree, linux-kernel
As per the RZ/V2H(P) HW manual, VBUSEN can be controlled by the VBUS_SEL
bit of the VBENCTL Control Register. This register is mapped in the
reset framework. The reset driver expose this register as mux-controller
and instantiates this driver. The consumer will use the mux API to
control the VBUS_SEL bit.
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
---
v6->v7:
- No changes.
v5->v6:
- No changes.
v4->v5:
- Changed file name to rzv2h-usb-vbenctl.c and Fixed
Makefile, Kconfig, function names accordingly.
- Changed driver .name to "vbenctl" and fix auxiliary_device_id name.
- Updated commit msg.
v3->v4:
- Removed mux_chip->dev.of_node not needed.
v2->v3:
- Added mux_chip->dev.of_node = dev->of_node->child as the mux-controller
is an internal node.
- Fixed auxiliary_device_id name.
- Get rdev using from platform_data.
- Drop struct auxiliary_device adev from reset_rzv2h_usb2phy_adev
as it is needed.
- Drop to_reset_rzv2h_usb2phy_adev() as it is not needed.
v1->v2:
- New patch
drivers/mux/Kconfig | 11 +++
drivers/mux/Makefile | 2 +
drivers/mux/rzv2h-usb-vbenctl.c | 97 +++++++++++++++++++++++
include/linux/reset/reset_rzv2h_usb2phy.h | 11 +++
4 files changed, 121 insertions(+)
create mode 100644 drivers/mux/rzv2h-usb-vbenctl.c
create mode 100644 include/linux/reset/reset_rzv2h_usb2phy.h
diff --git a/drivers/mux/Kconfig b/drivers/mux/Kconfig
index c68132e38138..3692f3e466a9 100644
--- a/drivers/mux/Kconfig
+++ b/drivers/mux/Kconfig
@@ -59,4 +59,15 @@ config MUX_MMIO
To compile the driver as a module, choose M here: the module will
be called mux-mmio.
+config MUX_RZV2H_USB_VBENCTL
+ tristate "Renesas RZ/V2H USB VBENCTL VBUS_SEL mux driver"
+ depends on RESET_RZV2H_USB2PHY || COMPILE_TEST
+ depends on OF
+ select REGMAP_MMIO
+ select AUXILIARY_BUS
+ default RESET_RZV2H_USB2PHY
+ help
+ Support for USB VBENCTL VBUS_SEL mux implemented on Renesas
+ RZ/V2H SoCs.
+
endmenu
diff --git a/drivers/mux/Makefile b/drivers/mux/Makefile
index 6e9fa47daf56..3bd9b3846835 100644
--- a/drivers/mux/Makefile
+++ b/drivers/mux/Makefile
@@ -8,9 +8,11 @@ mux-adg792a-objs := adg792a.o
mux-adgs1408-objs := adgs1408.o
mux-gpio-objs := gpio.o
mux-mmio-objs := mmio.o
+mux-rzv2h-usb-vbenctl-objs := rzv2h-usb-vbenctl.o
obj-$(CONFIG_MULTIPLEXER) += mux-core.o
obj-$(CONFIG_MUX_ADG792A) += mux-adg792a.o
obj-$(CONFIG_MUX_ADGS1408) += mux-adgs1408.o
obj-$(CONFIG_MUX_GPIO) += mux-gpio.o
obj-$(CONFIG_MUX_MMIO) += mux-mmio.o
+obj-$(CONFIG_MUX_RZV2H_USB_VBENCTL) += mux-rzv2h-usb-vbenctl.o
diff --git a/drivers/mux/rzv2h-usb-vbenctl.c b/drivers/mux/rzv2h-usb-vbenctl.c
new file mode 100644
index 000000000000..f15d648bd4d6
--- /dev/null
+++ b/drivers/mux/rzv2h-usb-vbenctl.c
@@ -0,0 +1,97 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Renesas RZ/V2H(P) USB VBENCTL VBUS_SEL mux driver
+ *
+ * Copyright (C) 2025 Renesas Electronics Corp.
+ */
+
+#include <linux/auxiliary_bus.h>
+#include <linux/bitops.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/mux/driver.h>
+#include <linux/of.h>
+#include <linux/property.h>
+#include <linux/regmap.h>
+#include <linux/reset/reset_rzv2h_usb2phy.h>
+
+#define RZV2H_VBENCTL 0xf0c
+
+struct mux_rzv2h_usb_vbenctl_priv {
+ struct regmap_field *field;
+};
+
+static int mux_rzv2h_usb_vbenctl_set(struct mux_control *mux, int state)
+{
+ struct mux_rzv2h_usb_vbenctl_priv *priv = mux_chip_priv(mux->chip);
+
+ return regmap_field_write(priv->field, state);
+}
+
+static const struct mux_control_ops mux_rzv2h_usb_vbenctl_ops = {
+ .set = mux_rzv2h_usb_vbenctl_set,
+};
+
+static const struct regmap_config rzv2h_usb_vbenctl_regconf = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+ .max_register = RZV2H_VBENCTL,
+};
+
+static int mux_rzv2h_usb_vbenctl_probe(struct auxiliary_device *adev,
+ const struct auxiliary_device_id *id)
+{
+ struct reset_rzv2h_usb2phy_adev *rdev = adev->dev.platform_data;
+ struct mux_rzv2h_usb_vbenctl_priv *priv;
+ struct device *dev = &adev->dev;
+ struct mux_chip *mux_chip;
+ struct regmap *regmap;
+ struct reg_field reg_field = {
+ .reg = RZV2H_VBENCTL,
+ .lsb = 0,
+ .msb = 0,
+ };
+ int ret;
+
+ regmap = devm_regmap_init_mmio(dev, rdev->base, &rzv2h_usb_vbenctl_regconf);
+ if (IS_ERR(regmap))
+ return PTR_ERR(regmap);
+
+ mux_chip = devm_mux_chip_alloc(dev, 1, sizeof(*priv));
+ if (IS_ERR(mux_chip))
+ return PTR_ERR(mux_chip);
+
+ priv = mux_chip_priv(mux_chip);
+
+ priv->field = devm_regmap_field_alloc(dev, regmap, reg_field);
+ if (IS_ERR(priv->field))
+ return PTR_ERR(priv->field);
+
+ mux_chip->ops = &mux_rzv2h_usb_vbenctl_ops;
+ mux_chip->mux[0].states = 2;
+ mux_chip->mux[0].idle_state = MUX_IDLE_AS_IS;
+
+ ret = devm_mux_chip_register(dev, mux_chip);
+ if (ret < 0)
+ return dev_err_probe(dev, ret, "Failed to register mux chip\n");
+
+ return 0;
+}
+
+static const struct auxiliary_device_id mux_rzv2h_usb_vbenctl_ids[] = {
+ { .name = "rzv2h_usb2phy_reset.vbenctl" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(auxiliary, mux_rzv2h_usb_vbenctl_ids);
+
+static struct auxiliary_driver mux_rzv2h_usb_vbenctl_driver = {
+ .name = "vbenctl",
+ .probe = mux_rzv2h_usb_vbenctl_probe,
+ .id_table = mux_rzv2h_usb_vbenctl_ids,
+};
+module_auxiliary_driver(mux_rzv2h_usb_vbenctl_driver);
+
+MODULE_DESCRIPTION("RZ/V2H USB VBENCTL VBUS_SEL mux driver");
+MODULE_AUTHOR("Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/reset/reset_rzv2h_usb2phy.h b/include/linux/reset/reset_rzv2h_usb2phy.h
new file mode 100644
index 000000000000..06247080a66c
--- /dev/null
+++ b/include/linux/reset/reset_rzv2h_usb2phy.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _RESET_RZV2H_USB2PHY_H
+#define _RESET_RZV2H_USB2PHY_H
+
+#include <linux/auxiliary_bus.h>
+
+struct reset_rzv2h_usb2phy_adev {
+ void __iomem *base;
+};
+
+#endif
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v7 0/2] Add USB2.0 support for RZ/G3E
2026-01-29 16:48 [PATCH v7 0/2] Add USB2.0 support for RZ/G3E Tommaso Merciai
2026-01-29 16:48 ` [PATCH v7 1/2] dt-bindings: mux: Remove nodename pattern constraints Tommaso Merciai
2026-01-29 16:48 ` [PATCH v7 2/2] mux: Add driver for Renesas RZ/V2H USB VBENCTL VBUS_SEL mux Tommaso Merciai
@ 2026-02-09 14:20 ` Tommaso Merciai
2 siblings, 0 replies; 5+ messages in thread
From: Tommaso Merciai @ 2026-02-09 14:20 UTC (permalink / raw)
To: tomm.merciai, p.zabel, peda
Cc: linux-renesas-soc, biju.das.jz, Peter Rosin, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Sebastian Reichel, Andi Shyti,
Uwe Kleine-König, Arnd Bergmann, Greg Kroah-Hartman,
devicetree, linux-kernel
On Thu, Jan 29, 2026 at 05:48:47PM +0100, Tommaso Merciai wrote:
> Dear All,
>
> This series adds support for the Renesas RZ/V2H USB VBENCTL VBUS_SEL mux,
> which is required to properly manage the USB2.0 VBUS line.
>
> Splitting the series [0] into per subsystem series for easy merging.
>
> [0] https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=1035721&archive=both
>
> Thanks & Regards,
> Tommaso
Hi Peter, Philipp,
A polite reminder for this series.
Thanks & Regards,
Tommaso
>
> v6->v7:
> - Rebased on top of next-20260128
> - Splitted series into per subsystem series, no changes.
>
> v5->v6:
> - Rebased on top of next-20251219
> - Re-arranged series order per subsystem patches.
> - Patch: 3/14: Collected tag.
> - Patch: 4/14: Fixed commit message.
> - Split from dts patches will send separate series.
> - Added merge strategy in cover letter.
>
> v4->v5:
> - Rebased on top of next-20251127
> - Patch 01/22: Added Reviewed-by tag from Conor Dooley.
> - Patch 06/22: Changed file name to rzv2h-usb-vbenctl.c and Fixed
> Makefile, Kconfig, function names accordingly.
> Changed driver .name to "vbenctl" and fix auxiliary_device_id name.
> Updated commit msg.
> - Patch 07/22: Update mux_name to "vbenctl" to match the driver name.
> Updated commit message.
> - Patch 11/22: Fixed if statement for mux_state error check.
>
> v3->v4:
> - Rebased on top of next-20251121
> - Added patch 01/22 to remove nodename pattern from mux-controller schema.
> - Switch back to v2 implementation for mux controller in patches
> 5/22, 15/22, 16/22, 21/22.
> - Improved commit bodies for patches 5/22, 15/22, 16/22, 21/22.
> - Removed mux_chip->dev.of_node not needed in patch 06/22.
> - Collected CDooley tag in patch 09/22.
> - Added missing select MULTIPLEXER into Kconfig in patch 11/22.
>
> v2->v3:
> - Rebased on top of next-20251110 + [1] + [2]
> - Add missing Cc: stable@vger.kernel.org in patch 03/21
> - Patch 03/21: Added missing Cc: stable@vger.kernel.org.
> Improved commit body describing the removal of rzv2h_usbphy_assert_helper()
> from rzv2h_usb2phy_reset_probe().
> - Patch 04/21: Manipulate mux-controller as an internal node.
> Improved commit body.
> - Patch 05/21: The main driver is using now __devm_auxiliary_device_create()
> then update the aux driver accordingly.
> - Patch 06/21: Use __devm_auxiliary_device_create() to create the aux device.
> - Patch 08/21: Improved commit body and mux-states description.
> - Patch 14/21: Manipulate the mux controller as an internal node,
> and update commit body accordingly.
> - Patch 15/21: Manipulate the mux controller as an internal node,
> and update commit body accordingly.
> - Patch 20/21: Manipulate the mux controller as an internal node.
>
> v1->v2:
> - Rebased on top of next-20251103 + [1] + [2]
> - Reworked series to use mux-state for controlling VBUS_SEL
> as suggested by PZabel added also mux bindings documentation
> on phy and rst side.
> - Collected Conor Dooley tags
> - Dropped unnecessary rzv2h_usbphy_assert_helper() function from
> rzv2h_usb2phy_reset_probe()
>
> Tommaso Merciai (2):
> dt-bindings: mux: Remove nodename pattern constraints
> mux: Add driver for Renesas RZ/V2H USB VBENCTL VBUS_SEL mux
>
> .../bindings/mux/mux-controller.yaml | 6 --
> drivers/mux/Kconfig | 11 +++
> drivers/mux/Makefile | 2 +
> drivers/mux/rzv2h-usb-vbenctl.c | 97 +++++++++++++++++++
> include/linux/reset/reset_rzv2h_usb2phy.h | 11 +++
> 5 files changed, 121 insertions(+), 6 deletions(-)
> create mode 100644 drivers/mux/rzv2h-usb-vbenctl.c
> create mode 100644 include/linux/reset/reset_rzv2h_usb2phy.h
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread