forked from radxa-pkg/radxa-overlays
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nascs Fang <[email protected]>
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
arch/arm64/boot/dts/rockchip/overlays/rk3568-spi3-m1-cs0-st7735.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#define DISPLAY_SPI spi3 | ||
#include "st7735.dtsi" | ||
|
||
/ { | ||
metadata { | ||
title = "Enable ST7735 LCD on SPI3-M1"; | ||
compatible = "radxa,rock-3c", "radxa,zero3"; | ||
category = "display"; | ||
exclusive = "GPIO4_A6", "GPIO4_C6", "GPIO3_C1", "GPIO3_B2", "GPIO3_A1", "GPIO4_D1", "GPIO4_B2", "GPIO4_B3"; | ||
description = "Enable ST7735 LCD on SPI3-M1. | ||
HDMI CEC function will be turned off when this overlay is enabled."; | ||
}; | ||
}; | ||
|
||
&DISPLAY_SPI { | ||
pinctrl-names = "default", "high_speed"; | ||
pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>; | ||
pinctrl-1 = <&spi3m1_cs1 &spi3m1_pins_hs>; | ||
}; | ||
|
||
&ili9486 { | ||
reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; | ||
dc-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
&ads7846 { | ||
interrupts = <RK_PA1 IRQ_TYPE_EDGE_FALLING>; | ||
interrupt-parent = <&gpio3>; | ||
pendown-gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
&hdmi { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&hdmitx_scl &hdmitx_sda>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef __WAVESHARE35_LCD_DTSI__ | ||
#define __WAVESHARE35_LCD_DTSI__ | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/pinctrl/rockchip.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
|
||
/dts-v1/; | ||
/plugin/; | ||
|
||
#ifndef DISPLAY_SPI | ||
#error "DISPLAY_SPI is undefined." | ||
#endif | ||
|
||
&DISPLAY_SPI { | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
st7789: st7789@0 { | ||
compatible = "ilitek,ili9486"; | ||
reg = <0>; | ||
spi-max-frequency = <16000000>; | ||
txbuflen = <32768>; | ||
rotate = <90>; | ||
bgr = <0>; | ||
fps = <60>; | ||
width = <135>; | ||
height = <240>; | ||
buswidth = <8>; | ||
regwidth = <16>; | ||
debug = <0>; | ||
}; | ||
|
||
}; | ||
|
||
#endif // __WAVESHARE35_LCD_DTSI__ |