xref: /freebsd/sys/contrib/device-tree/Bindings/spi/microchip,spi-pic32.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotMicrochip PIC32 SPI Master controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: Should be "microchip,pic32mzda-spi".
5*c66ec88fSEmmanuel Vadot- reg: Address and length of register space for the device.
6*c66ec88fSEmmanuel Vadot- interrupts: Should contain all three spi interrupts in sequence
7*c66ec88fSEmmanuel Vadot              of <fault-irq>, <receive-irq>, <transmit-irq>.
8*c66ec88fSEmmanuel Vadot- interrupt-names: Should be "fault", "rx", "tx" in order.
9*c66ec88fSEmmanuel Vadot- clocks: Phandle of the clock generating SPI clock on the bus.
10*c66ec88fSEmmanuel Vadot- clock-names: Should be "mck0".
11*c66ec88fSEmmanuel Vadot- cs-gpios: Specifies the gpio pins to be used for chipselects.
12*c66ec88fSEmmanuel Vadot            See: Documentation/devicetree/bindings/spi/spi-bus.txt
13*c66ec88fSEmmanuel Vadot
14*c66ec88fSEmmanuel VadotOptional properties:
15*c66ec88fSEmmanuel Vadot- dmas: Two or more DMA channel specifiers following the convention outlined
16*c66ec88fSEmmanuel Vadot        in Documentation/devicetree/bindings/dma/dma.txt
17*c66ec88fSEmmanuel Vadot- dma-names: Names for the dma channels. There must be at least one channel
18*c66ec88fSEmmanuel Vadot             named "spi-tx" for transmit and named "spi-rx" for receive.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel VadotExample:
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel Vadotspi1: spi@1f821000 {
23*c66ec88fSEmmanuel Vadot        compatible = "microchip,pic32mzda-spi";
24*c66ec88fSEmmanuel Vadot        reg = <0x1f821000 0x200>;
25*c66ec88fSEmmanuel Vadot        interrupts = <109 IRQ_TYPE_LEVEL_HIGH>,
26*c66ec88fSEmmanuel Vadot                     <110 IRQ_TYPE_LEVEL_HIGH>,
27*c66ec88fSEmmanuel Vadot                     <111 IRQ_TYPE_LEVEL_HIGH>;
28*c66ec88fSEmmanuel Vadot        interrupt-names = "fault", "rx", "tx";
29*c66ec88fSEmmanuel Vadot        clocks = <&PBCLK2>;
30*c66ec88fSEmmanuel Vadot        clock-names = "mck0";
31*c66ec88fSEmmanuel Vadot        cs-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
32*c66ec88fSEmmanuel Vadot        dmas = <&dma 134>, <&dma 135>;
33*c66ec88fSEmmanuel Vadot        dma-names = "spi-rx", "spi-tx";
34*c66ec88fSEmmanuel Vadot};
35