- 13 2月, 2019 5 次提交
-
-
由 Lanqing Liu 提交于
Add the DMA properties for the SPI dma mode. Signed-off-by: NLanqing Liu <lanqing.liu@unisoc.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Lanqing Liu 提交于
The SPI irq event will use to complete the SPI work in the SPI DMA mode, so this patch is a preparation for the following DMA mode support. Moreover the SPI interrupt can be fired when removing the SPI controller, so we should make sure the SPI controller has stopped the queue in remove function before freeing the SPI irq. Signed-off-by: NLanqing Liu <lanqing.liu@unisoc.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
Add an entry for the "fsl,imx8mq-ecspi" compatible to describe the ECSPI version present on i.MX8M. Signed-off-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Felix Fietkau 提交于
Sleeping is safe inside spi_transfer_one_message, and some GPIO chips are running on slow busses (such as I2C GPIO expanders) and need to sleep for setting values. Signed-off-by: NFelix Fietkau <nbd@nbd.name> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jonathan Neuschäfer 提交于
The spi-gpio driver already handles different chip select polarities, but so far this was not advertised in master->mode_bits. This patch fixes mmc_spi on top of spi_gpio, which is useful in some testing scenarios. Signed-off-by: NJonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 2月, 2019 3 次提交
-
-
由 Geert Uytterhoeven 提交于
As of commit 8caab75f ('spi: Generalize SPI "master" to "controller"'), the old master-centric names are compatibility wrappers for the new controller-centric names. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Geert Uytterhoeven 提交于
As of commit 8caab75f ('spi: Generalize SPI "master" to "controller"'), the old master-centric names are compatibility wrappers for the new controller-centric names. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Geert Uytterhoeven 提交于
As of commit 8caab75f ('spi: Generalize SPI "master" to "controller"'), the old master-centric names are compatibility wrappers for the new controller-centric names. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 2月, 2019 14 次提交
-
-
由 Tudor Ambarus 提交于
The sam9x60 qspi controller uses 2 clocks, one for the peripheral register access, the other for the qspi core and phy. Both are mandatory. It uses different transfer type bits in IFR register. It has dedicated registers to specify a read or a write instruction: Read Instruction Code Register (RICR) and Write Instruction Code Register (WICR). ICR/RICR/WICR have identical fields. Tested with sst26vf064b jedec,spi-nor flash. Backward compatibility test done on sama5d2 qspi controller and mx25l25635e jedec,spi-nor flash. Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <boris.brezillon@collabora.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
The sam9x60 qspi controller uses 2 clocks, one for the peripheral register access, the other for the qspi core and phy. Both are mandatory. Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
Naming clocks is a good practice. Keep supporting unnamed peripheral clock, to be backward compatible with old DTs. While here, rename clk to pclk, to indicate that it is a peripheral clock. Suggested-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
Naming clocks is a good practice. Make "pclk" madatory even if we support unnamed clock in the driver, to be backward compatible with old DTs. Suggested-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
Introduced in: commit b6055787 ("ARM: dts: at91: sama5d2: switch to new clock binding") Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
Split the TFRTYP_TRSFR_ bitfields in 2: one bit encoding the mem/reg transfer type and one bit encoding the direction of the transfer (read/write). Remove NOP when setting read transfer type. Remove useless setting of write transfer type when op->data.dir == SPI_MEM_DATA_IN && !op->data.nbytes. QSPI_IFR_TFRTYP_TRSFR_WRITE is specific just to sama5d2 qspi, rename it to QSPI_IFR_SAMA5D2_WRITE_TRSFR. Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <boris.brezillon@collabora.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
Adopt the SPDX license identifiers to ease license compliance management. Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
Return -ENOTSUPP when atmel_qspi_find_mode() fails. Propagate the error in atmel_qspi_exec_op(). Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
The cast is done implicitly. Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
Let general names to core drivers. Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
The wrappers hid that the accesses are relaxed. Drop them. Suggested-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
Cosmetic change, no functional change. Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tudor Ambarus 提交于
Set the controller by default in Serial Memory Mode (SMM) at probe. Cache Mode Register (MR) value to avoid write access when setting the controller in serial memory mode at exec_op(). Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: NBoris Brezillon <boris.brezillon@collabora.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Lukasz Majewski 提交于
The NXP's Vybryd vf610 can work as a SPI slave device (the CS and clock signals are provided by master). It is possible to specify a single device to work in that mode. As we do use DMA for transferring data, the RX channel must be prepared for incoming data. Moreover, in slave mode we just set a subset of control fields in configuration registers (CTAR0, PUSHR). For testing the spidev_test program has been used. Test script for this patch can be found here: https://github.com/lmajewski/tests-spi/blob/master/tests/spi/spi_tests.shSigned-off-by: NLukasz Majewski <lukma@denx.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 31 1月, 2019 2 次提交
-
-
由 Jonas Bonn 提交于
If the SPI slave requires an inter-word delay, configure the DLYBCT register accordingly. Tested on a SAMA5D2 board (derived from SAMA5D2-Xplained reference board). Signed-off-by: NJonas Bonn <jonas@norrbonn.se> Acked-by: NNicolas Ferre <nicolas.ferre@microchip.com> CC: Nicolas Ferre <nicolas.ferre@microchip.com> CC: Mark Brown <broonie@kernel.org> CC: Alexandre Belloni <alexandre.belloni@bootlin.com> CC: Ludovic Desroches <ludovic.desroches@microchip.com> CC: linux-spi@vger.kernel.org CC: linux-arm-kernel@lists.infradead.org Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jonas Bonn 提交于
Some devices are slow and cannot keep up with the SPI bus and therefore require a short delay between words of the SPI transfer. The example of this that I'm looking at is a SAMA5D2 with a minimum SPI clock of 400kHz talking to an AVR-based SPI slave. The AVR cannot put bytes on the bus fast enough to keep up with the SoC's SPI controller even at the lowest bus speed. This patch introduces the ability to specify a required inter-word delay for SPI devices. It is up to the controller driver to configure itself accordingly in order to introduce the requested delay. Note that, for spi_transfer, there is already a field word_delay that provides similar functionality. This field, however, is specified in clock cycles (and worse, SPI controller cycles, not SCK cycles); that makes this value dependent on the master clock instead of the device clock for which the delay is intended to provide some relief. This patch leaves this old word_delay in place and provides a time-based word_delay_us alongside it; the new field fits in the struct padding so struct size is constant. There is only one in-kernel user of the word_delay field and presumably that driver could be reworked to use the time-based value instead. The time-based delay is limited to 8 bits as these delays are intended to be short. The SAMA5D2 that I've tested this on limits delays to a maximum of ~100us, which is already many word-transfer periods even at the minimum transfer speed supported by the controller. Signed-off-by: NJonas Bonn <jonas@norrbonn.se> CC: Mark Brown <broonie@kernel.org> CC: Rob Herring <robh+dt@kernel.org> CC: Mark Rutland <mark.rutland@arm.com> CC: linux-spi@vger.kernel.org CC: devicetree@vger.kernel.org Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 1月, 2019 5 次提交
-
-
由 Uwe Kleine-König 提交于
Driver specific implementations for .transfer_one_message need to call the tracing stuff themself. This is necessary to make spi tracing actually useful. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Yogesh Narayan Gaur 提交于
Typo fix in Author Boris Brezillon last name and update with new email address. Fixes: 84d04318 ("spi: Add a driver for the Freescale/NXP QuadSPI controller") Signed-off-by: NYogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Yogesh Narayan Gaur 提交于
Add MODULE_LICENSE info to fix below warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/spi/spi-nxp-fspi.o Typo fix in Boris Brezillon last name. Fixes: a5356aef ("spi: spi-mem: Add driver for NXP FlexSPI controller") Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NYogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jiwei Sun 提交于
When transfer timeout, give -EAGAIN to the message's status, and it can make the spi device driver choose repeated transimation or not. And if transfer timeout, output some useful information for tracing the issue. Signed-off-by: NJiwei Sun <jiwei.sun@windriver.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
The spi-imx driver supports both master and slave modes, so update the help text to make it more generic. Signed-off-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 28 1月, 2019 4 次提交
-
-
由 Yogesh Narayan Gaur 提交于
Add octal mode flags for octal I/O data transfer support. NXP FlexSPI controller supports 8 lines Rx/Tx data transfer. Signed-off-by: NYogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Yogesh Narayan Gaur 提交于
Add maintainers for the NXP FlexSPI driver Signed-off-by: NYogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Yogesh Narayan Gaur 提交于
Add binding file for NXP FlexSPI controller Signed-off-by: NYogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Yogesh Narayan Gaur 提交于
- Add driver for NXP FlexSPI host controller (0) What is the FlexSPI controller? FlexSPI is a flexsible SPI host controller which supports two SPI channels and up to 4 external devices. Each channel supports Single/Dual/Quad/Octal mode data transfer (1/2/4/8 bidirectional data lines) i.e. FlexSPI acts as an interface to external devices, maximum 4, each with up to 8 bidirectional data lines. It uses new SPI memory interface of the SPI framework to issue flash memory operations to up to four connected flash devices (2 buses with 2 CS each). (1) Tested this driver with the mtd_debug and JFFS2 filesystem utility on NXP LX2160ARDB and LX2160AQDS targets. LX2160ARDB is having two NOR slave device connected on single bus A i.e. A0 and A1 (CS0 and CS1). LX2160AQDS is having two NOR slave device connected on separate buses one flash on A0 and second on B1 i.e. (CS0 and CS3). Verified this driver on following SPI NOR flashes: Micron, mt35xu512ab, [Read - 1 bit mode] Cypress, s25fl512s, [Read - 1/2/4 bit mode] Signed-off-by: NYogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> Reviewed-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org> Tested-by: NAshish Kumar <Ashish.Kumar@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 1月, 2019 4 次提交
-
-
由 Linus Walleij 提交于
The SPI chip selects were not properly inspected due to a logic inversion. This made SPI GPIOs not work. Cc: Jan Kotas <jank@cadence.com> Reported-by: NJan Kotas <jank@cadence.com> Tested-by: NJan Kotas <jank@cadence.com> Fixes: f3186dd8 ("spi: Optionally use GPIO descriptors for CS GPIOs") Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Linus Walleij 提交于
The Cadence controller also supports platforms specifying native chipselects. When I enforce the use of high CS for drivers opting in for using GPIO descriptors, I inadvertedly switched the driver to also use active high chip select for native chip selects. Fix this by inverting the logic in the callback for the native chip select. Rename the parameter from "is_high" (which is interpreted as being high when 0, which is confusing, I will not make any drug-related jokes here) to "enabled" which is more intuitive, especially now that it is true when CS is supposed to be enabled. Cc: Wei Yongjun <weiyongjun1@huawei.com> Fixes: cfeefa79 ("spi: cadence: Convert to use CS GPIO descriptors") Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Linus Walleij 提交于
The DW controller also supports platforms specifying native chipselects. When I enforce the use of high CS for drivers opting in for using GPIO descriptors, I inadvertedly switched the driver to also use active high chip select for native chip selects. As it turns out, the DW hardware driving chip selects also thinks it is weird with active low chip selects so all we need to do is remove an inversion in the driver. Cc: Jan Kotas <jank@cadence.com> Reported-by: NJan Kotas <jank@cadence.com> Tested-by: NJan Kotas <jank@cadence.com> Fixes: 9400c41e ("spi: dw: Convert to use CS GPIO descriptors") Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Linus Walleij 提交于
All controllers using GPIO descriptors can by definition support high CS connections, so just enforce this when registering an SPI controller. This fixes a regression where controllers were missing SPI_CS_HIGH, the drivers would fail like this: spi spi0.0: setup: unsupported mode bits 4 cdns-spi fd0b0000.spi: can't setup spi0.0, status -22 This is because as using descriptors moves the CS inversion logic over to gpiolib, all such controllers are registered with CS active high. Cc: Jan Kotas <jank@cadence.com> Reported-by: NJan Kotas <jank@cadence.com> Tested-by: NJan Kotas <jank@cadence.com> Fixes: f3186dd8 ("spi: Optionally use GPIO descriptors for CS GPIOs") Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 24 1月, 2019 1 次提交
-
-
由 Mark Brown 提交于
Commit 412e6037 ("spi: core: avoid waking pump thread from spi_sync instead run teardown delayed") introduced regressions on some boards, apparently connected to spi_mem not triggering shutdown properly any more. Since we've thus far been unable to figure out exactly where the breakage is revert the optimisation for now. Reported-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: kernel@martin.sperl.org
-
- 23 1月, 2019 2 次提交
-
-
由 Lubomir Rintel 提交于
It's also a slave controller driver now, calling it "master" is slightly misleading. Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 YueHaibing 提交于
Fix a static code checker warning: drivers/spi/spi-bcm2835aux.c:460 bcm2835aux_spi_probe() warn: passing zero to 'PTR_ERR' In case of error, the function devm_clk_get() returns ERR_PTR() and not returns NULL. Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-