Skip to content

Commit

Permalink
cm5 io: add waveshare spi lcd support
Browse files Browse the repository at this point in the history
Signed-off-by: Nascs Fang <[email protected]>
  • Loading branch information
nascs committed Feb 5, 2024
1 parent 8f0e2b5 commit c0b0186
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ dtb-$(CONFIG_CLK_RK3588) += \
rk3588-spi0-m0-cs0-spidev.dtbo \
rk3588-spi0-m1-cs0-mcp2515-8mhz.dtbo \
rk3588-spi0-m1-cs0-spidev.dtbo \
rk3588-spi0-m1-cs0-waveshare35.dtbo \
rk3588-spi0-m1-cs1-spidev.dtbo \
rk3588-spi0-m2-cs0-mcp2515-8mhz.dtbo \
rk3588-spi0-m2-cs0-spidev.dtbo \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
metadata {
title = "Enable Waveshare 3.5 inch Display on SPI0";
compatible = "radxa,cm5-io";
category = "misc";
exclusive = "GPIO1_B1", "GPIO1_D5", "GPIO4_A0", "GPIO4_A1", "GPIO4_A2", "GPIO4_B2" ;
description = "Enable Waveshare 3.5 inch Display on SPI0.";
};

fragment@0 {
target = <&spi0>;

__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi0m1_cs0 &spi0m1_pins>;
max-freq = <16000000>;

ili9486@0 {
compatible = "ilitek,ili9486";
reg = <0>;
spi-max-frequency = <16000000>;
txbuflen = <32768>;
rotate = <90>;
bgr = <0>;
fps = <30>;
buswidth = <8>;
regwidth = <16>;
reset-gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; // GPIO1_B1
dc-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>; // GPIO1_D5
debug = <0>;
};
};
};
};

0 comments on commit c0b0186

Please sign in to comment.