diff mbox series

[1/6] phy: sun4i-usb: add support for R40 USB PHY

Message ID 20171008042906.46779-2-icenowy@aosc.io
State Not Applicable, archived
Headers show
Series Allwinner R40 USB host support | expand

Commit Message

Icenowy Zheng Oct. 8, 2017, 4:29 a.m. UTC
Allwinner R40 features a USB PHY like the one in A64, but with 3 PHYs.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt |  1 +
 drivers/phy/allwinner/phy-sun4i-usb.c                   | 12 ++++++++++++
 2 files changed, 13 insertions(+)

Comments

Maxime Ripard Oct. 9, 2017, 8:58 p.m. UTC | #1
On Sun, Oct 08, 2017 at 04:29:01AM +0000, Icenowy Zheng wrote:
> Allwinner R40 features a USB PHY like the one in A64, but with 3 PHYs.
> 
> Add support for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Maxime
Rob Herring Oct. 13, 2017, 7:29 p.m. UTC | #2
On Sun, Oct 08, 2017 at 12:29:01PM +0800, Icenowy Zheng wrote:
> Allwinner R40 features a USB PHY like the one in A64, but with 3 PHYs.
> 
> Add support for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt |  1 +
>  drivers/phy/allwinner/phy-sun4i-usb.c                   | 12 ++++++++++++
>  2 files changed, 13 insertions(+)

Acked-by: Rob Herring <robh@kernel.org>
--
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
Kishon Vijay Abraham I Oct. 18, 2017, 11:39 a.m. UTC | #3
Hi,

On Tuesday 10 October 2017 02:28 AM, Maxime Ripard wrote:
> On Sun, Oct 08, 2017 at 04:29:01AM +0000, Icenowy Zheng wrote:
>> Allwinner R40 features a USB PHY like the one in A64, but with 3 PHYs.
>>
>> Add support for it.
>>
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> 
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Is this patch good to be merged? I see you have pending comments on the other
patch in the series.

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
Maxime Ripard Oct. 18, 2017, 11:42 a.m. UTC | #4
On Wed, Oct 18, 2017 at 05:09:00PM +0530, Kishon Vijay Abraham I wrote:
> Hi,
> 
> On Tuesday 10 October 2017 02:28 AM, Maxime Ripard wrote:
> > On Sun, Oct 08, 2017 at 04:29:01AM +0000, Icenowy Zheng wrote:
> >> Allwinner R40 features a USB PHY like the one in A64, but with 3 PHYs.
> >>
> >> Add support for it.
> >>
> >> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> > 
> > Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> Is this patch good to be merged? I see you have pending comments on the other
> patch in the series.

Yeah, but I guess you can merge this one, it's pretty harmless, and it
will reduce the amount of patches to review / merge later on.

Thanks!
Maxime
Kishon Vijay Abraham I Oct. 18, 2017, 11:46 a.m. UTC | #5
On Wednesday 18 October 2017 05:12 PM, Maxime Ripard wrote:
> On Wed, Oct 18, 2017 at 05:09:00PM +0530, Kishon Vijay Abraham I wrote:
>> Hi,
>>
>> On Tuesday 10 October 2017 02:28 AM, Maxime Ripard wrote:
>>> On Sun, Oct 08, 2017 at 04:29:01AM +0000, Icenowy Zheng wrote:
>>>> Allwinner R40 features a USB PHY like the one in A64, but with 3 PHYs.
>>>>
>>>> Add support for it.
>>>>
>>>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>>>
>>> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>>
>> Is this patch good to be merged? I see you have pending comments on the other
>> patch in the series.
> 
> Yeah, but I guess you can merge this one, it's pretty harmless, and it
> will reduce the amount of patches to review / merge later on.

Thank you for the quick reply.

merged with Maxime's and Rob's Ack.

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
Icenowy Zheng Dec. 30, 2017, 11:38 a.m. UTC | #6
在 2017年10月18日星期三 CST 下午7:46:08,Kishon Vijay Abraham I 写道:
> On Wednesday 18 October 2017 05:12 PM, Maxime Ripard wrote:
> > On Wed, Oct 18, 2017 at 05:09:00PM +0530, Kishon Vijay Abraham I wrote:
> >> Hi,
> >> 
> >> On Tuesday 10 October 2017 02:28 AM, Maxime Ripard wrote:
> >>> On Sun, Oct 08, 2017 at 04:29:01AM +0000, Icenowy Zheng wrote:
> >>>> Allwinner R40 features a USB PHY like the one in A64, but with 3 PHYs.
> >>>> 
> >>>> Add support for it.
> >>>> 
> >>>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> >>> 
> >>> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >> 
> >> Is this patch good to be merged? I see you have pending comments on the
> >> other patch in the series.
> > 
> > Yeah, but I guess you can merge this one, it's pretty harmless, and it
> > will reduce the amount of patches to review / merge later on.
> 
> Thank you for the quick reply.
> 
> merged with Maxime's and Rob's Ack.

Sorry, but I didn't see the patch appears in linux-next for such long time.

Is it lost?

> 
> 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
Kishon Vijay Abraham I Jan. 3, 2018, 8:40 a.m. UTC | #7
Hi,

On Saturday 30 December 2017 05:08 PM, Icenowy Zheng wrote:
> 在 2017年10月18日星期三 CST 下午7:46:08,Kishon Vijay Abraham I 写道:
>> On Wednesday 18 October 2017 05:12 PM, Maxime Ripard wrote:
>>> On Wed, Oct 18, 2017 at 05:09:00PM +0530, Kishon Vijay Abraham I wrote:
>>>> Hi,
>>>>
>>>> On Tuesday 10 October 2017 02:28 AM, Maxime Ripard wrote:
>>>>> On Sun, Oct 08, 2017 at 04:29:01AM +0000, Icenowy Zheng wrote:
>>>>>> Allwinner R40 features a USB PHY like the one in A64, but with 3 PHYs.
>>>>>>
>>>>>> Add support for it.
>>>>>>
>>>>>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>>>>>
>>>>> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>>>>
>>>> Is this patch good to be merged? I see you have pending comments on the
>>>> other patch in the series.
>>>
>>> Yeah, but I guess you can merge this one, it's pretty harmless, and it
>>> will reduce the amount of patches to review / merge later on.
>>
>> Thank you for the quick reply.
>>
>> merged with Maxime's and Rob's Ack.
> 
> Sorry, but I didn't see the patch appears in linux-next for such long time.
> 
> Is it lost?

yeah, looks like it. Can you post it again?
sorry about that :-/

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
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
index cbc7847dbf6c..0f00abd40a50 100644
--- a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
@@ -11,6 +11,7 @@  Required properties:
   * allwinner,sun8i-a33-usb-phy
   * allwinner,sun8i-a83t-usb-phy
   * allwinner,sun8i-h3-usb-phy
+  * allwinner,sun8i-r40-usb-phy
   * allwinner,sun8i-v3s-usb-phy
   * allwinner,sun50i-a64-usb-phy
 - reg : a list of offset + length pairs
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 1161e11fb3cf..9df7a2c9ca75 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -112,6 +112,7 @@  enum sun4i_usb_phy_type {
 	sun8i_a33_phy,
 	sun8i_a83t_phy,
 	sun8i_h3_phy,
+	sun8i_r40_phy,
 	sun8i_v3s_phy,
 	sun50i_a64_phy,
 };
@@ -919,6 +920,16 @@  static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = {
 	.phy0_dual_route = true,
 };
 
+static const struct sun4i_usb_phy_cfg sun8i_r40_cfg = {
+	.num_phys = 3,
+	.type = sun8i_r40_phy,
+	.disc_thresh = 3,
+	.phyctl_offset = REG_PHYCTL_A33,
+	.dedicated_clocks = true,
+	.enable_pmu_unk1 = true,
+	.phy0_dual_route = true,
+};
+
 static const struct sun4i_usb_phy_cfg sun8i_v3s_cfg = {
 	.num_phys = 1,
 	.type = sun8i_v3s_phy,
@@ -947,6 +958,7 @@  static const struct of_device_id sun4i_usb_phy_of_match[] = {
 	{ .compatible = "allwinner,sun8i-a33-usb-phy", .data = &sun8i_a33_cfg },
 	{ .compatible = "allwinner,sun8i-a83t-usb-phy", .data = &sun8i_a83t_cfg },
 	{ .compatible = "allwinner,sun8i-h3-usb-phy", .data = &sun8i_h3_cfg },
+	{ .compatible = "allwinner,sun8i-r40-usb-phy", .data = &sun8i_r40_cfg },
 	{ .compatible = "allwinner,sun8i-v3s-usb-phy", .data = &sun8i_v3s_cfg },
 	{ .compatible = "allwinner,sun50i-a64-usb-phy",
 	  .data = &sun50i_a64_cfg},