Patchwork [0/7,v2] ARM: mach-shmobile: kzm9g: Reference DT implementation

login
register
mail settings
Submitter Simon Horman
Date Nov. 30, 2012, 8:44 a.m.
Message ID <1354265085-2444-1-git-send-email-horms@verge.net.au>
Download mbox
Permalink /patch/202890/
State New
Headers show

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git devel/of-kzm9g

Comments

Simon Horman - Nov. 30, 2012, 8:44 a.m.
Hi,


*** This series is wip and does not currently function
    I am posting to provide a status update and ask for help ***

this is a second pass at at providing a refernce DT implementation
for the kzm9g baord which is intended to act as a guide for mach-shmobile
developers.

Major difference to v1:

* Drop touchscreen initialisation, it requires INTC
* Drop SDHI initialisation, the driver seems to need some work
* Add extra entries to clock-sh73a0.c:lookups[] and
  remove auxdata. Ultimtely the clocks will be described
  in DT, but the code isn't there yet.
* Drop MMCIF patch, it is not needed if regulators are enabled
* Drop PCF hacks, instead, the series is based on Laruent Pinchart's * series:
  [PATCH v2 00/77] SH pin control and GPIO rework with OF support
* Use shmobile_setup_delay()


Unfortunately the last point seems to introduce problems.
It seems to prevent SMP from booting to the point of printing
anything on the early console. And with CONFIG_SMP disabled
the boot halts when the MMCIF driver initialisation calls mmc_delay().

I've poked around a bit but I haven't had any luck working out
why this is the case. I would appreciate any pointers on what to
investigate.

Git and diffstat information provided to aid review.


----------------------------------------------------------------
The following changes since commit 940956fe1d8de5cbcc963214fe592f76d8354bef:

  ARM: shmobile: kzm9g: Add LED1-LED4 to the device tree (2012-11-27 00:59:10 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git devel/of-kzm9g

for you to fetch changes up to 7018db4354c445d401782dc38df5e2d8afb43bc2:

  ARM: mach-shmobile: kzm9g: Reference DT implementation (2012-11-30 16:55:46 +0900)

----------------------------------------------------------------
Simon Horman (5):
      ARM: mach-shmobile: sh73a0: Allow initialisation of GIC by DT
      ARM: mach-shmobile: sh73a0: Minimal setup using DT
      ARM: mach-shmobile: sh73a0: Initialise MMCIF using DT
      ARM: shmobile: kzm9g: use voltage regulators by default
      ARM: mach-shmobile: kzm9g: Reference DT implementation

 arch/arm/boot/dts/Makefile                     |    3 +-
 arch/arm/boot/dts/sh73a0-kzm9g-reference.dts   |   37 ++++++++++
 arch/arm/boot/dts/sh73a0-reference.dtsi        |   24 +++++++
 arch/arm/boot/dts/sh73a0.dtsi                  |   69 ++++++++++++++++++
 arch/arm/configs/kzm9g_defconfig               |    1 +
 arch/arm/mach-shmobile/Kconfig                 |   10 +++
 arch/arm/mach-shmobile/Makefile                |    8 ++-
 arch/arm/mach-shmobile/board-kzm9g-reference.c |   92 ++++++++++++++++++++++++
 arch/arm/mach-shmobile/clock-sh73a0.c          |    6 ++
 arch/arm/mach-shmobile/include/mach/common.h   |    3 +
 arch/arm/mach-shmobile/intc-sh73a0.c           |   14 ++++
 arch/arm/mach-shmobile/setup-sh73a0.c          |   39 +++++++++-
 12 files changed, 303 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
 create mode 100644 arch/arm/boot/dts/sh73a0-reference.dtsi
 create mode 100644 arch/arm/mach-shmobile/board-kzm9g-reference.c
Laurent Pinchart - Nov. 30, 2012, 12:30 p.m.
Hi Simon,

Thank you for the patch.

On Friday 30 November 2012 17:44:43 Simon Horman wrote:
> From: Simon Horman <horms+renesas@verge.net.au>
> 
> This device also requires a voltage regulator which
> should be defined in a board-specific maner. An example
> dts snipped follows.
> 
> / {
> 	fixedregulator1v8: fixedregulator@0 {
> 		compatible = "regulator-fixed";
> 		regulator-name = "fixed-1.8V";
> 		regulator-min-microvolt = <1800000>;
> 		regulator-max-microvolt = <1800000>;
> 	};
> };
> 
> &mmcif {
> 	vmmc-supply = <&fixedregulator1v8>;
> 	vqmmc-supply = <&fixedregulator1v8>;
> };
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> ---
> 
> v2
> * Removed SDHI intitialisation as the driver needs updating first
> * Moved MMC DT from sh73a0.dtsi to sh73a0-reference.dtsi
>   as it is not appropriate for use by sh73a0-kzm9g.dts yet.
>   This is because sh73a0-kzm9g.dts and board-kzm9g.c use
>   both the GIC and INTC interrupt controllers to provide
>   access to a rich set of devices. This is achieved by initilising
>   the interrupt controllers using C code. Work on allowing the INC
>   controller to be initialised using DT is in progress, however,
>   until that is complete only GIC may be initialised using DT.
> * Add extra entries to clock-sh73a0.c:lookups[] and
>   remove auxdata. Ultimtely the clocks will be described
>   in DT, but the code isn't there yet.

Could you please add this as a TO-DO item either in the commit message or in 
arch/arm/mach-shmobile/clock-sh73a0.c ?

> ---
>  arch/arm/boot/dts/sh73a0-reference.dtsi |   24 ++++++++++++++++++++++++
>  arch/arm/mach-shmobile/clock-sh73a0.c   |    1 +
>  2 files changed, 25 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sh73a0-reference.dtsi
> 
> diff --git a/arch/arm/boot/dts/sh73a0-reference.dtsi
> b/arch/arm/boot/dts/sh73a0-reference.dtsi new file mode 100644
> index 0000000..d4bb012
> --- /dev/null
> +++ b/arch/arm/boot/dts/sh73a0-reference.dtsi
> @@ -0,0 +1,24 @@
> +/*
> + * Device Tree Source for the SH73A0 SoC
> + *
> + * Copyright (C) 2012 Renesas Solutions Corp.
> + *
> + * This file is licensed under the terms of the GNU General Public License
> + * version 2.  This program is licensed "as is" without any warranty of any
> + * kind, whether express or implied.
> + */
> +
> +/include/ "sh73a0.dtsi"
> +
> +/ {
> +	compatible = "renesas,sh73a0";
> +
> +	mmcif: mmcif@0x10010000 {
> +		compatible = "renesas,sh-mmcif";
> +		reg = <0xe6bd0000 0x100>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 140 0x4
> +			      0 141 0x4>;
> +		reg-io-width = <4>;
> +	};
> +};
> diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c
> b/arch/arm/mach-shmobile/clock-sh73a0.c index 8bc7a2b..0908123 100644
> --- a/arch/arm/mach-shmobile/clock-sh73a0.c
> +++ b/arch/arm/mach-shmobile/clock-sh73a0.c
> @@ -576,6 +576,7 @@ static struct clk_lookup lookups[] = {
>  	CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
>  	CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
>  	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */
> +	CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), /* MMCIF0 */
>  	CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */
>  	CLKDEV_DEV_ID("leds-renesas-tpu.12", &mstp_clks[MSTP303]), /* TPU1 */
>  	CLKDEV_DEV_ID("leds-renesas-tpu.21", &mstp_clks[MSTP302]), /* TPU2 */
Simon Horman - Dec. 1, 2012, 12:27 a.m.
On Fri, Nov 30, 2012 at 01:30:44PM +0100, Laurent Pinchart wrote:
> Hi Simon,
> 
> Thank you for the patch.
> 
> On Friday 30 November 2012 17:44:43 Simon Horman wrote:
> > From: Simon Horman <horms+renesas@verge.net.au>
> > 
> > This device also requires a voltage regulator which
> > should be defined in a board-specific maner. An example
> > dts snipped follows.
> > 
> > / {
> > 	fixedregulator1v8: fixedregulator@0 {
> > 		compatible = "regulator-fixed";
> > 		regulator-name = "fixed-1.8V";
> > 		regulator-min-microvolt = <1800000>;
> > 		regulator-max-microvolt = <1800000>;
> > 	};
> > };
> > 
> > &mmcif {
> > 	vmmc-supply = <&fixedregulator1v8>;
> > 	vqmmc-supply = <&fixedregulator1v8>;
> > };
> > 
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > 
> > ---
> > 
> > v2
> > * Removed SDHI intitialisation as the driver needs updating first
> > * Moved MMC DT from sh73a0.dtsi to sh73a0-reference.dtsi
> >   as it is not appropriate for use by sh73a0-kzm9g.dts yet.
> >   This is because sh73a0-kzm9g.dts and board-kzm9g.c use
> >   both the GIC and INTC interrupt controllers to provide
> >   access to a rich set of devices. This is achieved by initilising
> >   the interrupt controllers using C code. Work on allowing the INC
> >   controller to be initialised using DT is in progress, however,
> >   until that is complete only GIC may be initialised using DT.
> > * Add extra entries to clock-sh73a0.c:lookups[] and
> >   remove auxdata. Ultimtely the clocks will be described
> >   in DT, but the code isn't there yet.
> 
> Could you please add this as a TO-DO item either in the commit message or in 
> arch/arm/mach-shmobile/clock-sh73a0.c ?

Sure, will do.