* How to select between different display timings? (was: [PATCH 7/8] ARM: dts: tx28: restructure and update DTS file)
[not found] ` <1375966287-6784-8-git-send-email-LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
@ 2014-02-14 13:50 ` Dirk Behme
[not found] ` <52FE1F2D.4010102-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2014-02-14 13:50 UTC (permalink / raw)
To: Lothar Waßmann, Shawn Guo
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Rob Herring
Hi Lothar and Shawn,
On 08.08.2013 14:51, Lothar Waßmann wrote:
> - add Copyright header
> - use label references for better readability
> - sort the entries alphabetically
> - add some aliases used by U-Boot to edit the DT data
>
> Signed-off-by: Lothar Waßmann <LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
> ---
> arch/arm/boot/dts/imx28-tx28.dts | 693 +++++++++++++++++++++++++++++++++-----
> 1 files changed, 611 insertions(+), 82 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts
> index 37be532..866af60 100644
> --- a/arch/arm/boot/dts/imx28-tx28.dts
> +++ b/arch/arm/boot/dts/imx28-tx28.dts
...
> +&lcdif {
> + pinctrl-names = "default";
> + pinctrl-0 = <&lcdif_24bit_pins_a &lcdif_sync_pins_a &lcdif_ctrl_pins_a>;
> + lcd-supply = <®_lcd>;
> + display = <&display>;
> + status = "okay";
> +
> + display: display@0 {
> + bits-per-pixel = <32>;
> + bus-width = <24>;
> +
> + display-timings {
> + native-mode = <&timing5>;
> + timing0: timing0 {
> + panel-name = "VGA";
> + clock-frequency = <25175000>;
> + hactive = <640>;
> + vactive = <480>;
> + hback-porch = <48>;
> + hsync-len = <96>;
> + hfront-porch = <16>;
> + vback-porch = <33>;
> + vsync-len = <2>;
> + vfront-porch = <10>;
> + hsync-active = <0>;
> + vsync-active = <0>;
> + de-active = <1>;
> + pixelclk-active = <1>;
> + };
> +
> + timing1: timing1 {
> + panel-name = "ETV570";
> + clock-frequency = <25175000>;
> + hactive = <640>;
> + vactive = <480>;
> + hback-porch = <114>;
> + hsync-len = <30>;
> + hfront-porch = <16>;
> + vback-porch = <32>;
> + vsync-len = <3>;
> + vfront-porch = <10>;
> + hsync-active = <0>;
> + vsync-active = <0>;
> + de-active = <1>;
> + pixelclk-active = <1>;
> + };
> +
> + timing2: timing2 {
> + panel-name = "ET0350";
> + clock-frequency = <6500000>;
> + hactive = <320>;
> + vactive = <240>;
> + hback-porch = <34>;
> + hsync-len = <34>;
> + hfront-porch = <20>;
> + vback-porch = <15>;
> + vsync-len = <3>;
> + vfront-porch = <4>;
> + hsync-active = <0>;
> + vsync-active = <0>;
> + de-active = <1>;
> + pixelclk-active = <1>;
> + };
> +
> + timing3: timing3 {
> + panel-name = "ET0430";
> + clock-frequency = <9000000>;
> + hactive = <480>;
> + vactive = <272>;
> + hback-porch = <2>;
> + hsync-len = <41>;
> + hfront-porch = <2>;
> + vback-porch = <2>;
> + vsync-len = <10>;
> + vfront-porch = <2>;
> + hsync-active = <0>;
> + vsync-active = <0>;
> + de-active = <1>;
> + pixelclk-active = <1>;
> + };
> +
> + timing4: timing4 {
> + panel-name = "ET0500", "ET0700";
> + clock-frequency = <33260000>;
> + hactive = <800>;
> + vactive = <480>;
> + hback-porch = <88>;
> + hsync-len = <128>;
> + hfront-porch = <40>;
> + vback-porch = <33>;
> + vsync-len = <2>;
> + vfront-porch = <10>;
> + hsync-active = <0>;
> + vsync-active = <0>;
> + de-active = <1>;
> + pixelclk-active = <1>;
> + };
> +
> + timing5: timing5 {
> + panel-name = "ETQ570";
> + clock-frequency = <6400000>;
> + hactive = <320>;
> + vactive = <240>;
> + hback-porch = <38>;
> + hsync-len = <30>;
> + hfront-porch = <30>;
> + vback-porch = <16>;
> + vsync-len = <3>;
> + vfront-porch = <4>;
> + hsync-active = <0>;
> + vsync-active = <0>;
> + de-active = <1>;
> + pixelclk-active = <1>;
> + };
> + };
> + };
> +};
Being no graphics expert, looking at above device tree change, I'd like
to understand how this can be used to switch between different display
timings?
In the kernel, I've found the code which selects the default/native-mode
(of_display_timing.c). But, as here, if there is a native/default mode,
there are alternative modes. I haven't understood how and who to select
these other modes? In this case, how could the alternative modes
timing0/1/2/3/4 be selected in the kernel?
Do you have any pointers regarding this?
Many thanks and best regards
Dirk
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to select between different display timings? (was: [PATCH 7/8] ARM: dts: tx28: restructure and update DTS file)
[not found] ` <52FE1F2D.4010102-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
@ 2014-02-14 14:02 ` Lothar Waßmann
[not found] ` <20140214150208.12417b11-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Lothar Waßmann @ 2014-02-14 14:02 UTC (permalink / raw)
To: Dirk Behme
Cc: Shawn Guo, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Rob Herring
Hi,
Dirk Behme wrote:
> Hi Lothar and Shawn,
>
> On 08.08.2013 14:51, Lothar Waßmann wrote:
> > - add Copyright header
> > - use label references for better readability
> > - sort the entries alphabetically
> > - add some aliases used by U-Boot to edit the DT data
> >
> > Signed-off-by: Lothar Waßmann <LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
> > ---
> > arch/arm/boot/dts/imx28-tx28.dts | 693 +++++++++++++++++++++++++++++++++-----
> > 1 files changed, 611 insertions(+), 82 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts
> > index 37be532..866af60 100644
> > --- a/arch/arm/boot/dts/imx28-tx28.dts
> > +++ b/arch/arm/boot/dts/imx28-tx28.dts
> ...
> > +&lcdif {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&lcdif_24bit_pins_a &lcdif_sync_pins_a &lcdif_ctrl_pins_a>;
> > + lcd-supply = <®_lcd>;
> > + display = <&display>;
> > + status = "okay";
> > +
> > + display: display@0 {
> > + bits-per-pixel = <32>;
> > + bus-width = <24>;
> > +
> > + display-timings {
> > + native-mode = <&timing5>;
^^^^^^^^^^^^^^^^^^^^^^^^^
> > + timing0: timing0 {
[...]
> > + };
> > + };
> > + };
> > +};
>
> Being no graphics expert, looking at above device tree change, I'd like
> to understand how this can be used to switch between different display
> timings?
>
> In the kernel, I've found the code which selects the default/native-mode
> (of_display_timing.c). But, as here, if there is a native/default mode,
> there are alternative modes. I haven't understood how and who to select
> these other modes? In this case, how could the alternative modes
> timing0/1/2/3/4 be selected in the kernel?
>
> Do you have any pointers regarding this?
>
You need to set the property 'native-mode' to the phandle of the
display-timings entry like marked above.
Lothar Waßmann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info-AvR2QvxeiV7DiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org
___________________________________________________________
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to select between different display timings?
[not found] ` <20140214150208.12417b11-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
@ 2014-02-14 17:35 ` Dirk Behme
[not found] ` <52FE53DD.7040102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2014-02-14 17:35 UTC (permalink / raw)
To: Lothar Waßmann, Shawn Guo
Cc: Dirk Behme, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Am 14.02.2014 15:02, schrieb Lothar Waßmann:
> Hi,
>
> Dirk Behme wrote:
>> Hi Lothar and Shawn,
>>
>> On 08.08.2013 14:51, Lothar Waßmann wrote:
>>> - add Copyright header
>>> - use label references for better readability
>>> - sort the entries alphabetically
>>> - add some aliases used by U-Boot to edit the DT data
>>>
>>> Signed-off-by: Lothar Waßmann <LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
>>> ---
>>> arch/arm/boot/dts/imx28-tx28.dts | 693 +++++++++++++++++++++++++++++++++-----
>>> 1 files changed, 611 insertions(+), 82 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts
>>> index 37be532..866af60 100644
>>> --- a/arch/arm/boot/dts/imx28-tx28.dts
>>> +++ b/arch/arm/boot/dts/imx28-tx28.dts
>> ...
>>> +&lcdif {
>>> + pinctrl-names = "default";
>>> + pinctrl-0 = <&lcdif_24bit_pins_a &lcdif_sync_pins_a &lcdif_ctrl_pins_a>;
>>> + lcd-supply = <®_lcd>;
>>> + display = <&display>;
>>> + status = "okay";
>>> +
>>> + display: display@0 {
>>> + bits-per-pixel = <32>;
>>> + bus-width = <24>;
>>> +
>>> + display-timings {
>>> + native-mode = <&timing5>;
> ^^^^^^^^^^^^^^^^^^^^^^^^^
>>> + timing0: timing0 {
> [...]
>>> + };
>>> + };
>>> + };
>>> +};
>>
>> Being no graphics expert, looking at above device tree change, I'd like
>> to understand how this can be used to switch between different display
>> timings?
>>
>> In the kernel, I've found the code which selects the default/native-mode
>> (of_display_timing.c). But, as here, if there is a native/default mode,
>> there are alternative modes. I haven't understood how and who to select
>> these other modes? In this case, how could the alternative modes
>> timing0/1/2/3/4 be selected in the kernel?
>>
>> Do you have any pointers regarding this?
>>
> You need to set the property 'native-mode' to the phandle of the
> display-timings entry like marked above.
Hmm, let's see if we talk about the same thing ;) Let me rephrase my
questions:
Using above example and booting a system with the resulting .dtb,
timing5 is selected at boot time, correct?
Assuming I want to use timing1 instead: who would set when the
property 'native-mode' to &timing1?
Can the switch to
native-mode = <&timing1>;
only be done at compile time of the dts -> dtb? Or can this be done at
boot/kernel run time, too?
In the end, I'm looking for a way to have several timings like above
in the device tree, and select one at kernel boot time based on the
display detected. Would this be possible?
Many thanks and best regards
Dirk
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to select between different display timings?
[not found] ` <52FE53DD.7040102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-02-14 20:06 ` Anatolij Gustschin
0 siblings, 0 replies; 4+ messages in thread
From: Anatolij Gustschin @ 2014-02-14 20:06 UTC (permalink / raw)
To: Dirk Behme
Cc: Lothar Waßmann, Shawn Guo, Dirk Behme,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
On Fri, 14 Feb 2014 18:35:25 +0100
Dirk Behme <dirk.behme-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
...
> > You need to set the property 'native-mode' to the phandle of the
> > display-timings entry like marked above.
>
> Hmm, let's see if we talk about the same thing ;) Let me rephrase my
> questions:
>
> Using above example and booting a system with the resulting .dtb,
> timing5 is selected at boot time, correct?
yes.
> Assuming I want to use timing1 instead: who would set when the
> property 'native-mode' to &timing1?
>
> Can the switch to
>
> native-mode = <&timing1>;
>
> only be done at compile time of the dts -> dtb? Or can this be done at
> boot/kernel run time, too?
it could be done in U-Boot before booting the kernel. You can load
the dtb and patch the property as needed, i.e.:
U-Boot > tftp 107f0000 ${fdtfile}
U-Boot > fdt addr 107f0000
U-Boot > fdt pri /soc/aips-bus@02000000/ldb@020e0008/lvds-channel@0/display-timings
display-timings {
native-mode = <0x0000000d>;
hsd100pxn1 {
clock-frequency = <0x03dfd240>;
hactive = <0x00000400>;
vactive = <0x00000300>;
hback-porch = <0x000000dc>;
hfront-porch = <0x00000028>;
vback-porch = <0x00000015>;
vfront-porch = <0x00000007>;
hsync-len = <0x0000003c>;
vsync-len = <0x0000000a>;
linux,phandle = <0x0000000d>;
phandle = <0x0000000d>;
};
wvga {
clock-frequency = <0x019bfcc0>;
hactive = <0x00000320>;
vactive = <0x000001e0>;
hback-porch = <0x00000028>;
hfront-porch = <0x0000003c>;
vback-porch = <0x0000000a>;
vfront-porch = <0x0000000a>;
hsync-len = <0x00000014>;
vsync-len = <0x0000000a>;
hsync-active = <0x00000000>;
vsync-active = <0x00000000>;
de-active = <0x00000001>;
pixelclk-active = <0x00000000>;
linux,phandle = <0x0000000e>;
phandle = <0x0000000e>;
};
};
U-Boot > fdt set /soc/aips-bus@02000000/ldb@020e0008/lvds-channel@0/display-timings native-mode <0x0000000e>
U-Boot > fdt list /soc/aips-bus@02000000/ldb@020e0008/lvds-channel@0/display-timings/
display-timings {
native-mode = <0x0000000e>;
hsd100pxn1 {
};
wvga {
};
};
native-mode is referencing second timing node now.
But note that dtc could eliminate the phandles in the nodes if
these are not referenced in dts. To avoid this, the nodes could
contain a self-reference:
timing1: wvga {
...
linux,phandle = <&timing1>;
};
> In the end, I'm looking for a way to have several timings like above
> in the device tree, and select one at kernel boot time based on the
> display detected. Would this be possible?
You could add a function in U-Boot to detect the display and
update the dtb before booting. This function can be called
before booting if you define CONFIG_OF_BOARD_SETUP in the
U-Boot config file for your board and provide ft_board_setup()
in your board code.
HTH,
Anatolij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-14 20:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1375966287-6784-1-git-send-email-LW@KARO-electronics.de>
[not found] ` <1375966287-6784-8-git-send-email-LW@KARO-electronics.de>
[not found] ` <1375966287-6784-8-git-send-email-LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
2014-02-14 13:50 ` How to select between different display timings? (was: [PATCH 7/8] ARM: dts: tx28: restructure and update DTS file) Dirk Behme
[not found] ` <52FE1F2D.4010102-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
2014-02-14 14:02 ` Lothar Waßmann
[not found] ` <20140214150208.12417b11-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
2014-02-14 17:35 ` How to select between different display timings? Dirk Behme
[not found] ` <52FE53DD.7040102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-14 20:06 ` Anatolij Gustschin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).