Power & Source of Big Ideas

SPI not working on nanopi-m4 android 8.1?

Moderators: chensy, FATechsupport

I'm trying to get spi working on m4/8.1.

I am able to setup the port, but only write one character. After that, all calls to SPI return -1.

I can see the single byte appear on the SPI bus.

At boot the spi device reports errors:
[ 1.015664] rockchip-spi ff1d0000.spi: Failed to request TX DMA channel
[ 1.015683] rockchip-spi ff1d0000.spi: Failed to request RX DMA channel
[ 1.015693] rockchip-spi ff1d0000.spi: no high_speed pinctrl state

int r = HardwareControler.SPItransferOneByte(devFD, (byte)3, 0, 1000000 , 8);

r returns 255 the first time, and then -1 from then after...
Hi, I'm currently working to enable SPI on NanoPi M4 but it is not working...

I have edited main DT to the following one and now /dev/spidev0.0 appears.

Quote
spi@ff1c0000 {

compatible = "rockchip,rk3399-spi\0rockchip,rk3066-spi";

reg = < 0x00 0xff1c0000 0x00 0x1000 >;

clocks = < 0x08 0x47 0x08 0x15b >;

clock-names = "spiclk\0apb_pclk";

interrupts = < 0x00 0x44 0x04 0x00 >;

pinctrl-names = "default";

pinctrl-0 = < 0x4a 0x4b 0x4c 0x4d >;

#address-cells = < 0x01 >;

#size-cells = < 0x00 >;

status = "okay";

phandle = < 0x101 >;
snaptube vidmate
spidev{

compatible = "spidev";

status = "okay";

reg = <0>;

spi-max-frequency = <10000000>;

};

};

Who is online

In total there are 19 users online :: 0 registered, 0 hidden and 19 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 19 guests