Add StarFive JHB100 soc BMC DRD USB support
Minda Chen
maintainerPATCH 1/2 dt-bindings: usb: dwc3: add support for StarFive JHB100
In reply to Minda ChenAdd support for the USB 2.0 Dual-Role Device (DRD) controller embedded in the StarFive JHB100 SoC. The controller is based on the Synopsys DesignWare Core USB 3 (DWC3) IP.
--- .../bindings/usb/starfive,jhb100-dwc3.yaml | 64 +++++++++++++++++++ MAINTAINERS | 3 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/usb/starfive,jhb100-dwc3.yaml
Documentation/devicetree/bindings/usb/starfive,jhb100-dwc3.yaml new file +64 -0
@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/starfive,jhb100-dwc3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 DWC3 USB SoC Controller + +maintainers: + - Minda Chen <[email protected]> + +description: + The USB DRD controller on JHB100 BMC SoC. + +allOf: + - $ref: snps,dwc3-common.yaml# + +properties: + compatible: + const: starfive,jhb100-dwc3 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: USB main enable clk + - description: DWC3 bus early clock + - description: DWC3 ref clock + + clock-names: + items: + - const: main + - const: bus_early + - const: ref + + resets: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + +unevaluatedProperties: false + +examples: + - | + usb@11800000 { + compatible = "starfive,jhb100-dwc3"; + reg = <0x11800000 0x10000>; + clocks = <&usbcrg 9>, + <&usbcrg 5>, + <&usbcrg 6>; + clock-names = "main", "bus_early", "ref"; + resets = <&usbcrg 4>; + interrupts = <105>; + dr_mode = "host"; + };
MAINTAINERS +2 -1
@@ -25252,10 +25252,11 @@ F: Documentation/devicetree/bindings/reset/starfive,jh7100-reset.yaml F: drivers/reset/starfive/reset-starfive-jh71* F: include/dt-bindings/reset/starfive?jh71*.h -STARFIVE JH71X0 USB DRIVERS +STARFIVE USB DRIVERS M: Minda Chen <[email protected]> S: Maintained F: Documentation/devicetree/bindings/usb/starfive,jh7110-usb.yaml +F: Documentation/devicetree/bindings/usb/starfive,jhb100-dwc3.yaml F: drivers/usb/cdns3/cdns3-starfive.c STARFIVE JH71XX PMU CONTROLLER DRIVER
Signature · 1 line
2.17.1
Minda Chen
maintainercover Add StarFive JHB100 soc BMC DRD USB support
JHB100 is a Starfive new RISC-V SoC for datacenter BMC (Baseboard Managent Controller). Similar with Aspeed 27x0.
The JHB100 minimal system upstream is in progress:
https://patchwork.kernel.org/project/linux-riscv/cover/[email protected]/
JHB100 contain 2 USB 2.0 dwc3 USB port, and intergrated with USB 2.0 PHY. These 2 ports just for BMC soc use. Actually JHB100 contain other dwc3 usb controllers, which is using as xhci over PCIe and locate in PCIe EP. It is working for host server. But now PCIe EP driver is not in upstream progress. So just commit BMC USB 2.0 port driver patches to upstream first.
The patch base in V7.0-rc5
Minda Chen (2):
dt-bindings: usb: dwc3: add support for StarFive JHB100
usb: dwc3: starfive: Add JHB100 USB 2.0 DRD controller
.../bindings/usb/starfive,jhb100-dwc3.yaml | 64 +++++++++++++++++++ MAINTAINERS | 3 +- drivers/usb/dwc3/dwc3-generic-plat.c | 2 +- 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/starfive,jhb100-dwc3.yaml
base-commit: c369299895a591d96745d6492d4888259b004a9e
Signature · 1 line
2.17.1
Minda Chen
maintainerPATCH 2/2 usb: dwc3: starfive: Add JHB100 USB 2.0 DRD controller
JHB100 contains 2 dwc3 USB controllers and PHYs and working as USB 2.0 speed. It can working in generic platform and setting default properties.
--- drivers/usb/dwc3/dwc3-generic-plat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-generic-plat.c +1 -1
@@ -89,7 +89,6 @@ static int dwc3_generic_probe(struct platform_device *pdev)dev_err (&pdev->dev,"missing memory resource\n" );return -ENODEV ; } - dwc3g->resets =devm_reset_control_array_get_optional_exclusive (dev);if (IS_ERR (dwc3g->resets))return dev_err_probe (dev,PTR_ERR (dwc3g->resets),"failed to get resets\n" );
@@ -214,6 +213,7 @@ static const struct of_device_id dwc3_generic_of_match[] = { { .compatible = "spacemit,k1-dwc3", }, { .compatible = "fsl,ls1028a-dwc3", &fsl_ls1028_dwc3}, { .compatible = "eswin,eic7700-dwc3", &eic7700_dwc3}, + { .compatible = "starfive,jhb100-dwc3", }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, dwc3_generic_of_match);
Signature · 1 line
2.17.1
Re: [PATCH v1 1/2] dt-bindings: usb: dwc3: add support for StarFive JHB100
In reply to Minda Chenpw-bot: not-applicable
Minda Chen
maintainerRe: [PATCH v1 1/2] dt-bindings: usb: dwc3: add support for StarFive JHB100
Quoted 6 lines
主题: Re: [PATCH v1 1/2] dt-bindings: usb: dwc3: add support for StarFive JHB100
Acked-by Conor Dooley <[email protected]>pw-bot: not-applicable
Thanks Conor
Hi Thinh
Could you review patch2? Just add a compatible to generic platform driver. Thanks
Hi Greg
Can this patch-set be merged in v7.1? Thanks
Thinh Nguyen
maintainerRe: [PATCH v1 1/2] dt-bindings: usb: dwc3: add support for StarFive JHB100
Quoted 3 lines · Minda Chen
Hi Thinh
Could you review patch2? Just add a compatible to generic platform driver. Thanks
Done.
BR,
Thinh