Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

spi(4) attached devices



I have an oled display that I want to attach via spi(4), which should be supported by ssdfb(4).

ATM I use the following (working) overlay to configure spi(4) (on an older rpi0w):

/dts-v1/;
/plugin/;

/ {
	compatible = "brcm,bcm2835";
	fragment@0 {
		target = <&spi>;
		__overlay__ {
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <&spi0_gpio7>;
		};
	};
};

Using this overlay, previously I have successfully used spi(4) ioctl()s to work with an e-ink display device from userland (wih additional dc, reset, and busy pins configured via /etc/gpio.conf).

Unlike the e-ink display, the new oled one should be supported by ssdfb(4), but from the little I understand, for it to be recognised by the kernel I would need a custom device tree overlay.

And after looking at the examples I could find and much trial and error, I ended up with the following overlay (using this in addition to the previous spi one):

/dts-v1/;
/plugin/;

&spi {
        #address-cells = <1>;
	#size-cells = <0>;
	ssdfb@0 {
		compatible = "solomon,ssd1322";
		reg = <0x00>;
		dc-gpio = <&gpio 25 1>;
		status = "okay";
	};
};

Using these, I see the spi(4) device in dmesg(8) output as before but nothing about the ssdfb(4) device.  Based on the ssdfb(4) manpage I was hoping for something like:

ssdfb0 at spi0 slave 0 flags 0x105

I'd appreciate any pointers or help as I don't know the first thing about device trees, or where to learn what I'd need to know (what documentation I find seems to be Linux specific and also rather confusing).  I also have no idea how to debug any of this (all I know is to check that there are no dtc compile errors and look to see if devices show up in dmesg(8) or ofctl(8) output).


Home | Main Index | Thread Index | Old Index