dtoverlays: Add overlay to enable the HEVC V4L2 driver
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Fri, 13 Mar 2020 16:52:55 +0000 (16:52 +0000)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:33:31 +0000 (16:33 +0100)
This replaces the rpivid_mem register mapping driver.
When the driver is complete, these DT changes should be
merged into the base DT instead of being an overlay.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
arch/arm/boot/dts/overlays/Makefile
arch/arm/boot/dts/overlays/README
arch/arm/boot/dts/overlays/rpivid-v4l2-overlay.dts [new file with mode: 0644]
arch/arm/configs/bcm2711_defconfig

index 85d8249..9e5e3ff 100644 (file)
@@ -140,6 +140,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
        rpi-proto.dtbo \
        rpi-sense.dtbo \
        rpi-tv.dtbo \
+       rpivid-v4l2.dtbo \
        rra-digidac1-wm8741-audio.dtbo \
        sc16is750-i2c.dtbo \
        sc16is752-i2c.dtbo \
index 0d7d00a..4f77907 100644 (file)
@@ -2064,6 +2064,13 @@ Load:   dtoverlay=rpi-tv
 Params: <None>
 
 
+Name:   rpivid-v4l2
+Info:   Load the V4L2 stateless video decoder driver for the HEVC block,
+        disabling the memory mapped devices in the process.
+Load:   dtoverlay=rpivid-v4l2
+Params: <None>
+
+
 Name:   rra-digidac1-wm8741-audio
 Info:   Configures the Red Rocks Audio DigiDAC1 soundcard
 Load:   dtoverlay=rra-digidac1-wm8741-audio
diff --git a/arch/arm/boot/dts/overlays/rpivid-v4l2-overlay.dts b/arch/arm/boot/dts/overlays/rpivid-v4l2-overlay.dts
new file mode 100644 (file)
index 0000000..e6ece05
--- /dev/null
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0-only
+// Definitions for Raspberry Pi video decode engine
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/{
+       compatible = "brcm,bcm2711";
+
+       fragment@0 {
+               target = <&scb>;
+               __overlay__ {
+                       /* needed to avoid dtc warning */
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+                       codec@7eb10000 {
+                               compatible = "raspberrypi,rpivid-vid-decoder";
+                               reg = <0x0 0x7eb10000 0x1000>,  /* INTC */
+                                     <0x0 0x7eb00000 0x10000>; /* HEVC */
+                               reg-names = "intc",
+                                           "hevc";
+
+                               interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
+                               clocks = <&hevc_clk>;
+                               clock-names = "hevc";
+
+                               hevc_clk: hevc_clk {
+                                       compatible = "fixed-clock";
+                                       #clock-cells = <0>;
+                                       clock-frequency = <500000000>;
+                               };
+                       };
+               };
+       };
+
+       fragment@1 {
+               target = <&scb>;
+               __overlay__ {
+                       hevc-decoder@7eb00000 {
+                               status = "disabled";
+                       };
+                       rpivid-local-intc@7eb10000 {
+                               status = "disabled";
+                       };
+                       h264-decoder@7eb20000 {
+                               status = "disabled";
+                       };
+                       vp9-decoder@7eb30000 {
+                               status = "disabled";
+                       };
+               };
+       };
+};
index e4ea635..5fe23a0 100644 (file)
@@ -731,7 +731,6 @@ CONFIG_MEDIA_CAMERA_SUPPORT=y
 CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
 CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
 CONFIG_MEDIA_RADIO_SUPPORT=y
-CONFIG_MEDIA_CONTROLLER_REQUEST_API=y
 CONFIG_VIDEO_V4L2_SUBDEV_API=y
 CONFIG_MEDIA_USB_SUPPORT=y
 CONFIG_USB_VIDEO_CLASS=m
@@ -1241,7 +1240,6 @@ CONFIG_VT6656=m
 CONFIG_SPEAKUP=m
 CONFIG_SPEAKUP_SYNTH_SOFT=m
 CONFIG_STAGING_MEDIA=y
-CONFIG_VIDEO_RPIVID=m
 CONFIG_FB_TFT=m
 CONFIG_FB_TFT_AGM1264K_FL=m
 CONFIG_FB_TFT_BD663474=m