diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-09-05 19:11:43 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-11-14 18:44:48 -0500 |
commit | 63b5053e53a052355bbc74e814561e5e586fd866 (patch) | |
tree | b51fcd319dc1990f879b6fcbd98170193e641b85 | |
parent | 73323ddbbddf2c8aeb1b57c75bcb537142ec9599 (diff) |
drm: rcar-du: Add R8A7796 support
Document the R8A7796-specific DT bindings and support them in the
driver. The HDMI output is currently not supported.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-rw-r--r-- | Documentation/devicetree/bindings/display/renesas,du.txt | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_drv.c | 25 |
2 files changed, 31 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt index 13535b2a1706..1a02f099a0ff 100644 --- a/Documentation/devicetree/bindings/display/renesas,du.txt +++ b/Documentation/devicetree/bindings/display/renesas,du.txt | |||
@@ -10,6 +10,7 @@ Required Properties: | |||
10 | - "renesas,du-r8a7793" for R8A7793 (R-Car M2-N) compatible DU | 10 | - "renesas,du-r8a7793" for R8A7793 (R-Car M2-N) compatible DU |
11 | - "renesas,du-r8a7794" for R8A7794 (R-Car E2) compatible DU | 11 | - "renesas,du-r8a7794" for R8A7794 (R-Car E2) compatible DU |
12 | - "renesas,du-r8a7795" for R8A7795 (R-Car H3) compatible DU | 12 | - "renesas,du-r8a7795" for R8A7795 (R-Car H3) compatible DU |
13 | - "renesas,du-r8a7796" for R8A7796 (R-Car M3-W) compatible DU | ||
13 | 14 | ||
14 | - reg: A list of base address and length of each memory resource, one for | 15 | - reg: A list of base address and length of each memory resource, one for |
15 | each entry in the reg-names property. | 16 | each entry in the reg-names property. |
@@ -26,10 +27,10 @@ Required Properties: | |||
26 | - clock-names: Name of the clocks. This property is model-dependent. | 27 | - clock-names: Name of the clocks. This property is model-dependent. |
27 | - R8A7779 uses a single functional clock. The clock doesn't need to be | 28 | - R8A7779 uses a single functional clock. The clock doesn't need to be |
28 | named. | 29 | named. |
29 | - R8A779[012345] use one functional clock per channel and one clock per LVDS | 30 | - R8A779[0123456] use one functional clock per channel and one clock per |
30 | encoder (if available). The functional clocks must be named "du.x" with | 31 | LVDS encoder (if available). The functional clocks must be named "du.x" |
31 | "x" being the channel numerical index. The LVDS clocks must be named | 32 | with "x" being the channel numerical index. The LVDS clocks must be |
32 | "lvds.x" with "x" being the LVDS encoder numerical index. | 33 | named "lvds.x" with "x" being the LVDS encoder numerical index. |
33 | - In addition to the functional and encoder clocks, all DU versions also | 34 | - In addition to the functional and encoder clocks, all DU versions also |
34 | support externally supplied pixel clocks. Those clocks are optional. | 35 | support externally supplied pixel clocks. Those clocks are optional. |
35 | When supplied they must be named "dclkin.x" with "x" being the input | 36 | When supplied they must be named "dclkin.x" with "x" being the input |
@@ -52,6 +53,7 @@ corresponding to each DU output. | |||
52 | R8A7793 (M2-N) DPAD LVDS 0 - - | 53 | R8A7793 (M2-N) DPAD LVDS 0 - - |
53 | R8A7794 (E2) DPAD 0 DPAD 1 - - | 54 | R8A7794 (E2) DPAD 0 DPAD 1 - - |
54 | R8A7795 (H3) DPAD HDMI 0 HDMI 1 LVDS | 55 | R8A7795 (H3) DPAD HDMI 0 HDMI 1 LVDS |
56 | R8A7796 (M3-W) DPAD HDMI LVDS - | ||
55 | 57 | ||
56 | 58 | ||
57 | Example: R8A7790 (R-Car H2) DU | 59 | Example: R8A7790 (R-Car H2) DU |
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 0f62b6499c9f..6fe8b3abd08c 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c | |||
@@ -178,6 +178,30 @@ static const struct rcar_du_device_info rcar_du_r8a7795_info = { | |||
178 | .num_lvds = 1, | 178 | .num_lvds = 1, |
179 | }; | 179 | }; |
180 | 180 | ||
181 | static const struct rcar_du_device_info rcar_du_r8a7796_info = { | ||
182 | .gen = 3, | ||
183 | .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | ||
184 | | RCAR_DU_FEATURE_EXT_CTRL_REGS | ||
185 | | RCAR_DU_FEATURE_VSP1_SOURCE, | ||
186 | .num_crtcs = 3, | ||
187 | .routes = { | ||
188 | /* R8A7796 has one RGB output, one LVDS output and one | ||
189 | * (currently unsupported) HDMI output. | ||
190 | */ | ||
191 | [RCAR_DU_OUTPUT_DPAD0] = { | ||
192 | .possible_crtcs = BIT(2), | ||
193 | .encoder_type = DRM_MODE_ENCODER_NONE, | ||
194 | .port = 0, | ||
195 | }, | ||
196 | [RCAR_DU_OUTPUT_LVDS0] = { | ||
197 | .possible_crtcs = BIT(0), | ||
198 | .encoder_type = DRM_MODE_ENCODER_LVDS, | ||
199 | .port = 2, | ||
200 | }, | ||
201 | }, | ||
202 | .num_lvds = 1, | ||
203 | }; | ||
204 | |||
181 | static const struct of_device_id rcar_du_of_table[] = { | 205 | static const struct of_device_id rcar_du_of_table[] = { |
182 | { .compatible = "renesas,du-r8a7779", .data = &rcar_du_r8a7779_info }, | 206 | { .compatible = "renesas,du-r8a7779", .data = &rcar_du_r8a7779_info }, |
183 | { .compatible = "renesas,du-r8a7790", .data = &rcar_du_r8a7790_info }, | 207 | { .compatible = "renesas,du-r8a7790", .data = &rcar_du_r8a7790_info }, |
@@ -186,6 +210,7 @@ static const struct of_device_id rcar_du_of_table[] = { | |||
186 | { .compatible = "renesas,du-r8a7793", .data = &rcar_du_r8a7791_info }, | 210 | { .compatible = "renesas,du-r8a7793", .data = &rcar_du_r8a7791_info }, |
187 | { .compatible = "renesas,du-r8a7794", .data = &rcar_du_r8a7794_info }, | 211 | { .compatible = "renesas,du-r8a7794", .data = &rcar_du_r8a7794_info }, |
188 | { .compatible = "renesas,du-r8a7795", .data = &rcar_du_r8a7795_info }, | 212 | { .compatible = "renesas,du-r8a7795", .data = &rcar_du_r8a7795_info }, |
213 | { .compatible = "renesas,du-r8a7796", .data = &rcar_du_r8a7796_info }, | ||
189 | { } | 214 | { } |
190 | }; | 215 | }; |
191 | 216 | ||