devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: "Marek Belisko" <marek@goldelico.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org
Subject: Re: [PATCH 32/32] ARM: dts: omap3-gta04a5one: define GTA04A5 variant with OneNAND
Date: Wed, 25 Jul 2018 10:20:13 +0200	[thread overview]
Message-ID: <20180725082013.GD7467@lenoch> (raw)
In-Reply-To: <51523efb93cd30a233d5c41918d5a08b2231647e.1532501910.git.hns@goldelico.com>

On Wed, Jul 25, 2018 at 08:59:04AM +0200, H. Nikolaus Schaller wrote:
> GTA04A5 has been produced with MCP chips either with
>  512MB RAM +  512MB NAND
>  512MB RAM + 1024MB NAND
> 1024MB RAM +  512MB OneNAND
> 
> RAM setup is done by U-Boot (MLO/SPL) but OneNAND needs
> a different setup of the GPMC. So we need to derive a
> DTB variant that modifies the gpmc and nand setup.

Just a suggestion... This way your user needs to know which variant is dealing
with. It is similar situation as with IGEPv2 with cames with various setup
either with NAND or OneNAND. Both NAND and OneNAND nodes are present in DTB
and enabled by U-Boot approriately. So single U-Boot binary and DTB is enough
to deal with all variants.

	ladis

> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  arch/arm/boot/dts/omap3-gta04a5one.dts | 114 +++++++++++++++++++++++++++++++++
>  1 file changed, 114 insertions(+)
>  create mode 100644 arch/arm/boot/dts/omap3-gta04a5one.dts
> 
> diff --git a/arch/arm/boot/dts/omap3-gta04a5one.dts b/arch/arm/boot/dts/omap3-gta04a5one.dts
> new file mode 100644
> index 000000000000..9b7bbdc344b3
> --- /dev/null
> +++ b/arch/arm/boot/dts/omap3-gta04a5one.dts
> @@ -0,0 +1,114 @@
> +/*
> + * Copyright (C) 2014-18 H. Nikolaus Schaller <hns@goldelico.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include "omap3-gta04a5.dts"
> +
> +&omap3_pmx_core {
> +	model = "Goldelico GTA04A5/Letux 2804 with OneNAND";
> +
> +	gpmc_pins: pinmux_gpmc_pins {
> +		pinctrl-single,pins = <
> +
> +			/* address lines */
> +			OMAP3_CORE1_IOPAD(0x207a, PIN_OUTPUT | MUX_MODE0)       /* gpmc_a1.gpmc_a1 */
> +			OMAP3_CORE1_IOPAD(0x207c, PIN_OUTPUT | MUX_MODE0)       /* gpmc_a2.gpmc_a2 */
> +			OMAP3_CORE1_IOPAD(0x207e, PIN_OUTPUT | MUX_MODE0)       /* gpmc_a3.gpmc_a3 */
> +
> +			/* data lines, gpmc_d0..d7 not muxable according to TRM */
> +			OMAP3_CORE1_IOPAD(0x209e, PIN_INPUT | MUX_MODE0)        /* gpmc_d8.gpmc_d8 */
> +			OMAP3_CORE1_IOPAD(0x20a0, PIN_INPUT | MUX_MODE0)        /* gpmc_d9.gpmc_d9 */
> +			OMAP3_CORE1_IOPAD(0x20a2, PIN_INPUT | MUX_MODE0)        /* gpmc_d10.gpmc_d10 */
> +			OMAP3_CORE1_IOPAD(0x20a4, PIN_INPUT | MUX_MODE0)        /* gpmc_d11.gpmc_d11 */
> +			OMAP3_CORE1_IOPAD(0x20a6, PIN_INPUT | MUX_MODE0)        /* gpmc_d12.gpmc_d12 */
> +			OMAP3_CORE1_IOPAD(0x20a8, PIN_INPUT | MUX_MODE0)        /* gpmc_d13.gpmc_d13 */
> +			OMAP3_CORE1_IOPAD(0x20aa, PIN_INPUT | MUX_MODE0)        /* gpmc_d14.gpmc_d14 */
> +			OMAP3_CORE1_IOPAD(0x20ac, PIN_INPUT | MUX_MODE0)        /* gpmc_d15.gpmc_d15 */
> +
> +			/*
> +			 * gpmc_ncs0, gpmc_nadv_ale, gpmc_noe, gpmc_nwe, gpmc_wait0 not muxable
> +			 * according to TRM. OneNAND seems to require PIN_INPUT on clock.
> +			 */
> +			OMAP3_CORE1_IOPAD(0x20b0, PIN_OUTPUT | MUX_MODE0)       /* gpmc_ncs1.gpmc_ncs1 */
> +			OMAP3_CORE1_IOPAD(0x20be, PIN_INPUT | MUX_MODE0)        /* gpmc_clk.gpmc_clk */
> +		>;
> +	};
> +};
> +
> +&gpmc {
> +	/* switch inherited setup to OneNAND */
> +
> +	ranges = <0 0 0x04000000 0x1000000>;	/* CS0: 16MB for OneNAND */
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&gpmc_pins>;
> +
> +	/delete-node/ nand@0,0;
> +
> +	onenand@0,0 {
> +
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "ti,omap2-onenand";
> +		reg = <0 0 0x20000>;	/* CS0, offset 0, IO size 128K */
> +
> +		gpmc,sync-read;
> +		gpmc,sync-write;
> +		gpmc,burst-length = <16>;
> +		gpmc,burst-read;
> +		gpmc,burst-wrap;
> +		gpmc,burst-write;
> +		gpmc,device-width = <2>;
> +		gpmc,mux-add-data = <2>;
> +		gpmc,cs-on-ns = <0>;
> +		gpmc,cs-rd-off-ns = <87>;
> +		gpmc,cs-wr-off-ns = <87>;
> +		gpmc,adv-on-ns = <0>;
> +		gpmc,adv-rd-off-ns = <10>;
> +		gpmc,adv-wr-off-ns = <10>;
> +		gpmc,oe-on-ns = <15>;
> +		gpmc,oe-off-ns = <87>;
> +		gpmc,we-on-ns = <0>;
> +		gpmc,we-off-ns = <87>;
> +		gpmc,rd-cycle-ns = <112>;
> +		gpmc,wr-cycle-ns = <112>;
> +		gpmc,access-ns = <81>;
> +		gpmc,page-burst-access-ns = <15>;
> +		gpmc,bus-turnaround-ns = <0>;
> +		gpmc,cycle2cycle-delay-ns = <0>;
> +		gpmc,wait-monitoring-ns = <0>;
> +		gpmc,clk-activation-ns = <5>;
> +		gpmc,wr-data-mux-bus-ns = <30>;
> +		gpmc,wr-access-ns = <81>;
> +		gpmc,sync-clk-ps = <15000>;
> +
> +		x-loader@0 {
> +			label = "X-Loader";
> +			reg = <0 0x80000>;
> +		};
> +
> +		bootloaders@80000 {
> +			label = "U-Boot";
> +			reg = <0x80000 0x1c0000>;
> +		};
> +
> +		bootloaders_env@240000 {
> +			label = "U-Boot Env";
> +			reg = <0x240000 0x40000>;
> +		};
> +
> +		kernel@280000 {
> +			label = "Kernel";
> +			reg = <0x280000 0x600000>;
> +		};
> +
> +		filesystem@880000 {
> +			label = "File System";
> +			reg = <0x880000 0>;	/* 0 = MTDPART_SIZ_FULL */
> +		};
> +
> +	};
> +};
> -- 
> 2.12.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-07-25  8:20 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25  6:58 [PATCH 00/32] Device Tree Updates for GTA04 (A3/A4/A5 variants) H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 01/32] ARM: dts: omap3-gta04: fix typo in backlight pins node name H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 02/32] ARM: dts: omap3-gta04: fix some whitespace and tab style errors H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 03/32] ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 04/32] ARM: dts: omap3-gta04: fixes for tvout / venc H. Nikolaus Schaller
2018-07-25 10:37   ` Sebastian Reichel
2018-07-25 11:40     ` H. Nikolaus Schaller
2018-07-25 12:31     ` H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 05/32] ARM: dts: omap3-gta04: add devconf1 setup for correct tvout pins H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 06/32] ARM: dts: omap3-gta04: tvout: enable as display1 alias H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 07/32] ARM: dts: omap3-gta04: fix touchscreen tsc2007 H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 08/32] ARM: dts: omap3-gta04: add pinmux for bmp085 EOC interrupt H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 09/32] ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot H. Nikolaus Schaller
2018-07-25  8:07   ` Ladislav Michl
2018-07-25  8:18     ` H. Nikolaus Schaller
2018-07-25  8:25       ` [Letux-kernel] " H. Nikolaus Schaller
2018-07-25  8:33       ` Ladislav Michl
2018-07-25 12:27         ` H. Nikolaus Schaller
2018-07-25 13:26           ` Ladislav Michl
2018-07-25 16:27         ` [Letux-kernel] " Andreas Kemnade
2018-07-25 20:07           ` Ladislav Michl
2018-07-25  6:58 ` [PATCH 10/32] ARM: dts: omap3-gta04: update gpmc NAND setup H. Nikolaus Schaller
2018-07-25  8:10   ` Ladislav Michl
2018-07-25  8:16     ` H. Nikolaus Schaller
2018-07-25  8:28       ` Ladislav Michl
2018-07-25  9:08         ` H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 11/32] ARM: dts: omap3-gta04: keep vpll2 always on H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 12/32] ARM: dts: omap3-gta04: add a comment how to reference the tca6507 gpio H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 13/32] ARM: dts: omap3-gta04: add warning comment to vaux2 regulator H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 14/32] ARM: dts: omap3-gta04: replace ti,non-removable with generic non-removable H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 15/32] ARM: dts: omap3-gta04: make use of input event include file and constants H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 16/32] ARM: dts: omap3-gta04: map antenna detect GPIO to SW_LINEIN_INSERT key event H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 17/32] ARM: dts: omap3-gta04: add camera interface parallel port H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 18/32] ARM: dts: omap3-gta04: add camera pinmux H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 19/32] ARM: dts: omap3-gta04: add mcbsp (audio subsystem) pinmux H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 20/32] ARM: dts: omap3-gta04: add devconf0 setup for mcbsp1 clock pins H. Nikolaus Schaller
2018-07-25  8:12   ` Ladislav Michl
2018-07-25  8:19     ` H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 21/32] ARM: dts: omap3-gta04: add mcbsp (audio subsystem) nodes H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 22/32] ARM: dts: omap3-gta04a3: fix model name for A3 variant H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 23/32] ARM: dts: omap3-gta04a4: fix model name for A4 variant H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 24/32] ARM: dts: omap3-gta04a5: fix copyright of A5 variant H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 25/32] ARM: dts: omap3-gta04a5: fix model name H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 26/32] ARM: dts: omap3-gta04a5: fix whitepsace and tab style H. Nikolaus Schaller
2018-07-25  6:58 ` [PATCH 27/32] ARM: dts: omap3-gta04a5: add support for PPS H. Nikolaus Schaller
2018-07-25  6:59 ` [PATCH 28/32] ARM: dts: omap3-gta04a5: disable IrDA receiver to save power H. Nikolaus Schaller
2018-07-25  6:59 ` [PATCH 29/32] ARM: dts: omap3-gta04a5: add support for ti,wl1837 module H. Nikolaus Schaller
2018-07-25  6:59 ` [PATCH 30/32] ARM: dts: omap3-gta04a5: uses different sensors than gta04a4 H. Nikolaus Schaller
2018-07-25  6:59 ` [PATCH 31/32] ARM: dts: omap3-gta04a5: define pinmux for bluetooth enable of ti,wl1837 module H. Nikolaus Schaller
2018-07-25  6:59 ` [PATCH 32/32] ARM: dts: omap3-gta04a5one: define GTA04A5 variant with OneNAND H. Nikolaus Schaller
2018-07-25  8:20   ` Ladislav Michl [this message]
2018-07-25  8:29     ` H. Nikolaus Schaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180725082013.GD7467@lenoch \
    --to=ladis@linux-mips.org \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hns@goldelico.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=marek@goldelico.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).