netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Raju Lakkaraju <Raju.Lakkaraju-dzo6w/eZyo2tG0bUXCXiUA@public.gmane.org>
To: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
Cc: <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	<Allan.Nielsen-dzo6w/eZyo2tG0bUXCXiUA@public.gmane.org>
Subject: Re: [PATCH v4 net-next] net: phy: Add Edge-rate driver for Microsemi PHYs.
Date: Mon, 3 Oct 2016 14:53:35 +0530	[thread overview]
Message-ID: <20161003092333.GA24705@microsemi.com> (raw)
In-Reply-To: <20161003075656.GC18219-g2DYL2Zd6BY@public.gmane.org>

Hi Andrew,


On Mon, Oct 03, 2016 at 09:56:56AM +0200, Andrew Lunn wrote:
> EXTERNAL EMAIL
> 
> 
> > > > +        vsc8531_0: ethernet-phy@0 {
> > > > +                compatible = "ethernet-phy-id0007.0570";
> > > > +                vsc8531,vddmac               = /bits/ 16 <MSCC_VDDMAC_3300>;
> > > > +                vsc8531,edge-slowdown        = /bits/ 8  <17>;
> > >
> > > No, real values please:
> > >
> > >                 vsc8531,vddmac          = <2000>;
> > >                 vsc8531,edge-slowdown   = <21>;
> > >
> > > The driver should then do the maths to figure out the nearest magic
> > > value to write to the register, or complain the settings are out of
> > > range with an -EINVAL.
> 
> I think you missed my point. Notice my example does not use values
> from the table. Is there a reason not to use the PHY with 2000mv? Or
> does it break when you don't use one of the 4 listed voltages?
> 
As per PHY data sheet, It should use one of the voltage in list.
i.e. 3.3V (3300 mV) or 2.5V (2500 mV) or 1.8V (1800 mV) or 1.5V (1500).
Other voltages are not accepted. Drivr considers default as 3.3V (3300 mV).

> I was wanting you to implement some formula, which given the voltage
> and percentage slowdown, returns the magic number. Hence the comment:
> 

Based on Voltage selection and percentage slowdown, Driver pick the
magic number from Edge rate table.

> > > FYI: No floating point maths are allowed in the kernel.
> 
> You need to do integer arithmetic, which is why i suggested mV, not V.
> 
I understood your suggestion and used voltage in milli Volts.

>   Andrew

Thanks,
Raju.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2016-10-03  9:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 11:34 [PATCH v4 net-next] net: phy: Add Edge-rate driver for Microsemi PHYs Raju Lakkaraju
2016-09-28 16:16 ` Andrew Lunn
     [not found]   ` <20160928161653.GA25553-g2DYL2Zd6BY@public.gmane.org>
2016-10-03  7:20     ` Raju Lakkaraju
2016-10-03  7:56       ` Andrew Lunn
     [not found]         ` <20161003075656.GC18219-g2DYL2Zd6BY@public.gmane.org>
2016-10-03  9:23           ` Raju Lakkaraju [this message]

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=20161003092333.GA24705@microsemi.com \
    --to=raju.lakkaraju-dzo6w/ezyo2tg0buxcxiua@public.gmane.org \
    --cc=Allan.Nielsen-dzo6w/eZyo2tG0bUXCXiUA@public.gmane.org \
    --cc=andrew-g2DYL2Zd6BY@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).