GPIO Dump

From Linux Rockchip
Jump to: navigation, search

A lot of different vendors use the RKxxx with different combinations of WIFI and BT chips. These supporting chips are connected to the SoC using general purpose input/output (GPIO). If some custom kernels do not work with certain WIFI chips, it is likely that the driver expects the chip to be on a different GPIO PIN than it is actually wired to. Changing the kernel source to reflect the real PINOUT of the SoC will awake those WIFI chips, IF a driver exists.

If a WIFI or other GPIO connected device works using an official ANDROID image from the vendor, an insertable module exists that will reveal the used GPIO PINOUTs, reading them from a running android kernel on the device in question.

The scripts/gpio_dump_opt.sh script tries to make an automated report of the gpios in different states. It was originally sourced from Freaktab Thread for GPIO module but has had some updates

How to use the tool

Copy the .ko and the app to your device somewhere (no ssh? no adb? "nc" can help, "nc -l 60000 > file" on the device, and "nc device.ip 6000 < file" on your host, if networking is working) The .ko needs to match your kernel version, (check dmesg) but the app will work regardless.

You may wish to record multiple dumps, toggling /sys/class/rfkill/rfkillXXX/state to check for power control gpios for wifi/bt, or any other power save pins.