Commit graph

721780 commits

Author SHA1 Message Date
Tony Lindgren e14d7e5320 ARM: dts: Update ti-sysc data for existing users
Let's update the existing users with features and clock data as
specified in the binding. This is currently the smartreflex for most
part, and also few omap4 modules with no child device driver like
mcasp, abe iss and gfx.

Note that we had few mistakes that did not get noticed as we're still
probing the SmartReflex driver with legacy platform data and using
"ti,hwmods" legacy property for ti-sysc driver.

So let's fix the omap4 and dra7 smartreflex registers as there is no
no revision register.

And on omap4, the mcasp module has a revision register according to
the TRM.

And for omap34xx we need a different configuration compared to 36xx.
And the smartreflex on 3517 we've always kept disabled so let's
remove any references to it.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-01-12 15:16:57 -08:00
Tony Lindgren 7d9bfdac31 ARM: dts: Fix smartreflex compatible for omap3 shared mpu-iva instance
The smartreflex instance for mpu and iva is shared. Let's fix this as I've
already gotten confused myself few times wondering where the mpu instance
is. Note that we are still probing the driver using platform data so this
change is safe to do.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-01-12 15:15:56 -08:00
Tony Lindgren bcc8d312de Merge commit '20a2742e5784295b9197250b50c40f6d38a55880' into omap-for-v4.16/dt-clk 2018-01-12 15:15:50 -08:00
Tony Lindgren 20a2742e57 dt-bindings: ti-sysc: Update binding for timers and capabilities
The ti-sysc binding does not yet describe the capabilities of the
interconnect target module. So to make the ti-sysc binding usable
for configuring the interconnect target module, we need to add few
more properties:

1. To detect between omap2 and omap4 timers, let's add compatibles
   for them for "ti,sysc-omap2-timer" and,sysc-omap4-timer". This
   makes it easier to pick up the already initialized system timers
   later on

2. Let's add "ti,sysc-mask" for a mask of features supported by the
   interconnect target module. This describes what we have available
   in the various SYSCONFIG registers

3. Let's add "ti,sysc-midle" and "ti,sysc-sidle" lists for the master
   and slave idle modes supported by the interconnect target module.
   These describe the values available for MIDLE and SIDLE bits in
   the SYSCONFIG registers

4. Some interconnect target modules need a short delay after reset
   before they can be accessed, let's use "ti,sysc-delay-us" for
   that

5. Let's add "ti,syss-mask" bit to describe the optional SYSSTATUS
   register bits for reset done bits

6. Let's support the two existing custom quirk properties already
   listed in Documentation/devicetree/bindings/arm/omap/omap.txt for
   "ti,no-reset-on-init" and "ti,no-idle-on-init"

7. And finally, let's add a header for the binding for the dts
   files and the driver to use

Cc: Benoît Cousson <bcousson@baylibre.com>
Cc: Dave Gerlach <d-gerlach@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Nishanth Menon <nm@ti.com>
Cc: Matthijs van Duin <matthijsvanduin@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Suman Anna <s-anna@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-15 09:39:11 -08:00
Tero Kristo 80a06c0d83 ARM: dts: dm816x: add clkctrl nodes
Add clkctrl nodes for DM816x SoC. These are going to be acting as
replacement for part of the existing clock data and the existing
clkctrl hooks under hwmod data.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:37 -08:00
Tero Kristo bb30465b59 ARM: dts: dm814x: add clkctrl nodes
Add clkctrl nodes for DM814x SoC. These are going to be acting as
replacement for part of the existing clock data and the existing
clkctrl hooks under hwmod data.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:37 -08:00
Tero Kristo 664ae1ab25 ARM: dts: am43xx: add clkctrl nodes
Add clkctrl nodes for AM43xx SoC. These are going to be acting as
replacement for part of the existing clock data and the existing
clkctrl hooks under hwmod data.

This patch also removes any obsolete clock nodes, and reroutes all users
for these to use the new clkctrl clocks instead.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:37 -08:00
Tero Kristo 0537634f7e ARM: dts: am33xx: add clkctrl nodes
Add clkctrl nodes for AM33xx SoC. These are going to be acting as
replacement for part of the existing clock data and the existing
clkctrl hooks under hwmod data.

This patch also removes any obsolete clock nodes, and reroutes all users
for these to use the new clkctrl clocks instead.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:36 -08:00
Tero Kristo 1839533f69 ARM: dts: dra7: add clkctrl nodes
Add clkctrl nodes for DRA7 SoC. These are going to be acting as
replacement for part of the existing clock data and the existing
clkctrl hooks under hwmod data.

This patch also removes any obsolete clock nodes, and reroutes all users
for these to use the new clkctrl clocks instead.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:36 -08:00
Tero Kristo 460c49610d ARM: dts: omap5: add clkctrl nodes
Add clkctrl nodes for OMAP5 SoC. These are going to be acting as
replacement for part of the existing clock data and the existing
clkctrl hooks under hwmod data.

This patch also removes any obsolete clock nodes, and reroutes all users
for these to use the new clkctrl clocks instead.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:35 -08:00
Tero Kristo a5c82a09d8 ARM: dts: omap4: add clkctrl nodes
Add clkctrl nodes for OMAP4 SoC. These are going to be acting as
replacement for part of the existing clock data and the existing
clkctrl hooks under hwmod data.

This patch also removes any obsolete clock nodes, and reroutes all users
for these to use the new clkctrl clocks instead.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:35 -08:00
Tero Kristo 519262cf56 ARM: dts: dm816x: add bus functionality to base PRCM node
Add simple-bus compatibility and ranges properties to prcm node. This is
done in preparation of adding the support for clkctrl nodes.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:34 -08:00
Tero Kristo b535f4e510 ARM: dts: am43xx: add bus functionality to base PRCM node
Add simple-bus compatibility and ranges properties to prcm node. This is
done in preparation of adding the support for clkctrl nodes.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:34 -08:00
Tero Kristo 0768c9df8e ARM: dts: am33xx: add bus functionality to base PRCM node
Add simple-bus compatibility and ranges properties to prcm node. This is
done in preparation of adding the support for clkctrl nodes.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:34 -08:00
Tero Kristo aa29e3a492 ARM: dts: dra7: add bus functionality to base PRCM nodes
Add simple-bus compatibility and ranges properties to cm1, cm2 and prm
nodes. This is done in preparation of adding the support for clkctrl
nodes.

SPLIT: timer1 fck setup

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:33 -08:00
Tero Kristo d007d6557f ARM: dts: omap4: add bus functionality to base PRCM nodes
Add simple-bus compatibility and ranges properties to cm1, cm2 and prm
nodes. This is done in preparation of adding the support for clkctrl
nodes.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:33 -08:00
Tero Kristo 7fcf1c9b24 ARM: dts: omap5: add bus functionality to base PRCM nodes
Add simple-bus compatibility and ranges properties to cm_core_aon, cm_core
and prm nodes. This is done in preparation of adding the support for
clkctrl nodes.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:32 -08:00
Tero Kristo ed839c3664 ARM: dts: dm816x: add fck under timers1/2
Add the functional clock definition for timers1/2. This is needed so that
the clock rate claculations continue to function properly once dm816x
transitions away from hwmod data and towards the clkctrl clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:31 -08:00
Tero Kristo 5277c033af ARM: dts: dm814x: add fck under timers1/2
Add the functional clock definition for timers1/2. This is needed so that
the clock rate claculations continue to function properly once dm814x
transitions away from hwmod data and towards the clkctrl clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:29 -08:00
Tero Kristo 139e9a6376 ARM: dts: dra7: add fck under timer1
Add the functional clock definition for timer1. This is needed so that
the clock rate calculations continue to function properly once dra7
transitions away from hwmod data and towards the clkctrl clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:28 -08:00
Tero Kristo ab44c5b481 ARM: dts: am43xx: add fck under timers1/2
Add the functional clock definition for timers1/2. This is needed so that
the clock rate calculations continue to function properly once am33xx
transitions away from hwmod data and towards the clkctrl clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:28 -08:00
Tero Kristo 521f9e5e3f ARM: dts: am33xx: add fck under timers1/2
Add the functional clock definition for timers1/2. This is needed so that
the clock rate calculations continue to function properly once am33xx
transitions away from hwmod data and towards the clkctrl clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:27 -08:00
Tero Kristo dc06f7ceb7 ARM: dts: omap4: add fck under timer1
Add the functional clock definition for timer1. This is needed so that
the clock rate calculations continue to function properly once omap4
transitions away from hwmod data and towards the clkctrl clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:27 -08:00
Tero Kristo af8800c953 ARM: dts: omap5: add fck under timer1
Add the functional clock definition for timer1. This is needed so that
the clock rate calculations continue to function properly once omap5
transitions away from hwmod data and towards the clkctrl clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 08:28:26 -08:00
Tony Lindgren 998601de3c Merge commit 'fe7020e64f04' into omap-for-v4.16/dt-clk 2017-12-11 08:26:36 -08:00
Tony Lindgren fdf3632938 Merge branch '4.15-rc1-clkctrl-mach-omap2' of https://github.com/t-kristo/linux-pm into omap-for-v4.16/soc 2017-12-11 07:46:40 -08:00
Bhumika Goyal 60af58cde4 ARM: OMAP2+: CM: make cm_ll_data structures as const
Make these const as they are only getting passed to the functions
cm_register and cm_unregister having the arguments as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 07:40:38 -08:00
Bhumika Goyal a529f8de26 ARM: OMAP2+: CM: make some pointers and function arguments as const
Make the pointer cm_ll_data of type cm_ll_data as const as it does not
modify the fields of the structure it points too.
After this change, make the argument of cm_register function as const as
it is used to initialise cm_ll_data or used inside an if condition.
Make the pointer argument of cm_unregister function as const as it is only
used inside an if condition.
Add const to the function prototypes too.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 07:40:34 -08:00
Tero Kristo 71d50393ab ARM: DM816x: hwmod_data: fix clockdomain name for sata hwmod
"default_sata_clkdm" does not exist, instead replace this with the
correct clockdomain name which is just "default_clkdm".

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 2b96be3df5 ARM: OMAP2+: hwmod: calculate physical register address on am33xx
Add support for the address translation logic for am33xx. Needed for
mapping hwmods towards their corresponding clkctrl providers and clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 85ab016cc3 ARM: AM33xx: CM: add support for getting physical address for a register
Needed for mapping the hwmods towards their corresponding clkctrl
providers and clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 17d56e80f1 ARM: OMAP2+: clockdomain: remove the obsolete clkdm_xlate_address API
This is no longer used for anything so it can be dropped.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 6e83ecaa45 ARM: OMAP2+: hwmod: fix clkctrl address translation logic
There are cases where clkctrl clock offsets do not match the corresponding
clockdomain, and this case the existing mapping functionality will fail.
Fix this by adding the whole address range for a clkctrl provider and
matching the actual clkctrl registers against these ranges.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 1055d92ccf ARM: OMAP4: CMINST: add support for translating clkctrl addresses
Needed to map clkctrl clocks against hwmods. This patch also removes
the obsolete clkdm_xlate_address function which is no longer needed
for anything.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:20 +02:00
Tero Kristo 5fa4a3cc58 ARM: OMAP2+: CM: add support for getting phys address for a clkctrl register
Add a new CM API for fetching the physical address of a hwmod clkctrl
register. This is needed to map omap hwmods against clkctrl clocks, the
existing support for clkdm address translation was not sufficient to
handle the mutant cases where the clockdomain offset is completely
off from the clkctrl ones.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:20 +02:00
Tero Kristo fe7020e64f clk: ti: omap4: clkctrl data fixes for opt-clocks
Re-route all opt-clocks to use the new clkctrl clocks also, instead of
depending on the old dt clocks. Also, add aliases for certain clkctrl
clocks that hwmod core depends upon. The alias list can be stripped
down once hwmod database no longer needs these.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:18:08 +02:00
Tero Kristo 50ef50897e clk: ti: dm816: add clkctrl clock data
Add data for dm816 clkctrl clocks, and register it within the clkctrl
driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:18:06 +02:00
Tero Kristo 5afc8dde9a dt-bindings: clk: add dm816 clkctrl definitions
Contains offsets for all dm816 clkctrl main and optional clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:18:04 +02:00
Tero Kristo 26ca2e9738 clk: ti: dm814: add clkctrl clock data
Add data for dm814 clkctrl clocks, and register it within the clkctrl
driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:18:01 +02:00
Tero Kristo fe4ec6513e dt-bindings: clk: add dm814 clkctrl definitions
Contains offsets for all dm814 clkctrl main and optional clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:57 +02:00
Tero Kristo a3da10b709 clk: ti: am43xx: add clkctrl clock data
Add data for am43xx clkctrl clocks, and register it within the clkctrl
driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
2017-12-01 15:17:39 +02:00
Tero Kristo 9bc01114b1 dt-bindings: clk: add am43xx clkctrl definitions
Contains offsets for all am43xx clkctrl main and optional clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:28 +02:00
Tero Kristo df54bfc550 clk: ti: am33xx: add clkctrl clock data
Add data for am33xx clkctrl clocks, and register it within the clkctrl
driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:25 +02:00
Tero Kristo 172c48c7d1 dt-bindings: clk: add am33xx clkctrl definitions
Contains offsets for all am33xx clkctrl main and optional clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:23 +02:00
Tero Kristo 24d504a38b clk: ti: dra7: add clkctrl clock data
Add data for dra7 clkctrl clocks, and register it within the clkctrl
driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:18 +02:00
Tero Kristo ae263d5276 dt-bindings: clk: add dra7 clkctrl definitions
Contains offsets for all dra7 clkctrl main and optional clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:18 +02:00
Tero Kristo 0ad902f62f clk: ti: omap5: add clkctrl clock data
Add data for omap5 clkctrl clocks, and register it within the clkctrl
driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:18 +02:00
Tero Kristo e11f1d6823 dt-bindings: clk: add omap5 clkctrl definitions
Contains offsets for all omap5 clkctrl main and optional clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:17 +02:00
Tero Kristo 0ed266d7ae clk: ti: omap3: cleanup unnecessary clock aliases
Most of the clock aliases are no longer needed, only leave the ones
required by OMAP timer code in place.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:17 +02:00
Tero Kristo 78aac80046 clk: ti: am43xx: cleanup unnecessary clock aliases
Most of the clock aliases are no longer needed, only leave the ones
required by OMAP timer code in place.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-01 15:17:17 +02:00