[linux-sunxi] Re: ARM: sunxi: Experiences NAND flash

2015-08-17 Thread Roy Spliet
Hello, Reply in-line Op 17-08-15 om 08:34 schreef Boris Brezillon: Hi Oliver, Sorry for the late reply (I was in vacation for the last 2 weeks) On Tue, 11 Aug 2015 14:16:52 +0200 Olliver Schinagl oliver+l...@schinagl.nl wrote: Hello everybody, We are working with Boris and Roy's patch

[linux-sunxi] [PATCH v5 2/2] mtd: nand: sunxi: Set serial access mode correctly

2015-06-26 Thread Roy Spliet
Replaces the hard coded always use EDO policy with that prescribed by the ONFI 3.1 specification that EDO mode should always be used if tRC is below 30ns. Signed-off-by: Roy Spliet r.spl...@ultimaker.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com --- V4: - Simplify by pre

[linux-sunxi] [PATCH v5 1/2] mtd: nand: sunxi: Replace failsafe timing cfg with calculated value

2015-06-26 Thread Roy Spliet
for each NAND chip and set it when selecting the chip. Signed-off-by: Roy Spliet r.spl...@ultimaker.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com --- V2: - Fix crippled comments V3: - Warn for invalid timings - Style V4: - Make better use of return types - Style and comments

[linux-sunxi] [RFC 1/2] mtd: nand: sunxi: Add RX DMA support

2015-06-12 Thread Roy Spliet
Replace PIO readout with DMA when supported. This contains both a direct DMA method and one using a bounce buffer. PIO is still the preferred fall-back. Follow-up patches should implement both tx and the nand-component's page access mode, in which hardware automatically validates the ECC checksum.

[linux-sunxi] [RFC 2/2] dts: Add Sun7i NAND DMA definitions

2015-06-12 Thread Roy Spliet
--- arch/arm/boot/dts/sun7i-a20.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 428bdfa..f6eb401 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -577,6 +577,8 @@

[linux-sunxi] [RFC] Add DMA RX support for sunxi nand

2015-06-12 Thread Roy Spliet
Following are two patches for sunxi nand DMA support. There's a whole phletora of reasons why these are marked RFC, including: - Sunxi DMA support still needs to be merged upstream - Sun7i NAND definitions are not merged upstream - No TX support - Bounce buffer size is fixed to 8KB, and I have no

[linux-sunxi] Re: [RFC 09/11] sunxi/nand: Enable UBI and NAND commands

2015-06-08 Thread Roy Spliet
Oh yes, thanks for pointing this one out. I increased the malloc pool during debugging as google hinted towards UBI being rather memory-hungry, but forgot to double-check whether it was required. I just did, and as it turns out it really only needs to be increased to 8MiB for UBI to work in my

[linux-sunxi] Re: [U-Boot] [RFC 02/11] mtd/nand: add ONFI timing mode to nand_timings converter

2015-06-08 Thread Roy Spliet
Hello Scott et al., Op 06-06-15 om 00:02 schreef Scott Wood: On Fri, 2015-06-05 at 13:52 +0200, Roy Spliet wrote: From: yassin yassinjaf...@gmail.com Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- drivers/mtd/nand/Makefile | 2 +- drivers/mtd/nand/nand_timings.c | 252

Re: [linux-sunxi] Re: [U-Boot] [RFC 02/11] mtd/nand: add ONFI timing mode to nand_timings converter

2015-06-08 Thread Roy Spliet
Hello Michal, Op 08-06-15 om 10:34 schreef Michal Suchanek: On 8 June 2015 at 10:11, Roy Spliet r.spl...@ultimaker.com wrote: Hello Scott et al., Op 06-06-15 om 00:02 schreef Scott Wood: On Fri, 2015-06-05 at 13:52 +0200, Roy Spliet wrote: From: yassin yassinjaf...@gmail.com Signed-off

Re: [linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions

2015-06-08 Thread Roy Spliet
Dear Michal, Op 08-06-15 om 10:54 schreef Michal Suchanek: On 8 June 2015 at 10:38, Roy Spliet r.spl...@ultimaker.com wrote: Hello Michal, Op 07-06-15 om 18:48 schreef Michal Suchanek: Hello, On 5 June 2015 at 13:52, Roy Spliet r.spl...@ultimaker.com wrote: Based on the default layout

Re: [linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions

2015-06-08 Thread Roy Spliet
Hello Michal, Op 07-06-15 om 18:48 schreef Michal Suchanek: Hello, On 5 June 2015 at 13:52, Roy Spliet r.spl...@ultimaker.com wrote: Based on the default layout of the android image used at least on Olimex Lime Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- include/configs/sunxi

Re: [linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions

2015-06-08 Thread Roy Spliet
Hello Hans, Op 08-06-15 om 15:16 schreef Hans de Goede: Hi Roy, On 08-06-15 10:38, Roy Spliet wrote: Hello Michal, Op 07-06-15 om 18:48 schreef Michal Suchanek: Hello, On 5 June 2015 at 13:52, Roy Spliet r.spl...@ultimaker.com wrote: Based on the default layout of the android image used

Re: [linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions

2015-06-08 Thread Roy Spliet
this approach over now first hacking up all sorts of new commands in U-boot, as the latter will create more problems with syncing up MTD and doing the right thing on the longer run. Yours, Roy On 8 Jun 2015, at 7:11 pm, Roy Spliet r.spl...@ultimaker.com wrote: Dear Michal, Op 08-06-15 om 10:54

[linux-sunxi] [RFC 07/11] mtd/nand Add Sunxi NAND driver

2015-06-05 Thread Roy Spliet
/arm/include/asm/arch-sunxi/nand.h +++ b/arch/arm/include/asm/arch-sunxi/nand.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2015 Roy Spliet rspl...@ultimaker.com + * (C) Copyright 2015 Roy Spliet r.spl...@ultimaker.com * * SPDX-License-Identifier:GPL-2.0+ */ @@ -27,8 +27,7 @@ struct sunxi_nand

[linux-sunxi] [RFC 10/11] mtd/nand: Define bootcmd for nand

2015-06-05 Thread Roy Spliet
Assumes a UBI partition called boot Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- include/config_distro_bootcmd.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 3a360ca4..361b914

[linux-sunxi] [RFC 03/11] mtd/nand: support ONFI timing mode retrieval for non-ONFI

2015-06-05 Thread Roy Spliet
From: yassin yassinjaf...@gmail.com Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- drivers/mtd/nand/nand_base.c | 1 + include/linux/mtd/nand.h | 7 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index c0e381a..dbeb092

[linux-sunxi] [RFC 08/11] mtd/nand: Add DT definitions for Olimex Lime

2015-06-05 Thread Roy Spliet
Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- arch/arm/dts/sun7i-a20-olinuxino-lime.dts | 41 ++ arch/arm/dts/sun7i-a20.dtsi | 90 +++ 2 files changed, 131 insertions(+) diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts b/arch

[linux-sunxi] [RFC] Sunxi NAND support for U-Boot

2015-06-05 Thread Roy Spliet
Following up on earlier SPL patches, here a series based on Yassin Jaffer's work to bring NAND support to U-boot. RFC because I know that the sunxi nand configuration options are dependent on a work-in-progress by Daniel - trying to deliver a single SPL for both MMC and NAND boot. Given I have

[linux-sunxi] [RFC 04/11] mtd/nand: add page status table (pst)

2015-06-05 Thread Roy Spliet
From: yassin yassinjaf...@gmail.com Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- drivers/mtd/nand/nand_base.c | 154 +++ include/linux/mtd/nand.h | 21 ++ 2 files changed, 175 insertions(+) diff --git a/drivers/mtd/nand/nand_base.c b

[linux-sunxi] [RFC 05/11] mtd/nand: take nand_ecc_ctrl initialization out of nand_scan_tail

2015-06-05 Thread Roy Spliet
From: yassin yassinjaf...@gmail.com Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- drivers/mtd/nand/nand_base.c | 101 ++- 1 file changed, 61 insertions(+), 40 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c

[linux-sunxi] [RFC 02/11] mtd/nand: add ONFI timing mode to nand_timings converter

2015-06-05 Thread Roy Spliet
From: yassin yassinjaf...@gmail.com Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- drivers/mtd/nand/Makefile | 2 +- drivers/mtd/nand/nand_timings.c | 252 include/linux/mtd/nand.h| 3 + 3 files changed, 256 insertions(+), 1

[linux-sunxi] [RFC 09/11] sunxi/nand: Enable UBI and NAND commands

2015-06-05 Thread Roy Spliet
Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- board/sunxi/Kconfig| 8 +++- drivers/mtd/Makefile | 1 + include/configs/sunxi-common.h | 33 + 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/board/sunxi/Kconfig b

[linux-sunxi] [RFC 06/11] mtd/nand: Add randomisation layer

2015-06-05 Thread Roy Spliet
Based on BBrezillons work, minus per-partition support. Changes to support that would be quite invasive while it hasn't been solved yet for Linux. Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- drivers/mtd/nand/nand_base.c | 255 ++- include/linux

[linux-sunxi] [RFC 01/11] mtd/nand: define struct nand_timings

2015-06-05 Thread Roy Spliet
From: yassin yassinjaf...@gmail.com Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- include/linux/mtd/nand.h | 49 1 file changed, 49 insertions(+) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index bc927ec..b026110

[linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions

2015-06-05 Thread Roy Spliet
Based on the default layout of the android image used at least on Olimex Lime Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- include/configs/sunxi-common.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index

[linux-sunxi] Re: Proposal to add NAND-boot support for Sunxi SPL

2015-05-26 Thread Roy Spliet
Hello Hans, Re-sent to everybody instead of just you. Reply inline. Op 25-05-15 om 22:39 schreef Hans de Goede: Hi, On 25-05-15 20:35, Hans de Goede wrote: Hi, On 22-05-15 09:04, Roy Spliet wrote: Hello, For my set-up I made use of Boris Brezillon's sunxi-nand tree[1], or actually I

[linux-sunxi] [PATCH V4 1/4] sunxi/nand: change BLOCK_SIZE in mksunxiboot to match NAND block size

2015-05-26 Thread Roy Spliet
Signed-off-by: Daniel Kochmański dkochman...@turtle-solutions.eu Signed-off-by: Roy Spliet r.spl...@ultimaker.com Cc: Ian Campbell i...@hellion.org.uk Cc: Hans De Goede hdego...@redhat.com Reviewed-by: Hans de Goede hdego...@redhat.com --- tools/mksunxiboot.c | 8 +++- 1 file changed, 7

[linux-sunxi] [PATCH V4 4/4] sunxi/nand: Add support for booting from internal NAND memory

2015-05-26 Thread Roy Spliet
options semi-configurable V3: - Use proper structs and definitions for DMA and NAND - Fix bug wrt. page size selection - Add time-out to waits V4: - nand_init(): enable DMA Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- arch/arm/cpu/armv7/sunxi/board.c | 12 +- arch/arm/include/asm

[linux-sunxi] [PATCH V4 2/4] sunxi: Add DMA definitions

2015-05-26 Thread Roy Spliet
Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- arch/arm/include/asm/arch-sunxi/dma.h | 16 +++ arch/arm/include/asm/arch-sunxi/dma_sun4i.h | 68 + 2 files changed, 84 insertions(+) create mode 100644 arch/arm/include/asm/arch-sunxi/dma.h create mode

[linux-sunxi] [PATCH V4] Add Sunxi NAND support to SPL

2015-05-26 Thread Roy Spliet
V4 slightly clarifies the gating code and is a bit more precise with definitions for other boards. As far as I'm concerned they can be merged now. Happy testing, Roy -- IMAGINE IT MAKE IT Meet us online at Twitter http://twitter.com/ultimaker, Facebook http://facebook.com/ultimaker,

[linux-sunxi] [PATCH V4 3/4] sunxi: Match sun4i, sun6i, sun9i CCI definitions for NAND and DMA

2015-05-26 Thread Roy Spliet
V4: - Match clock_sun9i too - Make sure definitions for DMA gate bits are available across boards Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 4 ++-- arch/arm/include/asm/arch-sunxi/clock_sun6i.h | 3 +++ arch/arm/include/asm/arch-sunxi

[linux-sunxi] Re: Proposal to add NAND-boot support for Sunxi SPL

2015-05-22 Thread Roy Spliet
file for the olinuxio and need to convert to dts, correct? I am happy about any hints / comments. Thanks Alex On Thursday, May 21, 2015 at 11:08:24 AM UTC-7, Hans de Goede wrote: Hi Roy, On 21-05-15 15:59, Roy Spliet wrote: The following patches take the work by Daniel

[linux-sunxi] Re: Proposal to add NAND-boot support for Sunxi SPL

2015-05-22 Thread Roy Spliet
Hello Hans, Sorry for ignoring the second half of your question so far. Here's what's on my mind. Op 21-05-15 om 20:08 schreef Hans de Goede: Hi Roy, 2) What is the plan to add support for loading files from nand in u-boot proper, so that we can get (e.g.) extlinux.conf + kernel +dtb from a

[linux-sunxi] [v3 (RFC)] Proposal to add NAND-boot support for Sunxi SPL

2015-05-22 Thread Roy Spliet
Hereby a v3 of the patches adding NAND support to SPL. Most noticably all the feedback has been addressed: tidy structs for NAND and DMA, timeouts on wait operations and more proper use of the CCU. Patches are marked RFC mostly because I'm still contemplating the implementation of a proper full

[linux-sunxi] [PATCH v3 (RFC) 3/4] sunxi: Match sun4i nand clock name with sun6i

2015-05-22 Thread Roy Spliet
Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h index c28ee05..fe3e92f 100644

[linux-sunxi] [PATCH v3 (RFC) 1/4] sunxi/nand: change BLOCK_SIZE in mksunxiboot to match NAND block size

2015-05-22 Thread Roy Spliet
Signed-off-by: Daniel Kochmański dkochman...@turtle-solutions.eu Signed-off-by: Roy Spliet r.spl...@ultimaker.com Cc: Ian Campbell i...@hellion.org.uk Cc: Hans De Goede hdego...@redhat.com Reviewed-by: Hans de Goede hdego...@redhat.com --- tools/mksunxiboot.c | 8 +++- 1 file changed, 7

[linux-sunxi] [PATCH v3 (RFC) 4/4] sunxi/nand: Add support for booting from internal NAND memory

2015-05-22 Thread Roy Spliet
options semi-configurable V3: - Use proper structs and definitions for DMA and NAND - Fix bug wrt. page size selection - Add time-out to waits Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- arch/arm/cpu/armv7/sunxi/board.c | 12 +- arch/arm/include/asm/arch-sunxi/gpio.h | 2 + arch

[linux-sunxi] [PATCH v3 (RFC) 2/4] sunxi: Add DMA definitions

2015-05-22 Thread Roy Spliet
Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- arch/arm/include/asm/arch-sunxi/dma.h | 16 +++ arch/arm/include/asm/arch-sunxi/dma_sun4i.h | 68 + 2 files changed, 84 insertions(+) create mode 100644 arch/arm/include/asm/arch-sunxi/dma.h create mode

[linux-sunxi] [PATCH 2/2] nand: sunxi: Add support for booting from internal NAND memory

2015-05-21 Thread Roy Spliet
options semi-configurable Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- arch/arm/cpu/armv7/sunxi/board.c | 12 +- arch/arm/include/asm/arch-sunxi/gpio.h | 2 + board/sunxi/Kconfig| 12 ++ board/sunxi/board.c| 27 +++ drivers/mtd/nand

[linux-sunxi] [PATCH 1/2] nand: sunxi: change BLOCK_SIZE in mksunxiboot to match NAND block size

2015-05-21 Thread Roy Spliet
Signed-off-by: Daniel Kochmański dkochman...@turtle-solutions.eu Cc: Ian Campbell i...@hellion.org.uk Cc: Hans De Goede hdego...@redhat.com Signed-off-by: Roy Spliet r.spl...@ultimaker.com --- tools/mksunxiboot.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools

[linux-sunxi] Proposal to add NAND-boot support for Sunxi SPL

2015-05-21 Thread Roy Spliet
The following patches take the work by Daniel Kochmánski, and make some heavy modifications for readability and functionality, based on Boris Brezillon's Linux driver. Tested on an Olimex Lime w/ A20. Patches are sent as RFC. Open questions: - Config options added are partially NAND-chip specific.