Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Chen-Yu Tsai and committed by
Maxime Ripard
93a5ec14 91ea2f29

+15 -1
+3 -1
Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
··· 28 28 Required properties: 29 29 - compatible: value must be either: 30 30 * allwinner,sun5i-a13-tcon 31 + * allwinner,sun6i-a31-tcon 32 + * allwinner,sun6i-a31s-tcon 31 33 * allwinner,sun8i-a33-tcon 32 34 - reg: base address and size of memory-mapped region 33 35 - interrupts: interrupt associated to this IP ··· 52 50 second the block connected to the TCON channel 1 (usually the TV 53 51 encoder) 54 52 55 - On the A13, there is one more clock required: 53 + On SoCs other than the A33, there is one more clock required: 56 54 - 'tcon-ch1': The clock driving the TCON channel 1 57 55 58 56 DRC
+2
drivers/gpu/drm/sun4i/sun4i_drv.c
··· 207 207 static bool sun4i_drv_node_is_tcon(struct device_node *node) 208 208 { 209 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 212 of_device_is_compatible(node, "allwinner,sun8i-a33-tcon"); 211 213 } 212 214
+10
drivers/gpu/drm/sun4i/sun4i_tcon.c
··· 587 587 .has_channel_1 = true, 588 588 }; 589 589 590 + static const struct sun4i_tcon_quirks sun6i_a31_quirks = { 591 + .has_channel_1 = true, 592 + }; 593 + 594 + static const struct sun4i_tcon_quirks sun6i_a31s_quirks = { 595 + .has_channel_1 = true, 596 + }; 597 + 590 598 static const struct sun4i_tcon_quirks sun8i_a33_quirks = { 591 599 /* nothing is supported */ 592 600 }; 593 601 594 602 static const struct of_device_id sun4i_tcon_of_table[] = { 595 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 606 { .compatible = "allwinner,sun8i-a33-tcon", .data = &sun8i_a33_quirks }, 597 607 { } 598 608 };