1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
From a5b0c616e9b40bd7907c5157700661004a8ef331 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Mon, 2 Nov 2015 17:07:33 +0000
Subject: [PATCH 101/232] drm/vc4: Enable VC4 modules, and increase CMA size
with overlay
If using the overlay, be careful not to boot to GUI or run startx,
or the Pi will almost hang, reporting stalls in kernel threads.
---
arch/arm/boot/dts/overlays/README | 8 ++
arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 95 ++++++++++++++++++++++
arch/arm/configs/bcm2709_defconfig | 2 +
arch/arm/configs/bcmrpi_defconfig | 2 +
4 files changed, 107 insertions(+)
create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -601,6 +601,14 @@ Params: txd1_pin GPIO pi
rxd1_pin GPIO pin for RXD1 (15, 33 or 41 - default 15)
+Name: vc4-kms-v3d
+Info: Enable Eric Anholt's DRM VC4 HDMI/HVS/V3D driver. Running startx or
+ booting to GUI while this overlay is in use will cause interesting
+ lockups.
+Load: dtoverlay=vc4-kms-v3d
+Params: <None>
+
+
Name: vga666
Info: Overlay for the Fen Logic VGA666 board
This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
@@ -0,0 +1,95 @@
+/*
+ * vc4-kms-v3d-overlay.dts
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include "dt-bindings/clock/bcm2835.h"
+#include "dt-bindings/gpio/gpio.h"
+
+/ {
+ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
+
+ fragment@0 {
+ target = <&i2c2>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target = <&cprman>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@2 {
+ target = <&fb>;
+ __overlay__ {
+ status = "disabled";
+ };
+ };
+
+ fragment@3 {
+ target = <&soc>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ pixelvalve@7e206000 {
+ compatible = "brcm,bcm2835-pixelvalve0";
+ reg = <0x7e206000 0x100>;
+ interrupts = <2 13>; /* pwa0 */
+ };
+
+ pixelvalve@7e207000 {
+ compatible = "brcm,bcm2835-pixelvalve1";
+ reg = <0x7e207000 0x100>;
+ interrupts = <2 14>; /* pwa1 */
+ };
+
+ hvs@7e400000 {
+ compatible = "brcm,bcm2835-hvs";
+ reg = <0x7e400000 0x6000>;
+ interrupts = <2 1>;
+ };
+
+ pixelvalve@7e807000 {
+ compatible = "brcm,bcm2835-pixelvalve2";
+ reg = <0x7e807000 0x100>;
+ interrupts = <2 10>; /* pixelvalve */
+ };
+
+ hdmi@7e902000 {
+ compatible = "brcm,bcm2835-hdmi";
+ reg = <0x7e902000 0x600>,
+ <0x7e808000 0x100>;
+ interrupts = <2 8>, <2 9>;
+ ddc = <&i2c2>;
+ hpd-gpio = <&gpio 46 GPIO_ACTIVE_HIGH>;
+ clocks = <&cprman BCM2835_PLLH_PIX>,
+ <&cprman BCM2835_CLOCK_HSM>;
+ clock-names = "pixel", "hdmi";
+ };
+
+ v3d@7ec00000 {
+ compatible = "brcm,vc4-v3d";
+ reg = <0x7ec00000 0x1000>;
+ interrupts = <1 10>;
+ };
+
+ gpu@7e4c0000 {
+ compatible = "brcm,bcm2835-vc4";
+ };
+ };
+ };
+
+ fragment@4 {
+ target-path = "/chosen";
+ __overlay__ {
+ bootargs = "cma=256M@512M";
+ };
+ };
+};
--- a/arch/arm/configs/bcm2709_defconfig
+++ b/arch/arm/configs/bcm2709_defconfig
@@ -802,6 +802,8 @@ CONFIG_VIDEO_TW9903=m
CONFIG_VIDEO_TW9906=m
CONFIG_VIDEO_OV7640=m
CONFIG_VIDEO_MT9V011=m
+CONFIG_DRM=m
+CONFIG_DRM_VC4=m
CONFIG_FB=y
CONFIG_FB_BCM2708=y
CONFIG_FB_UDL=m
--- a/arch/arm/configs/bcmrpi_defconfig
+++ b/arch/arm/configs/bcmrpi_defconfig
@@ -795,6 +795,8 @@ CONFIG_VIDEO_TW9903=m
CONFIG_VIDEO_TW9906=m
CONFIG_VIDEO_OV7640=m
CONFIG_VIDEO_MT9V011=m
+CONFIG_DRM=m
+CONFIG_DRM_VC4=m
CONFIG_FB=y
CONFIG_FB_BCM2708=y
CONFIG_FB_UDL=m
|