SPI 驱动 ST7789VW 2.4 寸 LCD发生Label or path lcd_fb not found
-
在V821的TINA-SDK里,参考链接文本适配2.4寸LCD
在board.dts树里定义如下:&pio { spi1_pins_default: spi1@0 { pins = "PD14", "PD15", "PD16"; /* CS, SCK, SDA */ function = "spi1"; allwinner,drive = <3>; }; spi1_pins_hold: spi1@1 { pins = "PD18"; /* DC */ function = "spi1_hold"; allwinner,drive = <3>; bias-pull-up; }; spi1_pins_sleep: spi1@2 { pins = "PD14", "PD15", "PD16", "PD18"; function = "io_disabled"; }; }; &spi1 { pinctrl-0 = <&spi1_pins_default &spi1_pins_hold>; pinctrl-1 = <&spi1_pins_sleep>; pinctrl-names = "default", "sleep"; clock-frequency = <100000000>; sunxi,spi-bus-mode = <SUNXI_SPI_BUS_DBI>; sunxi,spi-cs-mode = <SUNXI_SPI_CS_AUTO>; status = "okay"; panel_st7789v_spi1: slave@0 { device_type = "spi-panel"; compatible = "allwinner,spi-panel"; reg = <0x0>; spi-max-frequency = <100000000>; lcd_used = <1>; lcd_driver_name = "st7789v"; lcd_if = <0>; lcd_dbi_if = <2>; lcd_data_speed = <48>; lcd_x = <320>; lcd_y = <240>; lcd_pixel_fmt = <10>; lcd_dbi_fmt = <2>; lcd_rgb_order = <0>; lcd_width = <60>; lcd_height = <60>; lcd_pwm_used = <0>; lcd_pwm_ch = <6>; lcd_pwm_freq = <5000>; lcd_pwm_pol = <1>; lcd_frm = <1>; lcd_gamma_en = <1>; fb_buffer_num = <2>; lcd_backlight = <100>; lcd_fps = <60>; lcd_dbi_te = <0>; lcd_dbi_clk_mode = <0>; lcd_gpio_0 = <&pio PD 17 GPIO_ACTIVE_LOW>; status = "okay"; }; }; &lcd_fb { status = "okay"; port { #address-cells = <1>; #size-cells = <0>; spi_panel0: endpoint@0 { reg = <0>; remote-endpoint = <&panel_st7789v_spi1>; }; }; };
但在编译过程中发生如下错误:
Nothing to do for unsupport configuration make: Leaving directory '/data/V821/V821_SDK_V1.1/bsp/modules/gpu' [ GPU]: Build done ---build dts for sun300iw1p1 v2w----- INFO: Use die dtsi: /data/V821/V821_SDK_V1.1/bsp/configs/linux-5.4-ansc/sun300iw1p1.dtsi Error: /data/V821/V821_SDK_V1.1/device/config/chips/v821/configs/v2w/board.dts:520.1-8 Label or path lcd_fb not found FATAL ERROR: Syntax error parsing input tree ERROR: build -j4 Failed INFO: build kernel failed
如果在设备树里拿掉&lcd_fb { ... } 则可以编译通过,请问这是何故?
-
通过分析错误日志,并结合阅读$SDK_PATH/bsp/configs/linux-5.4-ansc/sun300iw1p1.dtsi,
将板级board.dts里将&lcd_fb{ .... } 修正为&lcd_fb0{ .... }
该问题顺利解决 -
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号