ARM: s5pv210: Add board file for boot using Device Tree

This patch adds board file that will be used to boot S5PV210/S5PC110-based
boards using Device Tree.

Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[t.figa: Rebased and cleaned-up a bit.]
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
ARM: Samsung: DT: Add Device tree for s5pv210

Add generic device tree for s5pv210 and s5pv210-pinctrl

Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
ARM: Samsung: DT: Add Device tree for S5PC110/S5PV210 Boards

Add DTS for s5pc110 boards: goni, aquila, smdkc110
s5pv210: smdkv210, tiny210, torbreck

Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[t.figa: Fixed merge conflicts.]
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
ARM: S5PV210: Remove support for board files

Since all in-tree boards have been moved to device tree, we can now drop
legacy code and make mach-s5pv210 DT-only. This patch does it.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
ARM: S5PV210: Untie PM support from legacy code

This patch makes S5PV210 not rely on legacy suspend helpers in
plat-samsung and implements platform suspend logic locally, similarly to
Exynos.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
ARM: S5PV210: Remove remaining legacy code

After refactoring suspend/resume, which was last part with dependencies
on legacy code, all Kconfig symbols related to Samsung ATAGS support can
be deselected and more unused code removed.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
ARM: SAMSUNG: Correct dependencies of SAMSUNG_PM_DEBUG

Currently SAMSUNG_PM_DEBUG is defined to depend on DEBUG_S3C_UART which
is of "int" type and always evaluates to "n" in logical expressions,
which makes the whole condition never met and the symbol never appears.

This patch replaces DEBUG_S3C_UART with logical OR of all four
DEBUG_S3C_UART[0-3], which might be not the most beautiful solution
ever, but at least gives the user a chance to enable PM debugging.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
ARM: SAMSUNG: Fix missing include in pm-debug.c

Due to merge conflict happening some time ago and further issues leading
this file to be never compiled, it ended up missing inclusion of
linux/serial_s3c.h, which is needed for definitions S3C UART registers.
This patch adds it.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
ARM: s5pv210: Add support for s5p6442 SoC

This patch adds DeviceTree-only support for Samsung S5P6442 SoC, which
is an S5PV210-like ARM1176JZF-s-based SoC.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
pinctrl: samsung: Add driver data for S5P6442 SoC

This patch adds SoC-specific driver data describing pin controller of
S5P6442 SoC.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
serial/samsung: Check for ARCH_ not CPU_S5PV210

To support other SoCs from the same family as S5PV210, instead of
checking for support for specific SoC model, let's just check for the
whole family.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[HACK] ARM: Work around bootloader bug

On s5p6442-apollo board the bootloader leaves the system in a not fully
sane state and somehow switching domain 0 to client access permissions
causes a hang. Until the issue is fixed, work it around by leaving
manager permissions.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[media] exynos4-is: Request syscon only if ISP writeback is present

On FIMC variants which don't have writeback channel, there is no need to
access system registers. This patch makes the driver request sysreg
regmap conditionally depending on whether writeback is supported.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
drm/exynos: fimd: Add support for S5PV210 FIMD variant

This patch adds support for FIMD variant found on S5PV210 SoC.
Except CLKSEL bit availability, it is identical to Exynos4210.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
phy: Add support for S5PV210 to the Exynos USB 2.0 PHY driver

Add support for the Samsung's S5PV210 SoC to the Exynos USB 2.0 PHY driver.

Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
[k.debski@samsung.com: cleanup and commit description]
[k.debski@samsung.com: make changes accordingly to the mailing list
comments]
Signed-off-by: Kamil Debski <k.debski@samsung.com>
[tomasz.figa@gmail.com: fix merge conflicts]
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
extcon: Implement OF-based extcon lookup properly

Platform bus is not the only way to have extcon devices, so current
implementation of of_extcon_get_extcon_dev() is broken. Also using
parent device node only to get device name is quite ugly.

This patch reimplements of_extcon_get_extcon_dev() to do exactly the
same as extcon_get_extcon_dev() but instead of comparing names, compare
node pointers.

Since resulting function is very simple and uses static variables, it is
moved to extcon-class.c and of_extcon.c is removed.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
usb: gadget: udc-core: Add extcon handling to reduce power use

Extcon driver provides information about what kind of cable has been
inserted in the device's USB port. Power use can be reduced if UDC is
switched off while no suitable cable is present.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
[t.figa: Fixed merge conflicts.]
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
extcon: Add fsa9480 extcon driver

This patch adds extcon driver for Fairchild Semiconductor FSA9480
microUSB switch.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
usb: dwc2: Set of_node of gadget device

This is needed for USB extcon look-up using device tree.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
usb: dwc2: Do not disable PHY in udc_stop

This fixes double PHY disable leading to inability to re-enable the
controller after disabling it once.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>