gadget: rockchip: USB_GADGET_PRODUCT_NUM
authorJagan Teki <jagan@amarulasolutions.com>
Tue, 19 Nov 2019 08:26:16 +0000 (13:56 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 23 Nov 2019 14:29:49 +0000 (22:29 +0800)
Rockchip support differnet or common gadget product number
between Rockchip SoCs like,

0x310a - rk3036
0x320a - rk3229, rk3288
0x330a - rk3328

So, select them on Kconfig based on platform specific
config defined.
   
This eventually drop the explicit configs defined in
supporting board defconfig files.

Tested-by: Levin Du <djw@t-chip.com.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
14 files changed:
configs/evb-rk3036_defconfig
configs/evb-rk3229_defconfig
configs/evb-rk3288_defconfig
configs/evb-rk3328_defconfig
configs/firefly-rk3288_defconfig
configs/kylin-rk3036_defconfig
configs/miqi-rk3288_defconfig
configs/phycore-rk3288_defconfig
configs/popmetal-rk3288_defconfig
configs/rock64-rk3328_defconfig
configs/tinker-rk3288_defconfig
configs/tinker-s-rk3288_defconfig
configs/vyasa-rk3288_defconfig
drivers/usb/gadget/Kconfig

index bb3e2c8f7d85c072434d1f32f3746c88272b64e3..79e413145f973aae5984b4e0443b9090ee8c814a 100644 (file)
@@ -52,7 +52,6 @@ CONFIG_SYSRESET=y
 # CONFIG_SPL_SYSRESET is not set
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_CMD_DHRYSTONE=y
index 2dbf5bcca03683fbc58abebe44f463a7fbf9f428..e3a9177dfb1f2363e264b462e01825a13a238d4e 100644 (file)
@@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_TPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
index 8f2f13adaec2da4ea94ace05727848bc24e7c1d1..db7e6fa7b10c408e61df32fb8baccaa7b6134c54 100644 (file)
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_DM_VIDEO=y
 CONFIG_DISPLAY=y
index 747089435d39a9d374b2b8b6afef814d649c9039..0293546b04099016a3854900a83af4572d7a6f31 100644 (file)
@@ -86,7 +86,6 @@ CONFIG_USB_DWC2=y
 CONFIG_USB_DWC3=y
 # CONFIG_USB_DWC3_GADGET is not set
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_TPL_TINY_MEMSET=y
index 92eeffda01f7660e3c50fa59667417e35880a18d..6efc5735f9659f0ddcff833c484b19a9ab1c1556 100644 (file)
@@ -75,7 +75,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
index 08b47c84ef27fd69962e592e90ef4baeec4a4faf..c1607e52fb4db05d91ec5f98e729f09d67d6020b 100644 (file)
@@ -56,7 +56,6 @@ CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
index b06175958e48d263e4b0142096cf352e5dc38213..4590e38ad33fc25f81a9ee03b30ed8478ec13b57 100644 (file)
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
index a86f689858a399dbf4fa88817bf79b5bc989bbd1..51bd8adcbcc95b8e3298ed5b2dbb9d3c028b7bd5 100644 (file)
@@ -75,7 +75,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
index 0cb67f33fef590f90df63b6e483597aa13adb6ef..8cc55bdbe080aa0768ea8e2759d49941e582053e 100644 (file)
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
index ec13a7710a22ec8fea9501df1ecb43b6b9956127..0dab5d7e54a44dce39f801af9ef62754c6a06289 100644 (file)
@@ -87,7 +87,6 @@ CONFIG_USB_DWC2=y
 CONFIG_USB_DWC3=y
 # CONFIG_USB_DWC3_GADGET is not set
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_TPL_TINY_MEMSET=y
index e46eb1cd916ade8f829aace3e1575c09217f75e4..c350c0d8baebc2ebb41f413251e630e314844dd0 100644 (file)
@@ -77,7 +77,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
index 3acb2ac5f5a2bebc8425a4bf14b04e51dff4f7fa..c016a264b2bcdbf4cec6f933c85ca686e54cba70 100644 (file)
@@ -83,7 +83,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
index 997d9a38770a8e2ebbb77a5e24218dbd2bb5da10..32c35026830df746e855eddd0e7c4283e5ad7631 100644 (file)
@@ -69,7 +69,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_FUNCTION_MASS_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
index 844c3be16ffc4f8109879af012db796c3a9b4091..e120b48b331541be3ae5edce1a45cc69a2ecc2bd 100644 (file)
@@ -58,6 +58,9 @@ config USB_GADGET_VENDOR_NUM
 config USB_GADGET_PRODUCT_NUM
        hex "Product ID of the USB device"
        default 0x1010 if ARCH_SUNXI
+       default 0x310a if ROCKCHIP_RK3036
+       default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
+       default 0x330a if ROCKCHIP_RK3328
        default 0x0
        help
          Product ID of the USB device emulated, reported to the host device.