Skip to content

Commit

Permalink
Merge pull request #281 from 0101wu/develop
Browse files Browse the repository at this point in the history
rock 3c: add waveshare35 support
  • Loading branch information
RadxaYuntian authored Apr 23, 2024
2 parents 602a8eb + be99de1 commit 644f131
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ dtb-$(CONFIG_CLK_RK3568) += \
rk3568-spi3-m0-cs0-mcp2515.dtbo \
rk3568-spi3-m0-cs0-spidev.dtbo \
rk3568-spi3-m0-cs0-waveshare35.dtbo \
rk3568-spi3-m1-cs0-waveshare35.dtbo \
rk3568-spi3-m0-cs1-spidev.dtbo \
rk3568-spi3-m1-cs0-enc28j60.dtbo \
rk3568-spi3-m1-cs0-mcp2515-gpio4_d1.dtbo \
Expand Down Expand Up @@ -263,7 +264,7 @@ dtb-$(CONFIG_CLK_RK3568) += \
rock-3c-raspberrypi-7inch-touchscreen.dtbo \
rock-3c-rpi-camera-v1p3.dtbo \
rock-3c-rpi-camera-v2.dtbo \
rock-3c-radxa-camera-8m.dtbo
rock-3c-radxa-camera-8m.dtbo

dtb-$(CONFIG_CPU_RK3568) += \
radxa-cm3-io-sata1.dtbo \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/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.5inch RPi LCD (C) 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 Waveshare 3.5inch RPi LCD (C) on SPI3-M1.\nHDMI CEC function will be turned off when this overlay is enabled.";
};
};

&spi3 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default", "high_speed";
pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>;
pinctrl-1 = <&spi3m1_cs1 &spi3m1_pins_hs>;
max-freq = <16000000>;

ili9486@0 {
compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486";
reg = <0>;
spi-max-frequency = <16000000>;
txbuflen = <32768>;
rotate = <90>;
bgr = <0>;
fps = <30>;
buswidth = <8>;
regwidth = <16>;
reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
dc-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>;
debug = <0>;
};

ads7846@1 {
compatible = "ti,ads7846";
status = "okay";
reg = <1>;
id = <1>;
spi-max-frequency = <2000000>;
interrupts = <RK_PA1 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpio3>;
pendown-gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
ti,x-plate-ohms = /bits/ 16 <60>;
ti,pressure-max = /bits/ 16 <255>;
ti,swap-xy = <0>;
ti,invert-y = <1>;
vcc-supply = <&vcc5v0_sys>;
};
};

&hdmi {
pinctrl-names = "default";
pinctrl-0 = <&hdmitx_scl &hdmitx_sda>;
};

0 comments on commit 644f131

Please sign in to comment.