aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2016-10-19 23:43:40 -0400
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-10-20 11:59:29 -0400
commit93a5ec14da24a8abbac5bcb953b45cc7a5d0198a (patch)
treec796f4309a8650a65279f1dbb236b10d60ccbdab
parent91ea2f29cba6a7fe035ea232e4f981211a9fce5d (diff)
drm/sun4i: Add compatible string for A31/A31s TCON (timing controller)
The A31 TCON has mux controls for how TCON outputs are routed to the HDMI and MIPI DSI blocks. Since the A31s does not have MIPI DSI, it only has a mux for the HDMI controller input. This patch only adds support for the compatible strings. Actual support for the mux controls should be added with HDMI and MIPI DSI support. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r--Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt4
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_drv.c2
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_tcon.c10
3 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
index 5368961cd727..15fdca8909f2 100644
--- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
@@ -28,6 +28,8 @@ The TCON acts as a timing controller for RGB, LVDS and TV interfaces.
28Required properties: 28Required properties:
29 - compatible: value must be either: 29 - compatible: value must be either:
30 * allwinner,sun5i-a13-tcon 30 * allwinner,sun5i-a13-tcon
31 * allwinner,sun6i-a31-tcon
32 * allwinner,sun6i-a31s-tcon
31 * allwinner,sun8i-a33-tcon 33 * allwinner,sun8i-a33-tcon
32 - reg: base address and size of memory-mapped region 34 - reg: base address and size of memory-mapped region
33 - interrupts: interrupt associated to this IP 35 - interrupts: interrupt associated to this IP
@@ -50,7 +52,7 @@ Required properties:
50 second the block connected to the TCON channel 1 (usually the TV 52 second the block connected to the TCON channel 1 (usually the TV
51 encoder) 53 encoder)
52 54
53On the A13, there is one more clock required: 55On SoCs other than the A33, there is one more clock required:
54 - 'tcon-ch1': The clock driving the TCON channel 1 56 - 'tcon-ch1': The clock driving the TCON channel 1
55 57
56DRC 58DRC
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 0da9862ad8ed..a15c231fbd59 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -207,6 +207,8 @@ static bool sun4i_drv_node_is_frontend(struct device_node *node)
207static bool sun4i_drv_node_is_tcon(struct device_node *node) 207static bool sun4i_drv_node_is_tcon(struct device_node *node)
208{ 208{
209 return of_device_is_compatible(node, "allwinner,sun5i-a13-tcon") || 209 return of_device_is_compatible(node, "allwinner,sun5i-a13-tcon") ||
210 of_device_is_compatible(node, "allwinner,sun6i-a31-tcon") ||
211 of_device_is_compatible(node, "allwinner,sun6i-a31s-tcon") ||
210 of_device_is_compatible(node, "allwinner,sun8i-a33-tcon"); 212 of_device_is_compatible(node, "allwinner,sun8i-a33-tcon");
211} 213}
212 214
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index 7658f0337e0b..c6afb2448655 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -587,12 +587,22 @@ static const struct sun4i_tcon_quirks sun5i_a13_quirks = {
587 .has_channel_1 = true, 587 .has_channel_1 = true,
588}; 588};
589 589
590static const struct sun4i_tcon_quirks sun6i_a31_quirks = {
591 .has_channel_1 = true,
592};
593
594static const struct sun4i_tcon_quirks sun6i_a31s_quirks = {
595 .has_channel_1 = true,
596};
597
590static const struct sun4i_tcon_quirks sun8i_a33_quirks = { 598static const struct sun4i_tcon_quirks sun8i_a33_quirks = {
591 /* nothing is supported */ 599 /* nothing is supported */
592}; 600};
593 601
594static const struct of_device_id sun4i_tcon_of_table[] = { 602static const struct of_device_id sun4i_tcon_of_table[] = {
595 { .compatible = "allwinner,sun5i-a13-tcon", .data = &sun5i_a13_quirks }, 603 { .compatible = "allwinner,sun5i-a13-tcon", .data = &sun5i_a13_quirks },
604 { .compatible = "allwinner,sun6i-a31-tcon", .data = &sun6i_a31_quirks },
605 { .compatible = "allwinner,sun6i-a31s-tcon", .data = &sun6i_a31s_quirks },
596 { .compatible = "allwinner,sun8i-a33-tcon", .data = &sun8i_a33_quirks }, 606 { .compatible = "allwinner,sun8i-a33-tcon", .data = &sun8i_a33_quirks },
597 { } 607 { }
598}; 608};