All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] socfpga qspi issues on SoCKit devkit
@ 2017-02-16 23:32 Rush, Jason A.
  2017-02-20  4:25 ` Vignesh R
  0 siblings, 1 reply; 7+ messages in thread
From: Rush, Jason A. @ 2017-02-16 23:32 UTC (permalink / raw)
  To: u-boot

The QSPI NOR interface on the Altera Cyclone V SoCKit devkit (Rev B) appears to be broken in the current release.  I've tracked it down to working in the v2016.07 release, but broken in the the v2016.09 release.  With the help of git bisect, I tracked down the commit that breaks the QSPI to the following:

  commit dac3bf20fb2c9b03476be0d73db620f62ab3cee1
  Author: Vignesh R <vigneshr@ti.com>
  Date:   Wed Jul 6 10:20:55 2016 +0530

      spi: cadence_qspi_apb: Support 32 bit AHB address

      AHB address can be as long as 32 bit, hence remove the
      CQSPI_REG_INDIRECTRDSTARTADDR mask. Since AHB address is passed from DT
      and read as u32 value, it anyway does not make sense to mask upper bits.

      Signed-off-by: Vignesh R <vigneshr@ti.com>
      Tested-by: Marek Vasut <marex@denx.de>
      Acked-by: Marek Vasut <marex@denx.de>
      Reviewed-by: Jagan Teki <jteki@openedev.com>

When I try and read anything from the QSPI on the dac3bf20fb2c9b03476be0d73db620f62ab3cee1 commit I get a "data abort" and the CPU resets.  Example output below is from a clean build of U-Boot configured with socfpga_sockit_defconfig:

 => sf probe
  SF: Detected N25Q1024 with page size 256 Bytes, erase size 64 KiB, total 128 MiB
  => sf read 0x2000000 0x50000 0x5000
  device 0 offset 0x50000, size 0x5000
  data abort
  pc : [<3ff7a9bc>]          lr : [<3ff98359>]
  reloc pc : [<010249fc>]    lr : [<01042399>]
  sp : 3bf4fde8  ip : 3ff7a371     fp : 00000002
  r10: 00000000  r9 : 3bf54ee8     r8 : 3bf55530
  r7 : 0000270d  r6 : 02000000     r5 : 00005000  r4 : 3bf55530
  r3 : 00000004  r2 : 00000000     r1 : 02000000  r0 : ffa00000
  Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
  Resetting CPU ...

When I run the same commands with the previous commit in the git log (fdf02a36c52cb96717b64113775c4251ecd49596) I get the following output:

  => sf probe
  SF: Detected N25Q1024 with page size 256 Bytes, erase size 64 KiB, total 128 MiB
  => sf read 0x2000000 0x50000 0x5000
  device 0 offset 0x50000, size 0x5000
  SF: 20480 bytes @ 0x50000 Read: OK
  =>

I've done some investigation, and previously the ahbbase was masked so the value 0xFFA0_0000 results in 0x0 when writing the CQSPI_REG_INDIRECTTRIGGER register.  I assume the above commit works on some boards, but it appears to break the socfpga arch.

Is there someone that could help investigate or confirm this?

Thanks,
Jason

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-21 19:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 23:32 [U-Boot] socfpga qspi issues on SoCKit devkit Rush, Jason A.
2017-02-20  4:25 ` Vignesh R
2017-02-20  7:36   ` Marek Vasut
2017-02-20 16:53     ` Rush, Jason A.
2017-02-20 22:39       ` Marek Vasut
2017-02-21 14:02         ` Rush, Jason A.
2017-02-21 19:29           ` Dinh Nguyen

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.