Skip to contentSkip to conversation

usb: dwc3: core: add support for remapping global register start address

PATCH Superseded Stanley Chang 5 participants 21 messages Apr 12, 2023 – Apr 14, 2023

Subsystems (3)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 usb: dwc3: core: add support for remapping global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

---
 drivers/usb/dwc3/core.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
drivers/usb/dwc3/core.c +18 -0
index 476b63618511..96d3e634ebbf 100644
@@ -1785,6 +1785,24 @@ static int dwc3_probe(struct platform_device *pdev)
 	dwc_res = *res;
 	dwc_res.start += DWC3_GLOBALS_REGS_START;
 
+	/*
+	 * For some dwc3 controller, the dwc3 global register start address is
+	 * not at DWC3_GLOBALS_REGS_START (0xc100).
+	 */
+	if (dev->of_node) {
+		int global_regs_starting_offset = 0;
+
+		device_property_read_u32(dev, "snps,global-regs-starting-offset",
+				 &global_regs_starting_offset);
+		if (global_regs_starting_offset) {
+			dwc_res.start -= DWC3_GLOBALS_REGS_START;
+			dwc_res.start += global_regs_starting_offset;
+			dev_info(dev,
+			    "dwc3 global register start address from 0x%x to end 0x%x\n",
+			    (int)dwc_res.start, (int)dwc_res.end);
+		}
+	}
+
 	regs = devm_ioremap_resource(dev, &dwc_res);
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/2 usb: dwc3: core: add support for remapping global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

---
v1 to v2 change:
1. Change the name of the property "snps,global-regs-starting-offset".
2. Adjust the format of comment.
3. Add initial value of the global_regs_starting_offset
4. Remove the log of dev_info.

---
 drivers/usb/dwc3/core.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/usb/dwc3/core.c +15 -0
index 476b63618511..8c1d1afbdc65 100644
@@ -1785,6 +1785,21 @@ static int dwc3_probe(struct platform_device *pdev)
 	dwc_res = *res;
 	dwc_res.start += DWC3_GLOBALS_REGS_START;
 
+	/*
+	 * For some dwc3 controller, the dwc3 global register start address is
+	 * not at DWC3_GLOBALS_REGS_START (0xc100).
+	 */
+	if (dev->of_node) {
+		int global_regs_starting_offset = 0;
+
+		device_property_read_u32(dev, "snps,global-regs-starting-offset",
+			    &global_regs_starting_offset);
+		if (global_regs_starting_offset) {
+			dwc_res.start -= DWC3_GLOBALS_REGS_START;
+			dwc_res.start += global_regs_starting_offset;
+		}
+	}
+
 	regs = devm_ioremap_resource(dev, &dwc_res);
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);
Signature · 1 line
2.34.1
maintainer
#3 lore raw
In reply to Stanley Chang
Quoted 6 lines · Stanley Chang

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

---

Please note what changed in v2 after the --- line. Also why did you split the previous series in 2 now? It'll be confusing for us maintainers.

Quoted 10 lines
 drivers/usb/dwc3/core.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
drivers/usb/dwc3/core.c +0 -0
index 476b63618511..96d3e634ebbf 100644
@@ -1785,6 +1785,24 @@ static int dwc3_probe(struct platform_device *pdev)
 	dwc_res = *res;
 	dwc_res.start += DWC3_GLOBALS_REGS_START;

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device *pdev) · line 1796

Quoted 10 lines
drivers/usb/dwc3/core.c +9 -0
 
+	/*
+	 * For some dwc3 controller, the dwc3 global register start address is
+	 * not at DWC3_GLOBALS_REGS_START (0xc100).
+	 */
+	if (dev->of_node) {
+		int global_regs_starting_offset = 0;
+
+		device_property_read_u32(dev, "snps,global-regs-starting-offset",
+				 &global_regs_starting_offset);

I suggested to use compatible string instead since this isn't common and only unique to your platform. Any reason we shouldn't do that?

ie. something like this:

if (dev->of_node && of_device_is_compatiable(dev->of_node, "your-platform"))

	dwc_res.start += your_platform_offset;
else
	dwc_res.start = DWC3_GLOBALS_REGS_START;

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device *pdev) · line 1802

Quoted 6 lines
drivers/usb/dwc3/core.c +6 -0
+		if (global_regs_starting_offset) {
+			dwc_res.start -= DWC3_GLOBALS_REGS_START;
+			dwc_res.start += global_regs_starting_offset;
+			dev_info(dev,
+			    "dwc3 global register start address from 0x%x to end 0x%x\n",
+			    (int)dwc_res.start, (int)dwc_res.end);

Don't use dev_info when it's not needed. What you have here is for your debug purpose. Please remove.

Quoted 9 lines
drivers/usb/dwc3/core.c +3 -0
+		}
+	}
+
 	regs = devm_ioremap_resource(dev, &dwc_res);
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);
Signature · 1 line
2.34.1

Thanks,
Thinh

#4 lore raw
Quoted 6 lines · Stanley Chang
Quoted 4 lines

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

Quoted 6 lines
Quoted 2 lines

---

Please note what changed in v2 after the --- line. Also why did you split the previous series in 2 now? It'll be confusing for us maintainers.

Do you mean that to split the part of "remapping global register start address and the part of " snps,parkmode-disable-hs-quirk"?

They are different series. I just submit them at the same time.

Quoted 26 lines

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device

Quoted 8 lines
 drivers/usb/dwc3/core.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
drivers/usb/dwc3/core.c index renamed from drivers/usb/dwc3/core.c +0 -0

476b63618511..96d3e634ebbf 100644

drivers/usb/dwc3/core.c +0 -0
@@ -1785,6 +1785,24 @@ static int dwc3_probe(struct platform_device

*pdev)

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device *pdev)

Quoted 11 lines
drivers/usb/dwc3/core.c +8 -0
      dwc_res = *res;
      dwc_res.start += DWC3_GLOBALS_REGS_START;
 
+     /*
+      * For some dwc3 controller, the dwc3 global register start address is
+      * not at DWC3_GLOBALS_REGS_START (0xc100).
+      */
+     if (dev->of_node) {
+             int global_regs_starting_offset = 0;
+
+             device_property_read_u32(dev,

"snps,global-regs-starting-offset",

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device *pdev) · line 1796

Quoted 1 line
drivers/usb/dwc3/core.c +1 -0
+                              &global_regs_starting_offset);

I suggested to use compatible string instead since this isn't common and only unique to your platform. Any reason we shouldn't do that?

Quoted 7 lines

ie. something like this:

if (dev->of_node && of_device_is_compatiable(dev->of_node, "your-platform"))

        dwc_res.start += your_platform_offset; else
        dwc_res.start = DWC3_GLOBALS_REGS_START;

I will try this suggestion.

Thanks,
Stanley

#5 lore raw
In reply to Thinh Nguyen
Quoted 24 lines
Quoted 3 lines

Review

Quoted 3 lines
(quoted diff) +2 -0
+     /*
+      * For some dwc3 controller, the dwc3 global register start address

is

Quoted 12 lines

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device *pdev)

Quoted 6 lines
drivers/usb/dwc3/core.c +6 -0
+      * not at DWC3_GLOBALS_REGS_START (0xc100).
+      */
+     if (dev->of_node) {
+             int global_regs_starting_offset = 0;
+
+             device_property_read_u32(dev,

"snps,global-regs-starting-offset",

Quoted 1 line

+ &global_regs_starting_offset);

I suggested to use compatible string instead since this isn't common and only unique to your platform. Any reason we shouldn't do that?

Quoted 7 lines

ie. something like this:

if (dev->of_node && of_device_is_compatiable(dev->of_node, "your-platform"))

        dwc_res.start += your_platform_offset; else
        dwc_res.start = DWC3_GLOBALS_REGS_START;
Quoted 4 lines

I will try this suggestion.

Thanks,
Stanley

The dwc3/core is a general driver for every dwc3 IP of SoCs,
and vendor's definition and compatible should specify on its parent.
This should be inappropriate if we add a special platform compatible to dwc3/core driver. Therefore, I define this property to adjust this value. This is more resilient.
If there are other platforms that also have non-standard offset, this property is also applicable.

Thank,
Stanley

#6 lore raw

PATCH v2 2/2 dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

In reply to Stanley Chang

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +7 -0
index be36956af53b..5cbf3b7ded04 100644
@@ -359,6 +359,13 @@ properties:
     items:
       enum: [1, 4, 8, 16, 32, 64, 128, 256]
 
+  snps,global-regs-starting-offset:
+    description:
+      value for remapping global register start address. For some dwc3
+      controller, the dwc3 global register start address is not at
+      default DWC3_GLOBALS_REGS_START (0xc100). This property is added to
+      adjust the address.
+
   port:
     $ref: /schemas/graph.yaml#/properties/port
     description:
Signature · 1 line
2.34.1
#7 lore raw

Re: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 8 lines · Stanley Chang

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Since you skipped lists used in automated check, that's
unfortunately: NAK

Quoted 3 lines
---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Best regards,
Krzysztof

#8 lore raw

RE: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 19 lines · Stanley Chang
Quoted 8 lines

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Since you skipped lists used in automated check, that's
unfortunately: NAK

Quoted 7 lines
Quoted 3 lines
---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Best regards,
Krzysztof

CC more maintainers by using scripts/get_maintainers.pl

Thanks,
Stanley

#9 lore raw

Re: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 19 lines · Stanley Chang[昌育德]
Quoted 19 lines · Stanley Chang
Quoted 8 lines

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Since you skipped lists used in automated check, that's
unfortunately: NAK

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Best regards,
Krzysztof

CC more maintainers by using scripts/get_maintainers.pl

This does not work like this. It has to appear in the patchwork and be tested by automated tools. Please resend.

Best regards,
Krzysztof

#10 lore raw

Re: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

In reply to Stanley Chang
Quoted 18 lines · Stanley Chang

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +0 -0
index be36956af53b..5cbf3b7ded04 100644

Documentation/devicetree/bindings/usb/snps,dwc3.yaml properties: · line 367

Quoted 9 lines
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +6 -0
@@ -359,6 +359,13 @@ properties:
     items:
       enum: [1, 4, 8, 16, 32, 64, 128, 256]
 
+  snps,global-regs-starting-offset:
+    description:
+      value for remapping global register start address. For some dwc3
+      controller, the dwc3 global register start address is not at
+      default DWC3_GLOBALS_REGS_START (0xc100). This property is added to
+      adjust the address.

We already have 'reg' or using a specific compatible to handle differences. Use one of those, not a custom property. Generally, properties should be used for things that vary per board, not fixed in a given SoC.

Rob

#11 lore raw

RE: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 32 lines
Quoted 19 lines · Stanley Chang

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +0 -0
index be36956af53b..5cbf3b7ded04 100644

Documentation/devicetree/bindings/usb/snps,dwc3.yaml properties: · line 366

Quoted 8 lines
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +5 -0
@@ -359,6 +359,13 @@ properties:
     items:
       enum: [1, 4, 8, 16, 32, 64, 128, 256]
 
+  snps,global-regs-starting-offset:
+    description:
+      value for remapping global register start address. For some dwc3
+      controller, the dwc3 global register start address is not at
+      default DWC3_GLOBALS_REGS_START (0xc100). This property is

added to

Quoted 8 lines

Documentation/devicetree/bindings/usb/snps,dwc3.yaml properties: · line 367

Quoted 1 line
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +1 -0
+      adjust the address.

We already have 'reg' or using a specific compatible to handle differences. Use one of those, not a custom property. Generally, properties should be used for things that vary per board, not fixed in a given SoC.

Rob

The default offset is fixed by macro DWC3_GLOBALS_REGS_START, and it is not specified by reg. The dwc3/core is a general driver for every dwc3 IP of SoCs,
and vendor's definition and compatible should specify on its parent.
If we add a specific compatible to dwc3/core driver, then it will break this rule. Therefore, I use a property to adjust this offset.
If no define this property, it will use default offset. So it will not affect other board.

Thanks,
Stanley

#12 lore raw

Re: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 34 lines · Stanley Chang[昌育德]
Quoted 34 lines
Quoted 19 lines · Stanley Chang

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +0 -0
index be36956af53b..5cbf3b7ded04 100644

Documentation/devicetree/bindings/usb/snps,dwc3.yaml properties: · line 366

Quoted 8 lines
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +5 -0
@@ -359,6 +359,13 @@ properties:
     items:
       enum: [1, 4, 8, 16, 32, 64, 128, 256]
 
+  snps,global-regs-starting-offset:
+    description:
+      value for remapping global register start address. For some dwc3
+      controller, the dwc3 global register start address is not at
+      default DWC3_GLOBALS_REGS_START (0xc100). This property is

added to

Quoted 1 line
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +1 -0
+      adjust the address.
Quoted 8 lines
Quoted 6 lines

We already have 'reg' or using a specific compatible to handle differences. Use one of those, not a custom property. Generally, properties should be used for things that vary per board, not fixed in a given SoC.

Rob

The default offset is fixed by macro DWC3_GLOBALS_REGS_START, and it is not specified by reg.

Are you saying that reg points to XHCI registers and the gap between them and DWC3_GLOBALS_REGS_START is different on some implementations of this IP?

Quoted 2 lines

The dwc3/core is a general driver for every dwc3 IP of SoCs, and vendor's definition and compatible should specify on its parent.

Not entirely. It's how currently it is written, but not necessarily correct representation. The parent is only glue part which for some non-IP resources.

Quoted 1 line

If we add a specific compatible to dwc3/core driver, then it will break this rule.

What rule? The rule is to have specific compatibles, so now you are breaking it.

Quoted 2 lines

Therefore, I use a property to adjust this offset.
If no define this property, it will use default offset. So it will not affect other board.

Best regards,
Krzysztof

#13 lore raw

RE: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 42 lines · Stanley Chang[昌育德]
Quoted 32 lines
Quoted 32 lines
Quoted 19 lines · Stanley Chang

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +0 -0
index be36956af53b..5cbf3b7ded04 100644

Documentation/devicetree/bindings/usb/snps,dwc3.yaml properties: · line 366

Quoted 8 lines
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +5 -0
@@ -359,6 +359,13 @@ properties:
     items:
       enum: [1, 4, 8, 16, 32, 64, 128, 256]
 
+  snps,global-regs-starting-offset:
+    description:
+      value for remapping global register start address. For some dwc3
+      controller, the dwc3 global register start address is not at
+      default DWC3_GLOBALS_REGS_START (0xc100). This property is

added to

Quoted 5 lines
Quoted 5 lines

Documentation/devicetree/bindings/usb/snps,dwc3.yaml properties: · line 367

Quoted 1 line
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +1 -0
+      adjust the address.

We already have 'reg' or using a specific compatible to handle differences. Use one of those, not a custom property. Generally, properties should be used for things that vary per board, not fixed in a given

SoC.

Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Rob

The default offset is fixed by macro DWC3_GLOBALS_REGS_START, and it is

not specified by reg.

Are you saying that reg points to XHCI registers and the gap between them and DWC3_GLOBALS_REGS_START is different on some implementations of this IP?

Yes.

Quoted 5 lines
Quoted 2 lines

The dwc3/core is a general driver for every dwc3 IP of SoCs, and vendor's definition and compatible should specify on its parent.

Not entirely. It's how currently it is written, but not necessarily correct representation. The parent is only glue part which for some non-IP resources.

I agree.
I think this offset belongs to the IP resource.
But it is fixed value on dwc3/core driver.
Therefore, I had to add this patch to adjust it.

Quoted 5 lines
Quoted 1 line

If we add a specific compatible to dwc3/core driver, then it will break this

rule.

What rule? The rule is to have specific compatibles, so now you are breaking it.

I just don't want dwc3/core to look like a specific Realtek driver. If I add compatible to our platform, then apply this offset. For example,

@@ -2046,6 +2046,9 @@ static const struct of_device_id of_dwc3_match[] = {
        {
                .compatible = "synopsys,dwc3"
        },
+       {
+               .compatible = "realtek,dwc3"
+       },
        { },

};

Why not use a property of the device tree to specify this offset? It will be more general. Other vendor IPs can also use this option if desired. For example,

@@ -123,7 +123,7 @@ port0_dwc3: dwc3_u2drd@98020000 {
                        compatible = "synopsys,dwc3", "syscon";
                        reg = <0x98020000 0x9000>;
                        interrupts = <0 95 4>;
+                       snps,global-regs-starting-offset = <0x8100>;
                        usb-phy = <&dwc3_u2drd_usb2phy>;
                        dr_mode = "host";
                        snps,dis_u2_susphy_quirk;
#14 lore raw

PATCH v2 2/2 dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

In reply to Stanley Chang

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

---
v1 to v2 change:
1. Change the name of the property "snps,global-regs-starting-offset".

---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/usb/snps,dwc3.yaml +7 -0
index be36956af53b..5cbf3b7ded04 100644
@@ -359,6 +359,13 @@ properties:
     items:
       enum: [1, 4, 8, 16, 32, 64, 128, 256]
 
+  snps,global-regs-starting-offset:
+    description:
+      value for remapping global register start address. For some dwc3
+      controller, the dwc3 global register start address is not at
+      default DWC3_GLOBALS_REGS_START (0xc100). This property is added to
+      adjust the address.
+
   port:
     $ref: /schemas/graph.yaml#/properties/port
     description:
Signature · 1 line
2.34.1
#15 lore raw

Re: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 7 lines · Stanley Chang

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

Quoted 5 lines

---
v1 to v2 change:
1. Change the name of the property "snps,global-regs-starting-offset".
---

Didn't you got already comment for this patch? How did you implement it?

Also, I asked you multiple times:

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

I don't understand why you ignore this.

NAK, patch is not correct.

Best regards,
Krzysztof

#16 lore raw

RE: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 23 lines · Stanley Chang
Quoted 7 lines

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

Quoted 5 lines

---
v1 to v2 change:
1. Change the name of the property "snps,global-regs-starting-offset".
---

Didn't you got already comment for this patch? How did you implement it?

Also, I asked you multiple times:

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Quoted 7 lines

I don't understand why you ignore this.

NAK, patch is not correct.

Best regards,
Krzysztof

Thank you for your patient guidance.
Because I'm not familiar with the review process and didn't use scripts/get_maintainers.pl properly in the initial email thread. Therefore, this series of errors was caused. Sorry for the confusion.
Now I know how to use the script properly.
After correcting the maintainer's suggestion, I'll restart a new email thread and review again.

#17 lore raw

Re: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 31 lines · Stanley Chang[昌育德]
Quoted 23 lines · Stanley Chang
Quoted 7 lines

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

Quoted 5 lines

---
v1 to v2 change:
1. Change the name of the property "snps,global-regs-starting-offset".
---

Didn't you got already comment for this patch? How did you implement it?

Also, I asked you multiple times:

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Quoted 7 lines

I don't understand why you ignore this.

NAK, patch is not correct.

Best regards,
Krzysztof

Quoted 5 lines

Thank you for your patient guidance.
Because I'm not familiar with the review process and didn't use scripts/get_maintainers.pl properly in the initial email thread. Therefore, this series of errors was caused. Sorry for the confusion.
Now I know how to use the script properly.
After correcting the maintainer's suggestion, I'll restart a new email thread and review again.

Did you respond to feedback you got about the property? Did reviewer agreed on your view after your feedback?

If not, then why resending this patch?

Best regards,
Krzysztof

#18 lore raw

RE: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 24 lines
Quoted 12 lines
Quoted 12 lines

Didn't you got already comment for this patch? How did you implement it?

Also, I asked you multiple times:

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

I don't understand why you ignore this.

Quoted 8 lines
Quoted 5 lines

NAK, patch is not correct.

Best regards,
Krzysztof

Thank you for your patient guidance.
Because I'm not familiar with the review process and didn't use

scripts/get_maintainers.pl properly in the initial email thread.

Quoted 3 lines

Therefore, this series of errors was caused. Sorry for the confusion. Now I know how to use the script properly.
After correcting the maintainer's suggestion, I'll restart a new email thread

Quoted 7 lines

and review again.

Did you respond to feedback you got about the property? Did reviewer agreed on your view after your feedback?

If not, then why resending this patch?

1. Because you said, "This patch is incorrect". And I won't be cc'ing the proper maintainer. I think I need to restart a new review process.
2. Modify the previous reviewer's comments and fix the dtschema validation error.

Am I misunderstanding what you mean?
Can I keep reviewing this patch on this email thread until consensus is reached with the reviewers?

Thanks,
Stanley

#19 lore raw

Re: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

Quoted 32 lines · Stanley Chang[昌育德]
Quoted 24 lines
Quoted 12 lines
Quoted 12 lines

Didn't you got already comment for this patch? How did you implement it?

Also, I asked you multiple times:

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

I don't understand why you ignore this.

Quoted 8 lines
Quoted 5 lines

NAK, patch is not correct.

Best regards,
Krzysztof

Thank you for your patient guidance.
Because I'm not familiar with the review process and didn't use

scripts/get_maintainers.pl properly in the initial email thread.

Quoted 3 lines

Therefore, this series of errors was caused. Sorry for the confusion. Now I know how to use the script properly.
After correcting the maintainer's suggestion, I'll restart a new email thread

Quoted 7 lines

and review again.

Did you respond to feedback you got about the property? Did reviewer agreed on your view after your feedback?

If not, then why resending this patch?

Quoted 6 lines

1. Because you said, "This patch is incorrect". And I won't be cc'ing the proper maintainer. I think I need to restart a new review process.
2. Modify the previous reviewer's comments and fix the dtschema validation error.

Am I misunderstanding what you mean?
Can I keep reviewing this patch on this email thread until consensus is reached with the reviewers?

I guess confusion is because you never received response from Rob. I'll reply there.

Best regards,
Krzysztof

maintainer
#20 lore raw

Re: [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk

In reply to Stanley Chang
Quoted 7 lines · Stanley Chang

Add a new 'snps,global-regs-starting-offset' DT to dwc3 core to remap the global register start address

The RTK DHC SoCs were designed the global register address offset at 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100). Therefore, add the property of device-tree to adjust this start address.

Quoted 8 lines

---
v1 to v2 change:
1. Change the name of the property "snps,global-regs-starting-offset".

---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/snps,dwc3.yaml: properties:snps,global-regs-starting-offset: 'oneOf' conditional failed, one must be fixed:
'type' is a required property
hint: A vendor boolean property can use "type: boolean"
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/snps,dwc3.yaml: properties:snps,global-regs-starting-offset: 'oneOf' conditional failed, one must be fixed:
'enum' is a required property
'const' is a required property
hint: A vendor string property with exact values has an implicit type
from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/snps,dwc3.yaml: properties:snps,global-regs-starting-offset: 'oneOf' conditional failed, one must be fixed:
'$ref' is a required property
'allOf' is a required property
hint: A vendor property needs a $ref to types.yaml
from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
hint: Vendor specific properties must have a type and description unless they have a defined, common suffix.
from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.