Page 1 of 1

luckfox连接pico-lcd-1.3不能显示

Posted: 2024-07-11 4:46
by suker
目标:luckfox Pico点亮 pico-lcd-1.3
1.参考https://wiki.luckfox.com/zh/Luckfox-Pico/Luckfox-Pico-LVGL
(1)完成GPIO定义(将luckfox pro的引脚修改为Luckfox-Pico)
(2)增加spi定义
&spi0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0m0_cs0 &spi0m0_pins>;

st7789v@0{
status = "okay";
compatible = "sitronix,st7789v";
reg = <0>;
spi-max-frequency = <20000000>;
fps = <30>;
buswidth = <8>;
debug = <0x7>;
led-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>;//BL
dc = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>; //DC
reset = <&gpio1 RK_PC3 GPIO_ACTIVE_LOW>; //RES
};
};

&pinctrl {
spi0 {
/omit-if-no-ref/
spi0m0_pins: spi0m0-pins {
rockchip,pins =
/* spi0_clk_m0 */
<1 RK_PC1 4 &pcfg_pull_none>,
/* spie_miso_m0 */
// <1 RK_PC3 6 &pcfg_pull_none>,
/* spi_mosi_m0 */
<1 RK_PC2 6 &pcfg_pull_none>;
};
};
};
(3)<SDK目录>/sysdrv/source/kernel/arch/arm/configs/luckfox_rv1106_linux_defconfig
在配置中增加fb支持
CONFIG_SPI_MASTER=y
CONFIG_FB=y

故障现象:
(1)编译下载程序后,dev文件夹中没有fb0设备
(2)cat /dev/urandom > /dev/fb0 不花屏,后报错cat: write error: No space left on device
(3)/sys/class/gpio文件夹下,没有出现设置的GPIO接口

另外还想请教一个问题?luckfox-pico不能编译为spi nand flash吗?
谢谢!

Re: luckfox连接pico-lcd-1.3不能显示

Posted: 2024-07-11 7:58
by Luckfox Taylor
设备树的修改参考:http://forums.luckfox.com/viewtopic.php?t=840
也可以去烧录我们的最新镜像,支持在luckfox-config里面打开FB:https://wiki.luckfox.com/zh/Luckfox-Pico/Download
我们luckfox pico硬件没有焊接flash。如果自己焊接要自己去调试了。

Re: luckfox连接pico-lcd-1.3不能显示

Posted: 2024-07-14 12:37
by suker
调试了很久,1103-Luckfox-pico连接的pico-led-1.3还是没有显示
1.我观察不存在/dev/fb0 是不是不正常
2.在rv1103-luckfox-pico.dts里设置了GPIO,烧写固件运行后,在sys/class/gpio里看不到定义的GPIO口,这是不是不正常。

我把几个修改的文件传上来,帮忙看看是不是有错误
文件一:rv1103g-luckfox-pico.dts
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

/*

* Copyright (c) 2022 Rockchip Electronics Co., Ltd.

*/



/dts-v1/;



#include "rv1103.dtsi"

#include "rv1106-evb.dtsi"

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



/ {

model = "Luckfox Pico";

compatible = "rockchip,rv1103g-38x38-ipc-v10", "rockchip,rv1103";

gpio1pc7:gpio1pc7 {

compatible = "regulator-fixed";

pinctrl-names = "default";

pinctrl-0 = <&gpio1_pc7>;

regulator-name = "gpio1_pc7";

regulator-always-on;

};



gpio1pc0:gpio1pc0 {

compatible = "regulator-fixed";

pinctrl-names = "default";

pinctrl-0 = <&gpio1_pc0>;

regulator-name = "gpio1_pc0";

regulator-always-on;

};



gpio1pa2:gpio1pa2 {

compatible = "regulator-fixed";

pinctrl-names = "default";

pinctrl-0 = <&gpio1_pa2>;

regulator-name = "gpio1_pa2";

regulator-always-on;

};





gpio1pc3:gpio1pc3 {

compatible = "regulator-fixed";

pinctrl-names = "default";

pinctrl-0 = <&gpio1_pc3>;

regulator-name = "gpio1_pc3";

regulator-always-on;

};



gpio0pa4:gpio0pa4 {

compatible = "regulator-fixed";

pinctrl-names = "default";

pinctrl-0 = <&gpio0_pa4>;

regulator-name = "gpio0_pa4";

regulator-always-on;

};

};



/**********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";

};



&pinctrl {

gpio1-pc7 {

gpio1_pc7:gpio1-pc7 {

rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;

};

};



gpio1-pc0 {

gpio1_pc0:gpio1-pc0 {

rockchip,pins = <1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;

};

};



gpio1-pa2 {

gpio1_pa2:gpio1-pa2 {

rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;

};

};



gpio1-pc3 {

gpio1_pc3:gpio1-pc3 {

rockchip,pins = <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;

};

};



gpio0-pa4 {

gpio0_pa4:gpio0-pa4 {

rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;

};

};



};



/**********ETH**********/

&gmac {

status = "disabled";

};



/**********USB**********/

&usbdrd_dwc3 {

status = "okay";

dr_mode = "peripheral";

};



/**********I2C**********/

/* I2C3_M1 */

&i2c3 {

status = "disabled";

clock-frequency = <100000>;

};





/**********SPI**********/



&spi0 {

status = "okay";

pinctrl-names = "default";

pinctrl-0 = <&spi0m0_cs0 &spi0m0_pins>;

spidev@0 {

status = "disabled";

};

st7789v@0{

status = "okay";

compatible = "sitronix,st7789v";

reg = <0>;

spi-max-frequency = <6000000>;//20000000

fps = <30>;

buswidth = <8>;

debug = <0x7>;

led-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;//BL

dc = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; //DC

reset = <&gpio1 RK_PC3 GPIO_ACTIVE_LOW>; //RES

};

};





&pinctrl {

spi0 {

/omit-if-no-ref/

spi0m0_pins: spi0m0-pins {

rockchip,pins =

/* spi0_clk_m0 */

<1 RK_PC1 4 &pcfg_pull_none>,

/* spie_miso_m0 */

// <1 RK_PC3 6 &pcfg_pull_none>,

/* spi_mosi_m0 */

<1 RK_PC2 6 &pcfg_pull_none>;

};

};

};



/**********UART**********/

/* UART3_M1 */

&uart3 {

status = "disabled";

};



/* UART4_M1 */

&uart4 {

status = "disabled";

};



/**********PWM**********/

/* PWM1_M0 */

&pwm1 {

status = "disabled";

};

文件二:luckfox_rv1106_linux_defconfig
增加了两句话
CONFIG_SPI_MASTER=y
CONFIG_FB=y