mbox series

[SRU,K/Unstable,0/4] Add USB support for the PolarFire RISC-V SoC

Message ID 20220829135148.1491968-1-emil.renner.berthing@canonical.com
Headers show
Series [SRU,K,1/4] usb: musb: Add support for PolarFire SoC's musb controller | expand

Message

Emil Renner Berthing Aug. 29, 2022, 1:51 p.m. UTC
[Impact]

The 5.19 kernel contains support for the PolarFire Icicle board but the USB driver is missing.

The following patches are available in Linux v6.0-rc1 and are sufficient to make USB usable on the PolarFire Icicle board. Please, apply them to the 5.19 kernel and set CONFIG_USB_MUSB_POLARFIRE_SOC=m.

7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller")
https://lore.kernel.org/r/20220613114642.1615292-2-conor.dooley@microchip.com

21cdd6a0e844 ("usb: musb: mpfs: Fix error codes in probe()")
https://lore.kernel.org/r/YrVmLEc/FOEzNdzj@kili

98ceba755928 ("usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()"
https://lore.kernel.org/all/YrVmLEc%2FFOEzNdzj@kili/

With this change internal USB devices are fully usable. External devices are supported with the following Jumper settings:

* J17 closed
* J15 open

[Test Plan]

Ensure the correct jumper settings:

* J17 closed
* J15 open

Use the SiFive Unmatched preinstalled image and install the 5.19 kernel. Try to boot on the Polarfire Icicle board.

* Run lsusb.
* Attach a USB device to J16 (USB port beside SD-card slot)
* Run lsusb again. The new device appears.

[Where problems could occur]

The fix only concerns a board which has been unsupported by Ubuntu yet.

In case of an incorrect fix the board might not boot or otherwise malfunction.

Conor Dooley (1):
  usb: musb: Add support for PolarFire SoC's musb controller

Dan Carpenter (1):
  usb: musb: mpfs: Fix error codes in probe()

Emil Renner Berthing (1):
  UBUNTU: [Config] Enable CONFIG_USB_MUSB_POLARFIRE_SOC on riscv64

Yang Yingliang (1):
  usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()

 debian.master/config/annotations          |   1 +
 debian.master/config/config.common.ubuntu |   1 +
 drivers/usb/musb/Kconfig                  |  13 +-
 drivers/usb/musb/Makefile                 |   1 +
 drivers/usb/musb/mpfs.c                   | 269 ++++++++++++++++++++++
 5 files changed, 284 insertions(+), 1 deletion(-)
 create mode 100644 drivers/usb/musb/mpfs.c

Comments

Tim Gardner Aug. 29, 2022, 2:05 p.m. UTC | #1
On 8/29/22 07:51, Emil Renner Berthing wrote:
> [Impact]
> 
> The 5.19 kernel contains support for the PolarFire Icicle board but the USB driver is missing.
> 
> The following patches are available in Linux v6.0-rc1 and are sufficient to make USB usable on the PolarFire Icicle board. Please, apply them to the 5.19 kernel and set CONFIG_USB_MUSB_POLARFIRE_SOC=m.
> 
> 7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller")
> https://lore.kernel.org/r/20220613114642.1615292-2-conor.dooley@microchip.com
> 
> 21cdd6a0e844 ("usb: musb: mpfs: Fix error codes in probe()")
> https://lore.kernel.org/r/YrVmLEc/FOEzNdzj@kili
> 
> 98ceba755928 ("usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()"
> https://lore.kernel.org/all/YrVmLEc%2FFOEzNdzj@kili/
> 
> With this change internal USB devices are fully usable. External devices are supported with the following Jumper settings:
> 
> * J17 closed
> * J15 open
> 
> [Test Plan]
> 
> Ensure the correct jumper settings:
> 
> * J17 closed
> * J15 open
> 
> Use the SiFive Unmatched preinstalled image and install the 5.19 kernel. Try to boot on the Polarfire Icicle board.
> 
> * Run lsusb.
> * Attach a USB device to J16 (USB port beside SD-card slot)
> * Run lsusb again. The new device appears.
> 
> [Where problems could occur]
> 
> The fix only concerns a board which has been unsupported by Ubuntu yet.
> 
> In case of an incorrect fix the board might not boot or otherwise malfunction.
> 
> Conor Dooley (1):
>    usb: musb: Add support for PolarFire SoC's musb controller
> 
> Dan Carpenter (1):
>    usb: musb: mpfs: Fix error codes in probe()
> 
> Emil Renner Berthing (1):
>    UBUNTU: [Config] Enable CONFIG_USB_MUSB_POLARFIRE_SOC on riscv64
> 
> Yang Yingliang (1):
>    usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()
> 
>   debian.master/config/annotations          |   1 +
>   debian.master/config/config.common.ubuntu |   1 +
>   drivers/usb/musb/Kconfig                  |  13 +-
>   drivers/usb/musb/Makefile                 |   1 +
>   drivers/usb/musb/mpfs.c                   | 269 ++++++++++++++++++++++
>   5 files changed, 284 insertions(+), 1 deletion(-)
>   create mode 100644 drivers/usb/musb/mpfs.c
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Cengiz Can Aug. 29, 2022, 2:24 p.m. UTC | #2
On Mon, 2022-08-29 at 15:51 +0200, Emil Renner Berthing wrote:
> [Impact]
> 
> The 5.19 kernel contains support for the PolarFire Icicle board but the USB driver is missing.
> 
> The following patches are available in Linux v6.0-rc1 and are sufficient to make USB usable on the PolarFire Icicle board. Please, apply them to the 5.19 kernel and set CONFIG_USB_MUSB_POLARFIRE_SOC=m.
> 
> 7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller")
> https://lore.kernel.org/r/20220613114642.1615292-2-conor.dooley@microchip.com
> 
> 21cdd6a0e844 ("usb: musb: mpfs: Fix error codes in probe()")
> https://lore.kernel.org/r/YrVmLEc/FOEzNdzj@kili
> 
> 98ceba755928 ("usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()"
> https://lore.kernel.org/all/YrVmLEc%2FFOEzNdzj@kili/
> 
> With this change internal USB devices are fully usable. External devices are supported with the following Jumper settings:
> 
> * J17 closed
> * J15 open
> 
> [Test Plan]
> 
> Ensure the correct jumper settings:
> 
> * J17 closed
> * J15 open
> 
> Use the SiFive Unmatched preinstalled image and install the 5.19 kernel. Try to boot on the Polarfire Icicle board.
> 
> * Run lsusb.
> * Attach a USB device to J16 (USB port beside SD-card slot)
> * Run lsusb again. The new device appears.
> 
> [Where problems could occur]
> 
> The fix only concerns a board which has been unsupported by Ubuntu yet.
> 
> In case of an incorrect fix the board might not boot or otherwise malfunction.

Acked-by: Cengiz Can <cengiz.can@canonical.com>

> 
> Conor Dooley (1):
>   usb: musb: Add support for PolarFire SoC's musb controller
> 
> Dan Carpenter (1):
>   usb: musb: mpfs: Fix error codes in probe()
> 
> Emil Renner Berthing (1):
>   UBUNTU: [Config] Enable CONFIG_USB_MUSB_POLARFIRE_SOC on riscv64
> 
> Yang Yingliang (1):
>   usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()
> 
>  debian.master/config/annotations          |   1 +
>  debian.master/config/config.common.ubuntu |   1 +
>  drivers/usb/musb/Kconfig                  |  13 +-
>  drivers/usb/musb/Makefile                 |   1 +
>  drivers/usb/musb/mpfs.c                   | 269 ++++++++++++++++++++++
>  5 files changed, 284 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/usb/musb/mpfs.c
> 
> -- 
> 2.36.1
> 
>
Paolo Pisati Sept. 13, 2022, 10:40 a.m. UTC | #3
On Mon, Aug 29, 2022 at 03:51:43PM +0200, Emil Renner Berthing wrote:
> [Impact]
> 
> The 5.19 kernel contains support for the PolarFire Icicle board but the USB driver is missing.
> 
> The following patches are available in Linux v6.0-rc1 and are sufficient to make USB usable on the PolarFire Icicle board. Please, apply them to the 5.19 kernel and set CONFIG_USB_MUSB_POLARFIRE_SOC=m.
> 
> 7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller")
> https://lore.kernel.org/r/20220613114642.1615292-2-conor.dooley@microchip.com
> 
> 21cdd6a0e844 ("usb: musb: mpfs: Fix error codes in probe()")
> https://lore.kernel.org/r/YrVmLEc/FOEzNdzj@kili
> 
> 98ceba755928 ("usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()"
> https://lore.kernel.org/all/YrVmLEc%2FFOEzNdzj@kili/