Skip to contentSkip to conversation

usb:gadget:s5p USB Device Controller (UDC) implementation

PATCH Superseded Lukasz Majewski 3 participants 6 messages Sep 1, 2011 – Oct 6, 2011

Subsystems (2)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 cover usb:gadget:s5p USB Device Controller (UDC) implementation

This patch series adds support for Samsung's USB Device Controller (UDC) on GONI reference target.

---
Depend on:
http://patchwork.ozlabs.org/patch/112847/

Lukasz Majewski (2):
usb:gadget:s5p USB Device Controller (UDC) implementation usb:gadget:s5p Enabling the USB Gadget framework at GONI

 arch/arm/include/asm/arch-s5pc1xx/cpu.h    |    4 +
 arch/arm/include/asm/arch-s5pc1xx/hs_otg.h |   32 +
 board/samsung/goni/goni.c                  |   45 +-
 drivers/usb/gadget/Makefile                |    4 +
 drivers/usb/gadget/regs-otg.h              |  209 ++++
 drivers/usb/gadget/s3c_udc_otg.c           |  894 +++++++++++++++++
 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c  | 1449 ++++++++++++++++++++++++++++
 include/configs/s5p_goni.h                 |    3 +
 include/usb/lin_gadget_compat.h            |   69 ++
 include/usb/s3c_udc.h                      |  160 +++
 10 files changed, 2868 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-s5pc1xx/hs_otg.h
 create mode 100644 drivers/usb/gadget/regs-otg.h
 create mode 100644 drivers/usb/gadget/s3c_udc_otg.c
 create mode 100644 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
 create mode 100644 include/usb/lin_gadget_compat.h
 create mode 100644 include/usb/s3c_udc.h
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH v3 1/2 usb:gadget:s5p USB Device Controller (UDC) implementation

This commit provides UDC driver support for Samsung's SoC family of processors.

---
Changes for v2:
- Coding cleanups and fixes
- s3c_udc* files history and origination added
- regs-otg.h rewritten to use structs instedad of #defines
Changes for v3:
- D-cache coherency support

---
 drivers/usb/gadget/Makefile               |    4 +
 drivers/usb/gadget/regs-otg.h             |  209 +++++
 drivers/usb/gadget/s3c_udc_otg.c          |  894 ++++++++++++++++++
 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c | 1449 +++++++++++++++++++++++++++++
 include/usb/lin_gadget_compat.h           |   69 ++
 include/usb/s3c_udc.h                     |  160 ++++
 6 files changed, 2785 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/gadget/regs-otg.h
 create mode 100644 drivers/usb/gadget/s3c_udc_otg.c
 create mode 100644 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
 create mode 100644 include/usb/lin_gadget_compat.h
 create mode 100644 include/usb/s3c_udc.h
drivers/usb/gadget/Makefile +4 -0
index 7d5b504..cd22bbe 100644
@@ -26,6 +26,10 @@ include $(TOPDIR)/config.mk
 LIB	:= $(obj)libusb_gadget.o
 
 # new USB gadget layer dependencies
+ifdef CONFIG_USB_GADGET
+COBJS-y += epautoconf.o config.o usbstring.o
+COBJS-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
+endif
 ifdef CONFIG_USB_ETHER
 COBJS-y += ether.o epautoconf.o config.o usbstring.o
 COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o
drivers/usb/gadget/regs-otg.h new file +209 -0

209 lines not on this page · raw message

drivers/usb/gadget/s3c_udc_otg.c new file +894 -0

894 lines not on this page · raw message

drivers/usb/gadget/s3c_udc_otg_xfer_dma.c new file +1449 -0

1,449 lines not on this page · raw message

include/usb/lin_gadget_compat.h new file +69 -0

69 lines not on this page · raw message

include/usb/s3c_udc.h new file +160 -0

160 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#2 lore raw

PATCH v3 1/2 usb:gadget:s5p USB Device Controller (UDC) implementation

Dear Lukasz Majewski,

Quoted 17 lines · In message <[email protected]> you wrote:

This commit provides UDC driver support for Samsung's SoC family of processors.

---
Changes for v2:
- Coding cleanups and fixes
- s3c_udc* files history and origination added
- regs-otg.h rewritten to use structs instedad of #defines
Changes for v3:
- D-cache coherency support

Quoted 13 lines
---
 drivers/usb/gadget/Makefile               |    4 +
 drivers/usb/gadget/regs-otg.h             |  209 +++++
 drivers/usb/gadget/s3c_udc_otg.c          |  894 ++++++++++++++++++
 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c | 1449 +++++++++++++++++++++++++++++
 include/usb/lin_gadget_compat.h           |   69 ++
 include/usb/s3c_udc.h                     |  160 ++++
 6 files changed, 2785 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/gadget/regs-otg.h
 create mode 100644 drivers/usb/gadget/s3c_udc_otg.c
 create mode 100644 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
 create mode 100644 include/usb/lin_gadget_compat.h
 create mode 100644 include/usb/s3c_udc.h

Checkpatch says:

total: 0 errors, 16 warnings, 2791 lines checked

Please clean up and resubmit. Thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Sometimes a man will tell his bartender things he'll never tell his doctor.
	-- Dr. Phillip Boyce, "The Menagerie" ("The Cage"),
	   stardate unknown.
#3 lore raw

PATCH v3 2/2 usb:gadget:s5p Enabling the USB Gadget framework at GONI

In reply to Lukasz Majewski

This commit is enabling support for USB Gadgets support at GONI reference target

---
Changes for v2:
- None
Changes for v3:
- Error handlers for max8998_set_ldo functions
---
Dependency:
MAX8998 PMIC support

---
 arch/arm/include/asm/arch-s5pc1xx/cpu.h    |    4 ++
 arch/arm/include/asm/arch-s5pc1xx/hs_otg.h |   32 ++++++++++++++++++++
 board/samsung/goni/goni.c                  |   45 +++++++++++++++++++++++++++-
 include/configs/s5p_goni.h                 |    3 ++
 4 files changed, 83 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-s5pc1xx/hs_otg.h
arch/arm/include/asm/arch-s5pc1xx/cpu.h +4 -0
index e74959f..e699fc4 100644
@@ -55,6 +55,10 @@
 #define S5PC110_VIC1_BASE	0xF2100000
 #define S5PC110_VIC2_BASE	0xF2200000
 #define S5PC110_VIC3_BASE	0xF2300000
+#define S5PC110_OTG_BASE	0xEC000000
+#define S5PC110_PHY_BASE	0xEC100000
+#define S5PC110_USB_PHY_CONTROL 0xE010E80C
+
 
 #ifndef __ASSEMBLY__
 #include <asm/io.h>
arch/arm/include/asm/arch-s5pc1xx/hs_otg.h new file +32 -0
new file mode 100644
index 0000000..d68db04
@@ -0,0 +1,32 @@
+/*
+ * (C) Copyright 2009 SAMSUNG Electronics
+ * Minkyu Kang <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __ASM_ARCH_HSOTG_H_
+#define __ASM_ARCH_HSOTG_H_
+
+#ifndef __ASSEMBLY__
+struct s3c_plat_otg_data {
+	int		(*phy_control)(int on);
+	unsigned int	regs_phy;
+	unsigned int	regs_otg;
+};
+
+#endif	/* __ASSEMBLY__ */
+#endif
board/samsung/goni/goni.c +44 -1

54 lines not on this page · raw message

include/configs/s5p_goni.h +3 -0
index c860420..4494167 100644
@@ -237,5 +237,8 @@
 #define CONFIG_SYS_I2C_SPEED	50000
 #define CONFIG_I2C_MULTI_BUS
 #define CONFIG_SYS_MAX_I2C_BUS	7
+#define CONFIG_USB_GADGET		1
+#define CONFIG_USB_GADGET_S3C_UDC_OTG	1
+#define CONFIG_USB_GADGET_DUALSPEED	1
 
 #endif	/* __CONFIG_H */
Signature · 1 line
1.7.2.3
#4 lore raw

v3 cover usb:gadget:s5p USB Device Controller (UDC) implementation

In reply to Lukasz Majewski

Dear all,

Quoted 10 lines

This patch series adds support for Samsung's USB Device Controller (UDC) on GONI reference target.

---
Depend on:
http://patchwork.ozlabs.org/patch/112847/

Lukasz Majewski (2):
usb:gadget:s5p USB Device Controller (UDC) implementation usb:gadget:s5p Enabling the USB Gadget framework at GONI

Are there any comments about those patches? There wasn't any reply about them for some time...

Signature · 6 lines
Best regards,

Lukasz Majewski

Samsung Poland R&D Center
Platform Group
#5 lore raw

v3 cover usb:gadget:s5p USB Device Controller (UDC) implementation

Hi,

2011/9/16 Lukasz Majewski <[email protected]>:

Quoted 9 lines

Dear all,

Quoted 7 lines

This patch series adds support for Samsung's USB Device Controller (UDC) on GONI reference target.

---
Depend on:
http://patchwork.ozlabs.org/patch/112847/

Quoted 6 lines
Quoted 3 lines

Lukasz Majewski (2):
? usb:gadget:s5p USB Device Controller (UDC) implementation ? usb:gadget:s5p Enabling the USB Gadget framework at GONI

Are there any comments about those patches? There wasn't any reply about them for some time...

Applied to u-boot-usb.
Thanks.

Kind regards,

Remy