From patchwork Thu Feb 28 02:16:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 223761 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D8AD12C0082 for ; Thu, 28 Feb 2013 13:20:35 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UAt2s-0004RW-Kr; Thu, 28 Feb 2013 02:16:30 +0000 Received: from nasmtp01.atmel.com ([192.199.1.245] helo=DVREDG01.corp.atmel.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UAt2p-0004R9-QV for linux-arm-kernel@lists.infradead.org; Thu, 28 Feb 2013 02:16:28 +0000 Received: from apsmtp01.atmel.com (10.168.254.31) by DVREDG01.corp.atmel.com (10.42.103.30) with Microsoft SMTP Server (TLS) id 14.2.318.1; Wed, 27 Feb 2013 19:16:15 -0700 Received: from PENCHT02.corp.atmel.com (10.168.5.162) by apsmtp01.atmel.com (10.168.254.31) with Microsoft SMTP Server (TLS) id 14.2.318.1; Thu, 28 Feb 2013 10:24:15 +0800 Received: from PENMBX01.corp.atmel.com ([10.168.5.210]) by PENCHT02.corp.atmel.com ([fe80::7915:fc2e:c9a6:c45d%12]) with mapi id 14.02.0318.001; Thu, 28 Feb 2013 10:16:13 +0800 From: "Yang, Wenyou" To: Robert Nelson Subject: RE: [PATCH Resend v5 00/16] spi/spi-atmel: add dmaengine support for atmel spi controller and to test the device tree support Thread-Topic: [PATCH Resend v5 00/16] spi/spi-atmel: add dmaengine support for atmel spi controller and to test the device tree support Thread-Index: AQHOFIKSQATwHdRjbUCZ8MxVWUllyJiNdx+AgAEIBkA= Date: Thu, 28 Feb 2013 02:16:08 +0000 Message-ID: References: <1361925297-11854-1-git-send-email-wenyou.yang@atmel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.168.5.13] MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130227_211628_003781_CD44E84A X-CRM114-Status: GOOD ( 23.95 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: "richard.genoud@gmail.com" , "Lin, JM" , "Ferre, Nicolas" , "grant.likely@secretlab.ca" , "dgilbert@interlog.com" , "plagnioj@jcrosoft.com" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Hi, Robert, > -----Original Message----- > From: Robert Nelson [mailto:robertcnelson@gmail.com] > Sent: 2013年2月28日 1:52 > To: Yang, Wenyou > Cc: linux-arm-kernel@lists.infradead.org; richard.genoud@gmail.com; Lin, JM; > Ferre, Nicolas; grant.likely@secretlab.ca; plagnioj@jcrosoft.com; > dgilbert@interlog.com > Subject: Re: [PATCH Resend v5 00/16] spi/spi-atmel: add dmaengine support for > atmel spi controller and to test the device tree support > > On Tue, Feb 26, 2013 at 6:34 PM, Wenyou Yang > wrote: > > Hi All, > > > > This set of patches is to add dmaengine support for atmel spi and to test > device tree support. > > > > The work is based on Nicolas and Richard's work. > > > > Because the Atmel DMA device tree support hasn't on mainline, to > at91sam9x5ek and at91sam9n12ek > > with dma support, it doesn't work on the dmaengine mode, only on PIO mode > so far. > > > > It has been tested as below: > > 1./tested on v3.8, by using mtd utils, "mount", "umount" and "cp" > commands. > > 2./tested on "spi/next" git tree after removing commit "spi: make sure all > transfer has proper speed set". > > 3./tested by using Documentation/spi/spidev_test.c on "/dev/spidev". > > 4./tested on on at91sam9x5ek, at91sam9m10g45ek, at91sam9263ek and > at91sam9g20ek boards > > Hi Wenyou, > > Is this patchset missing another enablement patch? With v3.8.0 on the > at91sam9g35ek (device tree boot) I'm getting.. > > debian@arm:~$ dmesg | grep -i spi > [ 0.890625] atmel_spi f0000000.spi: version: 0x212 > [ 0.890625] atmel_spi f0000000.spi: DMA channel not available, > unable to use SPI > [ 0.898437] atmel_spi f0000000.spi: Atmel SPI Controller using PIO only > [ 0.906250] atmel_spi f0000000.spi: Atmel SPI Controller at > 0xf0000000 (irq 30) > [ 0.914062] atmel_spi f0000000.spi: master is unqueued, this is > deprecated > debian@arm:~$ ls /dev/spi* > ls: cannot access /dev/spi*: No such file or directory > > .config for reference, encase i missed something obvious: > https://github.com/RobertCNelson/armv5_devel/blob/v3.8.x-at91/patches/def > config > > CONFIG_SPI=y > # CONFIG_SPI_DEBUG is not set > CONFIG_SPI_MASTER=y > > CONFIG_SPI_ATMEL=y > > CONFIG_SPI_SPIDEV=y > > Regards, > > -- > Robert Nelson > http://www.rcn-ee.com/ Thanks a lot for your feedback. 1./ using the at25df32 dataflash on the board, based on at91_dt_defconfig default configuration, you need to add the below items: +CONFIG_MTD_M25P80=y +CONFIG_JFFS2_FS=y +CONFIG_AT_HDMAC=y After running in the board, you will get the following message in the starting: atmel_spi f0000000.spi: version: 0x212 atmel_spi f0000000.spi: DMA channel not available, unable to use SPI atmel_spi f0000000.spi: Atmel SPI Controller using PIO only atmel_spi f0000000.spi: Atmel SPI Controller at 0xf0000000 (irq 30) atmel_spi f0000000.spi: master is unqueued, this is deprecated m25p80 spi32766.0: at25df321a (4096 Kbytes) # cat /proc/mtd | grep spi mtd5: 00400000 00001000 "spi32766.0" # ls /dev/mtdblock* /dev/mtdblock0 /dev/mtdblock2 /dev/mtdblock4 /dev/mtdblock1 /dev/mtdblock3 /dev/mtdblock5 2./ using "spidev", based on at91_dt_defconfig default configuration, you need to add the below items: +CONFIG_SPI_SPIDEV=y And you need to change at91sam9x5ek.dtsi as below: After running in the board, you will get the following message : # ls /dev/spi* /dev/spidev32766.0 Best Regards, Wenyou Yang diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi index 09f5e66..4c48ba2 100644 --- a/arch/arm/boot/dts/at91sam9x5ek.dtsi +++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi @@ -89,7 +89,7 @@ status = "okay"; cs-gpios = <&pioA 14 0>, <0>, <0>, <0>; m25p80@0 { - compatible = "atmel,at25df321a"; + compatible = "spidev"; spi-max-frequency = <50000000>; reg = <0>; };