01-10-2018, 04:26 AM
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
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