我正在尝试配置一个ST7789v液晶面板连接在SPI1上的橙Pi零加。
我已经在ST7789v配置中添加了模块阿姆斯,并使用没有桌面的buster版本编译了阿姆斯。我将使用X服务器显示屏幕。该模块可在内核目录中使用。
我创建了一个*.dts文件,如下所示,并使用armbian-add-overlay命令编译了它。
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5";
fragment@0 {
target = <&spi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
spidev@0 {
compatible = "sitronix,st7789v";
reg = <0>;
reset-gpios = <&pio 0 2 0 >;
power-supply = <&pio 0 7 0 >;
buswidth = <8>;
dc-gpios = <&pio 0 7 0>;
spi-max-frequency = <32000000>;
spi-cpol;
spi-cpha;
rotate = <0x5a>; /* seems to work 10e */
};
};
};
fragment@1 {
target-path = "/";
__overlay__ {
leds {
compatible = "gpio-leds";
screen {
gpios = <&pio 0 6 0>; /* PA10 */
default-state = "on";
};
};
};
};
};屏幕正常工作。然而,它使用的不是面板驱动程序,而是fbtft中的那个。请参阅lsmod的输出:
root@orangepizeroplus:~# lsmod
Module Size Used by
8189fs 1445888 0
zstd 16384 4
cfg80211 356352 1 8189fs
fb_st7789v 16384 1
fbtft 40960 1 fb_st7789v
rfkill 28672 3 cfg80211
sun8i_codec_analog 32768 0
snd_soc_simple_card 24576 0
sun8i_adda_pr_regmap 16384 1 sun8i_codec_analog
sun4i_i2s 24576 0
snd_soc_simple_card_utils 20480 1 snd_soc_simple_card
sun4i_gpadc_iio 24576 0
snd_soc_core 176128 4 sun4i_i2s,sun8i_codec_analog,snd_soc_simple_card_utils,snd_soc_simple_card
ac97_bus 16384 1 snd_soc_core
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_pcm 106496 3 sun4i_i2s,snd_soc_core,snd_pcm_dmaengine
sun4i_tcon 32768 0
snd_timer 40960 1 snd_pcm
sun8i_mixer 40960 0
sun8i_tcon_top 16384 1 sun4i_tcon
snd 81920 3 snd_timer,snd_soc_core,snd_pcm
soundcore 16384 1 snd
cpufreq_dt 20480 0
zram 32768 2
sch_fq_codel 20480 6
usb_f_acm 20480 1
u_serial 32768 3 usb_f_acm
g_serial 16384 0
libcomposite 61440 2 g_serial,usb_f_acm
ip_tables 32768 0
x_tables 36864 1 ip_tables
autofs4 49152 2
realtek 24576 1
dwmac_sun8i 28672 0
mdio_mux 16384 1 dwmac_sun8i
gpio_regulator 16384 1
fixed 20480 3我也试图将fbtft模块列入黑名单,但屏幕没有启动。请参阅lsmod的输出:
root@orangepizeroplus:~# lsmod
Module Size Used by
zstd 16384 4
8189fs 1445888 0
cfg80211 356352 1 8189fs
snd_soc_simple_card 24576 0
sun8i_codec_analog 32768 0
rfkill 28672 3 cfg80211
snd_soc_simple_card_utils 20480 1 snd_soc_simple_card
sun8i_adda_pr_regmap 16384 1 sun8i_codec_analog
sun4i_i2s 24576 0
sun4i_gpadc_iio 24576 0
snd_soc_core 176128 4 sun4i_i2s,sun8i_codec_analog,snd_soc_simple_card_utils,snd_soc_simple_card
ac97_bus 16384 1 snd_soc_core
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_pcm 106496 3 sun4i_i2s,snd_soc_core,snd_pcm_dmaengine
snd_timer 40960 1 snd_pcm
snd 81920 3 snd_timer,snd_soc_core,snd_pcm
sun4i_tcon 32768 0
sun8i_tcon_top 16384 1 sun4i_tcon
soundcore 16384 1 snd
sun8i_mixer 40960 0
cpufreq_dt 20480 0
zram 32768 2
sch_fq_codel 20480 6
usb_f_acm 20480 1
u_serial 32768 3 usb_f_acm
g_serial 16384 0
libcomposite 61440 2 g_serial,usb_f_acm
ip_tables 32768 0
x_tables 36864 1 ip_tables
autofs4 49152 2
realtek 24576 1
dwmac_sun8i 28672 0
mdio_mux 16384 1 dwmac_sun8i
gpio_regulator 16384 1
fixed 20480 3请参阅这两个模块的modinfo。
root@orangepizeroplus:~# modinfo panel-sitronix-st7789v
filename: /lib/modules/5.4.47-sunxi64/kernel/drivers/gpu/drm/panel/panel-sitronix-st7789v.ko
license: GPL v2
description: Sitronix st7789v LCD Driver
author: Maxime Ripard <maxime.ripard@free-electrons.com>
alias: of:N*T*Csitronix,st7789vC*
alias: of:N*T*Csitronix,st7789v
depends:
intree: Y
name: panel_sitronix_st7789v
vermagic: 5.4.47-sunxi64 SMP mod_unload aarch64
signat: PKCS#7
signer:
sig_key:
sig_hashalgo: md4
root@orangepizeroplus:~# modinfo fb_st7789v
filename: /lib/modules/5.4.47-sunxi64/kernel/drivers/staging/fbtft/fb_st7789v.ko
license: GPL
author: Dennis Menschel
description: FB driver for the ST7789V LCD Controller
alias: platform:st7789v
alias: spi:st7789v
alias: platform:fb_st7789v
alias: spi:fb_st7789v
alias: of:N*T*Csitronix,st7789vC*
alias: of:N*T*Csitronix,st7789v
depends: fbtft
staging: Y
intree: Y
name: fb_st7789v
vermagic: 5.4.47-sunxi64 SMP mod_unload aarch64
signat: PKCS#7
signer:
sig_key:
sig_hashalgo: md4
root@orangepizeroplus:~# 为什么要用舞台上的那个?我遗漏了什么吗?也许面板驱动程序不能使用,因为我没有配置任何DRM?
发布于 2020-10-27 12:31:22
ST7789v的Arduino库:您可以从这个链接https://github.com/deirvlon/ST7789v-Arduino进行检查
https://stackoverflow.com/questions/62518768
复制相似问题