<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/spi, branch v2022.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>spi: dw: Actually mask interrupts</title>
<updated>2022-03-15T09:43:11+00:00</updated>
<author>
<name>Sean Anderson</name>
<email>seanga2@gmail.com</email>
</author>
<published>2022-03-01T10:35:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bae4d9fbd97623ccb96ad634128d1aa98faa30f2'/>
<id>bae4d9fbd97623ccb96ad634128d1aa98faa30f2</id>
<content type='text'>
The designware spi driver unconditionally uses polling.

The comment to spi_hw_init() also states that the function should disable
interrupts.

According to the DesignWare DW_apb_ssi Databook, value 0xff in IMR enables
all interrupts. Since we want to mask all interrupts write 0x0 instead.

On the canaan k210 board, pressing the reset button twice to reset the
board will run u-boot. If u-boot boots Linux without having SPI interrupts
masked, Linux will hang as soon as interrupts are enabled, because of an
interrupt storm.

Properly masking the SPI interrupts in u-boot allows us to successfully
boot Linux, even after resetting the board.

Fixes: 5bef6fd79f94 ("spi: Add designware master SPI DM driver used on SoCFPGA")
Signed-off-by: Sean Anderson &lt;seanga2@gmail.com&gt;
[Niklas: rewrite commit message]
Signed-off-by: Niklas Cassel &lt;niklas.cassel@wdc.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The designware spi driver unconditionally uses polling.

The comment to spi_hw_init() also states that the function should disable
interrupts.

According to the DesignWare DW_apb_ssi Databook, value 0xff in IMR enables
all interrupts. Since we want to mask all interrupts write 0x0 instead.

On the canaan k210 board, pressing the reset button twice to reset the
board will run u-boot. If u-boot boots Linux without having SPI interrupts
masked, Linux will hang as soon as interrupts are enabled, because of an
interrupt storm.

Properly masking the SPI interrupts in u-boot allows us to successfully
boot Linux, even after resetting the board.

Fixes: 5bef6fd79f94 ("spi: Add designware master SPI DM driver used on SoCFPGA")
Signed-off-by: Sean Anderson &lt;seanga2@gmail.com&gt;
[Niklas: rewrite commit message]
Signed-off-by: Niklas Cassel &lt;niklas.cassel@wdc.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: dw: Force set K210 fifo length to 31</title>
<updated>2022-03-15T09:43:11+00:00</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@opensource.wdc.com</email>
</author>
<published>2022-03-01T10:35:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=40b6435a62befe3e487b6ea0ff69a0206a907b0b'/>
<id>40b6435a62befe3e487b6ea0ff69a0206a907b0b</id>
<content type='text'>
The Canaan Kendryte K210 SoC DW apb_ssi v4 spi controller is documented
to have a 32 word deep TX and RX FIFO, which spi_hw_init() detects.
However, when the RX FIFO is filled up to 32 entries (RXFLR = 32), an
RX FIFO overrun error occurs. Avoid this problem by force setting
fifo_len to 31.

Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Niklas Cassel &lt;niklas.cassel@wdc.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Canaan Kendryte K210 SoC DW apb_ssi v4 spi controller is documented
to have a 32 word deep TX and RX FIFO, which spi_hw_init() detects.
However, when the RX FIFO is filled up to 32 entries (RXFLR = 32), an
RX FIFO overrun error occurs. Avoid this problem by force setting
fifo_len to 31.

Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Niklas Cassel &lt;niklas.cassel@wdc.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>k210: use the board vendor name rather than the marketing name</title>
<updated>2022-03-15T09:43:11+00:00</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@opensource.wdc.com</email>
</author>
<published>2022-03-01T10:35:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fd426b31066ba61ee1ff96a2b56c919251ffdd9e'/>
<id>fd426b31066ba61ee1ff96a2b56c919251ffdd9e</id>
<content type='text'>
"kendryte" is the marketing name for the K210 RISC-V SoC produced by
Canaan Inc. Rather than "kendryte,k210", use the usual "canaan,k210"
vendor,SoC compatibility string format in the device tree files and
use the SoC name for file names.
With these changes, the device tree files are more in sync with the
Linux kernel DTS and drivers, making uboot device tree usable by the
kernel.

Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Niklas Cassel &lt;niklas.cassel@wdc.com&gt;
Reviewed-by: Leo Yu-Chi Liang &lt;ycliang@andestech.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"kendryte" is the marketing name for the K210 RISC-V SoC produced by
Canaan Inc. Rather than "kendryte,k210", use the usual "canaan,k210"
vendor,SoC compatibility string format in the device tree files and
use the SoC name for file names.
With these changes, the device tree files are more in sync with the
Linux kernel DTS and drivers, making uboot device tree usable by the
kernel.

Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Niklas Cassel &lt;niklas.cassel@wdc.com&gt;
Reviewed-by: Leo Yu-Chi Liang &lt;ycliang@andestech.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>driver: spi: add bcm iproc qspi support</title>
<updated>2022-02-24T08:12:50+00:00</updated>
<author>
<name>Rayagonda Kokatanur</name>
<email>rayagonda.kokatanur@broadcom.com</email>
</author>
<published>2022-02-09T22:16:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2ba1bd1e11fc46dc7098e274d1c3c3ea64e7c70c'/>
<id>2ba1bd1e11fc46dc7098e274d1c3c3ea64e7c70c</id>
<content type='text'>
IPROC qspi driver supports both BSPI and MSPI modes.

Signed-off-by: Rayagonda Kokatanur &lt;rayagonda.kokatanur@broadcom.com&gt;
Signed-off-by: Bharat Gooty &lt;bharat.gooty@broadcom.com&gt;
Acked-by: Rayagonda Kokatanur &lt;rayagonda.kokatanur@broadcom.com&gt;

Signed-off-by: Roman Bacik &lt;roman.bacik@broadcom.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IPROC qspi driver supports both BSPI and MSPI modes.

Signed-off-by: Rayagonda Kokatanur &lt;rayagonda.kokatanur@broadcom.com&gt;
Signed-off-by: Bharat Gooty &lt;bharat.gooty@broadcom.com&gt;
Acked-by: Rayagonda Kokatanur &lt;rayagonda.kokatanur@broadcom.com&gt;

Signed-off-by: Roman Bacik &lt;roman.bacik@broadcom.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: dw: Fix broken dw_spi_mem_ops()</title>
<updated>2022-02-24T08:10:49+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@wdc.com</email>
</author>
<published>2022-02-08T22:52:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d56dfc90c7bb2f29a38a98fc2e170ebba6fc6a40'/>
<id>d56dfc90c7bb2f29a38a98fc2e170ebba6fc6a40</id>
<content type='text'>
The driver is currently using sizeof(op-&gt;cmd.opcode) in the op_len
calculation. Commit d15de623013c ("spi: spi-mem: allow specifying a
command's extension") changed op-&gt;cmd.opcode from one byte to two.

Instead, a new struct member op-&gt;cmd.nbytes is supposed to be used.
For regular commands op-&gt;cmd.nbytes will be one.

Commit d15de623013c ("spi: spi-mem: allow specifying a command's
extension") did update some drivers that overload the generic mem_ops()
implementation, but forgot to update dw_spi_mem_ops().

Calculating op_len incorrectly causes dw_spi_mem_ops() to misbehave, since
op_len is used to determine how many bytes that should be read/written.

On the canaan k210 board, this causes the probe of the SPI flash to fail.

Fix the op_len calculation in dw_spi_mem_ops(). Doing so results in
working SPI flash on the canaan k210 board.

Fixes: d15de623013c ("spi: spi-mem: allow specifying a command's extension")
Signed-off-by: Niklas Cassel &lt;niklas.cassel@wdc.com&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Tested-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver is currently using sizeof(op-&gt;cmd.opcode) in the op_len
calculation. Commit d15de623013c ("spi: spi-mem: allow specifying a
command's extension") changed op-&gt;cmd.opcode from one byte to two.

Instead, a new struct member op-&gt;cmd.nbytes is supposed to be used.
For regular commands op-&gt;cmd.nbytes will be one.

Commit d15de623013c ("spi: spi-mem: allow specifying a command's
extension") did update some drivers that overload the generic mem_ops()
implementation, but forgot to update dw_spi_mem_ops().

Calculating op_len incorrectly causes dw_spi_mem_ops() to misbehave, since
op_len is used to determine how many bytes that should be read/written.

On the canaan k210 board, this causes the probe of the SPI flash to fail.

Fix the op_len calculation in dw_spi_mem_ops(). Doing so results in
working SPI flash on the canaan k210 board.

Fixes: d15de623013c ("spi: spi-mem: allow specifying a command's extension")
Signed-off-by: Niklas Cassel &lt;niklas.cassel@wdc.com&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Tested-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: cadence-qspi: Make reset control optional</title>
<updated>2022-02-24T08:08:25+00:00</updated>
<author>
<name>Christian Gmeiner</name>
<email>christian.gmeiner@gmail.com</email>
</author>
<published>2022-02-22T16:23:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e145606ff29364e948c05d492732f623674d6010'/>
<id>e145606ff29364e948c05d492732f623674d6010</id>
<content type='text'>
In the TI am65 device tree files there is no reset defined. Also
the Linux kernel driver uses devm_reset_control_get_optional_exclusive(..)
to get the reset.

Lets do the same as the kernel does and make thr reset optinal.

Signed-off-by: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the TI am65 device tree files there is no reset defined. Also
the Linux kernel driver uses devm_reset_control_get_optional_exclusive(..)
to get the reset.

Lets do the same as the kernel does and make thr reset optinal.

Signed-off-by: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'xilinx-for-v2022.04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze</title>
<updated>2022-02-21T13:32:02+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2022-02-21T13:32:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=24b628a8f844868adca897aae40af6f98cdbc26d'/>
<id>24b628a8f844868adca897aae40af6f98cdbc26d</id>
<content type='text'>
Xilinx changes for v2022.04-rc3

microblaze:
- Fix exception handler

zynqmp:
- Show information about secure images
- DT changes (som u-boot file removal)
- Fix zynqmp_pm_cfg_obj_convert.py
- Fix platform boot

xilinx:
- Fix bootm_size calculation
- Remove GPIO_EXTRA_HEADER selection

power:
- Add zynqmp power management driver

scsi:
- Add phy support to ceva driver

zynq qspi:
- Fix unaligned accesses and check baudrate setup
- Add support for spi memory operations

net:
- Fix 64bit calculation in axi_emac

video:
- Add missing gpio dependency for seps driver
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Xilinx changes for v2022.04-rc3

microblaze:
- Fix exception handler

zynqmp:
- Show information about secure images
- DT changes (som u-boot file removal)
- Fix zynqmp_pm_cfg_obj_convert.py
- Fix platform boot

xilinx:
- Fix bootm_size calculation
- Remove GPIO_EXTRA_HEADER selection

power:
- Add zynqmp power management driver

scsi:
- Add phy support to ceva driver

zynq qspi:
- Fix unaligned accesses and check baudrate setup
- Add support for spi memory operations

net:
- Fix 64bit calculation in axi_emac

video:
- Add missing gpio dependency for seps driver
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: apple: Add driver for Apple SPI controller</title>
<updated>2022-02-10T21:44:23+00:00</updated>
<author>
<name>Mark Kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2022-01-23T15:48:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7184e2997e7d97ba3e697a0acc1800ddd89d3f6d'/>
<id>7184e2997e7d97ba3e697a0acc1800ddd89d3f6d</id>
<content type='text'>
Add a driver for the SPI controller integrated on Apple SoCs.
This is necessary to support the keyboard on Apple Silicon laopts
since their keyboard uses an Apple-specific HID over SPI protocol.

Signed-off-by: Mark Kettenis &lt;kettenis@openbsd.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested on: Macbook Air M1
Tested-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a driver for the SPI controller integrated on Apple SoCs.
This is necessary to support the keyboard on Apple Silicon laopts
since their keyboard uses an Apple-specific HID over SPI protocol.

Signed-off-by: Mark Kettenis &lt;kettenis@openbsd.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested on: Macbook Air M1
Tested-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: mxc_spi: remove redundant code in spi_xchg_single()</title>
<updated>2022-02-05T12:38:39+00:00</updated>
<author>
<name>Haolin Li</name>
<email>li.haolin@qq.com</email>
</author>
<published>2021-11-06T10:03:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6f753d8cea77e1c3bda84237be786118d0cc719d'/>
<id>6f753d8cea77e1c3bda84237be786118d0cc719d</id>
<content type='text'>
The value of cnt is overwritten without being used.

Signed-off-by: Haolin Li &lt;li.haolin@qq.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The value of cnt is overwritten without being used.

Signed-off-by: Haolin Li &lt;li.haolin@qq.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: zynq_qspi: Add SPI memory operations to zynq qspi</title>
<updated>2022-02-04T12:20:32+00:00</updated>
<author>
<name>T Karthik Reddy</name>
<email>t.karthik.reddy@xilinx.com</email>
</author>
<published>2022-01-31T05:22:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bab0c02e3735c516405f83cf6d12df6c93cc933c'/>
<id>bab0c02e3735c516405f83cf6d12df6c93cc933c</id>
<content type='text'>
Spi memory operation interface is added to zynq qspi
driver to provide an high-level interface to execute
qspi controller specific memory operations by avoiding
spi_mem_exec_op() from spi-mem framework.

Signed-off-by: T Karthik Reddy &lt;t.karthik.reddy@xilinx.com&gt;
Signed-off-by: Ashok Reddy Soma &lt;ashok.reddy.soma@xilinx.com&gt;
Link: https://lore.kernel.org/r/20220131052240.23403-5-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Spi memory operation interface is added to zynq qspi
driver to provide an high-level interface to execute
qspi controller specific memory operations by avoiding
spi_mem_exec_op() from spi-mem framework.

Signed-off-by: T Karthik Reddy &lt;t.karthik.reddy@xilinx.com&gt;
Signed-off-by: Ashok Reddy Soma &lt;ashok.reddy.soma@xilinx.com&gt;
Link: https://lore.kernel.org/r/20220131052240.23403-5-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
