forked from mirrors/linux
		
	drm/sun4i: Add support for H6 DW HDMI controller
H6 has DW HDMI 2.0b controller v2.12a. It supports 4K at 60 Hz and HDCP 2.2. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-20-jernej.skrabec@siol.net
This commit is contained in:
		
							parent
							
								
									9d0fdd4843
								
							
						
					
					
						commit
						40bb9d3147
					
				
					 1 changed files with 19 additions and 0 deletions
				
			
		| 
						 | 
					@ -44,6 +44,17 @@ sun8i_dw_hdmi_mode_valid_a83t(struct drm_connector *connector,
 | 
				
			||||||
	return MODE_OK;
 | 
						return MODE_OK;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static enum drm_mode_status
 | 
				
			||||||
 | 
					sun8i_dw_hdmi_mode_valid_h6(struct drm_connector *connector,
 | 
				
			||||||
 | 
								    const struct drm_display_mode *mode)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						/* This is max for HDMI 2.0b (4K@60Hz) */
 | 
				
			||||||
 | 
						if (mode->clock > 594000)
 | 
				
			||||||
 | 
							return MODE_CLOCK_HIGH;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return MODE_OK;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static bool sun8i_dw_hdmi_node_is_tcon_top(struct device_node *node)
 | 
					static bool sun8i_dw_hdmi_node_is_tcon_top(struct device_node *node)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
 | 
						return IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
 | 
				
			||||||
| 
						 | 
					@ -239,11 +250,19 @@ static const struct sun8i_dw_hdmi_quirks sun8i_a83t_quirks = {
 | 
				
			||||||
	.set_rate = true,
 | 
						.set_rate = true,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static const struct sun8i_dw_hdmi_quirks sun50i_h6_quirks = {
 | 
				
			||||||
 | 
						.mode_valid = sun8i_dw_hdmi_mode_valid_h6,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct of_device_id sun8i_dw_hdmi_dt_ids[] = {
 | 
					static const struct of_device_id sun8i_dw_hdmi_dt_ids[] = {
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		.compatible = "allwinner,sun8i-a83t-dw-hdmi",
 | 
							.compatible = "allwinner,sun8i-a83t-dw-hdmi",
 | 
				
			||||||
		.data = &sun8i_a83t_quirks,
 | 
							.data = &sun8i_a83t_quirks,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							.compatible = "allwinner,sun50i-h6-dw-hdmi",
 | 
				
			||||||
 | 
							.data = &sun50i_h6_quirks,
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	{ /* sentinel */ },
 | 
						{ /* sentinel */ },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
MODULE_DEVICE_TABLE(of, sun8i_dw_hdmi_dt_ids);
 | 
					MODULE_DEVICE_TABLE(of, sun8i_dw_hdmi_dt_ids);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue