ti_config_fragments/connectivity: Enable blikenlights

No LED_GPIOS and no LED_TRIGGERS no pretty blinkenlighten LEDS!

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ti_config_fragments/connectivity: Add Palmas power button

Enable palmas power button to let the button work.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
i2c: omap: enhance pinctrl support

Update i2c-omap driver to set the state of the pins to:
- "sleep" on suspend
- "default" on resume

By optionally putting the pins into default/sleep state in the
suspend callback we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
   which may happen if the power domain drops the domain regulator.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
pwm: pwm-tiecap: update pinctrl support

Update pwm-tiecap driver to set the state of the pins to:
- "sleep" on suspend
- "default" on resume

By optionally putting the pins into sleep state in the suspend callback
we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
which may happen if the power domain drops the domain regulator.

Also, since commit ab78029 (drivers/pinctrl: grab default handles from
device core), we can rely on device core for setting the default pins.
So, don't use devm_pinctrl_get_select_default() in probe.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Input: matrix-keypad: Enhance pinctrl support

Update matrix-keypad driver to set the state of the pins to:
- "sleep" on suspend
- "default" on resume

By optionally putting the pins into sleep state in the suspend callback
we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
which may happen if the power domain drops the domain regulator.

When using any of the GPIOs in a matrix-keypad for wakeup the pins must
be set to the appropriate state to allow this dependent on the board.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mmc: omap_hsmmc: enhance pinctrl support

Update omap_hsmmc driver to set the state of the pins to:
- "default" on resume
- "sleep" on suspend

This should make it possible to optimize energy usage for the pins both
for the suspend/resume cycle, and for runtime cases in-between mmc
transfers.

By optionally putting the pins into sleep state in the suspend callback
we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
which may happen if the power domain drops the domain regulator.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: mach-omap2: gpmc: adopt pinctrl support

Update omap2 gpmc driver to set the state of the pins to:
- "sleep" on suspend
- "default" on resume

By optionally putting the pins into sleep state in the suspend callback
we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
which may happen if the power domain drops the domain regulator.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
leds: leds-gpio: Enhance pinctrl support

update leds-gpio driver to set the state of the pins to:

- "sleep" on suspend
- "default" on resume

By optionally putting the pins into sleep state in the suspend callback
we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
  which may happen if the power domain drops the domain regulator.

suspend()/resume() callbacks are added which simply puts the pins to
 sleep/default state.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
serial: omap-serial : Enhance pinctrl support

Update omap-serial driver to set the state of the pins to:
- "sleep" on suspend
- "default" on resume

By optionally putting the pins into sleep state in the suspend callback
we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
  which may happen if the power domain drops the domain regulator.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm: dts: am33xx: add sleep states for gpio-led pins

Add sleep states for leds devices to save power during suspend/resume.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm: dts: am335x-evm: add sleep states for gpio-matrix-keypad

"gpio-matrix-keypad" driver is updated to set the state of the pins to:
- "sleep" on suspend
- "default" on resume

Make use of the same by adding the pin sleep states to the related node.

Also, move the default pin state from generic pinctrl node to
gpio-matrix-keypad node.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: dts: am335x-evm: Remove matrix_keypad_default from pinmux default

We do not need the pinmux driver to configure the pins for the matrix
keypad for us, the driver can handle this itself.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm: dts: am33xx: add sleep states for pwm-tiecap pins

Add sleep states for ecap devices to save power during suspend/resume.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm: dts: am33xx: add pinctrl sleep states for nand

Add sleep states for nand pins to save power during suspend/resume.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm: dts: am335x-evm: add sleep states for i2c-1

Add sleep states for i2c-1 to save power during suspend/resume.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm: dts: am33xx: update pinmux configuration for mmc1

Update pinmux configuration for mmc1 device nodes (add leftover pins
(mmc_dat[0-3], cmd, clk, wp) & add sleep state).

Currently "mmc" module is working without complete pinmux set may be
because
- it is depending on bootloader settings
- it is working out in default mode.

However, it is recommended to keep Kernel independent of above settings

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm: dts: am335x-evm: Add pinmux configuration for uart1

Add sleep states for uart1 pins to save power during suspend/resume.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on

[ Upstream commit e120fb459693bbc1ac3eabdd65c3659d7cfbfd2a ]

After clarification from the hardware team it was found that
this 1.8V PHY supply can't be switched OFF when SoC is Active.

Since the PHY IPs don't contain isolation logic built in the design to
allow the power rail to be switched off, there is a very high risk
of IP reliability and additional leakage paths which can result in
additional power consumption.

The only scenario where this rail can be switched off is part of Power on
reset sequencing, but it needs to be kept always-on during operation.

This patch is required for proper functionality of USB, SATA
and PCIe on DRA7-evm.

CC: Rajendra Nayak <rnayak@ti.com>
CC: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drm/tilcdc: rewrite pixel clock calculation

Updating the tilcdc DRM driver code to calculate the LCD controller
pixel clock more accurately.  Based on a suggested implementation by Tomi
Valkeinen.

The current code does not work correctly and produces wrong results with many
requested clock rates. It also oddly uses two different clocks, a display pll
clock and a divider clock (child of display pll), instead of just using the
clock coming to the lcdc.

This patch removes the use of the display pll clock, and rewrites the
code to calculate the clock rates. The idea is simply to request a clock
rate of pixelclock*2, as the LCD controller has an internal divider
which we set to 2.

Signed-off-by: Darren Etheridge <detheridge@ti.com>
ti_config_fragments/power: Enable alternate CPUFreq governors as modules

Enable ondemand governor as the primary governor that folks are supposed
to work with. Other governors may be loaded as needed - but
recommendation strongly is to remain with ondemand governor.

Reported-by: Carlos Hernandez <ceh@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>