From mboxrd@z Thu Jan 1 00:00:00 1970 From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia) Date: Mon, 23 Dec 2013 13:48:27 -0300 Subject: [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug In-Reply-To: References: <1387813346-16741-1-git-send-email-maxime.hadjinlian@gmail.com> <1387813346-16741-2-git-send-email-maxime.hadjinlian@gmail.com> Message-ID: <20131223164826.GA6535@localhost> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Maxime, On Mon, Dec 23, 2013 at 04:47:34PM +0100, Maxime Hadjinlian wrote: > I have a slight issue which I could not resolve regarding the Hynix > NAND on this platform. Although it worked perfectly well with 3.12, > the device is not detected anymore with the current head of master. > If you do a "git log v3.12..v3.13-rc4 -- drivers/mtd/nand/orion_nand.c" you'll see that no changes have been made. So maybe this new dts v2 is the problem. And if you look in detail you'll find you've been bitten by the subtleties of the devicetree! See below... > > + mbus { > > + ranges = ; > > + pcie-controller { > > + status = "okay"; > > + pcie at 1,0 { > > + status = "okay"; > > + }; > > + }; > > + }; ^^^^ Here's the problem: there's two wrong things with the above: 1. You can't do this... a ranges properties doesn't add on the included (dtsi) ranges properties. Instead it replaces the included one, so you have to write the entries all over again. Yes, we know: it sucks! And given we know it sucks, there was a nice message warning you about this. From the kirkwood.dtsi /* If a board file needs to change this ranges it must replace it completely */ ranges = ; 2. Looking in yet more detail, you're re-adding the internal-regs window. I guess it's just a typo, no? Anyway, I *think* that's what prevented you from getting the NAND to work. The correct mbus node should be: mbus { pcie-controller { status = "okay"; pcie at 1,0 { status = "okay"; }; }; }; > > +&nand { > > + /* Total size : 512MB */ > > + status = "okay"; > > + And here: don't you need to add the pinmuxing? Maybe you don't need it, but I guess it's the right thing to do. I hope this helps! Merry Christmas... -- Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com