0

Orange Pi zero plusの SPI1 に接続された ST7789v LCD パネルを構成しようとしています。

モジュールST7789vを armbian 構成に追加し、デスクトップなしの buster リリースを使用してArmbianをコンパイルしました。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 を設定していないため、パネル ドライバが使用できない可能性があります。

4

1 に答える 1