* [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-13 18:17 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel Hi, This patchset adds DT support for the N900 panel. The patchset is based on Tomi's work/dss-dt-2 branch [0]. I suggest to send the DT changes through Benoits queue, since I have more N900 DT changes for 3.14. Also the patch editing the rx51 boardcode can be dropped, since the file is removed in 3.14. I included those two with this patchset, since they are needed to test the other two patches. I did not include a documentation for the DT API, since the omapdss documentation is still missing. I have successfully tested this on the N900. [0] https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/log/?h=work/dss-dt-2 -- Sebastian Sebastian Reichel (4): OMAPDSS: Add DT support to SDI OMAPDSS: ACX565AKM: Add DT support ARM: OMAP: rx51: DT boot: disable legacy dss init ARM: dts: omap3-n900: Add display support arch/arm/boot/dts/omap3-n900.dts | 18 ++++++++++- arch/arm/mach-omap2/board-rx51-video.c | 2 +- .../omap2/displays-new/panel-sony-acx565akm.c | 35 +++++++++++++++++++++- drivers/video/omap2/dss/sdi.c | 20 +++++++++++++ 4 files changed, 72 insertions(+), 3 deletions(-) -- 1.8.5.1 ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-13 18:17 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel Hi, This patchset adds DT support for the N900 panel. The patchset is based on Tomi's work/dss-dt-2 branch [0]. I suggest to send the DT changes through Benoits queue, since I have more N900 DT changes for 3.14. Also the patch editing the rx51 boardcode can be dropped, since the file is removed in 3.14. I included those two with this patchset, since they are needed to test the other two patches. I did not include a documentation for the DT API, since the omapdss documentation is still missing. I have successfully tested this on the N900. [0] https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/log/?h=work/dss-dt-2 -- Sebastian Sebastian Reichel (4): OMAPDSS: Add DT support to SDI OMAPDSS: ACX565AKM: Add DT support ARM: OMAP: rx51: DT boot: disable legacy dss init ARM: dts: omap3-n900: Add display support arch/arm/boot/dts/omap3-n900.dts | 18 ++++++++++- arch/arm/mach-omap2/board-rx51-video.c | 2 +- .../omap2/displays-new/panel-sony-acx565akm.c | 35 +++++++++++++++++++++- drivers/video/omap2/dss/sdi.c | 20 +++++++++++++ 4 files changed, 72 insertions(+), 3 deletions(-) -- 1.8.5.1 ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 1/4] OMAPDSS: Add DT support to SDI 2013-12-13 18:17 ` Sebastian Reichel @ 2013-12-13 18:17 ` Sebastian Reichel -1 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel Add the code to make the SDI driver work with device tree on OMAP3. Signed-off-by: Sebastian Reichel <sre@debian.org> --- drivers/video/omap2/dss/sdi.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index ccc569a..bdc6a68 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -26,6 +26,8 @@ #include <linux/export.h> #include <linux/platform_device.h> #include <linux/string.h> +#include <linux/of.h> +#include <linux/of_platform.h> #include <video/omapdss.h> #include "dss.h" @@ -333,6 +335,9 @@ static const struct omapdss_sdi_ops sdi_ops = { static void sdi_init_output(struct platform_device *pdev) { + struct device_node *node = pdev->dev.of_node; + struct device_node *ep; + struct omap_dss_device *out = &sdi.output; out->dev = &pdev->dev; @@ -344,6 +349,15 @@ static void sdi_init_output(struct platform_device *pdev) out->owner = THIS_MODULE; omapdss_register_output(out); + + if (!pdev->dev.of_node) + return; + + ep = omapdss_of_get_first_endpoint(node); + if (!ep) + return; + + of_property_read_u32(ep, "data-lines", &sdi.datapairs); } static void __exit sdi_uninit_output(struct platform_device *pdev) @@ -369,12 +383,18 @@ static int __exit omap_sdi_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id sdi_of_match[] = { + { .compatible = "ti,omap3-sdi" }, + {}, +}; + static struct platform_driver omap_sdi_driver = { .probe = omap_sdi_probe, .remove = __exit_p(omap_sdi_remove), .driver = { .name = "omapdss_sdi", .owner = THIS_MODULE, + .of_match_table = sdi_of_match, }, }; -- 1.8.5.1 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 1/4] OMAPDSS: Add DT support to SDI @ 2013-12-13 18:17 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel Add the code to make the SDI driver work with device tree on OMAP3. Signed-off-by: Sebastian Reichel <sre@debian.org> --- drivers/video/omap2/dss/sdi.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index ccc569a..bdc6a68 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -26,6 +26,8 @@ #include <linux/export.h> #include <linux/platform_device.h> #include <linux/string.h> +#include <linux/of.h> +#include <linux/of_platform.h> #include <video/omapdss.h> #include "dss.h" @@ -333,6 +335,9 @@ static const struct omapdss_sdi_ops sdi_ops = { static void sdi_init_output(struct platform_device *pdev) { + struct device_node *node = pdev->dev.of_node; + struct device_node *ep; + struct omap_dss_device *out = &sdi.output; out->dev = &pdev->dev; @@ -344,6 +349,15 @@ static void sdi_init_output(struct platform_device *pdev) out->owner = THIS_MODULE; omapdss_register_output(out); + + if (!pdev->dev.of_node) + return; + + ep = omapdss_of_get_first_endpoint(node); + if (!ep) + return; + + of_property_read_u32(ep, "data-lines", &sdi.datapairs); } static void __exit sdi_uninit_output(struct platform_device *pdev) @@ -369,12 +383,18 @@ static int __exit omap_sdi_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id sdi_of_match[] = { + { .compatible = "ti,omap3-sdi" }, + {}, +}; + static struct platform_driver omap_sdi_driver = { .probe = omap_sdi_probe, .remove = __exit_p(omap_sdi_remove), .driver = { .name = "omapdss_sdi", .owner = THIS_MODULE, + .of_match_table = sdi_of_match, }, }; -- 1.8.5.1 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 2/4] OMAPDSS: ACX565AKM: Add DT support 2013-12-13 18:17 ` Sebastian Reichel @ 2013-12-13 18:17 ` Sebastian Reichel -1 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel This adds DT support to the ACX565AKM panel driver. Signed-off-by: Sebastian Reichel <sre@debian.org> --- .../omap2/displays-new/panel-sony-acx565akm.c | 35 +++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c index d94f35d..942b8d4 100644 --- a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c +++ b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c @@ -30,6 +30,8 @@ #include <linux/backlight.h> #include <linux/fb.h> #include <linux/gpio.h> +#include <linux/of.h> +#include <linux/of_gpio.h> #include <video/omapdss.h> #include <video/omap-panel-data.h> @@ -531,7 +533,9 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev) dev_dbg(&ddata->spi->dev, "%s\n", __func__); in->ops.sdi->set_timings(in, &ddata->videomode); - in->ops.sdi->set_datapairs(in, ddata->datapairs); + + if (ddata->datapairs >= 0) + in->ops.sdi->set_datapairs(in, ddata->datapairs); r = in->ops.sdi->enable(in); if (r) { @@ -710,6 +714,30 @@ static int acx565akm_probe_pdata(struct spi_device *spi) return 0; } +static int acx565akm_probe_of(struct spi_device *spi) +{ + struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); + struct device_node *np = spi->dev.of_node; + struct omap_dss_device *dssdev; + int ret; + + ddata->reset_gpio = of_get_named_gpio(np, "reset-gpio", 0); + + ddata->datapairs = -1; + ddata->in = omapdss_of_find_source_for_first_ep(np); + if (IS_ERR(ddata->in)) { + dev_err(&spi->dev, "failed to find video source\n"); + return PTR_ERR(ddata->in); + } + + dssdev = &ddata->dssdev; + ret = of_property_read_string(np, "label", &dssdev->name); + if (ret < 0) + return ret; + + return 0; +} + static int acx565akm_probe(struct spi_device *spi) { struct panel_drv_data *ddata; @@ -737,7 +765,12 @@ static int acx565akm_probe(struct spi_device *spi) r = acx565akm_probe_pdata(spi); if (r) return r; + } else if (spi->dev.of_node) { + r = acx565akm_probe_of(spi); + if (r) + return r; } else { + dev_err(&spi->dev, "platform data missing!\n"); return -ENODEV; } -- 1.8.5.1 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 2/4] OMAPDSS: ACX565AKM: Add DT support @ 2013-12-13 18:17 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel This adds DT support to the ACX565AKM panel driver. Signed-off-by: Sebastian Reichel <sre@debian.org> --- .../omap2/displays-new/panel-sony-acx565akm.c | 35 +++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c index d94f35d..942b8d4 100644 --- a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c +++ b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c @@ -30,6 +30,8 @@ #include <linux/backlight.h> #include <linux/fb.h> #include <linux/gpio.h> +#include <linux/of.h> +#include <linux/of_gpio.h> #include <video/omapdss.h> #include <video/omap-panel-data.h> @@ -531,7 +533,9 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev) dev_dbg(&ddata->spi->dev, "%s\n", __func__); in->ops.sdi->set_timings(in, &ddata->videomode); - in->ops.sdi->set_datapairs(in, ddata->datapairs); + + if (ddata->datapairs >= 0) + in->ops.sdi->set_datapairs(in, ddata->datapairs); r = in->ops.sdi->enable(in); if (r) { @@ -710,6 +714,30 @@ static int acx565akm_probe_pdata(struct spi_device *spi) return 0; } +static int acx565akm_probe_of(struct spi_device *spi) +{ + struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); + struct device_node *np = spi->dev.of_node; + struct omap_dss_device *dssdev; + int ret; + + ddata->reset_gpio = of_get_named_gpio(np, "reset-gpio", 0); + + ddata->datapairs = -1; + ddata->in = omapdss_of_find_source_for_first_ep(np); + if (IS_ERR(ddata->in)) { + dev_err(&spi->dev, "failed to find video source\n"); + return PTR_ERR(ddata->in); + } + + dssdev = &ddata->dssdev; + ret = of_property_read_string(np, "label", &dssdev->name); + if (ret < 0) + return ret; + + return 0; +} + static int acx565akm_probe(struct spi_device *spi) { struct panel_drv_data *ddata; @@ -737,7 +765,12 @@ static int acx565akm_probe(struct spi_device *spi) r = acx565akm_probe_pdata(spi); if (r) return r; + } else if (spi->dev.of_node) { + r = acx565akm_probe_of(spi); + if (r) + return r; } else { + dev_err(&spi->dev, "platform data missing!\n"); return -ENODEV; } -- 1.8.5.1 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 3/4] ARM: OMAP: rx51: DT boot: disable legacy dss init 2013-12-13 18:17 ` Sebastian Reichel @ 2013-12-13 18:17 ` Sebastian Reichel -1 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel This disables legacy initialization of the omapdss, if the N900 is booted via DT. Signed-off-by: Sebastian Reichel <sre@debian.org> --- arch/arm/mach-omap2/board-rx51-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c index 43a90c8..9cfebc5 100644 --- a/arch/arm/mach-omap2/board-rx51-video.c +++ b/arch/arm/mach-omap2/board-rx51-video.c @@ -48,7 +48,7 @@ static struct omap_dss_board_info rx51_dss_board_info = { static int __init rx51_video_init(void) { - if (!machine_is_nokia_rx51() && !of_machine_is_compatible("nokia,omap3-n900")) + if (!machine_is_nokia_rx51()) return 0; if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) { -- 1.8.5.1 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 3/4] ARM: OMAP: rx51: DT boot: disable legacy dss init @ 2013-12-13 18:17 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel This disables legacy initialization of the omapdss, if the N900 is booted via DT. Signed-off-by: Sebastian Reichel <sre@debian.org> --- arch/arm/mach-omap2/board-rx51-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c index 43a90c8..9cfebc5 100644 --- a/arch/arm/mach-omap2/board-rx51-video.c +++ b/arch/arm/mach-omap2/board-rx51-video.c @@ -48,7 +48,7 @@ static struct omap_dss_board_info rx51_dss_board_info = { static int __init rx51_video_init(void) { - if (!machine_is_nokia_rx51() && !of_machine_is_compatible("nokia,omap3-n900")) + if (!machine_is_nokia_rx51()) return 0; if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) { -- 1.8.5.1 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 4/4] ARM: dts: omap3-n900: Add display support 2013-12-13 18:17 ` Sebastian Reichel @ 2013-12-13 18:17 ` Sebastian Reichel -1 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel Add support for the Nokia N900's display. Signed-off-by: Sebastian Reichel <sre@debian.org> --- arch/arm/boot/dts/omap3-n900.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index c2c306d..cf776f3 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -472,12 +472,28 @@ reg = <0>; }; mipid@2 { - compatible = "acx565akm"; + compatible = "sony,acx565akm"; spi-max-frequency = <6000000>; reg = <2>; + label = "lcd"; + reset-gpio = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */ + pinctrl-names = "default"; pinctrl-0 = <&display_pins>; + + lcd_in: endpoint { + remote-endpoint = <&sdi_out>; + }; + }; +}; + +&sdi { + vdds_sdi-supply = <&vaux1>; + + sdi_out: endpoint { + remote-endpoint = <&lcd_in>; + data-lines = <2>; }; }; -- 1.8.5.1 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 4/4] ARM: dts: omap3-n900: Add display support @ 2013-12-13 18:17 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-13 18:17 UTC (permalink / raw) To: Sebastian Reichel, Tomi Valkeinen, Benoît Cousson, Tony Lindgren Cc: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree, Sebastian Reichel Add support for the Nokia N900's display. Signed-off-by: Sebastian Reichel <sre@debian.org> --- arch/arm/boot/dts/omap3-n900.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index c2c306d..cf776f3 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -472,12 +472,28 @@ reg = <0>; }; mipid@2 { - compatible = "acx565akm"; + compatible = "sony,acx565akm"; spi-max-frequency = <6000000>; reg = <2>; + label = "lcd"; + reset-gpio = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */ + pinctrl-names = "default"; pinctrl-0 = <&display_pins>; + + lcd_in: endpoint { + remote-endpoint = <&sdi_out>; + }; + }; +}; + +&sdi { + vdds_sdi-supply = <&vaux1>; + + sdi_out: endpoint { + remote-endpoint = <&lcd_in>; + data-lines = <2>; }; }; -- 1.8.5.1 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-13 18:17 ` Sebastian Reichel @ 2013-12-17 7:37 ` Tomi Valkeinen -1 siblings, 0 replies; 32+ messages in thread From: Tomi Valkeinen @ 2013-12-17 7:37 UTC (permalink / raw) To: Sebastian Reichel Cc: Sebastian Reichel, Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 947 bytes --] Hi, On 2013-12-13 20:17, Sebastian Reichel wrote: > Hi, > > This patchset adds DT support for the N900 panel. The patchset is based on > Tomi's work/dss-dt-2 branch [0]. I suggest to send the DT changes through > Benoits queue, since I have more N900 DT changes for 3.14. Also the patch > editing the rx51 boardcode can be dropped, since the file is removed in 3.14. > I included those two with this patchset, since they are needed to test the > other two patches. > > I did not include a documentation for the DT API, since the omapdss > documentation is still missing. > > I have successfully tested this on the N900. > > [0] https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/log/?h=work/dss-dt-2 I added N900 display DT support on top of my v2 series, including pinmuxing. Can you check if it looks right and works? git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt Tomi [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 901 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-17 7:37 ` Tomi Valkeinen 0 siblings, 0 replies; 32+ messages in thread From: Tomi Valkeinen @ 2013-12-17 7:37 UTC (permalink / raw) To: Sebastian Reichel Cc: Sebastian Reichel, Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 947 bytes --] Hi, On 2013-12-13 20:17, Sebastian Reichel wrote: > Hi, > > This patchset adds DT support for the N900 panel. The patchset is based on > Tomi's work/dss-dt-2 branch [0]. I suggest to send the DT changes through > Benoits queue, since I have more N900 DT changes for 3.14. Also the patch > editing the rx51 boardcode can be dropped, since the file is removed in 3.14. > I included those two with this patchset, since they are needed to test the > other two patches. > > I did not include a documentation for the DT API, since the omapdss > documentation is still missing. > > I have successfully tested this on the N900. > > [0] https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/log/?h=work/dss-dt-2 I added N900 display DT support on top of my v2 series, including pinmuxing. Can you check if it looks right and works? git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt Tomi [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 901 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-17 7:37 ` Tomi Valkeinen @ 2013-12-17 17:14 ` Sebastian Reichel -1 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-17 17:14 UTC (permalink / raw) To: Tomi Valkeinen Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 1225 bytes --] On Tue, Dec 17, 2013 at 09:37:35AM +0200, Tomi Valkeinen wrote: > Hi, > > On 2013-12-13 20:17, Sebastian Reichel wrote: > > Hi, > > > > This patchset adds DT support for the N900 panel. The patchset is based on > > Tomi's work/dss-dt-2 branch [0]. I suggest to send the DT changes through > > Benoits queue, since I have more N900 DT changes for 3.14. Also the patch > > editing the rx51 boardcode can be dropped, since the file is removed in 3.14. > > I included those two with this patchset, since they are needed to test the > > other two patches. > > > > I did not include a documentation for the DT API, since the omapdss > > documentation is still missing. > > > > I have successfully tested this on the N900. > > > > [0] https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/log/?h=work/dss-dt-2 > > I added N900 display DT support on top of my v2 series, including > pinmuxing. Can you check if it looks right and works? > > git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt I just tried it and it does not work. On a first look the pinmuxing looks fishy: 0x0d4 is muxed two times. I will have a more detailed look into this later. -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-17 17:14 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-17 17:14 UTC (permalink / raw) To: Tomi Valkeinen Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 1225 bytes --] On Tue, Dec 17, 2013 at 09:37:35AM +0200, Tomi Valkeinen wrote: > Hi, > > On 2013-12-13 20:17, Sebastian Reichel wrote: > > Hi, > > > > This patchset adds DT support for the N900 panel. The patchset is based on > > Tomi's work/dss-dt-2 branch [0]. I suggest to send the DT changes through > > Benoits queue, since I have more N900 DT changes for 3.14. Also the patch > > editing the rx51 boardcode can be dropped, since the file is removed in 3.14. > > I included those two with this patchset, since they are needed to test the > > other two patches. > > > > I did not include a documentation for the DT API, since the omapdss > > documentation is still missing. > > > > I have successfully tested this on the N900. > > > > [0] https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/log/?h=work/dss-dt-2 > > I added N900 display DT support on top of my v2 series, including > pinmuxing. Can you check if it looks right and works? > > git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt I just tried it and it does not work. On a first look the pinmuxing looks fishy: 0x0d4 is muxed two times. I will have a more detailed look into this later. -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-17 17:14 ` Sebastian Reichel @ 2013-12-17 17:29 ` Tomi Valkeinen -1 siblings, 0 replies; 32+ messages in thread From: Tomi Valkeinen @ 2013-12-17 17:29 UTC (permalink / raw) To: Sebastian Reichel Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 1750 bytes --] On 2013-12-17 19:14, Sebastian Reichel wrote: > On Tue, Dec 17, 2013 at 09:37:35AM +0200, Tomi Valkeinen wrote: >> Hi, >> >> On 2013-12-13 20:17, Sebastian Reichel wrote: >>> Hi, >>> >>> This patchset adds DT support for the N900 panel. The patchset is based on >>> Tomi's work/dss-dt-2 branch [0]. I suggest to send the DT changes through >>> Benoits queue, since I have more N900 DT changes for 3.14. Also the patch >>> editing the rx51 boardcode can be dropped, since the file is removed in 3.14. >>> I included those two with this patchset, since they are needed to test the >>> other two patches. >>> >>> I did not include a documentation for the DT API, since the omapdss >>> documentation is still missing. >>> >>> I have successfully tested this on the N900. >>> >>> [0] https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/log/?h=work/dss-dt-2 >> >> I added N900 display DT support on top of my v2 series, including >> pinmuxing. Can you check if it looks right and works? >> >> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt > > I just tried it and it does not work. On a first look the pinmuxing > looks fishy: 0x0d4 is muxed two times. Hmm, so it is. I'm not really familiar with SDI, I just muxed all the SDI pins, except datapair3. I previously thought that there's only the data and clock pairs for SDI, but the TRM revealed more sdi pins, so I included them. It is well possible that these can be removed: 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ Tomi [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 901 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-17 17:29 ` Tomi Valkeinen 0 siblings, 0 replies; 32+ messages in thread From: Tomi Valkeinen @ 2013-12-17 17:29 UTC (permalink / raw) To: Sebastian Reichel Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 1750 bytes --] On 2013-12-17 19:14, Sebastian Reichel wrote: > On Tue, Dec 17, 2013 at 09:37:35AM +0200, Tomi Valkeinen wrote: >> Hi, >> >> On 2013-12-13 20:17, Sebastian Reichel wrote: >>> Hi, >>> >>> This patchset adds DT support for the N900 panel. The patchset is based on >>> Tomi's work/dss-dt-2 branch [0]. I suggest to send the DT changes through >>> Benoits queue, since I have more N900 DT changes for 3.14. Also the patch >>> editing the rx51 boardcode can be dropped, since the file is removed in 3.14. >>> I included those two with this patchset, since they are needed to test the >>> other two patches. >>> >>> I did not include a documentation for the DT API, since the omapdss >>> documentation is still missing. >>> >>> I have successfully tested this on the N900. >>> >>> [0] https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/log/?h=work/dss-dt-2 >> >> I added N900 display DT support on top of my v2 series, including >> pinmuxing. Can you check if it looks right and works? >> >> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt > > I just tried it and it does not work. On a first look the pinmuxing > looks fishy: 0x0d4 is muxed two times. Hmm, so it is. I'm not really familiar with SDI, I just muxed all the SDI pins, except datapair3. I previously thought that there's only the data and clock pairs for SDI, but the TRM revealed more sdi pins, so I included them. It is well possible that these can be removed: 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ Tomi [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 901 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-17 17:29 ` Tomi Valkeinen @ 2013-12-18 21:55 ` Sebastian Reichel -1 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-18 21:55 UTC (permalink / raw) To: Tomi Valkeinen Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 1977 bytes --] On Tue, Dec 17, 2013 at 07:29:34PM +0200, Tomi Valkeinen wrote: > >> I added N900 display DT support on top of my v2 series, including > >> pinmuxing. Can you check if it looks right and works? > >> > >> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt > > > > I just tried it and it does not work. On a first look the pinmuxing > > looks fishy: 0x0d4 is muxed two times. > > Hmm, so it is. > > I'm not really familiar with SDI, I just muxed all the SDI pins, except > datapair3. I previously thought that there's only the data and clock > pairs for SDI, but the TRM revealed more sdi pins, so I included them. > It is well possible that these can be removed: > > 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ > 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ > 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ > 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ Just removing the dss_data20.sdi_den pin was enough to get a working display. I don't know if the other pins are needed, because the display pins are already muxed correctly by the bootloader. -- Sebastian diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 39e5e50..33f29ac 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -163,7 +163,7 @@ 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ - 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ + //0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-18 21:55 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-18 21:55 UTC (permalink / raw) To: Tomi Valkeinen Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 1977 bytes --] On Tue, Dec 17, 2013 at 07:29:34PM +0200, Tomi Valkeinen wrote: > >> I added N900 display DT support on top of my v2 series, including > >> pinmuxing. Can you check if it looks right and works? > >> > >> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt > > > > I just tried it and it does not work. On a first look the pinmuxing > > looks fishy: 0x0d4 is muxed two times. > > Hmm, so it is. > > I'm not really familiar with SDI, I just muxed all the SDI pins, except > datapair3. I previously thought that there's only the data and clock > pairs for SDI, but the TRM revealed more sdi pins, so I included them. > It is well possible that these can be removed: > > 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ > 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ > 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ > 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ Just removing the dss_data20.sdi_den pin was enough to get a working display. I don't know if the other pins are needed, because the display pins are already muxed correctly by the bootloader. -- Sebastian diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 39e5e50..33f29ac 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -163,7 +163,7 @@ 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ - 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ + //0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-18 21:55 ` Sebastian Reichel @ 2013-12-19 0:51 ` Sebastian Reichel -1 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-19 0:51 UTC (permalink / raw) To: Tomi Valkeinen, Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 2535 bytes --] On Wed, Dec 18, 2013 at 10:55:37PM +0100, Sebastian Reichel wrote: > On Tue, Dec 17, 2013 at 07:29:34PM +0200, Tomi Valkeinen wrote: > > >> I added N900 display DT support on top of my v2 series, including > > >> pinmuxing. Can you check if it looks right and works? > > >> > > >> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt > > > > > > I just tried it and it does not work. On a first look the pinmuxing > > > looks fishy: 0x0d4 is muxed two times. > > > > Hmm, so it is. > > > > I'm not really familiar with SDI, I just muxed all the SDI pins, except > > datapair3. I previously thought that there's only the data and clock > > pairs for SDI, but the TRM revealed more sdi pins, so I included them. > > It is well possible that these can be removed: > > > > 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ > > 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ > > 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ > > 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ > > Just removing the dss_data20.sdi_den pin was enough to get a working display. I > don't know if the other pins are needed, because the display pins are already > muxed correctly by the bootloader. I just had a look in the leaked n900 schematics. According to it the following pins are connected to the display: DSS_DATA20 (E28) GPIO 90 LCD_RST DSS_DATA10 (AD28) SDI_DAT1N CDP 0 DSS_DATA11 (AD27) SDI_DAT1P CDP 1 DSS_DATA12 (AB28) SDI_DAT2N CDP 2 DSS_DATA13 (AB27) SDI_DAT2P CDP 3 DSS_DATA14 (AA28) SDI_DAT3N CDP 4 DSS_DATA15 (AA27) SDI_DAT3P CDP 5 DSS_DATA22 (AC27) SDI_CLKP CDP 6 DSS_DATA23 (AC28) SDI_CLKN CDP 7 I also noticed that dss_data19.sdi_hsync is used as gpio 89 for the N900's proximity sensor. Thus I suggest the following SDI pin muxing: dss_sdi_pins: pinmux_dss_sdi_pins { pinctrl-single,pins = < 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ 0x0c8 (PIN_OUTPUT | MUX_MODE1) /* dss_data14.sdi_dat3n */ 0x0ca (PIN_OUTPUT | MUX_MODE1) /* dss_data15.sdi_dat3p */ 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ >; }; -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-19 0:51 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-19 0:51 UTC (permalink / raw) To: Tomi Valkeinen, Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 2535 bytes --] On Wed, Dec 18, 2013 at 10:55:37PM +0100, Sebastian Reichel wrote: > On Tue, Dec 17, 2013 at 07:29:34PM +0200, Tomi Valkeinen wrote: > > >> I added N900 display DT support on top of my v2 series, including > > >> pinmuxing. Can you check if it looks right and works? > > >> > > >> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt > > > > > > I just tried it and it does not work. On a first look the pinmuxing > > > looks fishy: 0x0d4 is muxed two times. > > > > Hmm, so it is. > > > > I'm not really familiar with SDI, I just muxed all the SDI pins, except > > datapair3. I previously thought that there's only the data and clock > > pairs for SDI, but the TRM revealed more sdi pins, so I included them. > > It is well possible that these can be removed: > > > > 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ > > 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ > > 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ > > 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ > > Just removing the dss_data20.sdi_den pin was enough to get a working display. I > don't know if the other pins are needed, because the display pins are already > muxed correctly by the bootloader. I just had a look in the leaked n900 schematics. According to it the following pins are connected to the display: DSS_DATA20 (E28) GPIO 90 LCD_RST DSS_DATA10 (AD28) SDI_DAT1N CDP 0 DSS_DATA11 (AD27) SDI_DAT1P CDP 1 DSS_DATA12 (AB28) SDI_DAT2N CDP 2 DSS_DATA13 (AB27) SDI_DAT2P CDP 3 DSS_DATA14 (AA28) SDI_DAT3N CDP 4 DSS_DATA15 (AA27) SDI_DAT3P CDP 5 DSS_DATA22 (AC27) SDI_CLKP CDP 6 DSS_DATA23 (AC28) SDI_CLKN CDP 7 I also noticed that dss_data19.sdi_hsync is used as gpio 89 for the N900's proximity sensor. Thus I suggest the following SDI pin muxing: dss_sdi_pins: pinmux_dss_sdi_pins { pinctrl-single,pins = < 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ 0x0c8 (PIN_OUTPUT | MUX_MODE1) /* dss_data14.sdi_dat3n */ 0x0ca (PIN_OUTPUT | MUX_MODE1) /* dss_data15.sdi_dat3p */ 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ >; }; -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-19 0:51 ` Sebastian Reichel @ 2013-12-19 5:30 ` Tomi Valkeinen -1 siblings, 0 replies; 32+ messages in thread From: Tomi Valkeinen @ 2013-12-19 5:30 UTC (permalink / raw) To: Sebastian Reichel Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 3003 bytes --] On 2013-12-19 02:51, Sebastian Reichel wrote: > On Wed, Dec 18, 2013 at 10:55:37PM +0100, Sebastian Reichel wrote: >> On Tue, Dec 17, 2013 at 07:29:34PM +0200, Tomi Valkeinen wrote: >>>>> I added N900 display DT support on top of my v2 series, including >>>>> pinmuxing. Can you check if it looks right and works? >>>>> >>>>> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt >>>> >>>> I just tried it and it does not work. On a first look the pinmuxing >>>> looks fishy: 0x0d4 is muxed two times. >>> >>> Hmm, so it is. >>> >>> I'm not really familiar with SDI, I just muxed all the SDI pins, except >>> datapair3. I previously thought that there's only the data and clock >>> pairs for SDI, but the TRM revealed more sdi pins, so I included them. >>> It is well possible that these can be removed: >>> >>> 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ >>> 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ >>> 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ >>> 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ >> >> Just removing the dss_data20.sdi_den pin was enough to get a working display. I >> don't know if the other pins are needed, because the display pins are already >> muxed correctly by the bootloader. > > I just had a look in the leaked n900 schematics. According to it the > following pins are connected to the display: > > DSS_DATA20 (E28) GPIO 90 LCD_RST > DSS_DATA10 (AD28) SDI_DAT1N CDP 0 > DSS_DATA11 (AD27) SDI_DAT1P CDP 1 > DSS_DATA12 (AB28) SDI_DAT2N CDP 2 > DSS_DATA13 (AB27) SDI_DAT2P CDP 3 > DSS_DATA14 (AA28) SDI_DAT3N CDP 4 > DSS_DATA15 (AA27) SDI_DAT3P CDP 5 > DSS_DATA22 (AC27) SDI_CLKP CDP 6 > DSS_DATA23 (AC28) SDI_CLKN CDP 7 > > I also noticed that dss_data19.sdi_hsync is used as gpio 89 for the > N900's proximity sensor. Thus I suggest the following SDI pin muxing: > > dss_sdi_pins: pinmux_dss_sdi_pins { > pinctrl-single,pins = < > 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ > 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ > 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ > 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ > 0x0c8 (PIN_OUTPUT | MUX_MODE1) /* dss_data14.sdi_dat3n */ > 0x0ca (PIN_OUTPUT | MUX_MODE1) /* dss_data15.sdi_dat3p */ > > 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ > 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ > >; > }; Thanks, I'll do the modifications. The dat3 lines are not needed, but if they're connected to the panel, I don't see any harm in muxing them. Although, makes me wonder. If the panel supports only 2 datalanes, why does it have connectors for 3? And if it supports 3, why would N900 use only 2? Are you able to check if the bootloader muxes dat3 to SDI mode? Tomi [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 901 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-19 5:30 ` Tomi Valkeinen 0 siblings, 0 replies; 32+ messages in thread From: Tomi Valkeinen @ 2013-12-19 5:30 UTC (permalink / raw) To: Sebastian Reichel Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 3003 bytes --] On 2013-12-19 02:51, Sebastian Reichel wrote: > On Wed, Dec 18, 2013 at 10:55:37PM +0100, Sebastian Reichel wrote: >> On Tue, Dec 17, 2013 at 07:29:34PM +0200, Tomi Valkeinen wrote: >>>>> I added N900 display DT support on top of my v2 series, including >>>>> pinmuxing. Can you check if it looks right and works? >>>>> >>>>> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt >>>> >>>> I just tried it and it does not work. On a first look the pinmuxing >>>> looks fishy: 0x0d4 is muxed two times. >>> >>> Hmm, so it is. >>> >>> I'm not really familiar with SDI, I just muxed all the SDI pins, except >>> datapair3. I previously thought that there's only the data and clock >>> pairs for SDI, but the TRM revealed more sdi pins, so I included them. >>> It is well possible that these can be removed: >>> >>> 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ >>> 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ >>> 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ >>> 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ >> >> Just removing the dss_data20.sdi_den pin was enough to get a working display. I >> don't know if the other pins are needed, because the display pins are already >> muxed correctly by the bootloader. > > I just had a look in the leaked n900 schematics. According to it the > following pins are connected to the display: > > DSS_DATA20 (E28) GPIO 90 LCD_RST > DSS_DATA10 (AD28) SDI_DAT1N CDP 0 > DSS_DATA11 (AD27) SDI_DAT1P CDP 1 > DSS_DATA12 (AB28) SDI_DAT2N CDP 2 > DSS_DATA13 (AB27) SDI_DAT2P CDP 3 > DSS_DATA14 (AA28) SDI_DAT3N CDP 4 > DSS_DATA15 (AA27) SDI_DAT3P CDP 5 > DSS_DATA22 (AC27) SDI_CLKP CDP 6 > DSS_DATA23 (AC28) SDI_CLKN CDP 7 > > I also noticed that dss_data19.sdi_hsync is used as gpio 89 for the > N900's proximity sensor. Thus I suggest the following SDI pin muxing: > > dss_sdi_pins: pinmux_dss_sdi_pins { > pinctrl-single,pins = < > 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ > 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ > 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ > 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ > 0x0c8 (PIN_OUTPUT | MUX_MODE1) /* dss_data14.sdi_dat3n */ > 0x0ca (PIN_OUTPUT | MUX_MODE1) /* dss_data15.sdi_dat3p */ > > 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ > 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ > >; > }; Thanks, I'll do the modifications. The dat3 lines are not needed, but if they're connected to the panel, I don't see any harm in muxing them. Although, makes me wonder. If the panel supports only 2 datalanes, why does it have connectors for 3? And if it supports 3, why would N900 use only 2? Are you able to check if the bootloader muxes dat3 to SDI mode? Tomi [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 901 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-19 5:30 ` Tomi Valkeinen @ 2013-12-19 10:08 ` Sebastian Reichel -1 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-19 10:08 UTC (permalink / raw) To: Tomi Valkeinen Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 3487 bytes --] On Thu, Dec 19, 2013 at 07:30:50AM +0200, Tomi Valkeinen wrote: > On 2013-12-19 02:51, Sebastian Reichel wrote: > > On Wed, Dec 18, 2013 at 10:55:37PM +0100, Sebastian Reichel wrote: > >> On Tue, Dec 17, 2013 at 07:29:34PM +0200, Tomi Valkeinen wrote: > >>>>> I added N900 display DT support on top of my v2 series, including > >>>>> pinmuxing. Can you check if it looks right and works? > >>>>> > >>>>> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt > >>>> > >>>> I just tried it and it does not work. On a first look the pinmuxing > >>>> looks fishy: 0x0d4 is muxed two times. > >>> > >>> Hmm, so it is. > >>> > >>> I'm not really familiar with SDI, I just muxed all the SDI pins, except > >>> datapair3. I previously thought that there's only the data and clock > >>> pairs for SDI, but the TRM revealed more sdi pins, so I included them. > >>> It is well possible that these can be removed: > >>> > >>> 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ > >>> 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ > >>> 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ > >>> 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ > >> > >> Just removing the dss_data20.sdi_den pin was enough to get a working display. I > >> don't know if the other pins are needed, because the display pins are already > >> muxed correctly by the bootloader. > > > > I just had a look in the leaked n900 schematics. According to it the > > following pins are connected to the display: > > > > DSS_DATA20 (E28) GPIO 90 LCD_RST > > DSS_DATA10 (AD28) SDI_DAT1N CDP 0 > > DSS_DATA11 (AD27) SDI_DAT1P CDP 1 > > DSS_DATA12 (AB28) SDI_DAT2N CDP 2 > > DSS_DATA13 (AB27) SDI_DAT2P CDP 3 > > DSS_DATA14 (AA28) SDI_DAT3N CDP 4 > > DSS_DATA15 (AA27) SDI_DAT3P CDP 5 > > DSS_DATA22 (AC27) SDI_CLKP CDP 6 > > DSS_DATA23 (AC28) SDI_CLKN CDP 7 > > > > I also noticed that dss_data19.sdi_hsync is used as gpio 89 for the > > N900's proximity sensor. Thus I suggest the following SDI pin muxing: > > > > dss_sdi_pins: pinmux_dss_sdi_pins { > > pinctrl-single,pins = < > > 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ > > 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ > > 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ > > 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ > > 0x0c8 (PIN_OUTPUT | MUX_MODE1) /* dss_data14.sdi_dat3n */ > > 0x0ca (PIN_OUTPUT | MUX_MODE1) /* dss_data15.sdi_dat3p */ > > > > 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ > > 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ > > >; > > }; > > Thanks, I'll do the modifications. The dat3 lines are not needed, but if > they're connected to the panel, I don't see any harm in muxing them. > > Although, makes me wonder. If the panel supports only 2 datalanes, why > does it have connectors for 3? And if it supports 3, why would N900 use > only 2? I wondered about the same and I also assumed, that the muxing should be safe. > Are you able to check if the bootloader muxes dat3 to SDI mode? The bootloader's source code is not available as far as i know. I tried to cat /sys/kernel/debug/pinctrl/48002030.pinmux/pins, but I get an external abort on non-linefetch. So I can't check it :( -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-19 10:08 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-19 10:08 UTC (permalink / raw) To: Tomi Valkeinen Cc: Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 3487 bytes --] On Thu, Dec 19, 2013 at 07:30:50AM +0200, Tomi Valkeinen wrote: > On 2013-12-19 02:51, Sebastian Reichel wrote: > > On Wed, Dec 18, 2013 at 10:55:37PM +0100, Sebastian Reichel wrote: > >> On Tue, Dec 17, 2013 at 07:29:34PM +0200, Tomi Valkeinen wrote: > >>>>> I added N900 display DT support on top of my v2 series, including > >>>>> pinmuxing. Can you check if it looks right and works? > >>>>> > >>>>> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt > >>>> > >>>> I just tried it and it does not work. On a first look the pinmuxing > >>>> looks fishy: 0x0d4 is muxed two times. > >>> > >>> Hmm, so it is. > >>> > >>> I'm not really familiar with SDI, I just muxed all the SDI pins, except > >>> datapair3. I previously thought that there's only the data and clock > >>> pairs for SDI, but the TRM revealed more sdi pins, so I included them. > >>> It is well possible that these can be removed: > >>> > >>> 0x0d0 (PIN_OUTPUT | MUX_MODE1) /* dss_data18.sdi_vsync */ > >>> 0x0d2 (PIN_OUTPUT | MUX_MODE1) /* dss_data19.sdi_hsync */ > >>> 0x0d4 (PIN_OUTPUT | MUX_MODE1) /* dss_data20.sdi_den */ > >>> 0x0d6 (PIN_OUTPUT | MUX_MODE1) /* dss_data21.sdi_stp */ > >> > >> Just removing the dss_data20.sdi_den pin was enough to get a working display. I > >> don't know if the other pins are needed, because the display pins are already > >> muxed correctly by the bootloader. > > > > I just had a look in the leaked n900 schematics. According to it the > > following pins are connected to the display: > > > > DSS_DATA20 (E28) GPIO 90 LCD_RST > > DSS_DATA10 (AD28) SDI_DAT1N CDP 0 > > DSS_DATA11 (AD27) SDI_DAT1P CDP 1 > > DSS_DATA12 (AB28) SDI_DAT2N CDP 2 > > DSS_DATA13 (AB27) SDI_DAT2P CDP 3 > > DSS_DATA14 (AA28) SDI_DAT3N CDP 4 > > DSS_DATA15 (AA27) SDI_DAT3P CDP 5 > > DSS_DATA22 (AC27) SDI_CLKP CDP 6 > > DSS_DATA23 (AC28) SDI_CLKN CDP 7 > > > > I also noticed that dss_data19.sdi_hsync is used as gpio 89 for the > > N900's proximity sensor. Thus I suggest the following SDI pin muxing: > > > > dss_sdi_pins: pinmux_dss_sdi_pins { > > pinctrl-single,pins = < > > 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ > > 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ > > 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ > > 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ > > 0x0c8 (PIN_OUTPUT | MUX_MODE1) /* dss_data14.sdi_dat3n */ > > 0x0ca (PIN_OUTPUT | MUX_MODE1) /* dss_data15.sdi_dat3p */ > > > > 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ > > 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ > > >; > > }; > > Thanks, I'll do the modifications. The dat3 lines are not needed, but if > they're connected to the panel, I don't see any harm in muxing them. > > Although, makes me wonder. If the panel supports only 2 datalanes, why > does it have connectors for 3? And if it supports 3, why would N900 use > only 2? I wondered about the same and I also assumed, that the muxing should be safe. > Are you able to check if the bootloader muxes dat3 to SDI mode? The bootloader's source code is not available as far as i know. I tried to cat /sys/kernel/debug/pinctrl/48002030.pinmux/pins, but I get an external abort on non-linefetch. So I can't check it :( -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
[parent not found: <20131219100840.GA923-SfvFxonMDyemK9LvCR3Hrw@public.gmane.org>]
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel [not found] ` <20131219100840.GA923-SfvFxonMDyemK9LvCR3Hrw@public.gmane.org> @ 2013-12-19 13:56 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-19 13:56 UTC (permalink / raw) To: Tomi Valkeinen, Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1859 bytes --] On Thu, Dec 19, 2013 at 11:08:40AM +0100, Sebastian Reichel wrote: > > Are you able to check if the bootloader muxes dat3 to SDI mode? > > The bootloader's source code is not available as far as i know. > > [...], but I get an external abort on non-linefetch. > So I can't check it :( Ok. This is fixed by applying [0] (Thanks for the hint, Tomi!). This is the mux configuration from the bootloader: ... pin 96 (480020f0.0) 00000001 pinctrl-single // sdi dat1n pin 97 (480020f2.0) 00000001 pinctrl-single // sdi dat1p pin 98 (480020f4.0) 00000001 pinctrl-single // sdi dat2n pin 99 (480020f6.0) 00000001 pinctrl-single // sdi dat2p pin 100 (480020f8.0) 00000007 pinctrl-single // sdi dat3n pin 101 (480020fa.0) 00000007 pinctrl-single // sdi dat3p pin 102 (480020fc.0) 00000004 pinctrl-single pin 103 (480020fe.0) 00000004 pinctrl-single pin 104 (48002100.0) 00000004 pinctrl-single // sdi vsync pin 105 (48002102.0) 00004104 pinctrl-single // sdi hsync pin 106 (48002104.0) 00000004 pinctrl-single // sdi den pin 107 (48002106.0) 00000004 pinctrl-single // sdi stp pin 108 (48002108.0) 00000001 pinctrl-single // sdi clkp pin 109 (4800210a.0) 00000001 pinctrl-single // sdi clkn ... I guess the following entry should be added to the omap3-n900.dts file: dss_sdi_pins: pinmux_dss_sdi_pins { pinctrl-single,pins = < 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ >; }; [0] https://patchwork.kernel.org/patch/3283781/ -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-19 13:56 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-19 13:56 UTC (permalink / raw) To: Tomi Valkeinen, Benoît Cousson, Tony Lindgren, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1859 bytes --] On Thu, Dec 19, 2013 at 11:08:40AM +0100, Sebastian Reichel wrote: > > Are you able to check if the bootloader muxes dat3 to SDI mode? > > The bootloader's source code is not available as far as i know. > > [...], but I get an external abort on non-linefetch. > So I can't check it :( Ok. This is fixed by applying [0] (Thanks for the hint, Tomi!). This is the mux configuration from the bootloader: ... pin 96 (480020f0.0) 00000001 pinctrl-single // sdi dat1n pin 97 (480020f2.0) 00000001 pinctrl-single // sdi dat1p pin 98 (480020f4.0) 00000001 pinctrl-single // sdi dat2n pin 99 (480020f6.0) 00000001 pinctrl-single // sdi dat2p pin 100 (480020f8.0) 00000007 pinctrl-single // sdi dat3n pin 101 (480020fa.0) 00000007 pinctrl-single // sdi dat3p pin 102 (480020fc.0) 00000004 pinctrl-single pin 103 (480020fe.0) 00000004 pinctrl-single pin 104 (48002100.0) 00000004 pinctrl-single // sdi vsync pin 105 (48002102.0) 00004104 pinctrl-single // sdi hsync pin 106 (48002104.0) 00000004 pinctrl-single // sdi den pin 107 (48002106.0) 00000004 pinctrl-single // sdi stp pin 108 (48002108.0) 00000001 pinctrl-single // sdi clkp pin 109 (4800210a.0) 00000001 pinctrl-single // sdi clkn ... I guess the following entry should be added to the omap3-n900.dts file: dss_sdi_pins: pinmux_dss_sdi_pins { pinctrl-single,pins = < 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ >; }; [0] https://patchwork.kernel.org/patch/3283781/ -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-19 13:56 ` Sebastian Reichel @ 2013-12-19 16:42 ` Tony Lindgren -1 siblings, 0 replies; 32+ messages in thread From: Tony Lindgren @ 2013-12-19 16:42 UTC (permalink / raw) To: Tomi Valkeinen, Benoît Cousson, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree * Sebastian Reichel <sre@debian.org> [131219 05:57]: > On Thu, Dec 19, 2013 at 11:08:40AM +0100, Sebastian Reichel wrote: > > > Are you able to check if the bootloader muxes dat3 to SDI mode? > > > > The bootloader's source code is not available as far as i know. > > > > [...], but I get an external abort on non-linefetch. > > So I can't check it :( > > Ok. This is fixed by applying [0] (Thanks for the hint, Tomi!). > This is the mux configuration from the bootloader: > > ... > pin 96 (480020f0.0) 00000001 pinctrl-single // sdi dat1n > pin 97 (480020f2.0) 00000001 pinctrl-single // sdi dat1p > pin 98 (480020f4.0) 00000001 pinctrl-single // sdi dat2n > pin 99 (480020f6.0) 00000001 pinctrl-single // sdi dat2p > pin 100 (480020f8.0) 00000007 pinctrl-single // sdi dat3n > pin 101 (480020fa.0) 00000007 pinctrl-single // sdi dat3p > pin 102 (480020fc.0) 00000004 pinctrl-single > pin 103 (480020fe.0) 00000004 pinctrl-single > pin 104 (48002100.0) 00000004 pinctrl-single // sdi vsync > pin 105 (48002102.0) 00004104 pinctrl-single // sdi hsync > pin 106 (48002104.0) 00000004 pinctrl-single // sdi den > pin 107 (48002106.0) 00000004 pinctrl-single // sdi stp > pin 108 (48002108.0) 00000001 pinctrl-single // sdi clkp > pin 109 (4800210a.0) 00000001 pinctrl-single // sdi clkn > ... > > I guess the following entry should be added to the omap3-n900.dts file: > > dss_sdi_pins: pinmux_dss_sdi_pins { > pinctrl-single,pins = < > 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ > 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ > 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ > 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ > 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ > 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ > >; > }; > > [0] https://patchwork.kernel.org/patch/3283781/ Do we need to update Laurent's patch with this? Or can we use it as it is and maybe you can ack it? Regards, Tony ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-19 16:42 ` Tony Lindgren 0 siblings, 0 replies; 32+ messages in thread From: Tony Lindgren @ 2013-12-19 16:42 UTC (permalink / raw) To: Tomi Valkeinen, Benoît Cousson, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree * Sebastian Reichel <sre@debian.org> [131219 05:57]: > On Thu, Dec 19, 2013 at 11:08:40AM +0100, Sebastian Reichel wrote: > > > Are you able to check if the bootloader muxes dat3 to SDI mode? > > > > The bootloader's source code is not available as far as i know. > > > > [...], but I get an external abort on non-linefetch. > > So I can't check it :( > > Ok. This is fixed by applying [0] (Thanks for the hint, Tomi!). > This is the mux configuration from the bootloader: > > ... > pin 96 (480020f0.0) 00000001 pinctrl-single // sdi dat1n > pin 97 (480020f2.0) 00000001 pinctrl-single // sdi dat1p > pin 98 (480020f4.0) 00000001 pinctrl-single // sdi dat2n > pin 99 (480020f6.0) 00000001 pinctrl-single // sdi dat2p > pin 100 (480020f8.0) 00000007 pinctrl-single // sdi dat3n > pin 101 (480020fa.0) 00000007 pinctrl-single // sdi dat3p > pin 102 (480020fc.0) 00000004 pinctrl-single > pin 103 (480020fe.0) 00000004 pinctrl-single > pin 104 (48002100.0) 00000004 pinctrl-single // sdi vsync > pin 105 (48002102.0) 00004104 pinctrl-single // sdi hsync > pin 106 (48002104.0) 00000004 pinctrl-single // sdi den > pin 107 (48002106.0) 00000004 pinctrl-single // sdi stp > pin 108 (48002108.0) 00000001 pinctrl-single // sdi clkp > pin 109 (4800210a.0) 00000001 pinctrl-single // sdi clkn > ... > > I guess the following entry should be added to the omap3-n900.dts file: > > dss_sdi_pins: pinmux_dss_sdi_pins { > pinctrl-single,pins = < > 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ > 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ > 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ > 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ > 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ > 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ > >; > }; > > [0] https://patchwork.kernel.org/patch/3283781/ Do we need to update Laurent's patch with this? Or can we use it as it is and maybe you can ack it? Regards, Tony ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-19 16:42 ` Tony Lindgren @ 2013-12-19 17:00 ` Sebastian Reichel -1 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-19 17:00 UTC (permalink / raw) To: Tony Lindgren Cc: Tomi Valkeinen, Benoît Cousson, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 946 bytes --] On Thu, Dec 19, 2013 at 08:42:31AM -0800, Tony Lindgren wrote: > * Sebastian Reichel <sre@debian.org> [131219 05:57]: > > On Thu, Dec 19, 2013 at 11:08:40AM +0100, Sebastian Reichel wrote: > > > > Are you able to check if the bootloader muxes dat3 to SDI mode? > > > > > > The bootloader's source code is not available as far as i know. > > > > > > [...], but I get an external abort on non-linefetch. > > > So I can't check it :( > > > > Ok. This is fixed by applying [0] (Thanks for the hint, Tomi!). > > This is the mux configuration from the bootloader: > > > > [...] > > > > [0] https://patchwork.kernel.org/patch/3283781/ > > Do we need to update Laurent's patch with this? No, the patch is only needed to avoid the mentioned external abort on non-linefetch when doing "cat /sys/kernel/debug/pinctrl/.../pins". > Or can we use it as it is and maybe you can ack it? Sure. I will add an Ack. -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-19 17:00 ` Sebastian Reichel 0 siblings, 0 replies; 32+ messages in thread From: Sebastian Reichel @ 2013-12-19 17:00 UTC (permalink / raw) To: Tony Lindgren Cc: Tomi Valkeinen, Benoît Cousson, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree [-- Attachment #1: Type: text/plain, Size: 946 bytes --] On Thu, Dec 19, 2013 at 08:42:31AM -0800, Tony Lindgren wrote: > * Sebastian Reichel <sre@debian.org> [131219 05:57]: > > On Thu, Dec 19, 2013 at 11:08:40AM +0100, Sebastian Reichel wrote: > > > > Are you able to check if the bootloader muxes dat3 to SDI mode? > > > > > > The bootloader's source code is not available as far as i know. > > > > > > [...], but I get an external abort on non-linefetch. > > > So I can't check it :( > > > > Ok. This is fixed by applying [0] (Thanks for the hint, Tomi!). > > This is the mux configuration from the bootloader: > > > > [...] > > > > [0] https://patchwork.kernel.org/patch/3283781/ > > Do we need to update Laurent's patch with this? No, the patch is only needed to avoid the mentioned external abort on non-linefetch when doing "cat /sys/kernel/debug/pinctrl/.../pins". > Or can we use it as it is and maybe you can ack it? Sure. I will add an Ack. -- Sebastian [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel 2013-12-19 17:00 ` Sebastian Reichel @ 2013-12-19 18:34 ` Tony Lindgren -1 siblings, 0 replies; 32+ messages in thread From: Tony Lindgren @ 2013-12-19 18:34 UTC (permalink / raw) To: Tomi Valkeinen, Benoît Cousson, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree * Sebastian Reichel <sre@ring0.de> [131219 09:01]: > On Thu, Dec 19, 2013 at 08:42:31AM -0800, Tony Lindgren wrote: > > * Sebastian Reichel <sre@debian.org> [131219 05:57]: > > > On Thu, Dec 19, 2013 at 11:08:40AM +0100, Sebastian Reichel wrote: > > > > > Are you able to check if the bootloader muxes dat3 to SDI mode? > > > > > > > > The bootloader's source code is not available as far as i know. > > > > > > > > [...], but I get an external abort on non-linefetch. > > > > So I can't check it :( > > > > > > Ok. This is fixed by applying [0] (Thanks for the hint, Tomi!). > > > This is the mux configuration from the bootloader: > > > > > > [...] > > > > > > [0] https://patchwork.kernel.org/patch/3283781/ > > > > Do we need to update Laurent's patch with this? > > No, the patch is only needed to avoid the mentioned external abort > on non-linefetch when doing "cat /sys/kernel/debug/pinctrl/.../pins". > > > Or can we use it as it is and maybe you can ack it? > > Sure. I will add an Ack. OK thanks. Here's my current legacy mux dumping tool if you want to look at how the pins are muxed by the bootloader while booted to DT mode. This is against omap-for-v3.14/dt branch, the list in pdata-quirks.c may need updating depending on the board. And this does not account for splitting up the pinctrl core for omap3.. Regards, Tony 8< ----------------------------------- >From 2fb3765fd5739e8f5fb4318e2576081be6d535f2 Mon Sep 17 00:00:00 2001 From: Tony Lindgren <tony@atomide.com> Date: Thu, 19 Dec 2013 10:31:03 -0800 Subject: [PATCH] Not for merging: Allows dumping out mux entries in .dts format using legacy mux For pinctrl-single.c we should eventually have a user space app to configure and display pin settings. Meanwhile, allow using the legacy mux interface to do that: # mount -t debugfs debugfs /sys/kernel/debug # cat /sys/kernel/debug/omap_mux/board/wkup | grep fref_clk0_out 0x14 0x2 /* fref_clk0_out.sys_drm_msecure gpio6 OUTPUT | MODE2 */ diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 48094b58..40658d9 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -35,11 +35,10 @@ #include <linux/irq.h> #include <linux/interrupt.h> - #include "omap_hwmod.h" - #include "soc.h" #include "control.h" +#include "id.h" #include "mux.h" #include "prm.h" #include "common.h" @@ -505,17 +504,17 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) #define OMAP_MUX_TEST_FLAG(val, mask) \ if (((val) & (mask)) == (mask)) { \ i++; \ - flags[i] = #mask; \ + flags[i] = #mask + sizeof("OMAP_") - 1; \ } /* REVISIT: Add checking for non-optimal mux settings */ static inline void omap_mux_decode(struct seq_file *s, u16 val) { char *flags[OMAP_MUX_MAX_NR_FLAGS]; - char mode[sizeof("OMAP_MUX_MODE") + 1]; + char mode[sizeof("MUX_MODE") + 1]; int i = -1; - sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7); + sprintf(mode, "MUX_MODE%d", val & 0x7); i++; flags[i] = mode; @@ -553,7 +552,7 @@ static inline void omap_mux_decode(struct seq_file *s, u16 val) } } else { i++; - flags[i] = "OMAP_PIN_OUTPUT"; + flags[i] = "PIN_OUTPUT"; } do { @@ -568,15 +567,26 @@ static inline void omap_mux_decode(struct seq_file *s, u16 val) static int omap_mux_dbg_board_show(struct seq_file *s, void *unused) { struct omap_mux_partition *partition = s->private; + int pbase = (int)partition->base; struct omap_mux_entry *e; - u8 omap_gen = omap_rev() >> 28; + + if (!(pbase & 0xfff)) + pbase = 0x40; + else + pbase = 0; + + seq_printf(s, "\t\tpinctrl-single,pins = <\n"); list_for_each_entry(e, &partition->muxmodes, node) { struct omap_mux *m = &e->mux; char m0_def[OMAP_MUX_DEFNAME_LEN]; char *m0_name = m->muxnames[0]; u16 val; - int i, mode; + int padconf_offset, i, mode; + + padconf_offset = m->reg_offset - pbase; + if (cpu_is_omap3630() && padconf_offset > 0x5ca) + continue; if (!m0_name) continue; @@ -591,18 +601,18 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused) } val = omap_mux_read(partition, m->reg_offset); mode = val & OMAP_MUX_MODE7; - if (mode != 0) - seq_printf(s, "/* %s */\n", m->muxnames[mode]); - - /* - * XXX: Might be revisited to support differences across - * same OMAP generation. - */ - seq_printf(s, "OMAP%d_MUX(%s, ", omap_gen, m0_def); + seq_printf(s, "\t\t\t0x%x (", + padconf_offset); omap_mux_decode(s, val); - seq_printf(s, "),\n"); + seq_printf(s, ")\t/* %s.%s */", + m->muxnames[0], m->muxnames[mode]); + seq_printf(s, " //0x%x gpio%i", + val, m->gpio); + seq_printf(s, "\n"); } + seq_printf(s, "\t\t>;\n"); + return 0; } diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 3d5b24d..a6d6e7e 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -22,6 +22,7 @@ #include "common-board-devices.h" #include "dss-common.h" #include "control.h" +#include "mux.h" struct pdata_init { const char *compatible; @@ -277,6 +278,39 @@ static struct pdata_init pdata_quirks[] __initdata = { { /* sentinel */ }, }; +struct board_package { + const char *compatible; + int (*fn)(struct omap_board_mux *board_mux, int flags); + int flags; +}; + +static struct board_package packages[] __initdata = { + { "nokia,n800", omap2420_mux_init, OMAP_PACKAGE_ZAC, }, + { "nokia,n810", omap2420_mux_init, OMAP_PACKAGE_ZAC, }, + { "ti,omap2430-sdp", omap2430_mux_init, OMAP_PACKAGE_ZAC, }, + { "nokia,omap3-n900", omap3_mux_init, OMAP_PACKAGE_CBB, }, + { "ti,omap3-evm-37xx", omap3_mux_init, OMAP_PACKAGE_CBB, }, + { "ti,omap3-ldp", omap3_mux_init, OMAP_PACKAGE_CBB, }, + { "ti,omap3-zoom3", omap3_mux_init, OMAP_PACKAGE_CBP, }, + { "ti,omap4-sdp", omap4_mux_init, OMAP_PACKAGE_CBS, }, + { "ti,omap4-panda", omap4_mux_init, OMAP_PACKAGE_CBS, }, + { /* sentinel */ }, +}; + +static void legacy_mux_init(void) +{ + struct board_package *pkg = packages; + + while (pkg->compatible) { + if (of_machine_is_compatible(pkg->compatible)) { + if (pkg->fn) + pkg->fn(NULL, pkg->flags); + break; + } + pkg++; + } +} + static void pdata_quirks_check(struct pdata_init *quirks) { while (quirks->compatible) { @@ -296,4 +330,5 @@ void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table) of_platform_populate(NULL, omap_dt_match_table, omap_auxdata_lookup, NULL); pdata_quirks_check(pdata_quirks); + legacy_mux_init(); } ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] OMAPDSS: DT support for N900 panel @ 2013-12-19 18:34 ` Tony Lindgren 0 siblings, 0 replies; 32+ messages in thread From: Tony Lindgren @ 2013-12-19 18:34 UTC (permalink / raw) To: Tomi Valkeinen, Benoît Cousson, Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell, Rob Landley, linux-omap, linux-fbdev, devicetree * Sebastian Reichel <sre@ring0.de> [131219 09:01]: > On Thu, Dec 19, 2013 at 08:42:31AM -0800, Tony Lindgren wrote: > > * Sebastian Reichel <sre@debian.org> [131219 05:57]: > > > On Thu, Dec 19, 2013 at 11:08:40AM +0100, Sebastian Reichel wrote: > > > > > Are you able to check if the bootloader muxes dat3 to SDI mode? > > > > > > > > The bootloader's source code is not available as far as i know. > > > > > > > > [...], but I get an external abort on non-linefetch. > > > > So I can't check it :( > > > > > > Ok. This is fixed by applying [0] (Thanks for the hint, Tomi!). > > > This is the mux configuration from the bootloader: > > > > > > [...] > > > > > > [0] https://patchwork.kernel.org/patch/3283781/ > > > > Do we need to update Laurent's patch with this? > > No, the patch is only needed to avoid the mentioned external abort > on non-linefetch when doing "cat /sys/kernel/debug/pinctrl/.../pins". > > > Or can we use it as it is and maybe you can ack it? > > Sure. I will add an Ack. OK thanks. Here's my current legacy mux dumping tool if you want to look at how the pins are muxed by the bootloader while booted to DT mode. This is against omap-for-v3.14/dt branch, the list in pdata-quirks.c may need updating depending on the board. And this does not account for splitting up the pinctrl core for omap3.. Regards, Tony 8< ----------------------------------- From 2fb3765fd5739e8f5fb4318e2576081be6d535f2 Mon Sep 17 00:00:00 2001 From: Tony Lindgren <tony@atomide.com> Date: Thu, 19 Dec 2013 10:31:03 -0800 Subject: [PATCH] Not for merging: Allows dumping out mux entries in .dts format using legacy mux For pinctrl-single.c we should eventually have a user space app to configure and display pin settings. Meanwhile, allow using the legacy mux interface to do that: # mount -t debugfs debugfs /sys/kernel/debug # cat /sys/kernel/debug/omap_mux/board/wkup | grep fref_clk0_out 0x14 0x2 /* fref_clk0_out.sys_drm_msecure gpio6 OUTPUT | MODE2 */ diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 48094b58..40658d9 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -35,11 +35,10 @@ #include <linux/irq.h> #include <linux/interrupt.h> - #include "omap_hwmod.h" - #include "soc.h" #include "control.h" +#include "id.h" #include "mux.h" #include "prm.h" #include "common.h" @@ -505,17 +504,17 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) #define OMAP_MUX_TEST_FLAG(val, mask) \ if (((val) & (mask)) = (mask)) { \ i++; \ - flags[i] = #mask; \ + flags[i] = #mask + sizeof("OMAP_") - 1; \ } /* REVISIT: Add checking for non-optimal mux settings */ static inline void omap_mux_decode(struct seq_file *s, u16 val) { char *flags[OMAP_MUX_MAX_NR_FLAGS]; - char mode[sizeof("OMAP_MUX_MODE") + 1]; + char mode[sizeof("MUX_MODE") + 1]; int i = -1; - sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7); + sprintf(mode, "MUX_MODE%d", val & 0x7); i++; flags[i] = mode; @@ -553,7 +552,7 @@ static inline void omap_mux_decode(struct seq_file *s, u16 val) } } else { i++; - flags[i] = "OMAP_PIN_OUTPUT"; + flags[i] = "PIN_OUTPUT"; } do { @@ -568,15 +567,26 @@ static inline void omap_mux_decode(struct seq_file *s, u16 val) static int omap_mux_dbg_board_show(struct seq_file *s, void *unused) { struct omap_mux_partition *partition = s->private; + int pbase = (int)partition->base; struct omap_mux_entry *e; - u8 omap_gen = omap_rev() >> 28; + + if (!(pbase & 0xfff)) + pbase = 0x40; + else + pbase = 0; + + seq_printf(s, "\t\tpinctrl-single,pins = <\n"); list_for_each_entry(e, &partition->muxmodes, node) { struct omap_mux *m = &e->mux; char m0_def[OMAP_MUX_DEFNAME_LEN]; char *m0_name = m->muxnames[0]; u16 val; - int i, mode; + int padconf_offset, i, mode; + + padconf_offset = m->reg_offset - pbase; + if (cpu_is_omap3630() && padconf_offset > 0x5ca) + continue; if (!m0_name) continue; @@ -591,18 +601,18 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused) } val = omap_mux_read(partition, m->reg_offset); mode = val & OMAP_MUX_MODE7; - if (mode != 0) - seq_printf(s, "/* %s */\n", m->muxnames[mode]); - - /* - * XXX: Might be revisited to support differences across - * same OMAP generation. - */ - seq_printf(s, "OMAP%d_MUX(%s, ", omap_gen, m0_def); + seq_printf(s, "\t\t\t0x%x (", + padconf_offset); omap_mux_decode(s, val); - seq_printf(s, "),\n"); + seq_printf(s, ")\t/* %s.%s */", + m->muxnames[0], m->muxnames[mode]); + seq_printf(s, " //0x%x gpio%i", + val, m->gpio); + seq_printf(s, "\n"); } + seq_printf(s, "\t\t>;\n"); + return 0; } diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 3d5b24d..a6d6e7e 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -22,6 +22,7 @@ #include "common-board-devices.h" #include "dss-common.h" #include "control.h" +#include "mux.h" struct pdata_init { const char *compatible; @@ -277,6 +278,39 @@ static struct pdata_init pdata_quirks[] __initdata = { { /* sentinel */ }, }; +struct board_package { + const char *compatible; + int (*fn)(struct omap_board_mux *board_mux, int flags); + int flags; +}; + +static struct board_package packages[] __initdata = { + { "nokia,n800", omap2420_mux_init, OMAP_PACKAGE_ZAC, }, + { "nokia,n810", omap2420_mux_init, OMAP_PACKAGE_ZAC, }, + { "ti,omap2430-sdp", omap2430_mux_init, OMAP_PACKAGE_ZAC, }, + { "nokia,omap3-n900", omap3_mux_init, OMAP_PACKAGE_CBB, }, + { "ti,omap3-evm-37xx", omap3_mux_init, OMAP_PACKAGE_CBB, }, + { "ti,omap3-ldp", omap3_mux_init, OMAP_PACKAGE_CBB, }, + { "ti,omap3-zoom3", omap3_mux_init, OMAP_PACKAGE_CBP, }, + { "ti,omap4-sdp", omap4_mux_init, OMAP_PACKAGE_CBS, }, + { "ti,omap4-panda", omap4_mux_init, OMAP_PACKAGE_CBS, }, + { /* sentinel */ }, +}; + +static void legacy_mux_init(void) +{ + struct board_package *pkg = packages; + + while (pkg->compatible) { + if (of_machine_is_compatible(pkg->compatible)) { + if (pkg->fn) + pkg->fn(NULL, pkg->flags); + break; + } + pkg++; + } +} + static void pdata_quirks_check(struct pdata_init *quirks) { while (quirks->compatible) { @@ -296,4 +330,5 @@ void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table) of_platform_populate(NULL, omap_dt_match_table, omap_auxdata_lookup, NULL); pdata_quirks_check(pdata_quirks); + legacy_mux_init(); } ^ permalink raw reply related [flat|nested] 32+ messages in thread
end of thread, other threads:[~2013-12-19 18:34 UTC | newest] Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-12-13 18:17 [PATCH 0/4] OMAPDSS: DT support for N900 panel Sebastian Reichel 2013-12-13 18:17 ` Sebastian Reichel 2013-12-13 18:17 ` [PATCH 1/4] OMAPDSS: Add DT support to SDI Sebastian Reichel 2013-12-13 18:17 ` Sebastian Reichel 2013-12-13 18:17 ` [PATCH 2/4] OMAPDSS: ACX565AKM: Add DT support Sebastian Reichel 2013-12-13 18:17 ` Sebastian Reichel 2013-12-13 18:17 ` [PATCH 3/4] ARM: OMAP: rx51: DT boot: disable legacy dss init Sebastian Reichel 2013-12-13 18:17 ` Sebastian Reichel 2013-12-13 18:17 ` [PATCH 4/4] ARM: dts: omap3-n900: Add display support Sebastian Reichel 2013-12-13 18:17 ` Sebastian Reichel 2013-12-17 7:37 ` [PATCH 0/4] OMAPDSS: DT support for N900 panel Tomi Valkeinen 2013-12-17 7:37 ` Tomi Valkeinen 2013-12-17 17:14 ` Sebastian Reichel 2013-12-17 17:14 ` Sebastian Reichel 2013-12-17 17:29 ` Tomi Valkeinen 2013-12-17 17:29 ` Tomi Valkeinen 2013-12-18 21:55 ` Sebastian Reichel 2013-12-18 21:55 ` Sebastian Reichel 2013-12-19 0:51 ` Sebastian Reichel 2013-12-19 0:51 ` Sebastian Reichel 2013-12-19 5:30 ` Tomi Valkeinen 2013-12-19 5:30 ` Tomi Valkeinen 2013-12-19 10:08 ` Sebastian Reichel 2013-12-19 10:08 ` Sebastian Reichel [not found] ` <20131219100840.GA923-SfvFxonMDyemK9LvCR3Hrw@public.gmane.org> 2013-12-19 13:56 ` Sebastian Reichel 2013-12-19 13:56 ` Sebastian Reichel 2013-12-19 16:42 ` Tony Lindgren 2013-12-19 16:42 ` Tony Lindgren 2013-12-19 17:00 ` Sebastian Reichel 2013-12-19 17:00 ` Sebastian Reichel 2013-12-19 18:34 ` Tony Lindgren 2013-12-19 18:34 ` Tony Lindgren
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.