Merge tag 'spi-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "A fairly quiet release for SPI, the biggest thing is the conversion to use GPIO descriptors which is now 90% done but still needs some stragglers converting. Summary: - Support for inter-word delays - Conversion of the core and most drivers to use GPIO descriptors for GPIO controlled chip selects - New drivers for NXP FlexSPI and QuadSPI, SiFive and Spreadtrum" * tag 'spi-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (104 commits) spi: sh-msiof: Restrict bits per word to 8/16/24/32 on R-Car Gen2/3 spi: sifive: Remove redundant dev_err call in sifive_spi_probe() spi: sifive: Remove spi_master_put in sifive_spi_remove() spi: spi-gpio: fix SPI_CS_HIGH capability spi: pxa2xx: Setup maximum supported DMA transfer length spi: sifive: Add driver for the SiFive SPI controller spi: sifive: Add DT documentation for SiFive SPI controller spi: sprd: Add a prefix for SPI DMA channel macros spi: sprd: spi: sprd: Add DMA mode support dt-bindings: spi: Add the DMA properties for the SPI dma mode spi: sprd: Add the SPI irq function for the SPI DMA mode dt-bindings: spi: imx: Add an entry for the i.MX8QM compatible spi: use gpio[d]_set_value_cansleep for setting chipselect GPIO spi: gpio: Advertise support for SPI_CS_HIGH spi: sh-msiof: Replace spi_master by spi_controller spi: sh-hspi: Replace spi_master by spi_controller spi: rspi: Replace spi_master by spi_controller spi: atmel-quadspi: add support for sam9x60 qspi controller dt-bindings: spi: atmel-quadspi: QuadSPI driver for Microchip SAM9X60 spi: atmel-quadspi: add support for named peripheral clock ...
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
* Atmel Quad Serial Peripheral Interface (QSPI)
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "atmel,sama5d2-qspi".
|
||||
- compatible: Should be one of the following:
|
||||
- "atmel,sama5d2-qspi"
|
||||
- "microchip,sam9x60-qspi"
|
||||
- reg: Should contain the locations and lengths of the base registers
|
||||
and the mapped memory.
|
||||
- reg-names: Should contain the resource reg names:
|
||||
- qspi_base: configuration register address space
|
||||
- qspi_mmap: memory mapped address space
|
||||
- interrupts: Should contain the interrupt for the device.
|
||||
- clocks: The phandle of the clock needed by the QSPI controller.
|
||||
- clocks: Should reference the peripheral clock and the QSPI system
|
||||
clock if available.
|
||||
- clock-names: Should contain "pclk" for the peripheral clock and "qspick"
|
||||
for the system clock when available.
|
||||
- #address-cells: Should be <1>.
|
||||
- #size-cells: Should be <0>.
|
||||
|
||||
@@ -19,7 +24,8 @@ spi@f0020000 {
|
||||
reg = <0xf0020000 0x100>, <0xd0000000 0x8000000>;
|
||||
reg-names = "qspi_base", "qspi_mmap";
|
||||
interrupts = <52 IRQ_TYPE_LEVEL_HIGH 7>;
|
||||
clocks = <&spi0_clk>;
|
||||
clocks = <&pmc PMC_TYPE_PERIPHERAL 52>;
|
||||
clock-names = "pclk";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
|
@@ -10,6 +10,7 @@ Required properties:
|
||||
- "fsl,imx35-cspi" for SPI compatible with the one integrated on i.MX35
|
||||
- "fsl,imx51-ecspi" for SPI compatible with the one integrated on i.MX51
|
||||
- "fsl,imx53-ecspi" for SPI compatible with the one integrated on i.MX53 and later Soc
|
||||
- "fsl,imx8mq-ecspi" for SPI compatible with the one integrated on i.MX8M
|
||||
- reg : Offset and length of the register set for the device
|
||||
- interrupts : Should contain CSPI/eCSPI interrupt
|
||||
- clocks : Clock specifiers for both ipg and per clocks.
|
||||
|
@@ -14,15 +14,13 @@ Required properties:
|
||||
- clocks : The clocks needed by the QuadSPI controller
|
||||
- clock-names : Should contain the name of the clocks: "qspi_en" and "qspi".
|
||||
|
||||
Optional properties:
|
||||
- fsl,qspi-has-second-chip: The controller has two buses, bus A and bus B.
|
||||
Each bus can be connected with two NOR flashes.
|
||||
Most of the time, each bus only has one NOR flash
|
||||
connected, this is the default case.
|
||||
But if there are two NOR flashes connected to the
|
||||
bus, you should enable this property.
|
||||
(Please check the board's schematic.)
|
||||
- big-endian : That means the IP register is big endian
|
||||
Required SPI slave node properties:
|
||||
- reg: There are two buses (A and B) with two chip selects each.
|
||||
This encodes to which bus and CS the flash is connected:
|
||||
<0>: Bus A, CS 0
|
||||
<1>: Bus A, CS 1
|
||||
<2>: Bus B, CS 0
|
||||
<3>: Bus B, CS 1
|
||||
|
||||
Example:
|
||||
|
||||
@@ -40,7 +38,7 @@ qspi0: quadspi@40044000 {
|
||||
};
|
||||
};
|
||||
|
||||
Example showing the usage of two SPI NOR devices:
|
||||
Example showing the usage of two SPI NOR devices on bus A:
|
||||
|
||||
&qspi2 {
|
||||
pinctrl-names = "default";
|
39
Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
Normal file
39
Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
* NXP Flex Serial Peripheral Interface (FSPI)
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "nxp,lx2160a-fspi"
|
||||
- reg : First contains the register location and length,
|
||||
Second contains the memory mapping address and length
|
||||
- reg-names : Should contain the resource reg names:
|
||||
- fspi_base: configuration register address space
|
||||
- fspi_mmap: memory mapped address space
|
||||
- interrupts : Should contain the interrupt for the device
|
||||
|
||||
Required SPI slave node properties:
|
||||
- reg : There are two buses (A and B) with two chip selects each.
|
||||
This encodes to which bus and CS the flash is connected:
|
||||
- <0>: Bus A, CS 0
|
||||
- <1>: Bus A, CS 1
|
||||
- <2>: Bus B, CS 0
|
||||
- <3>: Bus B, CS 1
|
||||
|
||||
Example showing the usage of two SPI NOR slave devices on bus A:
|
||||
|
||||
fspi0: spi@20c0000 {
|
||||
compatible = "nxp,lx2160a-fspi";
|
||||
reg = <0x0 0x20c0000 0x0 0x10000>, <0x0 0x20000000 0x0 0x10000000>;
|
||||
reg-names = "fspi_base", "fspi_mmap";
|
||||
interrupts = <0 25 0x4>; /* Level high type */
|
||||
clocks = <&clockgen 4 3>, <&clockgen 4 3>;
|
||||
clock-names = "fspi_en", "fspi";
|
||||
|
||||
mt35xu512aba0: flash@0 {
|
||||
reg = <0>;
|
||||
....
|
||||
};
|
||||
|
||||
mt35xu512aba1: flash@1 {
|
||||
reg = <1>;
|
||||
....
|
||||
};
|
||||
};
|
37
Documentation/devicetree/bindings/spi/spi-sifive.txt
Normal file
37
Documentation/devicetree/bindings/spi/spi-sifive.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
SiFive SPI controller Device Tree Bindings
|
||||
------------------------------------------
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "sifive,<chip>-spi" and "sifive,spi<version>".
|
||||
Supported compatible strings are:
|
||||
"sifive,fu540-c000-spi" for the SiFive SPI v0 as integrated
|
||||
onto the SiFive FU540 chip, and "sifive,spi0" for the SiFive
|
||||
SPI v0 IP block with no chip integration tweaks.
|
||||
Please refer to sifive-blocks-ip-versioning.txt for details
|
||||
- reg : Physical base address and size of SPI registers map
|
||||
A second (optional) range can indicate memory mapped flash
|
||||
- interrupts : Must contain one entry
|
||||
- interrupt-parent : Must be core interrupt controller
|
||||
- clocks : Must reference the frequency given to the controller
|
||||
- #address-cells : Must be '1', indicating which CS to use
|
||||
- #size-cells : Must be '0'
|
||||
|
||||
Optional properties:
|
||||
- sifive,fifo-depth : Depth of hardware queues; defaults to 8
|
||||
- sifive,max-bits-per-word : Maximum bits per word; defaults to 8
|
||||
|
||||
SPI RTL that corresponds to the IP block version numbers can be found here:
|
||||
https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/spi
|
||||
|
||||
Example:
|
||||
spi: spi@10040000 {
|
||||
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
|
||||
reg = <0x0 0x10040000 0x0 0x1000 0x0 0x20000000 0x0 0x10000000>;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <51>;
|
||||
clocks = <&tlclk>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
sifive,fifo-depth = <8>;
|
||||
sifive,max-bits-per-word = <8>;
|
||||
};
|
@@ -14,6 +14,11 @@ Required properties:
|
||||
address on the SPI bus. Should be set to 1.
|
||||
- #size-cells: Should be set to 0.
|
||||
|
||||
Optional properties:
|
||||
dma-names: Should contain names of the SPI used DMA channel.
|
||||
dmas: Should contain DMA channels and DMA slave ids which the SPI used
|
||||
sorted in the same order as the dma-names property.
|
||||
|
||||
Example:
|
||||
spi0: spi@70a00000{
|
||||
compatible = "sprd,sc9860-spi";
|
||||
@@ -21,6 +26,8 @@ spi0: spi@70a00000{
|
||||
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-names = "spi", "source","enable";
|
||||
clocks = <&clk_spi0>, <&ext_26m>, <&clk_ap_apb_gates 5>;
|
||||
dma-names = "rx_chn", "tx_chn";
|
||||
dmas = <&apdma 11 11>, <&apdma 12 12>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
@@ -7,7 +7,9 @@ from 4 to 32-bit data size. Although it can be configured as master or slave,
|
||||
only master is supported by the driver.
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "st,stm32h7-spi".
|
||||
- compatible: Should be one of:
|
||||
"st,stm32h7-spi"
|
||||
"st,stm32f4-spi"
|
||||
- reg: Offset and length of the device's register set.
|
||||
- interrupts: Must contain the interrupt id.
|
||||
- clocks: Must contain an entry for spiclk (which feeds the internal clock
|
||||
@@ -30,8 +32,9 @@ Child nodes represent devices on the SPI bus
|
||||
See ../spi/spi-bus.txt
|
||||
|
||||
Optional properties:
|
||||
- st,spi-midi-ns: (Master Inter-Data Idleness) minimum time delay in
|
||||
nanoseconds inserted between two consecutive data frames.
|
||||
- st,spi-midi-ns: Only for STM32H7, (Master Inter-Data Idleness) minimum time
|
||||
delay in nanoseconds inserted between two consecutive data
|
||||
frames.
|
||||
|
||||
|
||||
Example:
|
||||
|
Reference in New Issue
Block a user