bcm27xx: switch to 5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0518-overlays-Add-minipitft13-overlay.patch
1 From 6c6596610381249719e87e324a9689cabc2a7cd8 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Thu, 18 Feb 2021 21:05:44 +0000
4 Subject: [PATCH] overlays: Add minipitft13 overlay
5
6 minipitft13 is an overlay for the Adafruit 1.3" 240x240 display
7 (code 4484).
8
9 See: https://github.com/raspberrypi/firmware/issues/1524
10
11 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
12 ---
13 arch/arm/boot/dts/overlays/Makefile | 1 +
14 .../boot/dts/overlays/minipitft13-overlay.dts | 70 +++++++++++++++++++
15 2 files changed, 71 insertions(+)
16 create mode 100644 arch/arm/boot/dts/overlays/minipitft13-overlay.dts
17
18 --- a/arch/arm/boot/dts/overlays/Makefile
19 +++ b/arch/arm/boot/dts/overlays/Makefile
20 @@ -119,6 +119,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
21 merus-amp.dtbo \
22 midi-uart0.dtbo \
23 midi-uart1.dtbo \
24 + minipitft13.dtbo \
25 miniuart-bt.dtbo \
26 mmc.dtbo \
27 mpu6050.dtbo \
28 --- /dev/null
29 +++ b/arch/arm/boot/dts/overlays/minipitft13-overlay.dts
30 @@ -0,0 +1,70 @@
31 +/*
32 + * Device Tree overlay for Adafruit Mini PiTFT 1.3" and 1.5" 240x240 Display
33 + *
34 + */
35 +
36 +/dts-v1/;
37 +/plugin/;
38 +
39 +/ {
40 + compatible = "brcm,bcm2835";
41 +
42 + fragment@0 {
43 + target = <&spi0>;
44 + __overlay__ {
45 + status = "okay";
46 +
47 + spidev@0{
48 + status = "disabled";
49 + };
50 +
51 + spidev@1{
52 + status = "disabled";
53 + };
54 + };
55 + };
56 +
57 + fragment@1 {
58 + target = <&gpio>;
59 + __overlay__ {
60 + pitft_pins: pitft_pins {
61 + brcm,pins = <25>;
62 + brcm,function = <1>; /* out */
63 + brcm,pull = <0>; /* none */
64 + };
65 + };
66 + };
67 +
68 + fragment@2 {
69 + target = <&spi0>;
70 + __overlay__ {
71 + /* needed to avoid dtc warning */
72 + #address-cells = <1>;
73 + #size-cells = <0>;
74 +
75 + pitft: pitft@0 {
76 + compatible = "fbtft,minipitft13";
77 + reg = <0>;
78 + pinctrl-names = "default";
79 + pinctrl-0 = <&pitft_pins>;
80 + spi-max-frequency = <32000000>;
81 + rotate = <0>;
82 + width = <240>;
83 + height = <240>;
84 + buswidth = <8>;
85 + dc-gpios = <&gpio 25 0>;
86 + led-gpios = <&gpio 26 0>;
87 + debug = <0>;
88 + };
89 + };
90 + };
91 +
92 + __overrides__ {
93 + speed = <&pitft>,"spi-max-frequency:0";
94 + rotate = <&pitft>,"rotate:0";
95 + width = <&pitft>,"width:0";
96 + height = <&pitft>,"height:0";
97 + fps = <&pitft>,"fps:0";
98 + debug = <&pitft>,"debug:0";
99 + };
100 +};