MFD: twl6040-codec: Add platform init/exit

Add init/exit to TWL6040 MFD platform data in order to provide
a mechanism to allow platform level initializations (e.g. pin
muxing).

Change-Id: Ifea3af2ba94196e4b7d1ccd14ebcc541443cfe73
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
OMAP4: PM: L3INIT allow only CSwR

L3INIT powerstate supports ON, INA, CSwR and OSwR. If OSwR
is enabled EHCI/remote wakeup feature is broken. Till EHCI
IO wakeup is in place allow only CSwR on L3INIT. Power impact
in idle path will be less than 1mA.

REVISIT: For setting OSwR on L3INIT with proper fix in EHCI for IO
wakeup.

Change-Id: I64ada3a307d6cd81483ce6bba684f166d76868b6
Signed-off-by: Girish S G <girishsg@ti.com>
MFD: TWL: 6030: Regulator: Add support for VCORE1 and VCORE2

VCORE1 and VCORE2 are added to platform data, so that it can be
modelled as an SMPS adjustable regulator and the state of it
can be controlled through drivers and board file.

Change-Id: I070f7196879c4e989e401044761b02c9d4a067f3
Signed-off-by: Ambresh K <ambresh@ti.com>
OMAP4: Enable main inst clock for save to ram.

In HS-devices we must ensure that l3_main_inst
clock is enabled for saveram operation

Change-Id: Id9a5ab013ed99499f0fde89d9251ae5a95a49b45
Signed-off-by: Axel Haslam <axelhaslam@ti.com>
Signed-off-by: Akash Choudhari <akashc@ti.com>
Signed-off-by: Chittim Madhusudan <c-madhu@ti.com>
MFD: twl6040-codec: Implement PDMCLK cold temp errata

No PDM clock output is generated when operating in cold temperatures.
The suggested workaround consists of resetting LPPLL and HPPLL after
Sleep/Deep-Sleep mode transitions, before entering in application
mode.

Change-Id: I30453def9de5636fb9b9201c945b1115d11ffe6e
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
[IVAHD] Disable HWSUP mode and save power

Enabling HWSUP mode is somehow reducing the performance
of SL2 memory leading to increase in power consumption.
This patch disables it and advertises only SWSUP mode
which seems to improve performance and reduce power
consumed in AV record use-case.

Change-Id: Ie7d06b2a7a8d251820afd63bbb093fa34203c3fa
Signed-off-by: Sundar Raman <sunds@ti.com>
OMAP GPIO: Fix to disable the I/O PAD wakeup capability for GPIO63

On Tablet2 platform, GPIO63 is used for HDMI HPD detection.
The I/O PAD wakeup is not required for this pin as it is not
intended to be wakeup capable.
By enabling it causes spurious wakeup events when system is in
offmode.

Change-Id: I8cbd4e81092d7e5bf149f364fb5874c2dba93a24
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
OMAP4: HSI: mux: use hwmod muxing framework

Use HWMOD dynamic muxing framework.
Only Port 1 is supported for now.

Note: In order to have omap_hsi device registration done after muxing
framework, delayed it to arch_initcall instead of postcore_initcall.

Change-Id: I6b9f9c6041f13ea35ccec41e7f82397eab7ce48e
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
OMAP4: HSI: mux: remove unused mux platform data

Since we now use HWMOD muxing feature, many platform data and functions
are no more needed :

* Switching from HSI wakeup to/from IO daisy chain wakeup and handling of wakeup
  enable bit is now handled directly by HWMOD, so wakeup_enable/disable function
  are removed
* Removed board dependend_suspend callback since all shall be done by
  runtime_pm callbacks. But board_suspend and board_resume specific callback are
  kept to handle board dependend specific actions.
* Also aligned to same parameters for board_resume and board_suspend.
* Removed some mux hack functions
* Removed mux reference in platform data

Change-Id: I89a1b545d6e722c0ab19612f9b1f6a0892a0b455
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>

Conflicts:
	arch/arm/mach-omap2/pm44xx.c
	drivers/omap_hsi/hsi_driver.c
OMAP4: HSI: Added API to allow HSI device registration

If HSI support is not needed, omap_hsi device shall not be registered
as it will force the muxing of usbb1_ulpitll_clk pad to hsi1_cawake, which is
not good.

omap_hsi device will now only be registered if explicitly requested using new
API omap_hsi_allow_registration().

Change-Id: I405a614f0421056e4c5a5fee8b98b1482b40b8da
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
OMAP4: opp: remove WARN when initializing OPP of unregistered devices

OPP for unregistered omap_device or hwmod can now be initialized without
producing a kernel warning.

Change-Id: I4934314c49a57a75a1f7b849aa06a403045088af
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
OMAP4: ID: Allow omap443x to enable high performance features dynamically

As the prod id offset is same for 443x and 446x, allow 443x to dynamically
enable high performance features based on si type.
Enable 1.2G/1.5G only if it's high performance device, else fall back to 1G.

Change-Id: I11e3eb7dad54169c9e7d4a88396492c3ec1a2010
Signed-off-by: Girish S G <girishsg@ti.com>
Acked-by: Nishanth M <nm@ti.com>
Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
OMAP4: Add 1.2G OPP for 443x OPP table

1.2G OPP can be dynamically enabled for 443x now based
on si type. Adding it in OPP table.

Change-Id: Id1e32a86b0afaa83c7863afdeaa902cd73a9a89c
Signed-off-by: Girish S G <girishsg@ti.com>
Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>