Merge branch 'CR_1754_usb_device_mass_storage_minda' into 'jh7110-5.15.y-devel'
authorJason Zhou <jason.zhou@starfivetech.com>
Fri, 5 Aug 2022 03:00:23 +0000 (03:00 +0000)
committerJason Zhou <jason.zhou@starfivetech.com>
Fri, 5 Aug 2022 03:00:23 +0000 (03:00 +0000)
CR_1754 usb: gadget: add usb device mass storage support

See merge request sdk/linux!341

arch/riscv/boot/dts/starfive/jh7110.dtsi
arch/riscv/configs/starfive_jh7110_defconfig
drivers/usb/cdns3/cdns3-starfive.c

index 241c104..e74f1d3 100755 (executable)
                                      <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";
index 8297c4a..e6c5b74 100644 (file)
@@ -219,8 +219,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
index a770665..7d0545a 100644 (file)
@@ -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;