Thread (3 messages) 3 messages, 2 authors, 2013-09-28

Re: [PATCH 1/7] drm/exynos: move hdmiphy related code to hdmiphy driver

From: Inki Dae <inki.dae@samsung.com>
Date: 2013-09-28 16:10:42
Also in: dri-devel, linux-samsung-soc

2013/9/27 Rahul Sharma [off-list ref]
On 16 September 2013 18:10, Inki Dae [off-list ref] wrote:
quoted
CCing devicetree,
quoted
-----Original Message-----
From: Rahul Sharma [mailto:r.sh.open@gmail.com]
Sent: Tuesday, September 10, 2013 5:28 PM
To: Sean Paul
Cc: Inki Dae; Rahul Sharma; linux-samsung-soc; dri-devel; kgene.kim;
sw0312.kim; Lucas Stach; Tomasz Figa; Sylwester Nawrocki; sunil joshi;
Shirish S
Subject: Re: [PATCH 1/7] drm/exynos: move hdmiphy related code to
hdmiphy
quoted
quoted
driver

On 6 September 2013 19:21, Sean Paul [off-list ref] wrote:
quoted
On Thu, Sep 5, 2013 at 11:37 PM, Rahul Sharma [off-list ref]
wrote:
quoted
quoted
On 5 September 2013 19:20, Inki Dae [off-list ref] wrote:
quoted
quoted
-----Original Message-----
From: Sean Paul [mailto:seanpaul@chromium.org]
Sent: Thursday, September 05, 2013 10:20 PM
To: Inki Dae
Cc: Rahul Sharma; Rahul Sharma; linux-samsung-soc; dri-devel;
kgene.kim;
quoted
quoted
quoted
quoted
sw0312.kim; Lucas Stach; Tomasz Figa; Sylwester Nawrocki; sunil
joshi;
quoted
quoted
quoted
quoted
quoted
Shirish S
Subject: Re: [PATCH 1/7] drm/exynos: move hdmiphy related code to
hdmiphy
quoted
quoted
quoted
quoted
driver

On Thu, Sep 5, 2013 at 2:19 AM, Inki Dae [off-list ref]
wrote:
quoted
quoted
quoted
quoted
quoted
quoted
quoted
-----Original Message-----
From: linux-samsung-soc-owner@vger.kernel.org [mailto:linux-
samsung-
quoted
quoted
quoted
quoted
soc-
quoted
quoted
owner@vger.kernel.org] On Behalf Of Rahul Sharma
Sent: Thursday, September 05, 2013 3:04 PM
To: Inki Dae
Cc: Sean Paul; Rahul Sharma; linux-samsung-soc; dri-devel;
kgene.kim;
quoted
quoted
quoted
quoted
quoted
quoted
sw0312.kim; Lucas Stach; Tomasz Figa; Sylwester Nawrocki; sunil
joshi;
quoted
quoted
quoted
quoted
quoted
quoted
Shirish S
Subject: Re: [PATCH 1/7] drm/exynos: move hdmiphy related code
to
quoted
quoted
quoted
quoted
quoted
quoted
hdmiphy
quoted
quoted
driver

On 5 September 2013 10:52, Inki Dae [off-list ref]
wrote:
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
+static struct hdmiphy_config
hdmiphy_4210_configs[] =
quoted
quoted
{
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
+       {
+               .pixel_clock = 27000000,
+               .conf = {
+                       0x01, 0x05, 0x00, 0xD8,
0x10,
quoted
0x1C,
quoted
quoted
quoted
quoted
quoted
quoted
0x30,
quoted
quoted
quoted
quoted
0x40,
quoted
quoted
quoted
quoted
quoted
+                       0x6B, 0x10, 0x02, 0x51,
0xDF,
quoted
0xF2,
quoted
quoted
quoted
quoted
quoted
quoted
0x54,
quoted
quoted
quoted
quoted
0x87,
quoted
quoted
quoted
quoted
quoted
+                       0x84, 0x00, 0x30, 0x38,
0x00,
quoted
0x08,
quoted
quoted
quoted
quoted
quoted
quoted
0x10,
quoted
quoted
quoted
quoted
0xE0,
quoted
quoted
quoted
quoted
quoted
+                       0x22, 0x40, 0xE3, 0x26,
0x00,
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
+               },
+       },
+       {
+               .pixel_clock = 27027000,
+               .conf = {
+                       0x01, 0x05, 0x00, 0xD4,
0x10,
quoted
0x9C,
quoted
quoted
quoted
quoted
quoted
quoted
0x09,
quoted
quoted
quoted
quoted
0x64,
quoted
quoted
quoted
quoted
quoted
+                       0x6B, 0x10, 0x02, 0x51,
0xDF,
quoted
0xF2,
quoted
quoted
quoted
quoted
quoted
quoted
0x54,
quoted
quoted
quoted
quoted
0x87,
quoted
quoted
quoted
quoted
quoted
+                       0x84, 0x00, 0x30, 0x38,
0x00,
quoted
0x08,
quoted
quoted
quoted
quoted
quoted
quoted
0x10,
quoted
quoted
quoted
quoted
0xE0,
quoted
quoted
quoted
quoted
quoted
+                       0x22, 0x40, 0xE3, 0x26,
0x00,
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
+               },
+       },
+       {
+               .pixel_clock = 74176000,
+               .conf = {
+                       0x01, 0x05, 0x00, 0xD8,
0x10,
quoted
0x9C,
quoted
quoted
quoted
quoted
quoted
quoted
0xef,
quoted
quoted
quoted
quoted
0x5B,
quoted
quoted
quoted
quoted
quoted
+                       0x6D, 0x10, 0x01, 0x51,
0xef,
quoted
0xF3,
quoted
quoted
quoted
quoted
quoted
quoted
0x54,
quoted
quoted
quoted
quoted
0xb9,
quoted
quoted
quoted
quoted
quoted
+                       0x84, 0x00, 0x30, 0x38,
0x00,
quoted
0x08,
quoted
quoted
quoted
quoted
quoted
quoted
0x10,
quoted
quoted
quoted
quoted
0xE0,
quoted
quoted
quoted
quoted
quoted
+                       0x22, 0x40, 0xa5, 0x26,
0x01,
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
+               },
+       },
+       {
+               .pixel_clock = 74250000,
+               .conf = {
+                       0x01, 0x05, 0x00, 0xd8,
0x10,
quoted
0x9c,
quoted
quoted
quoted
quoted
quoted
quoted
0xf8,
quoted
quoted
quoted
quoted
0x40,
quoted
quoted
quoted
quoted
quoted
+                       0x6a, 0x10, 0x01, 0x51,
0xff,
quoted
0xf1,
quoted
quoted
quoted
quoted
quoted
quoted
0x54,
quoted
quoted
quoted
quoted
0xba,
quoted
quoted
quoted
quoted
quoted
+                       0x84, 0x00, 0x10, 0x38,
0x00,
quoted
0x08,
quoted
quoted
quoted
quoted
quoted
quoted
0x10,
quoted
quoted
quoted
quoted
0xe0,
quoted
quoted
quoted
quoted
quoted
+                       0x22, 0x40, 0xa4, 0x26,
0x01,
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
+               },
+       },
+       {
+               .pixel_clock = 148500000,
+               .conf = {
+                       0x01, 0x05, 0x00, 0xD8,
0x10,
quoted
0x9C,
quoted
quoted
quoted
quoted
quoted
quoted
0xf8,
quoted
quoted
quoted
quoted
0x40,
quoted
quoted
quoted
quoted
quoted
+                       0x6A, 0x18, 0x00, 0x51,
0xff,
quoted
0xF1,
quoted
quoted
quoted
quoted
quoted
quoted
0x54,
quoted
quoted
quoted
quoted
0xba,
quoted
quoted
quoted
quoted
quoted
+                       0x84, 0x00, 0x10, 0x38,
0x00,
quoted
0x08,
quoted
quoted
quoted
quoted
quoted
quoted
0x10,
quoted
quoted
quoted
quoted
0xE0,
quoted
quoted
quoted
quoted
quoted
+                       0x22, 0x40, 0xa4, 0x26,
0x02,
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
0x00,
quoted
quoted
quoted
quoted
quoted
+               },
+       },
+};
+
Are you aware of the effort to move these to dt?
Since
quoted
quoted
these
quoted
quoted
quoted
quoted
quoted
quoted
are
quoted
quoted
quoted
quoted
quoted
quoted
quoted
board-specific values, it seems incorrect to apply
them
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
universally.
quoted
quoted
quoted
quoted
quoted
Shirish has uploaded a patch to the chromium review
site to
quoted
quoted
quoted
quoted
quoted
quoted
push
quoted
quoted
quoted
quoted
these
quoted
quoted
quoted
into dt
(https://chromium-review.googlesource.com/#/c/65581).
quoted
quoted
quoted
quoted
quoted
Maybe
quoted
quoted
quoted
quoted
quoted
you can work that into your patch set?
Are these really board-specific values?
According to your hardware people:

"If the signal pattern doesn't change for new board, the
phy
quoted
quoted
quoted
quoted
quoted
quoted
setting
quoted
quoted
quoted
quoted
quoted
quoted
is same as the current board. But if changed, you need to
confirm
quoted
quoted
quoted
quoted
quoted
quoted
with
quoted
quoted
quoted
quoted
measurement of signals, because it may vary slightly by
resistance
quoted
quoted
of
quoted
quoted
quoted
quoted
board pattern"
Right. it seems that the phy configuration should be
adjusted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
according
quoted
quoted
to
quoted
PCB environment: OSC clock rate, 24MHz or 27MHz, could be
decided
quoted
quoted
quoted
quoted
by
quoted
quoted
PCB
quoted
quoted
quoted
even though most PCBs use 27MHz.
quoted
That indicates to me that we might need to tweak these on
a
quoted
quoted
per-
quoted
quoted
quoted
quoted
quoted
quoted
board
quoted
quoted
quoted
quoted
basis.

In the 5420 datasheet, there are a few register
descriptions
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
available
quoted
quoted
quoted
quoted
for the phy. 0x145D0004 is CLK_SEL which seems like it
would
quoted
quoted
be
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
board-specific, same with TX_* registers.
And we can select HDMI Tx PHY internal PLL input clock by
setting
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
CLK_SEL.
quoted
Ok, Shirish's patch set is reasonable to me. However, that
patch
quoted
quoted
quoted
quoted
set
quoted
quoted
quoted
quoted
should
quoted
be rebased on top of Rahul's patch set. Shirish and Rahul,
please
quoted
quoted
quoted
quoted
re-
quoted
quoted
quoted
quoted
post
quoted
your patch set after discussing how to rebase these patch
set.
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
Thanks,
Inki Dae
In that case, we need to test the phy confs for all the
exynos
quoted
quoted
quoted
quoted
quoted
quoted
boards,
quoted
quoted
quoted
quoted
supported in
mainline. Probably needs a analyser as well to precisely
compare the
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
deviation.
Shirish patch adds phy config data only to arndale and
smdk5250
quoted
quoted
quoted
quoted
quoted
quoted
boards,
quoted
quoted
and
quoted
these config data should have each board specific values.
Therefore,
quoted
quoted
quoted
quoted
for
quoted
quoted
quoted
other boards, shouldn't correct phy config data suitable to
their
quoted
quoted
quoted
quoted
boards
quoted
quoted
be
quoted
added to their board dts files? Is the above analyzer really
needed?
quoted
quoted
quoted
quoted
quoted
quoted
quoted
Sorry, I had only seen his patches for chromium tree. In
mainline
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
version, he added for 5250 as well. But both sets (for arndale
and
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
smdk) are exactly same as original 5250 configs which also works
with 4412 origen.

Some problem has been identified during conformance testing for
5420 peach board, which happens with analyser. It was always
working fine on the TV sets that I have. @Shirish/Sean please
correct me if wrong.
quoted
quoted
Shirish patch is only for 5420 Peach board. Else, to start
with
quoted
quoted
we
quoted
quoted
quoted
quoted
can
quoted
quoted
quoted
quoted
mark
phyconf as optional property which overrides the default Phy
Confs
quoted
quoted
quoted
quoted
for
quoted
quoted
quoted
quoted
given SoC.
Hm.... you mean that hdmiphy driver use the default phy config
data
quoted
quoted
quoted
quoted
in
quoted
quoted
quoted
driver; most boards use the same data, and only in special
case;
quoted
quoted
a
quoted
quoted
quoted
quoted
board
quoted
quoted
quoted
uses different OSC clock rate, the hdmiphy driver use phy
config
quoted
quoted
data
quoted
quoted
quoted
quoted
quoted
quoted
from
quoted
dts file checking hdmiphy-confs property?
Yes. I meant same. I don't see the real need to duplicate so
much
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
of data in all board dts files. We can add it for a particular
board,
quoted
quoted
quoted
quoted
if
quoted
quoted
really required.
Yes, reasonable to me. It's not good that board dts files have
same
quoted
quoted
phy
quoted
quoted
quoted
quoted
quoted
config data. How about using the phy config data from dts file if
hdmiphy-confs property exists, otherwise using default phy config
data
quoted
quoted
quoted
quoted
then?
quoted
This means that we don't need to remove the phy config data from
driver;
quoted
quoted
quoted
quoted
quoted
that will be used as default values.
Can you add the "default" configs to exynos5250.dtsi and
exynos5420.dtsi, then overwrite it in the board file if it needs to
be
quoted
quoted
quoted
quoted
different?
This will still introduce some duplication as 4412 and 5250 share
same
quoted
quoted
quoted
quoted
phy confs and have no common dtsi. Similar situation can arise for
later
quoted
quoted
SoCs in exynos series.
quoted
Good idea but how about adding default-hdmiphy-config property to
each
quoted
quoted
board
quoted
quoted
quoted
dts file and removing phy config data from board dts file if they
are
quoted
quoted
same
quoted
quoted
quoted
as default one of driver? With this, hdmiphy driver checks if
default-hdmiphy-config property exists, and then use default config
data if
quoted
quoted
quoted
exists. And if not exists, hdmiphy driver gets and uses board
specific
quoted
quoted
phy
quoted
quoted
quoted
config data from board dts file.
And it seems that the phy config values of Shirish's patch set are
same as
quoted
quoted
quoted
default ones of driver. So we can remove the phy config data from
each
quoted
quoted
board
quoted
quoted
quoted
dts files and add default-hdmiphy-config property to there so that
default
quoted
quoted
quoted
data of driver can be used.


Thanks,
Inki Dae
We can simplify it further by letting the driver use phy-conf
property from DT. If phy-conf property is not available switch to
default confs, provided in the driver. This way we don't need to add
default-hdmiphy-config property to all board files.
This is probably a worthwhile discussion to have on Shirish's patch
with devicetree-discuss. I'm unsure which is the preferred way to do
something like this.
I agree.

Shall we keep those patches for "phy conf from DT" independent to this
series? Until this phy separation patches get merged, hdmi will remain
broken for 5250 and 5420.
Sorry for being late. I was so busy.

I have pondered over whether we should use default phy config values of
driver or not. My opinion is that we need to keep the default phy config
values in dts file because the values couldn't be used as default for all
boards: the default means that all boards should work well with the
default
quoted
values, but wouldn't work. Therefore, the default values we are
discussing
quoted
are specific to some boards even though most boards work well with the
values.

So I tend to agree with Sean Paul. Let's just add the default phy config
values to each board dts file that works well even though the values are
duplicated. For this, Rahul, we could rebase your patch set on top of
Shirish's patch.

Other opinions?
Any opinion from Device-Tree folks?

IMO, we should have same consensus on Shirish patches before proceeding.
Rahul, it seems that DT people have no interest in this issue. So let's
have a consensus about this issue internally.

To Mr. Kyungmin, Sylwester, Kukjin Kim, and Tomasz,
How about keeping hdmiphy config data in each board dts file?

Thanks,
Inki Dae

Regards,
Rahul Sharma.
quoted
Thanks,
Inki Dae
quoted
regards,
Rahul Sharma.
quoted
Sean
quoted
The number of exceptions where we need to override the default confs
is zero (as if now). 5420 based Peach and Smdk boards work exactly
the same with same set of phy confs on 3 hdmi displays, I have. It
may differ on Analyser. IMO we can defer this part till we have
unacceptable analyser results for any specific board.

Regards,
Rahul Sharma.
quoted
quoted
Sean


quoted
Rahul, let's go if there is other opinion. we SHOULD MERGE these
this
quoted
quoted
quoted
quoted
quoted
time.:)

Thanks,
Inki Dae
quoted
Regards,
Rahul Sharma.
quoted
quoted
regards,
Rahul Sharma.
quoted
quoted
Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-
samsung-
quoted
quoted
soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
quoted
quoted
quoted
quoted
quoted
quoted
quoted
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help