diff mbox

phy: meson8b-usb2: add support for the USB PHY on Meson8 SoCs

Message ID 20170506173625.19501-1-martin.blumenstingl@googlemail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Martin Blumenstingl May 6, 2017, 5:36 p.m. UTC
Meson8 uses the same USB PHY as found on the Meson8b and GXBB SoCs. Add
a new of_device_id to indicate this. Also update the documentation
(devicetree binding, Kconfig and MODULE_DESCRIPTION) accordingly.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt | 3 ++-
 drivers/phy/Kconfig                                        | 4 ++--
 drivers/phy/phy-meson8b-usb2.c                             | 5 +++--
 3 files changed, 7 insertions(+), 5 deletions(-)

Comments

Kishon Vijay Abraham I May 8, 2017, 12:10 p.m. UTC | #1
Hi,

On Saturday 06 May 2017 11:06 PM, Martin Blumenstingl wrote:
> Meson8 uses the same USB PHY as found on the Meson8b and GXBB SoCs. Add
> a new of_device_id to indicate this. Also update the documentation
> (devicetree binding, Kconfig and MODULE_DESCRIPTION) accordingly.
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt | 3 ++-
>  drivers/phy/Kconfig                                        | 4 ++--
>  drivers/phy/phy-meson8b-usb2.c                             | 5 +++--
>  3 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt b/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
> index 5fa73b9d20f5..d81d73aea608 100644
> --- a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
> +++ b/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
> @@ -1,7 +1,8 @@
> -* Amlogic Meson8b and GXBB USB2 PHY
> +* Amlogic Meson8, Meson8b and GXBB USB2 PHY
>  
>  Required properties:
>  - compatible:	Depending on the platform this should be one of:
> +	"amlogic,meson8-usb2-phy"
>  	"amlogic,meson8b-usb2-phy"
>  	"amlogic,meson-gxbb-usb2-phy"

Please split the dt binding documentation into a separate patch.

Thanks
Kishon
Martin Blumenstingl May 8, 2017, 8:02 p.m. UTC | #2
On Mon, May 8, 2017 at 2:10 PM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
> Hi,
>
> On Saturday 06 May 2017 11:06 PM, Martin Blumenstingl wrote:
>> Meson8 uses the same USB PHY as found on the Meson8b and GXBB SoCs. Add
>> a new of_device_id to indicate this. Also update the documentation
>> (devicetree binding, Kconfig and MODULE_DESCRIPTION) accordingly.
>>
>> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>> ---
>>  Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt | 3 ++-
>>  drivers/phy/Kconfig                                        | 4 ++--
>>  drivers/phy/phy-meson8b-usb2.c                             | 5 +++--
>>  3 files changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt b/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
>> index 5fa73b9d20f5..d81d73aea608 100644
>> --- a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
>> +++ b/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
>> @@ -1,7 +1,8 @@
>> -* Amlogic Meson8b and GXBB USB2 PHY
>> +* Amlogic Meson8, Meson8b and GXBB USB2 PHY
>>
>>  Required properties:
>>  - compatible:        Depending on the platform this should be one of:
>> +     "amlogic,meson8-usb2-phy"
>>       "amlogic,meson8b-usb2-phy"
>>       "amlogic,meson-gxbb-usb2-phy"
>
> Please split the dt binding documentation into a separate patch.
OK, however I guess I'll wait for a few days until that restructuring
patch is merged

thanks for reviewing this so quick!


Regards,
Martin
Martin Blumenstingl May 20, 2017, 2:12 p.m. UTC | #3
The USB2 PHY in the Meson8 SoCs is identical to the one in the Meson8b
and GXBB SoCs.
This series adds a new compatible string for Meson8 and adjusts the
Kconfig and MODULE_DESCRIPTION documentation as well as the dt-bindings
accordingly.

With some additional work the same driver could be used to add USB2
support to Meson6 SoCs as well. However, due to lack of a clock
controller driver for Meson6 and the lack of a board Meson6 support
is not part of this series (Meson6 uses internal mux and divider clocks
which are provided by the USB2 PHY registers, while the newer SoCs seem
to use an alternative clock called "clk_32k_altsel")


Changes since v1:
- split the dt-bindings and the driver changes into separate patches
- rebased to apply on top of my other series "Meson GXL USB2 PHY driver"
  (from [0]) which means that this also applies on top of "phy: Group
  vendor specific phy drivers"
- also update the Kconfig option name (instead of just the description)


[0] http://lists.infradead.org/pipermail/linux-amlogic/2017-May/003664.html


Martin Blumenstingl (2):
  phy: meson8b-usb2: add support for the USB PHY on Meson8 SoCs
  dt-bindings: phy: meson8b-usb2-phy: add support for the Meson8 SoCs

 Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt | 3 ++-
 drivers/phy/amlogic/Kconfig                                | 6 +++---
 drivers/phy/amlogic/phy-meson8b-usb2.c                     | 5 +++--
 3 files changed, 8 insertions(+), 6 deletions(-)
Kishon Vijay Abraham I June 1, 2017, 1:12 p.m. UTC | #4
On Saturday 20 May 2017 07:42 PM, Martin Blumenstingl wrote:
> The USB2 PHY in the Meson8 SoCs is identical to the one in the Meson8b
> and GXBB SoCs.
> This series adds a new compatible string for Meson8 and adjusts the
> Kconfig and MODULE_DESCRIPTION documentation as well as the dt-bindings
> accordingly.
> 
> With some additional work the same driver could be used to add USB2
> support to Meson6 SoCs as well. However, due to lack of a clock
> controller driver for Meson6 and the lack of a board Meson6 support
> is not part of this series (Meson6 uses internal mux and divider clocks
> which are provided by the USB2 PHY registers, while the newer SoCs seem
> to use an alternative clock called "clk_32k_altsel")

merged, thanks.

-Kishon
> 
> 
> Changes since v1:
> - split the dt-bindings and the driver changes into separate patches
> - rebased to apply on top of my other series "Meson GXL USB2 PHY driver"
>   (from [0]) which means that this also applies on top of "phy: Group
>   vendor specific phy drivers"
> - also update the Kconfig option name (instead of just the description)
> 
> 
> [0] http://lists.infradead.org/pipermail/linux-amlogic/2017-May/003664.html
> 
> 
> Martin Blumenstingl (2):
>   phy: meson8b-usb2: add support for the USB PHY on Meson8 SoCs
>   dt-bindings: phy: meson8b-usb2-phy: add support for the Meson8 SoCs
> 
>  Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt | 3 ++-
>  drivers/phy/amlogic/Kconfig                                | 6 +++---
>  drivers/phy/amlogic/phy-meson8b-usb2.c                     | 5 +++--
>  3 files changed, 8 insertions(+), 6 deletions(-)
>
Martin Blumenstingl June 2, 2017, 7:14 p.m. UTC | #5
Hi Kishon,

On Thu, Jun 1, 2017 at 3:12 PM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
>
>
> On Saturday 20 May 2017 07:42 PM, Martin Blumenstingl wrote:
>> The USB2 PHY in the Meson8 SoCs is identical to the one in the Meson8b
>> and GXBB SoCs.
>> This series adds a new compatible string for Meson8 and adjusts the
>> Kconfig and MODULE_DESCRIPTION documentation as well as the dt-bindings
>> accordingly.
>>
>> With some additional work the same driver could be used to add USB2
>> support to Meson6 SoCs as well. However, due to lack of a clock
>> controller driver for Meson6 and the lack of a board Meson6 support
>> is not part of this series (Meson6 uses internal mux and divider clocks
>> which are provided by the USB2 PHY registers, while the newer SoCs seem
>> to use an alternative clock called "clk_32k_altsel")
>
> merged, thanks.
thank you!

I have one question though:
you merged two of my patches, both from different series though!
currently part of your tree are:
- "Documentation: dt-bindings: Add documentation for the Meson GXL USB2 PHY" [0]
- "phy: meson8b-usb2: add support for the USB PHY on Meson8 SoCs" [1]

the dt-bindings patch is for a new driver, while the meson8b-usb2
patch updates an existing driver.
still missing are the following two patches:
- "phy: meson: add USB2 PHY support for Meson GXL and GXM" [2] (the
actual driver for the dt-bindings from patch [0])
- "dt-bindings: phy: meson8b-usb2-phy: add support for the Meson8
SoCs" [3] (the dt-bindings update related to meson8b-usb2 driver / the
patch from [1])

taking the dt-bindings patch for the meson8b-usb2-phy driver should be trivial.
you also reviewed the new GXL and GXM PHY driver and gave your "OK" on
v3 (I linked v4 below because that one is rebased so it applies after
the phy driver restructuring), see [4]

> -Kishon
>>
>>
>> Changes since v1:
>> - split the dt-bindings and the driver changes into separate patches
>> - rebased to apply on top of my other series "Meson GXL USB2 PHY driver"
>>   (from [0]) which means that this also applies on top of "phy: Group
>>   vendor specific phy drivers"
>> - also update the Kconfig option name (instead of just the description)
>>
>>
>> [0] http://lists.infradead.org/pipermail/linux-amlogic/2017-May/003664.html
>>
>>
>> Martin Blumenstingl (2):
>>   phy: meson8b-usb2: add support for the USB PHY on Meson8 SoCs
>>   dt-bindings: phy: meson8b-usb2-phy: add support for the Meson8 SoCs
>>
>>  Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt | 3 ++-
>>  drivers/phy/amlogic/Kconfig                                | 6 +++---
>>  drivers/phy/amlogic/phy-meson8b-usb2.c                     | 5 +++--
>>  3 files changed, 8 insertions(+), 6 deletions(-)
>>


Regards,
Martin

[0] https://patchwork.kernel.org/patch/9738625/
[1] https://patchwork.kernel.org/patch/9738635/
[2] https://patchwork.kernel.org/patch/9738631/
[3] https://patchwork.kernel.org/patch/9738637/
[4] http://lists.infradead.org/pipermail/linux-amlogic/2017-May/003500.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt b/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
index 5fa73b9d20f5..d81d73aea608 100644
--- a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
+++ b/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
@@ -1,7 +1,8 @@ 
-* Amlogic Meson8b and GXBB USB2 PHY
+* Amlogic Meson8, Meson8b and GXBB USB2 PHY
 
 Required properties:
 - compatible:	Depending on the platform this should be one of:
+	"amlogic,meson8-usb2-phy"
 	"amlogic,meson8b-usb2-phy"
 	"amlogic,meson-gxbb-usb2-phy"
 - reg:		The base address and length of the registers
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 005cadb7a3f8..0d3e5099ff6a 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -507,8 +507,8 @@  config PHY_MESON8B_USB2
 	select USB_COMMON
 	select GENERIC_PHY
 	help
-	  Enable this to support the Meson USB2 PHYs found in Meson8b
-	  and GXBB SoCs.
+	  Enable this to support the Meson USB2 PHYs found in Meson8,
+	  Meson8b and GXBB SoCs.
 	  If unsure, say N.
 
 endmenu
diff --git a/drivers/phy/phy-meson8b-usb2.c b/drivers/phy/phy-meson8b-usb2.c
index d75004e69b65..a8012bb1d1c5 100644
--- a/drivers/phy/phy-meson8b-usb2.c
+++ b/drivers/phy/phy-meson8b-usb2.c
@@ -1,5 +1,5 @@ 
 /*
- * Meson8b and GXBB USB2 PHY driver
+ * Meson8, Meson8b and GXBB USB2 PHY driver
  *
  * Copyright (C) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
  *
@@ -285,6 +285,7 @@  static int phy_meson8b_usb2_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id phy_meson8b_usb2_of_match[] = {
+	{ .compatible = "amlogic,meson8-usb2-phy", },
 	{ .compatible = "amlogic,meson8b-usb2-phy", },
 	{ .compatible = "amlogic,meson-gxbb-usb2-phy", },
 	{ },
@@ -301,5 +302,5 @@  static struct platform_driver phy_meson8b_usb2_driver = {
 module_platform_driver(phy_meson8b_usb2_driver);
 
 MODULE_AUTHOR("Martin Blumenstingl <martin.blumenstingl@googlemail.com>");
-MODULE_DESCRIPTION("Meson8b and GXBB USB2 PHY driver");
+MODULE_DESCRIPTION("Meson8, Meson8b and GXBB USB2 PHY driver");
 MODULE_LICENSE("GPL");