We use it to exit charge animation while system is in runtime.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia6bc3f7a20310f73e060418f0a0ab01ef8745b11
This patch updates the RC driver to accommodate the new framework
Signed-off-by: Lei Chen <lei.chen@rock-chips.com>
Change-Id: I3ff2b5844ce5f1776ac2f94b3cbd42eb5d73cc41
Providing a mininum adc key driver for SPL, which does not
depend on key uclass, but ADC uclass is still required.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I80f861780acd9c47d345b95762a4dd39d19ea6fc
In some cases it is necessary to read the keyboard in early phases of
U-Boot. Update the config to allow this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I0f166e55c84c9f10ced9e4580e6b7c7a6f980a79
It works when CONFIG_USING_KERNEL_DTB is enabled, because we can
set either 'u-boot,dm-spl' or 'u-boot,dm-pre-reloc' for the node
that we can to leave in the u-boot.dtb.
Change-Id: Id3cec0c64ee55ca9bc1e5871e7ad5a2ebb4b1b6a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The PIMC as parent has register the interrupt controller as a irq chip,
and as a children, this driver only cares about the rise/fall event.
Change-Id: I934901a786b70920cd413e1fb15c8a5c372ea399
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
At sometime, its parent driver would setup the main interrupt(e.g. PMIC).
Change-Id: I8d24266c48f515fc92c3529a5b6aa7a18d181af1
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
User can press and release pwrkey for times to enter download mode,
set it disabled by default.
Change-Id: Id2fd9d12756bb1584a4d25b6df0c16a8a85d1e9a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
- only power key can request irq thread;
- this makes key framework be able to manage all key interrupt event;
Change-Id: I9f99607ed7ff9bcd261d3918150e4a4489e0f472
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
- use standard dm framework to implement all key drivers;
- all key node to be children and attach to key bus;
- dm key uclass takes over most work;
- reduce a lot of driver code size;
Change-Id: I9ea4515249d493eb4434890b90350f694c07404f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
We add recovery key node with property "u-boot,dm-pre-reloc"
in uboot dts in order to make sure recovery key works normally
even when kernel dtb is load failed. But There are too many
boards for a platform(eg. RK3399/RK3399PRO), which may cause
a mistake key match between boards via U-Boot dts key nodes,
so that we make kernel dtb key has higher priority.
Change-Id: I771d72860aa626e4a6a1638117cb1876fe5d1a44
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Due to some board use the same u-boot rkxx-evb.dts, dm key had
better support parse same key code for times.
Change-Id: Ifeeb75bef90e52e2747ef2858cec500a928c806d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1. dm key framework takes over more generic jobs;
2. key drivers remove unused codes and match new framework;
3. only power key is registered as interrupt key;
Change-Id: Icdda86f588af721b685f801ed251581f2fd85793
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1. set pmic_sleep as sleep function;
2. set pmic_int active low.
Change-Id: I4bc4034e18b19dc9b1b328870db652d11173fe3a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
because we support U-Boot system suspend and trap into ATF,
we have to make pwrkey as wakeup source, so that we must
register pmic_int as an irq.
we found reading 'get_timer(0)' will return a large value in
the interrupt routine and I don't find out what happend now,
so I add the 'get_ms()' which reads arm gerneric timer tick
direcly.
we clean all PMIC interrupt status for safety to avoid pmic_int
hold in low level which make PMIC can't respond to interrupt any
more.
Change-Id: I46ff81030696f4672faa9fc81141952e52fd5ba9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1. add key name and type;
2. clear both fall and rise interrupt when detect rise.
Change-Id: I0698f3decc4b92cf32ce564a1827eedb5ee19a01
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This patch adds support to RK RC driver, which is basically a IR
receiver. This IP (PWM) is common across all the RK parts for
settop box platforms.
It implements a simple NEC protocol decoder.
Change-Id: I057a341acaeb14d0165bd6187c4074dd230b079f
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
RK805/816 provide pwrkey function while RK808/818 is not.
Change-Id: Ia6cd9fcb0a360d81cff54cf49a1f1c9c653488e6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.
Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.
Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
There was for long time no activity in the mpx5xxx area.
We need to go further and convert to Kconfig, but it
turned out, nobody is interested anymore in mpc5xxx,
so remove it.
Signed-off-by: Heiko Schocher <hs@denx.de>