linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* How to deal with a PHY configuration related to the board?
@ 2012-02-14  9:26 Ludovic Desroches
  2012-02-14  9:43 ` Baruch Siach
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Desroches @ 2012-02-14  9:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I am using a Micrel KSZ9021RN PHY and I would like to configure some registers
as 'RGMII Clock and Control Pad Skew' and 'RGMII RX Data Pad Skew'.
So the values of these registers are board dependant and I wondering what is
the proper way to set them.
It seems there is no platform data usable for this case. Having a quick look
to other PHYs, the situation seems the same.

Can you give me some clues about how to do this? Did I miss anything which
allow to do this?

Thanks

Regards

Ludovic

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to deal with a PHY configuration related to the board?
  2012-02-14  9:26 How to deal with a PHY configuration related to the board? Ludovic Desroches
@ 2012-02-14  9:43 ` Baruch Siach
  2012-02-14 10:33   ` Ludovic Desroches
  0 siblings, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2012-02-14  9:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Ludovic,

On Tue, Feb 14, 2012 at 10:26:06AM +0100, Ludovic Desroches wrote:
> I am using a Micrel KSZ9021RN PHY and I would like to configure some 
> registers
> as 'RGMII Clock and Control Pad Skew' and 'RGMII RX Data Pad Skew'.
> So the values of these registers are board dependant and I wondering what is
> the proper way to set them.
> It seems there is no platform data usable for this case. Having a quick look
> to other PHYs, the situation seems the same.
> 
> Can you give me some clues about how to do this? Did I miss anything which
> allow to do this?

See ksz9021rn_phy_fixup() in arch/arm/mach-imx/mach-imx6q.c.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to deal with a PHY configuration related to the board?
  2012-02-14  9:43 ` Baruch Siach
@ 2012-02-14 10:33   ` Ludovic Desroches
  2012-02-14 11:22     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Desroches @ 2012-02-14 10:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Baruch,

On Tue, Feb 14, 2012 at 11:43:39AM +0200, Baruch Siach wrote:
> Hi Ludovic,
> 
> On Tue, Feb 14, 2012 at 10:26:06AM +0100, Ludovic Desroches wrote:
> > I am using a Micrel KSZ9021RN PHY and I would like to configure some 
> > registers
> > as 'RGMII Clock and Control Pad Skew' and 'RGMII RX Data Pad Skew'.
> > So the values of these registers are board dependant and I wondering what is
> > the proper way to set them.
> > It seems there is no platform data usable for this case. Having a quick look
> > to other PHYs, the situation seems the same.
> > 
> > Can you give me some clues about how to do this? Did I miss anything which
> > allow to do this?
> 
> See ksz9021rn_phy_fixup() in arch/arm/mach-imx/mach-imx6q.c.
> 

Thanks for your help.

So the solution is to use phy_register_fixup function.

Regards

Ludovic

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to deal with a PHY configuration related to the board?
  2012-02-14 10:33   ` Ludovic Desroches
@ 2012-02-14 11:22     ` Jean-Christophe PLAGNIOL-VILLARD
  2012-02-14 14:01       ` Nicolas Ferre
  0 siblings, 1 reply; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-02-14 11:22 UTC (permalink / raw)
  To: linux-arm-kernel

On 11:33 Tue 14 Feb     , Ludovic Desroches wrote:
> Hi Baruch,
> 
> On Tue, Feb 14, 2012 at 11:43:39AM +0200, Baruch Siach wrote:
> > Hi Ludovic,
> > 
> > On Tue, Feb 14, 2012 at 10:26:06AM +0100, Ludovic Desroches wrote:
> > > I am using a Micrel KSZ9021RN PHY and I would like to configure some 
> > > registers
> > > as 'RGMII Clock and Control Pad Skew' and 'RGMII RX Data Pad Skew'.
> > > So the values of these registers are board dependant and I wondering what is
> > > the proper way to set them.
> > > It seems there is no platform data usable for this case. Having a quick look
> > > to other PHYs, the situation seems the same.
> > > 
> > > Can you give me some clues about how to do this? Did I miss anything which
> > > allow to do this?
> > 
> > See ksz9021rn_phy_fixup() in arch/arm/mach-imx/mach-imx6q.c.
> > 
> 
> Thanks for your help.
> 
> So the solution is to use phy_register_fixup function.
dts

Best Regards,
J.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to deal with a PHY configuration related to the board?
  2012-02-14 11:22     ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-02-14 14:01       ` Nicolas Ferre
  2012-02-16  9:51         ` Andy Fleming
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Ferre @ 2012-02-14 14:01 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/14/2012 12:22 PM, Jean-Christophe PLAGNIOL-VILLARD :
> On 11:33 Tue 14 Feb     , Ludovic Desroches wrote:
>> Hi Baruch,
>>
>> On Tue, Feb 14, 2012 at 11:43:39AM +0200, Baruch Siach wrote:
>>> Hi Ludovic,
>>>
>>> On Tue, Feb 14, 2012 at 10:26:06AM +0100, Ludovic Desroches wrote:
>>>> I am using a Micrel KSZ9021RN PHY and I would like to configure some 
>>>> registers
>>>> as 'RGMII Clock and Control Pad Skew' and 'RGMII RX Data Pad Skew'.
>>>> So the values of these registers are board dependant and I wondering what is
>>>> the proper way to set them.
>>>> It seems there is no platform data usable for this case. Having a quick look
>>>> to other PHYs, the situation seems the same.
>>>>
>>>> Can you give me some clues about how to do this? Did I miss anything which
>>>> allow to do this?
>>>
>>> See ksz9021rn_phy_fixup() in arch/arm/mach-imx/mach-imx6q.c.
>>>
>>
>> Thanks for your help.
>>
>> So the solution is to use phy_register_fixup function.
> dts

?

Can you please build sentences?

(even if I suspect to know what you are talking about ;-))

Bye,
-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to deal with a PHY configuration related to the board?
  2012-02-14 14:01       ` Nicolas Ferre
@ 2012-02-16  9:51         ` Andy Fleming
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Fleming @ 2012-02-16  9:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Feb 14, 2012 at 8:01 AM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> On 02/14/2012 12:22 PM, Jean-Christophe PLAGNIOL-VILLARD :
>> On 11:33 Tue 14 Feb ? ? , Ludovic Desroches wrote:
>>> Hi Baruch,
>>>
>>> On Tue, Feb 14, 2012 at 11:43:39AM +0200, Baruch Siach wrote:
>>>> Hi Ludovic,
>>>>
>>>> On Tue, Feb 14, 2012 at 10:26:06AM +0100, Ludovic Desroches wrote:
>>>>> I am using a Micrel KSZ9021RN PHY and I would like to configure some
>>>>> registers
>>>>> as 'RGMII Clock and Control Pad Skew' and 'RGMII RX Data Pad Skew'.
>>>>> So the values of these registers are board dependant and I wondering what is
>>>>> the proper way to set them.
>>>>> It seems there is no platform data usable for this case. Having a quick look
>>>>> to other PHYs, the situation seems the same.
>>>>>
>>>>> Can you give me some clues about how to do this? Did I miss anything which
>>>>> allow to do this?
>>>>
>>>> See ksz9021rn_phy_fixup() in arch/arm/mach-imx/mach-imx6q.c.
>>>>
>>>
>>> Thanks for your help.
>>>
>>> So the solution is to use phy_register_fixup function.

phy_register_fixup() is the appropriate method.


>> dts
>
> ?
>
> Can you please build sentences?
>
> (even if I suspect to know what you are talking about ;-))


I'm going to take this moment to grumble about the dts solution, which
is less flexible than the fixup solution, while impeding the sharing
of knowledge and code.

'RGMII Clock and Control Pad Skew' and 'RGMII RX Data Pad Skew' sound
like features that a variety of board vendors might want to configure
differently, so why not implement code which modifies those values in
the driver, and then have the board code register a fixup which calls
that code? Then we all know what's happening, and why. The "dts"
solution is just to do a series of undocumented register writes. We
are thus left unenlightened.

Andy

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-16  9:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14  9:26 How to deal with a PHY configuration related to the board? Ludovic Desroches
2012-02-14  9:43 ` Baruch Siach
2012-02-14 10:33   ` Ludovic Desroches
2012-02-14 11:22     ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-14 14:01       ` Nicolas Ferre
2012-02-16  9:51         ` Andy Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).