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

drm: bridge: adv7511: Add support for ADV7535

ADV7535 is a DSI to HDMI bridge chip like ADV7533 but it allows
1080p@60Hz. v1p2 is fixed to 1.8V on ADV7535.

Signed-off-by: Bogdan Togorean <bogdan.togorean@analog.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200121082719.27972-3-bogdan.togorean@analog.com

authored by

Bogdan Togorean and committed by
Neil Armstrong
8501fe4b b0730f56

+12 -9
+2 -2
drivers/gpu/drm/bridge/adv7511/Kconfig
··· 6 6 select REGMAP_I2C 7 7 select DRM_MIPI_DSI 8 8 help 9 - Support for the Analog Device ADV7511(W)/13/33 HDMI encoders. 9 + Support for the Analog Device ADV7511(W)/13/33/35 HDMI encoders. 10 10 11 11 config DRM_I2C_ADV7511_AUDIO 12 12 bool "ADV7511 HDMI Audio driver" ··· 17 17 conjunction with the AV7511 HDMI driver. 18 18 19 19 config DRM_I2C_ADV7511_CEC 20 - bool "ADV7511/33 HDMI CEC driver" 20 + bool "ADV7511/33/35 HDMI CEC driver" 21 21 depends on DRM_I2C_ADV7511 22 22 select CEC_CORE 23 23 default y
+1
drivers/gpu/drm/bridge/adv7511/adv7511.h
··· 320 320 enum adv7511_type { 321 321 ADV7511, 322 322 ADV7533, 323 + ADV7535, 323 324 }; 324 325 325 326 #define ADV7511_MAX_ADDRS 3
+9 -7
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
··· 367 367 */ 368 368 regcache_sync(adv7511->regmap); 369 369 370 - if (adv7511->type == ADV7533) 370 + if (adv7511->type == ADV7533 || adv7511->type == ADV7535) 371 371 adv7533_dsi_power_on(adv7511); 372 372 adv7511->powered = true; 373 373 } ··· 387 387 static void adv7511_power_off(struct adv7511 *adv7511) 388 388 { 389 389 __adv7511_power_off(adv7511); 390 - if (adv7511->type == ADV7533) 390 + if (adv7511->type == ADV7533 || adv7511->type == ADV7535) 391 391 adv7533_dsi_power_off(adv7511); 392 392 adv7511->powered = false; 393 393 } ··· 761 761 regmap_update_bits(adv7511->regmap, 0x17, 762 762 0x60, (vsync_polarity << 6) | (hsync_polarity << 5)); 763 763 764 - if (adv7511->type == ADV7533) 764 + if (adv7511->type == ADV7533 || adv7511->type == ADV7535) 765 765 adv7533_mode_set(adv7511, adj_mode); 766 766 767 767 drm_mode_copy(&adv7511->curr_mode, adj_mode); ··· 874 874 &adv7511_connector_helper_funcs); 875 875 drm_connector_attach_encoder(&adv->connector, bridge->encoder); 876 876 877 - if (adv->type == ADV7533) 877 + if (adv->type == ADV7533 || adv->type == ADV7535) 878 878 ret = adv7533_attach_dsi(adv); 879 879 880 880 if (adv->i2c_main->irq) ··· 952 952 struct i2c_client *i2c = to_i2c_client(dev); 953 953 struct adv7511 *adv7511 = i2c_get_clientdata(i2c); 954 954 955 - if (adv7511->type == ADV7533) 955 + if (adv7511->type == ADV7533 || adv7511->type == ADV7535) 956 956 reg -= ADV7533_REG_CEC_OFFSET; 957 957 958 958 switch (reg) { ··· 994 994 goto err; 995 995 } 996 996 997 - if (adv->type == ADV7533) { 997 + if (adv->type == ADV7533 || adv->type == ADV7535) { 998 998 ret = adv7533_patch_cec_registers(adv); 999 999 if (ret) 1000 1000 goto err; ··· 1242 1242 { 1243 1243 struct adv7511 *adv7511 = i2c_get_clientdata(i2c); 1244 1244 1245 - if (adv7511->type == ADV7533) 1245 + if (adv7511->type == ADV7533 || adv7511->type == ADV7535) 1246 1246 adv7533_detach_dsi(adv7511); 1247 1247 i2c_unregister_device(adv7511->i2c_cec); 1248 1248 if (adv7511->cec_clk) ··· 1267 1267 { "adv7511w", ADV7511 }, 1268 1268 { "adv7513", ADV7511 }, 1269 1269 { "adv7533", ADV7533 }, 1270 + { "adv7535", ADV7535 }, 1270 1271 { } 1271 1272 }; 1272 1273 MODULE_DEVICE_TABLE(i2c, adv7511_i2c_ids); ··· 1277 1276 { .compatible = "adi,adv7511w", .data = (void *)ADV7511 }, 1278 1277 { .compatible = "adi,adv7513", .data = (void *)ADV7511 }, 1279 1278 { .compatible = "adi,adv7533", .data = (void *)ADV7533 }, 1279 + { .compatible = "adi,adv7535", .data = (void *)ADV7535 }, 1280 1280 { } 1281 1281 }; 1282 1282 MODULE_DEVICE_TABLE(of, adv7511_of_ids);