forked from Minki/linux
drm/sun4i: support A33 tcon
The A33 has a significantly different pipeline, with components that differ too. Make sure we had compatible for them. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org>
This commit is contained in:
parent
8e92404725
commit
4a408f1f63
@ -26,13 +26,14 @@ TCON
|
||||
The TCON acts as a timing controller for RGB, LVDS and TV interfaces.
|
||||
|
||||
Required properties:
|
||||
- compatible: value should be "allwinner,sun5i-a13-tcon".
|
||||
- compatible: value must be either:
|
||||
* allwinner,sun5i-a13-tcon
|
||||
* allwinner,sun8i-a33-tcon
|
||||
- reg: base address and size of memory-mapped region
|
||||
- interrupts: interrupt associated to this IP
|
||||
- clocks: phandles to the clocks feeding the TCON. Three are needed:
|
||||
- 'ahb': the interface clocks
|
||||
- 'tcon-ch0': The clock driving the TCON channel 0
|
||||
- 'tcon-ch1': The clock driving the TCON channel 1
|
||||
- resets: phandles to the reset controllers driving the encoder
|
||||
- "lcd": the reset line for the TCON channel 0
|
||||
|
||||
@ -49,6 +50,9 @@ Required properties:
|
||||
second the block connected to the TCON channel 1 (usually the TV
|
||||
encoder)
|
||||
|
||||
On the A13, there is one more clock required:
|
||||
- 'tcon-ch1': The clock driving the TCON channel 1
|
||||
|
||||
|
||||
Display Engine Backend
|
||||
----------------------
|
||||
@ -59,6 +63,7 @@ system.
|
||||
Required properties:
|
||||
- compatible: value must be one of:
|
||||
* allwinner,sun5i-a13-display-backend
|
||||
* allwinner,sun8i-a33-display-backend
|
||||
- reg: base address and size of the memory-mapped region.
|
||||
- clocks: phandles to the clocks feeding the frontend and backend
|
||||
* ahb: the backend interface clock
|
||||
@ -80,6 +85,7 @@ deinterlacing and color space conversion.
|
||||
Required properties:
|
||||
- compatible: value must be one of:
|
||||
* allwinner,sun5i-a13-display-frontend
|
||||
* allwinner,sun8i-a33-display-frontend
|
||||
- reg: base address and size of the memory-mapped region.
|
||||
- interrupts: interrupt associated to this IP
|
||||
- clocks: phandles to the clocks feeding the frontend and backend
|
||||
@ -104,6 +110,7 @@ extra node.
|
||||
Required properties:
|
||||
- compatible: value must be one of:
|
||||
* allwinner,sun5i-a13-display-engine
|
||||
* allwinner,sun8i-a33-display-engine
|
||||
|
||||
- allwinner,pipelines: list of phandle to the display engine
|
||||
frontends available.
|
||||
|
@ -345,6 +345,7 @@ static int sun4i_backend_remove(struct platform_device *pdev)
|
||||
|
||||
static const struct of_device_id sun4i_backend_of_table[] = {
|
||||
{ .compatible = "allwinner,sun5i-a13-display-backend" },
|
||||
{ .compatible = "allwinner,sun8i-a33-display-backend" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun4i_backend_of_table);
|
||||
|
@ -199,13 +199,14 @@ static const struct component_master_ops sun4i_drv_master_ops = {
|
||||
|
||||
static bool sun4i_drv_node_is_frontend(struct device_node *node)
|
||||
{
|
||||
return of_device_is_compatible(node,
|
||||
"allwinner,sun5i-a13-display-frontend");
|
||||
return of_device_is_compatible(node, "allwinner,sun5i-a13-display-frontend") ||
|
||||
of_device_is_compatible(node, "allwinner,sun8i-a33-display-frontend");
|
||||
}
|
||||
|
||||
static bool sun4i_drv_node_is_tcon(struct device_node *node)
|
||||
{
|
||||
return of_device_is_compatible(node, "allwinner,sun5i-a13-tcon");
|
||||
return of_device_is_compatible(node, "allwinner,sun5i-a13-tcon") ||
|
||||
of_device_is_compatible(node, "allwinner,sun8i-a33-tcon");
|
||||
}
|
||||
|
||||
static int compare_of(struct device *dev, void *data)
|
||||
@ -320,6 +321,7 @@ static int sun4i_drv_remove(struct platform_device *pdev)
|
||||
|
||||
static const struct of_device_id sun4i_drv_of_table[] = {
|
||||
{ .compatible = "allwinner,sun5i-a13-display-engine" },
|
||||
{ .compatible = "allwinner,sun8i-a33-display-engine" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun4i_drv_of_table);
|
||||
|
@ -488,8 +488,13 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
|
||||
tcon->drm = drm;
|
||||
tcon->dev = dev;
|
||||
|
||||
if (of_device_is_compatible(dev->of_node, "allwinner,sun5i-a13-tcon"))
|
||||
if (of_device_is_compatible(dev->of_node, "allwinner,sun5i-a13-tcon")) {
|
||||
tcon->has_mux = true;
|
||||
tcon->has_channel_1 = true;
|
||||
} else {
|
||||
tcon->has_mux = false;
|
||||
tcon->has_channel_1 = false;
|
||||
}
|
||||
|
||||
tcon->lcd_rst = devm_reset_control_get(dev, "lcd");
|
||||
if (IS_ERR(tcon->lcd_rst)) {
|
||||
@ -585,6 +590,7 @@ static int sun4i_tcon_remove(struct platform_device *pdev)
|
||||
|
||||
static const struct of_device_id sun4i_tcon_of_table[] = {
|
||||
{ .compatible = "allwinner,sun5i-a13-tcon" },
|
||||
{ .compatible = "allwinner,sun8i-a33-tcon" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun4i_tcon_of_table);
|
||||
|
Loading…
Reference in New Issue
Block a user