[Openpvrsgx-devgroup] CI20/JZ4780 HDMI (was Re: Status & HW to bring)

Paul Cercueil pcercuei at gmail.com
Wed Nov 13 11:56:35 CET 2019


Hi Nikolaus,


Le mar., nov. 12, 2019 at 22:44, H. Nikolaus Schaller 
<hns at goldelico.com> a écrit :
> 
>>  Am 11.11.2019 um 13:32 schrieb Paul Boddie <paul at boddie.org.uk>:
>> 
>>  On Monday 11. November 2019 10.12.44 H. Nikolaus Schaller wrote:
>>> 
>>>  Ah, here is the relevant comment:
>>> 
>>>  https://lore.kernel.org/patchwork/patch/549312/#731123
>>> 
>>>  Unfortunately I have no idea what they are talking about :)
>> 
>>  I interpret it as the patch not using that particular week's way of 
>> doing
>>  things in the Linux kernel.
>> 
>>>  Maybe the drivers/gpu/drm/bridge/synopsys gives hints how to 
>>> improve the
>>>  jz4780 driver - or the synopsys driver.
>> 
>>  I think there is already an upstream display driver that might be 
>> made
>>  suitable:
>> 
>>  drivers/gpu/drm/ingenic/ingenic-drm.c
>> 
>>  As for the Synopsys bridge driver, I wasn't convinced that anything 
>> else I
>>  found was making use of it. I imagine that it must need to be wired 
>> up to some
>>  other device, but it doesn't have the usual MODULE_DEVICE_TABLE 
>> declaration.
>> 
>>  Looking at other such drivers, it seems possible that the device 
>> tree
>>  declaration would employ some input ports which then reference the 
>> output
>>  ports of the display devices.
>> 
>>  For example, from arch/arm64/boot/dts/renesas/r8a77990.dtsi which 
>> uses the
>>  lvds-encoder bridge driver:
>> 
>>   lvds0: lvds-encoder at feb90000 {
>>     compatible = "renesas,r8a77990-lvds";
>>     ...
>>     ports {
>>       ...
>>       port at 0 {
>>         ...
>>         lvds0_in: endpoint {
>>           remote-endpoint = <&du_out_lvds0>;
>> 
>>  This kind of thing isn't done in the CI20 kernel because it doesn't 
>> have a
>>  shiny-enough DRM driver, and so the display device references the 
>> HDMI device
>>  in the device tree, with the code confirming this:
>> 
>>  drivers/gpu/drm/jz4780/jz4780_drv.c
>> 
>>  In fact, the port/endpoint mechanism is supported in the submitted 
>> driver (see
>>  above), whereas the upstream Ingenic driver doesn't have that 
>> support, perhaps
>>  because many of the devices involved don't need to enable LVDS or 
>> HDMI to get
>>  video working.
> 
> I have studied the jz4740 and qi60 a little and it uses
> 
> 	lcd: lcd-controller at 13050000 {
> 		compatible = "ingenic,jz4740-lcd";
> 		reg = <0x13050000 0x1000>;
> 
> 		interrupt-parent = <&intc>;
> 		interrupts = <30>;
> 
> 		clocks = <&cgu JZ4740_CLK_LCD_PCLK>, <&cgu JZ4740_CLK_LCD>;
> 		clock-names = "lcd_pclk", "lcd";
> 	};
> 
> 	panel: panel {
> 		compatible = "giantplus,gpm940b0";
> 
> 		power-supply = <&vcc>;
> 
> 		port {
> 			panel_input: endpoint {
> 				remote-endpoint = <&panel_output>;
> 			};
> 		};
> 	};
> 
> 
> &lcd {
> 	pinctrl-names = "default";
> 	pinctrl-0 = <&pins_lcd>;
> 
> 	port {
> 		panel_output: endpoint {
> 			remote-endpoint = <&panel_input>;
> 		};
> 	};
> };
> 
> BTW: would that work the same for the jz4780? Then I could at least 
> pretend
> to have an LCD... Even if none is physically connected. This would 
> already
> allow to start to experiment with the SGX driver. And we can try to 
> solve HDMI
> in parallel.

It would work the exact same for the jz4780. Just add a devicetree node 
for the HDMI transmitter, and add it as remote-endpoint in the LCD node.

> 
>>  So, the Ingenic driver would need to be augmented with 
>> port/endpoint support,
>>  and there would need to be a way of activating the Synopsys driver 
>> in the
>>  device tree. Exactly how the latter should be done remains a 
>> mystery to me at
>>  the moment.
> 
> Same for me...

Have a look at:
Documentation/devicetree/bindings/display/bridge/dw-hdmi.txt
Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
Documentation/devicetree/bindings/display/imx/hdmi.txt
Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt

They all use the Synopsys HDMI transmitter.

Cheers,
-Paul

> 
> BR,
> Nikolaus
> 
> --
> You received this message because you are subscribed to a topic in 
> the Google Groups "MIPS Creator CI20 Development" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/mips-creator-ci20-dev/KVnowyjeXZE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> mips-creator-ci20-dev+unsubscribe at googlegroups.com.
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/mips-creator-ci20-dev/70BC6901-F7B6-45BA-A5DB-61702C2FB040%40goldelico.com.




More information about the openpvrsgx-devgroup mailing list