Regulator uclass takes over this job, avoid to init twice.
Change-Id: Idea56143bd7008742936d3bbe1ebadb00c683a47
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Fixed-regulator maybe the first device probed by regulators_enable_boot_on(),
its failure ends up the other regulator traverse(e.g. PMIC regulator), we hope
to get this information.
Change-Id: I2f1f67232dbb8a1b72dc8dfec75f1f6414b2abb9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The uc_pdata->name is from property "regulator-name" which
is more accuracy to descript this regulator.
Change-Id: I813604ff528b757a1f9b9191dbdd4472f838a367
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The irq framework takes over the enable/disable management
for virq chip.
Change-Id: I63202b22b121b4a889d5a408a6a5a8f50a3c24d8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Some interrupt only need active when suspend(e.g. plugout, pwrkey).
Change-Id: Ieebaa5fbf9f69f424eefe5a52c1517be63acf873
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
New name is more accurate about internal implementation..
Change-Id: I16891f5f614fbb17f1e65e04ef4d8a713c8624f3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
So that the child drivers can request their irq through the
generic interrupt framework.
Include: RK805/808/816/817/818.
Change-Id: I5556f2e926e850ac6717a05166eab5e19566d531
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.
This commit moves the header code:
include/libfdt.h -> include/linux/libfdt.h
include/libfdt_env.h -> include/linux/libfdt_env.h
and replaces include directives:
#include <libfdt.h> -> #include <linux/libfdt.h>
#include <libfdt_env.h> -> #include <linux/libfdt_env.h>
Change-Id: I68fd5734d6460c169fa5ee2893c57cb5d73340b6
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit b08c8c4870831c9315dcae237772238e80035bd5)
The property indicates this regulator should skip init setting
sequence, usually for saving boot time.
Change-Id: I40a81c84b0696c70b16ddba50aeb457412287116
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The on/off_source value has been changed,
so we can't get the correct on/off source.
Change-Id: I7c522574f5e8d3bbc3c5d73980cdccdb4717da52
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
If a fuel gauge device doesn't have both charger and fuel gauge
capabilities, try to find devices group to support that.
Change-Id: I78d929e80e79bea304bb2b29f423c90ca12be16f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Return "FG_CAP_FUEL_GAUGE | FG_CAP_CHARGER" as default value
when there's not implementation, which compatibles with all fg drivers.
Change-Id: Ie71e1271e504c63be42af41551e10e8c2c7d89ac
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
cmd depends on DM_CHARGE_DISPLAY and default y.
Change-Id: I5e685e0020c4aa1da80ffc27e5a576bc8969c3be
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The under-voltage protection will shutdown the LDO3 and reset the PMIC.
Change-Id: Ic84c7ad1a2eed8c1f983e761988ffb903fc878af
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
It supports charging and charging-full leds which
depends on soc value.
Change-Id: I6b37919c5bedf9b81d388853996cf83c6f75a73a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Under the charging interface,if the rtc alarm is
triggered, boot on the system.
Change-Id: I6a921bd5c6971c45b02b2be84d9d6d79e9b17a36
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
support rtc alarm interrupt and alarm trigger power up.
Change-Id: I7752f173d524f579b57b862d2788296ab1486c14
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
rk817/rk809 must restore the PMIC_POWER_EN OTP value before the system reboot.
Change-Id: Ia62cb8f5b0dc9fef8a32a3af5f087c55a9888d78
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
RK8xx switch does not need to set the voltage,
but if dts set regulator-min-microvolt/regulator-max-microvolt,
will cause regulator set value fail and not to enable this switch.
So add an empty function to return success.
Change-Id: Ifc3cfe24902123d7434f3f6560a8e530c03d0b2a
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
regulator would print value when set init voltage.
Change-Id: I8bc9df40d452ae89cced7145e8760e29d7339ac8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1. when first power but not charge in uboot, fuel gauge is initilized
but miss saving data for kernel fuel gauge;
2. wait 75us after coulomb init, otherwise read back 0mAh;
3. always read remain capacity and print it for debug;
Change-Id: Iba30ef4e96942fcfbf61dacabf8199dc896bab64
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Because wtemp dvfs driver reads all cpu/dmc info from kernel dtb.
Change-Id: Ifd85ed976bd880cf710c58e07351ef038f3a125c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
A “battery fuel gauge” is integrated in the RK809. Using
the proprietary algorithms and the sensed battery current
and voltage, the gauge can accurately calculate the battery
capacity based on the charging/discharging characteristics
of the battery preloaded in the system. The gauge then sends
the battery capacity information to the processor through
the I2C interface.
Change-Id: I4d1d0cce8d76f4ec39dfcd00c495c64257fd4b7b
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.
This commit moves the header code:
include/libfdt.h -> include/linux/libfdt.h
include/libfdt_env.h -> include/linux/libfdt_env.h
and replaces include directives:
#include <libfdt.h> -> #include <linux/libfdt.h>
#include <libfdt_env.h> -> #include <linux/libfdt_env.h>
Change-Id: I6c0f7e50e8b571106627f25ddac008a62bd2994e
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
The io-domains on Rockchip SoCs will be supplied with 1.8V or 3.3V(3.0V)
depends on hardware design. The driver needs to config them through grf
register.
Change-Id: Ic896b94bfadd0b808da54992e58e2cf4a8fee950
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
dm regulator uclass would verbose this message.
Change-Id: I76c73bdcf6354d7d892f75ad022be416d3ab0c09
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
this is more flexsible to match regulator type.
Change-Id: I5589b5d1d32d8ac1c6d09d64e680eddd31f2ba90
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>