From e7e277b444fc4013ab2ad62febca2f4e3831d460 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Tue, 4 Jul 2023 16:46:45 +0300 Subject: [PATCH] Add waveshare dtbo and bootconfig for 2.8inch RPi LCD (A) --- .buildbot/openwrt/build.sh | 9 ++++++++- overlays/waveshare.txt | 21 +++++++++++++++++++++ overlays/waveshare32b.dtbo | Bin 0 -> 2123 bytes patches/overlay-add-waveshare.patch | 10 ++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 overlays/waveshare.txt create mode 100644 overlays/waveshare32b.dtbo create mode 100644 patches/overlay-add-waveshare.patch diff --git a/.buildbot/openwrt/build.sh b/.buildbot/openwrt/build.sh index 99fce42..f6d8360 100755 --- a/.buildbot/openwrt/build.sh +++ b/.buildbot/openwrt/build.sh @@ -146,8 +146,13 @@ make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="dualeth" \ PACKAGES="${PACKAGES}" DISABLED_SERVICES="dropbear" FILES="files" || exit 1 -sed -i "s|,i2c_csi_dsi||g" ${BOOTSOURCE}/current.txt sed -i "s/CONFIG_TARGET_ROOTFS_PARTSIZE=.*/CONFIG_TARGET_ROOTFS_PARTSIZE=768/g" .config +cp ${pwd}/overlays/waveshare32b.dtbo ${OVERLAYSOURCE} +cp ${pwd}/overlays/waveshare.txt ${BOOTSOURCE}/current.txt +cp ${OVERLAYSOURCE}/Makefile ${OVERLAYSOURCE}/Makefile.orig +pushd ${KERNELSOURCE} +git apply ${pwd}/patches/overlay-add-waveshare.patch +popd make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="waveshare" \ PACKAGES=" \ @@ -160,8 +165,10 @@ make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="waveshare" \ cp ${pwd}/overlays/sensing.txt ${BOOTSOURCE}/current.txt cp ${pwd}/overlays/*.dtbo ${OVERLAYSOURCE} +rm ${OVERLAYSOURCE}/waveshare32b.dtbo cp config.txt ${BOOTCONFIG} echo "include current.txt" >> ${BOOTCONFIG} +cp ${OVERLAYSOURCE}/Makefile.orig ${OVERLAYSOURCE}/Makefile pushd ${KERNELSOURCE} git apply ${pwd}/patches/overlay-add.patch popd diff --git a/overlays/waveshare.txt b/overlays/waveshare.txt new file mode 100644 index 0000000..fd8c87b --- /dev/null +++ b/overlays/waveshare.txt @@ -0,0 +1,21 @@ +dtparam=i2c_vc=on +dtoverlay=i2c-rtc,pcf85063a + +# Waveshare config-32 for 2.8inch RPi LCD (A) + +enable_uart=1 +# Enable audio (loads snd_bcm2835) +dtparam=audio=on +dtoverlay=waveshare32b:rotate=270 +# uncomment if hdmi display is not detected and composite is being output +hdmi_force_hotplug=1 +hdmi_group=2 +hdmi_mode=1 +hdmi_mode=87 +hdmi_cvt 480 320 60 6 0 0 0 +hdmi_drive=2 + +[all] + +[cm4] +otg_mode=1 diff --git a/overlays/waveshare32b.dtbo b/overlays/waveshare32b.dtbo new file mode 100644 index 0000000000000000000000000000000000000000..f8271fe1ab4501f156581fad0ff952f358a9cb10 GIT binary patch literal 2123 zcmb7FJ8#rL5T3j6NC*)mNQg&45hM^gE0;?kmlG1{kq|Wnr?tIzvGCc(yS@h%C2cwi z3R->uEe-VW6DVoYptL;Zvv<$FLxC{Tcz0&!wewhiS^0TLwD^#S+C*m?yxwM9WxUA9 zP`g2N=BU`ud~1eU;Pn>vZt4vht~Y44x9*n2PP1Jlc5|&-FBScPjPzbJr(xq1p+ zAjD^;}VyunCP^x{A%B_~$O@c@j&Y*Xm@hT(odY$nyqvfyjz6#b4yduYz-Z8X| zZ#KqOZo@p^`A3fJIr49FKa(d%t33!aKz11$9W;cmcG}zbKuvAnJ~kHAVMz4xu{lTV zpBPsetA0P5c7Puv9U5h5Qvh zT7fLjoHGz(rUOM&$w9m>sH4DwWhuKM7*o_k>Em_g@-$ zPj-Sx%QVdr?IipxMRRvMHpW6Zk&z#dqTH>`zsY47dm`-4WR#ORO=a;G&A;I@GgEn6 zFb8-W04M21md|?;@~8*&(RTn#qt^hIMt=b;J^yyh&3@iTkgvwG^M-&E8Hf|*QBJx>hUHCqiUOAo&Lq+Q