History log of /linux-master/include/linux/mfd/db8500-prcmu.h
Revision Date Author Comments
# 1c7c1488 10-Feb-2021 Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

mfd: dbx500-prcmu: Use true and false for bool variable

Fix the following coccicheck warning:

./include/linux/mfd/db8500-prcmu.h:723:8-9: WARNING: return of 0/1 in
function 'db8500_prcmu_is_ac_wake_requested' with return type bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 2cce09eb 28-Dec-2019 Linus Walleij <linus.walleij@linaro.org>

mfd: dbx500-prcmu: Drop DSI pll clock functions

The DSI PLLs are handled by the generic clock framework
since ages, this code is completely unused and misleading.
Delete it.

Cc: Stephan Gerhold <stephan@gerhold.net>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# f4181092 28-Dec-2019 Linus Walleij <linus.walleij@linaro.org>

mfd: dbx500-prcmu: Drop set_display_clocks()

The display clocks are handled by the generic clock framework
since ages, this code is completely unused and misleading.
Delete it.

Cc: Stephan Gerhold <stephan@gerhold.net>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 22fb3ad0 26-Oct-2019 Linus Walleij <linus.walleij@linaro.org>

mfd: db8500-prcmu: Support U8420-sysclk firmware

There is a distinct version of the Ux500 U8420 variant
with "sysclk", as can be seen from the vendor code that
didn't make it upstream, this firmware lacks the
ULPPLL (ultra-low power phase locked loop) which in
effect means that the timer clock is instead wired to
the 32768 Hz always-on clock.

This has some repercussions when enabling the timer
clock as the code as it stands will disable the timer
clock on these platforms (lacking the so-called
"doze mode") and obtaining the wrong rate of the timer
clock.

The timer frequency is of course needed very early in
the boot, and as a consequence, we need to shuffle
around the early PRCMU init code: whereas in the past
we did not need to look up the PRCMU firmware version
in the early init, but now we need to know the version
before the core system timers are registered so we
restructure the platform callbacks to the PRCMU so as
not to take any arguments and instead look up the
resources it needs directly from the device tree
when initializing.

As we do not yet support any platforms using this
firmware it is not a regression, but as PostmarketOS
is starting to support products with this firmware we
need to fix this up.

The low rate of 32kHz also makes the MTU timer unsuitable
as delay timer but this needs to be fixed in a separate
patch.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 0376148f 28-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 197

Based on 1 normalized pattern(s):

license terms gnu general public license v2

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 37 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170027.724130665@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 45ff2b68 14-Sep-2016 Lee Jones <lee.jones@linaro.org>

mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls

There are no call sites for these functions. Strip them out.

Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 1e22a8c6 19-Mar-2013 Linus Walleij <linus.walleij@linaro.org>

ARM: ux500: move PM-related PRCMU functions to machine

We are trying to decompose and decentralize the code in
the DB8500 PRCMU out into subdrivers. The code moved in
this patch concerns a group of functions used for
decoupling and recoupling the IRQs from the GIC. During
sleep and idle the Ux500 system will transfer all IRQ
handling to the PRCMU using these functions.

Basically we are left with the two alternatives of code
placement as:

- arch/arm/mach-ux500/pm.c - this because the code is
closely related to the GIC, and takes ownership of
some of the registers from the PRCMU related to this
PM functionality.

- drivers/mfd/db8500-prcmu-pm.c - because the code is
affecting stuff in the PRCMU register range. But then
this code needs to remap and handle GIC registers.

This patch implementation is taking the first approach.

Currently the cpuidle driver is the only piece of code
using this set of functions, but it will later also be
used by the suspend/resume code which is currently under
review.

The header file is moved to:
<linux/platform_data/arm-ux500-pm.h>
The function prototypes need to be placed in a globally
visible header since the CPUidle code is planned to move
out to drivers/cpuidle.

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 9a47a8dc 20-Mar-2013 Linus Walleij <linus.walleij@linaro.org>

mfd: prcmu: pass a base and size with the early initcall

This patch will make an early remapping of the PRCMU, to be
used when setting up the clocks, that will call down into parts
of the PRCMU driver before it is probed.

Going forward this will be removed like this:

- The mailbox subsystem need to be merged.
http://marc.info/?l=linux-kernel&m=136314559201983&w=2

- At this point the PRCMU clock code can be moved over to the
ux500 clock driver in drivers/clk/ux500/* and maintained
there in a decentralized manner.

- This early initcall and PRCMU base parameters become part of
the ux500_clk_init() call instead.

Cc: Suman Anna <s-anna@ti.com>
Cc: Loic Pallardy <loic.pallardy@st.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 05ec260e 07-Feb-2013 Linus Walleij <linus.walleij@linaro.org>

mfd: db8500-prcmu: update resource passing

When trying to get rid of the cross-includes of <mach/id.h>
from different drivers, so we can localize ASIC/CPU detection
to the mach-ux500 folder, we run into the way the PRCMU
handles base addresses and firmware detection.

This patch updates the firmware version detection to pass
the required information as platform data instead of
relying on cpu_is_* macros.

Now the PRCMU base address, the secondary TCDM area, the
TCPM area and the IRQ are passed as resources instead of
being grabbed from <mach/*> files. Incidentally this also
removes part of the reliance on <mach/irqs.h>.

Further it updates the firmware version detection, since the
location of the firmware ID bytes in the designated memory
are is now passed from the platform data instead. There is
no reason not to include the nice split-off of a struct to
hold the firmware information and a separate function to
populate it.

The patch actually rids the need to use the external
db8500_prcmu_early_init call at all, but I'm keepin back
that removal as I don't want the patch to be too big.

Cc: arm@kernel.org
Cc: Michel Jaoen <michel.jaouen@stericsson.com>
Cc: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Loic Pallardy <loic.pallardy@stericsson.com>
Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 222e8500 07-Jan-2013 Linus Walleij <linus.walleij@linaro.org>

mfd: prcmu: delete pin control helpers

These static inlines are duplicating the task now done by the
Nomadik pinctrl drivers, so delete them from the prcmu static
inlines, also delete the register definitions as these should
only be known by the pinctrl driver.

Cc: Loic Pallardy <loic.pallardy@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Michel Jaouen <michel.jaouen@st.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 686f871b 24-Sep-2012 Ulf Hansson <ulf.hansson@linaro.org>

mfd: dbx500: Export prmcu_request_ape_opp_100_voltage

This function needs to be exported to let clients be able to
request the ape opp 100 voltage.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>


# 5261e101 21-May-2012 Arun Murthy <arun.murthy@stericsson.com>

mfd: Update db8500-prmcu hostport_access enable

Force the Modem wakeup by asserting the CaWakeReq signal before the
hostaccess_req/ack ping-pong sequence. The Awake_req signal is de-asserted
asserted at the same time than the hostaccess_req. Return error on failure
case so that the client using this can take appropiate steps.

Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 1927ddf6 15-Mar-2012 Bengt Jonsson <bengt.g.jonsson@stericsson.com>

mfd: Add 8420 variant to db8500-prcmu

Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 5f96a1a6 15-Mar-2012 Bengt Jonsson <bengt.g.jonsson@stericsson.com>

mfd: Add 8520 PRCMU variant to db8500-prcmu

Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Mattias Nilssson <mattias.i.nilsson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# d902d0d1 15-Mar-2012 Mattias Nilsson <mattias.i.nilsson@stericsson.com>

mfd: Remove obsolete hwacc implementation for db8500-prmcu

This patch removes the obsolete hwacc implementation in the
DB8500 PRCMU driver.

Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 34fe6f10 28-Feb-2012 Daniel Lezcano <daniel.lezcano@linaro.org>

mfd : Check if the other db8500 core is in WFI

This patch allows to check if the other core is in WFI
mode. It is the last check the idle routine has to do before
entering into the retention state.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 9ab492e1 28-Feb-2012 Daniel Lezcano <daniel.lezcano@linaro.org>

mfd : Check if the db8500 prcmu has pending irq

This patch allows to check if there are some pending irqs
on the prcmu.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 9f60d33e 28-Feb-2012 Daniel Lezcano <daniel.lezcano@linaro.org>

mfd : Copy the db8500 gic setting to the prcmu

In the case we go to the retention mode, we decoupled the gic
in order to have the A9 core to reach a stable WFI state.
But we want the prcmu to wake up the A9 when the gic has a pending
irq which is done by copying the gic settings to the to the prcmu.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# cc9a0f68 28-Feb-2012 Daniel Lezcano <daniel.lezcano@linaro.org>

mfd : Check if there are pending irq on the db8500 gic

This patch introduces a routine to check if there are some
irqs pending on the gic. Usually this check is not relevant because
it appears racy (an irq can arrive right after this check), but in
the ux500 it makes sense because the prcmu decouples the gic from
the A9 cores.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 485540dc 19-Feb-2012 Daniel Lezcano <daniel.lezcano@linaro.org>

mfd: Decouple/recouple gic from the ux500 PRCMU

This patch allows to decouple and recouple the gic from the PRCMU.
This is needed to put the A9 core in retention mode with the cpuidle
driver.

It is based on top of the "DB8500 PRCMU update" patchset.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# b4a6dbd5 13-Jan-2012 Mattias Nilsson <mattias.i.nilsson@stericsson.com>

mfd: Add initial db8500 prcmu register access api

This patch adds an initial PRCMU register access API, which
for now should only be used for a very limited set of registers.

The idea about this API is that we split the PRCMU driver in
one part that deals with interaction with the PRCMU firmware
and one part that simply provide write accessors in the PRCMU
register range. The latter are just a collection of registers
exposed in the PRCMU register range for various purposes and
not related to the PRCMU firmware.

Currently we support some limited GPIO, SPI and UART settings
through this API.

Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 4d64d2e3 13-Jan-2012 Mattias Nilsson <mattias.i.nilsson@stericsson.com>

mfd: db8500 OPP and sleep handling update

This updates the operating point handling code by:

- Supporting the DDR OPP retention state.
- Supporting another low operating point named
APE_50_PARTLY_25_OPP
- Adding an interface to figure out if the sleep state change
was properly achieved.

Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 0508901c 13-Jan-2012 Mattias Nilsson <mattias.i.nilsson@stericsson.com>

mfd: Update abstract dbx500 interface

This prefixes a number of accessor functions with db8500_* since
they are DB8500-specific and we need to move to this naming
scheme.

We also replace numerous instances of machine_is() with cpu_is()
which covers the right type of ASICs rather than entire machines
i.e. boards.

Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# b58d12fe 13-Jan-2012 Mattias Nilsson <mattias.i.nilsson@stericsson.com>

mfd: Function for obtaining the db8500 prcmu firmware version

This patch exports a function that can be used to tell which
version of the DB8500 PRCMU firmware is available, and revamps the
firmware detection code a bit.

Reviewed-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# c72fe851 13-Jan-2012 Daniel Willerud <daniel.willerud@stericsson.com>

mfd: Remove db8500-prcmu U8400 legacy

This removes the U8400 legacy from PRCMU and cpufreq drivers.
This platform has no current in-kernel users.

Signed-off-by: Daniel Willerud <daniel.willerud@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 73180f85 12-Aug-2011 Mattias Nilsson <mattias.i.nilsson@stericsson.com>

mfd: Move to the new db500 PRCMU API

Now that we have a shared API between the DB8500 and DB5500
PRCMU's, switch to using this neutral API instead. We delete the
parts of db8500-prcmu.h that is now PRCMU-neutral, and calls will
be diverted to respective driver. Common registers are in
dbx500-prcmu-regs.h and common accessors and defines in
<linux/mfd/dbx500-prcmu.h> This way we get a a lot more
abstraction and code reuse.

Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 3df57bcf 15-May-2011 Mattias Nilsson <mattias.i.nilsson@stericsson.com>

mfd: update DB8500 PRCMU driver

This updates the DB8500 PRCMU driver to the latest version
available internally. Nominally we would update the dependent
CPUfreq driver at the same time but since that is being moved
around in this patch set we postpone that by simply deactivating
it for the time being.

This is a snapshot of the current PRCMU firmware API as it looks
right now. The PRCMU firmware is still subject to change. This
also updates the CPUfreq driver to a newer version that will
utilize the new API.

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Signed-off-by: Martin Persson <martin.persson@stericsson.com>
Signed-off-by: Per Fransson <per.xx.fransson@stericsson.com>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Sebastien Rault <sebastien.rault@stericsson.com>
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 650c2a21 15-May-2011 Linus Walleij <linus.walleij@linaro.org>

mach-ux500: move the DB8500 PRCMU driver to MFD

We have decided that this function arbiter fits better in the MFD
subsystem. Since we need to concatenate the split header files we move
it basically like this:

mv mach-ux500/prcmu-db8500.c drivers/mfd/db8500-prcmu.c
mv mach-ux500/include/mach/prcmu-defs.h include/linux/mfd/db8500-prcmu.h
mv mach-ux500/include/mach/prcmu-regs.h drivers/mfd/db8500-prcmu-regs.h
mach-ux500/include/mach/prcmu.h >> include/linux/mfd/db8500-prcmu.h
rm arch/arm/mach-ux500/include/mach/prcmu.h

Then we update different #include statements and Makefile orders etc
to make the PRCMU driver compile, link and boot in the new place
without really changing any code.

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>