导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    SPI 驱动 ST7789VW 2.4 寸 LCD发生Label or path lcd_fb not found

    V Series
    2
    3
    196
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • Z
      zhanweixin LV 5 最后由 编辑

      在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 { ... } 则可以编译通过,请问这是何故?

      1 条回复 最后回复 回复 引用 分享 0
      • Z
        zhanweixin LV 5 最后由 编辑

        通过分析错误日志,并结合阅读$SDK_PATH/bsp/configs/linux-5.4-ansc/sun300iw1p1.dtsi,
        将板级board.dts里将&lcd_fb{ .... } 修正为&lcd_fb0{ .... }
        该问题顺利解决

        1 条回复 最后回复 回复 引用 分享 1
        • A
          awwwwa LV 8 最后由 awwwwa 编辑

          文档提供的驱动为新版本,需要更新,补丁如下,进入 bsp 文件夹打入:
          0003-K1-sunxi-P2-lcd_fb-add-support-for-qspi-lcd.patch
          0002-K1-sunxi-P2-lcd_fb-optimize-code-and-directory-struc.patch
          0001-K1-sunxi-P2-disp-lcd_fb-fix-build-fail-when-enable-D.patch

          1 条回复 最后回复 回复 引用 分享 1
          • 1 / 1
          • First post
            Last post

          Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

          行为准则 | 用户协议 | 隐私权政策