View Single Post
Old 02-20-2013, 05:57 AM   #8
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,491
Karma: 5977000
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Hmm this rings a bell: http://www.mobileread.com/forums/sho...2&postcount=27

and http://www.mobileread.com/forums/sho...0&postcount=28


You should be looking at choffs works

http://www.mobileread.com/forums/sho...85&postcount=7

http://www.christian-hoff.com/?p=16

http://www.christian-hoff.com/?p=44

http://www.mobileread.com/forums/sho...d.php?t=194518

http://www.mobileread.com/forums/sho...5&postcount=11
http://www.christian-hoff.com/?p=44#comment-236

http://www.mobileread.com/forums/sho...30&postcount=7

etc...

http://www.mobileread.com/forums/sho...3&postcount=15

Quote:
just heard of your efforts to create a USB host port for the Kindle Touch. This is a fantastic thing to do, and your work is much appreciated!

Best thing of all is that there shouldn’t be too much effort needed to create a port for the Touch version. The hardware of the Touch and the K4 is mostly the same(same board, USB chips etc.) and this is also reflected in the code diff, which is minimal and – as far as I can tell – only consists of bug fixes.

The drivers/usb diff of the two kernel trees is also neglegible compared to the USB OTG changes.

Suggested way to port this to the Kindle Touch would be as follows:

1 – Take the K4 kernel as a basis. Copy the the following files/directories from the USB OTG port for the K4 and use these files as a replacement for existing K5 files/directories:
+ drivers/usb
+ arch/arm/plat-mxc/include/mach/arc_otg.h
+ arch/arm/plat-mxc/usb_common.c
+ drivers/power/yoshi_charger.c
+ include/linux/fsl_devices.h

2 – Reapply the USB OTG code changes to the following files:
+ drivers/power/Kconfig
+ drivers/power/Makefile

3 – Now create a OTG defconfig for the Kindle Touch. A working OTG config for the K4 can be found at arch/arm/configs/imx50_tequila_usbotg_defconfig. For the Touch, you will need to create your own.

Use the arch/arm/configs/imx50_yoshi_defconfig as a basis. Then make sure that the following options are set:

+ CONFIG_CHARGER_YOSHI=m
+ CONFIG_USB=m
+ CONFIG_USB_OTG=y
+ CONFIG_USB_EHCI_ARC_OTG=y
+ # CONFIG_USB_OTG_WHITELIST is not set
+ # CONFIG_USB_OTG_BLACKLIST_HUB is not set

The following options should already be set:
+ CONFIG_USB_EHCI_HCD=m
+ CONFIG_USB_EHCI_ARC=y

This is only for minimal USB support. If you want support for peripherial devices such as keyboards, sound cards, USB mass storage etc. you will need to enable additional options.

4 – Additional changes will need to be done to the file drivers/usb/host/ehci-arc.c:

+ To ehci_fsl_drv_deep_suspend and ehci_fsl_drv_deep_resume add the following code to the beginning:

+ if (pdata->operating_mode == FSL_USB2_DR_HOST) {
+ return ehci_fsl_drv_suspend/ehci_fsl_drv_resume(..);
+ }

This ensures that the suspend/resume works also with the internal USB Host port(which is connected to the WAN modem)

Also you will need to UNDO the following code changes done by me on those files:
Code:
@@ -78,7 +85,6 @@ wakeup_enable_store(struct device *dev, struct device_attribute *attr,
{
if (strstr(buf, “1″) != NULL) {
wakeup_value = 1;
- wan_set_usb_wake_callback(ehci_hcd_recalc_work);
ehci_hcd_restart_idle();
}
else {
Afterwards, compile the kernel and transfer it to the device. Let’s hope that this works for you. I hope you have got a serial connection to your Kindle because debugging will be difficult otherwise.

Hoper this helps!

Kind regards,

Christian

I really wish I had time to finish this. However time is against me right now.
(I would've done it before now but for the cable, hey ho)

Last edited by twobob; 02-20-2013 at 06:38 AM.
twobob is offline   Reply With Quote