* [PATCH 0/3] usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support
@ 2025-11-19 19:30 Radhey Shyam Pandey
2025-11-19 19:30 ` [PATCH 1/3] dt-bindings: usb: dwc3-xilinx: Add MMI USB support on Versal Gen2 platform Radhey Shyam Pandey
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Radhey Shyam Pandey @ 2025-11-19 19:30 UTC (permalink / raw)
To: gregkh, robh, krzk+dt, conor+dt, michal.simek, Thinh.Nguyen, p.zabel
Cc: linux-usb, devicetree, linux-arm-kernel, linux-kernel, git,
Radhey Shyam Pandey
usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support
This series introduces support for the Multi-Media Integrated (MMI) USB
3.2 Dual-Role Device (DRD) controller on Xilinx Versal2 platforms.
The controller supports SSP(10-Gbps), SuperSpeed, high-speed, full-speed
and low-speed operation modes.
USB2 and USB3 PHY support Physical connectivity via the Type-C
connectivity. DWC3 wrapper IP IO space is in SLCR so reg is made
optional.
The driver is required for the clock, reset and platform specific
initialization (coherency/TX_DEEMPH etc). In this initial version
typec reversibility is not implemented and it is assumed that USB3
PHY TCA mux programming is done by MMI configuration data object
(CDOs) and TI PD controller is configured using external tiva
programmer on VEK385 evaluation board.
This patch series depend upon[1]
[1]: https://lore.kernel.org/all/20251114123239.1929255-1-radhey.shyam.pandey@amd.com
Radhey Shyam Pandey (3):
dt-bindings: usb: dwc3-xilinx: Add MMI USB support on Versal Gen2
platform
usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support
usb: dwc3: xilinx: Add support to program MMI USB TX deemphasis
.../devicetree/bindings/usb/dwc3-xilinx.yaml | 19 ++++-
drivers/usb/dwc3/core.c | 17 ++++
drivers/usb/dwc3/core.h | 7 ++
drivers/usb/dwc3/dwc3-xilinx.c | 77 ++++++++++++++++---
4 files changed, 106 insertions(+), 14 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] dt-bindings: usb: dwc3-xilinx: Add MMI USB support on Versal Gen2 platform
2025-11-19 19:30 [PATCH 0/3] usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support Radhey Shyam Pandey
@ 2025-11-19 19:30 ` Radhey Shyam Pandey
2025-11-20 8:17 ` Krzysztof Kozlowski
2025-11-19 19:30 ` [PATCH 2/3] usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support Radhey Shyam Pandey
2025-11-19 19:30 ` [PATCH 3/3] usb: dwc3: xilinx: Add support to program MMI USB TX deemphasis Radhey Shyam Pandey
2 siblings, 1 reply; 7+ messages in thread
From: Radhey Shyam Pandey @ 2025-11-19 19:30 UTC (permalink / raw)
To: gregkh, robh, krzk+dt, conor+dt, michal.simek, Thinh.Nguyen, p.zabel
Cc: linux-usb, devicetree, linux-arm-kernel, linux-kernel, git,
Radhey Shyam Pandey
Versal Gen2 platform multimedia integrated (MMI) module has a USB3.2 Gen
2x1 Dual Role Device IP. Introduce a new compatibility string to support
it and make reg optional as the register space for USB wrapper IP is moved
to MMI System-Level Control registers.
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
---
.../devicetree/bindings/usb/dwc3-xilinx.yaml | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml b/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
index d6823ef5f9a7..502294649a6b 100644
--- a/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
+++ b/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
@@ -15,6 +15,7 @@ properties:
- enum:
- xlnx,zynqmp-dwc3
- xlnx,versal-dwc3
+ - xlnx,versal2-mmi-dwc3
reg:
maxItems: 1
@@ -37,8 +38,9 @@ properties:
A list of phandle and clock-specifier pairs for the clocks
listed in clock-names.
items:
- - description: Master/Core clock, has to be >= 125 MHz
- for SS operation and >= 60MHz for HS operation.
+ - description: Master/Core clock, has to be >= 156.25MHz in SSP
+ mode, >= 125 MHz for SS operation and >= 60MHz for HS
+ operation.
- description: Clock source to core during PHY power down.
clock-names:
@@ -87,7 +89,6 @@ patternProperties:
required:
- compatible
- - reg
- "#address-cells"
- "#size-cells"
- ranges
@@ -104,6 +105,7 @@ allOf:
contains:
enum:
- xlnx,versal-dwc3
+ - xlnx,versal2-mmi-dwc3
then:
properties:
resets:
@@ -117,6 +119,17 @@ allOf:
reset-names:
minItems: 3
+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - xlnx,zynqmp-dwc3
+ - xlnx,versal-dwc3
+then:
+ required:
+ - reg
+
additionalProperties: false
examples:
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support
2025-11-19 19:30 [PATCH 0/3] usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support Radhey Shyam Pandey
2025-11-19 19:30 ` [PATCH 1/3] dt-bindings: usb: dwc3-xilinx: Add MMI USB support on Versal Gen2 platform Radhey Shyam Pandey
@ 2025-11-19 19:30 ` Radhey Shyam Pandey
2025-11-19 19:30 ` [PATCH 3/3] usb: dwc3: xilinx: Add support to program MMI USB TX deemphasis Radhey Shyam Pandey
2 siblings, 0 replies; 7+ messages in thread
From: Radhey Shyam Pandey @ 2025-11-19 19:30 UTC (permalink / raw)
To: gregkh, robh, krzk+dt, conor+dt, michal.simek, Thinh.Nguyen, p.zabel
Cc: linux-usb, devicetree, linux-arm-kernel, linux-kernel, git,
Radhey Shyam Pandey
Multi-media integrated (MMI) USB3.2 DRD IP is usb3.1 gen2 controller
which support following speed SSP (10-Gbps), SuperSpeed(5-Gbps),
high-speed(480-Mbps), full-speed(12-Mbps), and low-speed(1.5-Mbps)
operation modes.
USB2 and USB3 PHY support Physical connectivity via the Type-C
connectivity. DWC3 wrapper IP IO space is in SLCR so reg is made
optional.
The driver is required for the clock, reset and platform specific
initialization. In this initial version typec reversibility is not
implemented and it is assumed that USB3 PHY TCA mux programming is
done by MMI configuration data object (CDOs) and TI PD controller
is configured using external tiva programmer on VEK385 evaluation
board.
Tested host mode with mass storage device.
Bus 002 Device 002: ID 0951:177f
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0003
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
---
drivers/usb/dwc3/dwc3-xilinx.c | 70 +++++++++++++++++++++++++++++-----
1 file changed, 60 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c
index 1e28d6f50ed0..32f87a238d0e 100644
--- a/drivers/usb/dwc3/dwc3-xilinx.c
+++ b/drivers/usb/dwc3/dwc3-xilinx.c
@@ -46,10 +46,15 @@ struct dwc3_xlnx {
struct clk_bulk_data *clks;
struct device *dev;
void __iomem *regs;
- int (*pltfm_init)(struct dwc3_xlnx *data);
+ const struct dwc3_xlnx_config *dwc3_config;
struct phy *usb3_phy;
};
+struct dwc3_xlnx_config {
+ int (*pltfm_init)(struct dwc3_xlnx *data);
+ bool map_resource;
+};
+
static void dwc3_xlnx_mask_phy_rst(struct dwc3_xlnx *priv_data, bool mask)
{
u32 reg;
@@ -86,6 +91,29 @@ static void dwc3_xlnx_set_coherency(struct dwc3_xlnx *priv_data, u32 coherency_o
}
}
+static int dwc3_xlnx_init_versal2(struct dwc3_xlnx *priv_data)
+{
+ struct device *dev = priv_data->dev;
+ struct reset_control *crst;
+ int ret;
+
+ crst = devm_reset_control_get_optional_exclusive(dev, NULL);
+ if (IS_ERR(crst))
+ return dev_err_probe(dev, PTR_ERR(crst),
+ "failed to get reset signal\n");
+
+ /* Assert and De-assert reset */
+ ret = reset_control_assert(crst);
+ if (ret < 0)
+ return dev_err_probe(dev, ret, "failed to assert Reset\n");
+
+ ret = reset_control_deassert(crst);
+ if (ret < 0)
+ return dev_err_probe(dev, ret, "failed to De-assert Reset\n");
+
+ return 0;
+}
+
static int dwc3_xlnx_init_versal(struct dwc3_xlnx *priv_data)
{
struct device *dev = priv_data->dev;
@@ -244,14 +272,32 @@ static int dwc3_xlnx_init_zynqmp(struct dwc3_xlnx *priv_data)
return ret;
}
+static const struct dwc3_xlnx_config zynqmp_config = {
+ .pltfm_init = dwc3_xlnx_init_zynqmp,
+ .map_resource = true,
+};
+
+static const struct dwc3_xlnx_config versal_config = {
+ .pltfm_init = dwc3_xlnx_init_versal,
+ .map_resource = true,
+};
+
+static const struct dwc3_xlnx_config versal2_config = {
+ .pltfm_init = dwc3_xlnx_init_versal2,
+};
+
static const struct of_device_id dwc3_xlnx_of_match[] = {
{
.compatible = "xlnx,zynqmp-dwc3",
- .data = &dwc3_xlnx_init_zynqmp,
+ .data = &zynqmp_config,
},
{
.compatible = "xlnx,versal-dwc3",
- .data = &dwc3_xlnx_init_versal,
+ .data = &versal_config,
+ },
+ {
+ .compatible = "xlnx,versal2-mmi-dwc3",
+ .data = &versal2_config,
},
{ /* Sentinel */ }
};
@@ -295,14 +341,18 @@ static int dwc3_xlnx_probe(struct platform_device *pdev)
if (!priv_data)
return -ENOMEM;
- regs = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(regs))
- return dev_err_probe(dev, PTR_ERR(regs), "failed to map registers\n");
-
match = of_match_node(dwc3_xlnx_of_match, pdev->dev.of_node);
- priv_data->pltfm_init = match->data;
- priv_data->regs = regs;
+ priv_data->dwc3_config = match->data;
+
+ if (priv_data->dwc3_config->map_resource) {
+ regs = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(regs))
+ return dev_err_probe(dev, PTR_ERR(regs),
+ "failed to map registers\n");
+ priv_data->regs = regs;
+ }
+
priv_data->dev = dev;
platform_set_drvdata(pdev, priv_data);
@@ -317,7 +367,7 @@ static int dwc3_xlnx_probe(struct platform_device *pdev)
if (ret)
return ret;
- ret = priv_data->pltfm_init(priv_data);
+ ret = priv_data->dwc3_config->pltfm_init(priv_data);
if (ret)
goto err_clk_put;
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] usb: dwc3: xilinx: Add support to program MMI USB TX deemphasis
2025-11-19 19:30 [PATCH 0/3] usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support Radhey Shyam Pandey
2025-11-19 19:30 ` [PATCH 1/3] dt-bindings: usb: dwc3-xilinx: Add MMI USB support on Versal Gen2 platform Radhey Shyam Pandey
2025-11-19 19:30 ` [PATCH 2/3] usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support Radhey Shyam Pandey
@ 2025-11-19 19:30 ` Radhey Shyam Pandey
2025-11-20 8:19 ` Krzysztof Kozlowski
2 siblings, 1 reply; 7+ messages in thread
From: Radhey Shyam Pandey @ 2025-11-19 19:30 UTC (permalink / raw)
To: gregkh, robh, krzk+dt, conor+dt, michal.simek, Thinh.Nguyen, p.zabel
Cc: linux-usb, devicetree, linux-arm-kernel, linux-kernel, git,
Radhey Shyam Pandey
Introduces support for programming the 18-bit TX Deemphasis value that
drives the pipe_TxDeemph signal, as defined in the PIPE4 specification.
The configured value is recommended by Synopsys and is intended for
standard (non-compliance) operation. These Gen2 equalization settings
have been validated through both internal and external compliance
testing. By applying this setting, the stability of USB 3.2 enumeration
is improved and now SuperSpeedPlus devices are consistently recognized as
USB 3.2 Gen 2 by the MMI USB Host controller.
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
---
drivers/usb/dwc3/core.c | 17 +++++++++++++++++
drivers/usb/dwc3/core.h | 7 +++++++
drivers/usb/dwc3/dwc3-xilinx.c | 7 ++++++-
3 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 7b84512b13a2..cb737aee316e 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -647,6 +647,15 @@ static void dwc3_config_soc_bus(struct dwc3 *dwc)
reg |= DWC3_GSBUSCFG0_REQINFO(dwc->gsbuscfg0_reqinfo);
dwc3_writel(dwc->regs, DWC3_GSBUSCFG0, reg);
}
+
+ if (dwc->csr_tx_deemph_field_1 != DWC3_LCSR_TX_DEEMPH_UNSPECIFIED) {
+ u32 reg;
+
+ reg = dwc3_readl(dwc->regs, DWC3_LCSR_TX_DEEMPH);
+ reg &= ~DWC3_LCSR_TX_DEEMPH_MASK(~0);
+ reg |= DWC3_LCSR_TX_DEEMPH_MASK(dwc->csr_tx_deemph_field_1);
+ dwc3_writel(dwc->regs, DWC3_LCSR_TX_DEEMPH, reg);
+ }
}
static int dwc3_core_ulpi_init(struct dwc3 *dwc)
@@ -1674,11 +1683,13 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
static void dwc3_get_software_properties(struct dwc3 *dwc,
const struct dwc3_properties *properties)
{
+ u32 csr_tx_deemph_field_1;
struct device *tmpdev;
u16 gsbuscfg0_reqinfo;
int ret;
dwc->gsbuscfg0_reqinfo = DWC3_GSBUSCFG0_REQINFO_UNSPECIFIED;
+ dwc->csr_tx_deemph_field_1 = DWC3_LCSR_TX_DEEMPH_UNSPECIFIED;
if (properties->gsbuscfg0_reqinfo !=
DWC3_GSBUSCFG0_REQINFO_UNSPECIFIED) {
@@ -1696,6 +1707,12 @@ static void dwc3_get_software_properties(struct dwc3 *dwc,
&gsbuscfg0_reqinfo);
if (!ret)
dwc->gsbuscfg0_reqinfo = gsbuscfg0_reqinfo;
+
+ ret = device_property_read_u32(tmpdev,
+ "snps,lcsr_tx_deemph",
+ &csr_tx_deemph_field_1);
+ if (!ret)
+ dwc->csr_tx_deemph_field_1 = csr_tx_deemph_field_1;
}
}
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index a5fc92c4ffa3..32205f435b5b 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -181,6 +181,7 @@
#define DWC3_LLUCTL(n) (0xd024 + ((n) * 0x80))
+#define DWC3_LCSR_TX_DEEMPH 0xd060
/* Bit fields */
/* Global SoC Bus Configuration INCRx Register 0 */
@@ -198,6 +199,10 @@
#define DWC3_GSBUSCFG0_REQINFO(n) (((n) & 0xffff) << 16)
#define DWC3_GSBUSCFG0_REQINFO_UNSPECIFIED 0xffffffff
+/* LCSR_TX_DEEMPH Register: setting TX deemphasis used in normal operation in gen2 */
+#define DWC3_LCSR_TX_DEEMPH_MASK(n) ((n) & 0x3ffff)
+#define DWC3_LCSR_TX_DEEMPH_UNSPECIFIED 0xffffffff
+
/* Global Debug LSP MUX Select */
#define DWC3_GDBGLSPMUX_ENDBC BIT(15) /* Host only */
#define DWC3_GDBGLSPMUX_HOSTSELECT(n) ((n) & 0x3fff)
@@ -1180,6 +1185,7 @@ struct dwc3_glue_ops {
* @wakeup_pending_funcs: Indicates whether any interface has requested for
* function wakeup in bitmap format where bit position
* represents interface_id.
+ * @csr_tx_deemph_field_1: stores TX deemphasis used in Gen2 operation.
*/
struct dwc3 {
struct work_struct drd_work;
@@ -1414,6 +1420,7 @@ struct dwc3 {
struct dentry *debug_root;
u32 gsbuscfg0_reqinfo;
u32 wakeup_pending_funcs;
+ u32 csr_tx_deemph_field_1;
};
#define INCRX_BURST_MODE 0
diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c
index 32f87a238d0e..85bc4ab461fd 100644
--- a/drivers/usb/dwc3/dwc3-xilinx.c
+++ b/drivers/usb/dwc3/dwc3-xilinx.c
@@ -40,6 +40,7 @@
#define PIPE_CLK_SELECT 0
#define XLNX_USB_FPD_POWER_PRSNT 0x80
#define FPD_POWER_PRSNT_OPTION BIT(0)
+#define XLNX_MMI_USB_TX_DEEMPH_DEF 0x8c45
struct dwc3_xlnx {
int num_clocks;
@@ -306,7 +307,7 @@ MODULE_DEVICE_TABLE(of, dwc3_xlnx_of_match);
static int dwc3_set_swnode(struct device *dev)
{
struct device_node *np = dev->of_node, *dwc3_np;
- struct property_entry props[2];
+ struct property_entry props[3];
int prop_idx = 0, ret = 0;
dwc3_np = of_get_compatible_child(np, "snps,dwc3");
@@ -320,6 +321,10 @@ static int dwc3_set_swnode(struct device *dev)
if (of_dma_is_coherent(dwc3_np))
props[prop_idx++] = PROPERTY_ENTRY_U16("snps,gsbuscfg0-reqinfo",
0xffff);
+ if (of_device_is_compatible(np, "xlnx,versal2-mmi-dwc3"))
+ props[prop_idx++] = PROPERTY_ENTRY_U32("snps,lcsr_tx_deemph",
+ XLNX_MMI_USB_TX_DEEMPH_DEF);
+
of_node_put(dwc3_np);
if (prop_idx)
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: usb: dwc3-xilinx: Add MMI USB support on Versal Gen2 platform
2025-11-19 19:30 ` [PATCH 1/3] dt-bindings: usb: dwc3-xilinx: Add MMI USB support on Versal Gen2 platform Radhey Shyam Pandey
@ 2025-11-20 8:17 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-20 8:17 UTC (permalink / raw)
To: Radhey Shyam Pandey
Cc: gregkh, robh, krzk+dt, conor+dt, michal.simek, Thinh.Nguyen,
p.zabel, linux-usb, devicetree, linux-arm-kernel, linux-kernel,
git
On Thu, Nov 20, 2025 at 01:00:34AM +0530, Radhey Shyam Pandey wrote:
> Versal Gen2 platform multimedia integrated (MMI) module has a USB3.2 Gen
> 2x1 Dual Role Device IP. Introduce a new compatibility string to support
> it and make reg optional as the register space for USB wrapper IP is moved
> to MMI System-Level Control registers.
>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
> ---
> .../devicetree/bindings/usb/dwc3-xilinx.yaml | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml b/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
> index d6823ef5f9a7..502294649a6b 100644
> --- a/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
> +++ b/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
> @@ -15,6 +15,7 @@ properties:
> - enum:
> - xlnx,zynqmp-dwc3
> - xlnx,versal-dwc3
> + - xlnx,versal2-mmi-dwc3
All other cases were calling your SoC "versal2", not "versal2-mmi".
Add here missing blank line.
> reg:
> maxItems: 1
>
> @@ -37,8 +38,9 @@ properties:
> A list of phandle and clock-specifier pairs for the clocks
> listed in clock-names.
> items:
> - - description: Master/Core clock, has to be >= 125 MHz
> - for SS operation and >= 60MHz for HS operation.
> + - description: Master/Core clock, has to be >= 156.25MHz in SSP
> + mode, >= 125 MHz for SS operation and >= 60MHz for HS
> + operation.
> - description: Clock source to core during PHY power down.
>
> clock-names:
> @@ -87,7 +89,6 @@ patternProperties:
>
> required:
> - compatible
> - - reg
Hm? No. Block without address space makes little sense and is completely
different device.
Look at this binding - there is no way this device can be programmed
anywhow, because mentionned MMI sys registers are not there.
This is a messy, incomplete and confusing change. We ask always to post
complete bindings, for complete hardware, so put attention to this.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] usb: dwc3: xilinx: Add support to program MMI USB TX deemphasis
2025-11-19 19:30 ` [PATCH 3/3] usb: dwc3: xilinx: Add support to program MMI USB TX deemphasis Radhey Shyam Pandey
@ 2025-11-20 8:19 ` Krzysztof Kozlowski
2025-11-20 9:05 ` Pandey, Radhey Shyam
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-20 8:19 UTC (permalink / raw)
To: Radhey Shyam Pandey
Cc: gregkh, robh, krzk+dt, conor+dt, michal.simek, Thinh.Nguyen,
p.zabel, linux-usb, devicetree, linux-arm-kernel, linux-kernel,
git
On Thu, Nov 20, 2025 at 01:00:36AM +0530, Radhey Shyam Pandey wrote:
> struct dwc3_xlnx {
> int num_clocks;
> @@ -306,7 +307,7 @@ MODULE_DEVICE_TABLE(of, dwc3_xlnx_of_match);
> static int dwc3_set_swnode(struct device *dev)
> {
> struct device_node *np = dev->of_node, *dwc3_np;
> - struct property_entry props[2];
> + struct property_entry props[3];
> int prop_idx = 0, ret = 0;
>
> dwc3_np = of_get_compatible_child(np, "snps,dwc3");
> @@ -320,6 +321,10 @@ static int dwc3_set_swnode(struct device *dev)
> if (of_dma_is_coherent(dwc3_np))
> props[prop_idx++] = PROPERTY_ENTRY_U16("snps,gsbuscfg0-reqinfo",
> 0xffff);
> + if (of_device_is_compatible(np, "xlnx,versal2-mmi-dwc3"))
Don't sprinkle compatibles all over the code - it does not scale. You
have driver match data for that.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH 3/3] usb: dwc3: xilinx: Add support to program MMI USB TX deemphasis
2025-11-20 8:19 ` Krzysztof Kozlowski
@ 2025-11-20 9:05 ` Pandey, Radhey Shyam
0 siblings, 0 replies; 7+ messages in thread
From: Pandey, Radhey Shyam @ 2025-11-20 9:05 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: gregkh, robh, krzk+dt, conor+dt, Simek, Michal, Thinh.Nguyen,
p.zabel, linux-usb, devicetree, linux-arm-kernel, linux-kernel,
git (AMD-Xilinx)
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Thursday, November 20, 2025 1:50 PM
> To: Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>
> Cc: gregkh@linuxfoundation.org; robh@kernel.org; krzk+dt@kernel.org;
> conor+dt@kernel.org; Simek, Michal <michal.simek@amd.com>;
> Thinh.Nguyen@synopsys.com; p.zabel@pengutronix.de; linux-usb@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; git (AMD-Xilinx) <git@amd.com>
> Subject: Re: [PATCH 3/3] usb: dwc3: xilinx: Add support to program MMI USB TX
> deemphasis
>
> On Thu, Nov 20, 2025 at 01:00:36AM +0530, Radhey Shyam Pandey wrote:
> > struct dwc3_xlnx {
> > int num_clocks;
> > @@ -306,7 +307,7 @@ MODULE_DEVICE_TABLE(of, dwc3_xlnx_of_match);
> > static int dwc3_set_swnode(struct device *dev) {
> > struct device_node *np = dev->of_node, *dwc3_np;
> > - struct property_entry props[2];
> > + struct property_entry props[3];
> > int prop_idx = 0, ret = 0;
> >
> > dwc3_np = of_get_compatible_child(np, "snps,dwc3"); @@ -320,6
> > +321,10 @@ static int dwc3_set_swnode(struct device *dev)
> > if (of_dma_is_coherent(dwc3_np))
> > props[prop_idx++] = PROPERTY_ENTRY_U16("snps,gsbuscfg0-
> reqinfo",
> > 0xffff);
> > + if (of_device_is_compatible(np, "xlnx,versal2-mmi-dwc3"))
>
> Don't sprinkle compatibles all over the code - it does not scale. You have driver
> match data for that.
Sure, in v2 will use match data flag to specify if TX deemphasis need
to be reprogrammed.
Thanks,
Radhey
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-11-20 9:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-19 19:30 [PATCH 0/3] usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support Radhey Shyam Pandey
2025-11-19 19:30 ` [PATCH 1/3] dt-bindings: usb: dwc3-xilinx: Add MMI USB support on Versal Gen2 platform Radhey Shyam Pandey
2025-11-20 8:17 ` Krzysztof Kozlowski
2025-11-19 19:30 ` [PATCH 2/3] usb: dwc3: xilinx: Add Versal2 MMI USB 3.2 controller support Radhey Shyam Pandey
2025-11-19 19:30 ` [PATCH 3/3] usb: dwc3: xilinx: Add support to program MMI USB TX deemphasis Radhey Shyam Pandey
2025-11-20 8:19 ` Krzysztof Kozlowski
2025-11-20 9:05 ` Pandey, Radhey Shyam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®