summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMadhavan Krishnan <madhavan.krishnan@linaro.org>2020-10-16 09:31:28 +0200
committerAndrei Gherzan <andrei@gherzan.ro>2020-11-14 23:26:39 +0000
commitb70c7b9021e37ec765f4db9aac0e0e76f617cbac (patch)
tree03050698bb5637ed9d52e7f9a4030f17a231ce37
parent15739db1ed469babe6cd162f0c100cae50919dcd (diff)
downloadmeta-raspberrypi-b70c7b9021e37ec765f4db9aac0e0e76f617cbac.tar.gz
libcamera: Enabled camera overlays define based
Added imx219.dtbo file in the overlays, and added dtoverlay in /boot/config.txt define based. To enable Sony Raspberry pi camera imx219 sensor, need to set the variable RASPBERRYPI_CAMERA_V2 as 1. In future, we can add any camera overlays here to support and use them with libcamera. Signed-off-by: Madhavan Krishnan <madhavan.krishnan@linaro.org>
-rw-r--r--conf/machine/include/rpi-base.inc1
-rw-r--r--docs/extra-build-config.md14
-rw-r--r--recipes-bsp/bootfiles/rpi-config_git.bb6
-rw-r--r--recipes-kernel/linux/linux-raspberrypi.inc3
4 files changed, 23 insertions, 1 deletions
diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index cd6d0b0..d4a25a4 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -42,6 +42,7 @@ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \
42 overlays/w1-gpio.dtbo \ 42 overlays/w1-gpio.dtbo \
43 overlays/gpio-ir.dtbo \ 43 overlays/gpio-ir.dtbo \
44 overlays/gpio-ir-tx.dtbo \ 44 overlays/gpio-ir-tx.dtbo \
45 overlays/imx219.dtbo \
45 " 46 "
46 47
47RPI_KERNEL_DEVICETREE ?= " \ 48RPI_KERNEL_DEVICETREE ?= " \
diff --git a/docs/extra-build-config.md b/docs/extra-build-config.md
index 8460184..921dcc5 100644
--- a/docs/extra-build-config.md
+++ b/docs/extra-build-config.md
@@ -326,3 +326,17 @@ option:
326 # Raspberry Pi 7\" display/touch screen \n \ 326 # Raspberry Pi 7\" display/touch screen \n \
327 lcd_rotate=2 \n \ 327 lcd_rotate=2 \n \
328 ' 328 '
329## Enable Raspberrypi Camera V2
330
331RaspberryPi does not have the unicam device ( RaspberryPi Camera ) enabled by default.
332Because this unicam device ( bcm2835-unicam ) as of now is used by libcamera opensource.
333So we have to explicitly set in local.conf.
334
335 RASPBERRYPI_CAMERA_V2 = "1"
336
337This will add the device tree overlays imx219 ( RaspberryPi Camera sensor V2 driver ) to config.txt.
338Also, this will enable adding Contiguous Memory Allocation value in the cmdline.txt.
339
340Ref.:
341* <https://github.com/raspberrypi/documentation/blob/master/linux/software/libcamera/README.md>
342* <https://www.raspberrypi.org/blog/an-open-source-camera-stack-for-raspberry-pi-using-libcamera/>
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index 9489951..e1c330d 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -178,6 +178,12 @@ do_deploy() {
178 echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt 178 echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
179 fi 179 fi
180 180
181 # Choose Camera Sensor to be used, default imx219 sensor
182 if [ "${RASPBERRYPI_CAMERA_V2}" = "1" ]; then
183 echo "# Enable Sony RaspberryPi Camera" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
184 echo "dtoverlay=imx219" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
185 fi
186
181 # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) 187 # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm)
182 if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then 188 if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then
183 echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt 189 echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
index 3219a23..4e0d4d0 100644
--- a/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -27,7 +27,8 @@ LINUX_VERSION_EXTENSION ?= ""
27 27
28# CMDLINE for raspberrypi 28# CMDLINE for raspberrypi
29SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}" 29SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}"
30CMDLINE ?= "dwc_otg.lpm_enable=0 ${SERIAL} root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" 30CMA ?= "${@oe.utils.conditional("RASPBERRYPI_CAMERA_V2", "1", "cma=64M", "", d)}"
31CMDLINE ?= "dwc_otg.lpm_enable=0 ${SERIAL} root=/dev/mmcblk0p2 rootfstype=ext4 rootwait ${CMA}"
31 32
32# Add the kernel debugger over console kernel command line option if enabled 33# Add the kernel debugger over console kernel command line option if enabled
33CMDLINE_append = ' ${@oe.utils.conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}' 34CMDLINE_append = ' ${@oe.utils.conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}'