So what are the steps to enable the SPI port in total?
decompile sun7i-a20-cubieboard2.dtb using dtc, not fdtdump modify the dts file to enable the SPI port I want (status="okay";), and pinctrl entries recompile the dts file, setting aside the original, and putting the new one in its place in /boot/dtb/ modify the boot.cmd (backing up old) to point to the sun7i-a20-cubieboard2.dtb under /boot/dtb/ run the command at the end of the boot.cmd file
Once I figured out that fdtdump isn't equal to dtc doing the decompiling, my new dtb worked, but no joy with the spi device.
I get this repeatedly in dmesg here and there:
[ ... ] sun4i-spi 1c05000.spi: could not find pctldev for node /clocks/clk@01c200a0, deferring probe
My definition:
spi@01c05000 {
compatible = "allwinner,sun4i-a10-spi";
reg = <0x1c05000 0x1000>;
interrupts = <0x0 0xa 0x4>;
clocks = <0x3 0x14 0x15>;
clock-names = "ahb", "mod";
dmas = <0x16 0x1 0x1b 0x16 0x1 0x1a>;
dma-names = "rx", "tx";
status = "okay";
#address-cells = <0x1>;
#size-cells = <0x0>;
pinctrl-names = "default";
pinctrl-0 = <0x15 0x16 0x17>;
};
Is there something missing from that? That spec differs in the clocks line and dma's line than the post from January, but its what came out of the decompile. I added the pinctrl-0 from the January post. What do those number refer to?
The module spidev is loaded.
My /proc/device-tree/model is: Cubietech Cubieboard2
uname -a :
Linux cubieboard 4.4.6-sunxi #3 SMP Tue Apr 12 11:46:53 EDT 2016 armv7l armv7l armv7l GNU/Linux
and lsb_release -a:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
Thanks!