mirror of
https://github.com/waveshareteam/LCD-show.git
synced 2026-06-15 16:42:56 +02:00
Add 2.8inch LCD V2
This commit is contained in:
123
LCD28-show-V2
Executable file
123
LCD28-show-V2
Executable file
@@ -0,0 +1,123 @@
|
||||
if ([ -d ./LCD-show-master ]); then
|
||||
cd ./LCD-show-master
|
||||
elif ([ -d ./LCD-show ]); then
|
||||
cd ./LCD-show
|
||||
fi
|
||||
|
||||
i=1
|
||||
for lines in `cat ./boot/mark`
|
||||
do
|
||||
case ${i} in
|
||||
1) var1=${lines};;
|
||||
esac
|
||||
i=`expr ${i} + 1`
|
||||
done
|
||||
#echo "$var1"
|
||||
|
||||
j=$(uname -n)
|
||||
|
||||
if test "$j" != "kali" ;then
|
||||
if test "$1" != "lite" -a "$2" != "lite" ;then
|
||||
sudo cp -rf ./etc/rc.local-gpio-28 /etc/rc.local
|
||||
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
|
||||
else
|
||||
sudo cp -rf ./etc/rc.local /etc/rc.local
|
||||
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
|
||||
fi
|
||||
else
|
||||
sudo cp ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-kali /usr/share/X11/xorg.conf.d/99-fbturbo.conf
|
||||
fi
|
||||
|
||||
if test "$1" = "0" -o "$#" = "0" -o "$2" = "0";then
|
||||
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-28-v2 /usr/share/X11/xorg.conf.d/99-calibration.conf
|
||||
sudo cp ./boot/config-28-v2.txt /boot/config.txt
|
||||
if test "$j" = "retropie"; then
|
||||
sudo cp ./boot/config-28-v2.txt-retropie /boot/config.txt
|
||||
fi
|
||||
echo "LCD configure 0"
|
||||
elif test "$1" = "lite" -a "$#" = "1" ;then
|
||||
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-28-v2 /usr/share/X11/xorg.conf.d/99-calibration.conf
|
||||
sudo cp ./boot/config-28-v2.txt /boot/config.txt
|
||||
echo "LCD configure 0"
|
||||
elif test "$1" = "90" -o "$2" = "90";then
|
||||
if test "$1" = "lite" -o "$2" = "lite" -o "$j" = "kali" ; then
|
||||
sudo cp ./boot/config-28-v2.txt-90-lite /boot/config.txt
|
||||
else
|
||||
sudo cp ./boot/config-28-v2.txt-90 /boot/config.txt
|
||||
fi
|
||||
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-28-v2-90 /usr/share/X11/xorg.conf.d/99-calibration.conf
|
||||
echo "LCD configure 90"
|
||||
elif test "$1" = "180" -o "$2" = "180" ;then
|
||||
if test "$1" = "lite" -o "$2" = "lite" -o "$j" = "kali" ; then
|
||||
sudo cp ./boot/config-28-v2.txt-180-lite /boot/config.txt
|
||||
else
|
||||
sudo cp ./boot/config-28-v2.txt-180 /boot/config.txt
|
||||
fi
|
||||
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-28-v2-180 /usr/share/X11/xorg.conf.d/99-calibration.conf
|
||||
echo "LCD configure 180"
|
||||
elif test "$1" = "270" -o "$2" = "270"; then
|
||||
if test "$1" = "lite" -o "$2" = "lite" -o "$j" = "kali" ; then
|
||||
sudo cp ./boot/config-28-v2.txt-270-lite /boot/config.txt
|
||||
else
|
||||
sudo cp ./boot/config-28-v2.txt-270 /boot/config.txt
|
||||
fi
|
||||
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-28-v2-270 /usr/share/X11/xorg.conf.d/99-calibration.conf
|
||||
echo "LCD configure 270"
|
||||
fi
|
||||
|
||||
sudo cp ./waveshare28-v2.dtbo /boot/overlays/waveshare28-v2.dtbo
|
||||
sudo cp ./waveshare28-v2.dtbo /boot/overlays/waveshare28-v2-overlay.dtb
|
||||
|
||||
|
||||
if test "$var1" = "0" ;then
|
||||
|
||||
sudo apt-get update -y --fix-missing
|
||||
sudo apt-get upgrade --fix-missing -y
|
||||
|
||||
if test "$j" != "retropie" ;then
|
||||
sudo apt-get install xserver-xorg-input-evdev --fix-missing -y
|
||||
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
|
||||
sudo apt-get install xinput-calibrator
|
||||
fi
|
||||
|
||||
if test "$j" = "retropie" ;then
|
||||
sudo cp -rf ./nes /home/pi/RetroPie/roms/
|
||||
fi
|
||||
|
||||
echo "1" > ./boot/mark
|
||||
#sudo apt-get install cmake -y
|
||||
cd ./rpi-fbcp/build/
|
||||
#sudo cmake ..
|
||||
#sudo make
|
||||
sudo install fbcp /usr/local/bin/fbcp
|
||||
cd ../../
|
||||
sudo mkdir -p /usr/share/X11/xorg.conf.d
|
||||
|
||||
sudo chmod 777 ./boot/shh-reboot
|
||||
sudo cp ./boot/shh-reboot /usr/local/bin/
|
||||
sudo cp -rf ./boot /usr/local/bin/
|
||||
sudo cp -rf ./st7789_module /usr/local/bin/
|
||||
|
||||
echo "-----------reboot now-----------"
|
||||
sudo reboot
|
||||
exit 0
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ -b /dev/mmcblk0p7 ]; then
|
||||
sudo cp ./cmdline.txt-noobs /boot/cmdline.txt
|
||||
else
|
||||
sudo cp ./cmdline.txt /boot/
|
||||
fi
|
||||
|
||||
#sudo cp ./inittab /etc/
|
||||
|
||||
|
||||
if test "$#" = "0" -o "$1" = "0" -o "$1" = "90" -o "$1" = "180" -o "$1" = "270" -o "$2" = "0" -o "$2" = "90" -o "$2" = "180" -o "$2" = "270" -o "$1" = "lite" -o "$2" = "lite" ; then
|
||||
sudo reboot
|
||||
echo "reboot 2 now"
|
||||
else
|
||||
echo "Invalid parameter,Usage:LCD28-show-V2 [0] [90] [180] [270] [lite]"
|
||||
fi
|
||||
|
||||
77
boot/config-28-v2.txt
Executable file
77
boot/config-28-v2.txt
Executable file
@@ -0,0 +1,77 @@
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Uncomment this to enable infrared communication.
|
||||
#dtoverlay=gpio-ir,gpio_pin=17
|
||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
||||
|
||||
# Additional overlays and parameters are documented /boot/overlays/README
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
[pi4]
|
||||
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
#max_framebuffers=2
|
||||
|
||||
[all]
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
|
||||
dtparam=spi=on
|
||||
dtoverlay=waveshare28-v2:rotate=270
|
||||
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=50000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
|
||||
hdmi_force_hotplug=1
|
||||
max_usb_current=1
|
||||
hdmi_group=2
|
||||
hdmi_mode=1
|
||||
hdmi_mode=87
|
||||
hdmi_cvt 480 320 60 6 0 0 0
|
||||
hdmi_drive=2
|
||||
display_rotate=0
|
||||
77
boot/config-28-v2.txt-180
Executable file
77
boot/config-28-v2.txt-180
Executable file
@@ -0,0 +1,77 @@
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Uncomment this to enable infrared communication.
|
||||
#dtoverlay=gpio-ir,gpio_pin=17
|
||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
||||
|
||||
# Additional overlays and parameters are documented /boot/overlays/README
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
[pi4]
|
||||
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
#max_framebuffers=2
|
||||
|
||||
[all]
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
|
||||
dtparam=spi=on
|
||||
dtoverlay=waveshare28-v2:rotate=270
|
||||
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=50000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
|
||||
hdmi_force_hotplug=1
|
||||
max_usb_current=1
|
||||
hdmi_group=2
|
||||
hdmi_mode=1
|
||||
hdmi_mode=87
|
||||
hdmi_cvt 480 320 60 6 0 0 0
|
||||
hdmi_drive=2
|
||||
display_rotate=2
|
||||
77
boot/config-28-v2.txt-180-lite
Executable file
77
boot/config-28-v2.txt-180-lite
Executable file
@@ -0,0 +1,77 @@
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Uncomment this to enable infrared communication.
|
||||
#dtoverlay=gpio-ir,gpio_pin=17
|
||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
||||
|
||||
# Additional overlays and parameters are documented /boot/overlays/README
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
[pi4]
|
||||
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
#max_framebuffers=2
|
||||
|
||||
[all]
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
|
||||
dtparam=spi=on
|
||||
dtoverlay=waveshare28-v2:rotate=90
|
||||
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=50000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
|
||||
hdmi_force_hotplug=1
|
||||
max_usb_current=1
|
||||
hdmi_group=2
|
||||
hdmi_mode=1
|
||||
hdmi_mode=87
|
||||
hdmi_cvt 480 320 60 6 0 0 0
|
||||
hdmi_drive=2
|
||||
display_rotate=0
|
||||
77
boot/config-28-v2.txt-270
Executable file
77
boot/config-28-v2.txt-270
Executable file
@@ -0,0 +1,77 @@
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Uncomment this to enable infrared communication.
|
||||
#dtoverlay=gpio-ir,gpio_pin=17
|
||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
||||
|
||||
# Additional overlays and parameters are documented /boot/overlays/README
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
[pi4]
|
||||
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
#max_framebuffers=2
|
||||
|
||||
[all]
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
|
||||
dtparam=spi=on
|
||||
dtoverlay=waveshare28-v2:rotate=90
|
||||
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=50000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
|
||||
hdmi_force_hotplug=1
|
||||
max_usb_current=1
|
||||
hdmi_group=2
|
||||
hdmi_mode=1
|
||||
hdmi_mode=87
|
||||
hdmi_cvt 480 320 60 6 0 0 0
|
||||
hdmi_drive=2
|
||||
display_rotate=3
|
||||
77
boot/config-28-v2.txt-270-lite
Executable file
77
boot/config-28-v2.txt-270-lite
Executable file
@@ -0,0 +1,77 @@
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Uncomment this to enable infrared communication.
|
||||
#dtoverlay=gpio-ir,gpio_pin=17
|
||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
||||
|
||||
# Additional overlays and parameters are documented /boot/overlays/README
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
[pi4]
|
||||
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
#max_framebuffers=2
|
||||
|
||||
[all]
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
|
||||
dtparam=spi=on
|
||||
dtoverlay=waveshare28-v2:rotate=180
|
||||
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=50000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
|
||||
hdmi_force_hotplug=1
|
||||
max_usb_current=1
|
||||
hdmi_group=2
|
||||
hdmi_mode=1
|
||||
hdmi_mode=87
|
||||
hdmi_cvt 480 320 60 6 0 0 0
|
||||
hdmi_drive=2
|
||||
display_rotate=0
|
||||
77
boot/config-28-v2.txt-90
Executable file
77
boot/config-28-v2.txt-90
Executable file
@@ -0,0 +1,77 @@
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Uncomment this to enable infrared communication.
|
||||
#dtoverlay=gpio-ir,gpio_pin=17
|
||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
||||
|
||||
# Additional overlays and parameters are documented /boot/overlays/README
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
[pi4]
|
||||
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
#max_framebuffers=2
|
||||
|
||||
[all]
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
|
||||
dtparam=spi=on
|
||||
dtoverlay=waveshare28-v2:rotate=90
|
||||
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=50000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
|
||||
hdmi_force_hotplug=1
|
||||
max_usb_current=1
|
||||
hdmi_group=2
|
||||
hdmi_mode=1
|
||||
hdmi_mode=87
|
||||
hdmi_cvt 480 320 60 6 0 0 0
|
||||
hdmi_drive=2
|
||||
display_rotate=1
|
||||
77
boot/config-28-v2.txt-90-lite
Executable file
77
boot/config-28-v2.txt-90-lite
Executable file
@@ -0,0 +1,77 @@
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Uncomment this to enable infrared communication.
|
||||
#dtoverlay=gpio-ir,gpio_pin=17
|
||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
||||
|
||||
# Additional overlays and parameters are documented /boot/overlays/README
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
[pi4]
|
||||
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
#max_framebuffers=2
|
||||
|
||||
[all]
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
|
||||
dtparam=spi=on
|
||||
dtoverlay=waveshare28-v2:rotate=0
|
||||
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=50000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
|
||||
hdmi_force_hotplug=1
|
||||
max_usb_current=1
|
||||
hdmi_group=2
|
||||
hdmi_mode=1
|
||||
hdmi_mode=87
|
||||
hdmi_cvt 480 320 60 6 0 0 0
|
||||
hdmi_drive=2
|
||||
display_rotate=0
|
||||
77
boot/config-28-v2.txt-retropie
Executable file
77
boot/config-28-v2.txt-retropie
Executable file
@@ -0,0 +1,77 @@
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Uncomment this to enable infrared communication.
|
||||
#dtoverlay=gpio-ir,gpio_pin=17
|
||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
||||
|
||||
# Additional overlays and parameters are documented /boot/overlays/README
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
[pi4]
|
||||
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
#max_framebuffers=2
|
||||
|
||||
[all]
|
||||
#dtoverlay=vc4-fkms-v3d
|
||||
|
||||
dtparam=spi=on
|
||||
dtoverlay=waveshare28-v2:rotate=270
|
||||
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=50000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
|
||||
hdmi_force_hotplug=1
|
||||
max_usb_current=1
|
||||
hdmi_group=2
|
||||
hdmi_mode=1
|
||||
hdmi_mode=87
|
||||
hdmi_cvt 640 480 60 6 0 0 0
|
||||
hdmi_drive=2
|
||||
display_rotate=0
|
||||
29
boot/shh-reboot
Executable file
29
boot/shh-reboot
Executable file
@@ -0,0 +1,29 @@
|
||||
i=1
|
||||
for lines in `cat ./boot/mark`
|
||||
do
|
||||
case ${i} in
|
||||
1) var1=${lines};;
|
||||
esac
|
||||
i=`expr ${i} + 1`
|
||||
done
|
||||
echo "--------------$var1----------------"
|
||||
|
||||
if test "$var1" = "1";then
|
||||
|
||||
sudo chmod 777 ./*
|
||||
sudo chmod 777 ./boot/mark
|
||||
sudo echo "2" > ./boot/mark
|
||||
|
||||
|
||||
#sudo apt-get install -y raspberrypi-kernel-headers
|
||||
sudo chmod 777 st7789_module/*
|
||||
cd st7789_module/
|
||||
sudo make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
|
||||
sudo cp /lib/modules/$(uname -r)/kernel/drivers/staging/fbtft/fb_st7789v.ko /lib/modules/$(uname -r)/kernel/drivers/staging/fbtft/fb_st7789v.BACK
|
||||
sudo cp fb_st7789v.ko /lib/modules/$(uname -r)/kernel/drivers/staging/fbtft/fb_st7789v.ko
|
||||
|
||||
sudo reboot
|
||||
echo "-------------driver installed successfully ----------------"
|
||||
|
||||
fi
|
||||
|
||||
@@ -1 +1 @@
|
||||
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
|
||||
console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash fbcon=map:10 fbcon=font:ProFont6x11
|
||||
|
||||
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2
Executable file
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2
Executable file
@@ -0,0 +1,9 @@
|
||||
Section "InputClass"
|
||||
Identifier "calibration"
|
||||
MatchProduct "ADS7846 Touchscreen"
|
||||
Option "Calibration" "198 3679 3711 292"
|
||||
Option "SwapAxes" "0"
|
||||
Option "EmulateThirdButton" "1"
|
||||
Option "EmulateThirdButtonTimeout" "1000"
|
||||
Option "EmulateThirdButtonMoveThreshold" "300"
|
||||
EndSection
|
||||
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2-180
Executable file
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2-180
Executable file
@@ -0,0 +1,9 @@
|
||||
Section "InputClass"
|
||||
Identifier "calibration"
|
||||
MatchProduct "ADS7846 Touchscreen"
|
||||
Option "Calibration" "3679 198 292 3711"
|
||||
Option "SwapAxes" "0"
|
||||
Option "EmulateThirdButton" "1"
|
||||
Option "EmulateThirdButtonTimeout" "1000"
|
||||
Option "EmulateThirdButtonMoveThreshold" "300"
|
||||
EndSection
|
||||
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2-270
Executable file
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2-270
Executable file
@@ -0,0 +1,9 @@
|
||||
Section "InputClass"
|
||||
Identifier "calibration"
|
||||
MatchProduct "ADS7846 Touchscreen"
|
||||
Option "Calibration" "3679 198 3711 292"
|
||||
Option "SwapAxes" "1"
|
||||
Option "EmulateThirdButton" "1"
|
||||
Option "EmulateThirdButtonTimeout" "1000"
|
||||
Option "EmulateThirdButtonMoveThreshold" "300"
|
||||
EndSection
|
||||
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2-90
Executable file
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2-90
Executable file
@@ -0,0 +1,9 @@
|
||||
Section "InputClass"
|
||||
Identifier "calibration"
|
||||
MatchProduct "ADS7846 Touchscreen"
|
||||
Option "Calibration" "198 3679 292 3711"
|
||||
Option "SwapAxes" "1"
|
||||
Option "EmulateThirdButton" "1"
|
||||
Option "EmulateThirdButtonTimeout" "1000"
|
||||
Option "EmulateThirdButtonMoveThreshold" "300"
|
||||
EndSection
|
||||
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2-90-lite
Executable file
9
etc/X11/xorg.conf.d/99-calibration.conf-28-v2-90-lite
Executable file
@@ -0,0 +1,9 @@
|
||||
Section "InputClass"
|
||||
Identifier "calibration"
|
||||
MatchProduct "ADS7846 Touchscreen"
|
||||
Option "Calibration" "198 3679 292 3711"
|
||||
Option "SwapAxes" "1"
|
||||
Option "EmulateThirdButton" "1"
|
||||
Option "EmulateThirdButtonTimeout" "1000"
|
||||
Option "EmulateThirdButtonMoveThreshold" "300"
|
||||
EndSection
|
||||
32
etc/rc.local-gpio-28
Executable file
32
etc/rc.local-gpio-28
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# rc.local
|
||||
#
|
||||
# This script is executed at the end of each multiuser runlevel.
|
||||
# Make sure that the script will "exit 0" on success or any other
|
||||
# value on error.
|
||||
#
|
||||
# In order to enable or disable this script just change the execution
|
||||
# bits.
|
||||
#
|
||||
# By default this script does nothing.
|
||||
|
||||
# Print the IP address
|
||||
|
||||
cd /usr/local/bin/
|
||||
sudo shh-reboot &
|
||||
|
||||
|
||||
|
||||
_IP=$(hostname -I) || true
|
||||
if [ "$_IP" ]; then
|
||||
printf "My IP address is %s\n" "$_IP"
|
||||
fi
|
||||
|
||||
sleep 7
|
||||
fbcp &
|
||||
con2fbmap 1 0
|
||||
|
||||
|
||||
|
||||
exit 0
|
||||
1
st7789_module/.Module.symvers.cmd
Normal file
1
st7789_module/.Module.symvers.cmd
Normal file
@@ -0,0 +1 @@
|
||||
cmd_/home/pi/LCD-show-master/st7789_module/Module.symvers := sed 's/ko$$/o/' /home/pi/LCD-show-master/st7789_module/modules.order | scripts/mod/modpost -m -a -o /home/pi/LCD-show-master/st7789_module/Module.symvers -e -i Module.symvers -T -
|
||||
1
st7789_module/.fb_st7789v.ko.cmd
Normal file
1
st7789_module/.fb_st7789v.ko.cmd
Normal file
@@ -0,0 +1 @@
|
||||
cmd_/home/pi/LCD-show-master/st7789_module/fb_st7789v.ko := ld -r -EL --build-id=sha1 -T scripts/module.lds -o /home/pi/LCD-show-master/st7789_module/fb_st7789v.ko /home/pi/LCD-show-master/st7789_module/fb_st7789v.o /home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.o; true
|
||||
1
st7789_module/.fb_st7789v.mod.cmd
Normal file
1
st7789_module/.fb_st7789v.mod.cmd
Normal file
@@ -0,0 +1 @@
|
||||
cmd_/home/pi/LCD-show-master/st7789_module/fb_st7789v.mod := { echo /home/pi/LCD-show-master/st7789_module/fb_st7789v.o; echo; } > /home/pi/LCD-show-master/st7789_module/fb_st7789v.mod
|
||||
593
st7789_module/.fb_st7789v.mod.o.cmd
Normal file
593
st7789_module/.fb_st7789v.mod.o.cmd
Normal file
@@ -0,0 +1,593 @@
|
||||
cmd_/home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.o := gcc -Wp,-MMD,/home/pi/LCD-show-master/st7789_module/.fb_st7789v.mod.o.d -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/8/include -I./arch/arm/include -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -fno-ipa-sra -mabi=aapcs-linux -mfpu=vfp -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -DMODULE -DKBUILD_BASENAME='"fb_st7789v.mod"' -DKBUILD_MODNAME='"fb_st7789v"' -c -o /home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.o /home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.c
|
||||
|
||||
source_/home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.o := /home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.c
|
||||
|
||||
deps_/home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.o := \
|
||||
$(wildcard include/config/module/unload.h) \
|
||||
$(wildcard include/config/retpoline.h) \
|
||||
include/linux/kconfig.h \
|
||||
$(wildcard include/config/cc/version/text.h) \
|
||||
$(wildcard include/config/cpu/big/endian.h) \
|
||||
$(wildcard include/config/booger.h) \
|
||||
$(wildcard include/config/foo.h) \
|
||||
include/linux/compiler_types.h \
|
||||
$(wildcard include/config/have/arch/compiler/h.h) \
|
||||
$(wildcard include/config/enable/must/check.h) \
|
||||
$(wildcard include/config/cc/has/asm/inline.h) \
|
||||
include/linux/compiler_attributes.h \
|
||||
include/linux/compiler-gcc.h \
|
||||
$(wildcard include/config/arm64.h) \
|
||||
$(wildcard include/config/arch/use/builtin/bswap.h) \
|
||||
$(wildcard include/config/kcov.h) \
|
||||
include/linux/module.h \
|
||||
$(wildcard include/config/modules.h) \
|
||||
$(wildcard include/config/sysfs.h) \
|
||||
$(wildcard include/config/modules/tree/lookup.h) \
|
||||
$(wildcard include/config/livepatch.h) \
|
||||
$(wildcard include/config/unused/symbols.h) \
|
||||
$(wildcard include/config/module/sig.h) \
|
||||
$(wildcard include/config/generic/bug.h) \
|
||||
$(wildcard include/config/kallsyms.h) \
|
||||
$(wildcard include/config/smp.h) \
|
||||
$(wildcard include/config/tracepoints.h) \
|
||||
$(wildcard include/config/tree/srcu.h) \
|
||||
$(wildcard include/config/bpf/events.h) \
|
||||
$(wildcard include/config/jump/label.h) \
|
||||
$(wildcard include/config/tracing.h) \
|
||||
$(wildcard include/config/event/tracing.h) \
|
||||
$(wildcard include/config/ftrace/mcount/record.h) \
|
||||
$(wildcard include/config/kprobes.h) \
|
||||
$(wildcard include/config/have/static/call/inline.h) \
|
||||
$(wildcard include/config/constructors.h) \
|
||||
$(wildcard include/config/function/error/injection.h) \
|
||||
include/linux/list.h \
|
||||
$(wildcard include/config/debug/list.h) \
|
||||
include/linux/types.h \
|
||||
$(wildcard include/config/have/uid16.h) \
|
||||
$(wildcard include/config/uid16.h) \
|
||||
$(wildcard include/config/arch/dma/addr/t/64bit.h) \
|
||||
$(wildcard include/config/phys/addr/t/64bit.h) \
|
||||
$(wildcard include/config/64bit.h) \
|
||||
include/uapi/linux/types.h \
|
||||
arch/arm/include/uapi/asm/types.h \
|
||||
include/asm-generic/int-ll64.h \
|
||||
include/uapi/asm-generic/int-ll64.h \
|
||||
arch/arm/include/generated/uapi/asm/bitsperlong.h \
|
||||
include/asm-generic/bitsperlong.h \
|
||||
include/uapi/asm-generic/bitsperlong.h \
|
||||
include/uapi/linux/posix_types.h \
|
||||
include/linux/stddef.h \
|
||||
include/uapi/linux/stddef.h \
|
||||
include/linux/compiler_types.h \
|
||||
arch/arm/include/uapi/asm/posix_types.h \
|
||||
include/uapi/asm-generic/posix_types.h \
|
||||
include/linux/poison.h \
|
||||
$(wildcard include/config/illegal/pointer/value.h) \
|
||||
$(wildcard include/config/page/poisoning/zero.h) \
|
||||
include/linux/const.h \
|
||||
include/vdso/const.h \
|
||||
include/uapi/linux/const.h \
|
||||
include/linux/kernel.h \
|
||||
$(wildcard include/config/preempt/voluntary.h) \
|
||||
$(wildcard include/config/debug/atomic/sleep.h) \
|
||||
$(wildcard include/config/preempt/rt.h) \
|
||||
$(wildcard include/config/mmu.h) \
|
||||
$(wildcard include/config/prove/locking.h) \
|
||||
$(wildcard include/config/panic/timeout.h) \
|
||||
include/linux/limits.h \
|
||||
include/uapi/linux/limits.h \
|
||||
include/vdso/limits.h \
|
||||
include/linux/linkage.h \
|
||||
$(wildcard include/config/arch/use/sym/annotations.h) \
|
||||
include/linux/stringify.h \
|
||||
include/linux/export.h \
|
||||
$(wildcard include/config/modversions.h) \
|
||||
$(wildcard include/config/module/rel/crcs.h) \
|
||||
$(wildcard include/config/have/arch/prel32/relocations.h) \
|
||||
$(wildcard include/config/trim/unused/ksyms.h) \
|
||||
arch/arm/include/asm/linkage.h \
|
||||
include/linux/compiler.h \
|
||||
$(wildcard include/config/trace/branch/profiling.h) \
|
||||
$(wildcard include/config/profile/all/branches.h) \
|
||||
$(wildcard include/config/stack/validation.h) \
|
||||
arch/arm/include/generated/asm/rwonce.h \
|
||||
include/asm-generic/rwonce.h \
|
||||
include/linux/kasan-checks.h \
|
||||
$(wildcard include/config/kasan.h) \
|
||||
include/linux/kcsan-checks.h \
|
||||
$(wildcard include/config/kcsan.h) \
|
||||
$(wildcard include/config/kcsan/ignore/atomics.h) \
|
||||
include/linux/bitops.h \
|
||||
include/linux/bits.h \
|
||||
include/vdso/bits.h \
|
||||
include/linux/build_bug.h \
|
||||
arch/arm/include/asm/bitops.h \
|
||||
include/linux/irqflags.h \
|
||||
$(wildcard include/config/trace/irqflags.h) \
|
||||
$(wildcard include/config/irqsoff/tracer.h) \
|
||||
$(wildcard include/config/preempt/tracer.h) \
|
||||
$(wildcard include/config/trace/irqflags/support.h) \
|
||||
include/linux/typecheck.h \
|
||||
arch/arm/include/asm/irqflags.h \
|
||||
$(wildcard include/config/cpu/v7m.h) \
|
||||
arch/arm/include/asm/ptrace.h \
|
||||
$(wildcard include/config/arm/thumb.h) \
|
||||
$(wildcard include/config/thumb2/kernel.h) \
|
||||
arch/arm/include/uapi/asm/ptrace.h \
|
||||
$(wildcard include/config/cpu/endian/be8.h) \
|
||||
arch/arm/include/asm/hwcap.h \
|
||||
arch/arm/include/uapi/asm/hwcap.h \
|
||||
include/asm-generic/irqflags.h \
|
||||
arch/arm/include/asm/percpu.h \
|
||||
$(wildcard include/config/cpu/v6.h) \
|
||||
include/asm-generic/percpu.h \
|
||||
$(wildcard include/config/debug/preempt.h) \
|
||||
$(wildcard include/config/have/setup/per/cpu/area.h) \
|
||||
include/linux/threads.h \
|
||||
$(wildcard include/config/nr/cpus.h) \
|
||||
$(wildcard include/config/base/small.h) \
|
||||
include/linux/percpu-defs.h \
|
||||
$(wildcard include/config/debug/force/weak/per/cpu.h) \
|
||||
$(wildcard include/config/amd/mem/encrypt.h) \
|
||||
arch/arm/include/asm/barrier.h \
|
||||
$(wildcard include/config/cpu/32v6k.h) \
|
||||
$(wildcard include/config/cpu/xsc3.h) \
|
||||
$(wildcard include/config/cpu/fa526.h) \
|
||||
$(wildcard include/config/arm/heavy/mb.h) \
|
||||
$(wildcard include/config/arm/dma/mem/bufferable.h) \
|
||||
$(wildcard include/config/cpu/spectre.h) \
|
||||
include/asm-generic/barrier.h \
|
||||
include/asm-generic/bitops/non-atomic.h \
|
||||
include/asm-generic/bitops/builtin-__fls.h \
|
||||
include/asm-generic/bitops/builtin-__ffs.h \
|
||||
include/asm-generic/bitops/builtin-fls.h \
|
||||
include/asm-generic/bitops/builtin-ffs.h \
|
||||
include/asm-generic/bitops/ffz.h \
|
||||
include/asm-generic/bitops/fls64.h \
|
||||
include/asm-generic/bitops/sched.h \
|
||||
include/asm-generic/bitops/hweight.h \
|
||||
include/asm-generic/bitops/arch_hweight.h \
|
||||
include/asm-generic/bitops/const_hweight.h \
|
||||
include/asm-generic/bitops/lock.h \
|
||||
include/linux/atomic.h \
|
||||
arch/arm/include/asm/atomic.h \
|
||||
$(wildcard include/config/generic/atomic64.h) \
|
||||
$(wildcard include/config/arm/lpae.h) \
|
||||
include/linux/prefetch.h \
|
||||
arch/arm/include/asm/processor.h \
|
||||
$(wildcard include/config/have/hw/breakpoint.h) \
|
||||
$(wildcard include/config/binfmt/elf/fdpic.h) \
|
||||
arch/arm/include/asm/hw_breakpoint.h \
|
||||
arch/arm/include/asm/unified.h \
|
||||
arch/arm/include/asm/vdso/processor.h \
|
||||
$(wildcard include/config/arm/errata/754327.h) \
|
||||
arch/arm/include/asm/cache.h \
|
||||
$(wildcard include/config/arm/l1/cache/shift.h) \
|
||||
$(wildcard include/config/aeabi.h) \
|
||||
arch/arm/include/asm/cmpxchg.h \
|
||||
$(wildcard include/config/cpu/sa1100.h) \
|
||||
$(wildcard include/config/cpu/sa110.h) \
|
||||
include/asm-generic/cmpxchg-local.h \
|
||||
include/linux/atomic-fallback.h \
|
||||
include/asm-generic/atomic-long.h \
|
||||
include/asm-generic/bitops/find.h \
|
||||
$(wildcard include/config/generic/find/first/bit.h) \
|
||||
include/asm-generic/bitops/le.h \
|
||||
arch/arm/include/uapi/asm/byteorder.h \
|
||||
include/linux/byteorder/little_endian.h \
|
||||
include/uapi/linux/byteorder/little_endian.h \
|
||||
include/linux/swab.h \
|
||||
include/uapi/linux/swab.h \
|
||||
arch/arm/include/asm/swab.h \
|
||||
arch/arm/include/uapi/asm/swab.h \
|
||||
include/linux/byteorder/generic.h \
|
||||
include/asm-generic/bitops/ext2-atomic-setbit.h \
|
||||
include/linux/log2.h \
|
||||
$(wildcard include/config/arch/has/ilog2/u32.h) \
|
||||
$(wildcard include/config/arch/has/ilog2/u64.h) \
|
||||
include/linux/minmax.h \
|
||||
include/linux/printk.h \
|
||||
$(wildcard include/config/message/loglevel/default.h) \
|
||||
$(wildcard include/config/console/loglevel/default.h) \
|
||||
$(wildcard include/config/console/loglevel/quiet.h) \
|
||||
$(wildcard include/config/early/printk.h) \
|
||||
$(wildcard include/config/printk/nmi.h) \
|
||||
$(wildcard include/config/printk.h) \
|
||||
$(wildcard include/config/dynamic/debug.h) \
|
||||
$(wildcard include/config/dynamic/debug/core.h) \
|
||||
include/linux/init.h \
|
||||
$(wildcard include/config/strict/kernel/rwx.h) \
|
||||
$(wildcard include/config/strict/module/rwx.h) \
|
||||
include/linux/kern_levels.h \
|
||||
include/linux/cache.h \
|
||||
$(wildcard include/config/arch/has/cache/line/size.h) \
|
||||
include/uapi/linux/kernel.h \
|
||||
include/uapi/linux/sysinfo.h \
|
||||
include/linux/ratelimit_types.h \
|
||||
include/uapi/linux/param.h \
|
||||
arch/arm/include/generated/uapi/asm/param.h \
|
||||
include/asm-generic/param.h \
|
||||
$(wildcard include/config/hz.h) \
|
||||
include/uapi/asm-generic/param.h \
|
||||
include/linux/spinlock_types.h \
|
||||
$(wildcard include/config/debug/spinlock.h) \
|
||||
$(wildcard include/config/debug/lock/alloc.h) \
|
||||
arch/arm/include/asm/spinlock_types.h \
|
||||
include/linux/lockdep_types.h \
|
||||
$(wildcard include/config/prove/raw/lock/nesting.h) \
|
||||
$(wildcard include/config/preempt/lock.h) \
|
||||
$(wildcard include/config/lockdep.h) \
|
||||
$(wildcard include/config/lock/stat.h) \
|
||||
include/linux/rwlock_types.h \
|
||||
arch/arm/include/asm/div64.h \
|
||||
arch/arm/include/asm/compiler.h \
|
||||
include/asm-generic/div64.h \
|
||||
include/linux/stat.h \
|
||||
arch/arm/include/uapi/asm/stat.h \
|
||||
include/uapi/linux/stat.h \
|
||||
include/linux/time.h \
|
||||
$(wildcard include/config/arch/uses/gettimeoffset.h) \
|
||||
$(wildcard include/config/posix/timers.h) \
|
||||
include/linux/math64.h \
|
||||
$(wildcard include/config/arch/supports/int128.h) \
|
||||
include/vdso/math64.h \
|
||||
include/linux/time64.h \
|
||||
include/vdso/time64.h \
|
||||
include/uapi/linux/time.h \
|
||||
include/uapi/linux/time_types.h \
|
||||
include/linux/time32.h \
|
||||
include/linux/timex.h \
|
||||
include/uapi/linux/timex.h \
|
||||
arch/arm/include/asm/timex.h \
|
||||
include/vdso/time32.h \
|
||||
include/vdso/time.h \
|
||||
include/linux/uidgid.h \
|
||||
$(wildcard include/config/multiuser.h) \
|
||||
$(wildcard include/config/user/ns.h) \
|
||||
include/linux/highuid.h \
|
||||
include/linux/kmod.h \
|
||||
include/linux/umh.h \
|
||||
include/linux/gfp.h \
|
||||
$(wildcard include/config/highmem.h) \
|
||||
$(wildcard include/config/zone/dma.h) \
|
||||
$(wildcard include/config/zone/dma32.h) \
|
||||
$(wildcard include/config/zone/device.h) \
|
||||
$(wildcard include/config/numa.h) \
|
||||
$(wildcard include/config/pm/sleep.h) \
|
||||
$(wildcard include/config/contig/alloc.h) \
|
||||
$(wildcard include/config/cma.h) \
|
||||
include/linux/mmdebug.h \
|
||||
$(wildcard include/config/debug/vm.h) \
|
||||
$(wildcard include/config/debug/virtual.h) \
|
||||
$(wildcard include/config/debug/vm/pgflags.h) \
|
||||
include/linux/bug.h \
|
||||
$(wildcard include/config/bug/on/data/corruption.h) \
|
||||
arch/arm/include/asm/bug.h \
|
||||
$(wildcard include/config/debug/bugverbose.h) \
|
||||
arch/arm/include/asm/opcodes.h \
|
||||
$(wildcard include/config/cpu/endian/be32.h) \
|
||||
include/asm-generic/bug.h \
|
||||
$(wildcard include/config/bug.h) \
|
||||
$(wildcard include/config/generic/bug/relative/pointers.h) \
|
||||
include/linux/instrumentation.h \
|
||||
$(wildcard include/config/debug/entry.h) \
|
||||
include/linux/mmzone.h \
|
||||
$(wildcard include/config/force/max/zoneorder.h) \
|
||||
$(wildcard include/config/memory/isolation.h) \
|
||||
$(wildcard include/config/zsmalloc.h) \
|
||||
$(wildcard include/config/shadow/call/stack.h) \
|
||||
$(wildcard include/config/memcg.h) \
|
||||
$(wildcard include/config/sparsemem.h) \
|
||||
$(wildcard include/config/memory/hotplug.h) \
|
||||
$(wildcard include/config/compaction.h) \
|
||||
$(wildcard include/config/discontigmem.h) \
|
||||
$(wildcard include/config/transparent/hugepage.h) \
|
||||
$(wildcard include/config/flat/node/mem/map.h) \
|
||||
$(wildcard include/config/page/extension.h) \
|
||||
$(wildcard include/config/deferred/struct/page/init.h) \
|
||||
$(wildcard include/config/have/memoryless/nodes.h) \
|
||||
$(wildcard include/config/need/multiple/nodes.h) \
|
||||
$(wildcard include/config/flatmem.h) \
|
||||
$(wildcard include/config/sparsemem/vmemmap.h) \
|
||||
$(wildcard include/config/sparsemem/extreme.h) \
|
||||
$(wildcard include/config/memory/hotremove.h) \
|
||||
$(wildcard include/config/have/arch/pfn/valid.h) \
|
||||
$(wildcard include/config/holes/in/zone.h) \
|
||||
$(wildcard include/config/arch/has/holes/memorymodel.h) \
|
||||
include/linux/spinlock.h \
|
||||
$(wildcard include/config/preemption.h) \
|
||||
include/linux/preempt.h \
|
||||
$(wildcard include/config/preempt/count.h) \
|
||||
$(wildcard include/config/trace/preempt/toggle.h) \
|
||||
$(wildcard include/config/preempt/notifiers.h) \
|
||||
arch/arm/include/generated/asm/preempt.h \
|
||||
include/asm-generic/preempt.h \
|
||||
include/linux/thread_info.h \
|
||||
$(wildcard include/config/thread/info/in/task.h) \
|
||||
$(wildcard include/config/have/arch/within/stack/frames.h) \
|
||||
$(wildcard include/config/hardened/usercopy.h) \
|
||||
include/linux/restart_block.h \
|
||||
include/linux/errno.h \
|
||||
include/uapi/linux/errno.h \
|
||||
arch/arm/include/generated/uapi/asm/errno.h \
|
||||
include/uapi/asm-generic/errno.h \
|
||||
include/uapi/asm-generic/errno-base.h \
|
||||
arch/arm/include/asm/thread_info.h \
|
||||
$(wildcard include/config/stackprotector/per/task.h) \
|
||||
$(wildcard include/config/crunch.h) \
|
||||
$(wildcard include/config/arm/thumbee.h) \
|
||||
arch/arm/include/asm/fpstate.h \
|
||||
$(wildcard include/config/vfpv3.h) \
|
||||
$(wildcard include/config/iwmmxt.h) \
|
||||
arch/arm/include/asm/page.h \
|
||||
$(wildcard include/config/cpu/copy/v4wt.h) \
|
||||
$(wildcard include/config/cpu/copy/v4wb.h) \
|
||||
$(wildcard include/config/cpu/copy/feroceon.h) \
|
||||
$(wildcard include/config/cpu/copy/fa.h) \
|
||||
$(wildcard include/config/cpu/xscale.h) \
|
||||
$(wildcard include/config/cpu/copy/v6.h) \
|
||||
$(wildcard include/config/kuser/helpers.h) \
|
||||
arch/arm/include/asm/glue.h \
|
||||
arch/arm/include/asm/pgtable-2level-types.h \
|
||||
arch/arm/include/asm/memory.h \
|
||||
$(wildcard include/config/need/mach/memory/h.h) \
|
||||
$(wildcard include/config/page/offset.h) \
|
||||
$(wildcard include/config/dram/base.h) \
|
||||
$(wildcard include/config/dram/size.h) \
|
||||
$(wildcard include/config/xip/kernel.h) \
|
||||
$(wildcard include/config/have/tcm.h) \
|
||||
$(wildcard include/config/arm/patch/phys/virt.h) \
|
||||
$(wildcard include/config/phys/offset.h) \
|
||||
$(wildcard include/config/xip/phys/addr.h) \
|
||||
include/linux/sizes.h \
|
||||
include/asm-generic/memory_model.h \
|
||||
include/linux/pfn.h \
|
||||
include/asm-generic/getorder.h \
|
||||
include/linux/bottom_half.h \
|
||||
include/linux/lockdep.h \
|
||||
$(wildcard include/config/debug/locking/api/selftests.h) \
|
||||
include/linux/smp.h \
|
||||
$(wildcard include/config/up/late/init.h) \
|
||||
include/linux/cpumask.h \
|
||||
$(wildcard include/config/cpumask/offstack.h) \
|
||||
$(wildcard include/config/hotplug/cpu.h) \
|
||||
$(wildcard include/config/debug/per/cpu/maps.h) \
|
||||
include/linux/bitmap.h \
|
||||
include/linux/string.h \
|
||||
$(wildcard include/config/binary/printf.h) \
|
||||
$(wildcard include/config/fortify/source.h) \
|
||||
include/uapi/linux/string.h \
|
||||
arch/arm/include/asm/string.h \
|
||||
$(wildcard include/config/bcm2835/fast/memcpy.h) \
|
||||
include/linux/smp_types.h \
|
||||
include/linux/llist.h \
|
||||
$(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \
|
||||
arch/arm/include/asm/smp.h \
|
||||
arch/arm/include/generated/asm/mmiowb.h \
|
||||
include/asm-generic/mmiowb.h \
|
||||
$(wildcard include/config/mmiowb.h) \
|
||||
arch/arm/include/asm/spinlock.h \
|
||||
include/linux/rwlock.h \
|
||||
$(wildcard include/config/preempt.h) \
|
||||
include/linux/spinlock_api_smp.h \
|
||||
$(wildcard include/config/inline/spin/lock.h) \
|
||||
$(wildcard include/config/inline/spin/lock/bh.h) \
|
||||
$(wildcard include/config/inline/spin/lock/irq.h) \
|
||||
$(wildcard include/config/inline/spin/lock/irqsave.h) \
|
||||
$(wildcard include/config/inline/spin/trylock.h) \
|
||||
$(wildcard include/config/inline/spin/trylock/bh.h) \
|
||||
$(wildcard include/config/uninline/spin/unlock.h) \
|
||||
$(wildcard include/config/inline/spin/unlock/bh.h) \
|
||||
$(wildcard include/config/inline/spin/unlock/irq.h) \
|
||||
$(wildcard include/config/inline/spin/unlock/irqrestore.h) \
|
||||
$(wildcard include/config/generic/lockbreak.h) \
|
||||
include/linux/rwlock_api_smp.h \
|
||||
$(wildcard include/config/inline/read/lock.h) \
|
||||
$(wildcard include/config/inline/write/lock.h) \
|
||||
$(wildcard include/config/inline/read/lock/bh.h) \
|
||||
$(wildcard include/config/inline/write/lock/bh.h) \
|
||||
$(wildcard include/config/inline/read/lock/irq.h) \
|
||||
$(wildcard include/config/inline/write/lock/irq.h) \
|
||||
$(wildcard include/config/inline/read/lock/irqsave.h) \
|
||||
$(wildcard include/config/inline/write/lock/irqsave.h) \
|
||||
$(wildcard include/config/inline/read/trylock.h) \
|
||||
$(wildcard include/config/inline/write/trylock.h) \
|
||||
$(wildcard include/config/inline/read/unlock.h) \
|
||||
$(wildcard include/config/inline/write/unlock.h) \
|
||||
$(wildcard include/config/inline/read/unlock/bh.h) \
|
||||
$(wildcard include/config/inline/write/unlock/bh.h) \
|
||||
$(wildcard include/config/inline/read/unlock/irq.h) \
|
||||
$(wildcard include/config/inline/write/unlock/irq.h) \
|
||||
$(wildcard include/config/inline/read/unlock/irqrestore.h) \
|
||||
$(wildcard include/config/inline/write/unlock/irqrestore.h) \
|
||||
include/linux/wait.h \
|
||||
arch/arm/include/generated/asm/current.h \
|
||||
include/asm-generic/current.h \
|
||||
include/uapi/linux/wait.h \
|
||||
include/linux/numa.h \
|
||||
$(wildcard include/config/nodes/shift.h) \
|
||||
$(wildcard include/config/numa/keep/meminfo.h) \
|
||||
include/linux/seqlock.h \
|
||||
include/linux/mutex.h \
|
||||
$(wildcard include/config/mutex/spin/on/owner.h) \
|
||||
$(wildcard include/config/debug/mutexes.h) \
|
||||
include/linux/osq_lock.h \
|
||||
include/linux/debug_locks.h \
|
||||
include/linux/ww_mutex.h \
|
||||
$(wildcard include/config/debug/ww/mutex/slowpath.h) \
|
||||
include/linux/nodemask.h \
|
||||
include/linux/pageblock-flags.h \
|
||||
$(wildcard include/config/hugetlb/page.h) \
|
||||
$(wildcard include/config/hugetlb/page/size/variable.h) \
|
||||
include/linux/page-flags-layout.h \
|
||||
$(wildcard include/config/numa/balancing.h) \
|
||||
$(wildcard include/config/kasan/sw/tags.h) \
|
||||
include/generated/bounds.h \
|
||||
include/linux/mm_types.h \
|
||||
$(wildcard include/config/have/aligned/struct/page.h) \
|
||||
$(wildcard include/config/userfaultfd.h) \
|
||||
$(wildcard include/config/swap.h) \
|
||||
$(wildcard include/config/have/arch/compat/mmap/bases.h) \
|
||||
$(wildcard include/config/membarrier.h) \
|
||||
$(wildcard include/config/aio.h) \
|
||||
$(wildcard include/config/mmu/notifier.h) \
|
||||
$(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \
|
||||
$(wildcard include/config/iommu/support.h) \
|
||||
include/linux/mm_types_task.h \
|
||||
$(wildcard include/config/split/ptlock/cpus.h) \
|
||||
$(wildcard include/config/arch/enable/split/pmd/ptlock.h) \
|
||||
include/linux/auxvec.h \
|
||||
include/uapi/linux/auxvec.h \
|
||||
arch/arm/include/asm/auxvec.h \
|
||||
arch/arm/include/uapi/asm/auxvec.h \
|
||||
include/linux/rbtree.h \
|
||||
include/linux/rcupdate.h \
|
||||
$(wildcard include/config/preempt/rcu.h) \
|
||||
$(wildcard include/config/tiny/rcu.h) \
|
||||
$(wildcard include/config/tasks/rcu/generic.h) \
|
||||
$(wildcard include/config/rcu/stall/common.h) \
|
||||
$(wildcard include/config/no/hz/full.h) \
|
||||
$(wildcard include/config/rcu/nocb/cpu.h) \
|
||||
$(wildcard include/config/tasks/rcu.h) \
|
||||
$(wildcard include/config/tasks/rcu/trace.h) \
|
||||
$(wildcard include/config/tasks/rude/rcu.h) \
|
||||
$(wildcard include/config/tree/rcu.h) \
|
||||
$(wildcard include/config/debug/objects/rcu/head.h) \
|
||||
$(wildcard include/config/prove/rcu.h) \
|
||||
$(wildcard include/config/rcu/boost.h) \
|
||||
$(wildcard include/config/arch/weak/release/acquire.h) \
|
||||
include/linux/rcutree.h \
|
||||
include/linux/rwsem.h \
|
||||
$(wildcard include/config/rwsem/spin/on/owner.h) \
|
||||
$(wildcard include/config/debug/rwsems.h) \
|
||||
include/linux/err.h \
|
||||
include/linux/completion.h \
|
||||
include/linux/swait.h \
|
||||
include/linux/uprobes.h \
|
||||
$(wildcard include/config/uprobes.h) \
|
||||
include/linux/workqueue.h \
|
||||
$(wildcard include/config/debug/objects/work.h) \
|
||||
$(wildcard include/config/freezer.h) \
|
||||
$(wildcard include/config/wq/watchdog.h) \
|
||||
include/linux/timer.h \
|
||||
$(wildcard include/config/debug/objects/timers.h) \
|
||||
$(wildcard include/config/no/hz/common.h) \
|
||||
include/linux/ktime.h \
|
||||
include/linux/jiffies.h \
|
||||
include/vdso/jiffies.h \
|
||||
include/generated/timeconst.h \
|
||||
include/vdso/ktime.h \
|
||||
include/linux/timekeeping.h \
|
||||
include/linux/timekeeping32.h \
|
||||
include/linux/debugobjects.h \
|
||||
$(wildcard include/config/debug/objects.h) \
|
||||
$(wildcard include/config/debug/objects/free.h) \
|
||||
arch/arm/include/asm/mmu.h \
|
||||
$(wildcard include/config/cpu/has/asid.h) \
|
||||
$(wildcard include/config/vdso.h) \
|
||||
include/linux/page-flags.h \
|
||||
$(wildcard include/config/arch/uses/pg/uncached.h) \
|
||||
$(wildcard include/config/memory/failure.h) \
|
||||
$(wildcard include/config/idle/page/tracking.h) \
|
||||
$(wildcard include/config/thp/swap.h) \
|
||||
$(wildcard include/config/ksm.h) \
|
||||
include/linux/memory_hotplug.h \
|
||||
$(wildcard include/config/arch/has/add/pages.h) \
|
||||
$(wildcard include/config/have/arch/nodedata/extension.h) \
|
||||
$(wildcard include/config/have/bootmem/info/node.h) \
|
||||
include/linux/notifier.h \
|
||||
include/linux/srcu.h \
|
||||
$(wildcard include/config/tiny/srcu.h) \
|
||||
$(wildcard include/config/srcu.h) \
|
||||
include/linux/rcu_segcblist.h \
|
||||
include/linux/srcutree.h \
|
||||
include/linux/rcu_node_tree.h \
|
||||
$(wildcard include/config/rcu/fanout.h) \
|
||||
$(wildcard include/config/rcu/fanout/leaf.h) \
|
||||
include/linux/topology.h \
|
||||
$(wildcard include/config/use/percpu/numa/node/id.h) \
|
||||
$(wildcard include/config/sched/smt.h) \
|
||||
include/linux/arch_topology.h \
|
||||
$(wildcard include/config/generic/arch/topology.h) \
|
||||
include/linux/percpu.h \
|
||||
$(wildcard include/config/need/per/cpu/embed/first/chunk.h) \
|
||||
$(wildcard include/config/need/per/cpu/page/first/chunk.h) \
|
||||
arch/arm/include/asm/topology.h \
|
||||
$(wildcard include/config/arm/cpu/topology.h) \
|
||||
$(wildcard include/config/bl/switcher.h) \
|
||||
include/asm-generic/topology.h \
|
||||
include/linux/sysctl.h \
|
||||
$(wildcard include/config/sysctl.h) \
|
||||
include/uapi/linux/sysctl.h \
|
||||
include/linux/elf.h \
|
||||
$(wildcard include/config/arch/use/gnu/property.h) \
|
||||
$(wildcard include/config/arch/have/elf/prot.h) \
|
||||
arch/arm/include/asm/elf.h \
|
||||
arch/arm/include/asm/vdso_datapage.h \
|
||||
include/vdso/datapage.h \
|
||||
$(wildcard include/config/arch/has/vdso/data.h) \
|
||||
include/uapi/asm-generic/errno-base.h \
|
||||
include/vdso/clocksource.h \
|
||||
$(wildcard include/config/generic/gettimeofday.h) \
|
||||
arch/arm/include/asm/vdso/clocksource.h \
|
||||
include/vdso/processor.h \
|
||||
arch/arm/include/asm/vdso/gettimeofday.h \
|
||||
$(wildcard include/config/arm/arch/timer.h) \
|
||||
arch/arm/include/asm/unistd.h \
|
||||
$(wildcard include/config/oabi/compat.h) \
|
||||
arch/arm/include/uapi/asm/unistd.h \
|
||||
arch/arm/include/generated/uapi/asm/unistd-eabi.h \
|
||||
arch/arm/include/generated/uapi/asm/unistd-common.h \
|
||||
arch/arm/include/generated/asm/unistd-nr.h \
|
||||
arch/arm/include/asm/vdso/cp15.h \
|
||||
$(wildcard include/config/cpu/cp15.h) \
|
||||
arch/arm/include/asm/user.h \
|
||||
include/uapi/linux/elf.h \
|
||||
include/uapi/linux/elf-em.h \
|
||||
include/linux/kobject.h \
|
||||
$(wildcard include/config/uevent/helper.h) \
|
||||
$(wildcard include/config/debug/kobject/release.h) \
|
||||
include/linux/sysfs.h \
|
||||
include/linux/kernfs.h \
|
||||
$(wildcard include/config/kernfs.h) \
|
||||
include/linux/idr.h \
|
||||
include/linux/radix-tree.h \
|
||||
include/linux/xarray.h \
|
||||
$(wildcard include/config/xarray/multi.h) \
|
||||
include/linux/kconfig.h \
|
||||
include/linux/local_lock.h \
|
||||
include/linux/local_lock_internal.h \
|
||||
include/linux/kobject_ns.h \
|
||||
include/linux/kref.h \
|
||||
include/linux/refcount.h \
|
||||
include/linux/moduleparam.h \
|
||||
$(wildcard include/config/alpha.h) \
|
||||
$(wildcard include/config/ia64.h) \
|
||||
$(wildcard include/config/ppc64.h) \
|
||||
include/linux/jump_label.h \
|
||||
$(wildcard include/config/have/arch/jump/label/relative.h) \
|
||||
arch/arm/include/asm/jump_label.h \
|
||||
include/linux/rbtree_latch.h \
|
||||
include/linux/error-injection.h \
|
||||
include/asm-generic/error-injection.h \
|
||||
include/linux/tracepoint-defs.h \
|
||||
include/linux/static_key.h \
|
||||
include/linux/static_call_types.h \
|
||||
$(wildcard include/config/have/static/call.h) \
|
||||
arch/arm/include/asm/module.h \
|
||||
$(wildcard include/config/arm/unwind.h) \
|
||||
$(wildcard include/config/arm/module/plts.h) \
|
||||
include/asm-generic/module.h \
|
||||
$(wildcard include/config/have/mod/arch/specific.h) \
|
||||
$(wildcard include/config/modules/use/elf/rel.h) \
|
||||
$(wildcard include/config/modules/use/elf/rela.h) \
|
||||
include/linux/build-salt.h \
|
||||
$(wildcard include/config/build/salt.h) \
|
||||
include/linux/elfnote.h \
|
||||
include/linux/vermagic.h \
|
||||
include/generated/utsrelease.h \
|
||||
arch/arm/include/asm/vermagic.h \
|
||||
|
||||
/home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.o: $(deps_/home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.o)
|
||||
|
||||
$(deps_/home/pi/LCD-show-master/st7789_module/fb_st7789v.mod.o):
|
||||
1122
st7789_module/.fb_st7789v.o.cmd
Normal file
1122
st7789_module/.fb_st7789v.o.cmd
Normal file
File diff suppressed because it is too large
Load Diff
1
st7789_module/.modules.order.cmd
Normal file
1
st7789_module/.modules.order.cmd
Normal file
@@ -0,0 +1 @@
|
||||
cmd_/home/pi/LCD-show-master/st7789_module/modules.order := { echo /home/pi/LCD-show-master/st7789_module/fb_st7789v.ko; :; } | awk '!x[$$0]++' - > /home/pi/LCD-show-master/st7789_module/modules.order
|
||||
13
st7789_module/Makefile
Executable file
13
st7789_module/Makefile
Executable file
@@ -0,0 +1,13 @@
|
||||
obj-m += fb_st7789v.o
|
||||
|
||||
KDIR ?= /lib/modules/`uname -r`/build
|
||||
|
||||
default:
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) modules
|
||||
|
||||
install:
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) modules_install
|
||||
$(DEPMOD)
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) clean
|
||||
0
st7789_module/Module.symvers
Executable file
0
st7789_module/Module.symvers
Executable file
323
st7789_module/fb_st7789v.c
Executable file
323
st7789_module/fb_st7789v.c
Executable file
@@ -0,0 +1,323 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* FB driver for the ST7789V LCD Controller
|
||||
*
|
||||
* Copyright (C) 2015 Dennis Menschel
|
||||
*/
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
#include "fbtft.h"
|
||||
|
||||
#define DRVNAME "fb_st7789v"
|
||||
|
||||
#define DEFAULT_GAMMA \
|
||||
"70 2C 2E 15 10 09 48 33 53 0B 19 18 20 25\n" \
|
||||
"70 2C 2E 15 10 09 48 33 53 0B 19 18 20 25"
|
||||
|
||||
#define HSD20_IPS_GAMMA \
|
||||
"D0 05 0A 09 08 05 2E 44 45 0F 17 16 2B 33\n" \
|
||||
"D0 05 0A 09 08 05 2E 43 45 0F 16 16 2B 33"
|
||||
|
||||
#define HSD20_IPS 1
|
||||
|
||||
/**
|
||||
* enum st7789v_command - ST7789V display controller commands
|
||||
*
|
||||
* @PORCTRL: porch setting
|
||||
* @GCTRL: gate control
|
||||
* @VCOMS: VCOM setting
|
||||
* @VDVVRHEN: VDV and VRH command enable
|
||||
* @VRHS: VRH set
|
||||
* @VDVS: VDV set
|
||||
* @VCMOFSET: VCOM offset set
|
||||
* @PWCTRL1: power control 1
|
||||
* @PVGAMCTRL: positive voltage gamma control
|
||||
* @NVGAMCTRL: negative voltage gamma control
|
||||
*
|
||||
* The command names are the same as those found in the datasheet to ease
|
||||
* looking up their semantics and usage.
|
||||
*
|
||||
* Note that the ST7789V display controller offers quite a few more commands
|
||||
* which have been omitted from this list as they are not used at the moment.
|
||||
* Furthermore, commands that are compliant with the MIPI DCS have been left
|
||||
* out as well to avoid duplicate entries.
|
||||
*/
|
||||
enum st7789v_command {
|
||||
PORCTRL = 0xB2,
|
||||
GCTRL = 0xB7,
|
||||
VCOMS = 0xBB,
|
||||
VDVVRHEN = 0xC2,
|
||||
VRHS = 0xC3,
|
||||
VDVS = 0xC4,
|
||||
VCMOFSET = 0xC5,
|
||||
PWCTRL1 = 0xD0,
|
||||
PVGAMCTRL = 0xE0,
|
||||
NVGAMCTRL = 0xE1,
|
||||
};
|
||||
|
||||
#define MADCTL_BGR BIT(3) /* bitmask for RGB/BGR order */
|
||||
#define MADCTL_MV BIT(5) /* bitmask for page/column order */
|
||||
#define MADCTL_MX BIT(6) /* bitmask for column address order */
|
||||
#define MADCTL_MY BIT(7) /* bitmask for page address order */
|
||||
|
||||
static u32 col1_offset = 0;
|
||||
static u32 col2_offset = 0;
|
||||
static u32 row1_offset = 0;
|
||||
static u32 row2_offset = 0;
|
||||
static short x_offset = 0;
|
||||
static short y_offset = 0;
|
||||
|
||||
/**
|
||||
* init_display() - initialize the display controller
|
||||
*
|
||||
* @par: FBTFT parameter object
|
||||
*
|
||||
* Most of the commands in this init function set their parameters to the
|
||||
* same default values which are already in place after the display has been
|
||||
* powered up. (The main exception to this rule is the pixel format which
|
||||
* would default to 18 instead of 16 bit per pixel.)
|
||||
* Nonetheless, this sequence can be used as a template for concrete
|
||||
* displays which usually need some adjustments.
|
||||
*
|
||||
* Return: 0 on success, < 0 if error occurred.
|
||||
*/
|
||||
static int init_display(struct fbtft_par *par)
|
||||
{
|
||||
/* turn off sleep mode */
|
||||
write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE);
|
||||
mdelay(120);
|
||||
|
||||
/* set pixel format to RGB-565 */
|
||||
write_reg(par, MIPI_DCS_SET_PIXEL_FORMAT, MIPI_DCS_PIXEL_FMT_16BIT);
|
||||
if (HSD20_IPS)
|
||||
write_reg(par, PORCTRL, 0x05, 0x05, 0x00, 0x33, 0x33);
|
||||
|
||||
else
|
||||
write_reg(par, PORCTRL, 0x08, 0x08, 0x00, 0x22, 0x22);
|
||||
|
||||
/*
|
||||
* VGH = 13.26V
|
||||
* VGL = -10.43V
|
||||
*/
|
||||
if (HSD20_IPS)
|
||||
write_reg(par, GCTRL, 0x75);
|
||||
else
|
||||
write_reg(par, GCTRL, 0x35);
|
||||
|
||||
/*
|
||||
* VDV and VRH register values come from command write
|
||||
* (instead of NVM)
|
||||
*/
|
||||
write_reg(par, VDVVRHEN, 0x01, 0xFF);
|
||||
|
||||
/*
|
||||
* VAP = 4.1V + (VCOM + VCOM offset + 0.5 * VDV)
|
||||
* VAN = -4.1V + (VCOM + VCOM offset + 0.5 * VDV)
|
||||
*/
|
||||
if (HSD20_IPS)
|
||||
write_reg(par, VRHS, 0x13);
|
||||
else
|
||||
write_reg(par, VRHS, 0x0B);
|
||||
|
||||
/* VDV = 0V */
|
||||
write_reg(par, VDVS, 0x20);
|
||||
|
||||
/* VCOM = 0.9V */
|
||||
if (HSD20_IPS)
|
||||
write_reg(par, VCOMS, 0x22);
|
||||
else
|
||||
write_reg(par, VCOMS, 0x20);
|
||||
|
||||
/* VCOM offset = 0V */
|
||||
write_reg(par, VCMOFSET, 0x20);
|
||||
|
||||
/*
|
||||
* AVDD = 6.8V
|
||||
* AVCL = -4.8V
|
||||
* VDS = 2.3V
|
||||
*/
|
||||
write_reg(par, PWCTRL1, 0xA4, 0xA1);
|
||||
|
||||
write_reg(par, MIPI_DCS_SET_DISPLAY_ON);
|
||||
|
||||
if (HSD20_IPS)
|
||||
write_reg(par, MIPI_DCS_ENTER_INVERT_MODE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void minipitft_set_addr_win(struct fbtft_par *par, int xs, int ys,
|
||||
int xe, int ye)
|
||||
{
|
||||
xs += x_offset;
|
||||
xe += x_offset;
|
||||
ys += y_offset;
|
||||
ye += y_offset;
|
||||
write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
|
||||
xs >> 8, xs & 0xFF, xe >> 8, xe & 0xFF);
|
||||
|
||||
write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
|
||||
ys >> 8, ys & 0xFF, ye >> 8, ye & 0xFF);
|
||||
|
||||
write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
|
||||
}
|
||||
|
||||
/**
|
||||
* set_var() - apply LCD properties like rotation and BGR mode
|
||||
*
|
||||
* @par: FBTFT parameter object
|
||||
*
|
||||
* Return: 0 on success, < 0 if error occurred.
|
||||
*/
|
||||
static int set_var(struct fbtft_par *par)
|
||||
{
|
||||
u8 madctl_par = 0;
|
||||
struct fbtft_display *display = &par->pdata->display;
|
||||
u32 width = display->width;
|
||||
u32 height = display->height;
|
||||
if (par->bgr)
|
||||
madctl_par |= MADCTL_BGR;
|
||||
|
||||
if (width < 240) {
|
||||
// Display is centered
|
||||
row1_offset = row2_offset = (int)((320 - height + 1) / 2);
|
||||
col1_offset = (int)((240 - width) / 2);
|
||||
col2_offset = (int)((240 - width + 1) / 2);
|
||||
} else {
|
||||
row1_offset = 0;
|
||||
row2_offset = (320 - height);
|
||||
col1_offset = col2_offset = (240 - width);
|
||||
}
|
||||
|
||||
switch (par->info->var.rotate) {
|
||||
case 0:
|
||||
x_offset = col1_offset;
|
||||
y_offset = row1_offset;
|
||||
break;
|
||||
case 90:
|
||||
madctl_par |= (MADCTL_MV | MADCTL_MY);
|
||||
x_offset = row1_offset;
|
||||
y_offset = col1_offset;
|
||||
break;
|
||||
case 180:
|
||||
madctl_par |= (MADCTL_MX | MADCTL_MY);
|
||||
x_offset = col2_offset;
|
||||
y_offset = row2_offset;
|
||||
break;
|
||||
case 270:
|
||||
madctl_par |= (MADCTL_MV | MADCTL_MX);
|
||||
x_offset = row2_offset;
|
||||
y_offset = col2_offset;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
write_reg(par, MIPI_DCS_SET_ADDRESS_MODE, madctl_par);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* set_gamma() - set gamma curves
|
||||
*
|
||||
* @par: FBTFT parameter object
|
||||
* @curves: gamma curves
|
||||
*
|
||||
* Before the gamma curves are applied, they are preprocessed with a bitmask
|
||||
* to ensure syntactically correct input for the display controller.
|
||||
* This implies that the curves input parameter might be changed by this
|
||||
* function and that illegal gamma values are auto-corrected and not
|
||||
* reported as errors.
|
||||
*
|
||||
* Return: 0 on success, < 0 if error occurred.
|
||||
*/
|
||||
static int set_gamma(struct fbtft_par *par, u32 *curves)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int c; /* curve index offset */
|
||||
|
||||
/*
|
||||
* Bitmasks for gamma curve command parameters.
|
||||
* The masks are the same for both positive and negative voltage
|
||||
* gamma curves.
|
||||
*/
|
||||
static const u8 gamma_par_mask[] = {
|
||||
0xFF, /* V63[3:0], V0[3:0]*/
|
||||
0x3F, /* V1[5:0] */
|
||||
0x3F, /* V2[5:0] */
|
||||
0x1F, /* V4[4:0] */
|
||||
0x1F, /* V6[4:0] */
|
||||
0x3F, /* J0[1:0], V13[3:0] */
|
||||
0x7F, /* V20[6:0] */
|
||||
0x77, /* V36[2:0], V27[2:0] */
|
||||
0x7F, /* V43[6:0] */
|
||||
0x3F, /* J1[1:0], V50[3:0] */
|
||||
0x1F, /* V57[4:0] */
|
||||
0x1F, /* V59[4:0] */
|
||||
0x3F, /* V61[5:0] */
|
||||
0x3F, /* V62[5:0] */
|
||||
};
|
||||
|
||||
for (i = 0; i < par->gamma.num_curves; i++) {
|
||||
c = i * par->gamma.num_values;
|
||||
for (j = 0; j < par->gamma.num_values; j++)
|
||||
curves[c + j] &= gamma_par_mask[j];
|
||||
write_reg(par, PVGAMCTRL + i,
|
||||
curves[c + 0], curves[c + 1], curves[c + 2],
|
||||
curves[c + 3], curves[c + 4], curves[c + 5],
|
||||
curves[c + 6], curves[c + 7], curves[c + 8],
|
||||
curves[c + 9], curves[c + 10], curves[c + 11],
|
||||
curves[c + 12], curves[c + 13]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* blank() - blank the display
|
||||
*
|
||||
* @par: FBTFT parameter object
|
||||
* @on: whether to enable or disable blanking the display
|
||||
*
|
||||
* Return: 0 on success, < 0 if error occurred.
|
||||
*/
|
||||
static int blank(struct fbtft_par *par, bool on)
|
||||
{
|
||||
if (on)
|
||||
write_reg(par, MIPI_DCS_SET_DISPLAY_OFF);
|
||||
else
|
||||
write_reg(par, MIPI_DCS_SET_DISPLAY_ON);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct fbtft_display display = {
|
||||
.regwidth = 8,
|
||||
.width = 240,
|
||||
.height = 320,
|
||||
.gamma_num = 2,
|
||||
.gamma_len = 14,
|
||||
.gamma = HSD20_IPS_GAMMA,
|
||||
.fbtftops = {
|
||||
.init_display = init_display,
|
||||
.set_var = set_var,
|
||||
.set_gamma = set_gamma,
|
||||
.blank = blank,
|
||||
.set_addr_win = minipitft_set_addr_win,
|
||||
},
|
||||
};
|
||||
|
||||
FBTFT_REGISTER_DRIVER(DRVNAME, "sitronix,st7789v", &display);
|
||||
|
||||
MODULE_ALIAS("spi:" DRVNAME);
|
||||
MODULE_ALIAS("platform:" DRVNAME);
|
||||
MODULE_ALIAS("spi:st7789v");
|
||||
MODULE_ALIAS("platform:st7789v");
|
||||
|
||||
MODULE_DESCRIPTION("FB driver for the ST7789V LCD Controller");
|
||||
MODULE_AUTHOR("Dennis Menschel");
|
||||
MODULE_LICENSE("GPL");
|
||||
BIN
st7789_module/fb_st7789v.ko
Executable file
BIN
st7789_module/fb_st7789v.ko
Executable file
Binary file not shown.
2
st7789_module/fb_st7789v.mod
Executable file
2
st7789_module/fb_st7789v.mod
Executable file
@@ -0,0 +1,2 @@
|
||||
/home/pi/LCD-show-master/st7789_module/fb_st7789v.o
|
||||
|
||||
44
st7789_module/fb_st7789v.mod.c
Executable file
44
st7789_module/fb_st7789v.mod.c
Executable file
@@ -0,0 +1,44 @@
|
||||
#include <linux/module.h>
|
||||
#define INCLUDE_VERMAGIC
|
||||
#include <linux/build-salt.h>
|
||||
#include <linux/vermagic.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
BUILD_SALT;
|
||||
|
||||
MODULE_INFO(vermagic, VERMAGIC_STRING);
|
||||
MODULE_INFO(name, KBUILD_MODNAME);
|
||||
|
||||
__visible struct module __this_module
|
||||
__section(".gnu.linkonce.this_module") = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.init = init_module,
|
||||
#ifdef CONFIG_MODULE_UNLOAD
|
||||
.exit = cleanup_module,
|
||||
#endif
|
||||
.arch = MODULE_ARCH_INIT,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RETPOLINE
|
||||
MODULE_INFO(retpoline, "Y");
|
||||
#endif
|
||||
|
||||
static const struct modversion_info ____versions[]
|
||||
__used __section("__versions") = {
|
||||
{ 0xa11440c8, "module_layout" },
|
||||
{ 0xe0e4b537, "platform_driver_unregister" },
|
||||
{ 0xac875933, "driver_unregister" },
|
||||
{ 0x48a4db87, "__platform_driver_register" },
|
||||
{ 0x58cecc2a, "__spi_register_driver" },
|
||||
{ 0x2063d1c0, "fbtft_probe_common" },
|
||||
{ 0xb0972a67, "fbtft_remove_common" },
|
||||
{ 0x8e865d3c, "arm_delay_ops" },
|
||||
{ 0xb1ad28e0, "__gnu_mcount_nc" },
|
||||
};
|
||||
|
||||
MODULE_INFO(depends, "fbtft");
|
||||
|
||||
MODULE_ALIAS("of:N*T*Csitronix,st7789v");
|
||||
MODULE_ALIAS("of:N*T*Csitronix,st7789vC*");
|
||||
|
||||
MODULE_INFO(srcversion, "238003A81408F8B54A6E457");
|
||||
BIN
st7789_module/fb_st7789v.mod.o
Executable file
BIN
st7789_module/fb_st7789v.mod.o
Executable file
Binary file not shown.
BIN
st7789_module/fb_st7789v.o
Executable file
BIN
st7789_module/fb_st7789v.o
Executable file
Binary file not shown.
436
st7789_module/fbtft.h
Executable file
436
st7789_module/fbtft.h
Executable file
@@ -0,0 +1,436 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/* Copyright (C) 2013 Noralf Tronnes */
|
||||
|
||||
#ifndef __LINUX_FBTFT_H
|
||||
#define __LINUX_FBTFT_H
|
||||
|
||||
#include <linux/fb.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#define FBTFT_ONBOARD_BACKLIGHT 2
|
||||
|
||||
#define FBTFT_GPIO_NO_MATCH 0xFFFF
|
||||
#define FBTFT_GPIO_NAME_SIZE 32
|
||||
#define FBTFT_MAX_INIT_SEQUENCE 512
|
||||
#define FBTFT_GAMMA_MAX_VALUES_TOTAL 128
|
||||
|
||||
#define FBTFT_OF_INIT_CMD BIT(24)
|
||||
#define FBTFT_OF_INIT_DELAY BIT(25)
|
||||
|
||||
/**
|
||||
* struct fbtft_gpio - Structure that holds one pinname to gpio mapping
|
||||
* @name: pinname (reset, dc, etc.)
|
||||
* @gpio: GPIO number
|
||||
*
|
||||
*/
|
||||
struct fbtft_gpio {
|
||||
char name[FBTFT_GPIO_NAME_SIZE];
|
||||
struct gpio_desc *gpio;
|
||||
};
|
||||
|
||||
struct fbtft_par;
|
||||
|
||||
/**
|
||||
* struct fbtft_ops - FBTFT operations structure
|
||||
* @write: Writes to interface bus
|
||||
* @read: Reads from interface bus
|
||||
* @write_vmem: Writes video memory to display
|
||||
* @write_reg: Writes to controller register
|
||||
* @set_addr_win: Set the GRAM update window
|
||||
* @reset: Reset the LCD controller
|
||||
* @mkdirty: Marks display lines for update
|
||||
* @update_display: Updates the display
|
||||
* @init_display: Initializes the display
|
||||
* @blank: Blank the display (optional)
|
||||
* @request_gpios_match: Do pinname to gpio matching
|
||||
* @request_gpios: Request gpios from the kernel
|
||||
* @free_gpios: Free previously requested gpios
|
||||
* @verify_gpios: Verify that necessary gpios is present (optional)
|
||||
* @register_backlight: Used to register backlight device (optional)
|
||||
* @unregister_backlight: Unregister backlight device (optional)
|
||||
* @set_var: Configure LCD with values from variables like @rotate and @bgr
|
||||
* (optional)
|
||||
* @set_gamma: Set Gamma curve (optional)
|
||||
*
|
||||
* Most of these operations have default functions assigned to them in
|
||||
* fbtft_framebuffer_alloc()
|
||||
*/
|
||||
struct fbtft_ops {
|
||||
int (*write)(struct fbtft_par *par, void *buf, size_t len);
|
||||
int (*read)(struct fbtft_par *par, void *buf, size_t len);
|
||||
int (*write_vmem)(struct fbtft_par *par, size_t offset, size_t len);
|
||||
void (*write_register)(struct fbtft_par *par, int len, ...);
|
||||
|
||||
void (*set_addr_win)(struct fbtft_par *par,
|
||||
int xs, int ys, int xe, int ye);
|
||||
void (*reset)(struct fbtft_par *par);
|
||||
void (*mkdirty)(struct fb_info *info, int from, int to);
|
||||
void (*update_display)(struct fbtft_par *par,
|
||||
unsigned int start_line, unsigned int end_line);
|
||||
int (*init_display)(struct fbtft_par *par);
|
||||
int (*blank)(struct fbtft_par *par, bool on);
|
||||
|
||||
unsigned long (*request_gpios_match)(struct fbtft_par *par,
|
||||
const struct fbtft_gpio *gpio);
|
||||
int (*request_gpios)(struct fbtft_par *par);
|
||||
int (*verify_gpios)(struct fbtft_par *par);
|
||||
|
||||
void (*register_backlight)(struct fbtft_par *par);
|
||||
void (*unregister_backlight)(struct fbtft_par *par);
|
||||
|
||||
int (*set_var)(struct fbtft_par *par);
|
||||
int (*set_gamma)(struct fbtft_par *par, u32 *curves);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fbtft_display - Describes the display properties
|
||||
* @width: Width of display in pixels
|
||||
* @height: Height of display in pixels
|
||||
* @regwidth: LCD Controller Register width in bits
|
||||
* @buswidth: Display interface bus width in bits
|
||||
* @backlight: Backlight type.
|
||||
* @fbtftops: FBTFT operations provided by driver or device (platform_data)
|
||||
* @bpp: Bits per pixel
|
||||
* @fps: Frames per second
|
||||
* @txbuflen: Size of transmit buffer
|
||||
* @init_sequence: Pointer to LCD initialization array
|
||||
* @gamma: String representation of Gamma curve(s)
|
||||
* @gamma_num: Number of Gamma curves
|
||||
* @gamma_len: Number of values per Gamma curve
|
||||
* @debug: Initial debug value
|
||||
*
|
||||
* This structure is not stored by FBTFT except for init_sequence.
|
||||
*/
|
||||
struct fbtft_display {
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int regwidth;
|
||||
unsigned int buswidth;
|
||||
unsigned int backlight;
|
||||
struct fbtft_ops fbtftops;
|
||||
unsigned int bpp;
|
||||
unsigned int fps;
|
||||
int txbuflen;
|
||||
const s16 *init_sequence;
|
||||
char *gamma;
|
||||
int gamma_num;
|
||||
int gamma_len;
|
||||
unsigned long debug;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fbtft_platform_data - Passes display specific data to the driver
|
||||
* @display: Display properties
|
||||
* @gpios: Pointer to an array of pinname to gpio mappings
|
||||
* @rotate: Display rotation angle
|
||||
* @bgr: LCD Controller BGR bit
|
||||
* @fps: Frames per second (this will go away, use @fps in @fbtft_display)
|
||||
* @txbuflen: Size of transmit buffer
|
||||
* @startbyte: When set, enables use of Startbyte in transfers
|
||||
* @gamma: String representation of Gamma curve(s)
|
||||
* @extra: A way to pass extra info
|
||||
*/
|
||||
struct fbtft_platform_data {
|
||||
struct fbtft_display display;
|
||||
unsigned int rotate;
|
||||
bool bgr;
|
||||
unsigned int fps;
|
||||
int txbuflen;
|
||||
u8 startbyte;
|
||||
char *gamma;
|
||||
void *extra;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fbtft_par - Main FBTFT data structure
|
||||
*
|
||||
* This structure holds all relevant data to operate the display
|
||||
*
|
||||
* See sourcefile for documentation since nested structs is not
|
||||
* supported by kernel-doc.
|
||||
*
|
||||
*/
|
||||
/* @spi: Set if it is a SPI device
|
||||
* @pdev: Set if it is a platform device
|
||||
* @info: Pointer to framebuffer fb_info structure
|
||||
* @pdata: Pointer to platform data
|
||||
* @ssbuf: Not used
|
||||
* @pseudo_palette: Used by fb_set_colreg()
|
||||
* @txbuf.buf: Transmit buffer
|
||||
* @txbuf.len: Transmit buffer length
|
||||
* @buf: Small buffer used when writing init data over SPI
|
||||
* @startbyte: Used by some controllers when in SPI mode.
|
||||
* Format: 6 bit Device id + RS bit + RW bit
|
||||
* @fbtftops: FBTFT operations provided by driver or device (platform_data)
|
||||
* @dirty_lock: Protects dirty_lines_start and dirty_lines_end
|
||||
* @dirty_lines_start: Where to begin updating display
|
||||
* @dirty_lines_end: Where to end updating display
|
||||
* @gpio.reset: GPIO used to reset display
|
||||
* @gpio.dc: Data/Command signal, also known as RS
|
||||
* @gpio.rd: Read latching signal
|
||||
* @gpio.wr: Write latching signal
|
||||
* @gpio.latch: Bus latch signal, eg. 16->8 bit bus latch
|
||||
* @gpio.cs: LCD Chip Select with parallel interface bus
|
||||
* @gpio.db[16]: Parallel databus
|
||||
* @gpio.led[16]: Led control signals
|
||||
* @gpio.aux[16]: Auxiliary signals, not used by core
|
||||
* @init_sequence: Pointer to LCD initialization array
|
||||
* @gamma.lock: Mutex for Gamma curve locking
|
||||
* @gamma.curves: Pointer to Gamma curve array
|
||||
* @gamma.num_values: Number of values per Gamma curve
|
||||
* @gamma.num_curves: Number of Gamma curves
|
||||
* @debug: Pointer to debug value
|
||||
* @current_debug:
|
||||
* @first_update_done: Used to only time the first display update
|
||||
* @update_time: Used to calculate 'fps' in debug output
|
||||
* @bgr: BGR mode/\n
|
||||
* @extra: Extra info needed by driver
|
||||
*/
|
||||
struct fbtft_par {
|
||||
struct spi_device *spi;
|
||||
struct platform_device *pdev;
|
||||
struct fb_info *info;
|
||||
struct fbtft_platform_data *pdata;
|
||||
u16 *ssbuf;
|
||||
u32 pseudo_palette[16];
|
||||
struct {
|
||||
void *buf;
|
||||
size_t len;
|
||||
} txbuf;
|
||||
u8 *buf;
|
||||
u8 startbyte;
|
||||
struct fbtft_ops fbtftops;
|
||||
spinlock_t dirty_lock;
|
||||
unsigned int dirty_lines_start;
|
||||
unsigned int dirty_lines_end;
|
||||
struct {
|
||||
struct gpio_desc *reset;
|
||||
struct gpio_desc *dc;
|
||||
struct gpio_desc *rd;
|
||||
struct gpio_desc *wr;
|
||||
struct gpio_desc *latch;
|
||||
struct gpio_desc *cs;
|
||||
struct gpio_desc *db[16];
|
||||
struct gpio_desc *led[16];
|
||||
struct gpio_desc *aux[16];
|
||||
} gpio;
|
||||
const s16 *init_sequence;
|
||||
struct {
|
||||
struct mutex lock;
|
||||
u32 *curves;
|
||||
int num_values;
|
||||
int num_curves;
|
||||
} gamma;
|
||||
unsigned long debug;
|
||||
bool first_update_done;
|
||||
ktime_t update_time;
|
||||
bool bgr;
|
||||
void *extra;
|
||||
bool polarity;
|
||||
};
|
||||
|
||||
#define NUMARGS(...) (sizeof((int[]){__VA_ARGS__}) / sizeof(int))
|
||||
|
||||
#define write_reg(par, ...) \
|
||||
((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
|
||||
|
||||
/* fbtft-core.c */
|
||||
int fbtft_write_buf_dc(struct fbtft_par *par, void *buf, size_t len, int dc);
|
||||
__printf(5, 6)
|
||||
void fbtft_dbg_hex(const struct device *dev, int groupsize,
|
||||
void *buf, size_t len, const char *fmt, ...);
|
||||
struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
|
||||
struct device *dev,
|
||||
struct fbtft_platform_data *pdata);
|
||||
void fbtft_framebuffer_release(struct fb_info *info);
|
||||
int fbtft_register_framebuffer(struct fb_info *fb_info);
|
||||
int fbtft_unregister_framebuffer(struct fb_info *fb_info);
|
||||
void fbtft_register_backlight(struct fbtft_par *par);
|
||||
void fbtft_unregister_backlight(struct fbtft_par *par);
|
||||
int fbtft_init_display(struct fbtft_par *par);
|
||||
int fbtft_probe_common(struct fbtft_display *display, struct spi_device *sdev,
|
||||
struct platform_device *pdev,
|
||||
const struct of_device_id *dt_ids);
|
||||
int fbtft_remove_common(struct device *dev, struct fb_info *info);
|
||||
|
||||
/* fbtft-io.c */
|
||||
int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len);
|
||||
int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len);
|
||||
int fbtft_read_spi(struct fbtft_par *par, void *buf, size_t len);
|
||||
int fbtft_write_gpio8_wr(struct fbtft_par *par, void *buf, size_t len);
|
||||
int fbtft_write_gpio16_wr(struct fbtft_par *par, void *buf, size_t len);
|
||||
int fbtft_write_gpio16_wr_latched(struct fbtft_par *par, void *buf, size_t len);
|
||||
|
||||
/* fbtft-bus.c */
|
||||
int fbtft_write_vmem8_bus8(struct fbtft_par *par, size_t offset, size_t len);
|
||||
int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len);
|
||||
int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len);
|
||||
int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len);
|
||||
void fbtft_write_reg8_bus8(struct fbtft_par *par, int len, ...);
|
||||
void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...);
|
||||
void fbtft_write_reg16_bus8(struct fbtft_par *par, int len, ...);
|
||||
void fbtft_write_reg16_bus16(struct fbtft_par *par, int len, ...);
|
||||
|
||||
#define FBTFT_REGISTER_DRIVER_START(_display) \
|
||||
\
|
||||
static const struct of_device_id dt_ids[]; \
|
||||
\
|
||||
static int fbtft_driver_probe_spi(struct spi_device *spi) \
|
||||
{ \
|
||||
return fbtft_probe_common(_display, spi, NULL, dt_ids); \
|
||||
} \
|
||||
\
|
||||
static int fbtft_driver_remove_spi(struct spi_device *spi) \
|
||||
{ \
|
||||
struct fb_info *info = spi_get_drvdata(spi); \
|
||||
\
|
||||
return fbtft_remove_common(&spi->dev, info); \
|
||||
} \
|
||||
\
|
||||
static int fbtft_driver_probe_pdev(struct platform_device *pdev) \
|
||||
{ \
|
||||
return fbtft_probe_common(_display, NULL, pdev, dt_ids); \
|
||||
} \
|
||||
\
|
||||
static int fbtft_driver_remove_pdev(struct platform_device *pdev) \
|
||||
{ \
|
||||
struct fb_info *info = platform_get_drvdata(pdev); \
|
||||
\
|
||||
return fbtft_remove_common(&pdev->dev, info); \
|
||||
} \
|
||||
\
|
||||
static const struct of_device_id dt_ids[] = {
|
||||
|
||||
#define FBTFT_COMPATIBLE(_compatible) \
|
||||
{ .compatible = _compatible },
|
||||
|
||||
#define FBTFT_VARIANT_COMPATIBLE(_compatible, _variant) \
|
||||
{ .compatible = _compatible, .data = _variant },
|
||||
|
||||
#define FBTFT_REGISTER_DRIVER_END(_name, _display) \
|
||||
\
|
||||
{}, \
|
||||
}; \
|
||||
\
|
||||
MODULE_DEVICE_TABLE(of, dt_ids); \
|
||||
\
|
||||
\
|
||||
static struct spi_driver fbtft_driver_spi_driver = { \
|
||||
.driver = { \
|
||||
.name = _name, \
|
||||
.of_match_table = dt_ids, \
|
||||
}, \
|
||||
.probe = fbtft_driver_probe_spi, \
|
||||
.remove = fbtft_driver_remove_spi, \
|
||||
}; \
|
||||
\
|
||||
static struct platform_driver fbtft_driver_platform_driver = { \
|
||||
.driver = { \
|
||||
.name = _name, \
|
||||
.owner = THIS_MODULE, \
|
||||
.of_match_table = dt_ids, \
|
||||
}, \
|
||||
.probe = fbtft_driver_probe_pdev, \
|
||||
.remove = fbtft_driver_remove_pdev, \
|
||||
}; \
|
||||
\
|
||||
static int __init fbtft_driver_module_init(void) \
|
||||
{ \
|
||||
int ret; \
|
||||
\
|
||||
ret = spi_register_driver(&fbtft_driver_spi_driver); \
|
||||
if (ret < 0) \
|
||||
return ret; \
|
||||
return platform_driver_register(&fbtft_driver_platform_driver); \
|
||||
} \
|
||||
\
|
||||
static void __exit fbtft_driver_module_exit(void) \
|
||||
{ \
|
||||
spi_unregister_driver(&fbtft_driver_spi_driver); \
|
||||
platform_driver_unregister(&fbtft_driver_platform_driver); \
|
||||
} \
|
||||
\
|
||||
module_init(fbtft_driver_module_init); \
|
||||
module_exit(fbtft_driver_module_exit);
|
||||
|
||||
#define FBTFT_REGISTER_DRIVER(_name, _compatible, _display) \
|
||||
FBTFT_REGISTER_DRIVER_START(_display) \
|
||||
FBTFT_COMPATIBLE(_compatible) \
|
||||
FBTFT_REGISTER_DRIVER_END(_name, _display)
|
||||
|
||||
/* Debug macros */
|
||||
|
||||
/* shorthand debug levels */
|
||||
#define DEBUG_LEVEL_1 DEBUG_REQUEST_GPIOS
|
||||
#define DEBUG_LEVEL_2 (DEBUG_LEVEL_1 | DEBUG_DRIVER_INIT_FUNCTIONS \
|
||||
| DEBUG_TIME_FIRST_UPDATE)
|
||||
#define DEBUG_LEVEL_3 (DEBUG_LEVEL_2 | DEBUG_RESET | DEBUG_INIT_DISPLAY \
|
||||
| DEBUG_BLANK | DEBUG_REQUEST_GPIOS \
|
||||
| DEBUG_FREE_GPIOS \
|
||||
| DEBUG_VERIFY_GPIOS \
|
||||
| DEBUG_BACKLIGHT | DEBUG_SYSFS)
|
||||
#define DEBUG_LEVEL_4 (DEBUG_LEVEL_2 | DEBUG_FB_READ | DEBUG_FB_WRITE \
|
||||
| DEBUG_FB_FILLRECT \
|
||||
| DEBUG_FB_COPYAREA \
|
||||
| DEBUG_FB_IMAGEBLIT | DEBUG_FB_BLANK)
|
||||
#define DEBUG_LEVEL_5 (DEBUG_LEVEL_3 | DEBUG_UPDATE_DISPLAY)
|
||||
#define DEBUG_LEVEL_6 (DEBUG_LEVEL_4 | DEBUG_LEVEL_5)
|
||||
#define DEBUG_LEVEL_7 0xFFFFFFFF
|
||||
|
||||
#define DEBUG_DRIVER_INIT_FUNCTIONS BIT(3)
|
||||
#define DEBUG_TIME_FIRST_UPDATE BIT(4)
|
||||
#define DEBUG_TIME_EACH_UPDATE BIT(5)
|
||||
#define DEBUG_DEFERRED_IO BIT(6)
|
||||
#define DEBUG_FBTFT_INIT_FUNCTIONS BIT(7)
|
||||
|
||||
/* fbops */
|
||||
#define DEBUG_FB_READ BIT(8)
|
||||
#define DEBUG_FB_WRITE BIT(9)
|
||||
#define DEBUG_FB_FILLRECT BIT(10)
|
||||
#define DEBUG_FB_COPYAREA BIT(11)
|
||||
#define DEBUG_FB_IMAGEBLIT BIT(12)
|
||||
#define DEBUG_FB_SETCOLREG BIT(13)
|
||||
#define DEBUG_FB_BLANK BIT(14)
|
||||
|
||||
#define DEBUG_SYSFS BIT(16)
|
||||
|
||||
/* fbtftops */
|
||||
#define DEBUG_BACKLIGHT BIT(17)
|
||||
#define DEBUG_READ BIT(18)
|
||||
#define DEBUG_WRITE BIT(19)
|
||||
#define DEBUG_WRITE_VMEM BIT(20)
|
||||
#define DEBUG_WRITE_REGISTER BIT(21)
|
||||
#define DEBUG_SET_ADDR_WIN BIT(22)
|
||||
#define DEBUG_RESET BIT(23)
|
||||
#define DEBUG_MKDIRTY BIT(24)
|
||||
#define DEBUG_UPDATE_DISPLAY BIT(25)
|
||||
#define DEBUG_INIT_DISPLAY BIT(26)
|
||||
#define DEBUG_BLANK BIT(27)
|
||||
#define DEBUG_REQUEST_GPIOS BIT(28)
|
||||
#define DEBUG_FREE_GPIOS BIT(29)
|
||||
#define DEBUG_REQUEST_GPIOS_MATCH BIT(30)
|
||||
#define DEBUG_VERIFY_GPIOS BIT(31)
|
||||
|
||||
#define fbtft_init_dbg(dev, format, arg...) \
|
||||
do { \
|
||||
if (unlikely((dev)->platform_data && \
|
||||
(((struct fbtft_platform_data *)(dev)->platform_data)->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
|
||||
dev_info(dev, format, ##arg); \
|
||||
} while (0)
|
||||
|
||||
#define fbtft_par_dbg(level, par, format, arg...) \
|
||||
do { \
|
||||
if (unlikely((par)->debug & (level))) \
|
||||
dev_info((par)->info->device, format, ##arg); \
|
||||
} while (0)
|
||||
|
||||
#define fbtft_par_dbg_hex(level, par, dev, type, buf, num, format, arg...) \
|
||||
do { \
|
||||
if (unlikely((par)->debug & (level))) \
|
||||
fbtft_dbg_hex(dev, sizeof(type), buf,\
|
||||
(num) * sizeof(type), format, ##arg); \
|
||||
} while (0)
|
||||
|
||||
#endif /* __LINUX_FBTFT_H */
|
||||
1
st7789_module/modules.order
Executable file
1
st7789_module/modules.order
Executable file
@@ -0,0 +1 @@
|
||||
/home/pi/LCD-show-master/st7789_module/fb_st7789v.ko
|
||||
BIN
waveshare28-v2.dtbo
Executable file
BIN
waveshare28-v2.dtbo
Executable file
Binary file not shown.
Reference in New Issue
Block a user