![]() |
#1 |
rm -rf /
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 219
Karma: 3333683
Join Date: Nov 2019
Location: United Kingdom
Device: K5, KT, KT2, KT3, KT4, KV, PW2, PW3, PW4, PW5
|
Kindle USB OTG Control for iMX6
What is it?
This is a kernel module that allows you to enable and disable USB OTG functionality on Kindle devices using the iMX6 SOC. This functionality is disabled on most iMX6 devices by default; the only working devices are USB sound cards on the PW3 and later devices. This module is capable of expanding that support to any USB device supported by the 3.0.35-lab126 kernel (as long as the additional kernel modules required by the device are compiled and loaded into the kernel too). It has been tested on the KT2 and PW3, but will likely work on the KOA, PW2 and KV too. How do I use it? First, insert the module into the kernel: Code:
insmod otg_control.ko Code:
rmmod otg_control
Code:
echo 0 > /proc/usb_otg # Disable USB OTG functionality echo 1 > /proc/usb_otg # Enable USB OTG functionality echo 2 > /proc/usb_otg # Set audio_enumerated to 1 echo 3 > /proc/usb_otg # Set audio_enumerated to 0 For older devices, use the Enable USB OTG functionality option. This does the same thing as the option above, as well as a couple of additional setup tasks which need to be carried out before USB OTG can be used. Building from source: To build this module from source, you will need a cross-compiler toolchain. Code:
git clone https://github.com/katadelos/linux-3.0.35-lab126.git cd linux-3.0.35-lab126/ git checkout usb-otg-control make ARCH=arm CROSS_COMPILE=arm-kindlepw2-linux-gnueabi- imx60_wario_defconfig echo "CONFIG_USB_KINDLE_OTG_CONTROL=m" >> .config make ARCH=arm CROSS_COMPILE=arm-kindlepw2-linux-gnueabi- modules_prepare make ARCH=arm CROSS_COMPILE=arm-kindlepw2-linux-gnueabi- M=drivers/usb/otg/ |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Mar 2021
Device: Kindle PW4
|
Hi, awesome work!
I've got a PW4 running 5.11.2 (kernel is 4.1.15-lab126). I tried replicating your changes in the kernel tree and building the module but it looks like there's a big leap between 3.0.35 and 4.1.15 so needless to say it doesn't even compile. All I wanted to do is to use a USB keyboard on the kindle and I think this might be the only missing part since usbhid, hid and stuff are already built into the kindle's kernel. Could you by any chance update the procedure / code for it to work on 4.1.15? |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Does Kindle Paperwhite 10th gen support USB OTG out of the box? | n00bdude | Amazon Kindle | 21 | 11-06-2023 07:57 AM |
USB Host (OTG) | tinkerwinker | Kobo Developer's Corner | 9 | 02-04-2017 06:08 AM |
CC and USB/OTG support | GEB | Calibre Companion | 2 | 05-30-2015 12:24 PM |
Experiments with USB-OTG | HarryT | Android Devices | 13 | 07-03-2012 03:55 PM |
USB OTG | Mythic | Bookeen | 7 | 11-11-2007 12:39 PM |