Message ID | 1380941496-26899-1-git-send-email-javier.martinez@collabora.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
* Javier Martinez Canillas <javier.martinez@collabora.co.uk> [131004 20:00]: > IGEPv2 board has both an DVI and TFP410 video interfaces but > DSS support for DeviceTree has not yet landed in mainline so > is necessary to init the displays using legacy platform code. Thanks, applying into omap-for-v3.13/quirk. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, On 05/10/13 05:51, Javier Martinez Canillas wrote: > IGEPv2 board has both an DVI and TFP410 video interfaces but > DSS support for DeviceTree has not yet landed in mainline so > is necessary to init the displays using legacy platform code. > > Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> > --- > arch/arm/mach-omap2/dss-common.c | 37 +++++++++++++++++++++++++++++++++++++ > arch/arm/mach-omap2/dss-common.h | 1 + > arch/arm/mach-omap2/pdata-quirks.c | 7 +++++++ > 3 files changed, 45 insertions(+) > > diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c > index bf89eff..0c1cf2e 100644 > --- a/arch/arm/mach-omap2/dss-common.c > +++ b/arch/arm/mach-omap2/dss-common.c > @@ -39,6 +39,7 @@ > #define HDMI_GPIO_HPD 63 /* Hotplug detect */ > > #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 > +#define IGEP2_DVI_TFP410_POWER_DOWN_GPIO 170 > > /* DVI Connector */ > static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = { > @@ -53,6 +54,18 @@ static struct platform_device omap4_panda_dvi_connector_device = { > .dev.platform_data = &omap4_panda_dvi_connector_pdata, > }; > > +static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = { > + .name = "dvi", > + .source = "tfp410.0", > + .i2c_bus_num = 3, > +}; > + > +static struct platform_device omap3_igep2_dvi_connector_device = { > + .name = "connector-dvi", > + .id = 0, > + .dev.platform_data = &omap3_igep2_dvi_connector_pdata, > +}; > + > /* TFP410 DPI-to-DVI chip */ > static struct encoder_tfp410_platform_data omap4_panda_tfp410_pdata = { > .name = "tfp410.0", > @@ -67,6 +80,19 @@ static struct platform_device omap4_panda_tfp410_device = { > .dev.platform_data = &omap4_panda_tfp410_pdata, > }; > > +static struct encoder_tfp410_platform_data omap3_igep2_tfp410_pdata = { > + .name = "tfp410.0", > + .source = "dpi.0", > + .data_lines = 24, > + .power_down_gpio = IGEP2_DVI_TFP410_POWER_DOWN_GPIO, > +}; > + > +static struct platform_device omap3_igep2_tfp410_device = { > + .name = "tfp410", > + .id = 0, > + .dev.platform_data = &omap3_igep2_tfp410_pdata, > +}; > + I think it would be better to organize the file in sections based on boards. Not mixing the display devices for different boards like above. > /* HDMI Connector */ > static struct connector_hdmi_platform_data omap4_panda_hdmi_connector_pdata = { > .name = "hdmi", > @@ -99,6 +125,10 @@ static struct omap_dss_board_info omap4_panda_dss_data = { > .default_display_name = "dvi", > }; > > +static struct omap_dss_board_info igep2_dss_data = { > + .default_display_name = "dvi", > +}; > + > void __init omap4_panda_display_init_of(void) > { > omap_display_init(&omap4_panda_dss_data); > @@ -110,6 +140,13 @@ void __init omap4_panda_display_init_of(void) > platform_device_register(&omap4_panda_hdmi_connector_device); > } > > +void __init omap3_igep2_display_init_of(void) > +{ > + omap_display_init(&igep2_dss_data); > + > + platform_device_register(&omap3_igep2_tfp410_device); > + platform_device_register(&omap3_igep2_dvi_connector_device); > +} Wouldn't it be better to remove the display setup from the board file at the same time as it's added here? Otherwise we'll end up with the same display setup being in two different files. > @@ -103,6 +108,8 @@ static struct pdata_init pdata_quirks[] __initdata = { > #ifdef CONFIG_ARCH_OMAP3 > { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, > { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, > + { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, The above is extra. Tomi
Hi Tony, On 09/10/13 00:11, Tony Lindgren wrote: > * Javier Martinez Canillas <javier.martinez@collabora.co.uk> [131004 20:00]: >> IGEPv2 board has both an DVI and TFP410 video interfaces but >> DSS support for DeviceTree has not yet landed in mainline so >> is necessary to init the displays using legacy platform code. > > Thanks, applying into omap-for-v3.13/quirk. Can you remove the patch from your branch? It had bug, and I had some questions related to it. Tomi
On 10/09/2013 08:02 AM, Tomi Valkeinen wrote: > Hi Tony, > > On 09/10/13 00:11, Tony Lindgren wrote: >> * Javier Martinez Canillas <javier.martinez@collabora.co.uk> [131004 20:00]: >>> IGEPv2 board has both an DVI and TFP410 video interfaces but >>> DSS support for DeviceTree has not yet landed in mainline so >>> is necessary to init the displays using legacy platform code. >> >> Thanks, applying into omap-for-v3.13/quirk. > > Can you remove the patch from your branch? It had bug, and I had some > questions related to it. > > Tomi > > Hi Tomi, I noticed about the bug (a duplicated pdata_quirks) just after sending the patch so I fixed on a v2 [1]. Thanks a lot and best regards, Javier [1]: http://www.spinics.net/lists/linux-omap/msg98257.html -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/09/2013 08:00 AM, Tomi Valkeinen wrote: > Hi, > Hi Tomi, thanks a lot for your feedback. > On 05/10/13 05:51, Javier Martinez Canillas wrote: >> IGEPv2 board has both an DVI and TFP410 video interfaces but >> DSS support for DeviceTree has not yet landed in mainline so >> is necessary to init the displays using legacy platform code. >> >> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> >> --- >> arch/arm/mach-omap2/dss-common.c | 37 +++++++++++++++++++++++++++++++++++++ >> arch/arm/mach-omap2/dss-common.h | 1 + >> arch/arm/mach-omap2/pdata-quirks.c | 7 +++++++ >> 3 files changed, 45 insertions(+) >> >> diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c >> index bf89eff..0c1cf2e 100644 >> --- a/arch/arm/mach-omap2/dss-common.c >> +++ b/arch/arm/mach-omap2/dss-common.c >> @@ -39,6 +39,7 @@ >> #define HDMI_GPIO_HPD 63 /* Hotplug detect */ >> >> #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 >> +#define IGEP2_DVI_TFP410_POWER_DOWN_GPIO 170 >> >> /* DVI Connector */ >> static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = { >> @@ -53,6 +54,18 @@ static struct platform_device omap4_panda_dvi_connector_device = { >> .dev.platform_data = &omap4_panda_dvi_connector_pdata, >> }; >> >> +static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = { >> + .name = "dvi", >> + .source = "tfp410.0", >> + .i2c_bus_num = 3, >> +}; >> + >> +static struct platform_device omap3_igep2_dvi_connector_device = { >> + .name = "connector-dvi", >> + .id = 0, >> + .dev.platform_data = &omap3_igep2_dvi_connector_pdata, >> +}; >> + >> /* TFP410 DPI-to-DVI chip */ >> static struct encoder_tfp410_platform_data omap4_panda_tfp410_pdata = { >> .name = "tfp410.0", >> @@ -67,6 +80,19 @@ static struct platform_device omap4_panda_tfp410_device = { >> .dev.platform_data = &omap4_panda_tfp410_pdata, >> }; >> >> +static struct encoder_tfp410_platform_data omap3_igep2_tfp410_pdata = { >> + .name = "tfp410.0", >> + .source = "dpi.0", >> + .data_lines = 24, >> + .power_down_gpio = IGEP2_DVI_TFP410_POWER_DOWN_GPIO, >> +}; >> + >> +static struct platform_device omap3_igep2_tfp410_device = { >> + .name = "tfp410", >> + .id = 0, >> + .dev.platform_data = &omap3_igep2_tfp410_pdata, >> +}; >> + > > I think it would be better to organize the file in sections based on > boards. Not mixing the display devices for different boards like above. > Perfect I can do this reorganization and repost if Tony drops this patch from his branch. But this is just a hack and and it should go away as soon as your DSS DT patches land in mainline. >> /* HDMI Connector */ >> static struct connector_hdmi_platform_data omap4_panda_hdmi_connector_pdata = { >> .name = "hdmi", >> @@ -99,6 +125,10 @@ static struct omap_dss_board_info omap4_panda_dss_data = { >> .default_display_name = "dvi", >> }; >> >> +static struct omap_dss_board_info igep2_dss_data = { >> + .default_display_name = "dvi", >> +}; >> + >> void __init omap4_panda_display_init_of(void) >> { >> omap_display_init(&omap4_panda_dss_data); >> @@ -110,6 +140,13 @@ void __init omap4_panda_display_init_of(void) >> platform_device_register(&omap4_panda_hdmi_connector_device); >> } >> >> +void __init omap3_igep2_display_init_of(void) >> +{ >> + omap_display_init(&igep2_dss_data); >> + >> + platform_device_register(&omap3_igep2_tfp410_device); >> + platform_device_register(&omap3_igep2_dvi_connector_device); >> +} > > Wouldn't it be better to remove the display setup from the board file at > the same time as it's added here? Otherwise we'll end up with the same > display setup being in two different files. > I can't do it yet because the two are still needed for different boot paths. Once the board DTS has all the hardware support that is currently available on the board file I'll delete the board file but until then I can't remove anything from the legacy code since that is what users are using right now. >> @@ -103,6 +108,8 @@ static struct pdata_init pdata_quirks[] __initdata = { >> #ifdef CONFIG_ARCH_OMAP3 >> { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, >> { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, >> + { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, > > The above is extra. > Yes, I noticed too just after sending the patch so I sent a v2 of the patch a few minutes later [1]. Sorry for the confusion. > Tomi > > Best regards, Javier [1]: http://www.spinics.net/lists/linux-omap/msg98257.html -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 09/10/13 10:44, Javier Martinez Canillas wrote: > I can't do it yet because the two are still needed for different boot paths. > Once the board DTS has all the hardware support that is currently available on > the board file I'll delete the board file but until then I can't remove anything > from the legacy code since that is what users are using right now. Yes, right, I meant that move the code from the board file to dss_common.c, and call the same display init code from both the board file and from the quirks system. Tomi
On 10/09/2013 09:47 AM, Tomi Valkeinen wrote: > On 09/10/13 10:44, Javier Martinez Canillas wrote: > >> I can't do it yet because the two are still needed for different boot paths. >> Once the board DTS has all the hardware support that is currently available on >> the board file I'll delete the board file but until then I can't remove anything >> from the legacy code since that is what users are using right now. > > Yes, right, I meant that move the code from the board file to > dss_common.c, and call the same display init code from both the board > file and from the quirks system. > Sorry I misunderstood and yes you are right. I'll remove it from the board file and use the info in dss_common.c. If Tony drop the patch I can send a new version that does this or if he already sent a pull request I can do it as an incremental patch. > Tomi > > Thanks a lot and best regards, Javier -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
* Javier Martinez Canillas <javier.martinez@collabora.co.uk> [131009 00:45]: > On 10/09/2013 08:02 AM, Tomi Valkeinen wrote: > > Hi Tony, > > > > On 09/10/13 00:11, Tony Lindgren wrote: > >> * Javier Martinez Canillas <javier.martinez@collabora.co.uk> [131004 20:00]: > >>> IGEPv2 board has both an DVI and TFP410 video interfaces but > >>> DSS support for DeviceTree has not yet landed in mainline so > >>> is necessary to init the displays using legacy platform code. > >> > >> Thanks, applying into omap-for-v3.13/quirk. > > > > Can you remove the patch from your branch? It had bug, and I had some > > questions related to it. > > I noticed about the bug (a duplicated pdata_quirks) just after sending the patch > so I fixed on a v2 [1]. OK dropping it as I did not push it out yet. Will apply the version with Tomi's ack. Regards, Tony > [1]: http://www.spinics.net/lists/linux-omap/msg98257.html -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c index bf89eff..0c1cf2e 100644 --- a/arch/arm/mach-omap2/dss-common.c +++ b/arch/arm/mach-omap2/dss-common.c @@ -39,6 +39,7 @@ #define HDMI_GPIO_HPD 63 /* Hotplug detect */ #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 +#define IGEP2_DVI_TFP410_POWER_DOWN_GPIO 170 /* DVI Connector */ static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = { @@ -53,6 +54,18 @@ static struct platform_device omap4_panda_dvi_connector_device = { .dev.platform_data = &omap4_panda_dvi_connector_pdata, }; +static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = { + .name = "dvi", + .source = "tfp410.0", + .i2c_bus_num = 3, +}; + +static struct platform_device omap3_igep2_dvi_connector_device = { + .name = "connector-dvi", + .id = 0, + .dev.platform_data = &omap3_igep2_dvi_connector_pdata, +}; + /* TFP410 DPI-to-DVI chip */ static struct encoder_tfp410_platform_data omap4_panda_tfp410_pdata = { .name = "tfp410.0", @@ -67,6 +80,19 @@ static struct platform_device omap4_panda_tfp410_device = { .dev.platform_data = &omap4_panda_tfp410_pdata, }; +static struct encoder_tfp410_platform_data omap3_igep2_tfp410_pdata = { + .name = "tfp410.0", + .source = "dpi.0", + .data_lines = 24, + .power_down_gpio = IGEP2_DVI_TFP410_POWER_DOWN_GPIO, +}; + +static struct platform_device omap3_igep2_tfp410_device = { + .name = "tfp410", + .id = 0, + .dev.platform_data = &omap3_igep2_tfp410_pdata, +}; + /* HDMI Connector */ static struct connector_hdmi_platform_data omap4_panda_hdmi_connector_pdata = { .name = "hdmi", @@ -99,6 +125,10 @@ static struct omap_dss_board_info omap4_panda_dss_data = { .default_display_name = "dvi", }; +static struct omap_dss_board_info igep2_dss_data = { + .default_display_name = "dvi", +}; + void __init omap4_panda_display_init_of(void) { omap_display_init(&omap4_panda_dss_data); @@ -110,6 +140,13 @@ void __init omap4_panda_display_init_of(void) platform_device_register(&omap4_panda_hdmi_connector_device); } +void __init omap3_igep2_display_init_of(void) +{ + omap_display_init(&igep2_dss_data); + + platform_device_register(&omap3_igep2_tfp410_device); + platform_device_register(&omap3_igep2_dvi_connector_device); +} /* OMAP4 Blaze display data */ diff --git a/arch/arm/mach-omap2/dss-common.h b/arch/arm/mach-omap2/dss-common.h index c28fe3c..a9becf0 100644 --- a/arch/arm/mach-omap2/dss-common.h +++ b/arch/arm/mach-omap2/dss-common.h @@ -8,5 +8,6 @@ void __init omap4_panda_display_init_of(void); void __init omap_4430sdp_display_init_of(void); +void __init omap3_igep2_display_init_of(void); #endif diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 3d472db..830a4d2 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -74,6 +74,11 @@ static void __init hsmmc2_internal_input_clk(void) reg |= OMAP2_MMCSDIO2ADPCLKISEL; omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1); } + +static void __init omap3_igep0020_legacy_init(void) +{ + omap3_igep2_display_init_of(); +} #endif /* CONFIG_ARCH_OMAP3 */ #ifdef CONFIG_ARCH_OMAP4 @@ -103,6 +108,8 @@ static struct pdata_init pdata_quirks[] __initdata = { #ifdef CONFIG_ARCH_OMAP3 { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, + { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, + { "isee,omap3-igep0020", omap3_igep0020_legacy_init, }, #endif #ifdef CONFIG_ARCH_OMAP4 { "ti,omap4-sdp", omap4_sdp_legacy_init, },
IGEPv2 board has both an DVI and TFP410 video interfaces but DSS support for DeviceTree has not yet landed in mainline so is necessary to init the displays using legacy platform code. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> --- arch/arm/mach-omap2/dss-common.c | 37 +++++++++++++++++++++++++++++++++++++ arch/arm/mach-omap2/dss-common.h | 1 + arch/arm/mach-omap2/pdata-quirks.c | 7 +++++++ 3 files changed, 45 insertions(+)