<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/spi, branch v2020.07-rc2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/drivers/spi?h=v2020.07-rc2</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/spi?h=v2020.07-rc2'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2020-05-10T20:00:49Z</updated>
<entry>
<title>spi: nxp-fspi: Use new readl_poll_sleep_timeout API</title>
<updated>2020-05-10T20:00:49Z</updated>
<author>
<name>Kuldeep Singh</name>
<email>kuldeep.singh@nxp.com</email>
</author>
<published>2020-04-27T07:08:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=28029c768c4761d10815f94cafbbdc86272f1d8d'/>
<id>urn:sha1:28029c768c4761d10815f94cafbbdc86272f1d8d</id>
<content type='text'>
Board gets reset when performing burst read/write operations. On the
other hand, no such behaviour is observed on small size operations.

In Linux, readl_poll_timeout API already adds delay of 1us which is
further skipped in U-boot. Hence, use new "readl_poll_sleep_timeout" API
which adds delay alongwith timeout functionality.

Signed-off-by: Kuldeep Singh &lt;kuldeep.singh@nxp.com&gt;
</content>
</entry>
<entry>
<title>spi: Zap lpc32xx_ssp driver-related code</title>
<updated>2020-05-10T20:00:49Z</updated>
<author>
<name>Jagan Teki</name>
<email>jagan@amarulasolutions.com</email>
</author>
<published>2020-05-01T16:34:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d0847ecc9f969e6ac089e505d5c1ddedddedfcd4'/>
<id>urn:sha1:d0847ecc9f969e6ac089e505d5c1ddedddedfcd4</id>
<content type='text'>
lpc32xx_ssp driver is deprecated, no active updates
and no board user, hence dropped the same.

Cc: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Cc: Albert ARIBAUD &lt;albert.aribaud@3adev.fr&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
</entry>
<entry>
<title>spi: sifive: Fix QPP transfer</title>
<updated>2020-04-30T17:04:20Z</updated>
<author>
<name>Jagan Teki</name>
<email>jagan@amarulasolutions.com</email>
</author>
<published>2020-04-23T17:00:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=25e4d94f45611bfc5f1ff71cf29a8d41bb6e9e9f'/>
<id>urn:sha1:25e4d94f45611bfc5f1ff71cf29a8d41bb6e9e9f</id>
<content type='text'>
The guessed reason is that the existing logic of filling
tx fifo with data, rx fifo with NULL for tx transfer and
filling rx fifo with data, tx fifo with NULL for rx transfer
is not clear enough to support the Quad Page Program.
   
SiFive SPI controllers have specific sets of watermark
registers and SPI I/O directions bits in order to program
SPI controllers clear enough to support all sets of operating
modes.
   
Here is the exact programing sequence that would follow on this
patch and tested via SPI-NOR and MMC_SPI.
   
- set the frame format proto, endian
- set the frame format dir, set it for tx and clear it for rx
- TX transfer:
  fill tx fifo with data.
  wait for TX watermark bit to clear.
- RX transfer:
  fill tx fifo with 0xff.
  write nbytes to rx watermark register
  wait for rx watermark bit to clear.
  read the rx fifo data.

So, this patch adopts this program sequence and fixes the existing
I/O direction bit.

Cc: Vignesh R &lt;vigneshr@ti.com&gt;
Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Tested-by: Sagar Kadam &lt;sagar.kadam@sifive.com&gt;
</content>
</entry>
<entry>
<title>spi: sifive: Fix format register proto field</title>
<updated>2020-04-30T17:04:20Z</updated>
<author>
<name>Jagan Teki</name>
<email>jagan@amarulasolutions.com</email>
</author>
<published>2020-04-23T17:00:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=622b913ea179645a37dc4fcb75cea6f54d3b505f'/>
<id>urn:sha1:622b913ea179645a37dc4fcb75cea6f54d3b505f</id>
<content type='text'>
SiFive SPI controller has a proto bit field in frame format
register which would be used to configure the SPI I/O protocol
lines used on specific transfer. 

Right now the driver is configuring this proto using slave-&gt;mode,
for all types of transctions. This makes the driver unable to
function since the proto needs to configure dynamically for
each and every transaction separately at runtime.

Now, the controller driver supports per transfer via spi-mem
exec_opo, so add the fmt_proto flag and fill the per transfer
buswidth so that the controller configures the proto bit at
runtime.

This patch fixes the SPI controller works with SPI NOR flash
on quad read with page program.

Cc: Vignesh R &lt;vigneshr@ti.com&gt;
Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Tested-by: Sagar Kadam &lt;sagar.kadam@sifive.com&gt;
</content>
</entry>
<entry>
<title>spi: sifive: Add spi-mem exec op</title>
<updated>2020-04-30T17:04:20Z</updated>
<author>
<name>Jagan Teki</name>
<email>jagan@amarulasolutions.com</email>
</author>
<published>2020-04-23T17:00:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b7d6e104fbfd54b7ffe9e0a00200e98dd2904a65'/>
<id>urn:sha1:b7d6e104fbfd54b7ffe9e0a00200e98dd2904a65</id>
<content type='text'>
SiFive SPI controller is responsible to handle the
slave devices like mmc spi and spi nor flash.

The controller is designed such a way that it would
handle the slave transactions based on the I/O protocol
numbers, example if spi nor slave send quad write opcode
it has to send alone with I/O protocol number of 4 and
if it try to send data it has to send I/O protocol number
along with 4 line data.

But the current spi-xfer code from spi-mem is combining
the opcode and address in a single transaction, so the
SPI controller will be unable to identify the I/O protocol
number of opcode vs address.

So, add the spi-mem exec_op with spi-xfer of opcode, address
and data as a separate transaction. This doesn't remove
the .xfer of dm_spi_ops since mmc spi will make use of it.

Note: This code might have moved to the spi-mem core area
once we have done the dedicated tests on other controllers
and have real reason to move.

Cc: Vignesh R &lt;vigneshr@ti.com&gt;
Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Tested-by: Sagar Kadam &lt;sagar.kadam@sifive.com&gt;
</content>
</entry>
<entry>
<title>spi: sifive: Tidy up dm_spi_slave_platdata variable</title>
<updated>2020-04-30T17:04:20Z</updated>
<author>
<name>Jagan Teki</name>
<email>jagan@amarulasolutions.com</email>
</author>
<published>2020-04-20T10:33:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e67cd814ee2d00e1b8651bc1cd889ac6f45ed26b'/>
<id>urn:sha1:e67cd814ee2d00e1b8651bc1cd889ac6f45ed26b</id>
<content type='text'>
Usually variable name slave is used for spi_slave structure
and slave_plat for the dm_spi_slave_platdata.

Let's follow this meaningful notation by replacing slave
with slave_plat for dm_spi_slave_platdata structure.

Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>spi: spi-mem: Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum</title>
<updated>2020-04-28T20:14:35Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2020-03-20T09:35:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=790c1699b2c0ca40809c43b3ddb9fc4a46939d18'/>
<id>urn:sha1:790c1699b2c0ca40809c43b3ddb9fc4a46939d18</id>
<content type='text'>
Commit: 0ebb261a0b2d ("spi: spi-mem: Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum")
in linux.

When defining spi_mem_op templates we don't necessarily know the size
that will be passed when the template is actually used, and basing the
supports_op() check on op-&gt;data.nbytes to know whether there will be
data transferred for a specific operation is not possible.

Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum so that we can base
our checks on op-&gt;data.dir instead of op-&gt;data.nbytes.

This also fixes a bug identified with the atmel-quaspi driver.
The spi-nor core, when erasing sectors, fills the spi_mem_op template
using SPI_MEM_OP_NO_DATA, which initializes all the data members with
value zero. This is wrong because data.dir is treated as SPI_MEM_DATA_IN,
which translates in our driver to read accesses for erases (RICR), while
the controller expects write accesses (WICR).

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
</entry>
<entry>
<title>spi: cadence-qspi: Move ref clock calculation to probe</title>
<updated>2020-04-28T20:14:35Z</updated>
<author>
<name>Pratyush Yadav</name>
<email>p.yadav@ti.com</email>
</author>
<published>2020-02-24T07:10:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0a9c2874978a8468c92ed0dafe7a0cf239dc6a35'/>
<id>urn:sha1:0a9c2874978a8468c92ed0dafe7a0cf239dc6a35</id>
<content type='text'>
"assigned-clock-parents" and "assigned-clock-rates" DT properties take
effect only after ofdata_to_platdata() when clk_set_defaults() is called
in device_probe(). Therefore clk get rate() would return a wrong value
in ofdata_to_platdata() when compared with probe. Hence it needs to be
moved to probe.

Tested on u-boot-ti/next.

Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Acked-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
Acked-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
</entry>
<entry>
<title>spi: Transform the FSL QuadSPI driver to use the SPI MEM API</title>
<updated>2020-04-28T20:14:35Z</updated>
<author>
<name>Kuldeep Singh</name>
<email>kuldeep.singh@nxp.com</email>
</author>
<published>2020-02-20T17:27:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=91afd36f3802aee001a2f551ea1d77aca428b0a9'/>
<id>urn:sha1:91afd36f3802aee001a2f551ea1d77aca428b0a9</id>
<content type='text'>
To support the SPI MEM API, instead of modifying the existing U-Boot
driver, this patch adds a port of the existing Linux driver.
This also has the advantage that porting changes and fixes from Linux will
be easier.
Porting of driver left most of the functions unchanged while few of the
changes are:
-Remove lock(mutexes) and irq handler as u-boot is a single core execution.
-Remove invalid masterid as it was required specially for multicore
execution in LS2088ARDB which is not the case in u-boot.
-Remove clock support as changing spi speed is not supported in uboot and
nor in linux.

Currently tested on LS1088ARDB, LS1012ARDB, LS1046ARDB, LS1046AFRWY,
LS1043AQDS, LS1021ATWR, LS2088ARDB, I.MX6ULL EVK.

Signed-off-by: Frieder Schrempf &lt;frieder.schrempf@kontron.de&gt;
Signed-off-by: Ashish Kumar &lt;Ashish.Kumar@nxp.com&gt;
Signed-off-by: Kuldeep Singh &lt;kuldeep.singh@nxp.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Tested-by: Stefan Roese &lt;sr@denx.de&gt;
Acked-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
Acked-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
</entry>
<entry>
<title>spi: mpc8xxx_spi: fix missing dev_err definition</title>
<updated>2020-04-24T20:40:09Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2020-04-20T14:13:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cffedec2e8f7f11fbe31f4706a222d279cf19c1d'/>
<id>urn:sha1:cffedec2e8f7f11fbe31f4706a222d279cf19c1d</id>
<content type='text'>
The build currently fails with

drivers/spi/mpc8xxx_spi.c:64:3: warning: implicit declaration of function ‘dev_err’ [-Wimplicit-function-declaration]
...
drivers/spi/built-in.o: In function `mpc8xxx_spi_set_speed':
drivers/spi/mpc8xxx_spi.c:227: undefined reference to `dev_err'

Fixes: 4856cc7a97 (mpc8xxx_spi: implement real -&gt;set_speed)
Fixes: 1a7b462dee (mpc8xxx_spi: put max_cs to use)
Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
</content>
</entry>
</feed>
