0x01.硬件链接
-------------------------------------------------------------------------------
[st7789] [licheepi zero]
CK <--------------> SPI0_CLK
SI <--------------> SPI0_SI
SO <--------------> SPI0_SO
CS <--------------> SPI0_CS
DC <--------------> PE1
RST <--------------> PE20
0x02.增加驱动ST7789驱动
-------------------------------------------------------------------------------
make ARCH=arm menuconfig
CONFIG_FB_TFT=y
CONFIG_FB_TFT_ST7789V=y
0x03.删除sun8i-v3s.dtsi中的
chosen {
#address-cells = <1>;
#size-cells = <1>;
ranges;
simplefb_lcd: framebuffer@0 {
compatible = "allwinner,simple-framebuffer",
"simple-framebuffer";
allwinner,pipeline = "de0-lcd0";
clocks = <&ccu CLK_BUS_TCON0>, <&display_clocks 0>,
<&display_clocks 6>, <&ccu CLK_TCON0>;
status = "disabled";
};
};
0x04.修改sun8i-v3s-licheepi-zero-dock.dts文件
-------------------------------------------------------------------------------
#include "sun8i-v3s-licheepi-zero.dts"
#include <dt-bindings/input/input.h>
/ {
model = "Lichee Pi Zero with Dock";
compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
"allwinner,sun8i-v3s";
aliases {
ethernet0 = &emac;
};
leds {
/* The LEDs use PG0~2 pins, which conflict with MMC1 */
status = "disbaled";
};
chosen {
/delete-node/ framebuffer@0;
};
};
&spi0 {
status = "okay";
panel@0 {
compatible = "sitronix,st7789v";
reg = <0>;
reset-gpios = <&pio 4 20 GPIO_ACTIVE_LOW>;
dc-gpios = <&pio 4 1 GPIO_ACTIVE_LOW>;
/*backlight = <&pwm_bl>;*/
spi-max-frequency = <50000000>;
/*spi-cpol;*/
/*spi-cpha;*/
buswidth = <8>;
rotate = <270>;
bgr;
fps = <30>;
/*
port {
panel_input: endpoint {
remote-endpoint = <&tcon0_out_panel>;
};
};
*/
};
};
离线
波形是怎么样的
log 是怎样的
log好像没看到问题
离线