devicetree: Add DT bindings documentation for Zynq Ultrascale+ MPSoC GQSPI controller
Subsystems (3)
RFC v3 1/2 devicetree: Add DT bindings documentation for Zynq Ultrascale+ MPSoC GQSPI controller
Add bindings documentation for GQSPI controller driver used by Zynq Ultrascale+ MPSoC
---
Changes in v3:
- Did split in register addressing as per Sorens request
Changes in v2:
No changes in v2
--- .../devicetree/bindings/spi/spi-zynqmp-qspi.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.txt
Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.txt new file +26 -0
@@ -0,0 +1,26 @@ +Xilinx Zynq UltraScale+ MPSoC GQSPI controller Device Tree Bindings +------------------------------------------------------------------- + +Required properties: +- compatible : Should be "xlnx,zynqmp-qspi-1.0". +- reg : Physical base address and size of GQSPI registers map. +- interrupts : Property with a value describing the interrupt + number. +- interrupt-parent : Must be core interrupt controller. +- clock-names : List of input clock names - "ref_clk", "pclk" + (See clock bindings for details). +- clocks : Clock phandles (see clock bindings for details). + +Optional properties: +- num-cs : Number of chip selects used. + +Example: + qspi: spi at ff0f0000 { + compatible = "xlnx,zynqmp-qspi-1.0"; + clock-names = "ref_clk", "pclk"; + clocks = <&misc_clk &misc_clk>; + interrupts = <0 15 4>; + interrupt-parent = <&gic>; + num-cs = <1>; + reg = <0x0 0xff0f0000 0x1000>,<0x0 0xc0000000 0x8000000>; + };
--
2.1.2
RFC v3 2/2 spi: Add support for Zynq Ultrascale+ MPSoC GQSPI controller
This patch adds support for GQSPI controller driver used by Zynq Ultrascale+ MPSoC
---
In v3, accommodating review comments given by Shubhrajyoti.
Changes in v3:
- Updated chip assert/de-assert timeout loop using jiffies
- Updated minor kernel doc comments
- Removed unwanted variable initialization in zynqmp_qspi_selectspimode() function
- In probe() updated goto statement to disable clocks if error occurs while registering interrupts.
Changes in v2:
- Replacing all readl/writel calls with respective zynqmp_gqspi_read/write wrappers
- Renamed function zynqmp_gqspi_selectflash to zynqmp_gqspi_selectslave
- Renamed formal parameters of the function zynqmp_gqspi_selectslave
- Updated all default cases of switch statements
- Removed typecasting of variable data in zynqmp_qspi_copy_read_data()
- Added return code check around clk_enable() calls
- Factored the clk_get_rate() API outside the loop
- Added generic fifo entry in zynqmp_qspi_chipselect() function to assure the CS assert and CS de-assert
- To assure an endianness, added memcpy() in zynqmp_qspi_filltxfifo() function
- For making sure that there is no HW setting during the transfer via setup(), Moved function call of zynqmp_qspi_setup_transfer() to zynqmp_qspi_filltxfifo() function.
- Set master->num_chipselect to default value instead of reading it via device-tree
---
--- drivers/spi/Kconfig | 6 + drivers/spi/Makefile | 1 + drivers/spi/spi-zynqmp-gqspi.c | 1122 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1129 insertions(+) create mode 100755 drivers/spi/spi-zynqmp-gqspi.c
drivers/spi/Kconfig +6 -0
@@ -610,6 +610,12 @@ config SPI_XTENSA_XTFPGA 16 bit words in SPI mode 0, automatically asserting CS on transfer start and deasserting on end. +config SPI_ZYNQMP_GQSPI + tristate "Xilinx ZynqMP GQSPI controller" + depends on SPI_MASTER + help + Enables Xilinx GQSPI controller driver for Zynq UltraScale+ MPSoC. + config SPI_NUC900 tristate "Nuvoton NUC900 series SPI" depends on ARCH_W90X900
drivers/spi/Makefile +1 -0
@@ -89,3 +89,4 @@ obj-$(CONFIG_SPI_TXX9) += spi-txx9.o obj-$(CONFIG_SPI_XCOMM) += spi-xcomm.o obj-$(CONFIG_SPI_XILINX) += spi-xilinx.o obj-$(CONFIG_SPI_XTENSA_XTFPGA) += spi-xtensa-xtfpga.o +obj-$(CONFIG_SPI_ZYNQMP_GQSPI) += spi-zynqmp-gqspi.o
drivers/spi/spi-zynqmp-gqspi.c new file +1122 -0
1,122 lines not on this page · raw message
--
2.1.2
Mark Brown
maintainerQuoted 2 lines · Ranjit Waghmode
Add bindings documentation for GQSPI controller driver used by Zynq Ultrascale+ MPSoC
Applied both, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150612/2f929a8d/attachment.sig>