diff options
author | minda.chen <minda.chen@starfivetech.com> | 2022-07-29 08:29:18 +0300 |
---|---|---|
committer | minda.chen <minda.chen@starfivetech.com> | 2022-08-01 05:06:41 +0300 |
commit | 2039c204733705acb39bf35e32f756d0c6fa67db (patch) | |
tree | be23e5932c38fe3029de92ef2a7055576000016a | |
parent | bfea6096b8cf9d28b468d5321b1fd730fa3cb726 (diff) | |
download | linux-2039c204733705acb39bf35e32f756d0c6fa67db.tar.xz |
usb: gadget: add usb device mass storage and functinfs support
USB mass storage and functionfs activated by configfs.
Support both 2.0 and 3.0.
Signed-off-by: minda.chen <minda.chen@starfivetech.com>
-rwxr-xr-x | arch/riscv/boot/dts/starfive/jh7110.dtsi | 2 | ||||
-rw-r--r-- | arch/riscv/configs/starfive_jh7110_defconfig | 5 | ||||
-rw-r--r-- | drivers/usb/cdns3/cdns3-starfive.c | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index b39095413cb1..556768d254fc 100755 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -405,7 +405,7 @@ <0x0 0x10110000 0x0 0x10000>, <0x0 0x10120000 0x0 0x10000>; reg-names = "otg", "xhci", "dev"; - interrupts = <100>, <109>, <110>; + interrupts = <100>, <108>, <110>; interrupt-names = "host", "peripheral", "otg"; phy-names = "cdns3,usb3-phy", "cnds3,usb2-phy"; maximum-speed = "super-speed"; diff --git a/arch/riscv/configs/starfive_jh7110_defconfig b/arch/riscv/configs/starfive_jh7110_defconfig index 383a66ca92c4..b83b7c5e4e5e 100644 --- a/arch/riscv/configs/starfive_jh7110_defconfig +++ b/arch/riscv/configs/starfive_jh7110_defconfig @@ -218,8 +218,13 @@ CONFIG_USB_STORAGE=y CONFIG_USB_UAS=y CONFIG_USB_CDNS_SUPPORT=y CONFIG_USB_CDNS3=y +CONFIG_USB_CDNS3_GADGET=y CONFIG_USB_CDNS3_HOST=y CONFIG_USB_CDNS3_STARFIVE=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_F_FS=y CONFIG_MMC=y CONFIG_MMC_DEBUG=y CONFIG_MMC_SDHCI=y diff --git a/drivers/usb/cdns3/cdns3-starfive.c b/drivers/usb/cdns3/cdns3-starfive.c index a77066504fe1..7d0545aafcd7 100644 --- a/drivers/usb/cdns3/cdns3-starfive.c +++ b/drivers/usb/cdns3/cdns3-starfive.c @@ -298,6 +298,9 @@ static int cdns_starfive_probe(struct platform_device *pdev) goto exit; } + dev_info(dev, "usb mode %d %s probe success\n", + data->mode, data->usb2_only ? "2.0" : "3.0"); + return 0; exit: return ret; |