spi: xilinx: Add DT binding documentation for spi/spi-xilinx.c
Subsystems (3)
PATCH 1/1 spi: xilinx: Add DT binding documentation for spi/spi-xilinx.c
Add device tree binding documentation for the driver in spi/spi-xilinx.c.
---
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +32 -0
@@ -0,0 +1,32 @@ +Xilinx SPI controller: + +Required properties: +- compatible : Must be "xlnx,axi-1.02.a" or "xlnx,xps-spi-2.00.a" +- interrupt-parent : reference to parent interrupt controller +- interrupts : SPI controller interrupt +- reg : SPI register location and length + +Optional properties: +- xlnx,num-ss-bits : # of slave select bits +- xlnx,num-transfer_bits : # of data transfer bits (defaults to 8) +- xlnx,... : not considered by kernel module +- #address-cells = <1> : if child nodes are defined +- #size-cells = <0> : if child nodes are defined +- Child nodes conforming to SPI bus binding + +Example with 3 slave select bits and 32 bit transfer size: + + axi_spi_0: spi@40a00000 { + compatible = "xlnx,axi-spi-1.02.a", "xlnx,xps-spi-2.00.a"; + interrupt-parent = <&axi_intc_0>; + interrupts = < 2 2 >; + reg = < 0x40a00000 0x10000 >; + xlnx,family = "spartan6"; + xlnx,fifo-exist = <0x1>; + xlnx,instance = "axi_spi_0"; + xlnx,num-ss-bits = <0x3>; + xlnx,num-transfer-bits = <0x20>; + xlnx,sck-ratio = <0x4>; + #address-cells = <1>; + #size-cells = <0>; + };
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Jens Renner
Add device tree binding documentation for the driver in
spi/spi-xilinx.c.Signed-off-by Jens Renner <[email protected]>---
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +0
-0
Documentation/devicetree/bindings/spi/spi-xilinx.txt line 4
Quoted 4 lines
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +4
-0@@ -0,0 +1,32 @@ +Xilinx SPI controller: + +Required properties: +- compatible : Must be "xlnx,axi-1.02.a" or "xlnx,xps-spi-2.00.a"
s/Must be/Should contain/
Documentation/devicetree/bindings/spi/spi-xilinx.txt line 5
Quoted 1 line
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +1
-0+- interrupt-parent : reference to parent interrupt controller
Is this required in all situations? I don't think it is...
Documentation/devicetree/bindings/spi/spi-xilinx.txt line 6
Quoted 1 line
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +1
-0+- interrupts : SPI controller interrupt
Is there a single interrupt:
- interrupts: interrupt-specifier for the SPI controller interrupt.
Documentation/devicetree/bindings/spi/spi-xilinx.txt line 7
Quoted 1 line
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +1
-0+- reg : SPI register location and length
There's a single register? The example looks a bit bigger than that:
- reg: offset and length of the SPI registers.
Documentation/devicetree/bindings/spi/spi-xilinx.txt line 10
Quoted 3 lines
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +3
-0+ +Optional properties: +- xlnx,num-ss-bits : # of slave select bits
- xlnx,num-ss-bits: a single u32 cell describing the number of slave select bits.
Documentation/devicetree/bindings/spi/spi-xilinx.txt line 11
Quoted 1 line
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +1
-0+- xlnx,num-transfer_bits : # of data transfer bits (defaults to 8)
Bindings should use '-' rather than '_' in property names, and I don't see this being used by the driver in mainline. Please fix this:
xlnx,num-transfer-bits: a single u32 cell describing the number of data
transfer bits, if not 8.
Why is this needed? I am not familiar with SPI.
Documentation/devicetree/bindings/spi/spi-xilinx.txt line 12
Quoted 1 line
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +1
-0+- xlnx,... : not considered by kernel module
Huh? kernel details shouldn't leak into the dt binding description, but I can't even tell what this is supposed to mean...
Documentation/devicetree/bindings/spi/spi-xilinx.txt line 26
Quoted 3 lines
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +3
-0+ xlnx,family = "spartan6"; + xlnx,fifo-exist = <0x1>; + xlnx,instance = "axi_spi_0";
These were not defined. Why are they here?
Documentation/devicetree/bindings/spi/spi-xilinx.txt line 29
Quoted 1 line
Documentation/devicetree/bindings/spi/spi-xilinx.txt new file +1
-0+ xlnx,sck-ratio = <0x4>;
This too. Huh?
Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html