fernly/scriptic/keypad.S
Sourcerer f29a9e686d kbd: Add keypad support
This adds support for the Fernvale keypad.

Signed-off-by: Sourcerer <sourcerer@gmx.at>
2015-02-02 17:26:09 +08:00

17 lines
428 B
ArmAsm

#include "scriptic.h"
#include "fernvale-gpio.h"
sc_new "set_kbd", 1, 0, 0
/* Set pinmux to use as Keypad instead of GPIO */
sc_write32 0x11100000, 0, GPIO_CTRL_MODE0
sc_usleep 100
sc_read32 0x0, 0, GPIO_CTRL_MODE0
sc_write32 0x11111011, 0, GPIO_CTRL_MODE1
sc_usleep 100
sc_read32 0x0, 0, GPIO_CTRL_MODE1
/* The keyboard controller itself is setup correctly by default,
* no initialisation necessary. */
sc_end