To enable this I added some in device tree as below.
In file "imx6ull-14x14-evk.dts"
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog_1>;
imx6ul-evk {
...
pinctrl_ecspi4: ecspi4grp {
fsl,pins = <
MX6UL_PAD_ENET2_TX_CLK__ECSPI4_MISO 0x70a1
MX6UL_PAD_ENET2_TX_ENi__ECSPI4_MOSI 0x70a1
MX6UL_PAD_ENET2_TX_DATA1__ECSPI4_SCLK 0x70a1
MX6UL_PAD_ENET2_RX_ER__ECSPI4_SS0 0x70a1
>;
};
...
};
...
&ecspi4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi4>;
status = "okay";
};
...
And added my boardname "tarta-tt" and some code as below.
In file "fbtft_device.c"
{
.name = "tarta-tt",
.spi = &(struct spi_board_info) {
.modalias = "fb_ssd1306",
.max_speed_hz = 16000000,
.mode = SPI_MODE_0,
.bus_num = 4,
.platform_data = &(struct fbtft_platform_data) {
.display = {
.buswidth = 8,
},
.gpios = (const struct fbtft_gpio []) {
{ "reset", 30 },
{ "dc", 31 },
{},
},
}
}
},
And enabled some feature in menuconfig as below to enable SSD1306 OLED display.
--> Device Drivers
--> Staging drivers
--> Support for small TFT LCD display modules
--> <*> FB driver for the SSD1306 OLED Controller
--> <M> Module to for adding FBTFT devices
Build was successful. But, when I do modprobe spi_busnum_to_master returns NULL.
I tried busnum option from 0 to 4, but all of try returns NULL as below.
root@imx6ull14x14evk:~# modprobe fbtft_device name=tarta-tt busnum=3
fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
fbtft_device: SPI devices registered:
fbtft_device: 74hc595 spi32766.0 100kHz 8 bits mode=0x00
fbtft_device: 'fb' Platform devices registered:
fbtft_device: spi_busnum_to_master(3) returned NULL
fbtft_device: failed to register SPI device
modprobe: ERROR: could not insert 'fbtft_device': Invalid argument
root@imx6ull14x14evk:~#
Please help me to enable SSD1306 for display.