[Lenny400] JZ4730/Minibook framebuffer driver updates

Paul Boddie paul at boddie.org.uk
Sat Sep 9 01:24:36 CEST 2017


Hello,

I had a look at eliminating board/platform driver initialisation code for the 
Minibook framebuffer and panel today. This led me through various places where 
panels are defined, which include this intriguing file:

drivers/gpu/drm/panel/panel-simple.c

Here, there are a lot of panels predefined, and I was tempted to add the 
Minibook panel alongside the other Chunghwa panels. After all, they even have 
their own device tree bindings! But I was left wondering how to wire the panel 
up via the DRM interfaces which are rather complicated.

And so, I took some clues from another place:

drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c

In this driver, the APIs for extracting timing information are demonstrated, 
and so it started to make more sense to emulate this in the JZ framebuffer 
driver. As a result, I now have the following in the device tree:

panel: claa070vc01 {
        compatible = "chunghwa,claa070vc01";

        width = <60>;
        height = <45>;
        bpp = <16>;
        lcd-type = <0>; /* JZ_LCD_TYPE_GENERIC_16_BIT from jz4740_fb.h */

        panel-timing {
                clock-frequency = <26400000>;
                hactive = <800>;
                vactive = <480>;
                hfront-porch = <0>;
                hback-porch = <0>;
                hsync-len = <80>;
                vfront-porch = <0>;
                vback-porch = <0>;
                vsync-len = <20>;
                de-active = <1>;
                pixelclk-active = <0>;
        };
};

And then, the panel is referenced by the framebuffer node. I think this makes 
sense, but I haven't actually tested it yet. This should allow me to eliminate 
the same details in the board/platform files, I think.

I've attached my patches against the different branches:

0001-Allow-JZ-framebuffer-panel-configuration-with-DT.patch applies to 
work/pboddie/mips/jz4730 against changeset 
ac98f2a05cead994cb4008a12cc5f046d4e7fef1

0001-Configure-panel-via-DT-for-Minibook.patch applies to 
work/hns/mipsbook400/dt against changeset 
cae1880dfa30173c79e714d87aeb4558bec83975

I hope these are steps in the right direction!

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-JZ-framebuffer-panel-configuration-with-DT.patch
Type: text/x-patch
Size: 5929 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/lenny400/attachments/20170909/f690407e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Configure-panel-via-DT-for-Minibook.patch
Type: text/x-patch
Size: 1727 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/lenny400/attachments/20170909/f690407e/attachment-0001.bin>


More information about the Lenny400 mailing list