aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/rk808.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-06-01mfd: Add Rockchip rk817 audio CODEC supportChris Morgan1-0/+81
Add rk817 codec support cell to rk808 mfd driver. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-03-30mfd: rk808: Convert RK805 to shutdown/suspend hooksRobin Murphy1-1/+0
RK805 has the same kind of dual-role sleep/shutdown pin as RK809/RK817, so it makes little sense for the driver to have to have two completely different mechanisms to handle essentially the same thing. Move RK805 over to the shutdown/suspend flow to clean things up. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-03-30mfd: rk808: Reduce shutdown duplicationRobin Murphy1-1/+0
Rather than having 3 almost-identical functions plus the machinery to keep track of them, it's far simpler to just dynamically select the appropriate register field per variant. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-11-11mfd: rk808: Fix RK818 ID templateDaniel Schultz1-1/+1
The Rockchip PMIC driver can automatically detect connected component versions by reading the ID_MSB and ID_LSB registers. The probe function will always fail with RK818 PMICs because the ID_MSK is 0xFFF0 and the RK818 template ID is 0x8181. This patch changes this value to 0x8180. Fixes: 9d6105e19f61 ("mfd: rk808: Fix up the chip id get failed") Cc: stable@vger.kernel.org Cc: Elaine Zhang <zhangqing@rock-chips.com> Cc: Joseph Chen <chenjh@rock-chips.com> Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-07-15Merge tag 'mfd-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfdLinus Torvalds1-0/+177
Pull MFD updates from Lee Jones: "Core Frameworks: - Set 'struct device' fwnode when registering a new device New Drivers: - Add support for ROHM BD70528 PMIC New Device Support: - Add support for LP87561 4-Phase Regulator to TI LP87565 PMIC - Add support for RK809 and RK817 to Rockchip RK808 - Add support for Lid Angle to ChromeOS core - Add support for CS47L15 CODEC to Madera core - Add support for CS47L92 CODEC to Madera core - Add support for ChromeOS (legacy) Accelerometers in ChromeOS core - Add support for Add Intel Elkhart Lake PCH to Intel LPSS New Functionality: - Provide regulator supply information when registering; madera-core - Additional Device Tree support; lp87565, madera, cros-ec, rohm,bd71837-pmic - Allow over-riding power button press via Device Tree; rohm-bd718x7 - Differentiate between running processors; cros_ec_dev Fix-ups: - Big header file update; cros_ec_commands.h - Split header per-subsystem; rohm-bd718x7 - Remove superfluous code; menelaus, cs5535-mfd, cs47lXX-tables - Trivial; sorting, coding style; intel-lpss-pci - Only remove Power Off functionality if set locally; rk808 - Make use for Power Off Prepare(); rk808 - Fix spelling mistake in header guards; stmfx - Properly free IDA resources - SPDX fixups; cs47lXX-tables, madera - Error path fixups; hi655x-pmic Bug Fixes: - Add missing break in case() statement - Repair undefined behaviour when not initialising variables; arizona-core, madera-core - Fix reference to Device Tree documentation; madera" * tag 'mfd-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits) mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk mfd: madera: Fixup SPDX headers mfd: madera: Remove some unused registers and fix some defaults mfd: intel-lpss: Release IDA resources mfd: intel-lpss: Add Intel Elkhart Lake PCH PCI IDs mfd: cs5535-mfd: Remove ifdef OLPC noise mfd: stmfx: Fix macro definition spelling dt-bindings: mfd: Add link to ROHM BD71847 Datasheet MAINAINERS: Swap words in INTEL PMIC MULTIFUNCTION DEVICE DRIVERS mfd: cros_ec_dev: Register cros_ec_accel_legacy driver as a subdevice mfd: rk808: Prepare rk805 for poweroff mfd: rk808: Check pm_power_off pointer mfd: cros_ec: differentiate SCP from EC by feature bit dt-bindings: Add binding for cros-ec-rpmsg mfd: madera: Add Madera core support for CS47L92 mfd: madera: Add Madera core support for CS47L15 mfd: madera: Update DT bindings to add additional CODECs mfd: madera: Add supply mapping for MICVDD mfd: madera: Fix potential uninitialised use of variable mfd: madera: Fix bad reference to pinctrl.txt file ...
2019-07-02mfd: rk808: Prepare rk805 for poweroffStefan Mavrodiev1-0/+1
RK805 has SLEEP signal, which can put the device into SLEEP or OFF mode. The default is SLEEP mode. However, when the kernel performs power-off (actually the ATF) the device will not go fully off and this will result in higher power consumption and inability to wake the device with RTC alarm. The solution is to enable pm_power_off_prepare function, which will configure SLEEP pin for OFF function. Signed-off-by: Stefan Mavrodiev <stefan@olimex.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-07-02mfd: rk808: Check pm_power_off pointerStefan Mavrodiev1-0/+1
The function pointer pm_power_off may point to function from other module (PSCI for example). If rk808 is removed, pm_power_off is overwritten to NULL and the system cannot be powered off. This patch checks if pm_power_off points to a module function. Signed-off-by: Stefan Mavrodiev <stefan@olimex.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-06-27regulator: rk808: Add RK809 and RK817 support.Heiko Stuebner1-0/+3
Add support for the rk809 and rk817 regulator driver. Their specifications are as follows: 1. The RK809 and RK809 consist of 5 DCDCs, 9 LDOs and have the same registers for these components except dcdc5. 2. The dcdc5 is a boost dcdc for RK817 and is a buck for RK809. 3. The RK817 has one switch but The Rk809 has two. The output voltages are configurable and are meant to supply power to the main processor and other components. Signed-off-by: Tony Xie <tony.xie@rock-chips.com> Acked-by: Mark Brown <broonie@kernel.org> [rebased on top of 5.2-rc1] Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-06-27mfd: rk808: Add RK817 and RK809 supportTony Xie1-0/+172
The RK809 and RK817 are a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators - RTC - Clocking Both RK809 and RK817 chips are using a similar register map, so we can reuse the RTC and Clocking functionality. Most of regulators have a some implementation also. Signed-off-by: Tony Xie <tony.xie@rock-chips.com> Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288Thomas Gleixner1-9/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 263 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141901.208660670@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-21mfd: rk808: Add rk805 regs addr and IDElaine Zhang1-0/+120
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-08-21mfd: rk808: Fix up the chip id get failedElaine Zhang1-0/+1
the rk8xx chip id is: ((MSB << 8) | LSB) & 0xfff0 Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-11-29mfd: rk808: RK818 uses DEV_OFF to power off suppliesJianhong Chen1-0/+1
DEV_OFF and DEV_OFF_RST functions for RK808 are designed error that only DEV_OFF_RST can power off supplies. RK818 has been fixed this issue, so that DEV_OFF is used to power off supplies. Signed-off-by: Jianhong Chen <chenjh@rock-chips.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04mfd: rk808: Fix RK818_IRQ_DISCHG_ILIM initializerArnd Bergmann1-1/+1
When building with -Woverride-init, we get a warning about an incorrect initializer: drivers/mfd/rk808.c:244:8: error: initialized field overwritten [-Werror=override-init] [RK818_IRQ_DISCHG_ILIM] = { This is clearly a mistake, as both RK818_IRQ_DISCHG_ILIM and RK818_IRQ_USB_OV are defined as '7', but they refer to different register bits. Changing RK818_IRQ_DISCHG_ILIM to 15 is consistent with how all other 14 interrupts are handled here, so I'm assuming this is what it should have been. Fixes: 2eedcbfc0612 ("mfd: rk808: Add RK818 support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-08-31mfd: rk808: Add RK818 supportWadim Egorov1-9/+145
The RK818 chip is a Power Management IC (PMIC) for multimedia and handheld devices. It contains the following components: - Regulators - RTC - Clocking - Battery support Both RK808 and RK818 chips are using a similar register map, so we can reuse the RTC and Clocking functionality. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Tested-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-03-12mfd: rk808: Disable the under voltage detectChris Zhong1-0/+3
Rk808 has a under voltage detect function, when the voltage of buck is under 85% the target voltage, the buck output will reset. But if the power load is too heavy, this function maybe err, when current over 4.2A, although the voltage is normal, but RK808 mistakenly think it is under 85%, and reset the buck. So let's disable this function. Signed-off-by: Chris Zhong <zyw@rock-chips.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-09-26mfd: RK808: Add new mfd driver for RK808Chris Zhong1-0/+196
The RK808 chip is a power management IC for multimedia and handheld devices. It contains the following components: - Regulators - RTC - Clkout The RK808 core driver is registered as a platform driver and provides communication through I2C with the host device for the different components. Signed-off-by: Chris Zhong <zyw@rock-chips.com> Signed-off-by: Zhang Qing <zhangqing@rock-chips.com> Tested-by: Heiko <heiko@sntech.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>