From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Joachim Eastwood <manabian@gmail.com>
Cc: Tero Kristo <t-kristo@ti.com>,
linux-omap@vger.kernel.org, Nishanth Menon <nm@ti.com>,
"Sarha, Jyri" <jsarha@ti.com>
Subject: Re: HDMI on OMAP4460: clk rate mismatch warning
Date: Thu, 17 Apr 2014 10:24:26 +0300 [thread overview]
Message-ID: <534F81AA.8060805@ti.com> (raw)
In-Reply-To: <CAGhQ9Vx0RojsC=c8L_Dhg0u3uGRP3boiEtuq9XZPNMmEVtHWBg@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2382 bytes --]
On 16/04/14 19:11, Joachim Eastwood wrote:
> On 16 April 2014 07:40, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>> On 15/04/14 20:36, Joachim Eastwood wrote:
>>> Hello,
>>>
>>> I am trying to get HDMI work with DT on my VAR-STK-OM44 (4460) board.
>>> But during kernel boot I get the following message:
>>>
>>> [ 0.953796] ------------[ cut here ]------------
>>> [ 0.953826] WARNING: CPU: 0 PID: 1 at
>>> drivers/video/omap2/dss/dss.c:483 dss_set_fck_rate+0x7c/0x8c()
>>> [ 0.953826] clk rate mismatch: 153600000 != 170666666
>>
>> I have a fix (attached) for this in fbdev-fixes, which I'll probably be
>> sending to Linus today. I couldn't send it in the main fbdev pull
>> request, as it depended on clk driver changes. And it's not fatal, most
>> likely things work fine even with the warning.
>
> The warning disappeared after the patch. Thanks.
> Feel free to add: Tested-By: Joachim Eastwood <manabian@gmail.com>
Thanks. It should be in -rc2.
> This board (VAR-STK-OM44) has a TPD12S521 which has no controllable
> settings so adding a driver for it would be pretty meaningless. I
> think it's the same situation with Gumstix Parlor. That board also
> just have a very simple HDMI transmitter which shouldn't require a
> driver.
>
> But never the less I got HDMI working on my board adding the tpd21s015
> nodes and providing a dummy gpio for "CT CP HPD". This works but it's
> a bit hacky.
Remove the tpd21s015 nodes and try the attached patch. It adds HPD
support to the hdmi connector. You also need something like this for the
hdmi-connector node:
pinctrl-names = "default";
pinctrl-0 = <&hdmi_conn_pins>;
hpd-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; /* GPIO 193, HPD */
And the respective pinctrl node:
hdmi_conn_pins: pinmux_hdmi_conn_pins {
pinctrl-single,pins = <
0x0fe (PIN_INPUT_PULLDOWN | MUX_MODE6)
>;
};
Note that I tested this yesterday on one board, but I couldn't get it
working yet, so no promises =). But that may be an issue with the HPD
pin on the board.
> One other thing.
> Does HDMI audio work with DT or is that a still TODO?
> I am only getting probe deferral's from omap-hdmi-audio. Haven't look
> to far into it.
It's still on the works. If you volunteer for testing it (and Jyri needs
someone to test), you can ask Jyri Sarha.
Tomi
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-connector-hdmi-hpd-support.patch --]
[-- Type: text/x-diff; name="0001-connector-hdmi-hpd-support.patch", Size: 2489 bytes --]
From e004ca58936336f06339e216c1f4bd5f1e694932 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 17 Apr 2014 10:18:58 +0300
Subject: [PATCH] connector-hdmi: hpd support
---
drivers/video/omap2/displays-new/connector-hdmi.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/video/omap2/displays-new/connector-hdmi.c b/drivers/video/omap2/displays-new/connector-hdmi.c
index 29ed21b9dce5..7b06ea430209 100644
--- a/drivers/video/omap2/displays-new/connector-hdmi.c
+++ b/drivers/video/omap2/displays-new/connector-hdmi.c
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/of.h>
+#include <linux/of_gpio.h>
#include <drm/drm_edid.h>
@@ -43,6 +44,8 @@ struct panel_drv_data {
struct device *dev;
struct omap_video_timings timings;
+
+ int hpd_gpio;
};
#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
@@ -161,7 +164,10 @@ static bool hdmic_detect(struct omap_dss_device *dssdev)
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.hdmi->detect(in);
+ if (gpio_is_valid(ddata->hpd_gpio))
+ return gpio_get_value_cansleep(ddata->hpd_gpio);
+ else
+ return in->ops.hdmi->detect(in);
}
static int hdmic_audio_enable(struct omap_dss_device *dssdev)
@@ -288,6 +294,8 @@ static int hdmic_probe_pdata(struct platform_device *pdev)
pdata = dev_get_platdata(&pdev->dev);
+ ddata->hpd_gpio = -ENODEV;
+
in = omap_dss_find_output(pdata->source);
if (in == NULL) {
dev_err(&pdev->dev, "Failed to find video source\n");
@@ -307,6 +315,14 @@ static int hdmic_probe_of(struct platform_device *pdev)
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct device_node *node = pdev->dev.of_node;
struct omap_dss_device *in;
+ int gpio;
+
+ /* HPD GPIO */
+ gpio = of_get_named_gpio(node, "hpd-gpios", 0);
+ if (gpio_is_valid(gpio))
+ ddata->hpd_gpio = gpio;
+ else
+ ddata->hpd_gpio = -ENODEV;
in = omapdss_of_find_source_for_first_ep(node);
if (IS_ERR(in)) {
@@ -344,6 +360,11 @@ static int hdmic_probe(struct platform_device *pdev)
return -ENODEV;
}
+ r = devm_gpio_request_one(&pdev->dev, ddata->hpd_gpio,
+ GPIOF_DIR_IN, "hdmi_hpd");
+ if (r)
+ return r;
+
ddata->timings = hdmic_default_timings;
dssdev = &ddata->dssdev;
--
1.8.3.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-04-17 7:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 17:36 HDMI on OMAP4460: clk rate mismatch warning Joachim Eastwood
2014-04-16 5:40 ` Tomi Valkeinen
2014-04-16 16:11 ` Joachim Eastwood
2014-04-17 7:24 ` Tomi Valkeinen [this message]
2014-04-17 8:56 ` Joachim Eastwood
2014-04-17 9:11 ` Joachim Eastwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=534F81AA.8060805@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=jsarha@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=manabian@gmail.com \
--cc=nm@ti.com \
--cc=t-kristo@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox