DESK-RZ-L/Peripherals/SPI

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes
2025/12/16 DESK-RZ-L-1.x.x release


Peripheral SPI[edit | edit source]

Configuration[edit | edit source]

These peripheral(s) can only be used with the following ConfigID(s) (see the associated BOM):

ConfigID Note
2002 SPI available on mikroBUS connector
2003 SPI s not available (the pins are used to drive motors)

Device tree configuration[edit | edit source]

Below is an example of a device tree configuration used on a standard DAVE kit for the DSAB EVK.

From rzt2h-eb23-cb2002.dts:

...
&spi1 {
	pinctrl-0 = <&spi1_pins>;
	pinctrl-names = "default";

	status = "okay";

	spidev@0 {
		compatible = "rohm,dh2228fv";
		reg = <0>;
		spi-max-frequency = <1000000>;
	};
};
...
&pinctrl {
...
	spi1_pins: spi1 {
		pinmux =    <RZT2H_PORT_PINMUX(32, 6, 0x1A)>, /* SSL */
			        <RZT2H_PORT_PINMUX(32, 3, 0x1A)>, /* SCK */
			        <RZT2H_PORT_PINMUX(32, 4, 0x1A)>, /* MOSI */
			        <RZT2H_PORT_PINMUX(32, 5, 0x1A)>; /* MISO */
	};
};

Accessing the peripheral[edit | edit source]

Linux[edit | edit source]

...
[   61.881578] renesas_spi_t2h 80007400.spi: dma_request_slave_channel_compat failed
[   61.889128] renesas_spi_t2h 80007400.spi: DMA not available, using PIO
[   61.897223] renesas_spi_t2h 80007400.spi: probed
...
root@desk-t2h-usd-devel:~# ls /dev/spidev0.0 
/dev/spidev0.0