Hi @henrique.tx (and @shsasse ) and thanks for your response!
Now I’m finally able to have the st7789v (320x240) working as kernel module. At the moment I’m using kernel 4.9 (but I need then to port the same on kernel 5.4). At the moment using driver as a module (in make menuconfig):
device drivers >
staging drivers >
support for small tft lcd display modules (M) >
fb driver for the st7789v lcd controller (M) >
module to for adding fbtft devices (M)
(in any case I attach my configuration [.config] file)
then I have this configuration file in /etc/modprobe.d (fbtft_device.conf):
# On fbtft_device set the proper bus, rotate, speed and gpio for chip select, reset and data control
# New display 320x240 (fb_st7789v):
options fbtft_device name=admatec_c-berry28 rotate=270 busnum=2 gpios=reset:119,dc:194,led:129 speed=40000000 debug=3
options fb_st7789v invert=1
In this way the display works (I only have to add ‘gpio set 54’ in u-boot in order to power up, for the moment). In this way i have /dev/fb0 interface and I’m able to present some garbage with: cat /dev/urandom > /dev/fb0.
Then I tried to convert modules to drivers directly compiled into the kernel (in the make menuconfig, the same as above, from M to Y). Then I add this part (for the moment in imx7d-colibri-emmc-eval-v3.dts, before every overlay):
&lcdif {
status = "disabled";
};
&iomuxc {
pinctrl_disp_gpio: disp_gpio_muxgrp {
fsl,pins = <
MX7D_PAD_ECSPI2_SS0__GPIO4_IO23 0x14 // DIS_RST @ SODIMM 65
MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2 0x14 // DIS_D/CX @ SODIMM 63
>;
};
};
&ecspi3 {
// Enable the SPI controller
status = "okay";
// needed to avoid dtc warning
#address-cells = <1>;
#size-cells = <0>;
mcp2515: can@0 {
status = "disabled";
};
// To keep the CAN controller enabled by default,
// disable conflicting spidev. This spidev device
// enables with the devicetree overlay.
//
spidev0: spidev@0 {
status = "disabled";
};
display: display@0{
compatible = "sitronix,st7789v";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_disp_gpio>;
reg = <0>; // Chip Select 0
spi-max-frequency = <32000000>; // 32MHz
reset-gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;
dc-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
width = <320>;
height = <240>;
buswidth = <8>; // Most controllers use this value
// This is a hack to prevent fb_s6d02a1.c:set_var() from issuing
// command 0x36 after the init sequence has been applied and thus
// changing the config.
rotate = <1>;
debug = <0x4000000>; // Print init commands to the kernel log
status = "okay";
};
};
(in any case I also added all my imx7d-colibri-emmc-eval-v3.dts).
All the others dts and dtsi files involved should be the same as for toradex eval board.
Unfortunately in this way I have no /dev/fb0 interface and I have these message in dmesg:
[ 1.518438] fb_st7789v spi2.0: Error applying setting, reverse things back
[ 1.525675] fb_st7789v: probe of spi2.0 failed with error -22
Any suggestion is really appreciated!
@shsasse in the emaning time are you able to have the splash screen? The first and preliminary solution for me should be to have display working as module and to have the splash screen…
Thanks a lot!
config_as_m (118.8 KB)
imx7d-colibri-emmc-eval-v3.dts (4.1 KB)