mirror of
https://github.com/sipeed/LicheeRV-Nano-Build.git
synced 2026-11-09 18:04:55 -06:00
add spi lcd support
This commit is contained in:
@@ -233,6 +233,7 @@
|
||||
clocks = <&clk CV181X_CLK_SPI>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
spi3:spi3@041B0000 {
|
||||
|
||||
@@ -145,6 +145,23 @@
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
|
||||
// /delete-node/ spidev@0;
|
||||
st7789: st7789@0{
|
||||
compatible = "sitronix,st7789";
|
||||
reg = <0>;
|
||||
status = "disabled";
|
||||
spi-max-frequency = <80000000>;
|
||||
spi-cpol;
|
||||
spi-cpha;
|
||||
rotate = <0>;
|
||||
fps = <60>;
|
||||
rgb;
|
||||
buswidth = <8>;
|
||||
dc = <&porte 20 GPIO_ACTIVE_HIGH>;
|
||||
reset = <&porta 14 GPIO_ACTIVE_LOW>;
|
||||
debug = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
|
||||
@@ -357,6 +357,8 @@ CONFIG_VIDEO_CVITEK_MIPI_TX=m
|
||||
# end of Digital TV options
|
||||
|
||||
CONFIG_FB=y
|
||||
# CONFIG_FB_TFT is not set
|
||||
# CONFIG_FB_TFT_ST7789 is not set
|
||||
CONFIG_FB_CVITEK=m
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
@@ -556,6 +558,7 @@ CONFIG_VT=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=m
|
||||
CONFIG_BACKLIGHT_PWM=m
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_DESIGNWARE=y
|
||||
CONFIG_SPI_DW_MMIO=y
|
||||
CONFIG_SPI_GPIO=m
|
||||
|
||||
@@ -88,6 +88,14 @@ int cvi_board_init(void)
|
||||
mmio_write_32(0x030010E0, 0x0); // CMD
|
||||
mmio_write_32(0x030010E4, 0x0); // CLK
|
||||
|
||||
// spi2 pinmux
|
||||
// mmio_write_32(0x030010D0, 0x1); // CS
|
||||
// mmio_write_32(0x030010DC, 0x1); // MISO
|
||||
// mmio_write_32(0x030010E0, 0x1); // MOSI
|
||||
// mmio_write_32(0x030010E4, 0x1); // SCK
|
||||
// mmio_write_32(0x030010D8, 0x3); // DC
|
||||
// mmio_write_32(0x03001038, 0x3); // RESET
|
||||
|
||||
// uart bluetooth
|
||||
mmio_write_32(0x03001070, 0x1); // GPIOA 28 UART1 TX
|
||||
mmio_write_32(0x03001074, 0x1); // GPIOA 29 UART1 RX
|
||||
|
||||
Reference in New Issue
Block a user