From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregory CLEMENT Subject: Re: [PATCH] arm: mvebu: Add SPI flash on Armada XP-GP board Date: Tue, 05 Feb 2013 21:17:02 +0100 Message-ID: <511168BE.1000803@free-electrons.com> References: <1360063473-26176-1-git-send-email-ezequiel.garcia@free-electrons.com> <5111331F.7090900@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Thomas Petazzoni , Andrew Lunn , Jason Cooper , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Lior Amsalem , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Florian Fainelli , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Ezequiel Garcia Return-path: In-Reply-To: <5111331F.7090900-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On 02/05/2013 05:28 PM, Gregory CLEMENT wrote: > Hi Ezequiel, > > On 02/05/2013 12:24 PM, Ezequiel Garcia wrote: >> This patch adds an SPI master device node for Armada XP-GP board. >> This master node is an SPI flash controller 'n25q128a13'. >> >> Since there is no 'partitions' node declared, one full sized >> partition named as the device will be created. >> >> Cc: Gregory Clement >> Cc: Thomas Petazzoni >> Cc: Lior Amsalem >> Signed-off-by: Ezequiel Garcia >> --- >> This patch depends on: >> >> 1. Gregory's patch for Armada XP GP board: >> arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP) >> >> 2. My previous patch for SPI on Armada 370/XP: >> arm: mvebu: Add support for SPI controller in Armada 370/XP >> >> And don't forget to compile the SPI flash driver, CONFIG_MTD_M25P80=y >> >> arch/arm/boot/dts/armada-xp-gp.dts | 12 ++++++++++++ >> 1 files changed, 12 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts >> index 3eea531..1c8afe2 100644 >> --- a/arch/arm/boot/dts/armada-xp-gp.dts >> +++ b/arch/arm/boot/dts/armada-xp-gp.dts >> @@ -97,5 +97,17 @@ >> phy = <&phy3>; >> phy-mode = "rgmii-id"; >> }; >> + >> + spi0: spi@d0010600 { >> + status = "okay"; >> + >> + spi-flash@0 { >> + #address-cells = <1>; >> + #size-cells = <1>; >> + compatible = "n25q128a13"; >> + reg = <0>; /* Chip select 0 */ >> + spi-max-frequency = <108000000>; I had a remark about it, according to the datasheet, 108MHz is the maximum frequency for the all the instructions but the READ instruction. For the READ the maximum frequency is 54MHz. So I wonder if we shouldn't use 54000000 here. >> + }; >> + }; >> }; >> }; >> > > I applied, compiled and try this patch it worked well, at least > for reading, I didn't try to write on the flash where my boolader > is stored. So you can add my: > > Tested-by: Gregory Clement > > -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregory.clement@free-electrons.com (Gregory CLEMENT) Date: Tue, 05 Feb 2013 21:17:02 +0100 Subject: [PATCH] arm: mvebu: Add SPI flash on Armada XP-GP board In-Reply-To: <5111331F.7090900@free-electrons.com> References: <1360063473-26176-1-git-send-email-ezequiel.garcia@free-electrons.com> <5111331F.7090900@free-electrons.com> Message-ID: <511168BE.1000803@free-electrons.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 02/05/2013 05:28 PM, Gregory CLEMENT wrote: > Hi Ezequiel, > > On 02/05/2013 12:24 PM, Ezequiel Garcia wrote: >> This patch adds an SPI master device node for Armada XP-GP board. >> This master node is an SPI flash controller 'n25q128a13'. >> >> Since there is no 'partitions' node declared, one full sized >> partition named as the device will be created. >> >> Cc: Gregory Clement >> Cc: Thomas Petazzoni >> Cc: Lior Amsalem >> Signed-off-by: Ezequiel Garcia >> --- >> This patch depends on: >> >> 1. Gregory's patch for Armada XP GP board: >> arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP) >> >> 2. My previous patch for SPI on Armada 370/XP: >> arm: mvebu: Add support for SPI controller in Armada 370/XP >> >> And don't forget to compile the SPI flash driver, CONFIG_MTD_M25P80=y >> >> arch/arm/boot/dts/armada-xp-gp.dts | 12 ++++++++++++ >> 1 files changed, 12 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts >> index 3eea531..1c8afe2 100644 >> --- a/arch/arm/boot/dts/armada-xp-gp.dts >> +++ b/arch/arm/boot/dts/armada-xp-gp.dts >> @@ -97,5 +97,17 @@ >> phy = <&phy3>; >> phy-mode = "rgmii-id"; >> }; >> + >> + spi0: spi at d0010600 { >> + status = "okay"; >> + >> + spi-flash at 0 { >> + #address-cells = <1>; >> + #size-cells = <1>; >> + compatible = "n25q128a13"; >> + reg = <0>; /* Chip select 0 */ >> + spi-max-frequency = <108000000>; I had a remark about it, according to the datasheet, 108MHz is the maximum frequency for the all the instructions but the READ instruction. For the READ the maximum frequency is 54MHz. So I wonder if we shouldn't use 54000000 here. >> + }; >> + }; >> }; >> }; >> > > I applied, compiled and try this patch it worked well, at least > for reading, I didn't try to write on the flash where my boolader > is stored. So you can add my: > > Tested-by: Gregory Clement > > -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com