1README for embedded host controller SL811 (i386) 2================================================ 3 4Original drivers from Pei Liu <pbl@cypress.com> for ARM architecture only. 5Documentaion and readme for Architecture x86 (ADNP/1486) premealy. 6 7 8Kernel configuration: 9--------------------- 10o Patch USB drivers into your kerneltree 11 cd Your_kernel_root 12 13 gunzip linux-2.4.20-usb-1.patch.gz 14 patch -p1 -T < linux-2.4.20-usb*.patch 15 OR 16 gunzip -dc linux-2.4.20-usb*.patch.gz | patch -p1 -T 17 18o Load default configuration for CP486SX/2 with ADNP/1486 and USB 19 arch/i386/adnp1486-usb104-SSV20030516 20 21o Run "make configure" and set / verify this entries 22 Code maturity level options ---> 23 [*] Prompt for development and/or incomplete code/drivers 24 General setup ---> 25 [*] PCI support 26 (BIOS) PCI access mode 27 [ ] PCI device name database 28 SCSI support ---> 29 <M> SCSI support 30 <M> SCSI disk support 31 (8) Maximum number of SCSI disks that can be loaded as modules 32 ... Disable all other options ... 33 SCSI low-level drivers ---> 34 ... Disable all low level drivers ... 35 Input core support ---> 36 <M> Input core support (Need only for Keyboard or Mouse) 37 <M> Keyboard support 38 <M> Mouse support 39 Character devices ---> 40 [*] Virtual terminal (Need only for Keyboard) 41 Console drivers ---> 42 [*] VGA text console (Need only for Key/Mouse) 43 Frame-buffer support ---> (... or use FB) 44 USB support ---> 45 <M> Support for USB 46 [ ] USB verbose debug messages (Optional) 47 [*] Preliminary USB device filesystem (Optional for debugging) 48 --- USB Host Controller Drivers 49 <M> SL811HS Alternate (support isochronous mode) 50 ... 51 <M> SL811HS (x86, StrongARM) support (old driver) 52 Disable all others "USB Host Controller Drivers" 53 --- USB Device Class drivers 54 <M> USB Mass Storage support 55 ... and some aditional devices ... 56 <M> USB Printer support 57 <M> USB HIDBP Keyboard (basic) support 58 <M> USB HIDBP Mouse (basic) support 59 USB Serial Converter support ---> 60 <M> USB Serial Converter support 61 <M> USB FTDI Single Port Serial Driver 62o We have no PCI- and no SCSI-System, but all USB-drivers need CONFIG_PCI=y. 63 USB-Floppy driver need the SCSI-Subsystem, so we must enable this global 64 and disable all low level drivers in this menu. 65--- OR --- 66 Download origanal kerneltree, and patch comlplete ADNP 67 with USB support and load configuration for this: 68 bunzip2 -c linux-2.4.20.tar.bz2 | tar xvf - 69 gunzip -c linux-2.4.20-SSV20030516.diff.gz | patch -p1 -T 70 Configuration: arch/i386/adnp1486-usb104-SSV20030516 71 72o Compile the kernel 73 make dep 74 make ROOT_DEV=/dev/ram0 zImage 75 make modules 76 export INSTALL_MOD_PATH="`pwd`/_install" ; make modules_install 77 78 79Default device configuration hc_sl811.o for USB1/104: 80----------------------------------------------------- 81io = 0x220 82irq = 12 83Remember: Second Controller was handled internal with IO offset +2. 84 85 86Installation hc_sl811.o for CF1/USB: 87------------------------------------ 88Compact Flash to USB adapter in io address of ide driver. It is for embedded 89deviced only. 90Please disable IDE driver in kernel configuration or do not load IDE drivers! 91Change MAX_CONTROLERS = 1 into source asm/sl811-hw.h, recompile driver! 92 First Controller only 93 insmod hc_sl811.o io=0x1F0 irq=14 94 Second Controller only 95 insmod hc_sl811.o io=0x3F6 irq=14 96 97Driver hc_sl811.o can not handle both controllers at same time. 98This driver need a address-offset of 2 between controllers. 99Please use alternate driver sl811.o instand. 100 101 102Installation Alternate driver sl811.o: 103-------------------------------------- 104This driver have a better interrupt handler, but don't tested with all devices. 105 106Install both controllers on USB1-104 (default): 107 insmod sl811.o io=0x220,0x222 irq=12,12 108 109Install both controllers on CF/USB1: 110 insmod sl811.o io=0x1f0,0x3f6 irq=14,14 111 112Second controller can disable with specific IOBASE=0 for this controller. 113 114 115General about USB: 116------------------ 117Please install first the driver for hardware, 118and than plugin the hardware into first USB port. 119 120If your hardware find no driver the usbcore give ub a massage for missing 121driver on conole or in file /proc/kmsg such as: 122 new USB device <NULL>-1.9, assigned address 7 123 USB device 7 (vend/prod 0x403/0x8372) is not claimed by any active drive 124In this case remove the hardware from USB port, install the driver and 125than plugin hardware again. 126A list of driver for this missing hardware can found in file 127/_install/lib/modules/2.4.20/modules.usbmap 128Search the number 8372 in this file an verify the vendor ID. So you will 129find the driver name "ftdi_sio" in this file. 130If your hardware not listen in this file. Look into source and search your 131numbers in source. 132More read file:/Documentation/usb/proc_usb_info.txt 133 134Drivers are all under contructions. So some drivers make a kernel panic. In 135this case read all about the drivers dokumentaiona and the drivers source. 136Some drivers need a other kernel driver, but not strictly checked in kenel 137configuration. Here can help the ksymsoops. 138 139 140 141Install a Floppy (NEC UF0001) or USB Stick Fujitsu/Siemens/iomega: 142------------------------------ 143Copy files to target (FTP) and load all drivers. 144Load Generic USB-Handler 145 insmod usbcore.o 146Load USB-Host controller, parameters are optional (default urb_debug=0 io=220 irq=12) 147 insmod hc_sl811.o 148Run the USB-Filesystem 149 mount -t usbdevfs usbdevfs /proc/bus/usb 150Load drivers for disk storage and file systems 151 insmod scsi_mod.o 152 insmod usb-storage.o 153 insmod fat.o 154 insmod vfat.o 155 insmod sd_mod.o 156Create node for floppy 157 mknod /dev/sda b 8 0 158 159Put a disk into your floppy anth than plugin a USB-Floppy (such NEC Model UF0001) 160into first USB-Port. Some Messages will be list on console or in file /proc/kmsg. 161The disk is power on and the SCSI driver will search some partions on disk. Floppy 162have no partions, so must use the first SCSI device without a partion number for mount. 163Than mount the floppy: 164 mount /dev/sda /mnt -t vfat 165 166If you see a partions check with valid partion 1, you should mount this partion. 167Mostly Memory Sticks are formated with one partion. But if Windows format it again, 168no partions is use. 169 170You see that: 171 Partition check: 172 sda: sda1 173Than mount with follow steps: 174 mknod /dev/sda1 b 8 1 175 mount /dev/sda1 /mnt -t vfat 176 177Create complete list of nodes for SCSI-devices: 178 # First inserted device 179 echo -n "Create /dev/sda... " 180 mknod /dev/sda b 8 0 181 for i in 1 2 3 4 5 6 7 182 do 183 echo -n "$i " 184 mknod sda$i c 8 $i 185 done 186 # Second inserted device 187 echo -n "Create /dev/sdb... " 188 mknod /dev/sdb b 8 16 189 mknod /dev/sdb1 b 8 17 190 echo " done" 191 # Set some rights 192 chown root.disk sd* 193 chmod 660 sd* 194 195 196Install a Keyboard: 197------------------- 198Copy files to target (FTP) and load all drivers. 199Load Generic USB-Handler 200 insmod usbcore.o 201Load USB-Host controller, parameters are optional (default urb_debug=0 io=220 irq=12) 202 insmod hc_sl811.o 203Run the USB-Filesystem 204 mount -t usbdevfs usbdevfs /proc/bus/usb 205Load drivers for USB-Keyboard 206 insmod input.o 207 insmod keybdev.o 208 insmod usbkbd.o 209Now you can plugin Keyboard into first USB-Port and login on first console. 210 211Something stuff: 212"Undefined Symbols handle_scancode, keyboard_tasklet, kbd_ledfunc" at install ??? 213USB keyboard need PC-style keyboard driver, because the USB driver 214simulate standard AT-Keycodes. A normaly AT- or PS/2-Keyboard must not 215exist for this. The driver says normaly error (Timeout) on boot. 216You must enable CONFIG_VT in kernel konfiguration! 217Character devices ---> 218 [*] Virtual terminal 219 [ ] Support for console on virtual terminal 220 221Read <file:Documentation/input/input.txt> 222 223 224Install a Mouse: 225---------------- 226Load Generic USB-Handle 227 insmod usbcore.o 228Load USB-Host controller 229 insmod hc_sl811.o 230Run the USB-Filesystem 231 mount -t usbdevfs usbdevfs /proc/bus/usb 232Load Generic Input device 233 insmod input.o 234Load USB-Mouse driver 235 insmod input.o 236 insmod mousedev.o 237 insmod usbmouse.o 238 239Read <file:Documentation/input/input.txt> 240 241 242Install a serial adapter (Sample FTDI): 243--------------------------------------- 244Load Generic USB-Handle 245 insmod usbcore.o 246Load USB-Host controller 247 insmod hc_sl811.o 248Run the USB-Filesystem 249 mount -t usbdevfs usbdevfs /proc/bus/usb 250Load Generic derial device and hardware specific device 251 insmod usbserial.o 252 insmod ftdi_sio.o 253Create node entry for this device 254 mknod /dev/ttyUSB0 c 188 0 255Than plugin the hardware into first USB port and 256use serial device on /dev/ttyUSB0, such call a login: 257 /sbin/getty 115200 ttyUSB0 vt100 & 258 259 260USB-Utils: 261---------- 262- usb-0.6-7.rpm, usb-0.6-7.src.rpm 263 /usr/sbin/lsusb, /usr/share/usb.ids 264 Good tool to list devices parameters. 265 You must load usbcore.o, hc_sl811.o and proc-usb before 266 program works right (use script usb.sh). 267 More details: Install usb-0.6-7.rpm on Your desktop and use "man lsusb". 268 269 270Known Bugs: 271----------- 272 273PL2302 Profilic USB to serial converter will not work with hc_sl811.c (Bulk/Timeout). 274USB Floppy will not work with alternate driver sl811.o (Sector not found) 275 276 277CHANGELOG: 278---------- 279* Fri 03 Okt 2003 hne 280- Patch for 2.4.23-pre6 281- Only low level port io in hardware include as inline functions. 282- Move hc_sl811 and sl811 into host directory. 283- sl811 for two controllers (alternate x86 only). 284 285* Mit 24 Sep 2003 hne 286- Misplaced "host/uhci.o" in Makefile. 287- Move all x86/arm arch depens from main sl811.c to sl811-hw.h. 288 289* Die 23 Sep 2003 hne 290- Put arm and x86 architectur into separate file in include directory. 291- Modifications for both controllers on CF/USB1, alternate sl811 only. 292 Parameter for CF/USB1: "io=0x1f0,0x3f6 irq=14". 293 294* Fri 19 Sep 2003 hne 295- First version for both controllers on USB1-104. 296- Alternative driver sl811.c from kernel 2.4.22 (thanks Yinah), 297 also for 2.4.20. USB Sticks works, Floppy not. 298 299* Die 02 Sep 2003 hne 300- IO range only 2 address. For CF1USB we need io addres 3F6 and 3F7, 301 but do not use 3f8 (ttyS0). 302 303* Mon 11 Aug 2003 hne 304- Comments for using iomega Memory Stick 305 306* Don 12 Jun 2003 hne 307- Added Bus-Name for Kernel 2.4.20, no pattern_test at unload driver. 308- more doc 309 310* Fri May 16 2003 hne 311- More comments, new patchfile, include usb-konfiguration as file 312 313* Wed May 14 2003 hne 314- Patch error: Old Sources was in Kerneltree! 315 316* Mon Mar 17 2003 hne 317- Copy usb SL811 from 2.4.19-rc into 2.4.20 kerneltree 318- Add SL811 in Config and Make 319 320* 18.11.2002 hne 321- hc_sl811_rh.c: 322 rh_unlink_urb: Use usb_dec_dev_use instand of usb_put_dev. Function 323 usb_put_dev isn't known in this module. Some others have a macro for 324 this. What is right usb_put_dev or usb_dec_dev_use? 325- hc_sl811.c: 326 Split into 3 files. Arcitectures store in hc_sl811-arm.c and hc_sl811-x86.c 327 Correct release_region() for both io address, so we can unload modul and 328 load again without reboot. 329 All IO access use 8 bit Data and register number (type __u8). 330 All functions static. 331 Only x86: base_addr renamed to io. data_reg_addr not used. 332