1======================== 2S3C24XX USB Host support 3======================== 4 5 6 7Introduction 8------------ 9 10 This document details the S3C2410/S3C2440 in-built OHCI USB host support. 11 12Configuration 13------------- 14 15 Enable at least the following kernel options: 16 17 menuconfig:: 18 19 Device Drivers ---> 20 USB support ---> 21 <*> Support for Host-side USB 22 <*> OHCI HCD support 23 24 25 .config: 26 27 - CONFIG_USB 28 - CONFIG_USB_OHCI_HCD 29 30 31 Once these options are configured, the standard set of USB device 32 drivers can be configured and used. 33 34 35Board Support 36------------- 37 38 The driver attaches to a platform device, which will need to be 39 added by the board specific support file in linux/arch/arm/mach-s3c2410, 40 such as mach-bast.c or mach-smdk2410.c 41 42 The platform device's platform_data field is only needed if the 43 board implements extra power control or over-current monitoring. 44 45 The OHCI driver does not ensure the state of the S3C2410's MISCCTRL 46 register, so if both ports are to be used for the host, then it is 47 the board support file's responsibility to ensure that the second 48 port is configured to be connected to the OHCI core. 49 50 51Platform Data 52------------- 53 54 See arch/arm/mach-s3c2410/include/mach/usb-control.h for the 55 descriptions of the platform device data. An implementation 56 can be found in linux/arch/arm/mach-s3c2410/usb-simtec.c . 57 58 The `struct s3c2410_hcd_info` contains a pair of functions 59 that get called to enable over-current detection, and to 60 control the port power status. 61 62 The ports are numbered 0 and 1. 63 64 power_control: 65 Called to enable or disable the power on the port. 66 67 enable_oc: 68 Called to enable or disable the over-current monitoring. 69 This should claim or release the resources being used to 70 check the power condition on the port, such as an IRQ. 71 72 report_oc: 73 The OHCI driver fills this field in for the over-current code 74 to call when there is a change to the over-current state on 75 an port. The ports argument is a bitmask of 1 bit per port, 76 with bit X being 1 for an over-current on port X. 77 78 The function s3c2410_usb_report_oc() has been provided to 79 ensure this is called correctly. 80 81 port[x]: 82 This is struct describes each port, 0 or 1. The platform driver 83 should set the flags field of each port to S3C_HCDFLG_USED if 84 the port is enabled. 85 86 87 88Document Author 89--------------- 90 91Ben Dooks, Copyright 2005 Simtec Electronics 92