Skip to contentSkip to conversation

pitft: Add support for pitft35r

PATCH Superseded Rob Woolley 3 participants 3 messages Mar 31, 2017 – Apr 3, 2017 Broadcom BCM2711/BCM2835 Arm architecture

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pitft: Add support for pitft35r

The support for the PiTFT 3.5 inch resistive touchscreen is optional. It may be enabled by adding the following line in local.conf:

MACHINE_FEATURES += "pitft pitft35r"

---
 README                                  | 1 +
 conf/machine/include/rpi-base.inc       | 1 +
 conf/machine/raspberrypi3-64.conf       | 1 +
 recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
 4 files changed, 9 insertions(+)
README +1 -0
index 65a1e5f..a5c3d38 100644
@@ -240,6 +240,7 @@ the modelname should be added as a MACHINE_FEATURES in local.conf like below:
 List of currently supported models:
     - pitft22
     - pitft28r
+    - pitft35r
 
 3.O. Enable UART
 ===============
conf/machine/include/rpi-base.inc +1 -0
index 092cbeb..9bcb91d 100644
@@ -31,6 +31,7 @@ KERNEL_DEVICETREE ?= " \
     overlays/lirc-rpi.dtbo \
     overlays/pitft22.dtbo \
     overlays/pitft28-resistive.dtbo \
+    overlays/pitft35-resistive.dtbo \
     overlays/pps-gpio.dtbo \
     overlays/rpi-ft5406.dtbo \
     overlays/w1-gpio.dtbo \
conf/machine/raspberrypi3-64.conf +1 -0
index ca10ed9..0efe3ff 100644
@@ -23,6 +23,7 @@ KERNEL_DEVICETREE = " \
     overlays/lirc-rpi.dtbo \
     overlays/pitft22.dtbo \
     overlays/pitft28-resistive.dtbo \
+    overlays/pitft35-resistive.dtbo \
     overlays/pps-gpio.dtbo \
     overlays/rpi-ft5406.dtbo \
     overlays/w1-gpio.dtbo \
recipes-bsp/bootfiles/rpi-config_git.bb +6 -0
index 20ec343..0fd9cea 100644
@@ -18,6 +18,7 @@ PR = "r5"
 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
 PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
 PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
+PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}"
 
 VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
 
@@ -99,6 +100,11 @@ do_deploy() {
         echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
 
+    if [ "${PITFT35r}" = "1" ]; then
+        echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+
     # UART support
     if [ "${ENABLE_UART}" = "1" ]; then
         echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
Signature · 1 line
2.11.0
#1 lore raw
Quoted 5 lines · Rob Woolley

The support for the PiTFT 3.5 inch resistive touchscreen is optional. It may be enabled by adding the following line in local.conf:

MACHINE_FEATURES += "pitft pitft35r"

Looks ok, I have staged it.

Quoted 69 lines
---
 README                                  | 1 +
 conf/machine/include/rpi-base.inc       | 1 +
 conf/machine/raspberrypi3-64.conf       | 1 +
 recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
 4 files changed, 9 insertions(+)
README +1 -0
index 65a1e5f..a5c3d38 100644
@@ -240,6 +240,7 @@ the modelname should be added as a MACHINE_FEATURES in local.conf like below:
 List of currently supported models:
     - pitft22
     - pitft28r
+    - pitft35r
 
 3.O. Enable UART
 ===============
conf/machine/include/rpi-base.inc +1 -0
index 092cbeb..9bcb91d 100644
@@ -31,6 +31,7 @@ KERNEL_DEVICETREE ?= " \
     overlays/lirc-rpi.dtbo \
     overlays/pitft22.dtbo \
     overlays/pitft28-resistive.dtbo \
+    overlays/pitft35-resistive.dtbo \
     overlays/pps-gpio.dtbo \
     overlays/rpi-ft5406.dtbo \
     overlays/w1-gpio.dtbo \
conf/machine/raspberrypi3-64.conf +1 -0
index ca10ed9..0efe3ff 100644
@@ -23,6 +23,7 @@ KERNEL_DEVICETREE = " \
     overlays/lirc-rpi.dtbo \
     overlays/pitft22.dtbo \
     overlays/pitft28-resistive.dtbo \
+    overlays/pitft35-resistive.dtbo \
     overlays/pps-gpio.dtbo \
     overlays/rpi-ft5406.dtbo \
     overlays/w1-gpio.dtbo \
recipes-bsp/bootfiles/rpi-config_git.bb +6 -0
index 20ec343..0fd9cea 100644
@@ -18,6 +18,7 @@ PR = "r5"
 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
 PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
 PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
+PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}"
 
 VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
 
@@ -99,6 +100,11 @@ do_deploy() {
         echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
 
+    if [ "${PITFT35r}" = "1" ]; then
+        echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+
     # UART support
     if [ "${ENABLE_UART}" = "1" ]; then
         echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
#2 lore raw
In reply to Rob Woolley
Quoted 74 lines · Rob Woolley

The support for the PiTFT 3.5 inch resistive touchscreen is optional. It may be enabled by adding the following line in local.conf:

MACHINE_FEATURES += "pitft pitft35r"

---
 README                                  | 1 +
 conf/machine/include/rpi-base.inc       | 1 +
 conf/machine/raspberrypi3-64.conf       | 1 +
 recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
 4 files changed, 9 insertions(+)
README +1 -0
index 65a1e5f..a5c3d38 100644
@@ -240,6 +240,7 @@ the modelname should be added as a MACHINE_FEATURES in local.conf like below:
 List of currently supported models:
     - pitft22
     - pitft28r
+    - pitft35r
 
 3.O. Enable UART
 ===============
conf/machine/include/rpi-base.inc +1 -0
index 092cbeb..9bcb91d 100644
@@ -31,6 +31,7 @@ KERNEL_DEVICETREE ?= " \
     overlays/lirc-rpi.dtbo \
     overlays/pitft22.dtbo \
     overlays/pitft28-resistive.dtbo \
+    overlays/pitft35-resistive.dtbo \
     overlays/pps-gpio.dtbo \
     overlays/rpi-ft5406.dtbo \
     overlays/w1-gpio.dtbo \
conf/machine/raspberrypi3-64.conf +1 -0
index ca10ed9..0efe3ff 100644
@@ -23,6 +23,7 @@ KERNEL_DEVICETREE = " \
     overlays/lirc-rpi.dtbo \
     overlays/pitft22.dtbo \
     overlays/pitft28-resistive.dtbo \
+    overlays/pitft35-resistive.dtbo \
     overlays/pps-gpio.dtbo \
     overlays/rpi-ft5406.dtbo \
     overlays/w1-gpio.dtbo \
recipes-bsp/bootfiles/rpi-config_git.bb +6 -1
index 20ec343..0fd9cea 100644
@@ -18,6 +18,7 @@ PR = "r5"
 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
 PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
 PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
+PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}"
 
 VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
 
@@ -99,6 +100,11 @@ do_deploy() {
         echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
 
+    if [ "${PITFT35r}" = "1" ]; then
+        echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+
     # UART support
     if [ "${ENABLE_UART}" = "1" ]; then
         echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
--
Quoted 2 lines

2.11.0

This commit looks fine but I would prefer having separate commits:
1. Documentation commit
2. dtbo inclusion
3. and rpi-config changes

Could you resend this commit please?

--
Andrei Gherzan
gpg: rsa4096/D4D94F67AD0E9640 | t: @agherzan