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.
Merge pull request radxa-pkg#303 from nascs/waveshare_lcd_dtsi
Waveshare lcd dtsi
- Loading branch information
Showing
9 changed files
with
192 additions
and
175 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
66 changes: 14 additions & 52 deletions
66
arch/arm64/boot/dts/rockchip/overlays/rk3399-spi1-waveshare35.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 |
---|---|---|
@@ -1,69 +1,31 @@ | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/pinctrl/rockchip.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
#define DISPLAY_SPI spi1 | ||
#include "waveshare35-lcd.dtsi" | ||
|
||
/ { | ||
metadata { | ||
title = "Enable Waveshare 3.5 inch Display on SPI1"; | ||
title = "Enable Waveshare 3.5inch RPi LCD (C) on SPI1"; | ||
compatible = "rockchip,rk3399"; | ||
category = "misc"; | ||
exclusive = "GPIO1_B0", "GPIO1_A7", "GPIO1_B1", "GPIO1_B2", "GPIO4_D2", "GPIO4_D4", "GPIO4_D5" ; | ||
description = "Enable Waveshare 3.5 inch Display on SPI1."; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
ili9486_pins { | ||
ili9486_pins: ili9486-pins { | ||
rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>, | ||
<4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; | ||
}; | ||
description = "Enable Waveshare 3.5inch RPi LCD (C) on SPI1."; | ||
}; | ||
}; | ||
|
||
&spi1 { | ||
status = "okay"; | ||
max-freq = <48000000>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
&DISPLAY_SPI { | ||
num-cs = <2>; | ||
cs-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH | ||
&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; | ||
pinctrl-names = "default", "high_speed"; | ||
pinctrl-0 = <&spi1_clk &spi1_rx &spi1_tx>; | ||
}; | ||
|
||
ili9486@0 { | ||
compatible = "ilitek,ili9486"; | ||
reg = <0>; | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&ili9486_pins>; | ||
spi-max-frequency = <15000000>; | ||
txbuflen = <32768>; | ||
rotate = <90>; | ||
bgr = <0>; | ||
fps = <30>; | ||
buswidth = <8>; | ||
regwidth = <16>; | ||
reset-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_LOW>; | ||
dc-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; | ||
debug = <0>; | ||
}; | ||
&ili9486 { | ||
reset-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_LOW>; | ||
dc-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
ads7846@1 { | ||
compatible = "ti,ads7846"; | ||
status = "okay"; | ||
reg = <1>; | ||
id = <1>; | ||
spi-max-frequency = <2000000>; | ||
interrupts = <RK_PC2 IRQ_TYPE_EDGE_FALLING>; | ||
interrupt-parent = <&gpio4>; | ||
pendown-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>; | ||
ti,x-plate-ohms = /bits/ 16 <60>; | ||
ti,pressure-max = /bits/ 16 <255>; | ||
ti,swap-xy = <0>; | ||
vcc-supply = <&vcc5v0_sys>; | ||
}; | ||
&ads7846 { | ||
interrupts = <RK_PC2 IRQ_TYPE_EDGE_FALLING>; | ||
interrupt-parent = <&gpio4>; | ||
pendown-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>; | ||
}; |
36 changes: 36 additions & 0 deletions
36
arch/arm64/boot/dts/rockchip/overlays/rk3399-spi1-waveshare35b.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,36 @@ | ||
#include "rk3399-spi1-waveshare35.dts" | ||
|
||
/ { | ||
metadata { | ||
title = "Enable Waveshare 3.5inch RPi LCD (B) on SPI1 (No Touch Support)"; | ||
exclusive = "GPIO1_B0", "GPIO1_A7", "GPIO1_B1", "GPIO1_B2", "GPIO4_D4", "GPIO4_D5" ; | ||
description = "Enable Waveshare 3.5inch RPi LCD (B) on SPI1 (No Touch Support).\nDue to hardware conflict, touch is not available when using with ROCK 4."; | ||
}; | ||
}; | ||
|
||
&DISPLAY_SPI { | ||
/delete-property/ num-cs; | ||
/delete-property/ cs-gpios; | ||
pinctrl-0 = <&spi1_clk &spi1_cs0 &spi1_rx &spi1_tx>; | ||
}; | ||
|
||
&ili9486 { | ||
init = <0x10000b0 0x0 | ||
0x1000011 | ||
0x20000ff | ||
0x1000021 | ||
0x100003a 0x55 | ||
0x10000c2 0x33 | ||
0x10000c5 0x0 0x1e 0x80 | ||
0x1000036 0x28 | ||
0x10000b1 0xb0 | ||
0x10000e0 0x0 0x13 0x18 0x4 0xf 0x6 0x3a 0x56 0x4d 0x3 0xa 0x6 0x30 0x3e 0xf | ||
0x10000e1 0x0 0x13 0x18 0x1 0x11 0x6 0x38 0x34 0x4d 0x6 0xd 0xb 0x31 0x37 0xf | ||
0x1000011 | ||
0x20000ff | ||
0x1000029>; | ||
}; | ||
|
||
&ads7846 { | ||
status = "disabled"; | ||
}; |
55 changes: 14 additions & 41 deletions
55
arch/arm64/boot/dts/rockchip/overlays/rk3568-spi3-m0-cs0-waveshare35.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 |
---|---|---|
@@ -1,56 +1,29 @@ | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/pinctrl/rockchip.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
#define DISPLAY_SPI spi3 | ||
#include "waveshare35-lcd.dtsi" | ||
|
||
/ { | ||
metadata { | ||
title = "Enable Waveshare 3.5 inch Display on SPI3"; | ||
title = "Enable Waveshare 3.5inch RPi LCD (C) on SPI3"; | ||
compatible = "radxa,cm3-io", "radxa,cm3-rpi-cm4-io"; | ||
category = "misc"; | ||
exclusive = "GPIO4_A6", "GPIO3_C6", "GPIO3_D3", "GPIO0_C7", "GPIO4_B0", "GPIO4_B2", "GPIO4_B3"; | ||
description = "Enable Waveshare 3.5 inch Display on SPI3."; | ||
description = "Enable Waveshare 3.5inch RPi LCD (C) on SPI3."; | ||
}; | ||
}; | ||
|
||
&spi3 { | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
&DISPLAY_SPI { | ||
pinctrl-names = "default", "high_speed"; | ||
pinctrl-0 = <&spi3m0_cs0 &spi3m0_pins>; | ||
pinctrl-1 = <&spi3m0_cs0 &spi3m0_pins_hs>; | ||
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 = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>; | ||
dc-gpios = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; | ||
debug = <0>; | ||
}; | ||
&ili9486 { | ||
reset-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>; | ||
dc-gpios = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
ads7846@1 { | ||
compatible = "ti,ads7846"; | ||
status = "okay"; | ||
reg = <1>; | ||
id = <1>; | ||
spi-max-frequency = <2000000>; | ||
interrupts = <RK_PC7 IRQ_TYPE_EDGE_FALLING>; | ||
interrupt-parent = <&gpio0>; | ||
pendown-gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; | ||
ti,x-plate-ohms = /bits/ 16 <60>; | ||
ti,pressure-max = /bits/ 16 <255>; | ||
ti,swap-xy = <0>; | ||
vcc-supply = <&vcc5v0_sys>; | ||
}; | ||
&ads7846 { | ||
interrupts = <RK_PC7 IRQ_TYPE_EDGE_FALLING>; | ||
interrupt-parent = <&gpio0>; | ||
pendown-gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; | ||
}; |
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
25 changes: 25 additions & 0 deletions
25
arch/arm64/boot/dts/rockchip/overlays/rk3568-spi3-m1-cs0-waveshare35b.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,25 @@ | ||
#include "rk3568-spi3-m1-cs0-waveshare35.dts" | ||
|
||
/ { | ||
metadata { | ||
title = "Enable Waveshare 3.5inch RPi LCD (B) on SPI3-M1"; | ||
description = "Enable Waveshare 3.5inch RPi LCD (B) on SPI3-M1.\nHDMI CEC function will be turned off when this overlay is enabled."; | ||
}; | ||
}; | ||
|
||
&ili9486 { | ||
init = <0x10000b0 0x0 | ||
0x1000011 | ||
0x20000ff | ||
0x1000021 | ||
0x100003a 0x55 | ||
0x10000c2 0x33 | ||
0x10000c5 0x0 0x1e 0x80 | ||
0x1000036 0x28 | ||
0x10000b1 0xb0 | ||
0x10000e0 0x0 0x13 0x18 0x4 0xf 0x6 0x3a 0x56 0x4d 0x3 0xa 0x6 0x30 0x3e 0xf | ||
0x10000e1 0x0 0x13 0x18 0x1 0x11 0x6 0x38 0x34 0x4d 0x6 0xd 0xb 0x31 0x37 0xf | ||
0x1000011 | ||
0x20000ff | ||
0x1000029>; | ||
}; |
56 changes: 15 additions & 41 deletions
56
arch/arm64/boot/dts/rockchip/overlays/rk3588-spi0-m1-cs0-waveshare35.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 |
---|---|---|
@@ -1,55 +1,29 @@ | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/pinctrl/rockchip.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
#define DISPLAY_SPI spi0 | ||
#include "waveshare35-lcd.dtsi" | ||
|
||
/ { | ||
metadata { | ||
title = "Enable Waveshare 3.5 inch Display on SPI0"; | ||
title = "Enable Waveshare 3.5inch RPi LCD (C) on SPI0-M0"; | ||
compatible = "radxa,cm5-io"; | ||
category = "misc"; | ||
exclusive = "GPIO1_B1", "GPIO1_D5", "GPIO4_A0", "GPIO4_A1", "GPIO4_A2", "GPIO4_A6", "GPIO4_B2" ; | ||
description = "Enable Waveshare 3.5 inch Display on SPI0."; | ||
description = "Enable Waveshare 3.5inch RPi LCD (C) on SPI0-M0.\nTouch is temporarily unavailable."; | ||
}; | ||
}; | ||
|
||
&spi0 { | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
&DISPLAY_SPI { | ||
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>; | ||
}; | ||
&ili9486 { | ||
reset-gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; // GPIO1_B1 | ||
dc-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>; // GPIO1_D5 | ||
}; | ||
|
||
ads7846@1 { | ||
compatible = "ti,ads7846"; | ||
status = "okay"; | ||
reg = <1>; | ||
id = <1>; | ||
spi-max-frequency = <2000000>; | ||
interrupt-parent = <&gpio4>; | ||
interrupts = <RK_PA6 IRQ_TYPE_EDGE_FALLING>; | ||
pendown-gpio = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>; | ||
ti,x-plate-ohms = /bits/ 16 <60>; | ||
ti,pressure-max = /bits/ 16 <255>; | ||
ti,swap-xy = <0>; | ||
vcc-supply = <&vcc5v0_sys>; | ||
}; | ||
&ads7846 { | ||
status = "disabled"; | ||
interrupt-parent = <&gpio4>; | ||
interrupts = <RK_PA6 IRQ_TYPE_EDGE_FALLING>; | ||
pendown-gpio = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>; | ||
}; |
Oops, something went wrong.