Commit Graph

361243 Commits

Author SHA1 Message Date
Guennadi Liakhovetski 54ca74ef09 ARM: shmobile: kzm9g: add fixed voltage regulators for SDHI0 and SDHI2
Both SDHI0 and SDHI2 power supplies on kzm9g can be switched on and off. In
the current version this is not used and the regulators are hard-wired to
"on." This patch switches SDHI0 and SDHI2 to proper fixed-voltage
regulators, using GPIOs to enable and disable them. Both ports shall
now be specifying the MMC_CAP_POWER_OFF_CARD MMC capability. Only SDHI0
has been tested with an SDIO card, since SDHI2 is a microSD slot.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-21 19:37:00 +09:00
Guennadi Liakhovetski a9060f89d9 ARM: shmobile: armadillo800eva: add a fixed voltage regulator for SDHI1
The SDHI1 power supply on armadillo800eva can be switched on and off. In
the current version this is not used and the regulator is hard-wired to
"on." This patch switches SDHI1 to a proper fixed-voltage regulator,
using a GPIO to enable and disable it. Both SDHI0 and SDHI1 ports shall
now be specifying the MMC_CAP_POWER_OFF_CARD MMC capability. Both
interfaces tested with an SDIO card.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-21 19:36:33 +09:00
Guennadi Liakhovetski 546e5d3ef6 ARM: shmobile: sh73a0: move SDHI and MMCIF DT nodes to sh73a0.dtsi
To avoid having to repeat common DT node properties in all .dts files
move them to SoC's .dtsi file, setting their status to "disabled."
Individual boards will pick up devices, that they want to use and
change their DT node status to enabled.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-21 19:35:16 +09:00
Guennadi Liakhovetski c791c036f8 ARM: shmobile: kzm9g: SDHI0 and SDHI1 use a 3.3V power supply
kzm9g supplies 3.3V to its SDHI0 and SDHI2 interfaces. Specifying 2.8V
prevents some (e.g. certain SDIO) cards from working. This patch fixes the
voltage and removes redundant OCR masks from platform data.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-21 19:34:52 +09:00
Simon Horman 48296a13e7 ARM: shmobile: kzm9g: correct smsc regulator registration
Correct the name of smsc devices used for regulator registration
allowing the regulators to be found and used.

This eliminates the need for CONFIG_REGULATOR_DUMMY
when CONFIG_REGULATOR is set.

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:03 +09:00
Kuninori Morimoto 0b6794ef6e ARM: shmobile: marzen: Use gic_iid macro for ICCIAR / interrupt ID
ARM: shmobile: add gic_iid macro for ICCIAR / interrupt ID
enabled to use gic_iid macro.
This patch exchange current GIC interrupt setting
from gic_spi() to gic_iid()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ horms+renesas@verge.net.au: Split irq.h portion into a separate patch ]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:03 +09:00
Simon Horman 5377762e2e ARM: shmobile: kzm9g: Trim reference DT_MACHINE_START
Remove .init_late and .restart from DT_MACHINE_START
for kzm9g reference as these are not necessary to
bring the board up which is the main aim of kzm9g reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:02 +09:00
Simon Horman e30755f41d ARM: shmobile: kzm9g: Remove warning about SMP
Remove warning about SMP not working with the
clock initialisation used for kzm9g reference.

This is resolved by not selecting CONFIG_PREEMPT.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:02 +09:00
Guennadi Liakhovetski f33d1c3476 ARM: shmobile: simplify kzm9g Kconfig dependencies
Reference kernel configurations for armadillo800eva and kzm9g boards do not
have to depend on their respective "legacy" configurations, doing device
instantiation in .c, they can be configured and built independently.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
[horms+renesas@verge.net.au: created separate patch for kzm9g portion]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:02 +09:00
Guennadi Liakhovetski f017d0119f ARM: shmobile: SDHI and MMCIF interfaces to kzm9g-reference
Add SDHI0 and SDHI2 interfaces to kzm9g-reference. With no pinctrl DT
support we cannot use GPIO card-detection and regulator switching.
Also update the MMCIF DT node to use all 8 data lines and avoid
redundant information in DT.

Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
[ horms+renesas@verge.net.au: Updated for pinmux changes by Laurent Pinchart ]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:02 +09:00
Guennadi Liakhovetski 275cc1d4fc ARM: shmobile: parse DT and configure pinmux early on kzm9g-reference
GPIOs can be provided by the pinctrl subsystem, which can be initialised
by DT. Therefore DT has to be parsed before requesting GPIOs. Also non-DT
pinmux has to be configured early.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:02 +09:00
Simon Horman b8b82b2983 ARM: shmobile: kzm9g: Reference DT implementation
Provide alternate board code for the kzm9g to demonstrate
how DT may be used given the current state of driver
device tree support. This is intended to act as a reference
for mach-shmobile developers.

Some notes:

* Brings up the GIC interrupt handler using device tree
* Brings up the following device using device tree:
  - MMCIF (MMC)
* Does not bring up the INTC interrupt controller at all,
  thus external devices may not be used. In particular,
  the SMSC ethernet device may not be used and thus
  NFS root may not be used.
* Uses existing C code and not device tree to initialise the following,
  which are needed for a working board:
  - SCIF (Serial)
  - CMT (Clock)
  - PFC (GPIO)

To use this alternate board code instead of the normal board code,
CONFIG_MACH_KZM9G_REFERENCE should be selected in the kernel config.
And the sh73a0-kzm9g-reference.dtb flattened device tree blob should be used.

Includes fix by Thierry Reding to no longer use gic_handle_irq()

Includes fixes by Guennadi Liakhovetski for recent pinmux changes.

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:02 +09:00
Simon Horman 73d6a69e3b ARM: shmobile: marzen: Reference DT implementation
Provide alternate board code for the marzen to demonstrate
how DT may be used given the current state of driver
device tree support. This is intended to act as a reference
for mach-shmobile developers.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:02 +09:00
Arnd Bergmann b3425eb9df ARM: shmobile: mark mackerel sh_mmcif_device __maybe_unused
Patch eac036ef9e "ARM: shmobile: streamline mackerel SD and MMC devices"
made the use of the sh_mmcif_device variable for mackarel optional,
but the definition is always provided, causing a build warning.

arch/arm/mach-shmobile/board-mackerel.c:1120:31: warning: 'sh_mmcif_device'
	defined but not used [-Wunused-variable]

Marking the variable as __maybe_unused will do the right thing here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:02 +09:00
Guennadi Liakhovetski 626a645eb7 ARM: shmobile: streamline mackerel SD and MMC devices
This patch fixes the following issues with SD and MMC interfaces on mackerel:
1. replace custom card-detection functions with standard GPIO CD API
2. resources don't have to be numbered
3. add SDHI interrupt names
4. remove OCR masks, where regulators are used
5. only specify SDHI CD interrupts on interfaces where a CD pin is present -
   SDHI0
6. don't instantiate an MMCIF device and initialise MMCIF pins if SDHI1 is
   selected

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:02 +09:00
Guennadi Liakhovetski 3a5eed5f9e ARM: shmobile: switch SDHI0 to GPIO regulator on armadillo800eva
When regulators are used with MMC devices, explicitly provided OCR masks
are ignored, they can be removed from platform data. Also switch SDHI0
from fixed regulator with hard-wired GPIO levels to a proper GPIO regulator
instance to enable dynamic voltage switching.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:01 +09:00
Guennadi Liakhovetski aee14423e7 ARM: shmobile: use GPIO SD-card detection on armadillo800eva
Switch SDHI0 and SDHI1 SD-card interfaces on armadillo800eva to using GPIO
card detection, which provides maximum power saving and automatically
selects IRQ or polling mode, depending on the CD GPIO capability.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:27:01 +09:00
Simon Horman a9cc2c88aa Merge branches 'soc' and 'pinmux' into boards-base 2013-03-18 21:26:33 +09:00
Phil Edworthy d75bc78b50 r8a7779: Add Display Unit clock support
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
[Rename device from to rcarfb to rcar-du]
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[Manual conflict resolution]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-18 21:22:34 +09:00
Laurent Pinchart a4339a9cb4 ARM: shmobile: r8a7779: Remove INTC function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:19 +01:00
Laurent Pinchart b1dbdbda76 ARM: shmobile: r8a7779: Remove LBSC function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:19 +01:00
Laurent Pinchart 9cb5c048ca ARM: shmobile: r8a7779: Remove USB function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:19 +01:00
Laurent Pinchart 89fd785f2a ARM: shmobile: r8a7779: Remove HSPI function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:19 +01:00
Laurent Pinchart 7b69780d31 ARM: shmobile: r8a7779: Remove SCIF function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:18 +01:00
Laurent Pinchart 6c4950ad7f ARM: shmobile: r8a7779: Remove SDHI and MMCIF function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:18 +01:00
Laurent Pinchart e4610a8d09 ARM: shmobile: r8a7779: Remove DU function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:18 +01:00
Laurent Pinchart f19be10872 ARM: shmobile: r8a7779: Remove DU1_DOTCLKOUT1 GPIO
The function is not documented in the r8a7779 datasheet. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:18 +01:00
Laurent Pinchart ceb882ba29 ARM: shmobile: r8a7740: Remove SDHI and MMCIF function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:18 +01:00
Laurent Pinchart d3a6b8672d ARM: shmobile: r8a7740: Remove LCD0 and LCD1 function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:18 +01:00
Laurent Pinchart d363ca43f1 ARM: shmobile: sh73a0: Remove IrDA function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:17 +01:00
Laurent Pinchart 097eb1c400 ARM: shmobile: sh73a0: Remove USB function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:17 +01:00
Laurent Pinchart ffa2a9d504 ARM: shmobile: sh73a0: Remove BSC function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:17 +01:00
Laurent Pinchart 385a94a40b ARM: shmobile: sh73a0: Remove KEYSC function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:17 +01:00
Laurent Pinchart 9c10a20962 ARM: shmobile: sh73a0: Remove pull-up function GPIOS
Those GPIOs have been deprecated by the pinconf API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:17 +01:00
Laurent Pinchart 4c609d01fd ARM: shmobile: sh73a0: Remove FSI function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:17 +01:00
Laurent Pinchart 6fe59fa6fc ARM: shmobile: sh73a0: Remove I2C function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:16 +01:00
Laurent Pinchart eeba9dd601 ARM: shmobile: sh73a0: Remove SCIFA and SCIFB function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:16 +01:00
Laurent Pinchart 58e8353b8c ARM: shmobile: sh73a0: Remove LCDC and LCDC2 function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:16 +01:00
Laurent Pinchart f56314c4a1 ARM: shmobile: sh7372: Remove SDHI and MMCIF function GPIOs
Those GPIOs have been deprecated by the pinctrl API. They are unused and
unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-03-15 13:34:16 +01:00
Laurent Pinchart fdd7fc55f5 sh-pfc: r8a7779: Remove INTC function GPIOS
All r8a7779 platforms now use the pinctrl API to control the INTC pins,
the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:16 +01:00
Laurent Pinchart cb1f8abc79 sh-pfc: r8a7779: Remove LBSC function GPIOS
All r8a7779 platforms now use the pinctrl API to control the LBSC pins,
the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:16 +01:00
Laurent Pinchart e1114715f4 sh-pfc: r8a7779: Remove USB function GPIOS
All r8a7779 platforms now use the pinctrl API to control the USB pins,
the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:15 +01:00
Laurent Pinchart 52c5d0327e sh-pfc: r8a7779: Remove HSPI function GPIOS
All r8a7779 platforms now use the pinctrl API to control the HSPI pins,
the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:15 +01:00
Laurent Pinchart c97c7464f9 sh-pfc: r8a7779: Remove SCIF function GPIOS
All r8a7779 platforms now use the pinctrl API to control the SCIF pins,
the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:15 +01:00
Laurent Pinchart dd11cd3d1b sh-pfc: r8a7779: Remove SDHI and MMCIF function GPIOS
All r8a7779 platforms now use the pinctrl API to control the SDHI and
MMCIF pins, the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:15 +01:00
Laurent Pinchart 2a02818cbb sh-pfc: r8a7779: Remove DU1_DOTCLKOUT1 GPIO
The function is not documented in the r8a7779 datasheet. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:15 +01:00
Laurent Pinchart 3dff629bd8 sh-pfc: r8a7740: Remove SDHI and MMCIF function GPIOS
All r8a7740 platforms now use the pinctrl API to control the SDHI and
MMCIF pins, the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:15 +01:00
Laurent Pinchart b56479f233 sh-pfc: r8a7740: Remove LCD0 and LCD1 function GPIOS
All r8a7740 platforms now use the pinctrl API to control the LCD0 and
LCD1 pins, the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:14 +01:00
Laurent Pinchart f89fa85663 sh-pfc: sh73a0: Remove IrDA function GPIOS
All sh73a0 platforms now use the pinctrl API to control the IrDA pins,
the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:14 +01:00
Laurent Pinchart f03e4be625 sh-pfc: sh73a0: Remove USB function GPIOS
All sh73a0 platforms now use the pinctrl API to control the USB pins,
the corresponding function GPIOS are unused. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15 13:34:14 +01:00