All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Mavrodiev <stefan@olimex.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/2] Enable test case with A20-OLinuXino-Lime2
Date: Fri, 22 Dec 2017 12:00:14 +0200	[thread overview]
Message-ID: <1513936814-22277-2-git-send-email-stefan@olimex.com> (raw)
In-Reply-To: <1513936814-22277-1-git-send-email-stefan@olimex.com>

Driver testing is done with A20-OLinuXino-Lime2. Testing
requirements are:
  - Exposing spi0 alternative pins in the dts file
  - Add alias node, enabling driver probing
  - Enable spi flash related options in the defconfig file

The testing log is:
  U-Boot SPL 2018.01-rc2-00023-gfa13cb3-dirty (Dec 22 2017 - 11:39:48)
  DRAM: 1024 MiB
  CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
  Trying to boot from sunxi SPI
  
  
  U-Boot 2018.01-rc2-00023-gfa13cb3-dirty (Dec 22 2017 - 11:39:48 +0200) Allwinner Technology
  
  CPU:   Allwinner A20 (SUN7I)
  Model: Olimex A20-OLinuXino-LIME2
  I2C:   ready
  DRAM:  1 GiB
  MMC:   SUNXI SD/MMC: 0
  MMC: no card present
  mmc_init: -123, time 1
  *** Warning - MMC init failed, using default environment
  
  In:    serial
  Out:   serial
  Err:   serial
  Allwinner mUSB OTG (Peripheral)
  SCSI:  SATA link 0 timeout.
  AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
  flags: ncq stag pm led clo only pmp pio slum part ccc apst 
  Net:   No ethernet found.
  starting USB...
  USB0:   USB EHCI 1.00
  USB1:   USB OHCI 1.0
  USB2:   USB EHCI 1.00
  USB3:   USB OHCI 1.0
  scanning bus 0 for devices... 1 USB Device(s) found
  scanning bus 2 for devices... 1 USB Device(s) found
         scanning usb for storage devices... 0 Storage Device(s) found
  Hit any key to stop autoboot:  0 
  => sspi
  
  => sf probe
  SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
  => sf test 0 100000
  SPI flash test:
  0 erase: 11407 ticks, 89 KiB/s 0.712 Mbps
  1 check: 8881 ticks, 115 KiB/s 0.920 Mbps
  2 write: 10824 ticks, 94 KiB/s 0.752 Mbps
  3 read: 8872 ticks, 115 KiB/s 0.920 Mbps
  Test passed
  0 erase: 11407 ticks, 89 KiB/s 0.712 Mbps
  1 check: 8881 ticks, 115 KiB/s 0.920 Mbps
  2 write: 10824 ticks, 94 KiB/s 0.752 Mbps
  3 read: 8872 ticks, 115 KiB/s 0.920 Mbps
  =>

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
---
 arch/arm/dts/sun7i-a20-olinuxino-lime2.dts | 21 +++++++++++++++++++++
 configs/A20-OLinuXino-Lime2_defconfig      |  8 ++++++++
 2 files changed, 29 insertions(+)

diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
index d5c796c..3c708da 100644
--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
@@ -54,6 +54,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		spi0 = &spi0;
 	};
 
 	chosen {
@@ -215,6 +216,20 @@
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
 
+	spi0_pins_b: spi0 at 1 {
+		allwinner,pins = "PC0", "PC1", "PC2";
+		allwinner,function = "spi0";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+
+	spi0_cs0_pins_b: spi0_cs0 at 1 {
+		allwinner,pins = "PC23";
+		allwinner,function = "spi0";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+
 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
 		allwinner,pins = "PH4";
 		allwinner,function = "gpio_in";
@@ -257,6 +272,12 @@
 	status = "okay";
 };
 
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins_b>, <&spi0_cs0_pins_b>;
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index 1edc844..c499e3d 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -30,3 +30,11 @@ CONFIG_SCSI=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_SPI=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SPL_SPI_SUNXI=y
+CONFIG_DM_SPI=y
+CONFIG_SUN4I_SPI=y
-- 
2.7.4

  reply	other threads:[~2017-12-22 10:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-22 10:00 [U-Boot] [PATCH v3 1/2] arm: sunxi: Allwinner A10 SPI driver Stefan Mavrodiev
2017-12-22 10:00 ` Stefan Mavrodiev [this message]
2017-12-26  9:47   ` [U-Boot] [PATCH v3 2/2] Enable test case with A20-OLinuXino-Lime2 Jagan Teki
2018-01-02 11:01     ` Stefan Mavrodiev
2018-01-11  6:08       ` Stefan Mavrodiev
2018-01-11  7:07         ` Jagan Teki
2018-01-22  8:36       ` Jagan Teki
2018-01-30  7:15         ` Stefan Mavrodiev
2018-02-01 14:38           ` Stefan Mavrodiev
2018-02-01 14:45             ` Jagan Teki
2018-02-06  8:01               ` Stefan Mavrodiev
2018-01-22  8:32 ` [U-Boot] [PATCH v3 1/2] arm: sunxi: Allwinner A10 SPI driver Jagan Teki

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=1513936814-22277-2-git-send-email-stefan@olimex.com \
    --to=stefan@olimex.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.