Kernel Modification Device tree has added spidev device and the
kernel has modified the configuration option: [mw_shl_code=bash,true]Device Drivers->SPI
support->[/mw_shl_code] Select User mode SPI device
driver support spi device node is at: /dev/spidev1.0 After selected this option, the spi device
driver can be realized in user space. Please find relative material on net or
refer to the source code: drivers/spi/spidev.c The spi source code is at: drivers/spi/spi-cadence.c
Device tree modification
The device tree has
modified two places. The first place is as below: [mw_shl_code=c,true]aliases {
ethernet0 = &gem0;
serial0 = &uart1;
serial1 = &uart0;
spi0 = &qspi;
spi1 = &spi1;
// added this row
};[/mw_shl_code]
The
second place has added the spi definition. [mw_shl_code=c,true]&spi1 { status =
"okay"; num-cs =
<1>; spidev@0 {
compatible = "spidev";
reg = <0>;
spi-max-frequency = <50000000>;
//spi-cpha;
//spi-cpol; }; };[/mw_shl_code] Enclosed herewith the compiled kernel, device tree file package as below: