Page 1 of 1

pico mini 是不支持fbtft吗

Posted: 2024-07-17 2:12
by tanxw
我尝试了很多方法启用fbtft没有效果,官方说明好像没有提到mini能用fbtft
657F66653DDFF43338FB5660C3B8FB70.png

Code: Select all

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2023 Luckfox Electronics Co., Ltd.
 */

/dts-v1/;

#include "rv1103.dtsi"
#include "rv1106-evb.dtsi"
#include "rv1103-luckfox-pico-ipc.dtsi"

/ {
	model = "Luckfox Pico Mini B";
	compatible = "rockchip,rv1103g-38x38-ipc-v10", "rockchip,rv1103";

	/* LCD_DC */
    gpio1pc4: gpio1pc4 {
        compatible = "regulator-fixed";
        pinctrl-names = "default";
        pinctrl-0 = <&gpio1_pc4>;
        regulator-name = "gpio1_pc4";
        regulator-always-on;
    };


	/*LCD_BL*/
	gpio1pc5:gpio1pc5 {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&gpio1_pc5>;
		regulator-name = "gpio1_pc5";
		regulator-always-on;
	}; 


	
	/*LCD_RESET*/
	gpio1pc3:gpio1pc3 {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&gpio1_pc3>;
		regulator-name = "gpio1_pc3";
		regulator-always-on;
	}; 

};


// SPI
&spi0 {
	status = "okay";
	pinctrl-0 = <&spi0m0_clk &spi0m0_mosi &spi0m0_cs0>;
	spidev@0 {
        status = "disabled";
    };
  	st7789v@0{
		status = "okay";
		compatible = "sitronix,st7789v";
		reg = <0>;
		spi-max-frequency = <3000000>;
		spi-cpol;
        spi-cpha;
		rgb;
		rotate = <0>;
		fps = <30>;
		buswidth = <8>;
		debug = <0>;
		led-gpios = <&gpio1 RK_PC5 GPIO_ACTIVE_LOW>;      //BL
		dc = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;      //DC
		reset = <&gpio1 RK_PC3 GPIO_ACTIVE_LOW>;    //RES
  	};
};

&pinctrl {
	spi0 {
		spi0m0_clk: spi0m0-clk {
			rockchip,pins = <1 RK_PC1 4 &pcfg_pull_none>;
		};
		spi0m0_mosi: spi0m0-mosi {
			rockchip,pins = <1 RK_PC2 6 &pcfg_pull_none>;
		};
		spi0m0_cs0: spi0m0-cs0 {
			rockchip,pins = <1 RK_PC0 4 &pcfg_pull_none>;
		};
	};

	gpio1-pc3 {
		gpio1_pc3:gpio1-pc3 {
			rockchip,pins = <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	gpio1-pc4 {
		gpio1_pc4:gpio1-pc4 {
			rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	gpio1-pc5 {
		gpio1_pc5:gpio1-pc5 {
			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

};

/**********SFC**********/
&sfc {
	status = "okay";
	flash@0 {
		compatible = "spi-nand";
		reg = <0>;
		spi-max-frequency = <75000000>;
		spi-rx-bus-width = <4>;
		spi-tx-bus-width = <1>;
	};
};

/**********SDMMC**********/
&sdmmc {
	max-frequency = <50000000>;
	no-sdio;
	no-mmc;
	bus-width = <4>;
	cap-mmc-highspeed;
	cap-sd-highspeed;
	disable-wp;
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;
	status = "okay";
};

/**********ETH**********/
&gmac {
	status = "disabled";
};

/**********USB**********/
&usbdrd_dwc3 {
	status = "okay";
	dr_mode = "peripheral";
};


/**********I2C**********/
/* I2C3_M1 */
&i2c3 {
	status = "disabled";
	clock-frequency = <100000>;
};

/**********UART**********/
/* UART3_M1 */
&uart3 {
	status = "disabled";
};

/* UART4_M1 */
&uart4 {
	status = "disabled";
};

/**********PWM**********/
/* PWM1_M0 */
&pwm1 {
	status = "disabled";
};






Re: pico mini 是不支持fbtft吗

Posted: 2024-07-17 2:24
by Luckfox Taylor
FBTFT 是一个用于 Linux 内核的小型 TFT LCD 显示屏驱动程序框架。Luckfox Pico系列使用相同的内核驱动,肯定是支持的。市面上屏幕不但种类繁多,还要自己去接线,我们工程师优先适配的是代理微雪的屏幕,Mini 和 Ultra就无法直插在屏幕上了,所以在Luckfox-config里面暂时是没适配的。

Re: pico mini 是不支持fbtft吗

Posted: 2024-07-17 2:35
by tanxw
是的,我自行接的线。屏幕是st7789,然后使用上面的dts文件。通过测量 scl / mosi 均无电平信号。您能帮我看看是dts文件出了什么问题吗。谢谢

Re: pico mini 是不支持fbtft吗

Posted: 2024-07-17 12:21
by Luckfox Taylor
在最新的SDK的rv1103-luckfox-pico-ipc.dtsi中已经定义了fbtft的设备树,如果在dts子节点命名不一致是无法覆盖dtsi的。
mini_fbtft_dts.zip (863 Bytes)
Downloaded 362 times
fbtft-mini.jpg