diff mbox

imx25: How to get frame buffer device in a system using device tree

Message ID CAO8h3eFq9WhvZYbbeFfWgVEXViR8MAcGaztsvvaLpFSW-W6CfA@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Matthias Weißer July 4, 2013, 3:03 p.m. UTC
Hi

I am currently try to get Linux running on a custom imx25 hardware
using device tree. So far I am quite successfull and have the system
up using current mainline kernel and a NFS root file system. Now I
would like to have the framebuffer driver to get something on the LCD.

My dts file looks like this:

/dts-v1/;
#include "imx25.dtsi"

/ {
  model = "Graf-Syteco zmx25";
  compatible = "graf,imx25-zmx25", "fsl,imx25";

  memory {
    reg = <0x80000000 0x4000000>;
  };

  soc {
    aips@53f00000 { /* AIPS2 */
      lcdc@53fbc000 {
        status = "okay";
      };
    };
  };
};

&uart1 {
  status = "okay";
};

&uart2 {
  status = "okay";
};

&fec {
  phy-mode = "rmii";
  status = "okay";
};

I also added the compatibility entry in the imx25.dtsi


But still I didn't get /dev/fb so I think I am doing something wrong.
Any hints for docs I can study on how to do the right things?

Regards
Matthias

Comments

Fabio Estevam July 4, 2013, 3:16 p.m. UTC | #1
Hi Matthias,

On Thu, Jul 4, 2013 at 12:03 PM, Matthias Weißer <m.weisser.m@gmail.com> wrote:
> Hi
>
> I am currently try to get Linux running on a custom imx25 hardware
> using device tree. So far I am quite successfull and have the system
> up using current mainline kernel and a NFS root file system. Now I
> would like to have the framebuffer driver to get something on the LCD.
>
> My dts file looks like this:

These mx27 examples can help you to implement the support for mx25:

https://git.linaro.org/gitweb?p=people/shawnguo/linux-2.6.git;a=commitdiff;h=dcd23b848ed2e35f968a10984e255527b4dde3d5;hp=807f38ec8aae50626d5b4705a0a0f5c585275867

https://git.linaro.org/gitweb?p=people/shawnguo/linux-2.6.git;a=blob;f=arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts;h=390d8f2f84d120bace022322c6319d82cf7e5a47;hb=refs/heads/for-next

Regards,

Fabio Estevam
gianluca July 4, 2013, 3:41 p.m. UTC | #2
On 07/04/2013 05:16 PM, Fabio Estevam wrote:
> Hi Matthias,
>
> On Thu, Jul 4, 2013 at 12:03 PM, Matthias Weißer <m.weisser.m@gmail.com> wrote:
>> Hi
>>
>> I am currently try to get Linux running on a custom imx25 hardware
>> using device tree. So far I am quite successfull and have the system
>> up using current mainline kernel and a NFS root file system. Now I
>> would like to have the framebuffer driver to get something on the LCD.
>>
>> My dts file looks like this:
>
> These mx27 examples can help you to implement the support for mx25:
>
> https://git.linaro.org/gitweb?p=people/shawnguo/linux-2.6.git;a=commitdiff;h=dcd23b848ed2e35f968a10984e255527b4dde3d5;hp=807f38ec8aae50626d5b4705a0a0f5c585275867
>
> https://git.linaro.org/gitweb?p=people/shawnguo/linux-2.6.git;a=blob;f=arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts;h=390d8f2f84d120bace022322c6319d82cf7e5a47;hb=refs/heads/for-next
>

The links above are valid as skeleton for a imx28 based board?

Best regards,
Fabio Estevam July 4, 2013, 3:49 p.m. UTC | #3
On Thu, Jul 4, 2013 at 12:41 PM, gianluca
<gianlucarenzi@eurekelettronica.it> wrote:

> The links above are valid as skeleton for a imx28 based board?

No, these examples are for mx27. mx25 and mx27 share the same video controller.

For a mx28 example, you can refer to imx28-evk.dts.
Matthias Weißer July 8, 2013, 6:31 a.m. UTC | #4
Hi Fabio

2013/7/5 Fabio Estevam <festevam@gmail.com>:
> Hi Matthias,
>
> On Fri, Jul 5, 2013 at 4:37 AM, Matthias Weißer <m.weisser.m@gmail.com> wrote:
>
>> Thanks for the links. That made some things clearer for me. But I am
>> still a bit confused about the driver (imxfb.c) itself. From what I
>> can see it is not dt aware as there is no of_device_id structure with
>> the compatible entries. I think I have to add dt support to the
>> framebuffer driver. Am I right?
>
> Yes, you need to apply this one:
> http://marc.info/?l=linux-fbdev&m=136956466617736&w=2

OK. Done that and it works like a charm. Thanks a lot.

> I thought it has already been applied, but it has not reached mainline yet.
>
> Regards,
>
> Fabio Estevam

Regards
Matthias
Fabio Estevam July 10, 2013, 5:06 p.m. UTC | #5
Hi Matthias,

On Mon, Jul 8, 2013 at 3:31 AM, Matthias Weißer <m.weisser.m@gmail.com> wrote:
> Hi Fabio
>
> 2013/7/5 Fabio Estevam <festevam@gmail.com>:
>> Hi Matthias,
>>
>> On Fri, Jul 5, 2013 at 4:37 AM, Matthias Weißer <m.weisser.m@gmail.com> wrote:
>>
>>> Thanks for the links. That made some things clearer for me. But I am
>>> still a bit confused about the driver (imxfb.c) itself. From what I
>>> can see it is not dt aware as there is no of_device_id structure with
>>> the compatible entries. I think I have to add dt support to the
>>> framebuffer driver. Am I right?
>>
>> Yes, you need to apply this one:
>> http://marc.info/?l=linux-fbdev&m=136956466617736&w=2
>
> OK. Done that and it works like a charm. Thanks a lot.

Great, care to submit patches for adding mx25 fb support?
Matthias Weißer July 11, 2013, 6:28 a.m. UTC | #6
Hi Fabio

2013/7/10 Fabio Estevam <festevam@gmail.com>:
> Hi Matthias,
>
> On Mon, Jul 8, 2013 at 3:31 AM, Matthias Weißer <m.weisser.m@gmail.com> wrote:
>> Hi Fabio
>>
>> 2013/7/5 Fabio Estevam <festevam@gmail.com>:
>>> Hi Matthias,
>>>
>>> On Fri, Jul 5, 2013 at 4:37 AM, Matthias Weißer <m.weisser.m@gmail.com> wrote:
>>>
>>>> Thanks for the links. That made some things clearer for me. But I am
>>>> still a bit confused about the driver (imxfb.c) itself. From what I
>>>> can see it is not dt aware as there is no of_device_id structure with
>>>> the compatible entries. I think I have to add dt support to the
>>>> framebuffer driver. Am I right?
>>>
>>> Yes, you need to apply this one:
>>> http://marc.info/?l=linux-fbdev&m=136956466617736&w=2
>>
>> OK. Done that and it works like a charm. Thanks a lot.
>
> Great, care to submit patches for adding mx25 fb support?

I can. But I think the only thing is the slightly changed
arch/arm/boot/dts/imx25.dtsi. Patch to this mailing list? Patch
against mainline kernel is OK?

Regards
Matthias
Fabio Estevam July 11, 2013, 12:14 p.m. UTC | #7
On Thu, Jul 11, 2013 at 3:28 AM, Matthias Weißer <m.weisser.m@gmail.com> wrote:

>> Great, care to submit patches for adding mx25 fb support?
>
> I can. But I think the only thing is the slightly changed
> arch/arm/boot/dts/imx25.dtsi. Patch to this mailing list? Patch
> against mainline kernel is OK?

Yes, you should generate the patch against Shawn's for-next branch:
http://git.linaro.org/gitweb?p=people/shawnguo/linux-2.6.git;a=shortlog;h=refs/heads/for-next

Then send the patch to him with the linux-arm-kernel list on Cc.

Regards,

Fabio Estevam
diff mbox

Patch

--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -378,6 +378,7 @@ 
                        };

                        lcdc@53fbc000 {
+                               compatible = "fsl,imx27-fb", "fsl,imx21-fb";
                                reg = <0x53fbc000 0x4000>;
                                interrupts = <39>;
                                clocks = <&clks 103>, <&clks 66>, <&clks 49>;