<br><br><div class="gmail_quote">2013/9/27 Rahul Sharma <span dir="ltr"><<a href="mailto:r.sh.open@gmail.com" target="_blank">r.sh.open@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div class="HOEnZb"><div class="h5">On 16 September 2013 18:10, Inki Dae <<a href="mailto:inki.dae@samsung.com">inki.dae@samsung.com</a>> wrote:<br>
> CCing devicetree,<br>
><br>
>> -----Original Message-----<br>
>> From: Rahul Sharma [mailto:<a href="mailto:r.sh.open@gmail.com">r.sh.open@gmail.com</a>]<br>
>> Sent: Tuesday, September 10, 2013 5:28 PM<br>
>> To: Sean Paul<br>
>> Cc: Inki Dae; Rahul Sharma; linux-samsung-soc; dri-devel; kgene.kim;<br>
>> sw0312.kim; Lucas Stach; Tomasz Figa; Sylwester Nawrocki; sunil joshi;<br>
>> Shirish S<br>
>> Subject: Re: [PATCH 1/7] drm/exynos: move hdmiphy related code to hdmiphy<br>
>> driver<br>
>><br>
>> On 6 September 2013 19:21, Sean Paul <<a href="mailto:seanpaul@chromium.org">seanpaul@chromium.org</a>> wrote:<br>
>> > On Thu, Sep 5, 2013 at 11:37 PM, Rahul Sharma <<a href="mailto:r.sh.open@gmail.com">r.sh.open@gmail.com</a>><br>
>> wrote:<br>
>> >> On 5 September 2013 19:20, Inki Dae <<a href="mailto:inki.dae@samsung.com">inki.dae@samsung.com</a>> wrote:<br>
>> >>><br>
>> >>><br>
>> >>>> -----Original Message-----<br>
>> >>>> From: Sean Paul [mailto:<a href="mailto:seanpaul@chromium.org">seanpaul@chromium.org</a>]<br>
>> >>>> Sent: Thursday, September 05, 2013 10:20 PM<br>
>> >>>> To: Inki Dae<br>
>> >>>> Cc: Rahul Sharma; Rahul Sharma; linux-samsung-soc; dri-devel;<br>
>> kgene.kim;<br>
>> >>>> sw0312.kim; Lucas Stach; Tomasz Figa; Sylwester Nawrocki; sunil<br>
> joshi;<br>
>> >>>> Shirish S<br>
>> >>>> Subject: Re: [PATCH 1/7] drm/exynos: move hdmiphy related code to<br>
>> hdmiphy<br>
>> >>>> driver<br>
>> >>>><br>
>> >>>> On Thu, Sep 5, 2013 at 2:19 AM, Inki Dae <<a href="mailto:inki.dae@samsung.com">inki.dae@samsung.com</a>><br>
> wrote:<br>
>> >>>> ><br>
>> >>>> ><br>
>> >>>> >> -----Original Message-----<br>
>> >>>> >> From: <a href="mailto:linux-samsung-soc-owner@vger.kernel.org">linux-samsung-soc-owner@vger.kernel.org</a> [mailto:<a href="mailto:linux-">linux-</a><br>
>> samsung-<br>
>> >>>> soc-<br>
>> >>>> >> <a href="mailto:owner@vger.kernel.org">owner@vger.kernel.org</a>] On Behalf Of Rahul Sharma<br>
>> >>>> >> Sent: Thursday, September 05, 2013 3:04 PM<br>
>> >>>> >> To: Inki Dae<br>
>> >>>> >> Cc: Sean Paul; Rahul Sharma; linux-samsung-soc; dri-devel;<br>
>> kgene.kim;<br>
>> >>>> >> sw0312.kim; Lucas Stach; Tomasz Figa; Sylwester Nawrocki; sunil<br>
>> joshi;<br>
>> >>>> >> Shirish S<br>
>> >>>> >> Subject: Re: [PATCH 1/7] drm/exynos: move hdmiphy related code to<br>
>> >>>> hdmiphy<br>
>> >>>> >> driver<br>
>> >>>> >><br>
>> >>>> >> On 5 September 2013 10:52, Inki Dae <<a href="mailto:inki.dae@samsung.com">inki.dae@samsung.com</a>> wrote:<br>
>> >>>> >> >> >> >> >> +static struct hdmiphy_config hdmiphy_4210_configs[] =<br>
>> {<br>
>> >>>> >> >> >> >> >> +       {<br>
>> >>>> >> >> >> >> >> +               .pixel_clock = 27000000,<br>
>> >>>> >> >> >> >> >> +               .conf = {<br>
>> >>>> >> >> >> >> >> +                       0x01, 0x05, 0x00, 0xD8, 0x10,<br>
> 0x1C,<br>
>> >>>> > 0x30,<br>
>> >>>> >> >> > 0x40,<br>
>> >>>> >> >> >> >> >> +                       0x6B, 0x10, 0x02, 0x51, 0xDF,<br>
> 0xF2,<br>
>> >>>> > 0x54,<br>
>> >>>> >> >> > 0x87,<br>
>> >>>> >> >> >> >> >> +                       0x84, 0x00, 0x30, 0x38, 0x00,<br>
> 0x08,<br>
>> >>>> > 0x10,<br>
>> >>>> >> >> > 0xE0,<br>
>> >>>> >> >> >> >> >> +                       0x22, 0x40, 0xE3, 0x26, 0x00,<br>
> 0x00,<br>
>> >>>> > 0x00,<br>
>> >>>> >> >> > 0x00,<br>
>> >>>> >> >> >> >> >> +               },<br>
>> >>>> >> >> >> >> >> +       },<br>
>> >>>> >> >> >> >> >> +       {<br>
>> >>>> >> >> >> >> >> +               .pixel_clock = 27027000,<br>
>> >>>> >> >> >> >> >> +               .conf = {<br>
>> >>>> >> >> >> >> >> +                       0x01, 0x05, 0x00, 0xD4, 0x10,<br>
> 0x9C,<br>
>> >>>> > 0x09,<br>
>> >>>> >> >> > 0x64,<br>
>> >>>> >> >> >> >> >> +                       0x6B, 0x10, 0x02, 0x51, 0xDF,<br>
> 0xF2,<br>
>> >>>> > 0x54,<br>
>> >>>> >> >> > 0x87,<br>
>> >>>> >> >> >> >> >> +                       0x84, 0x00, 0x30, 0x38, 0x00,<br>
> 0x08,<br>
>> >>>> > 0x10,<br>
>> >>>> >> >> > 0xE0,<br>
>> >>>> >> >> >> >> >> +                       0x22, 0x40, 0xE3, 0x26, 0x00,<br>
> 0x00,<br>
>> >>>> > 0x00,<br>
>> >>>> >> >> > 0x00,<br>
>> >>>> >> >> >> >> >> +               },<br>
>> >>>> >> >> >> >> >> +       },<br>
>> >>>> >> >> >> >> >> +       {<br>
>> >>>> >> >> >> >> >> +               .pixel_clock = 74176000,<br>
>> >>>> >> >> >> >> >> +               .conf = {<br>
>> >>>> >> >> >> >> >> +                       0x01, 0x05, 0x00, 0xD8, 0x10,<br>
> 0x9C,<br>
>> >>>> > 0xef,<br>
>> >>>> >> >> > 0x5B,<br>
>> >>>> >> >> >> >> >> +                       0x6D, 0x10, 0x01, 0x51, 0xef,<br>
> 0xF3,<br>
>> >>>> > 0x54,<br>
>> >>>> >> >> > 0xb9,<br>
>> >>>> >> >> >> >> >> +                       0x84, 0x00, 0x30, 0x38, 0x00,<br>
> 0x08,<br>
>> >>>> > 0x10,<br>
>> >>>> >> >> > 0xE0,<br>
>> >>>> >> >> >> >> >> +                       0x22, 0x40, 0xa5, 0x26, 0x01,<br>
> 0x00,<br>
>> >>>> > 0x00,<br>
>> >>>> >> >> > 0x00,<br>
>> >>>> >> >> >> >> >> +               },<br>
>> >>>> >> >> >> >> >> +       },<br>
>> >>>> >> >> >> >> >> +       {<br>
>> >>>> >> >> >> >> >> +               .pixel_clock = 74250000,<br>
>> >>>> >> >> >> >> >> +               .conf = {<br>
>> >>>> >> >> >> >> >> +                       0x01, 0x05, 0x00, 0xd8, 0x10,<br>
> 0x9c,<br>
>> >>>> > 0xf8,<br>
>> >>>> >> >> > 0x40,<br>
>> >>>> >> >> >> >> >> +                       0x6a, 0x10, 0x01, 0x51, 0xff,<br>
> 0xf1,<br>
>> >>>> > 0x54,<br>
>> >>>> >> >> > 0xba,<br>
>> >>>> >> >> >> >> >> +                       0x84, 0x00, 0x10, 0x38, 0x00,<br>
> 0x08,<br>
>> >>>> > 0x10,<br>
>> >>>> >> >> > 0xe0,<br>
>> >>>> >> >> >> >> >> +                       0x22, 0x40, 0xa4, 0x26, 0x01,<br>
> 0x00,<br>
>> >>>> > 0x00,<br>
>> >>>> >> >> > 0x00,<br>
>> >>>> >> >> >> >> >> +               },<br>
>> >>>> >> >> >> >> >> +       },<br>
>> >>>> >> >> >> >> >> +       {<br>
>> >>>> >> >> >> >> >> +               .pixel_clock = 148500000,<br>
>> >>>> >> >> >> >> >> +               .conf = {<br>
>> >>>> >> >> >> >> >> +                       0x01, 0x05, 0x00, 0xD8, 0x10,<br>
> 0x9C,<br>
>> >>>> > 0xf8,<br>
>> >>>> >> >> > 0x40,<br>
>> >>>> >> >> >> >> >> +                       0x6A, 0x18, 0x00, 0x51, 0xff,<br>
> 0xF1,<br>
>> >>>> > 0x54,<br>
>> >>>> >> >> > 0xba,<br>
>> >>>> >> >> >> >> >> +                       0x84, 0x00, 0x10, 0x38, 0x00,<br>
> 0x08,<br>
>> >>>> > 0x10,<br>
>> >>>> >> >> > 0xE0,<br>
>> >>>> >> >> >> >> >> +                       0x22, 0x40, 0xa4, 0x26, 0x02,<br>
> 0x00,<br>
>> >>>> > 0x00,<br>
>> >>>> >> >> > 0x00,<br>
>> >>>> >> >> >> >> >> +               },<br>
>> >>>> >> >> >> >> >> +       },<br>
>> >>>> >> >> >> >> >> +};<br>
>> >>>> >> >> >> >> >> +<br>
>> >>>> >> >> >> >> ><br>
>> >>>> >> >> >> >> > Are you aware of the effort to move these to dt? Since<br>
>> these<br>
>> >>>> >> are<br>
>> >>>> >> >> >> >> > board-specific values, it seems incorrect to apply them<br>
>> >>>> >> >> universally.<br>
>> >>>> >> >> >> >> > Shirish has uploaded a patch to the chromium review<br>
>> site to<br>
>> >>>> >> push<br>
>> >>>> >> >> >> these<br>
>> >>>> >> >> >> >> > into dt<br>
>> >>> (<a href="https://chromium-review.googlesource.com/#/c/65581" target="_blank">https://chromium-review.googlesource.com/#/c/65581</a>).<br>
>> >>>> >> >> Maybe<br>
>> >>>> >> >> >> >> > you can work that into your patch set?<br>
>> >>>> >> >> >> >> ><br>
>> >>>> >> >> >> ><br>
>> >>>> >> >> >> > Are these really board-specific values?<br>
>> >>>> >> >> >><br>
>> >>>> >> >> >> According to your hardware people:<br>
>> >>>> >> >> >><br>
>> >>>> >> >> >> "If the signal pattern doesn't change for new board, the phy<br>
>> >>>> setting<br>
>> >>>> >> >> >> is same as the current board. But if changed, you need to<br>
>> confirm<br>
>> >>>> >> with<br>
>> >>>> >> >> >> measurement of signals, because it may vary slightly by<br>
>> >>>> resistance<br>
>> >>>> >> of<br>
>> >>>> >> >> >> board pattern"<br>
>> >>>> >> >> >><br>
>> >>>> >> >> ><br>
>> >>>> >> >> > Right. it seems that the phy configuration should be adjusted<br>
>> >>>> >> according<br>
>> >>>> >> >> to<br>
>> >>>> >> >> > PCB environment: OSC clock rate, 24MHz or 27MHz, could be<br>
>> decided<br>
>> >>>> by<br>
>> >>>> >> PCB<br>
>> >>>> >> >> > even though most PCBs use 27MHz.<br>
>> >>>> >> >> ><br>
>> >>>> >> >> >> That indicates to me that we might need to tweak these on a<br>
>> per-<br>
>> >>>> >> board<br>
>> >>>> >> >> >> basis.<br>
>> >>>> >> >> >><br>
>> >>>> >> >> >> In the 5420 datasheet, there are a few register descriptions<br>
>> >>>> >> available<br>
>> >>>> >> >> >> for the phy. 0x145D0004 is CLK_SEL which seems like it would<br>
>> be<br>
>> >>>> >> >> >> board-specific, same with TX_* registers.<br>
>> >>>> >> >> >><br>
>> >>>> >> >> ><br>
>> >>>> >> >> > And we can select HDMI Tx PHY internal PLL input clock by<br>
>> setting<br>
>> >>>> >> >> CLK_SEL.<br>
>> >>>> >> >> > Ok, Shirish's patch set is reasonable to me. However, that<br>
>> patch<br>
>> >>>> set<br>
>> >>>> >> >> should<br>
>> >>>> >> >> > be rebased on top of Rahul's patch set. Shirish and Rahul,<br>
>> please<br>
>> >>>> re-<br>
>> >>>> >> >> post<br>
>> >>>> >> >> > your patch set after discussing how to rebase these patch<br>
> set.<br>
>> >>>> >> >> ><br>
>> >>>> >> >> > Thanks,<br>
>> >>>> >> >> > Inki Dae<br>
>> >>>> >> >> ><br>
>> >>>> >> >><br>
>> >>>> >> >> In that case, we need to test the phy confs for all the exynos<br>
>> >>>> boards,<br>
>> >>>> >> >> supported in<br>
>> >>>> >> >> mainline. Probably needs a analyser as well to precisely<br>
>> compare the<br>
>> >>>> >> >> deviation.<br>
>> >>>> >> ><br>
>> >>>> >> > Shirish patch adds phy config data only to arndale and smdk5250<br>
>> >>>> boards,<br>
>> >>>> >> and<br>
>> >>>> >> > these config data should have each board specific values.<br>
>> Therefore,<br>
>> >>>> for<br>
>> >>>> >> > other boards, shouldn't correct phy config data suitable to<br>
>> their<br>
>> >>>> boards<br>
>> >>>> >> be<br>
>> >>>> >> > added to their board dts files? Is the above analyzer really<br>
>> needed?<br>
>> >>>> >> ><br>
>> >>>> >><br>
>> >>>> >> Sorry, I had only seen his patches for chromium tree. In mainline<br>
>> >>>> >> version, he added for 5250 as well. But both sets (for arndale and<br>
>> >>>> >> smdk) are exactly same as original 5250 configs which also works<br>
>> >>>> >> with 4412 origen.<br>
>> >>>> >><br>
>> >>>> >> Some problem has been identified during conformance testing for<br>
>> >>>> >> 5420 peach board, which happens with analyser. It was always<br>
>> >>>> >> working fine on the TV sets that I have. @Shirish/Sean please<br>
>> >>>> >> correct me if wrong.<br>
>> >>>> >><br>
>> >>>> >> >> Shirish patch is only for 5420 Peach board. Else, to start with<br>
>> we<br>
>> >>>> can<br>
>> >>>> >> >> mark<br>
>> >>>> >> >> phyconf as optional property which overrides the default Phy<br>
>> Confs<br>
>> >>>> for<br>
>> >>>> >> >> given SoC.<br>
>> >>>> >> ><br>
>> >>>> >> > Hm.... you mean that hdmiphy driver use the default phy config<br>
>> data<br>
>> >>>> in<br>
>> >>>> >> > driver; most boards use the same data, and only in special case;<br>
>> a<br>
>> >>>> board<br>
>> >>>> >> > uses different OSC clock rate, the hdmiphy driver use phy config<br>
>> data<br>
>> >>>> >> from<br>
>> >>>> >> > dts file checking hdmiphy-confs property?<br>
>> >>>> >> ><br>
>> >>>> >><br>
>> >>>> >> Yes. I meant same. I don't see the real need to duplicate so much<br>
>> >>>> >> of data in all board dts files. We can add it for a particular<br>
>> board,<br>
>> >>>> if<br>
>> >>>> >> really required.<br>
>> >>>> >><br>
>> >>>> ><br>
>> >>>> > Yes, reasonable to me. It's not good that board dts files have same<br>
>> phy<br>
>> >>>> > config data. How about using the phy config data from dts file if<br>
>> >>>> > hdmiphy-confs property exists, otherwise using default phy config<br>
>> data<br>
>> >>>> then?<br>
>> >>>> > This means that we don't need to remove the phy config data from<br>
>> driver;<br>
>> >>>> > that will be used as default values.<br>
>> >>>> ><br>
>> >>>><br>
>> >>>> Can you add the "default" configs to exynos5250.dtsi and<br>
>> >>>> exynos5420.dtsi, then overwrite it in the board file if it needs to<br>
>> be<br>
>> >>>> different?<br>
>> >>>><br>
>> >><br>
>> >> This will still introduce some duplication as 4412 and 5250 share same<br>
>> >> phy confs and have no common dtsi. Similar situation can arise for<br>
>> later<br>
>> >> SoCs in exynos series.<br>
>> >><br>
>> >>><br>
>> >>> Good idea but how about adding default-hdmiphy-config property to each<br>
>> board<br>
>> >>> dts file and removing phy config data from board dts file if they are<br>
>> same<br>
>> >>> as default one of driver? With this, hdmiphy driver checks if<br>
>> >>> default-hdmiphy-config property exists, and then use default config<br>
>> data if<br>
>> >>> exists. And if not exists, hdmiphy driver gets and uses board specific<br>
>> phy<br>
>> >>> config data from board dts file.<br>
>> >>> And it seems that the phy config values of Shirish's patch set are<br>
>> same as<br>
>> >>> default ones of driver. So we can remove the phy config data from each<br>
>> board<br>
>> >>> dts files and add default-hdmiphy-config property to there so that<br>
>> default<br>
>> >>> data of driver can be used.<br>
>> >>><br>
>> >>><br>
>> >>> Thanks,<br>
>> >>> Inki Dae<br>
>> >>><br>
>> >><br>
>> >> We can simplify it further by letting the driver use phy-conf<br>
>> >> property from DT. If phy-conf property is not available switch to<br>
>> >> default confs, provided in the driver. This way we don't need to add<br>
>> >> default-hdmiphy-config property to all board files.<br>
>> >><br>
>> ><br>
>> > This is probably a worthwhile discussion to have on Shirish's patch<br>
>> > with devicetree-discuss. I'm unsure which is the preferred way to do<br>
>> > something like this.<br>
>><br>
>> I agree.<br>
>><br>
>> Shall we keep those patches for "phy conf from DT" independent to this<br>
>> series? Until this phy separation patches get merged, hdmi will remain<br>
>> broken for 5250 and 5420.<br>
>><br>
><br>
> Sorry for being late. I was so busy.<br>
><br>
> I have pondered over whether we should use default phy config values of<br>
> driver or not. My opinion is that we need to keep the default phy config<br>
> values in dts file because the values couldn't be used as default for all<br>
> boards: the default means that all boards should work well with the default<br>
> values, but wouldn't work. Therefore, the default values we are discussing<br>
> are specific to some boards even though most boards work well with the<br>
> values.<br>
><br>
> So I tend to agree with Sean Paul. Let's just add the default phy config<br>
> values to each board dts file that works well even though the values are<br>
> duplicated. For this, Rahul, we could rebase your patch set on top of<br>
> Shirish's patch.<br>
><br>
> Other opinions?<br>
><br>
<br>
</div></div>Any opinion from Device-Tree folks?<br>
<br>
IMO, we should have same consensus on Shirish patches before proceeding.<br>
<br></blockquote><div> </div><div>Rahul, it seems that DT people have no interest in this issue. So let's have a consensus about this issue internally.</div><div> </div><div>To Mr. Kyungmin, Sylwester, Kukjin Kim, and Tomasz,</div>
<div>How about keeping hdmiphy config data in each board dts file?</div><div> </div><div>Thanks,</div><div>Inki Dae </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">

Regards,<br>
Rahul Sharma.<br>
<div class="HOEnZb"><div class="h5"><br>
> Thanks,<br>
> Inki Dae<br>
><br>
>> regards,<br>
>> Rahul Sharma.<br>
>><br>
>> ><br>
>> > Sean<br>
>> ><br>
>> >> The number of exceptions where we need to override the default confs<br>
>> >> is zero (as if now). 5420 based Peach and Smdk boards work exactly<br>
>> >> the same with same set of phy confs on 3 hdmi displays, I have. It<br>
>> >> may differ on Analyser. IMO we can defer this part till we have<br>
>> >> unacceptable analyser results for any specific board.<br>
>> >><br>
>> >> Regards,<br>
>> >> Rahul Sharma.<br>
>> >><br>
>> >>>> Sean<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> > Rahul, let's go if there is other opinion. we SHOULD MERGE these<br>
>> this<br>
>> >>>> > time.:)<br>
>> >>>> ><br>
>> >>>> > Thanks,<br>
>> >>>> > Inki Dae<br>
>> >>>> ><br>
>> >>>> >> Regards,<br>
>> >>>> >> Rahul Sharma.<br>
>> >>>> >><br>
>> >>>> >> ><br>
>> >>>> >> >><br>
>> >>>> >> >> regards,<br>
>> >>>> >> >> Rahul Sharma.<br>
>> >>>> >> >><br>
>> >>>> >> >> >> Sean<br>
>> >>>> >> >> >><br>
>> >>>> >> >> >><br>
>> >>>> >> ><br>
>> >>>> >> --<br>
>> >>>> >> To unsubscribe from this list: send the line "unsubscribe linux-<br>
>> >>>> samsung-<br>
>> >>>> >> soc" in<br>
>> >>>> >> the body of a message to <a href="mailto:majordomo@vger.kernel.org">majordomo@vger.kernel.org</a><br>
>> >>>> >> More majordomo info at  <a href="http://vger.kernel.org/majordomo-info.html" target="_blank">http://vger.kernel.org/majordomo-info.html</a><br>
>> >>>> ><br>
>> >>><br>
><br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</div></div></blockquote></div><br>