linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] Add the Renesas USBF controller support
@ 2022-12-07 16:24 Herve Codina
  2022-12-07 16:24 ` [PATCH v3 1/9] dt-bindings: PCI: renesas,pci-rcar-gen2: Add depends-on for RZ/N1 SoC family Herve Codina
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Herve Codina @ 2022-12-07 16:24 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Herve Codina, Greg Kroah-Hartman,
	Magnus Damm, Gareth Williams
  Cc: linux-renesas-soc, linux-clk, devicetree, linux-kernel,
	linux-usb, Thomas Petazzoni, Miquel Raynal

Hi,

This series add support for the Renesas USBF controller (USB Device
Controller) available in the Renesas RZ/N1 SoC.

Based on previous review:
  https://lore.kernel.org/all/20221114111513.1436165-3-herve.codina@bootlin.com/
  
A new strategy is proposed to handle the H2MODE bit from CFG_USB
register compared to the previous versions on the series. As a
reminder, H2MODE bit allows to configure the internal USB Port
interface for two hosts or one host and one device.

This new strategy is:
  - Add the new generic 'depends-on' property in the device tree.

    This generic property expresses an simple functionnal dependency
    that does not rely on a specific topic. It is an 'order only'
    dependency that can be used for dependencies between consumers
    and producers that are not based on a specific infrastructure
    and not need other relationship than this simple 'order only'
    (ie no API is provided between the provider and the consumer)

    The 'depends-on' property is handled in a generic way using
    fw_devlink. The probe() function calls order is ensured by the
    core infrastructure.

    In the nodes impacted by H2MODE, 'depends-on' is used to
    express the dependency to sysctrl.

  - At sysctrl level, during the probe, switch to '1 host, 1 device'
    mode only if the USB device is available.

Patches 1, 2 and 3 are related to 'depends-on' in the PCI bridge
node. This PCI bridge connects the USB host controllers to the AHB bus

Patch 4 adds the 'depends-on' support in fw_devlink
Patch 6 handles h2mode in sysctrl

Patch 5, 7, 8 and 9 are related to the USBF controller with a new
binding definition, the driver itself and myself as a maintainer
of this controller.

Best regards,
Herve Codina

Changes v2 -> v3:
  - v2 Patches 1, 2 and 3 removed.

  - Patches 1, 2, 3 and 4 (new patches)

  - Patch 5 (v2 patch 4):
    Add 'depends-on' property
    Removed redundant 'binding' word

  - Patch 6 (new patch)

  - Patch 7 (v2 patch 5)
    Removed h2mode checking. This check is no more needed and the API no more
    available.

  - Patch 8 (v2 patch 6)
    Add 'depends-on' property

  - Patch 9 (v2 patch 7)
    Fix file name

Changes v1 -> v2:
  - Patch 1:
    Rename r9a06g032_sysctrl_get_usb_h2mode to r9a06g032_sysctrl_get_usb_role
    and return USB_ROLE_{HOST,DEVICE} or an error code.
    Reword commit log

  - Patches 2 and 3:
    No changes. Some previous feedbacks still need to be taken into account
      https://lore.kernel.org/all/20221107182642.05a09f2f@bootlin.com/
      https://lore.kernel.org/all/20221107173614.474707d7@bootlin.com/

  - Patch 4:
    Rename file from renesas,usbf.yaml to renesas,rzn1-usbf.yaml.
    Remove 'oneOf'.
    Add blank line and line break.
    Add 'power-domains'.
    Reword commit log

  - Patch 5:
    Remove clocks handling (handled by runtime PM through the clock domain
    pointed by power-domains).
    Fix compilation warning raised by the 'kernel test robot'.

  - Patch 6:
    Add 'power-domains'

  - Patch 7:
    Add 'Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>'


Herve Codina (9):
  dt-bindings: PCI: renesas,pci-rcar-gen2: Add depends-on for RZ/N1 SoC
    family
  ARM: dts: r9a06g032: Add dependency to sysctrl in the PCI bridge
  dt-bindings: PCI: renesas,pci-rcar-gen2: 'depends-on' is no more
    optional
  of: property: fw_devlink: Add support for "depends-on"
  dt-bindings: usb: add the Renesas RZ/N1 USBF controller
  soc: renesas: r9a06g032-sysctrl: Handle h2mode setting based on USBF
    presence
  usb: gadget: udc: add Renesas RZ/N1 USBF controller support
  ARM: dts: r9a06g032: Add the USBF controller node
  MAINTAINERS: add the Renesas RZ/N1 USBF controller entry

 .../bindings/pci/renesas,pci-rcar-gen2.yaml   |    7 +
 .../bindings/usb/renesas,rzn1-usbf.yaml       |   77 +
 MAINTAINERS                                   |    8 +
 arch/arm/boot/dts/r9a06g032.dtsi              |   14 +
 drivers/clk/renesas/r9a06g032-clocks.c        |   28 +
 drivers/of/property.c                         |    2 +
 drivers/usb/gadget/udc/Kconfig                |   11 +
 drivers/usb/gadget/udc/Makefile               |    1 +
 drivers/usb/gadget/udc/renesas_usbf.c         | 3420 +++++++++++++++++
 9 files changed, 3568 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/renesas,rzn1-usbf.yaml
 create mode 100644 drivers/usb/gadget/udc/renesas_usbf.c

-- 
2.38.1


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

end of thread, other threads:[~2022-12-13 13:28 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07 16:24 [PATCH v3 0/9] Add the Renesas USBF controller support Herve Codina
2022-12-07 16:24 ` [PATCH v3 1/9] dt-bindings: PCI: renesas,pci-rcar-gen2: Add depends-on for RZ/N1 SoC family Herve Codina
2022-12-07 16:24 ` [PATCH v3 2/9] ARM: dts: r9a06g032: Add dependency to sysctrl in the PCI bridge Herve Codina
2022-12-07 16:24 ` [PATCH v3 3/9] dt-bindings: PCI: renesas,pci-rcar-gen2: 'depends-on' is no more optional Herve Codina
2022-12-08  8:26   ` Krzysztof Kozlowski
2022-12-08  9:05     ` Herve Codina
2022-12-08  9:46       ` Krzysztof Kozlowski
2022-12-08 15:51         ` Herve Codina
2022-12-09  8:06           ` Krzysztof Kozlowski
2022-12-13 13:22             ` Herve Codina
2022-12-07 16:24 ` [PATCH v3 4/9] of: property: fw_devlink: Add support for "depends-on" Herve Codina
2022-12-07 16:24 ` [PATCH v3 5/9] dt-bindings: usb: add the Renesas RZ/N1 USBF controller Herve Codina
2022-12-07 16:24 ` [PATCH v3 6/9] soc: renesas: r9a06g032-sysctrl: Handle h2mode setting based on USBF presence Herve Codina
2022-12-08  9:05   ` Geert Uytterhoeven
2022-12-13 13:28     ` Herve Codina
2022-12-07 16:24 ` [PATCH v3 7/9] usb: gadget: udc: add Renesas RZ/N1 USBF controller support Herve Codina
2022-12-07 16:24 ` [PATCH v3 8/9] ARM: dts: r9a06g032: Add the USBF controller node Herve Codina
2022-12-08  9:09   ` Geert Uytterhoeven
2022-12-13 13:27     ` Herve Codina
2022-12-07 16:24 ` [PATCH v3 9/9] MAINTAINERS: add the Renesas RZ/N1 USBF controller entry Herve Codina
2022-12-07 22:19 ` [PATCH v3 0/9] Add the Renesas USBF controller support Rob Herring
2022-12-08  8:24   ` Herve Codina
2022-12-08  9:11     ` Geert Uytterhoeven
2022-12-08 20:44     ` Rob Herring
2022-12-13 13:26       ` Herve Codina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).