ee92ada02fe0f257cb38593e65707a714ca2b126
[oweals/openwrt.git] /
1 From b1d6499e00b6061ecc7061335199acf86f54d31a Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 13 Mar 2020 16:52:55 +0000
4 Subject: [PATCH] dtoverlays: Add overlay to enable the HEVC V4L2
5  driver
6
7 This replaces the rpivid_mem register mapping driver.
8 When the driver is complete, these DT changes should be
9 merged into the base DT instead of being an overlay.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13  arch/arm/boot/dts/overlays/Makefile           |  1 +
14  arch/arm/boot/dts/overlays/README             |  7 +++
15  .../boot/dts/overlays/rpivid-v4l2-overlay.dts | 55 +++++++++++++++++++
16  4 files changed, 63 insertions(+), 2 deletions(-)
17  create mode 100644 arch/arm/boot/dts/overlays/rpivid-v4l2-overlay.dts
18
19 --- a/arch/arm/boot/dts/overlays/Makefile
20 +++ b/arch/arm/boot/dts/overlays/Makefile
21 @@ -140,6 +140,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
22         rpi-proto.dtbo \
23         rpi-sense.dtbo \
24         rpi-tv.dtbo \
25 +       rpivid-v4l2.dtbo \
26         rra-digidac1-wm8741-audio.dtbo \
27         sc16is750-i2c.dtbo \
28         sc16is752-i2c.dtbo \
29 --- a/arch/arm/boot/dts/overlays/README
30 +++ b/arch/arm/boot/dts/overlays/README
31 @@ -2064,6 +2064,13 @@ Load:   dtoverlay=rpi-tv
32  Params: <None>
33  
34  
35 +Name:   rpivid-v4l2
36 +Info:   Load the V4L2 stateless video decoder driver for the HEVC block,
37 +        disabling the memory mapped devices in the process.
38 +Load:   dtoverlay=rpivid-v4l2
39 +Params: <None>
40 +
41 +
42  Name:   rra-digidac1-wm8741-audio
43  Info:   Configures the Red Rocks Audio DigiDAC1 soundcard
44  Load:   dtoverlay=rra-digidac1-wm8741-audio
45 --- /dev/null
46 +++ b/arch/arm/boot/dts/overlays/rpivid-v4l2-overlay.dts
47 @@ -0,0 +1,55 @@
48 +// SPDX-License-Identifier: GPL-2.0-only
49 +// Definitions for Raspberry Pi video decode engine
50 +/dts-v1/;
51 +/plugin/;
52 +
53 +#include <dt-bindings/interrupt-controller/arm-gic.h>
54 +
55 +/{
56 +       compatible = "brcm,bcm2711";
57 +
58 +       fragment@0 {
59 +               target = <&scb>;
60 +               __overlay__ {
61 +                       /* needed to avoid dtc warning */
62 +                       #address-cells = <2>;
63 +                       #size-cells = <1>;
64 +                       codec@7eb10000 {
65 +                               compatible = "raspberrypi,rpivid-vid-decoder";
66 +                               reg = <0x0 0x7eb10000 0x1000>,  /* INTC */
67 +                                     <0x0 0x7eb00000 0x10000>; /* HEVC */
68 +                               reg-names = "intc",
69 +                                           "hevc";
70 +
71 +                               interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
72 +
73 +                               clocks = <&hevc_clk>;
74 +                               clock-names = "hevc";
75 +
76 +                               hevc_clk: hevc_clk {
77 +                                       compatible = "fixed-clock";
78 +                                       #clock-cells = <0>;
79 +                                       clock-frequency = <500000000>;
80 +                               };
81 +                       };
82 +               };
83 +       };
84 +
85 +       fragment@1 {
86 +               target = <&scb>;
87 +               __overlay__ {
88 +                       hevc-decoder@7eb00000 {
89 +                               status = "disabled";
90 +                       };
91 +                       rpivid-local-intc@7eb10000 {
92 +                               status = "disabled";
93 +                       };
94 +                       h264-decoder@7eb20000 {
95 +                               status = "disabled";
96 +                       };
97 +                       vp9-decoder@7eb30000 {
98 +                               status = "disabled";
99 +                       };
100 +               };
101 +       };
102 +};