RE: [PATCH] [PATCH v3] phy: add phy hisi inno usb2

From: Lipengcheng
Date: Sat Jul 30 2016 - 03:53:23 EST




> -----Original Message-----
> From: Rob Herring [mailto:robh+dt@xxxxxxxxxx]
> Sent: Monday, July 25, 2016 11:26 PM
> To: Lipengcheng
> Cc: Kishon Vijay Abraham I; Mark Rutland; linux-kernel@xxxxxxxxxxxxxxx; Xuejiancheng; Lidongpo; Zhangzhenxing (Christian, Device ChipSet)
> Subject: Re: [PATCH] [PATCH v3] phy: add phy hisi inno usb2
>
> On Mon, Jul 25, 2016 at 8:50 AM, Pengcheng Li <lpc.li@xxxxxxxxxxxxx> wrote:
> > Add support for inno usb2 phy integrated on some hisilicon SOCs.
>
> Bindings need to be sent to DT list.
Ok. I will send to DT list.
>
> >
> > Signed-off-by: Pengcheng Li <lpc.li@xxxxxxxxxxxxx>
> > ---
> > change log:
> > v3:
> > 1. inno phy do not use phy framework, remove it.
> > ---
> > .../devicetree/bindings/phy/phy-hisi-inno-usb2.txt | 48 ++++
> > drivers/phy/Kconfig | 10 +
> > drivers/phy/Makefile | 1 +
> > drivers/phy/phy-hisi-inno-usb2.c | 290 +++++++++++++++++++++
> > 4 files changed, 349 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/phy/phy-hisi-inno-usb2.txt
> > create mode 100644 drivers/phy/phy-hisi-inno-usb2.c
> >
> > diff --git
> > a/Documentation/devicetree/bindings/phy/phy-hisi-inno-usb2.txt
> > b/Documentation/devicetree/bindings/phy/phy-hisi-inno-usb2.txt
> > new file mode 100644
> > index 0000000..59eaf73
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/phy/phy-hisi-inno-usb2.txt
> > @@ -0,0 +1,48 @@
> > +HiSilicon INNO USB2 PHY
> > +-----------------------
> > +Required properties:
> > +- compatible: Should be "hisilicon,inno_usb2_phy"
>
> Use '-', not '_'.
I will modify it in next patch.
- compatible: Should be "hisilicon,inno-usb2-phy"
>
> > +- #phy-cells: Must be 0
> > +- hisilicon,peripheral-syscon: Phandle of syscon used to control phy.
> > +- hisilicon,reg-num: Number of phy registers which should be
> > +configured at phy intialization stage
> > +- hisilicon,reg-seq: Sequence of triplets of (address, value, delay-us).
> > +The number of triplets is equal to "hisilicon,reg-num". Each triplet
> > +is used to write one phy register. The delay-us cell represents the
> > +delay time in microseconds to be applied after each write.
>
> Don't create a scripting language in DT. The programming needed should be defined by the compatible string and possibly some specific
> properties of things that vary board to board.....
Before Inno phy releases, it usually need to config many parameters and the parameters are different in different Socs. Creating a scripting language in DT can be a good solution to this problem. So I hope to use the DTS to pass the parameters.
>
> Rob