Merge tag 'renesas-soc2-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc2

Second round of Renesas ARM SoC updates for v3.10

Some Highlights:

* Add r8a7790 SoC
* Add r8a73a4 SoC
* Migrate r8a7740 SoC from INTC to GIC
* Add thermal driver support to r8a73a4 SoC
* Add irqpin DT nodes to sh73a0 SoC
* Add SCIF support to r8a7778 SoC

This pull request is based on a merge of:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-soc-for-v3.10
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-intc-external-irq2-for-v3.10

* tag 'renesas-soc2-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (88 commits)
  ARM: shmobile: r8a7790 SoC 64-bit DT support
  ARM: shmobile: r8a73a4 SoC 64-bit DT support
  ARM: shmobile: r8a7790 PFC support
  ARM: shmobile: r8a7790 IRQC support
  ARM: shmobile: r8a7790 SCIF support
  ARM: shmobile: Initial r8a7790 SoC support
  ARM: shmobile: r8a7779: move global functions to r8a7779.h
  ARM: shmobile: r8a7740: move global functions to r8a7740.h
  ARM: shmobile: sh73a0: move global functions to sh73a0.h
  ARM: shmobile: sh7372: move global functions to sh7372.h
  ARM: shmobile: r8a7779: remove DIV4 clocks and use fixed ratio clock
  ARM: shmobile: r8a7740: use fixed ratio clock
  ARM: shmobile: r8a7740: tidyup comment/implementation mismatch
  ARM: shmobile: sh73a0: use fixed ratio clock
  ARM: shmobile: sh7372: use fixed ratio clock
  ARM: shmobile: add struct clk_ratio and fixed ratio clock macro
  ARM: shmobile: sh7372: remove DIV4_ZT* clocks
  ARM: shmobile: sh73a0: remove DIV4_ZT* clocks
  ARM: shmobile: sh73a0: add a TWD clock
  ARM: shmobile: r8a7740: Migrate from INTC to GIC
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
Merge branch 'next/soc2' into for-next

* next/soc2: (269 commits)
  ARM: shmobile: r8a7790 SoC 64-bit DT support
  ARM: shmobile: r8a73a4 SoC 64-bit DT support
  ARM: shmobile: r8a7790 PFC support
  ARM: shmobile: r8a7790 IRQC support
  ARM: shmobile: r8a7790 SCIF support
  ARM: shmobile: Initial r8a7790 SoC support
  ARM: shmobile: r8a7779: move global functions to r8a7779.h
  ARM: shmobile: r8a7740: move global functions to r8a7740.h
  ARM: shmobile: sh73a0: move global functions to sh73a0.h
  ARM: shmobile: sh7372: move global functions to sh7372.h
  ARM: shmobile: r8a7779: remove DIV4 clocks and use fixed ratio clock
  ARM: shmobile: r8a7740: use fixed ratio clock
  ARM: shmobile: r8a7740: tidyup comment/implementation mismatch
  ARM: shmobile: sh73a0: use fixed ratio clock
  ARM: shmobile: sh7372: use fixed ratio clock
  ARM: shmobile: add struct clk_ratio and fixed ratio clock macro
  ARM: shmobile: sh7372: remove DIV4_ZT* clocks
  ARM: shmobile: sh73a0: remove DIV4_ZT* clocks
  ARM: shmobile: sh73a0: add a TWD clock
  ARM: shmobile: r8a7740: Migrate from INTC to GIC
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>

Conflicts:
	drivers/pinctrl/sh-pfc/pfc-r8a7740.c
Merge tag 'renesas-pinmux2-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc2

Second round of Renesas ARM and SH based SoC pinmux updates for v3.10

Highlights:

* Compilation fixes for sh7269 and for when CONFIG_BUG is not set
* sh-pfc Support for r8a73a4 SoC
* Move GPIOs handling from the PFC device to separate GPIO devices on the r8a7779 SoC

This pull request is based on a merge of:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-pinmux-for-v3.10
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-soc2-for-v3.10

* tag 'renesas-pinmux2-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (185 commits)
  sh-pfc: r8a73a4: Remove unused GPIO bias data
  ARM: shmobile: r8a73a4: Remove all GPIO enums
  sh-pfc: r8a73a4: Remove function GPIOs
  ARM: shmobile: r8a73a4: Remove IRQC function GPIOs
  ARM: shmobile: r8a73a4: Remove SCIF function GPIOs
  sh-pfc: r8a73a4: Remove IRQC function GPIOS
  sh-pfc: r8a73a4: Remove SCIF function GPIOS
  sh-pfc: r8a73a4: Add IRQC pin groups and functions
  sh-pfc: r8a73a4: Add SCIF pin groups and functions
  sh-pfc: r8a73a4: Add bias (pull-up/down) pinconf support
  sh-pfc: r8a73a4: GPIO IRQ support
  sh-pfc: r8a73a4: Support sparse GPIO numbers
  sh-pfc: Add r8a73a4 pinmux support
  sh-pfc: r8a7779: Split DU input and output pixel clocks
  sh-pfc: r8a7779: Remove GPIO data
  ARM: shmobile: r8a7779: Register GPIO devices
  sh-pfc: Configure pins as GPIOs at request time when handled externally
  sh-pfc: Skip gpiochip registration when no GPIO resource is found
  sh-pfc: Make GPIO support optional
  sh-pfc: Make function GPIOs support optional
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
Merge branch 'next/soc2' into for-next

* next/soc2: (28 commits)
  sh-pfc: r8a73a4: Remove unused GPIO bias data
  ARM: shmobile: r8a73a4: Remove all GPIO enums
  sh-pfc: r8a73a4: Remove function GPIOs
  ARM: shmobile: r8a73a4: Remove IRQC function GPIOs
  ARM: shmobile: r8a73a4: Remove SCIF function GPIOs
  sh-pfc: r8a73a4: Remove IRQC function GPIOS
  sh-pfc: r8a73a4: Remove SCIF function GPIOS
  sh-pfc: r8a73a4: Add IRQC pin groups and functions
  sh-pfc: r8a73a4: Add SCIF pin groups and functions
  sh-pfc: r8a73a4: Add bias (pull-up/down) pinconf support
  sh-pfc: r8a73a4: GPIO IRQ support
  sh-pfc: r8a73a4: Support sparse GPIO numbers
  sh-pfc: Add r8a73a4 pinmux support
  sh-pfc: r8a7779: Split DU input and output pixel clocks
  sh-pfc: r8a7779: Remove GPIO data
  ARM: shmobile: r8a7779: Register GPIO devices
  sh-pfc: Configure pins as GPIOs at request time when handled externally
  sh-pfc: Skip gpiochip registration when no GPIO resource is found
  sh-pfc: Make GPIO support optional
  sh-pfc: Make function GPIOs support optional
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>

Conflicts:
	drivers/pinctrl/sh-pfc/pfc-r8a7740.c
ARM: bcm2835: add Broadcom BCM2835 RNG to the device tree

This adds a device tree binding for random number generator present on
Broadcom BCM2835 SoC, used in Raspberry Pi and Roku 2 devices.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
ARM: bcm2835: defconfig updates

Enable the following new features:

* SPI controller driver.
* RNG driver.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Merge tag 'renesas-boards3-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/boards2

Third round of  Renesas ARM SoC board updates for v3.10

Highlights:

* Add Lager board support
* Add ape6evm board support
* Add Bock-W board support
* Mackerel MMCIF/SDHI clean ups
* Add ethernet support to kzm9g-reference

This pull request is based on a merge of:

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-pinmux2-for-v3.10
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-boards2-for-v3.10

The merge with renesas-pinmux2-for-v3.10 was made to provide
run-time dependencies for the following changes:

ARM: shmobile: APE6EVM LAN9220 support
ARM: shmobile: APE6EVM PFC support

* tag 'renesas-boards3-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (307 commits)
  ARM: shmobile: mackerel: clean up MMCIF vs. SDHI1 selection
  ARM: shmobile: mackerel: add interrupt names for SDHI0
  ARM: shmobile: mackerel: switch SDHI and MMCIF interfaces to slot-gpio
  ARM: shmobile: mackerel: remove OCR masks, where regulators are used
  ARM: shmobile: mackerel: SDHI resources do not have to be numbered
  ARM: shmobile: Initial r8a7790 Lager board support
  ARM: shmobile: APE6EVM LAN9220 support
  ARM: shmobile: APE6EVM PFC support
  ARM: shmobile: APE6EVM base support
  ARM: shmobile: kzm9g-reference: add ethernet support
  ARM: shmobile: add R-Car M1A Bock-W platform support
  sh-pfc: r8a73a4: Remove unused GPIO bias data
  ARM: shmobile: r8a73a4: Remove all GPIO enums
  sh-pfc: r8a73a4: Remove function GPIOs
  ARM: shmobile: r8a73a4: Remove IRQC function GPIOs
  ARM: shmobile: r8a73a4: Remove SCIF function GPIOs
  sh-pfc: r8a73a4: Remove IRQC function GPIOS
  sh-pfc: r8a73a4: Remove SCIF function GPIOS
  sh-pfc: r8a73a4: Add IRQC pin groups and functions
  sh-pfc: r8a73a4: Add SCIF pin groups and functions
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
Merge branch 'next/boards2' into for-next

* next/boards2:
  ARM: shmobile: mackerel: clean up MMCIF vs. SDHI1 selection
  ARM: shmobile: mackerel: add interrupt names for SDHI0
  ARM: shmobile: mackerel: switch SDHI and MMCIF interfaces to slot-gpio
  ARM: shmobile: mackerel: remove OCR masks, where regulators are used
  ARM: shmobile: mackerel: SDHI resources do not have to be numbered
  ARM: shmobile: Initial r8a7790 Lager board support
  ARM: shmobile: APE6EVM LAN9220 support
  ARM: shmobile: APE6EVM PFC support
  ARM: shmobile: APE6EVM base support
  ARM: shmobile: kzm9g-reference: add ethernet support
  ARM: shmobile: add R-Car M1A Bock-W platform support

Signed-off-by: Olof Johansson <olof@lixom.net>
usb: phy: samsung: convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
ARM: cpuimx27 and mbimx27: prepend CONFIG_ to Kconfig macro

Commit 2d66c7803595da0d4bcd949825d598575f5de9e6 ("cpuimx27 and mbimx27:
allow fine control of UART4 and SDHC2 usage") added the Kconfig symbol
MACH_EUKREA_CPUIMX27_USEUART4. But it forgot to prepend CONFIG_ to the
use of its macro. Add that prefix now.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
usb: musb: ux500_dma: drop references to U5500

Drop references to deprecated U5500 platform in driver comments.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: phy: ab8500-usb: convert to devm_kzalloc

Convert local data allocation to devm_kzalloc and drop unnecessary fail
path code.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: phy: ab8500-usb: set phy tuning values

Set phy tuning values proposed by the hardware teams for AB8500 and
AB8505 to improve USB eye diagram performances.

Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: phy: ab8500-usb: fix eye diagram for ab8500 v2.0

AB8500 v2.0 has eye diagram issues when drawing more than 100mA from
VBUS.  Force charging current to 100mA in case of standard host.

Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: phy: ab8500-usb: add regulator support

Add initial regulator support to ab8500-usb by introducing necessary
devm_regulator_get().

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: phy: ab8500-usb: split ab8500_usb_phy_ctrl

Split ab8500_usb_phy_ctrl into separate enable/disable functions to make
the code more linear and readable.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: phy: ab8500-usb: enable/disable regulator on phy events

Add ab8500_usb_regulator_{enable,disable} functions to control USB phy
regulators on corresponding ab8500_usb_phy_{enable,disable} events.

This contains some workaround and optimization for specific AB8500
versions.

Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Signed-off-by: Praveena Nadahally <praveen.nadahally@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: phy: ab8500-usb: fix unbalanced clock and regulator disable warnings

To prevent clock and regulator frameworks from complaining, only disable
the host or peripheral phy if they were enabled.

Reported-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: phy: ab8500-usb: fix last notifier arguments

Fix last ab->phy.notifier call to use vbus_draw as notifier argument, as
that's used in ab8500_charger to control charging current.

Also drop a related TODO comment, and the additional
ux500_musb_set_vbus(musb, 0), as with this patch it was causing an
erratic behaviour of gadget ep0 state machine.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: phy: ab8500-usb: adopt pinctrl support

Amend the ab8500-usb driver to optionally take a pin control handle and
set the state of the pins to "default" on ab8500_usb_phy_enable and to
"sleep" on ab8500_usb_phy_disable.

The pinctrl handle is released on ab8500_usb_phy_disable because USB
pins are shared with ab8505_micro_usb_iddet driver.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>