diff mbox

[1/2] phy: dt-binding: document Conexant Digicolor USB PHY

Message ID 6284a7672647d46100281959552f9787f98bb552.1427430989.git.baruch@tkos.co.il
State Needs Review / ACK, archived
Headers show

Checks

Context Check Description
robh/checkpatch warning total: 1 errors, 0 warnings, 0 lines checked
robh/patch-applied success

Commit Message

Baruch Siach March 27, 2015, 4:36 a.m. UTC
Add a device tree binding documentation to the USB PHY hardware block on the
Conexant CX92755 SoC. The CX92755 is one of the Digicolor SoCs series. Other
SoCs in that series may share the same hardware block.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 .../devicetree/bindings/phy/digicolor-usb-phy.txt         | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/digicolor-usb-phy.txt

Comments

Marek Vasut March 28, 2015, 3:33 p.m. UTC | #1
On Friday, March 27, 2015 at 05:36:29 AM, Baruch Siach wrote:
> Add a driver for the USB PHY on the Conexant CX92755 SoC, from the
> Digicolor series of SoCs. The PHY is connected to the on-chip chipidea
> usb2 host.
> 
> The hardware is somewhat similar to the phy-mxs-usb.c usb_phy, but it is
> different enough to merit its own driver. Also, this driver uses the
> generic phy infrastructure.

Hi,

the register set looks very similar to MXS one indeed. How is it different 
please ?

The driver looks OK.

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Baruch Siach March 31, 2015, 11:34 a.m. UTC | #2
Hi Marek,

On Sat, Mar 28, 2015 at 04:33:02PM +0100, Marek Vasut wrote:
> On Friday, March 27, 2015 at 05:36:29 AM, Baruch Siach wrote:
> > Add a driver for the USB PHY on the Conexant CX92755 SoC, from the
> > Digicolor series of SoCs. The PHY is connected to the on-chip chipidea
> > usb2 host.
> > 
> > The hardware is somewhat similar to the phy-mxs-usb.c usb_phy, but it is
> > different enough to merit its own driver. Also, this driver uses the
> > generic phy infrastructure.
> 
> the register set looks very similar to MXS one indeed. How is it different 
> please ?

Almost of the bits that are defined in the MXS USBPHY_CTRL register are not 
defined in the Digicolor one. Some have different meaning, and some are 
reserved. OTOH, the Digicolor USBPHY_CTRL register uses all bits in the 1-13 
range. Also, the Digicolor phy does not have anatop registers.

> The driver looks OK.

Thanks.

BTW, do you know why the phy-mxs-usb driver calls its init from 
postcore_initcall? Is there a special need to register the driver so early?

baruch
Kishon Vijay Abraham I March 31, 2015, 3:26 p.m. UTC | #3
Hi,

On Tuesday 31 March 2015 05:04 PM, Baruch Siach wrote:
> Hi Marek,
>
> On Sat, Mar 28, 2015 at 04:33:02PM +0100, Marek Vasut wrote:
>> On Friday, March 27, 2015 at 05:36:29 AM, Baruch Siach wrote:
>>> Add a driver for the USB PHY on the Conexant CX92755 SoC, from the
>>> Digicolor series of SoCs. The PHY is connected to the on-chip chipidea
>>> usb2 host.
>>>
>>> The hardware is somewhat similar to the phy-mxs-usb.c usb_phy, but it is
>>> different enough to merit its own driver. Also, this driver uses the
>>> generic phy infrastructure.
>>
>> the register set looks very similar to MXS one indeed. How is it different
>> please ?
>
> Almost of the bits that are defined in the MXS USBPHY_CTRL register are not
> defined in the Digicolor one. Some have different meaning, and some are
> reserved. OTOH, the Digicolor USBPHY_CTRL register uses all bits in the 1-13
> range. Also, the Digicolor phy does not have anatop registers.

I think we should try adding support for this in the same driver.

Thanks
Kishon
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Baruch Siach March 31, 2015, 3:41 p.m. UTC | #4
Hi Kishon,

On Tue, Mar 31, 2015 at 08:56:54PM +0530, Kishon Vijay Abraham I wrote:
> On Tuesday 31 March 2015 05:04 PM, Baruch Siach wrote:
> >On Sat, Mar 28, 2015 at 04:33:02PM +0100, Marek Vasut wrote:
> >>On Friday, March 27, 2015 at 05:36:29 AM, Baruch Siach wrote:
> >>>Add a driver for the USB PHY on the Conexant CX92755 SoC, from the
> >>>Digicolor series of SoCs. The PHY is connected to the on-chip chipidea
> >>>usb2 host.
> >>>
> >>>The hardware is somewhat similar to the phy-mxs-usb.c usb_phy, but it is
> >>>different enough to merit its own driver. Also, this driver uses the
> >>>generic phy infrastructure.
> >>
> >>the register set looks very similar to MXS one indeed. How is it different
> >>please ?
> >
> >Almost of the bits that are defined in the MXS USBPHY_CTRL register are not
> >defined in the Digicolor one. Some have different meaning, and some are
> >reserved. OTOH, the Digicolor USBPHY_CTRL register uses all bits in the 1-13
> >range. Also, the Digicolor phy does not have anatop registers.
> 
> I think we should try adding support for this in the same driver.

The only code that can actually be shared between the driver is the two lines 
usb_phy .on_connect callback routine. The init sequence that takes most of the 
digicolor driver is totally different. Using a single driver for both PHYs 
does not make much sense, IMHO.

Besides, phy-mxs-usb.c uses the deprecated usb_phy framework. So we first need 
to port this driver to the generic phy framework.

baruch
Kishon Vijay Abraham I March 31, 2015, 3:46 p.m. UTC | #5
Hi,

On Tuesday 31 March 2015 09:11 PM, Baruch Siach wrote:
> Hi Kishon,
>
> On Tue, Mar 31, 2015 at 08:56:54PM +0530, Kishon Vijay Abraham I wrote:
>> On Tuesday 31 March 2015 05:04 PM, Baruch Siach wrote:
>>> On Sat, Mar 28, 2015 at 04:33:02PM +0100, Marek Vasut wrote:
>>>> On Friday, March 27, 2015 at 05:36:29 AM, Baruch Siach wrote:
>>>>> Add a driver for the USB PHY on the Conexant CX92755 SoC, from the
>>>>> Digicolor series of SoCs. The PHY is connected to the on-chip chipidea
>>>>> usb2 host.
>>>>>
>>>>> The hardware is somewhat similar to the phy-mxs-usb.c usb_phy, but it is
>>>>> different enough to merit its own driver. Also, this driver uses the
>>>>> generic phy infrastructure.
>>>>
>>>> the register set looks very similar to MXS one indeed. How is it different
>>>> please ?
>>>
>>> Almost of the bits that are defined in the MXS USBPHY_CTRL register are not
>>> defined in the Digicolor one. Some have different meaning, and some are
>>> reserved. OTOH, the Digicolor USBPHY_CTRL register uses all bits in the 1-13
>>> range. Also, the Digicolor phy does not have anatop registers.
>>
>> I think we should try adding support for this in the same driver.
>
> The only code that can actually be shared between the driver is the two lines
> usb_phy .on_connect callback routine. The init sequence that takes most of the
> digicolor driver is totally different. Using a single driver for both PHYs
> does not make much sense, IMHO.
>
> Besides, phy-mxs-usb.c uses the deprecated usb_phy framework. So we first need
> to port this driver to the generic phy framework.

Doesn't your driver also use the usb_phy framework?

-Kishon
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Baruch Siach March 31, 2015, 6:42 p.m. UTC | #6
Hi Kishon,

On Tue, Mar 31, 2015 at 09:16:40PM +0530, Kishon Vijay Abraham I wrote:
> On Tuesday 31 March 2015 09:11 PM, Baruch Siach wrote:
> >On Tue, Mar 31, 2015 at 08:56:54PM +0530, Kishon Vijay Abraham I wrote:
> >>On Tuesday 31 March 2015 05:04 PM, Baruch Siach wrote:
> >>>On Sat, Mar 28, 2015 at 04:33:02PM +0100, Marek Vasut wrote:
> >>>>On Friday, March 27, 2015 at 05:36:29 AM, Baruch Siach wrote:
> >>>>>Add a driver for the USB PHY on the Conexant CX92755 SoC, from the
> >>>>>Digicolor series of SoCs. The PHY is connected to the on-chip chipidea
> >>>>>usb2 host.
> >>>>>
> >>>>>The hardware is somewhat similar to the phy-mxs-usb.c usb_phy, but it is
> >>>>>different enough to merit its own driver. Also, this driver uses the
> >>>>>generic phy infrastructure.
> >>>>
> >>>>the register set looks very similar to MXS one indeed. How is it different
> >>>>please ?
> >>>
> >>>Almost of the bits that are defined in the MXS USBPHY_CTRL register are not
> >>>defined in the Digicolor one. Some have different meaning, and some are
> >>>reserved. OTOH, the Digicolor USBPHY_CTRL register uses all bits in the 1-13
> >>>range. Also, the Digicolor phy does not have anatop registers.
> >>
> >>I think we should try adding support for this in the same driver.
> >
> >The only code that can actually be shared between the driver is the two lines
> >usb_phy .on_connect callback routine. The init sequence that takes most of the
> >digicolor driver is totally different. Using a single driver for both PHYs
> >does not make much sense, IMHO.
> >
> >Besides, phy-mxs-usb.c uses the deprecated usb_phy framework. So we first need
> >to port this driver to the generic phy framework.
> 
> Doesn't your driver also use the usb_phy framework?

My driver uses usb_phy only for the .notify_connect/.notify_disconnect 
callbacks, since there is no comparable functionality in the generic phy 
framework. But it doesn't make this driver any more similar to phy-mxs-usb.

My point is that merging the drives would require migrating phy-mxs-usb to 
generic phy. But this is just an added complication. The main reason I think 
the drivers should be separate is because they have very little in common, 
regardless of the framework they are using.

baruch
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/phy/digicolor-usb-phy.txt b/Documentation/devicetree/bindings/phy/digicolor-usb-phy.txt
new file mode 100644
index 000000000000..089f218c59c9
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/digicolor-usb-phy.txt
@@ -0,0 +1,15 @@ 
+Conexant Digicolor USB2 PHY
+
+Required properties:
+ - compatible: cnxt,cx92755-usbphy
+ - reg: offset and length of the PHY registers
+ - #phy-cells: must be 0
+Refer to phy-bindings.txt for the generic PHY binding properties
+
+Example:
+
+	usb_phy0: usb-phy@f0084000 {
+		compatible = "cnxt,cx92755-usbphy";
+		reg = <0xf0084000 0x100>;
+		#phy-cells = <0>;
+	};