Droid4's touchscreen can be used with mainline's maxtouch driver. The
touchscreen's lower area is used for four soft buttons (KEY_MENU,
KEY_HOME, KEY_BACK, KEY_SEARCH), but that does not seem to be currently
supported by the mainline kernel.
The mxt224 configuration can be saved with "mxt-app" for the kernel
to load. It can be saved after the first boot with:
# mxt-app -d i2c-dev:1-004a --save /lib/firmware/maxtouch.cfg
Where the mxt-app can be found at:
https://github.com/atmel-maxtouch/mxt-app
The firmware for the droid 4 mxt224 comes with GPLv2 license in the
Motorola Linux kernel sources. This firmware can be dumped out with
"droid4-touchscreen-firmware" program at:
https://github.com/tmlind/droid4-touchscreen-firmware
The related LCD patches are still pending, but when merged,
the touchscreen can be rotated in X with something like:
# xrandr --output DSI-1 --rotate right
# xinput set-prop 6 'Coordinate Transformation Matrix' \
0 1 0 -1 0 1 0 0 1
For now, we rely on a gpio-hog but later on we can add the reset
gpio handling to the driver and have it load the maxtouch.cfg and
maxtouch.fw on boot.
This patch is based on combined similar patches done by me and
Sebastian.
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
On Droid 4 "Volume Down" and "Keypad Slide" keys are
connected via SoC GPIOs, "Power Key" via CPCAP and
all other keys via SoC keypad Matrix. This adds the
GPIO keys.
Signed-off-by: Sebastian Reichel <sre@kernel.org>
[tony@atomide.com: updated to apply on omap4-keypad patch]
Signed-off-by: Tony Lindgren <tony@atomide.com>
With drivers/mfd/motorola-cpcap.c and drivers/regulator/cpcap-regulator.c
we can now configure proper regulators for droid 4.
Let's add regulator voltages and switch over MMC, eMMC and WLAN to use
the CPCAP regulators.
Cc: devicetree@vger.kernel.org
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Tested-By: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Let's configure the keypad in a way where it's usable out of the
box for Linux console use. We want to have the keyboard usable with
Linux console for example when stuck into an initramfs during boot,
for when installing a distro.
As we need to need to have keys mapped in the user space anyways
for some of the keys to match the labels, this non-standard mapping
or usability should be OK.
Some keys don't match the labels either as they don't follow the PC
keyboard style. For example we have "shift + ," produce "<", and
"shift + ." produce ">" instead of ";" and ":".
So let's follow the standard PC keyboard layout for ctrl, shift and
alt keys:
Ctrl = what is labeled as shift
Alt = what is labeled as SYM
Shift = what is lableled as caps lock
This way we have Ctrl key for console use. Who knows where they got
the caps lock idea.. Probably from some focus group popularity vote
or something.
For the OK key, let's keep it as the useless KEY_OK unless we can
come up with some standard mapping for it we can stick with.
We have at least Esc, Delete, Meta, and Page Down keys missing, but
none of them seem to be better than others. PC keyboard often has
Page Down in that location. Esc would be probably the most usable
one when installing a Linux distro but is the opposite of OK.
Note that the LCD keys are just touchscreen hot spots, so I'm not
sure if the driver or hardware allows setting them up as keys for
the console.
Anyways, the rest can be mapped in the user space.
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Scott <michael.scott@linaro.org>
Tested-By: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Let's add minimal support for droid 4 with MMC and WLAN working.
It can be booted with appended dtb using kexec to a state where
MMC and WLAN work with currently no support for it's PMIC or
display.
Note that we are currently using fixed regulators as we don't
have support for it's cpcap PMIC. I'll be posting regmap_spi
based minimal cpcap patches later on for USB and the debug
UART on droid 4 multiplexed with the USB connector.
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>