swap SPI_CLK_M2 and SPI_CSN0_M2
#9
I received a message from support that they will fix it in future revisions, starting from V2.1.

To get SPI going you'll need to adapt the device tree and remove the MTD stuff, here are my notes:

// the SPI device is connected to an EPROM, it can be turned into a regular SPI device by adapting the device tree:
sudo apt-get install device-tree-compiler
dtc -I dtb -O dts /boot/efi/dtb > tmp.dts
// open the .dts file with a text editor and remove the existing eprom configuration (which is used for the 'mtd' storage devices), the relevant part should look like:
spi@ff190000 {
compatible = "rockchip,rk3328-spi", "rockchip,rk3066-spi";
reg = <0x0 0xff190000 0x0 0x1000>;
interrupts = <0x0 0x31 0x4>;
#address-cells = <0x1>;
#size-cells = <0x0>;
clocks = <0x2 0x20 0x2 0xd1>;
clock-names = "spiclk", "apb_pclk";
pinctrl-names = "default";
pinctrl-0 = <0x3b 0x3c 0x3d 0x3e>;
status = "okay";

spidev@0 {
compatible = "spidev";
reg = <0x0>;
spi-max-frequency = <0x2faf080>;
};
};
// save it, recompile and copy it back to /boot:
dtc -I dts -O dtb tmp.dts > tmp.dtb
sudo cp tmp.dtb /boot/efi/dtb
// after reboot the spi device should be present at /dev/spidev32766.0
  Reply


Messages In This Thread
swap SPI_CLK_M2 and SPI_CSN0_M2 - by dontpostalot - 12-18-2017, 10:25 AM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by xalius - 12-19-2017, 09:16 AM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by xalius - 12-19-2017, 04:14 PM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by coldfish - 12-26-2017, 12:32 AM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by GaryLa - 01-08-2018, 08:00 PM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by GaryLa - 01-09-2018, 08:14 AM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by dontpostalot - 01-10-2018, 04:26 AM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by GaryLa - 01-10-2018, 06:40 AM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by GaryLa - 01-10-2018, 10:40 AM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by GaryLa - 01-11-2018, 07:59 AM
RE: swap SPI_CLK_M2 and SPI_CSN0_M2 - by mcerveny - 08-18-2018, 02:22 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)