Community Added Features on LO kernel

From OMAPpedia

Revision as of 19:35, 5 October 2009 by GeethaT (Talk | contribs)
Jump to: navigation, search

Contents

USB Keyboard and Mouse

The kernel currently has g_zero support. The devices keyboard and mouse have been added based on that. The config changes to enable these are.

Configuration changes

Modify the Zoom2 Defconfig (kernel_omap3/arch/arm/configs/omap_zoom2_defconfig) for the below.

 #
 # Userland interfaces
 #
 # CONFIG_INPUT_MOUSEDEV is not set
 CONFIG_INPUT_MOUSEDEV=y
 CONFIG_INPUT_MOUSEDEV_PSAUX=y
 #
 # Input Device Drivers
 #
 # CONFIG_INPUT_KEYBOARD is not set
 CONFIG_INPUT_KEYBOARD=y
 CONFIG_KEYBOARD_ATKBD=y
 CONFIG_KEYBOARD_TWL4030=y
 # CONFIG_INPUT_MOUSE is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
 CONFIG_MOUSE_PS2_ALPS=y
 CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
 CONFIG_INPUT_UINPUT=y
 CONFIG_INPUT_GPIO=y
 CONFIG_INPUT_KEYCHORD=y

The changes will soon be pushed upstream.

How to install the devices

The devices work over the USB OTG. To setup USB OTG, refer to Support Tools page

Building the USB gadget

Once the kernel has been built with the above modified Zoom2 defconfig, build the modules which will generate the g_zero.ko file. To build the modules

 # make CROSS_COMPILE=arm-none-linux-gnueabi- modules
 
 The g_zero.ko file will be at kernel/drivers/usb/gadget

Installing the devices

Copy g_zero.ko to the SD card or another accessible location.

Once the file system has loaded, install the gadget module.

 # insmod g_zero.ko

This will install the gadget module and the USB devices would be detected. Some example logs are shown below.


The devices are plug and play and you can add or remove devices.

root@omapzoom2:/media/mmcblk0p1# <7>hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0010
<7>hub 1-1:1.0: port 4, status 0301, change 0001, 1.5 Mb/s
<7>hub 1-1:1.0: debounce: port 4: total 100ms stable 100ms status 0x301
<7>hub 1-1:1.0: port 4 not reset yet, waiting 10ms
<6>usb 1-1.4: new low speed USB device using musb_hdrc and address 5

usb 1-1.4: new low speed USB device using musb_hdrc and address 5 <7>hub 1-1:1.0: port 4 not reset yet, waiting 10ms <7>usb 1-1.4: skipped 1 descriptor after interface <7>usb 1-1.4: default language 0x0409 <3>usb 1-1.4: device v046d pc016 is not supported usb 1-1.4: device v046d pc016 is not supported

<7>usb 1-1.4: udev 5, busnum 1, minor = 4 <6>usb 1-1.4: New USB device found, idVendor=046d, idProduct=c016 usb 1-1.4: New USB device found, idVendor=046d, idProduct=c016 <6>usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 <6>usb 1-1.4: Product: Optical USB Mouse usb 1-1.4: Product: Optical USB Mouse <6>usb 1-1.4: Manufacturer: Logitech usb 1-1.4: Manufacturer: Logitech <7>PM: Adding info for usb:1-1.4 <7>usb 1-1.4: uevent <7>usb 1-1.4: usb_probe_device <6>usb 1-1.4: configuration #1 chosen from 1 choice usb 1-1.4: configuration #1 chosen from 1 choice

<7>usb 1-1.4: adding 1-1.4:1.0 (config #1, interface 0) <7>PM: Adding info for usb:1-1.4:1.0 <7>usb 1-1.4:1.0: uevent <7>usbhid 1-1.4:1.0: usb_probe_interface <7>usbhid 1-1.4:1.0: usb_probe_interface - got id <7>PM: Adding info for hid:0003:046D:C016.0003 <7>PM: Adding info for No Bus:input4 <6>input: Logitech Optical USB Mouse as /devices/platform/musb_hdrc/usb1/1-1/1-1.4/1-1.4:1.0/input/input4 input: Logitech Optical USB Mouse as /devices/platform/musb_hdrc/usb1/1-1/1-1.4/1-1.4:1.0/input/input4 <7>PM: Adding info for No Bus:mouse1 <7>PM: Adding info for No Bus:event4 <6>generic-usb 0003:046D:C016.0003: input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-musb_hdrc-1.4/input0 generic-usb 0003:046D:C016.0003: input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-musb_hdrc-1.4/input0 <7>PM: Adding info for No Bus:ep_81 <7>PM: Adding info for No Bus:usbdev1.5 <7>PM: Adding info for No Bus:ep_00


To list the devices,

 # lsusb

root@omapzoom2:/media/mmcblk0p1# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 050d:0234 Belkin Components F5U234 USB 2.0 4-Port Hub Bus 001 Device 003: ID 413c:1002 Dell Computer Corp. Keyboard Hub Bus 001 Device 004: ID 413c:2002 Dell Computer Corp. SK-8125 Keyboard Bus 001 Device 005: ID 046d:c016 Logitech, Inc. M-UV69a/HP M-UV96 Optical Wheel Mouse root@omapzoom2:/media/mmcblk0p1#

HDMI

HDMI has been enabled on the LO kernel using the patches from Android kernel. The instructions are provided here for anyone to take the changes to enable HDMI on another kernel.

Code to enable HDMI

Below are the patches and pull them in order 10965, 10760, 10761, 10762

 https://review.source.android.com/#change,10762
 https://review.source.android.com/#change,10761
 https://review.source.android.com/#change,10760
 https://review.source.android.com/#change,10965

With the above changes, HDMI is enabled on the kernel.

How to test HDMI

Check the devices (HDMI may be on display1 or 2 depending on whether you have DVI and which one it was assigned to)

 lcd=/sys/devices/platform/omapdss/display0
 hdmi=/sys/devices/platform/omapdss/display1

To enable HDMI

 echo "0" > $lcd/enabled
 echo "1" > $hdmi/enabled

To switch back to LCD from HDMI

 echo "1" > $lcd/enabled
 echo "0" > $hdmi/enabled

Known Limitations

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox