All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] rockchip: rk3399: Add fastboot support
@ 2019-11-19  8:26 ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

This is v2 set for fastboot support on rk3399, tested on
rock960 and rebased on u-boot-rockchip/master

Changes for v2:
- collect Levin Du Tested-by
- fix rk3399 product number (Thanks to Levin Du)
- add patch to fix fastboot flash device num for rk3328
- add patch to enable gadget on rock960
- rebased on u-boot-rockchip/master

[1] https://patchwork.ozlabs.org/cover/1181569/

Any inputs?
Jagan.

Jagan Teki (10):
  gadget: Select USB_GADGET_MANUFACTURER for rockchip
  gadget: Select USB_GADGET_VENDOR_NUM for rockchip
  gadget: rockchip: USB_GADGET_PRODUCT_NUM
  gadget: rockchip: Add rk3128 USB_GADGET_PRODUCT_NUM
  fastboot: rockchip: Select FASTBOOT_FLASH[_MMC_DEV]
  fastboot: rockchip: Fix rk3328 default mmc device
  usb: dwc3: Add phy interface for dwc3_uboot
  gadget: rockchip: Add rk3399 USB_GADGET_PRODUCT_NUM
  rockchip: Setup dwc3_device (for non-dm gadgets)
  rock960: Enable USB Gadget

 arch/arm/mach-rockchip/board.c    | 32 +++++++++++++++++++++++++++++--
 configs/elgin-rv1108_defconfig    |  2 --
 configs/evb-rk3036_defconfig      |  5 -----
 configs/evb-rk3128_defconfig      |  2 --
 configs/evb-rk3229_defconfig      |  5 -----
 configs/evb-rk3288_defconfig      |  5 -----
 configs/evb-rk3328_defconfig      |  5 -----
 configs/evb-rv1108_defconfig      |  2 --
 configs/firefly-rk3288_defconfig  |  5 -----
 configs/kylin-rk3036_defconfig    |  5 -----
 configs/miqi-rk3288_defconfig     |  5 -----
 configs/phycore-rk3288_defconfig  |  5 -----
 configs/popmetal-rk3288_defconfig |  5 -----
 configs/rock2_defconfig           |  2 --
 configs/rock64-rk3328_defconfig   |  5 -----
 configs/rock960-rk3399_defconfig  |  2 ++
 configs/tinker-rk3288_defconfig   |  5 -----
 configs/tinker-s-rk3288_defconfig |  5 -----
 configs/vyasa-rk3288_defconfig    |  3 ---
 drivers/fastboot/Kconfig          |  3 ++-
 drivers/usb/dwc3/core.c           | 27 ++++++++++++++++++++++++++
 drivers/usb/dwc3/core.h           | 12 ++++++++++++
 drivers/usb/gadget/Kconfig        |  7 +++++++
 include/dwc3-uboot.h              |  2 ++
 include/linux/usb/phy.h           | 19 ++++++++++++++++++
 25 files changed, 101 insertions(+), 74 deletions(-)
 create mode 100644 include/linux/usb/phy.h

-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 00/10] rockchip: rk3399: Add fastboot support
@ 2019-11-19  8:26 ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

This is v2 set for fastboot support on rk3399, tested on
rock960 and rebased on u-boot-rockchip/master

Changes for v2:
- collect Levin Du Tested-by
- fix rk3399 product number (Thanks to Levin Du)
- add patch to fix fastboot flash device num for rk3328
- add patch to enable gadget on rock960
- rebased on u-boot-rockchip/master

[1] https://patchwork.ozlabs.org/cover/1181569/

Any inputs?
Jagan.

Jagan Teki (10):
  gadget: Select USB_GADGET_MANUFACTURER for rockchip
  gadget: Select USB_GADGET_VENDOR_NUM for rockchip
  gadget: rockchip: USB_GADGET_PRODUCT_NUM
  gadget: rockchip: Add rk3128 USB_GADGET_PRODUCT_NUM
  fastboot: rockchip: Select FASTBOOT_FLASH[_MMC_DEV]
  fastboot: rockchip: Fix rk3328 default mmc device
  usb: dwc3: Add phy interface for dwc3_uboot
  gadget: rockchip: Add rk3399 USB_GADGET_PRODUCT_NUM
  rockchip: Setup dwc3_device (for non-dm gadgets)
  rock960: Enable USB Gadget

 arch/arm/mach-rockchip/board.c    | 32 +++++++++++++++++++++++++++++--
 configs/elgin-rv1108_defconfig    |  2 --
 configs/evb-rk3036_defconfig      |  5 -----
 configs/evb-rk3128_defconfig      |  2 --
 configs/evb-rk3229_defconfig      |  5 -----
 configs/evb-rk3288_defconfig      |  5 -----
 configs/evb-rk3328_defconfig      |  5 -----
 configs/evb-rv1108_defconfig      |  2 --
 configs/firefly-rk3288_defconfig  |  5 -----
 configs/kylin-rk3036_defconfig    |  5 -----
 configs/miqi-rk3288_defconfig     |  5 -----
 configs/phycore-rk3288_defconfig  |  5 -----
 configs/popmetal-rk3288_defconfig |  5 -----
 configs/rock2_defconfig           |  2 --
 configs/rock64-rk3328_defconfig   |  5 -----
 configs/rock960-rk3399_defconfig  |  2 ++
 configs/tinker-rk3288_defconfig   |  5 -----
 configs/tinker-s-rk3288_defconfig |  5 -----
 configs/vyasa-rk3288_defconfig    |  3 ---
 drivers/fastboot/Kconfig          |  3 ++-
 drivers/usb/dwc3/core.c           | 27 ++++++++++++++++++++++++++
 drivers/usb/dwc3/core.h           | 12 ++++++++++++
 drivers/usb/gadget/Kconfig        |  7 +++++++
 include/dwc3-uboot.h              |  2 ++
 include/linux/usb/phy.h           | 19 ++++++++++++++++++
 25 files changed, 101 insertions(+), 74 deletions(-)
 create mode 100644 include/linux/usb/phy.h

-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH v2 01/10] gadget: Select USB_GADGET_MANUFACTURER for rockchip
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Select the gadget manufacturer as 'Rockchip' for
all rockchip platform SoC's.

This eventually drop the explicit defined added
on supported board defconfig files.

Tested-by: Levin Du <djw-Efosm3t9Qi2Pt1CcHtbs0g@public.gmane.org>
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 configs/elgin-rv1108_defconfig    | 1 -
 configs/evb-rk3036_defconfig      | 1 -
 configs/evb-rk3229_defconfig      | 1 -
 configs/evb-rk3288_defconfig      | 1 -
 configs/evb-rk3328_defconfig      | 1 -
 configs/evb-rv1108_defconfig      | 1 -
 configs/firefly-rk3288_defconfig  | 1 -
 configs/kylin-rk3036_defconfig    | 1 -
 configs/miqi-rk3288_defconfig     | 1 -
 configs/phycore-rk3288_defconfig  | 1 -
 configs/popmetal-rk3288_defconfig | 1 -
 configs/rock2_defconfig           | 1 -
 configs/rock64-rk3328_defconfig   | 1 -
 configs/tinker-rk3288_defconfig   | 1 -
 configs/tinker-s-rk3288_defconfig | 1 -
 configs/vyasa-rk3288_defconfig    | 1 -
 drivers/usb/gadget/Kconfig        | 1 +
 17 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
index b3d8d28bea..c9d703a0f5 100644
--- a/configs/elgin-rv1108_defconfig
+++ b/configs/elgin-rv1108_defconfig
@@ -49,7 +49,6 @@ CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
index 5dd5f43f7c..c9882ded98 100644
--- a/configs/evb-rk3036_defconfig
+++ b/configs/evb-rk3036_defconfig
@@ -52,7 +52,6 @@ CONFIG_SYSRESET=y
 # CONFIG_SPL_SYSRESET is not set
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 745fdd1c0f..38b2660fb3 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index c2a78bd065..12d454b410 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index a59dab4853..8f97ef2c34 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -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_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
index 037715cbc0..18bc6529ac 100644
--- a/configs/evb-rv1108_defconfig
+++ b/configs/evb-rv1108_defconfig
@@ -44,7 +44,6 @@ CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 65e839214c..fa3715cf7e 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -75,7 +75,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index 1906d1d93f..4fc0c3e491 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -56,7 +56,6 @@ CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index 30b05ecf44..c007c90a90 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index d33f079dac..0329a8aa55 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -75,7 +75,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 7642ea38b1..95a0a4b4d1 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
index 3723a7e0dd..b7f6646381 100644
--- a/configs/rock2_defconfig
+++ b/configs/rock2_defconfig
@@ -72,7 +72,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 021f982e68..d9a170ba26 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -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_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index 0fd1612f87..bb561fac23 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -77,7 +77,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index c851a93f31..38cb1984d8 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -83,7 +83,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
index 6611080784..081e32d67d 100644
--- a/configs/vyasa-rk3288_defconfig
+++ b/configs/vyasa-rk3288_defconfig
@@ -69,7 +69,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 26b4d12a09..1959a390f3 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -39,6 +39,7 @@ if USB_GADGET
 config USB_GADGET_MANUFACTURER
 	string "Vendor name of the USB device"
 	default "Allwinner Technology" if ARCH_SUNXI
+	default "Rockchip" if ARCH_ROCKCHIP
 	default "U-Boot"
 	help
 	  Vendor name of the USB device emulated, reported to the host device.
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 01/10] gadget: Select USB_GADGET_MANUFACTURER for rockchip
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

Select the gadget manufacturer as 'Rockchip' for
all rockchip platform SoC's.

This eventually drop the explicit defined added
on supported board defconfig files.

Tested-by: Levin Du <djw@t-chip.com.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 configs/elgin-rv1108_defconfig    | 1 -
 configs/evb-rk3036_defconfig      | 1 -
 configs/evb-rk3229_defconfig      | 1 -
 configs/evb-rk3288_defconfig      | 1 -
 configs/evb-rk3328_defconfig      | 1 -
 configs/evb-rv1108_defconfig      | 1 -
 configs/firefly-rk3288_defconfig  | 1 -
 configs/kylin-rk3036_defconfig    | 1 -
 configs/miqi-rk3288_defconfig     | 1 -
 configs/phycore-rk3288_defconfig  | 1 -
 configs/popmetal-rk3288_defconfig | 1 -
 configs/rock2_defconfig           | 1 -
 configs/rock64-rk3328_defconfig   | 1 -
 configs/tinker-rk3288_defconfig   | 1 -
 configs/tinker-s-rk3288_defconfig | 1 -
 configs/vyasa-rk3288_defconfig    | 1 -
 drivers/usb/gadget/Kconfig        | 1 +
 17 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
index b3d8d28bea..c9d703a0f5 100644
--- a/configs/elgin-rv1108_defconfig
+++ b/configs/elgin-rv1108_defconfig
@@ -49,7 +49,6 @@ CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
index 5dd5f43f7c..c9882ded98 100644
--- a/configs/evb-rk3036_defconfig
+++ b/configs/evb-rk3036_defconfig
@@ -52,7 +52,6 @@ CONFIG_SYSRESET=y
 # CONFIG_SPL_SYSRESET is not set
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 745fdd1c0f..38b2660fb3 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index c2a78bd065..12d454b410 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index a59dab4853..8f97ef2c34 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -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_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
index 037715cbc0..18bc6529ac 100644
--- a/configs/evb-rv1108_defconfig
+++ b/configs/evb-rv1108_defconfig
@@ -44,7 +44,6 @@ CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 65e839214c..fa3715cf7e 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -75,7 +75,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index 1906d1d93f..4fc0c3e491 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -56,7 +56,6 @@ CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index 30b05ecf44..c007c90a90 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index d33f079dac..0329a8aa55 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -75,7 +75,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 7642ea38b1..95a0a4b4d1 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
index 3723a7e0dd..b7f6646381 100644
--- a/configs/rock2_defconfig
+++ b/configs/rock2_defconfig
@@ -72,7 +72,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 021f982e68..d9a170ba26 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -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_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index 0fd1612f87..bb561fac23 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -77,7 +77,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index c851a93f31..38cb1984d8 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -83,7 +83,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
index 6611080784..081e32d67d 100644
--- a/configs/vyasa-rk3288_defconfig
+++ b/configs/vyasa-rk3288_defconfig
@@ -69,7 +69,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
 CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 26b4d12a09..1959a390f3 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -39,6 +39,7 @@ if USB_GADGET
 config USB_GADGET_MANUFACTURER
 	string "Vendor name of the USB device"
 	default "Allwinner Technology" if ARCH_SUNXI
+	default "Rockchip" if ARCH_ROCKCHIP
 	default "U-Boot"
 	help
 	  Vendor name of the USB device emulated, reported to the host device.
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH v2 02/10] gadget: Select USB_GADGET_VENDOR_NUM for rockchip
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Gadget vendor number, 0x2207 is common across all platfroms
supported in Rockchip SoC.

So, select the same number globally, if ARCH_ROCKCHIP.

This eventually drop the explicit configs defined in supported
board defconfig files.

Tested-by: Levin Du <djw-Efosm3t9Qi2Pt1CcHtbs0g@public.gmane.org>
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 configs/elgin-rv1108_defconfig    | 1 -
 configs/evb-rk3036_defconfig      | 1 -
 configs/evb-rk3229_defconfig      | 1 -
 configs/evb-rk3288_defconfig      | 1 -
 configs/evb-rk3328_defconfig      | 1 -
 configs/evb-rv1108_defconfig      | 1 -
 configs/firefly-rk3288_defconfig  | 1 -
 configs/kylin-rk3036_defconfig    | 1 -
 configs/miqi-rk3288_defconfig     | 1 -
 configs/phycore-rk3288_defconfig  | 1 -
 configs/popmetal-rk3288_defconfig | 1 -
 configs/rock2_defconfig           | 1 -
 configs/rock64-rk3328_defconfig   | 1 -
 configs/tinker-rk3288_defconfig   | 1 -
 configs/tinker-s-rk3288_defconfig | 1 -
 configs/vyasa-rk3288_defconfig    | 1 -
 drivers/usb/gadget/Kconfig        | 1 +
 17 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
index c9d703a0f5..48351bb1dd 100644
--- a/configs/elgin-rv1108_defconfig
+++ b/configs/elgin-rv1108_defconfig
@@ -49,7 +49,6 @@ CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_ERRNO_STR=y
diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
index c9882ded98..bb3e2c8f7d 100644
--- a/configs/evb-rk3036_defconfig
+++ b/configs/evb-rk3036_defconfig
@@ -52,7 +52,6 @@ CONFIG_SYSRESET=y
 # CONFIG_SPL_SYSRESET is not set
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 38b2660fb3..7bf26f7497 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_TPL_TINY_MEMSET=y
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index 12d454b410..8f2f13adae 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_DM_VIDEO=y
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 8f97ef2c34..747089435d 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -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_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
index 18bc6529ac..c9cad2bb4a 100644
--- a/configs/evb-rv1108_defconfig
+++ b/configs/evb-rv1108_defconfig
@@ -44,7 +44,6 @@ CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_ERRNO_STR=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index fa3715cf7e..92eeffda01 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -75,7 +75,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index 4fc0c3e491..08b47c84ef 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -56,7 +56,6 @@ CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index c007c90a90..b06175958e 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index 0329a8aa55..a86f689858 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -75,7 +75,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 95a0a4b4d1..0cb67f33fe 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
index b7f6646381..1afb12d015 100644
--- a/configs/rock2_defconfig
+++ b/configs/rock2_defconfig
@@ -72,7 +72,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_DM_VIDEO=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index d9a170ba26..ec13a7710a 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -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_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index bb561fac23..e46eb1cd91 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -77,7 +77,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index 38cb1984d8..3acb2ac5f5 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -83,7 +83,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
index 081e32d67d..997d9a3877 100644
--- a/configs/vyasa-rk3288_defconfig
+++ b/configs/vyasa-rk3288_defconfig
@@ -69,7 +69,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_FUNCTION_MASS_STORAGE=y
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 1959a390f3..844c3be16f 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -48,6 +48,7 @@ config USB_GADGET_MANUFACTURER
 config USB_GADGET_VENDOR_NUM
 	hex "Vendor ID of the USB device"
 	default 0x1f3a if ARCH_SUNXI
+	default 0x2207 if ARCH_ROCKCHIP
 	default 0x0
 	help
 	  Vendor ID of the USB device emulated, reported to the host device.
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 02/10] gadget: Select USB_GADGET_VENDOR_NUM for rockchip
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

Gadget vendor number, 0x2207 is common across all platfroms
supported in Rockchip SoC.

So, select the same number globally, if ARCH_ROCKCHIP.

This eventually drop the explicit configs defined in supported
board defconfig files.

Tested-by: Levin Du <djw@t-chip.com.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 configs/elgin-rv1108_defconfig    | 1 -
 configs/evb-rk3036_defconfig      | 1 -
 configs/evb-rk3229_defconfig      | 1 -
 configs/evb-rk3288_defconfig      | 1 -
 configs/evb-rk3328_defconfig      | 1 -
 configs/evb-rv1108_defconfig      | 1 -
 configs/firefly-rk3288_defconfig  | 1 -
 configs/kylin-rk3036_defconfig    | 1 -
 configs/miqi-rk3288_defconfig     | 1 -
 configs/phycore-rk3288_defconfig  | 1 -
 configs/popmetal-rk3288_defconfig | 1 -
 configs/rock2_defconfig           | 1 -
 configs/rock64-rk3328_defconfig   | 1 -
 configs/tinker-rk3288_defconfig   | 1 -
 configs/tinker-s-rk3288_defconfig | 1 -
 configs/vyasa-rk3288_defconfig    | 1 -
 drivers/usb/gadget/Kconfig        | 1 +
 17 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
index c9d703a0f5..48351bb1dd 100644
--- a/configs/elgin-rv1108_defconfig
+++ b/configs/elgin-rv1108_defconfig
@@ -49,7 +49,6 @@ CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_ERRNO_STR=y
diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
index c9882ded98..bb3e2c8f7d 100644
--- a/configs/evb-rk3036_defconfig
+++ b/configs/evb-rk3036_defconfig
@@ -52,7 +52,6 @@ CONFIG_SYSRESET=y
 # CONFIG_SPL_SYSRESET is not set
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 38b2660fb3..7bf26f7497 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_TPL_TINY_MEMSET=y
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index 12d454b410..8f2f13adae 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_DM_VIDEO=y
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 8f97ef2c34..747089435d 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -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_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
index 18bc6529ac..c9cad2bb4a 100644
--- a/configs/evb-rv1108_defconfig
+++ b/configs/evb-rv1108_defconfig
@@ -44,7 +44,6 @@ CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_ERRNO_STR=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index fa3715cf7e..92eeffda01 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -75,7 +75,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index 4fc0c3e491..08b47c84ef 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -56,7 +56,6 @@ CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index c007c90a90..b06175958e 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index 0329a8aa55..a86f689858 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -75,7 +75,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 95a0a4b4d1..0cb67f33fe 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -71,7 +71,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
index b7f6646381..1afb12d015 100644
--- a/configs/rock2_defconfig
+++ b/configs/rock2_defconfig
@@ -72,7 +72,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_DM_VIDEO=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index d9a170ba26..ec13a7710a 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -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_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index bb561fac23..e46eb1cd91 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -77,7 +77,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index 38cb1984d8..3acb2ac5f5 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -83,7 +83,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_HOST_ETHER=y
diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
index 081e32d67d..997d9a3877 100644
--- a/configs/vyasa-rk3288_defconfig
+++ b/configs/vyasa-rk3288_defconfig
@@ -69,7 +69,6 @@ CONFIG_USB_DWC2=y
 CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_VENDOR_NUM=0x2207
 CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_FUNCTION_MASS_STORAGE=y
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 1959a390f3..844c3be16f 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -48,6 +48,7 @@ config USB_GADGET_MANUFACTURER
 config USB_GADGET_VENDOR_NUM
 	hex "Vendor ID of the USB device"
 	default 0x1f3a if ARCH_SUNXI
+	default 0x2207 if ARCH_ROCKCHIP
 	default 0x0
 	help
 	  Vendor ID of the USB device emulated, reported to the host device.
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH v2 03/10] gadget: rockchip: USB_GADGET_PRODUCT_NUM
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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>
---
 configs/evb-rk3036_defconfig      | 1 -
 configs/evb-rk3229_defconfig      | 1 -
 configs/evb-rk3288_defconfig      | 1 -
 configs/evb-rk3328_defconfig      | 1 -
 configs/firefly-rk3288_defconfig  | 1 -
 configs/kylin-rk3036_defconfig    | 1 -
 configs/miqi-rk3288_defconfig     | 1 -
 configs/phycore-rk3288_defconfig  | 1 -
 configs/popmetal-rk3288_defconfig | 1 -
 configs/rock64-rk3328_defconfig   | 1 -
 configs/tinker-rk3288_defconfig   | 1 -
 configs/tinker-s-rk3288_defconfig | 1 -
 configs/vyasa-rk3288_defconfig    | 1 -
 drivers/usb/gadget/Kconfig        | 3 +++
 14 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
index bb3e2c8f7d..79e413145f 100644
--- a/configs/evb-rk3036_defconfig
+++ b/configs/evb-rk3036_defconfig
@@ -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
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 7bf26f7497..8d7d11c3e8 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -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
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index 8f2f13adae..db7e6fa7b1 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -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
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 747089435d..0293546b04 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -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
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 92eeffda01..6efc5735f9 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -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
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index 08b47c84ef..c1607e52fb 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -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
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index b06175958e..4590e38ad3 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -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
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index a86f689858..51bd8adcbc 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -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
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 0cb67f33fe..8cc55bdbe0 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -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
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index ec13a7710a..0dab5d7e54 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -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
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index e46eb1cd91..c350c0d8ba 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -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
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index 3acb2ac5f5..c016a264b2 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -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
diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
index 997d9a3877..32c3502683 100644
--- a/configs/vyasa-rk3288_defconfig
+++ b/configs/vyasa-rk3288_defconfig
@@ -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
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 844c3be16f..e120b48b33 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -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.
-- 
2.18.0.321.gffc6fa0e3


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 03/10] gadget: rockchip: USB_GADGET_PRODUCT_NUM
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

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>
---
 configs/evb-rk3036_defconfig      | 1 -
 configs/evb-rk3229_defconfig      | 1 -
 configs/evb-rk3288_defconfig      | 1 -
 configs/evb-rk3328_defconfig      | 1 -
 configs/firefly-rk3288_defconfig  | 1 -
 configs/kylin-rk3036_defconfig    | 1 -
 configs/miqi-rk3288_defconfig     | 1 -
 configs/phycore-rk3288_defconfig  | 1 -
 configs/popmetal-rk3288_defconfig | 1 -
 configs/rock64-rk3328_defconfig   | 1 -
 configs/tinker-rk3288_defconfig   | 1 -
 configs/tinker-s-rk3288_defconfig | 1 -
 configs/vyasa-rk3288_defconfig    | 1 -
 drivers/usb/gadget/Kconfig        | 3 +++
 14 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
index bb3e2c8f7d..79e413145f 100644
--- a/configs/evb-rk3036_defconfig
+++ b/configs/evb-rk3036_defconfig
@@ -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
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 7bf26f7497..8d7d11c3e8 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -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
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index 8f2f13adae..db7e6fa7b1 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -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
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 747089435d..0293546b04 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -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
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 92eeffda01..6efc5735f9 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -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
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index 08b47c84ef..c1607e52fb 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -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
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index b06175958e..4590e38ad3 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -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
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index a86f689858..51bd8adcbc 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -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
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 0cb67f33fe..8cc55bdbe0 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -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
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index ec13a7710a..0dab5d7e54 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -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
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index e46eb1cd91..c350c0d8ba 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -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
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index 3acb2ac5f5..c016a264b2 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -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
diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
index 997d9a3877..32c3502683 100644
--- a/configs/vyasa-rk3288_defconfig
+++ b/configs/vyasa-rk3288_defconfig
@@ -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
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 844c3be16f..e120b48b33 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -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.
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH v2 04/10] gadget: rockchip: Add rk3128 USB_GADGET_PRODUCT_NUM
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Add 0x310c for rk3128 gadget product number.

Tested-by: Levin Du <djw-Efosm3t9Qi2Pt1CcHtbs0g@public.gmane.org>
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index e120b48b33..2da8b40e05 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -59,6 +59,7 @@ config USB_GADGET_PRODUCT_NUM
 	hex "Product ID of the USB device"
 	default 0x1010 if ARCH_SUNXI
 	default 0x310a if ROCKCHIP_RK3036
+	default 0x310c if ROCKCHIP_RK3128
 	default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
 	default 0x330a if ROCKCHIP_RK3328
 	default 0x0
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 04/10] gadget: rockchip: Add rk3128 USB_GADGET_PRODUCT_NUM
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

Add 0x310c for rk3128 gadget product number.

Tested-by: Levin Du <djw@t-chip.com.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index e120b48b33..2da8b40e05 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -59,6 +59,7 @@ config USB_GADGET_PRODUCT_NUM
 	hex "Product ID of the USB device"
 	default 0x1010 if ARCH_SUNXI
 	default 0x310a if ROCKCHIP_RK3036
+	default 0x310c if ROCKCHIP_RK3128
 	default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
 	default 0x330a if ROCKCHIP_RK3328
 	default 0x0
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH v2 05/10] fastboot: rockchip: Select FASTBOOT_FLASH[_MMC_DEV]
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Select CONFIG_FASTBOOT_FLASH, CONFIG_FASTBOOT_FLASH_MMC_DEV
for rockchip SoC plaforms in fastboot Kconfig file instead
of defined it in board defconfig.

This eventually drop the explicit configs defined in
supporting board defconfig files.

Tested-by: Levin Du <djw-Efosm3t9Qi2Pt1CcHtbs0g@public.gmane.org>
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 configs/evb-rk3036_defconfig      | 2 --
 configs/evb-rk3128_defconfig      | 2 --
 configs/evb-rk3229_defconfig      | 2 --
 configs/evb-rk3288_defconfig      | 2 --
 configs/evb-rk3328_defconfig      | 2 --
 configs/firefly-rk3288_defconfig  | 2 --
 configs/kylin-rk3036_defconfig    | 2 --
 configs/miqi-rk3288_defconfig     | 2 --
 configs/phycore-rk3288_defconfig  | 2 --
 configs/popmetal-rk3288_defconfig | 2 --
 configs/rock64-rk3328_defconfig   | 2 --
 configs/tinker-rk3288_defconfig   | 2 --
 configs/tinker-s-rk3288_defconfig | 2 --
 drivers/fastboot/Kconfig          | 4 +++-
 14 files changed, 3 insertions(+), 27 deletions(-)

diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
index 79e413145f..4bed28f102 100644
--- a/configs/evb-rk3036_defconfig
+++ b/configs/evb-rk3036_defconfig
@@ -35,8 +35,6 @@ CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 # CONFIG_SPL_BLK is not set
 CONFIG_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/evb-rk3128_defconfig b/configs/evb-rk3128_defconfig
index cb3c5372aa..bf91c642dd 100644
--- a/configs/evb-rk3128_defconfig
+++ b/configs/evb-rk3128_defconfig
@@ -23,8 +23,6 @@ CONFIG_SYSCON=y
 CONFIG_CLK=y
 CONFIG_FASTBOOT_BUF_ADDR=0x60800800
 CONFIG_FASTBOOT_BUF_SIZE=0x04000000
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 8d7d11c3e8..cdf28154f8 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -44,8 +44,6 @@ CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_TPL_CLK=y
 CONFIG_FASTBOOT_BUF_SIZE=0x04000000
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index db7e6fa7b1..833b0b6a6d 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -43,8 +43,6 @@ CONFIG_SYSCON=y
 CONFIG_SPL_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 0293546b04..74b7295e62 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -46,8 +46,6 @@ CONFIG_TPL_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_FASTBOOT_BUF_ADDR=0x800800
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 6efc5735f9..178029cc47 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -44,8 +44,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index c1607e52fb..6c13c4c080 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -37,8 +37,6 @@ CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 # CONFIG_SPL_BLK is not set
 CONFIG_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index 4590e38ad3..488cc54203 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -45,8 +45,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index 51bd8adcbc..75de1d68e5 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -47,8 +47,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 8cc55bdbe0..320f34bd04 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -45,8 +45,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 0dab5d7e54..73ca535ff8 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -48,8 +48,6 @@ CONFIG_TPL_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_FASTBOOT_BUF_ADDR=0x800800
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index c350c0d8ba..56fcbb94d3 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -47,8 +47,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index c016a264b2..458e1695a2 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -52,8 +52,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
index d63ecdd27e..34864ca613 100644
--- a/drivers/fastboot/Kconfig
+++ b/drivers/fastboot/Kconfig
@@ -64,7 +64,7 @@ config FASTBOOT_USB_DEV
 
 config FASTBOOT_FLASH
 	bool "Enable FASTBOOT FLASH command"
-	default y if ARCH_SUNXI
+	default y if ARCH_SUNXI || ARCH_ROCKCHIP
 	depends on MMC || (NAND && CMD_MTDPARTS)
 	select IMAGE_SPARSE
 	help
@@ -89,6 +89,8 @@ endchoice
 config FASTBOOT_FLASH_MMC_DEV
 	int "Define FASTBOOT MMC FLASH default device"
 	depends on FASTBOOT_FLASH_MMC
+	default 1 if ROCKCHIP_RK3328
+	default 0 if ARCH_ROCKCHIP
 	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
 	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
 	help
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 05/10] fastboot: rockchip: Select FASTBOOT_FLASH[_MMC_DEV]
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

Select CONFIG_FASTBOOT_FLASH, CONFIG_FASTBOOT_FLASH_MMC_DEV
for rockchip SoC plaforms in fastboot Kconfig file instead
of defined it in board defconfig.

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>
---
 configs/evb-rk3036_defconfig      | 2 --
 configs/evb-rk3128_defconfig      | 2 --
 configs/evb-rk3229_defconfig      | 2 --
 configs/evb-rk3288_defconfig      | 2 --
 configs/evb-rk3328_defconfig      | 2 --
 configs/firefly-rk3288_defconfig  | 2 --
 configs/kylin-rk3036_defconfig    | 2 --
 configs/miqi-rk3288_defconfig     | 2 --
 configs/phycore-rk3288_defconfig  | 2 --
 configs/popmetal-rk3288_defconfig | 2 --
 configs/rock64-rk3328_defconfig   | 2 --
 configs/tinker-rk3288_defconfig   | 2 --
 configs/tinker-s-rk3288_defconfig | 2 --
 drivers/fastboot/Kconfig          | 4 +++-
 14 files changed, 3 insertions(+), 27 deletions(-)

diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
index 79e413145f..4bed28f102 100644
--- a/configs/evb-rk3036_defconfig
+++ b/configs/evb-rk3036_defconfig
@@ -35,8 +35,6 @@ CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 # CONFIG_SPL_BLK is not set
 CONFIG_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/evb-rk3128_defconfig b/configs/evb-rk3128_defconfig
index cb3c5372aa..bf91c642dd 100644
--- a/configs/evb-rk3128_defconfig
+++ b/configs/evb-rk3128_defconfig
@@ -23,8 +23,6 @@ CONFIG_SYSCON=y
 CONFIG_CLK=y
 CONFIG_FASTBOOT_BUF_ADDR=0x60800800
 CONFIG_FASTBOOT_BUF_SIZE=0x04000000
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 8d7d11c3e8..cdf28154f8 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -44,8 +44,6 @@ CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_TPL_CLK=y
 CONFIG_FASTBOOT_BUF_SIZE=0x04000000
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index db7e6fa7b1..833b0b6a6d 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -43,8 +43,6 @@ CONFIG_SYSCON=y
 CONFIG_SPL_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 0293546b04..74b7295e62 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -46,8 +46,6 @@ CONFIG_TPL_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_FASTBOOT_BUF_ADDR=0x800800
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 6efc5735f9..178029cc47 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -44,8 +44,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index c1607e52fb..6c13c4c080 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -37,8 +37,6 @@ CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 # CONFIG_SPL_BLK is not set
 CONFIG_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index 4590e38ad3..488cc54203 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -45,8 +45,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index 51bd8adcbc..75de1d68e5 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -47,8 +47,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 8cc55bdbe0..320f34bd04 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -45,8 +45,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 0dab5d7e54..73ca535ff8 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -48,8 +48,6 @@ CONFIG_TPL_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_FASTBOOT_BUF_ADDR=0x800800
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index c350c0d8ba..56fcbb94d3 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -47,8 +47,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index c016a264b2..458e1695a2 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -52,8 +52,6 @@ CONFIG_SPL_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
index d63ecdd27e..34864ca613 100644
--- a/drivers/fastboot/Kconfig
+++ b/drivers/fastboot/Kconfig
@@ -64,7 +64,7 @@ config FASTBOOT_USB_DEV
 
 config FASTBOOT_FLASH
 	bool "Enable FASTBOOT FLASH command"
-	default y if ARCH_SUNXI
+	default y if ARCH_SUNXI || ARCH_ROCKCHIP
 	depends on MMC || (NAND && CMD_MTDPARTS)
 	select IMAGE_SPARSE
 	help
@@ -89,6 +89,8 @@ endchoice
 config FASTBOOT_FLASH_MMC_DEV
 	int "Define FASTBOOT MMC FLASH default device"
 	depends on FASTBOOT_FLASH_MMC
+	default 1 if ROCKCHIP_RK3328
+	default 0 if ARCH_ROCKCHIP
 	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
 	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
 	help
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH v2 06/10] fastboot: rockchip: Fix rk3328 default mmc device
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Technically the default mmc device for fastboot would
use eMMC if the board support for it.

Rockchip platform access device 0 for eMMC so, use the
same device number for rk3328.

Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 drivers/fastboot/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
index 34864ca613..433ea0dc3b 100644
--- a/drivers/fastboot/Kconfig
+++ b/drivers/fastboot/Kconfig
@@ -89,7 +89,6 @@ endchoice
 config FASTBOOT_FLASH_MMC_DEV
 	int "Define FASTBOOT MMC FLASH default device"
 	depends on FASTBOOT_FLASH_MMC
-	default 1 if ROCKCHIP_RK3328
 	default 0 if ARCH_ROCKCHIP
 	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
 	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 06/10] fastboot: rockchip: Fix rk3328 default mmc device
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

Technically the default mmc device for fastboot would
use eMMC if the board support for it.

Rockchip platform access device 0 for eMMC so, use the
same device number for rk3328.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/fastboot/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
index 34864ca613..433ea0dc3b 100644
--- a/drivers/fastboot/Kconfig
+++ b/drivers/fastboot/Kconfig
@@ -89,7 +89,6 @@ endchoice
 config FASTBOOT_FLASH_MMC_DEV
 	int "Define FASTBOOT MMC FLASH default device"
 	depends on FASTBOOT_FLASH_MMC
-	default 1 if ROCKCHIP_RK3328
 	default 0 if ARCH_ROCKCHIP
 	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
 	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH v2 07/10] usb: dwc3: Add phy interface for dwc3_uboot
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: Marek Vasut, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	u-boot-0aAXYlwwYIKGBzrmiIFOJg, Jagan Teki, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/

U-Boot has two different variants of dwc3 initializations,
- with dm variant gadget, so the respective dm driver would
  call the dwc3_init in core.
- with non-dm variant gadget, so the usage board file would
  call dwc3_uboot_init in core.

The driver probe would handle all respective gadget properties
including phy interface via phy_type property and then trigger
dwc3_init for dm-variant gadgets.

So, to support the phy interface for non-dm variant gadgets,
the better option is dwc3_uboot_init since there is no
dedicated controller for non-dm variant gadgets.

This patch support for adding phy interface like 8/16-bit UTMI+
code for dwc3_uboot.

This change used Linux phy.h enum list, to make proper code
compatibility.

Cc: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
Tested-by: Levin Du <djw-Efosm3t9Qi2Pt1CcHtbs0g@public.gmane.org>
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 drivers/usb/dwc3/core.c | 27 +++++++++++++++++++++++++++
 drivers/usb/dwc3/core.h | 12 ++++++++++++
 include/dwc3-uboot.h    |  2 ++
 include/linux/usb/phy.h | 19 +++++++++++++++++++
 4 files changed, 60 insertions(+)
 create mode 100644 include/linux/usb/phy.h

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 23af60c98d..f779562de2 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -613,6 +613,31 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
 	dwc3_gadget_run(dwc);
 }
 
+static void dwc3_uboot_hsphy_mode(struct dwc3_device *dwc3_dev,
+				  struct dwc3 *dwc)
+{
+	enum usb_phy_interface hsphy_mode = dwc3_dev->hsphy_mode;
+	u32 reg;
+
+	/* Set dwc3 usb2 phy config */
+	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
+	reg |= DWC3_GUSB2PHYCFG_PHYIF;
+	reg &= ~DWC3_GUSB2PHYCFG_USBTRDTIM_MASK;
+
+	switch (hsphy_mode) {
+	case USBPHY_INTERFACE_MODE_UTMI:
+		reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT;
+		break;
+	case USBPHY_INTERFACE_MODE_UTMIW:
+		reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT;
+		break;
+	default:
+		break;
+	}
+
+	dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
+}
+
 #define DWC3_ALIGN_MASK		(16 - 1)
 
 /**
@@ -721,6 +746,8 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
 		goto err0;
 	}
 
+	dwc3_uboot_hsphy_mode(dwc3_dev, dwc);
+
 	ret = dwc3_event_buffers_setup(dwc);
 	if (ret) {
 		dev_err(dwc->dev, "failed to setup event buffers\n");
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index be9672266a..bff53e072b 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -162,6 +162,18 @@
 /* Global USB2 PHY Configuration Register */
 #define DWC3_GUSB2PHYCFG_PHYSOFTRST	(1 << 31)
 #define DWC3_GUSB2PHYCFG_SUSPHY		(1 << 6)
+#define DWC3_GUSB2PHYCFG_PHYIF		BIT(3)
+
+/* Global USB2 PHY Configuration Mask */
+#define DWC3_GUSB2PHYCFG_USBTRDTIM_MASK		(0xf << 10)
+
+/* Global USB2 PHY Configuration Offset */
+#define DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET	10
+
+#define DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT	(0x5 << \
+		DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
+#define DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT		(0x9 << \
+		DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
 
 /* Global USB3 PIPE Control Register */
 #define DWC3_GUSB3PIPECTL_PHYSOFTRST	(1 << 31)
diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h
index 9941cc37a3..3c9e204cf0 100644
--- a/include/dwc3-uboot.h
+++ b/include/dwc3-uboot.h
@@ -10,10 +10,12 @@
 #define __DWC3_UBOOT_H_
 
 #include <linux/usb/otg.h>
+#include <linux/usb/phy.h>
 
 struct dwc3_device {
 	unsigned long base;
 	enum usb_dr_mode dr_mode;
+	enum usb_phy_interface hsphy_mode;
 	u32 maximum_speed;
 	unsigned tx_fifo_resize:1;
 	unsigned has_lpm_erratum;
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
new file mode 100644
index 0000000000..158ca9cd85
--- /dev/null
+++ b/include/linux/usb/phy.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * USB PHY defines
+ *
+ * These APIs may be used between USB controllers.  USB device drivers
+ * (for either host or peripheral roles) don't use these calls; they
+ * continue to use just usb_device and usb_gadget.
+ */
+
+#ifndef __LINUX_USB_PHY_H
+#define __LINUX_USB_PHY_H
+
+enum usb_phy_interface {
+	USBPHY_INTERFACE_MODE_UNKNOWN,
+	USBPHY_INTERFACE_MODE_UTMI,
+	USBPHY_INTERFACE_MODE_UTMIW,
+};
+
+#endif /* __LINUX_USB_PHY_H */
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 07/10] usb: dwc3: Add phy interface for dwc3_uboot
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

U-Boot has two different variants of dwc3 initializations,
- with dm variant gadget, so the respective dm driver would
  call the dwc3_init in core.
- with non-dm variant gadget, so the usage board file would
  call dwc3_uboot_init in core.

The driver probe would handle all respective gadget properties
including phy interface via phy_type property and then trigger
dwc3_init for dm-variant gadgets.

So, to support the phy interface for non-dm variant gadgets,
the better option is dwc3_uboot_init since there is no
dedicated controller for non-dm variant gadgets.

This patch support for adding phy interface like 8/16-bit UTMI+
code for dwc3_uboot.

This change used Linux phy.h enum list, to make proper code
compatibility.

Cc: Marek Vasut <marex@denx.de>
Tested-by: Levin Du <djw@t-chip.com.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/usb/dwc3/core.c | 27 +++++++++++++++++++++++++++
 drivers/usb/dwc3/core.h | 12 ++++++++++++
 include/dwc3-uboot.h    |  2 ++
 include/linux/usb/phy.h | 19 +++++++++++++++++++
 4 files changed, 60 insertions(+)
 create mode 100644 include/linux/usb/phy.h

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 23af60c98d..f779562de2 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -613,6 +613,31 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
 	dwc3_gadget_run(dwc);
 }
 
+static void dwc3_uboot_hsphy_mode(struct dwc3_device *dwc3_dev,
+				  struct dwc3 *dwc)
+{
+	enum usb_phy_interface hsphy_mode = dwc3_dev->hsphy_mode;
+	u32 reg;
+
+	/* Set dwc3 usb2 phy config */
+	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
+	reg |= DWC3_GUSB2PHYCFG_PHYIF;
+	reg &= ~DWC3_GUSB2PHYCFG_USBTRDTIM_MASK;
+
+	switch (hsphy_mode) {
+	case USBPHY_INTERFACE_MODE_UTMI:
+		reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT;
+		break;
+	case USBPHY_INTERFACE_MODE_UTMIW:
+		reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT;
+		break;
+	default:
+		break;
+	}
+
+	dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
+}
+
 #define DWC3_ALIGN_MASK		(16 - 1)
 
 /**
@@ -721,6 +746,8 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
 		goto err0;
 	}
 
+	dwc3_uboot_hsphy_mode(dwc3_dev, dwc);
+
 	ret = dwc3_event_buffers_setup(dwc);
 	if (ret) {
 		dev_err(dwc->dev, "failed to setup event buffers\n");
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index be9672266a..bff53e072b 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -162,6 +162,18 @@
 /* Global USB2 PHY Configuration Register */
 #define DWC3_GUSB2PHYCFG_PHYSOFTRST	(1 << 31)
 #define DWC3_GUSB2PHYCFG_SUSPHY		(1 << 6)
+#define DWC3_GUSB2PHYCFG_PHYIF		BIT(3)
+
+/* Global USB2 PHY Configuration Mask */
+#define DWC3_GUSB2PHYCFG_USBTRDTIM_MASK		(0xf << 10)
+
+/* Global USB2 PHY Configuration Offset */
+#define DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET	10
+
+#define DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT	(0x5 << \
+		DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
+#define DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT		(0x9 << \
+		DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
 
 /* Global USB3 PIPE Control Register */
 #define DWC3_GUSB3PIPECTL_PHYSOFTRST	(1 << 31)
diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h
index 9941cc37a3..3c9e204cf0 100644
--- a/include/dwc3-uboot.h
+++ b/include/dwc3-uboot.h
@@ -10,10 +10,12 @@
 #define __DWC3_UBOOT_H_
 
 #include <linux/usb/otg.h>
+#include <linux/usb/phy.h>
 
 struct dwc3_device {
 	unsigned long base;
 	enum usb_dr_mode dr_mode;
+	enum usb_phy_interface hsphy_mode;
 	u32 maximum_speed;
 	unsigned tx_fifo_resize:1;
 	unsigned has_lpm_erratum;
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
new file mode 100644
index 0000000000..158ca9cd85
--- /dev/null
+++ b/include/linux/usb/phy.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * USB PHY defines
+ *
+ * These APIs may be used between USB controllers.  USB device drivers
+ * (for either host or peripheral roles) don't use these calls; they
+ * continue to use just usb_device and usb_gadget.
+ */
+
+#ifndef __LINUX_USB_PHY_H
+#define __LINUX_USB_PHY_H
+
+enum usb_phy_interface {
+	USBPHY_INTERFACE_MODE_UNKNOWN,
+	USBPHY_INTERFACE_MODE_UTMI,
+	USBPHY_INTERFACE_MODE_UTMIW,
+};
+
+#endif /* __LINUX_USB_PHY_H */
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH v2 08/10] gadget: rockchip: Add rk3399 USB_GADGET_PRODUCT_NUM
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Add 0x330c for rk3399 gadget product number.

Tested-by: Levin Du <djw-Efosm3t9Qi2Pt1CcHtbs0g@public.gmane.org>
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 2da8b40e05..58ca82d4de 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -62,6 +62,7 @@ config USB_GADGET_PRODUCT_NUM
 	default 0x310c if ROCKCHIP_RK3128
 	default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
 	default 0x330a if ROCKCHIP_RK3328
+	default 0x330c if ROCKCHIP_RK3399
 	default 0x0
 	help
 	  Product ID of the USB device emulated, reported to the host device.
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 08/10] gadget: rockchip: Add rk3399 USB_GADGET_PRODUCT_NUM
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

Add 0x330c for rk3399 gadget product number.

Tested-by: Levin Du <djw@t-chip.com.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 2da8b40e05..58ca82d4de 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -62,6 +62,7 @@ config USB_GADGET_PRODUCT_NUM
 	default 0x310c if ROCKCHIP_RK3128
 	default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
 	default 0x330a if ROCKCHIP_RK3328
+	default 0x330c if ROCKCHIP_RK3399
 	default 0x0
 	help
 	  Product ID of the USB device emulated, reported to the host device.
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets)
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: Marek Vasut, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	u-boot-0aAXYlwwYIKGBzrmiIFOJg, Jagan Teki, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/

Setup dwc3_device structure for non-dm gadgets, which is used
in rk3399 platforms.

dwc3_device would have basic regbase, dr_mode, high speed
and 16-bit UTMI+ etc.

Cc: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
Tested-by: Levin Du <djw-Efosm3t9Qi2Pt1CcHtbs0g@public.gmane.org>
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 arch/arm/mach-rockchip/board.c | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index c90eb976d0..542823b8cd 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -49,8 +49,10 @@ void enable_caches(void)
 }
 #endif
 
-#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
+#if defined(CONFIG_USB_GADGET)
 #include <usb.h>
+
+#if defined(CONFIG_USB_GADGET_DWC2_OTG)
 #include <usb/dwc2_udc.h>
 
 static struct dwc2_plat_otg_data otg_data = {
@@ -117,7 +119,33 @@ int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return 0;
 }
-#endif
+#endif /* CONFIG_USB_GADGET_DWC2_OTG */
+
+#if defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB_GADGET)
+#include <dwc3-uboot.h>
+
+static struct dwc3_device dwc3_device_data = {
+	.maximum_speed = USB_SPEED_HIGH,
+	.base = 0xfe800000,
+	.dr_mode = USB_DR_MODE_PERIPHERAL,
+	.index = 0,
+	.dis_u2_susphy_quirk = 1,
+	.hsphy_mode = USBPHY_INTERFACE_MODE_UTMIW,
+};
+
+int usb_gadget_handle_interrupts(void)
+{
+	dwc3_uboot_handle_interrupt(0);
+	return 0;
+}
+
+int board_usb_init(int index, enum usb_init_type init)
+{
+	return dwc3_uboot_init(&dwc3_device_data);
+}
+#endif /* CONFIG_USB_DWC3 */
+
+#endif /* CONFIG_USB_GADGET */
 
 #if CONFIG_IS_ENABLED(FASTBOOT)
 int fastboot_set_reboot_flag(void)
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets)
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

Setup dwc3_device structure for non-dm gadgets, which is used
in rk3399 platforms.

dwc3_device would have basic regbase, dr_mode, high speed
and 16-bit UTMI+ etc.

Cc: Marek Vasut <marex@denx.de>
Tested-by: Levin Du <djw@t-chip.com.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/mach-rockchip/board.c | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index c90eb976d0..542823b8cd 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -49,8 +49,10 @@ void enable_caches(void)
 }
 #endif
 
-#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
+#if defined(CONFIG_USB_GADGET)
 #include <usb.h>
+
+#if defined(CONFIG_USB_GADGET_DWC2_OTG)
 #include <usb/dwc2_udc.h>
 
 static struct dwc2_plat_otg_data otg_data = {
@@ -117,7 +119,33 @@ int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return 0;
 }
-#endif
+#endif /* CONFIG_USB_GADGET_DWC2_OTG */
+
+#if defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB_GADGET)
+#include <dwc3-uboot.h>
+
+static struct dwc3_device dwc3_device_data = {
+	.maximum_speed = USB_SPEED_HIGH,
+	.base = 0xfe800000,
+	.dr_mode = USB_DR_MODE_PERIPHERAL,
+	.index = 0,
+	.dis_u2_susphy_quirk = 1,
+	.hsphy_mode = USBPHY_INTERFACE_MODE_UTMIW,
+};
+
+int usb_gadget_handle_interrupts(void)
+{
+	dwc3_uboot_handle_interrupt(0);
+	return 0;
+}
+
+int board_usb_init(int index, enum usb_init_type init)
+{
+	return dwc3_uboot_init(&dwc3_device_data);
+}
+#endif /* CONFIG_USB_DWC3 */
+
+#endif /* CONFIG_USB_GADGET */
 
 #if CONFIG_IS_ENABLED(FASTBOOT)
 int fastboot_set_reboot_flag(void)
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH v2 10/10] rock960: Enable USB Gadget
  2019-11-19  8:26 ` [U-Boot] " Jagan Teki
@ 2019-11-19  8:26     ` Jagan Teki
  -1 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Enable DWC3 core, gadget for rock960 board.

This would help to use fastboot by default.

Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 configs/rock960-rk3399_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
index 979ca0f93b..d0ad6865cf 100644
--- a/configs/rock960-rk3399_defconfig
+++ b/configs/rock960-rk3399_defconfig
@@ -57,6 +57,8 @@ CONFIG_USB_ETHER_ASIX88179=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_DWC3=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 10/10] rock960: Enable USB Gadget
@ 2019-11-19  8:26     ` Jagan Teki
  0 siblings, 0 replies; 46+ messages in thread
From: Jagan Teki @ 2019-11-19  8:26 UTC (permalink / raw)
  To: u-boot

Enable DWC3 core, gadget for rock960 board.

This would help to use fastboot by default.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 configs/rock960-rk3399_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
index 979ca0f93b..d0ad6865cf 100644
--- a/configs/rock960-rk3399_defconfig
+++ b/configs/rock960-rk3399_defconfig
@@ -57,6 +57,8 @@ CONFIG_USB_ETHER_ASIX88179=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_DWC3=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
-- 
2.18.0.321.gffc6fa0e3

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 07/10] usb: dwc3: Add phy interface for dwc3_uboot
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-19 11:13       ` Marek Vasut
  -1 siblings, 0 replies; 46+ messages in thread
From: Marek Vasut @ 2019-11-19 11:13 UTC (permalink / raw)
  To: Jagan Teki, Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot, linux-amarula, linux-rockchip

On 11/19/19 9:26 AM, Jagan Teki wrote:
> U-Boot has two different variants of dwc3 initializations,
> - with dm variant gadget, so the respective dm driver would
>   call the dwc3_init in core.
> - with non-dm variant gadget, so the usage board file would
>   call dwc3_uboot_init in core.
> 
> The driver probe would handle all respective gadget properties
> including phy interface via phy_type property and then trigger
> dwc3_init for dm-variant gadgets.
> 
> So, to support the phy interface for non-dm variant gadgets,
> the better option is dwc3_uboot_init since there is no
> dedicated controller for non-dm variant gadgets.
> 
> This patch support for adding phy interface like 8/16-bit UTMI+
> code for dwc3_uboot.
> 
> This change used Linux phy.h enum list, to make proper code
> compatibility.
> 
> Cc: Marek Vasut <marex@denx.de>
> Tested-by: Levin Du <djw@t-chip.com.cn>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Reviewed-by: Marek Vasut <marex@denx.de>
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 07/10] usb: dwc3: Add phy interface for dwc3_uboot
@ 2019-11-19 11:13       ` Marek Vasut
  0 siblings, 0 replies; 46+ messages in thread
From: Marek Vasut @ 2019-11-19 11:13 UTC (permalink / raw)
  To: u-boot

On 11/19/19 9:26 AM, Jagan Teki wrote:
> U-Boot has two different variants of dwc3 initializations,
> - with dm variant gadget, so the respective dm driver would
>   call the dwc3_init in core.
> - with non-dm variant gadget, so the usage board file would
>   call dwc3_uboot_init in core.
> 
> The driver probe would handle all respective gadget properties
> including phy interface via phy_type property and then trigger
> dwc3_init for dm-variant gadgets.
> 
> So, to support the phy interface for non-dm variant gadgets,
> the better option is dwc3_uboot_init since there is no
> dedicated controller for non-dm variant gadgets.
> 
> This patch support for adding phy interface like 8/16-bit UTMI+
> code for dwc3_uboot.
> 
> This change used Linux phy.h enum list, to make proper code
> compatibility.
> 
> Cc: Marek Vasut <marex@denx.de>
> Tested-by: Levin Du <djw@t-chip.com.cn>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Reviewed-by: Marek Vasut <marex@denx.de>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 01/10] gadget: Select USB_GADGET_MANUFACTURER for rockchip
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:20       ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:20 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: u-boot, linux-amarula, linux-rockchip


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Select the gadget manufacturer as 'Rockchip' for
> all rockchip platform SoC's.
>
> This eventually drop the explicit defined added
> on supported 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>

Thanks,
- Kever
> ---
>   configs/elgin-rv1108_defconfig    | 1 -
>   configs/evb-rk3036_defconfig      | 1 -
>   configs/evb-rk3229_defconfig      | 1 -
>   configs/evb-rk3288_defconfig      | 1 -
>   configs/evb-rk3328_defconfig      | 1 -
>   configs/evb-rv1108_defconfig      | 1 -
>   configs/firefly-rk3288_defconfig  | 1 -
>   configs/kylin-rk3036_defconfig    | 1 -
>   configs/miqi-rk3288_defconfig     | 1 -
>   configs/phycore-rk3288_defconfig  | 1 -
>   configs/popmetal-rk3288_defconfig | 1 -
>   configs/rock2_defconfig           | 1 -
>   configs/rock64-rk3328_defconfig   | 1 -
>   configs/tinker-rk3288_defconfig   | 1 -
>   configs/tinker-s-rk3288_defconfig | 1 -
>   configs/vyasa-rk3288_defconfig    | 1 -
>   drivers/usb/gadget/Kconfig        | 1 +
>   17 files changed, 1 insertion(+), 16 deletions(-)
>
> diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
> index b3d8d28bea..c9d703a0f5 100644
> --- a/configs/elgin-rv1108_defconfig
> +++ b/configs/elgin-rv1108_defconfig
> @@ -49,7 +49,6 @@ CONFIG_USB_OHCI_HCD=y
>   CONFIG_USB_OHCI_GENERIC=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
> index 5dd5f43f7c..c9882ded98 100644
> --- a/configs/evb-rk3036_defconfig
> +++ b/configs/evb-rk3036_defconfig
> @@ -52,7 +52,6 @@ CONFIG_SYSRESET=y
>   # CONFIG_SPL_SYSRESET is not set
>   CONFIG_USB=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
> index 745fdd1c0f..38b2660fb3 100644
> --- a/configs/evb-rk3229_defconfig
> +++ b/configs/evb-rk3229_defconfig
> @@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2
>   CONFIG_SYSRESET=y
>   CONFIG_USB=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
> index c2a78bd065..12d454b410 100644
> --- a/configs/evb-rk3288_defconfig
> +++ b/configs/evb-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index a59dab4853..8f97ef2c34 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -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_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
> index 037715cbc0..18bc6529ac 100644
> --- a/configs/evb-rv1108_defconfig
> +++ b/configs/evb-rv1108_defconfig
> @@ -44,7 +44,6 @@ CONFIG_USB_OHCI_HCD=y
>   CONFIG_USB_OHCI_GENERIC=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
> index 65e839214c..fa3715cf7e 100644
> --- a/configs/firefly-rk3288_defconfig
> +++ b/configs/firefly-rk3288_defconfig
> @@ -75,7 +75,6 @@ CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_KEYBOARD=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
> index 1906d1d93f..4fc0c3e491 100644
> --- a/configs/kylin-rk3036_defconfig
> +++ b/configs/kylin-rk3036_defconfig
> @@ -56,7 +56,6 @@ CONFIG_SYSRESET=y
>   CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
> index 30b05ecf44..c007c90a90 100644
> --- a/configs/miqi-rk3288_defconfig
> +++ b/configs/miqi-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
> index d33f079dac..0329a8aa55 100644
> --- a/configs/phycore-rk3288_defconfig
> +++ b/configs/phycore-rk3288_defconfig
> @@ -75,7 +75,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
> index 7642ea38b1..95a0a4b4d1 100644
> --- a/configs/popmetal-rk3288_defconfig
> +++ b/configs/popmetal-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
> index 3723a7e0dd..b7f6646381 100644
> --- a/configs/rock2_defconfig
> +++ b/configs/rock2_defconfig
> @@ -72,7 +72,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index 021f982e68..d9a170ba26 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -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_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index 0fd1612f87..bb561fac23 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -77,7 +77,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index c851a93f31..38cb1984d8 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -83,7 +83,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
> index 6611080784..081e32d67d 100644
> --- a/configs/vyasa-rk3288_defconfig
> +++ b/configs/vyasa-rk3288_defconfig
> @@ -69,7 +69,6 @@ CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_KEYBOARD=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 26b4d12a09..1959a390f3 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -39,6 +39,7 @@ if USB_GADGET
>   config USB_GADGET_MANUFACTURER
>   	string "Vendor name of the USB device"
>   	default "Allwinner Technology" if ARCH_SUNXI
> +	default "Rockchip" if ARCH_ROCKCHIP
>   	default "U-Boot"
>   	help
>   	  Vendor name of the USB device emulated, reported to the host device.


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 01/10] gadget: Select USB_GADGET_MANUFACTURER for rockchip
@ 2019-11-23 14:20       ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:20 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Select the gadget manufacturer as 'Rockchip' for
> all rockchip platform SoC's.
>
> This eventually drop the explicit defined added
> on supported 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>

Thanks,
- Kever
> ---
>   configs/elgin-rv1108_defconfig    | 1 -
>   configs/evb-rk3036_defconfig      | 1 -
>   configs/evb-rk3229_defconfig      | 1 -
>   configs/evb-rk3288_defconfig      | 1 -
>   configs/evb-rk3328_defconfig      | 1 -
>   configs/evb-rv1108_defconfig      | 1 -
>   configs/firefly-rk3288_defconfig  | 1 -
>   configs/kylin-rk3036_defconfig    | 1 -
>   configs/miqi-rk3288_defconfig     | 1 -
>   configs/phycore-rk3288_defconfig  | 1 -
>   configs/popmetal-rk3288_defconfig | 1 -
>   configs/rock2_defconfig           | 1 -
>   configs/rock64-rk3328_defconfig   | 1 -
>   configs/tinker-rk3288_defconfig   | 1 -
>   configs/tinker-s-rk3288_defconfig | 1 -
>   configs/vyasa-rk3288_defconfig    | 1 -
>   drivers/usb/gadget/Kconfig        | 1 +
>   17 files changed, 1 insertion(+), 16 deletions(-)
>
> diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
> index b3d8d28bea..c9d703a0f5 100644
> --- a/configs/elgin-rv1108_defconfig
> +++ b/configs/elgin-rv1108_defconfig
> @@ -49,7 +49,6 @@ CONFIG_USB_OHCI_HCD=y
>   CONFIG_USB_OHCI_GENERIC=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
> index 5dd5f43f7c..c9882ded98 100644
> --- a/configs/evb-rk3036_defconfig
> +++ b/configs/evb-rk3036_defconfig
> @@ -52,7 +52,6 @@ CONFIG_SYSRESET=y
>   # CONFIG_SPL_SYSRESET is not set
>   CONFIG_USB=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
> index 745fdd1c0f..38b2660fb3 100644
> --- a/configs/evb-rk3229_defconfig
> +++ b/configs/evb-rk3229_defconfig
> @@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2
>   CONFIG_SYSRESET=y
>   CONFIG_USB=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
> index c2a78bd065..12d454b410 100644
> --- a/configs/evb-rk3288_defconfig
> +++ b/configs/evb-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index a59dab4853..8f97ef2c34 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -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_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
> index 037715cbc0..18bc6529ac 100644
> --- a/configs/evb-rv1108_defconfig
> +++ b/configs/evb-rv1108_defconfig
> @@ -44,7 +44,6 @@ CONFIG_USB_OHCI_HCD=y
>   CONFIG_USB_OHCI_GENERIC=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
> index 65e839214c..fa3715cf7e 100644
> --- a/configs/firefly-rk3288_defconfig
> +++ b/configs/firefly-rk3288_defconfig
> @@ -75,7 +75,6 @@ CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_KEYBOARD=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
> index 1906d1d93f..4fc0c3e491 100644
> --- a/configs/kylin-rk3036_defconfig
> +++ b/configs/kylin-rk3036_defconfig
> @@ -56,7 +56,6 @@ CONFIG_SYSRESET=y
>   CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
> index 30b05ecf44..c007c90a90 100644
> --- a/configs/miqi-rk3288_defconfig
> +++ b/configs/miqi-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
> index d33f079dac..0329a8aa55 100644
> --- a/configs/phycore-rk3288_defconfig
> +++ b/configs/phycore-rk3288_defconfig
> @@ -75,7 +75,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
> index 7642ea38b1..95a0a4b4d1 100644
> --- a/configs/popmetal-rk3288_defconfig
> +++ b/configs/popmetal-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
> index 3723a7e0dd..b7f6646381 100644
> --- a/configs/rock2_defconfig
> +++ b/configs/rock2_defconfig
> @@ -72,7 +72,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index 021f982e68..d9a170ba26 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -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_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index 0fd1612f87..bb561fac23 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -77,7 +77,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index c851a93f31..38cb1984d8 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -83,7 +83,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
> index 6611080784..081e32d67d 100644
> --- a/configs/vyasa-rk3288_defconfig
> +++ b/configs/vyasa-rk3288_defconfig
> @@ -69,7 +69,6 @@ CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_KEYBOARD=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
>   CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 26b4d12a09..1959a390f3 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -39,6 +39,7 @@ if USB_GADGET
>   config USB_GADGET_MANUFACTURER
>   	string "Vendor name of the USB device"
>   	default "Allwinner Technology" if ARCH_SUNXI
> +	default "Rockchip" if ARCH_ROCKCHIP
>   	default "U-Boot"
>   	help
>   	  Vendor name of the USB device emulated, reported to the host device.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 02/10] gadget: Select USB_GADGET_VENDOR_NUM for rockchip
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:20         ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:20 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Gadget vendor number, 0x2207 is common across all platfroms
> supported in Rockchip SoC.
>
> So, select the same number globally, if ARCH_ROCKCHIP.
>
> This eventually drop the explicit configs defined in supported
> 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>

Thanks,
- Kever
> ---
>   configs/elgin-rv1108_defconfig    | 1 -
>   configs/evb-rk3036_defconfig      | 1 -
>   configs/evb-rk3229_defconfig      | 1 -
>   configs/evb-rk3288_defconfig      | 1 -
>   configs/evb-rk3328_defconfig      | 1 -
>   configs/evb-rv1108_defconfig      | 1 -
>   configs/firefly-rk3288_defconfig  | 1 -
>   configs/kylin-rk3036_defconfig    | 1 -
>   configs/miqi-rk3288_defconfig     | 1 -
>   configs/phycore-rk3288_defconfig  | 1 -
>   configs/popmetal-rk3288_defconfig | 1 -
>   configs/rock2_defconfig           | 1 -
>   configs/rock64-rk3328_defconfig   | 1 -
>   configs/tinker-rk3288_defconfig   | 1 -
>   configs/tinker-s-rk3288_defconfig | 1 -
>   configs/vyasa-rk3288_defconfig    | 1 -
>   drivers/usb/gadget/Kconfig        | 1 +
>   17 files changed, 1 insertion(+), 16 deletions(-)
>
> diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
> index c9d703a0f5..48351bb1dd 100644
> --- a/configs/elgin-rv1108_defconfig
> +++ b/configs/elgin-rv1108_defconfig
> @@ -49,7 +49,6 @@ CONFIG_USB_OHCI_HCD=y
>   CONFIG_USB_OHCI_GENERIC=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_ERRNO_STR=y
> diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
> index c9882ded98..bb3e2c8f7d 100644
> --- a/configs/evb-rk3036_defconfig
> +++ b/configs/evb-rk3036_defconfig
> @@ -52,7 +52,6 @@ CONFIG_SYSRESET=y
>   # CONFIG_SPL_SYSRESET is not set
>   CONFIG_USB=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
> index 38b2660fb3..7bf26f7497 100644
> --- a/configs/evb-rk3229_defconfig
> +++ b/configs/evb-rk3229_defconfig
> @@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2
>   CONFIG_SYSRESET=y
>   CONFIG_USB=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_TPL_TINY_MEMSET=y
> diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
> index 12d454b410..8f2f13adae 100644
> --- a/configs/evb-rk3288_defconfig
> +++ b/configs/evb-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_DM_VIDEO=y
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index 8f97ef2c34..747089435d 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -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_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
> index 18bc6529ac..c9cad2bb4a 100644
> --- a/configs/evb-rv1108_defconfig
> +++ b/configs/evb-rv1108_defconfig
> @@ -44,7 +44,6 @@ CONFIG_USB_OHCI_HCD=y
>   CONFIG_USB_OHCI_GENERIC=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_ERRNO_STR=y
> diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
> index fa3715cf7e..92eeffda01 100644
> --- a/configs/firefly-rk3288_defconfig
> +++ b/configs/firefly-rk3288_defconfig
> @@ -75,7 +75,6 @@ CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_KEYBOARD=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
> index 4fc0c3e491..08b47c84ef 100644
> --- a/configs/kylin-rk3036_defconfig
> +++ b/configs/kylin-rk3036_defconfig
> @@ -56,7 +56,6 @@ CONFIG_SYSRESET=y
>   CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
> index c007c90a90..b06175958e 100644
> --- a/configs/miqi-rk3288_defconfig
> +++ b/configs/miqi-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
> index 0329a8aa55..a86f689858 100644
> --- a/configs/phycore-rk3288_defconfig
> +++ b/configs/phycore-rk3288_defconfig
> @@ -75,7 +75,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
> index 95a0a4b4d1..0cb67f33fe 100644
> --- a/configs/popmetal-rk3288_defconfig
> +++ b/configs/popmetal-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
> index b7f6646381..1afb12d015 100644
> --- a/configs/rock2_defconfig
> +++ b/configs/rock2_defconfig
> @@ -72,7 +72,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_DM_VIDEO=y
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index d9a170ba26..ec13a7710a 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -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_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index bb561fac23..e46eb1cd91 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -77,7 +77,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index 38cb1984d8..3acb2ac5f5 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -83,7 +83,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
> index 081e32d67d..997d9a3877 100644
> --- a/configs/vyasa-rk3288_defconfig
> +++ b/configs/vyasa-rk3288_defconfig
> @@ -69,7 +69,6 @@ CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_KEYBOARD=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_FUNCTION_MASS_STORAGE=y
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 1959a390f3..844c3be16f 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -48,6 +48,7 @@ config USB_GADGET_MANUFACTURER
>   config USB_GADGET_VENDOR_NUM
>   	hex "Vendor ID of the USB device"
>   	default 0x1f3a if ARCH_SUNXI
> +	default 0x2207 if ARCH_ROCKCHIP
>   	default 0x0
>   	help
>   	  Vendor ID of the USB device emulated, reported to the host device.



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 02/10] gadget: Select USB_GADGET_VENDOR_NUM for rockchip
@ 2019-11-23 14:20         ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:20 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Gadget vendor number, 0x2207 is common across all platfroms
> supported in Rockchip SoC.
>
> So, select the same number globally, if ARCH_ROCKCHIP.
>
> This eventually drop the explicit configs defined in supported
> 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>

Thanks,
- Kever
> ---
>   configs/elgin-rv1108_defconfig    | 1 -
>   configs/evb-rk3036_defconfig      | 1 -
>   configs/evb-rk3229_defconfig      | 1 -
>   configs/evb-rk3288_defconfig      | 1 -
>   configs/evb-rk3328_defconfig      | 1 -
>   configs/evb-rv1108_defconfig      | 1 -
>   configs/firefly-rk3288_defconfig  | 1 -
>   configs/kylin-rk3036_defconfig    | 1 -
>   configs/miqi-rk3288_defconfig     | 1 -
>   configs/phycore-rk3288_defconfig  | 1 -
>   configs/popmetal-rk3288_defconfig | 1 -
>   configs/rock2_defconfig           | 1 -
>   configs/rock64-rk3328_defconfig   | 1 -
>   configs/tinker-rk3288_defconfig   | 1 -
>   configs/tinker-s-rk3288_defconfig | 1 -
>   configs/vyasa-rk3288_defconfig    | 1 -
>   drivers/usb/gadget/Kconfig        | 1 +
>   17 files changed, 1 insertion(+), 16 deletions(-)
>
> diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
> index c9d703a0f5..48351bb1dd 100644
> --- a/configs/elgin-rv1108_defconfig
> +++ b/configs/elgin-rv1108_defconfig
> @@ -49,7 +49,6 @@ CONFIG_USB_OHCI_HCD=y
>   CONFIG_USB_OHCI_GENERIC=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_ERRNO_STR=y
> diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
> index c9882ded98..bb3e2c8f7d 100644
> --- a/configs/evb-rk3036_defconfig
> +++ b/configs/evb-rk3036_defconfig
> @@ -52,7 +52,6 @@ CONFIG_SYSRESET=y
>   # CONFIG_SPL_SYSRESET is not set
>   CONFIG_USB=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
> index 38b2660fb3..7bf26f7497 100644
> --- a/configs/evb-rk3229_defconfig
> +++ b/configs/evb-rk3229_defconfig
> @@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2
>   CONFIG_SYSRESET=y
>   CONFIG_USB=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_TPL_TINY_MEMSET=y
> diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
> index 12d454b410..8f2f13adae 100644
> --- a/configs/evb-rk3288_defconfig
> +++ b/configs/evb-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_DM_VIDEO=y
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index 8f97ef2c34..747089435d 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -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_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
> index 18bc6529ac..c9cad2bb4a 100644
> --- a/configs/evb-rv1108_defconfig
> +++ b/configs/evb-rv1108_defconfig
> @@ -44,7 +44,6 @@ CONFIG_USB_OHCI_HCD=y
>   CONFIG_USB_OHCI_GENERIC=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_ERRNO_STR=y
> diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
> index fa3715cf7e..92eeffda01 100644
> --- a/configs/firefly-rk3288_defconfig
> +++ b/configs/firefly-rk3288_defconfig
> @@ -75,7 +75,6 @@ CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_KEYBOARD=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
> index 4fc0c3e491..08b47c84ef 100644
> --- a/configs/kylin-rk3036_defconfig
> +++ b/configs/kylin-rk3036_defconfig
> @@ -56,7 +56,6 @@ CONFIG_SYSRESET=y
>   CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x310a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
> index c007c90a90..b06175958e 100644
> --- a/configs/miqi-rk3288_defconfig
> +++ b/configs/miqi-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
> index 0329a8aa55..a86f689858 100644
> --- a/configs/phycore-rk3288_defconfig
> +++ b/configs/phycore-rk3288_defconfig
> @@ -75,7 +75,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
> index 95a0a4b4d1..0cb67f33fe 100644
> --- a/configs/popmetal-rk3288_defconfig
> +++ b/configs/popmetal-rk3288_defconfig
> @@ -71,7 +71,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
> index b7f6646381..1afb12d015 100644
> --- a/configs/rock2_defconfig
> +++ b/configs/rock2_defconfig
> @@ -72,7 +72,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_DM_VIDEO=y
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index d9a170ba26..ec13a7710a 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -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_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index bb561fac23..e46eb1cd91 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -77,7 +77,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index 38cb1984d8..3acb2ac5f5 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -83,7 +83,6 @@ CONFIG_USB=y
>   CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_HOST_ETHER=y
> diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
> index 081e32d67d..997d9a3877 100644
> --- a/configs/vyasa-rk3288_defconfig
> +++ b/configs/vyasa-rk3288_defconfig
> @@ -69,7 +69,6 @@ CONFIG_USB_DWC2=y
>   CONFIG_ROCKCHIP_USB2_PHY=y
>   CONFIG_USB_KEYBOARD=y
>   CONFIG_USB_GADGET=y
> -CONFIG_USB_GADGET_VENDOR_NUM=0x2207
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
>   CONFIG_USB_GADGET_DWC2_OTG=y
>   CONFIG_USB_FUNCTION_MASS_STORAGE=y
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 1959a390f3..844c3be16f 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -48,6 +48,7 @@ config USB_GADGET_MANUFACTURER
>   config USB_GADGET_VENDOR_NUM
>   	hex "Vendor ID of the USB device"
>   	default 0x1f3a if ARCH_SUNXI
> +	default 0x2207 if ARCH_ROCKCHIP
>   	default 0x0
>   	help
>   	  Vendor ID of the USB device emulated, reported to the host device.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 03/10] gadget: rockchip: USB_GADGET_PRODUCT_NUM
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:20         ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:20 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


On 2019/11/19 下午4:26, Jagan Teki wrote:
> 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>

Thanks,
- Kever
> ---
>   configs/evb-rk3036_defconfig      | 1 -
>   configs/evb-rk3229_defconfig      | 1 -
>   configs/evb-rk3288_defconfig      | 1 -
>   configs/evb-rk3328_defconfig      | 1 -
>   configs/firefly-rk3288_defconfig  | 1 -
>   configs/kylin-rk3036_defconfig    | 1 -
>   configs/miqi-rk3288_defconfig     | 1 -
>   configs/phycore-rk3288_defconfig  | 1 -
>   configs/popmetal-rk3288_defconfig | 1 -
>   configs/rock64-rk3328_defconfig   | 1 -
>   configs/tinker-rk3288_defconfig   | 1 -
>   configs/tinker-s-rk3288_defconfig | 1 -
>   configs/vyasa-rk3288_defconfig    | 1 -
>   drivers/usb/gadget/Kconfig        | 3 +++
>   14 files changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
> index bb3e2c8f7d..79e413145f 100644
> --- a/configs/evb-rk3036_defconfig
> +++ b/configs/evb-rk3036_defconfig
> @@ -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
> diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
> index 7bf26f7497..8d7d11c3e8 100644
> --- a/configs/evb-rk3229_defconfig
> +++ b/configs/evb-rk3229_defconfig
> @@ -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
> diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
> index 8f2f13adae..db7e6fa7b1 100644
> --- a/configs/evb-rk3288_defconfig
> +++ b/configs/evb-rk3288_defconfig
> @@ -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
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index 747089435d..0293546b04 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -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
> diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
> index 92eeffda01..6efc5735f9 100644
> --- a/configs/firefly-rk3288_defconfig
> +++ b/configs/firefly-rk3288_defconfig
> @@ -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
> diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
> index 08b47c84ef..c1607e52fb 100644
> --- a/configs/kylin-rk3036_defconfig
> +++ b/configs/kylin-rk3036_defconfig
> @@ -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
> diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
> index b06175958e..4590e38ad3 100644
> --- a/configs/miqi-rk3288_defconfig
> +++ b/configs/miqi-rk3288_defconfig
> @@ -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
> diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
> index a86f689858..51bd8adcbc 100644
> --- a/configs/phycore-rk3288_defconfig
> +++ b/configs/phycore-rk3288_defconfig
> @@ -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
> diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
> index 0cb67f33fe..8cc55bdbe0 100644
> --- a/configs/popmetal-rk3288_defconfig
> +++ b/configs/popmetal-rk3288_defconfig
> @@ -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
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index ec13a7710a..0dab5d7e54 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -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
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index e46eb1cd91..c350c0d8ba 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -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
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index 3acb2ac5f5..c016a264b2 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -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
> diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
> index 997d9a3877..32c3502683 100644
> --- a/configs/vyasa-rk3288_defconfig
> +++ b/configs/vyasa-rk3288_defconfig
> @@ -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
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 844c3be16f..e120b48b33 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -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.



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 03/10] gadget: rockchip: USB_GADGET_PRODUCT_NUM
@ 2019-11-23 14:20         ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:20 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> 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>

Thanks,
- Kever
> ---
>   configs/evb-rk3036_defconfig      | 1 -
>   configs/evb-rk3229_defconfig      | 1 -
>   configs/evb-rk3288_defconfig      | 1 -
>   configs/evb-rk3328_defconfig      | 1 -
>   configs/firefly-rk3288_defconfig  | 1 -
>   configs/kylin-rk3036_defconfig    | 1 -
>   configs/miqi-rk3288_defconfig     | 1 -
>   configs/phycore-rk3288_defconfig  | 1 -
>   configs/popmetal-rk3288_defconfig | 1 -
>   configs/rock64-rk3328_defconfig   | 1 -
>   configs/tinker-rk3288_defconfig   | 1 -
>   configs/tinker-s-rk3288_defconfig | 1 -
>   configs/vyasa-rk3288_defconfig    | 1 -
>   drivers/usb/gadget/Kconfig        | 3 +++
>   14 files changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
> index bb3e2c8f7d..79e413145f 100644
> --- a/configs/evb-rk3036_defconfig
> +++ b/configs/evb-rk3036_defconfig
> @@ -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
> diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
> index 7bf26f7497..8d7d11c3e8 100644
> --- a/configs/evb-rk3229_defconfig
> +++ b/configs/evb-rk3229_defconfig
> @@ -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
> diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
> index 8f2f13adae..db7e6fa7b1 100644
> --- a/configs/evb-rk3288_defconfig
> +++ b/configs/evb-rk3288_defconfig
> @@ -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
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index 747089435d..0293546b04 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -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
> diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
> index 92eeffda01..6efc5735f9 100644
> --- a/configs/firefly-rk3288_defconfig
> +++ b/configs/firefly-rk3288_defconfig
> @@ -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
> diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
> index 08b47c84ef..c1607e52fb 100644
> --- a/configs/kylin-rk3036_defconfig
> +++ b/configs/kylin-rk3036_defconfig
> @@ -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
> diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
> index b06175958e..4590e38ad3 100644
> --- a/configs/miqi-rk3288_defconfig
> +++ b/configs/miqi-rk3288_defconfig
> @@ -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
> diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
> index a86f689858..51bd8adcbc 100644
> --- a/configs/phycore-rk3288_defconfig
> +++ b/configs/phycore-rk3288_defconfig
> @@ -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
> diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
> index 0cb67f33fe..8cc55bdbe0 100644
> --- a/configs/popmetal-rk3288_defconfig
> +++ b/configs/popmetal-rk3288_defconfig
> @@ -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
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index ec13a7710a..0dab5d7e54 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -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
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index e46eb1cd91..c350c0d8ba 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -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
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index 3acb2ac5f5..c016a264b2 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -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
> diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
> index 997d9a3877..32c3502683 100644
> --- a/configs/vyasa-rk3288_defconfig
> +++ b/configs/vyasa-rk3288_defconfig
> @@ -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
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 844c3be16f..e120b48b33 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -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.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 04/10] gadget: rockchip: Add rk3128 USB_GADGET_PRODUCT_NUM
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:21         ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Add 0x310c for rk3128 gadget product number.
>
> 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>

Thanks,
- Kever
> ---
>   drivers/usb/gadget/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index e120b48b33..2da8b40e05 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -59,6 +59,7 @@ config USB_GADGET_PRODUCT_NUM
>   	hex "Product ID of the USB device"
>   	default 0x1010 if ARCH_SUNXI
>   	default 0x310a if ROCKCHIP_RK3036
> +	default 0x310c if ROCKCHIP_RK3128
>   	default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
>   	default 0x330a if ROCKCHIP_RK3328
>   	default 0x0



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 04/10] gadget: rockchip: Add rk3128 USB_GADGET_PRODUCT_NUM
@ 2019-11-23 14:21         ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Add 0x310c for rk3128 gadget product number.
>
> 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>

Thanks,
- Kever
> ---
>   drivers/usb/gadget/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index e120b48b33..2da8b40e05 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -59,6 +59,7 @@ config USB_GADGET_PRODUCT_NUM
>   	hex "Product ID of the USB device"
>   	default 0x1010 if ARCH_SUNXI
>   	default 0x310a if ROCKCHIP_RK3036
> +	default 0x310c if ROCKCHIP_RK3128
>   	default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
>   	default 0x330a if ROCKCHIP_RK3328
>   	default 0x0

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 05/10] fastboot: rockchip: Select FASTBOOT_FLASH[_MMC_DEV]
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:21         ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Select CONFIG_FASTBOOT_FLASH, CONFIG_FASTBOOT_FLASH_MMC_DEV
> for rockchip SoC plaforms in fastboot Kconfig file instead
> of defined it in board defconfig.
>
> 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>

Thanks,
- Kever
> ---
>   configs/evb-rk3036_defconfig      | 2 --
>   configs/evb-rk3128_defconfig      | 2 --
>   configs/evb-rk3229_defconfig      | 2 --
>   configs/evb-rk3288_defconfig      | 2 --
>   configs/evb-rk3328_defconfig      | 2 --
>   configs/firefly-rk3288_defconfig  | 2 --
>   configs/kylin-rk3036_defconfig    | 2 --
>   configs/miqi-rk3288_defconfig     | 2 --
>   configs/phycore-rk3288_defconfig  | 2 --
>   configs/popmetal-rk3288_defconfig | 2 --
>   configs/rock64-rk3328_defconfig   | 2 --
>   configs/tinker-rk3288_defconfig   | 2 --
>   configs/tinker-s-rk3288_defconfig | 2 --
>   drivers/fastboot/Kconfig          | 4 +++-
>   14 files changed, 3 insertions(+), 27 deletions(-)
>
> diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
> index 79e413145f..4bed28f102 100644
> --- a/configs/evb-rk3036_defconfig
> +++ b/configs/evb-rk3036_defconfig
> @@ -35,8 +35,6 @@ CONFIG_REGMAP=y
>   CONFIG_SYSCON=y
>   # CONFIG_SPL_BLK is not set
>   CONFIG_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/evb-rk3128_defconfig b/configs/evb-rk3128_defconfig
> index cb3c5372aa..bf91c642dd 100644
> --- a/configs/evb-rk3128_defconfig
> +++ b/configs/evb-rk3128_defconfig
> @@ -23,8 +23,6 @@ CONFIG_SYSCON=y
>   CONFIG_CLK=y
>   CONFIG_FASTBOOT_BUF_ADDR=0x60800800
>   CONFIG_FASTBOOT_BUF_SIZE=0x04000000
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
> index 8d7d11c3e8..cdf28154f8 100644
> --- a/configs/evb-rk3229_defconfig
> +++ b/configs/evb-rk3229_defconfig
> @@ -44,8 +44,6 @@ CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
>   CONFIG_TPL_CLK=y
>   CONFIG_FASTBOOT_BUF_SIZE=0x04000000
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
> index db7e6fa7b1..833b0b6a6d 100644
> --- a/configs/evb-rk3288_defconfig
> +++ b/configs/evb-rk3288_defconfig
> @@ -43,8 +43,6 @@ CONFIG_SYSCON=y
>   CONFIG_SPL_SYSCON=y
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index 0293546b04..74b7295e62 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -46,8 +46,6 @@ CONFIG_TPL_SYSCON=y
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
>   CONFIG_FASTBOOT_BUF_ADDR=0x800800
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=1
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
> index 6efc5735f9..178029cc47 100644
> --- a/configs/firefly-rk3288_defconfig
> +++ b/configs/firefly-rk3288_defconfig
> @@ -44,8 +44,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
> index c1607e52fb..6c13c4c080 100644
> --- a/configs/kylin-rk3036_defconfig
> +++ b/configs/kylin-rk3036_defconfig
> @@ -37,8 +37,6 @@ CONFIG_REGMAP=y
>   CONFIG_SYSCON=y
>   # CONFIG_SPL_BLK is not set
>   CONFIG_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
> index 4590e38ad3..488cc54203 100644
> --- a/configs/miqi-rk3288_defconfig
> +++ b/configs/miqi-rk3288_defconfig
> @@ -45,8 +45,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
> index 51bd8adcbc..75de1d68e5 100644
> --- a/configs/phycore-rk3288_defconfig
> +++ b/configs/phycore-rk3288_defconfig
> @@ -47,8 +47,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
> index 8cc55bdbe0..320f34bd04 100644
> --- a/configs/popmetal-rk3288_defconfig
> +++ b/configs/popmetal-rk3288_defconfig
> @@ -45,8 +45,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index 0dab5d7e54..73ca535ff8 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -48,8 +48,6 @@ CONFIG_TPL_SYSCON=y
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
>   CONFIG_FASTBOOT_BUF_ADDR=0x800800
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=1
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index c350c0d8ba..56fcbb94d3 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -47,8 +47,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index c016a264b2..458e1695a2 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -52,8 +52,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
> index d63ecdd27e..34864ca613 100644
> --- a/drivers/fastboot/Kconfig
> +++ b/drivers/fastboot/Kconfig
> @@ -64,7 +64,7 @@ config FASTBOOT_USB_DEV
>   
>   config FASTBOOT_FLASH
>   	bool "Enable FASTBOOT FLASH command"
> -	default y if ARCH_SUNXI
> +	default y if ARCH_SUNXI || ARCH_ROCKCHIP
>   	depends on MMC || (NAND && CMD_MTDPARTS)
>   	select IMAGE_SPARSE
>   	help
> @@ -89,6 +89,8 @@ endchoice
>   config FASTBOOT_FLASH_MMC_DEV
>   	int "Define FASTBOOT MMC FLASH default device"
>   	depends on FASTBOOT_FLASH_MMC
> +	default 1 if ROCKCHIP_RK3328
> +	default 0 if ARCH_ROCKCHIP
>   	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
>   	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
>   	help



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 05/10] fastboot: rockchip: Select FASTBOOT_FLASH[_MMC_DEV]
@ 2019-11-23 14:21         ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Select CONFIG_FASTBOOT_FLASH, CONFIG_FASTBOOT_FLASH_MMC_DEV
> for rockchip SoC plaforms in fastboot Kconfig file instead
> of defined it in board defconfig.
>
> 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>

Thanks,
- Kever
> ---
>   configs/evb-rk3036_defconfig      | 2 --
>   configs/evb-rk3128_defconfig      | 2 --
>   configs/evb-rk3229_defconfig      | 2 --
>   configs/evb-rk3288_defconfig      | 2 --
>   configs/evb-rk3328_defconfig      | 2 --
>   configs/firefly-rk3288_defconfig  | 2 --
>   configs/kylin-rk3036_defconfig    | 2 --
>   configs/miqi-rk3288_defconfig     | 2 --
>   configs/phycore-rk3288_defconfig  | 2 --
>   configs/popmetal-rk3288_defconfig | 2 --
>   configs/rock64-rk3328_defconfig   | 2 --
>   configs/tinker-rk3288_defconfig   | 2 --
>   configs/tinker-s-rk3288_defconfig | 2 --
>   drivers/fastboot/Kconfig          | 4 +++-
>   14 files changed, 3 insertions(+), 27 deletions(-)
>
> diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
> index 79e413145f..4bed28f102 100644
> --- a/configs/evb-rk3036_defconfig
> +++ b/configs/evb-rk3036_defconfig
> @@ -35,8 +35,6 @@ CONFIG_REGMAP=y
>   CONFIG_SYSCON=y
>   # CONFIG_SPL_BLK is not set
>   CONFIG_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/evb-rk3128_defconfig b/configs/evb-rk3128_defconfig
> index cb3c5372aa..bf91c642dd 100644
> --- a/configs/evb-rk3128_defconfig
> +++ b/configs/evb-rk3128_defconfig
> @@ -23,8 +23,6 @@ CONFIG_SYSCON=y
>   CONFIG_CLK=y
>   CONFIG_FASTBOOT_BUF_ADDR=0x60800800
>   CONFIG_FASTBOOT_BUF_SIZE=0x04000000
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
> index 8d7d11c3e8..cdf28154f8 100644
> --- a/configs/evb-rk3229_defconfig
> +++ b/configs/evb-rk3229_defconfig
> @@ -44,8 +44,6 @@ CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
>   CONFIG_TPL_CLK=y
>   CONFIG_FASTBOOT_BUF_SIZE=0x04000000
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
> index db7e6fa7b1..833b0b6a6d 100644
> --- a/configs/evb-rk3288_defconfig
> +++ b/configs/evb-rk3288_defconfig
> @@ -43,8 +43,6 @@ CONFIG_SYSCON=y
>   CONFIG_SPL_SYSCON=y
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index 0293546b04..74b7295e62 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -46,8 +46,6 @@ CONFIG_TPL_SYSCON=y
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
>   CONFIG_FASTBOOT_BUF_ADDR=0x800800
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=1
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
> index 6efc5735f9..178029cc47 100644
> --- a/configs/firefly-rk3288_defconfig
> +++ b/configs/firefly-rk3288_defconfig
> @@ -44,8 +44,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
> index c1607e52fb..6c13c4c080 100644
> --- a/configs/kylin-rk3036_defconfig
> +++ b/configs/kylin-rk3036_defconfig
> @@ -37,8 +37,6 @@ CONFIG_REGMAP=y
>   CONFIG_SYSCON=y
>   # CONFIG_SPL_BLK is not set
>   CONFIG_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
> index 4590e38ad3..488cc54203 100644
> --- a/configs/miqi-rk3288_defconfig
> +++ b/configs/miqi-rk3288_defconfig
> @@ -45,8 +45,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
> index 51bd8adcbc..75de1d68e5 100644
> --- a/configs/phycore-rk3288_defconfig
> +++ b/configs/phycore-rk3288_defconfig
> @@ -47,8 +47,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
> index 8cc55bdbe0..320f34bd04 100644
> --- a/configs/popmetal-rk3288_defconfig
> +++ b/configs/popmetal-rk3288_defconfig
> @@ -45,8 +45,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index 0dab5d7e54..73ca535ff8 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -48,8 +48,6 @@ CONFIG_TPL_SYSCON=y
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
>   CONFIG_FASTBOOT_BUF_ADDR=0x800800
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=1
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index c350c0d8ba..56fcbb94d3 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -47,8 +47,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index c016a264b2..458e1695a2 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -52,8 +52,6 @@ CONFIG_SPL_SYSCON=y
>   # CONFIG_SPL_SIMPLE_BUS is not set
>   CONFIG_CLK=y
>   CONFIG_SPL_CLK=y
> -CONFIG_FASTBOOT_FLASH=y
> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>   CONFIG_ROCKCHIP_GPIO=y
>   CONFIG_SYS_I2C_ROCKCHIP=y
> diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
> index d63ecdd27e..34864ca613 100644
> --- a/drivers/fastboot/Kconfig
> +++ b/drivers/fastboot/Kconfig
> @@ -64,7 +64,7 @@ config FASTBOOT_USB_DEV
>   
>   config FASTBOOT_FLASH
>   	bool "Enable FASTBOOT FLASH command"
> -	default y if ARCH_SUNXI
> +	default y if ARCH_SUNXI || ARCH_ROCKCHIP
>   	depends on MMC || (NAND && CMD_MTDPARTS)
>   	select IMAGE_SPARSE
>   	help
> @@ -89,6 +89,8 @@ endchoice
>   config FASTBOOT_FLASH_MMC_DEV
>   	int "Define FASTBOOT MMC FLASH default device"
>   	depends on FASTBOOT_FLASH_MMC
> +	default 1 if ROCKCHIP_RK3328
> +	default 0 if ARCH_ROCKCHIP
>   	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
>   	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
>   	help

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 06/10] fastboot: rockchip: Fix rk3328 default mmc device
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:21         ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Technically the default mmc device for fastboot would
> use eMMC if the board support for it.
>
> Rockchip platform access device 0 for eMMC so, use the
> same device number for rk3328.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   drivers/fastboot/Kconfig | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
> index 34864ca613..433ea0dc3b 100644
> --- a/drivers/fastboot/Kconfig
> +++ b/drivers/fastboot/Kconfig
> @@ -89,7 +89,6 @@ endchoice
>   config FASTBOOT_FLASH_MMC_DEV
>   	int "Define FASTBOOT MMC FLASH default device"
>   	depends on FASTBOOT_FLASH_MMC
> -	default 1 if ROCKCHIP_RK3328
>   	default 0 if ARCH_ROCKCHIP
>   	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
>   	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 06/10] fastboot: rockchip: Fix rk3328 default mmc device
@ 2019-11-23 14:21         ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Technically the default mmc device for fastboot would
> use eMMC if the board support for it.
>
> Rockchip platform access device 0 for eMMC so, use the
> same device number for rk3328.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   drivers/fastboot/Kconfig | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
> index 34864ca613..433ea0dc3b 100644
> --- a/drivers/fastboot/Kconfig
> +++ b/drivers/fastboot/Kconfig
> @@ -89,7 +89,6 @@ endchoice
>   config FASTBOOT_FLASH_MMC_DEV
>   	int "Define FASTBOOT MMC FLASH default device"
>   	depends on FASTBOOT_FLASH_MMC
> -	default 1 if ROCKCHIP_RK3328
>   	default 0 if ARCH_ROCKCHIP
>   	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
>   	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 07/10] usb: dwc3: Add phy interface for dwc3_uboot
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:21         ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: Marek Vasut, u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


On 2019/11/19 下午4:26, Jagan Teki wrote:
> U-Boot has two different variants of dwc3 initializations,
> - with dm variant gadget, so the respective dm driver would
>    call the dwc3_init in core.
> - with non-dm variant gadget, so the usage board file would
>    call dwc3_uboot_init in core.
>
> The driver probe would handle all respective gadget properties
> including phy interface via phy_type property and then trigger
> dwc3_init for dm-variant gadgets.
>
> So, to support the phy interface for non-dm variant gadgets,
> the better option is dwc3_uboot_init since there is no
> dedicated controller for non-dm variant gadgets.
>
> This patch support for adding phy interface like 8/16-bit UTMI+
> code for dwc3_uboot.
>
> This change used Linux phy.h enum list, to make proper code
> compatibility.
>
> Cc: Marek Vasut <marex@denx.de>
> 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>

Thanks,
- Kever
> ---
>   drivers/usb/dwc3/core.c | 27 +++++++++++++++++++++++++++
>   drivers/usb/dwc3/core.h | 12 ++++++++++++
>   include/dwc3-uboot.h    |  2 ++
>   include/linux/usb/phy.h | 19 +++++++++++++++++++
>   4 files changed, 60 insertions(+)
>   create mode 100644 include/linux/usb/phy.h
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 23af60c98d..f779562de2 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -613,6 +613,31 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
>   	dwc3_gadget_run(dwc);
>   }
>   
> +static void dwc3_uboot_hsphy_mode(struct dwc3_device *dwc3_dev,
> +				  struct dwc3 *dwc)
> +{
> +	enum usb_phy_interface hsphy_mode = dwc3_dev->hsphy_mode;
> +	u32 reg;
> +
> +	/* Set dwc3 usb2 phy config */
> +	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
> +	reg |= DWC3_GUSB2PHYCFG_PHYIF;
> +	reg &= ~DWC3_GUSB2PHYCFG_USBTRDTIM_MASK;
> +
> +	switch (hsphy_mode) {
> +	case USBPHY_INTERFACE_MODE_UTMI:
> +		reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT;
> +		break;
> +	case USBPHY_INTERFACE_MODE_UTMIW:
> +		reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT;
> +		break;
> +	default:
> +		break;
> +	}
> +
> +	dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
> +}
> +
>   #define DWC3_ALIGN_MASK		(16 - 1)
>   
>   /**
> @@ -721,6 +746,8 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
>   		goto err0;
>   	}
>   
> +	dwc3_uboot_hsphy_mode(dwc3_dev, dwc);
> +
>   	ret = dwc3_event_buffers_setup(dwc);
>   	if (ret) {
>   		dev_err(dwc->dev, "failed to setup event buffers\n");
> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index be9672266a..bff53e072b 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -162,6 +162,18 @@
>   /* Global USB2 PHY Configuration Register */
>   #define DWC3_GUSB2PHYCFG_PHYSOFTRST	(1 << 31)
>   #define DWC3_GUSB2PHYCFG_SUSPHY		(1 << 6)
> +#define DWC3_GUSB2PHYCFG_PHYIF		BIT(3)
> +
> +/* Global USB2 PHY Configuration Mask */
> +#define DWC3_GUSB2PHYCFG_USBTRDTIM_MASK		(0xf << 10)
> +
> +/* Global USB2 PHY Configuration Offset */
> +#define DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET	10
> +
> +#define DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT	(0x5 << \
> +		DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
> +#define DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT		(0x9 << \
> +		DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
>   
>   /* Global USB3 PIPE Control Register */
>   #define DWC3_GUSB3PIPECTL_PHYSOFTRST	(1 << 31)
> diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h
> index 9941cc37a3..3c9e204cf0 100644
> --- a/include/dwc3-uboot.h
> +++ b/include/dwc3-uboot.h
> @@ -10,10 +10,12 @@
>   #define __DWC3_UBOOT_H_
>   
>   #include <linux/usb/otg.h>
> +#include <linux/usb/phy.h>
>   
>   struct dwc3_device {
>   	unsigned long base;
>   	enum usb_dr_mode dr_mode;
> +	enum usb_phy_interface hsphy_mode;
>   	u32 maximum_speed;
>   	unsigned tx_fifo_resize:1;
>   	unsigned has_lpm_erratum;
> diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
> new file mode 100644
> index 0000000000..158ca9cd85
> --- /dev/null
> +++ b/include/linux/usb/phy.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * USB PHY defines
> + *
> + * These APIs may be used between USB controllers.  USB device drivers
> + * (for either host or peripheral roles) don't use these calls; they
> + * continue to use just usb_device and usb_gadget.
> + */
> +
> +#ifndef __LINUX_USB_PHY_H
> +#define __LINUX_USB_PHY_H
> +
> +enum usb_phy_interface {
> +	USBPHY_INTERFACE_MODE_UNKNOWN,
> +	USBPHY_INTERFACE_MODE_UTMI,
> +	USBPHY_INTERFACE_MODE_UTMIW,
> +};
> +
> +#endif /* __LINUX_USB_PHY_H */



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 07/10] usb: dwc3: Add phy interface for dwc3_uboot
@ 2019-11-23 14:21         ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> U-Boot has two different variants of dwc3 initializations,
> - with dm variant gadget, so the respective dm driver would
>    call the dwc3_init in core.
> - with non-dm variant gadget, so the usage board file would
>    call dwc3_uboot_init in core.
>
> The driver probe would handle all respective gadget properties
> including phy interface via phy_type property and then trigger
> dwc3_init for dm-variant gadgets.
>
> So, to support the phy interface for non-dm variant gadgets,
> the better option is dwc3_uboot_init since there is no
> dedicated controller for non-dm variant gadgets.
>
> This patch support for adding phy interface like 8/16-bit UTMI+
> code for dwc3_uboot.
>
> This change used Linux phy.h enum list, to make proper code
> compatibility.
>
> Cc: Marek Vasut <marex@denx.de>
> 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>

Thanks,
- Kever
> ---
>   drivers/usb/dwc3/core.c | 27 +++++++++++++++++++++++++++
>   drivers/usb/dwc3/core.h | 12 ++++++++++++
>   include/dwc3-uboot.h    |  2 ++
>   include/linux/usb/phy.h | 19 +++++++++++++++++++
>   4 files changed, 60 insertions(+)
>   create mode 100644 include/linux/usb/phy.h
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 23af60c98d..f779562de2 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -613,6 +613,31 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
>   	dwc3_gadget_run(dwc);
>   }
>   
> +static void dwc3_uboot_hsphy_mode(struct dwc3_device *dwc3_dev,
> +				  struct dwc3 *dwc)
> +{
> +	enum usb_phy_interface hsphy_mode = dwc3_dev->hsphy_mode;
> +	u32 reg;
> +
> +	/* Set dwc3 usb2 phy config */
> +	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
> +	reg |= DWC3_GUSB2PHYCFG_PHYIF;
> +	reg &= ~DWC3_GUSB2PHYCFG_USBTRDTIM_MASK;
> +
> +	switch (hsphy_mode) {
> +	case USBPHY_INTERFACE_MODE_UTMI:
> +		reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT;
> +		break;
> +	case USBPHY_INTERFACE_MODE_UTMIW:
> +		reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT;
> +		break;
> +	default:
> +		break;
> +	}
> +
> +	dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
> +}
> +
>   #define DWC3_ALIGN_MASK		(16 - 1)
>   
>   /**
> @@ -721,6 +746,8 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
>   		goto err0;
>   	}
>   
> +	dwc3_uboot_hsphy_mode(dwc3_dev, dwc);
> +
>   	ret = dwc3_event_buffers_setup(dwc);
>   	if (ret) {
>   		dev_err(dwc->dev, "failed to setup event buffers\n");
> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index be9672266a..bff53e072b 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -162,6 +162,18 @@
>   /* Global USB2 PHY Configuration Register */
>   #define DWC3_GUSB2PHYCFG_PHYSOFTRST	(1 << 31)
>   #define DWC3_GUSB2PHYCFG_SUSPHY		(1 << 6)
> +#define DWC3_GUSB2PHYCFG_PHYIF		BIT(3)
> +
> +/* Global USB2 PHY Configuration Mask */
> +#define DWC3_GUSB2PHYCFG_USBTRDTIM_MASK		(0xf << 10)
> +
> +/* Global USB2 PHY Configuration Offset */
> +#define DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET	10
> +
> +#define DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT	(0x5 << \
> +		DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
> +#define DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT		(0x9 << \
> +		DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
>   
>   /* Global USB3 PIPE Control Register */
>   #define DWC3_GUSB3PIPECTL_PHYSOFTRST	(1 << 31)
> diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h
> index 9941cc37a3..3c9e204cf0 100644
> --- a/include/dwc3-uboot.h
> +++ b/include/dwc3-uboot.h
> @@ -10,10 +10,12 @@
>   #define __DWC3_UBOOT_H_
>   
>   #include <linux/usb/otg.h>
> +#include <linux/usb/phy.h>
>   
>   struct dwc3_device {
>   	unsigned long base;
>   	enum usb_dr_mode dr_mode;
> +	enum usb_phy_interface hsphy_mode;
>   	u32 maximum_speed;
>   	unsigned tx_fifo_resize:1;
>   	unsigned has_lpm_erratum;
> diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
> new file mode 100644
> index 0000000000..158ca9cd85
> --- /dev/null
> +++ b/include/linux/usb/phy.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * USB PHY defines
> + *
> + * These APIs may be used between USB controllers.  USB device drivers
> + * (for either host or peripheral roles) don't use these calls; they
> + * continue to use just usb_device and usb_gadget.
> + */
> +
> +#ifndef __LINUX_USB_PHY_H
> +#define __LINUX_USB_PHY_H
> +
> +enum usb_phy_interface {
> +	USBPHY_INTERFACE_MODE_UNKNOWN,
> +	USBPHY_INTERFACE_MODE_UTMI,
> +	USBPHY_INTERFACE_MODE_UTMIW,
> +};
> +
> +#endif /* __LINUX_USB_PHY_H */

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 08/10] gadget: rockchip: Add rk3399 USB_GADGET_PRODUCT_NUM
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:21         ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Add 0x330c for rk3399 gadget product number.
>
> 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>

Thanks,
- Kever
> ---
>   drivers/usb/gadget/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 2da8b40e05..58ca82d4de 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -62,6 +62,7 @@ config USB_GADGET_PRODUCT_NUM
>   	default 0x310c if ROCKCHIP_RK3128
>   	default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
>   	default 0x330a if ROCKCHIP_RK3328
> +	default 0x330c if ROCKCHIP_RK3399
>   	default 0x0
>   	help
>   	  Product ID of the USB device emulated, reported to the host device.



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 08/10] gadget: rockchip: Add rk3399 USB_GADGET_PRODUCT_NUM
@ 2019-11-23 14:21         ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:21 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Add 0x330c for rk3399 gadget product number.
>
> 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>

Thanks,
- Kever
> ---
>   drivers/usb/gadget/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 2da8b40e05..58ca82d4de 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -62,6 +62,7 @@ config USB_GADGET_PRODUCT_NUM
>   	default 0x310c if ROCKCHIP_RK3128
>   	default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
>   	default 0x330a if ROCKCHIP_RK3328
> +	default 0x330c if ROCKCHIP_RK3399
>   	default 0x0
>   	help
>   	  Product ID of the USB device emulated, reported to the host device.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets)
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:22         ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:22 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: Marek Vasut, u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Setup dwc3_device structure for non-dm gadgets, which is used
> in rk3399 platforms.
>
> dwc3_device would have basic regbase, dr_mode, high speed
> and 16-bit UTMI+ etc.
>
> Cc: Marek Vasut <marex@denx.de>
> 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>

Thanks,
- Kever
> ---
>   arch/arm/mach-rockchip/board.c | 32 ++++++++++++++++++++++++++++++--
>   1 file changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
> index c90eb976d0..542823b8cd 100644
> --- a/arch/arm/mach-rockchip/board.c
> +++ b/arch/arm/mach-rockchip/board.c
> @@ -49,8 +49,10 @@ void enable_caches(void)
>   }
>   #endif
>   
> -#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
> +#if defined(CONFIG_USB_GADGET)
>   #include <usb.h>
> +
> +#if defined(CONFIG_USB_GADGET_DWC2_OTG)
>   #include <usb/dwc2_udc.h>
>   
>   static struct dwc2_plat_otg_data otg_data = {
> @@ -117,7 +119,33 @@ int board_usb_cleanup(int index, enum usb_init_type init)
>   {
>   	return 0;
>   }
> -#endif
> +#endif /* CONFIG_USB_GADGET_DWC2_OTG */
> +
> +#if defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB_GADGET)
> +#include <dwc3-uboot.h>
> +
> +static struct dwc3_device dwc3_device_data = {
> +	.maximum_speed = USB_SPEED_HIGH,
> +	.base = 0xfe800000,
> +	.dr_mode = USB_DR_MODE_PERIPHERAL,
> +	.index = 0,
> +	.dis_u2_susphy_quirk = 1,
> +	.hsphy_mode = USBPHY_INTERFACE_MODE_UTMIW,
> +};
> +
> +int usb_gadget_handle_interrupts(void)
> +{
> +	dwc3_uboot_handle_interrupt(0);
> +	return 0;
> +}
> +
> +int board_usb_init(int index, enum usb_init_type init)
> +{
> +	return dwc3_uboot_init(&dwc3_device_data);
> +}
> +#endif /* CONFIG_USB_DWC3 */
> +
> +#endif /* CONFIG_USB_GADGET */
>   
>   #if CONFIG_IS_ENABLED(FASTBOOT)
>   int fastboot_set_reboot_flag(void)



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets)
@ 2019-11-23 14:22         ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:22 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Setup dwc3_device structure for non-dm gadgets, which is used
> in rk3399 platforms.
>
> dwc3_device would have basic regbase, dr_mode, high speed
> and 16-bit UTMI+ etc.
>
> Cc: Marek Vasut <marex@denx.de>
> 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>

Thanks,
- Kever
> ---
>   arch/arm/mach-rockchip/board.c | 32 ++++++++++++++++++++++++++++++--
>   1 file changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
> index c90eb976d0..542823b8cd 100644
> --- a/arch/arm/mach-rockchip/board.c
> +++ b/arch/arm/mach-rockchip/board.c
> @@ -49,8 +49,10 @@ void enable_caches(void)
>   }
>   #endif
>   
> -#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
> +#if defined(CONFIG_USB_GADGET)
>   #include <usb.h>
> +
> +#if defined(CONFIG_USB_GADGET_DWC2_OTG)
>   #include <usb/dwc2_udc.h>
>   
>   static struct dwc2_plat_otg_data otg_data = {
> @@ -117,7 +119,33 @@ int board_usb_cleanup(int index, enum usb_init_type init)
>   {
>   	return 0;
>   }
> -#endif
> +#endif /* CONFIG_USB_GADGET_DWC2_OTG */
> +
> +#if defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB_GADGET)
> +#include <dwc3-uboot.h>
> +
> +static struct dwc3_device dwc3_device_data = {
> +	.maximum_speed = USB_SPEED_HIGH,
> +	.base = 0xfe800000,
> +	.dr_mode = USB_DR_MODE_PERIPHERAL,
> +	.index = 0,
> +	.dis_u2_susphy_quirk = 1,
> +	.hsphy_mode = USBPHY_INTERFACE_MODE_UTMIW,
> +};
> +
> +int usb_gadget_handle_interrupts(void)
> +{
> +	dwc3_uboot_handle_interrupt(0);
> +	return 0;
> +}
> +
> +int board_usb_init(int index, enum usb_init_type init)
> +{
> +	return dwc3_uboot_init(&dwc3_device_data);
> +}
> +#endif /* CONFIG_USB_DWC3 */
> +
> +#endif /* CONFIG_USB_GADGET */
>   
>   #if CONFIG_IS_ENABLED(FASTBOOT)
>   int fastboot_set_reboot_flag(void)

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 10/10] rock960: Enable USB Gadget
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 14:22         ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:22 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg, Levin Du,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Enable DWC3 core, gadget for rock960 board.
>
> This would help to use fastboot by default.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   configs/rock960-rk3399_defconfig | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
> index 979ca0f93b..d0ad6865cf 100644
> --- a/configs/rock960-rk3399_defconfig
> +++ b/configs/rock960-rk3399_defconfig
> @@ -57,6 +57,8 @@ CONFIG_USB_ETHER_ASIX88179=y
>   CONFIG_USB_ETHER_MCS7830=y
>   CONFIG_USB_ETHER_RTL8152=y
>   CONFIG_USB_ETHER_SMSC95XX=y
> +CONFIG_USB_GADGET=y
> +CONFIG_USB_DWC3=y
>   CONFIG_USE_TINY_PRINTF=y
>   CONFIG_SPL_TINY_MEMSET=y
>   CONFIG_ERRNO_STR=y



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 10/10] rock960: Enable USB Gadget
@ 2019-11-23 14:22         ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 14:22 UTC (permalink / raw)
  To: u-boot


On 2019/11/19 下午4:26, Jagan Teki wrote:
> Enable DWC3 core, gadget for rock960 board.
>
> This would help to use fastboot by default.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   configs/rock960-rk3399_defconfig | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
> index 979ca0f93b..d0ad6865cf 100644
> --- a/configs/rock960-rk3399_defconfig
> +++ b/configs/rock960-rk3399_defconfig
> @@ -57,6 +57,8 @@ CONFIG_USB_ETHER_ASIX88179=y
>   CONFIG_USB_ETHER_MCS7830=y
>   CONFIG_USB_ETHER_RTL8152=y
>   CONFIG_USB_ETHER_SMSC95XX=y
> +CONFIG_USB_GADGET=y
> +CONFIG_USB_DWC3=y
>   CONFIG_USE_TINY_PRINTF=y
>   CONFIG_SPL_TINY_MEMSET=y
>   CONFIG_ERRNO_STR=y

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets)
  2019-11-19  8:26     ` [U-Boot] " Jagan Teki
@ 2019-11-23 15:37       ` Kever Yang
  -1 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 15:37 UTC (permalink / raw)
  To: Jagan Teki, Simon Glass, Philipp Tomsich
  Cc: Marek Vasut, u-boot, linux-amarula, linux-rockchip

Jagan,

On 2019/11/19 下午4:26, Jagan Teki wrote:
> Setup dwc3_device structure for non-dm gadgets, which is used
> in rk3399 platforms.
>
> dwc3_device would have basic regbase, dr_mode, high speed
> and 16-bit UTMI+ etc.
>
> Cc: Marek Vasut <marex@denx.de>
> Tested-by: Levin Du <djw@t-chip.com.cn>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>   arch/arm/mach-rockchip/board.c | 32 ++++++++++++++++++++++++++++++--
>   1 file changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
> index c90eb976d0..542823b8cd 100644
> --- a/arch/arm/mach-rockchip/board.c
> +++ b/arch/arm/mach-rockchip/board.c
> @@ -49,8 +49,10 @@ void enable_caches(void)
>   }
>   #endif
>   
> -#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
> +#if defined(CONFIG_USB_GADGET)
>   #include <usb.h>
> +
> +#if defined(CONFIG_USB_GADGET_DWC2_OTG)
>   #include <usb/dwc2_udc.h>
>   
>   static struct dwc2_plat_otg_data otg_data = {
> @@ -117,7 +119,33 @@ int board_usb_cleanup(int index, enum usb_init_type init)
>   {
>   	return 0;
>   }
> -#endif
> +#endif /* CONFIG_USB_GADGET_DWC2_OTG */
> +
> +#if defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB_GADGET)

I believe we should use CONFIG_USB_DWC3_GADGET instead of CONFIG_USB_DWC3.

This patch cause below error:

    aarch64:  +   rock64-rk3328
+arch/arm/mach-rockchip/board.c:142:5: error: redefinition of 
‘board_usb_init’
+ int board_usb_init(int index, enum usb_init_type init)
+     ^~~~~~~~~~~~~~
+arch/arm/mach-rockchip/board.c:64:5: note: previous definition of 
‘board_usb_init’ was here
+make[2]: *** [arch/arm/mach-rockchip/board.o] Error 1

Thanks,

- Kever

> +#include <dwc3-uboot.h>
> +
> +static struct dwc3_device dwc3_device_data = {
> +	.maximum_speed = USB_SPEED_HIGH,
> +	.base = 0xfe800000,
> +	.dr_mode = USB_DR_MODE_PERIPHERAL,
> +	.index = 0,
> +	.dis_u2_susphy_quirk = 1,
> +	.hsphy_mode = USBPHY_INTERFACE_MODE_UTMIW,
> +};
> +
> +int usb_gadget_handle_interrupts(void)
> +{
> +	dwc3_uboot_handle_interrupt(0);
> +	return 0;
> +}
> +
> +int board_usb_init(int index, enum usb_init_type init)
> +{
> +	return dwc3_uboot_init(&dwc3_device_data);
> +}
> +#endif /* CONFIG_USB_DWC3 */
> +
> +#endif /* CONFIG_USB_GADGET */
>   
>   #if CONFIG_IS_ENABLED(FASTBOOT)
>   int fastboot_set_reboot_flag(void)


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [U-Boot] [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets)
@ 2019-11-23 15:37       ` Kever Yang
  0 siblings, 0 replies; 46+ messages in thread
From: Kever Yang @ 2019-11-23 15:37 UTC (permalink / raw)
  To: u-boot

Jagan,

On 2019/11/19 下午4:26, Jagan Teki wrote:
> Setup dwc3_device structure for non-dm gadgets, which is used
> in rk3399 platforms.
>
> dwc3_device would have basic regbase, dr_mode, high speed
> and 16-bit UTMI+ etc.
>
> Cc: Marek Vasut <marex@denx.de>
> Tested-by: Levin Du <djw@t-chip.com.cn>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>   arch/arm/mach-rockchip/board.c | 32 ++++++++++++++++++++++++++++++--
>   1 file changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
> index c90eb976d0..542823b8cd 100644
> --- a/arch/arm/mach-rockchip/board.c
> +++ b/arch/arm/mach-rockchip/board.c
> @@ -49,8 +49,10 @@ void enable_caches(void)
>   }
>   #endif
>   
> -#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
> +#if defined(CONFIG_USB_GADGET)
>   #include <usb.h>
> +
> +#if defined(CONFIG_USB_GADGET_DWC2_OTG)
>   #include <usb/dwc2_udc.h>
>   
>   static struct dwc2_plat_otg_data otg_data = {
> @@ -117,7 +119,33 @@ int board_usb_cleanup(int index, enum usb_init_type init)
>   {
>   	return 0;
>   }
> -#endif
> +#endif /* CONFIG_USB_GADGET_DWC2_OTG */
> +
> +#if defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB_GADGET)

I believe we should use CONFIG_USB_DWC3_GADGET instead of CONFIG_USB_DWC3.

This patch cause below error:

    aarch64:  +   rock64-rk3328
+arch/arm/mach-rockchip/board.c:142:5: error: redefinition of 
‘board_usb_init’
+ int board_usb_init(int index, enum usb_init_type init)
+     ^~~~~~~~~~~~~~
+arch/arm/mach-rockchip/board.c:64:5: note: previous definition of 
‘board_usb_init’ was here
+make[2]: *** [arch/arm/mach-rockchip/board.o] Error 1

Thanks,

- Kever

> +#include <dwc3-uboot.h>
> +
> +static struct dwc3_device dwc3_device_data = {
> +	.maximum_speed = USB_SPEED_HIGH,
> +	.base = 0xfe800000,
> +	.dr_mode = USB_DR_MODE_PERIPHERAL,
> +	.index = 0,
> +	.dis_u2_susphy_quirk = 1,
> +	.hsphy_mode = USBPHY_INTERFACE_MODE_UTMIW,
> +};
> +
> +int usb_gadget_handle_interrupts(void)
> +{
> +	dwc3_uboot_handle_interrupt(0);
> +	return 0;
> +}
> +
> +int board_usb_init(int index, enum usb_init_type init)
> +{
> +	return dwc3_uboot_init(&dwc3_device_data);
> +}
> +#endif /* CONFIG_USB_DWC3 */
> +
> +#endif /* CONFIG_USB_GADGET */
>   
>   #if CONFIG_IS_ENABLED(FASTBOOT)
>   int fastboot_set_reboot_flag(void)

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2019-11-23 15:37 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19  8:26 [PATCH v2 00/10] rockchip: rk3399: Add fastboot support Jagan Teki
2019-11-19  8:26 ` [U-Boot] " Jagan Teki
     [not found] ` <20191119082623.6165-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-19  8:26   ` [PATCH v2 01/10] gadget: Select USB_GADGET_MANUFACTURER for rockchip Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
2019-11-23 14:20     ` Kever Yang
2019-11-23 14:20       ` [U-Boot] " Kever Yang
2019-11-19  8:26   ` [PATCH v2 02/10] gadget: Select USB_GADGET_VENDOR_NUM " Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
     [not found]     ` <20191119082623.6165-3-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-23 14:20       ` Kever Yang
2019-11-23 14:20         ` [U-Boot] " Kever Yang
2019-11-19  8:26   ` [PATCH v2 03/10] gadget: rockchip: USB_GADGET_PRODUCT_NUM Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
     [not found]     ` <20191119082623.6165-4-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-23 14:20       ` Kever Yang
2019-11-23 14:20         ` [U-Boot] " Kever Yang
2019-11-19  8:26   ` [PATCH v2 04/10] gadget: rockchip: Add rk3128 USB_GADGET_PRODUCT_NUM Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
     [not found]     ` <20191119082623.6165-5-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-23 14:21       ` Kever Yang
2019-11-23 14:21         ` [U-Boot] " Kever Yang
2019-11-19  8:26   ` [PATCH v2 05/10] fastboot: rockchip: Select FASTBOOT_FLASH[_MMC_DEV] Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
     [not found]     ` <20191119082623.6165-6-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-23 14:21       ` Kever Yang
2019-11-23 14:21         ` [U-Boot] " Kever Yang
2019-11-19  8:26   ` [PATCH v2 06/10] fastboot: rockchip: Fix rk3328 default mmc device Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
     [not found]     ` <20191119082623.6165-7-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-23 14:21       ` Kever Yang
2019-11-23 14:21         ` [U-Boot] " Kever Yang
2019-11-19  8:26   ` [PATCH v2 07/10] usb: dwc3: Add phy interface for dwc3_uboot Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
2019-11-19 11:13     ` Marek Vasut
2019-11-19 11:13       ` [U-Boot] " Marek Vasut
     [not found]     ` <20191119082623.6165-8-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-23 14:21       ` Kever Yang
2019-11-23 14:21         ` [U-Boot] " Kever Yang
2019-11-19  8:26   ` [PATCH v2 08/10] gadget: rockchip: Add rk3399 USB_GADGET_PRODUCT_NUM Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
     [not found]     ` <20191119082623.6165-9-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-23 14:21       ` Kever Yang
2019-11-23 14:21         ` [U-Boot] " Kever Yang
2019-11-19  8:26   ` [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets) Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
     [not found]     ` <20191119082623.6165-10-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-23 14:22       ` Kever Yang
2019-11-23 14:22         ` [U-Boot] " Kever Yang
2019-11-23 15:37     ` Kever Yang
2019-11-23 15:37       ` [U-Boot] " Kever Yang
2019-11-19  8:26   ` [PATCH v2 10/10] rock960: Enable USB Gadget Jagan Teki
2019-11-19  8:26     ` [U-Boot] " Jagan Teki
     [not found]     ` <20191119082623.6165-11-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-11-23 14:22       ` Kever Yang
2019-11-23 14:22         ` [U-Boot] " Kever Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.