mbox series

[v6,0/3] usb: musb: sunxi: add F1C100s MUSB support

Message ID 20230201105348.1815461-1-andre.przywara@arm.com
Headers show
Series usb: musb: sunxi: add F1C100s MUSB support | expand

Message

Andre Przywara Feb. 1, 2023, 10:53 a.m. UTC
Hi,

this is a split off from the combined USB/DT Allwinner F1C100s support
series[1], with just the (MUSB) USB patches.
There were no code changes in v5 or v6, those are just rebases and
resends.
============================

This patchset introduces support for the F1C100s USB controller, which
just consists of a MUSB controller variant and some USB PHY. The USB PHY
support bits are already in -next.
Patch 1 adds the compatible string to the binding, patch 2 introduces
that compatible string to the driver, and lets it pick the appropriate
flags.
As this came up in reviews, patch 3 cleans up the SoC specific
configuration bits in the driver, to make future additions easier.

Please have a look and apply, if possible.

Cheers,
Andre.

[1] https://lore.kernel.org/linux-arm-kernel/20230111015332.172021-1-andre.przywara@arm.com/

Changelog v5 ... v6:
- just keep MUSB driver and binding patches
- add Jernej's Reviewed-by:
- Rebase on top of gregkh/usb/usb-next

Changelog v4 ... v5:
- Rebase on top to v6.2-rc1

Changelog v3 ... v4:
- Dropped the PHY patches, they go via a different tree and need a
  different base
- rebased on top of linux-sunxi/sunxi/for-next (provides H616 USB)
- musb DT binding: use enum
- musb cleanup: use musb_hdrc_config config pointer directly
- musb cleanup: use const where possible
- drop partitions from Popstick DTS file
- clarify Popstick has a USB type-A *plug*
- add tags

Changelog v2 ... v3:
- remove redundant "Device Tree Bindings" suffix in DT binding doc title
- add BSD license to binding doc file (as per checkpatch)
- fix some commit message title prefixes
- use proper plural spelling for usb0_id_det-gpios
- popstick.dts: Reorder otg_sram node reference alphabetically
- popstick.dts: Add regulator- prefix to 3.3V regulator node name
- popstick.dts: Fix status, compatible and reg property order
- popstick.dts: Drop unneeded mmc0 and spi0 aliases
- add patch to clean up sunxi MUSB driver
- add Acks and Reviewed-by's

Changelog v1 ... v2:
- USB PHY binding: clarify the relation with other phy-sun4i-usb bindings
- Add Popstick binding and .dts patches


Andre Przywara (1):
  usb: musb: sunxi: Introduce config struct

Icenowy Zheng (2):
  dt-bindings: usb: sunxi-musb: add F1C100s MUSB compatible string
  usb: musb: sunxi: add support for the F1C100s MUSB controller

 .../usb/allwinner,sun4i-a10-musb.yaml         | 10 +-
 drivers/usb/musb/sunxi.c                      | 99 +++++++++++++------
 2 files changed, 76 insertions(+), 33 deletions(-)

Comments

Sergey Shtylyov Feb. 1, 2023, 2:26 p.m. UTC | #1
On 2/1/23 1:53 PM, Andre Przywara wrote:

> From: Icenowy Zheng <uwu@icenowy.me>
> 
> The suniv SoC has a MUSB controller like the one in A33, but with a SRAM
> region to be claimed.
> 
> Add support for it.
> 
> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  drivers/usb/musb/sunxi.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c
> index 7f9a999cd5ff1..4b368d16a73ad 100644
> --- a/drivers/usb/musb/sunxi.c
> +++ b/drivers/usb/musb/sunxi.c
> @@ -722,14 +722,17 @@ static int sunxi_musb_probe(struct platform_device *pdev)
>  	INIT_WORK(&glue->work, sunxi_musb_work);
>  	glue->host_nb.notifier_call = sunxi_musb_host_notifier;
>  
> -	if (of_device_is_compatible(np, "allwinner,sun4i-a10-musb"))
> +	if (of_device_is_compatible(np, "allwinner,sun4i-a10-musb") ||
> +	    of_device_is_compatible(np, "allwinner,suniv-f1c100s-musb")) {
>  		set_bit(SUNXI_MUSB_FL_HAS_SRAM, &glue->flags);
> +	}

  Why {} around single statement?


[...]

MBR, Sergey