2019-11-11 11:49:47

by Michael Grzeschik

[permalink] [raw]
Subject: [PATCH] ARM: dts: imx25: fix usbhost1 node

The usb port represented by &usbhost1 uses an USB phy internal to the
SoC. We add the phy_type to the base dtsi so the board dts only have to
overwrite it if they use a different configuration. While at it we also
pin the usbhost port to host mode.

Signed-off-by: Michael Grzeschik <[email protected]>
---
arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts | 2 --
arch/arm/boot/dts/imx25-pdk.dts | 2 --
arch/arm/boot/dts/imx25.dtsi | 2 ++
3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
index 0fde90df2b546..3f38c2e60a745 100644
--- a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
@@ -165,8 +165,6 @@
};

&usbhost1 {
- phy_type = "serial";
- dr_mode = "host";
status = "okay";
};

diff --git a/arch/arm/boot/dts/imx25-pdk.dts b/arch/arm/boot/dts/imx25-pdk.dts
index 05cccd12624cb..fb66884d8a2fa 100644
--- a/arch/arm/boot/dts/imx25-pdk.dts
+++ b/arch/arm/boot/dts/imx25-pdk.dts
@@ -304,8 +304,6 @@
};

&usbhost1 {
- phy_type = "serial";
- dr_mode = "host";
status = "okay";
};

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 9a097ef014af5..7c7795b40ee0c 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -570,6 +570,8 @@
clock-names = "ipg", "ahb", "per";
fsl,usbmisc = <&usbmisc 1>;
fsl,usbphy = <&usbphy1>;
+ phy_type = "serial";
+ dr_mode = "host";
status = "disabled";
};

--
2.24.0.rc1


2019-11-14 21:19:24

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH] ARM: dts: imx25: fix usbhost1 node

On Mon, Nov 11, 2019 at 12:46:56PM +0100, Michael Grzeschik wrote:
> The usb port represented by &usbhost1 uses an USB phy internal to the
> SoC. We add the phy_type to the base dtsi so the board dts only have to
> overwrite it if they use a different configuration. While at it we also
> pin the usbhost port to host mode.
>
> Signed-off-by: Michael Grzeschik <[email protected]>
Acked-by: Uwe Kleine-K?nig <[email protected]>

Thanks
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |

2019-11-15 08:33:29

by Michael Grzeschik

[permalink] [raw]
Subject: Re: [PATCH] ARM: dts: imx25: fix usbhost1 node

On Thu, Nov 14, 2019 at 10:17:08PM +0100, Uwe Kleine-K?nig wrote:
> On Mon, Nov 11, 2019 at 12:46:56PM +0100, Michael Grzeschik wrote:
> > The usb port represented by &usbhost1 uses an USB phy internal to the
> > SoC. We add the phy_type to the base dtsi so the board dts only have to
> > overwrite it if they use a different configuration. While at it we also
> > pin the usbhost port to host mode.
> >
> > Signed-off-by: Michael Grzeschik <[email protected]>
> Acked-by: Uwe Kleine-K?nig <[email protected]>

Thanks for the ACK.

I just figured out that we also can add the limitation
to maximum-speed = "full-speed" into to dts. Since the
internal phy maximum speed is limited to that.

I will send an v2.

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |


Attachments:
(No filename) (1.04 kB)
signature.asc (849.00 B)
Download all attachments

2019-11-15 08:38:31

by Michael Grzeschik

[permalink] [raw]
Subject: [PATCH v2] ARM: dts: imx25: fix usbhost1 node

The usb port represented by &usbhost1 uses an USB phy internal to the
SoC. We add the phy_type to the base dtsi so the board dts only have to
overwrite it if they use a different configuration. While at it we also
pin the usbhost port to host mode and limit the speed of the phy to
full-speed only, which it is only capable of.

Signed-off-by: Michael Grzeschik <[email protected]>
---
v1 -> v2: added the maximum speed limitation of the internal phy

arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts | 2 --
arch/arm/boot/dts/imx25-pdk.dts | 2 --
arch/arm/boot/dts/imx25.dtsi | 3 +++
3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
index 0fde90df2b546..3f38c2e60a745 100644
--- a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
@@ -165,8 +165,6 @@
};

&usbhost1 {
- phy_type = "serial";
- dr_mode = "host";
status = "okay";
};

diff --git a/arch/arm/boot/dts/imx25-pdk.dts b/arch/arm/boot/dts/imx25-pdk.dts
index 05cccd12624cb..fb66884d8a2fa 100644
--- a/arch/arm/boot/dts/imx25-pdk.dts
+++ b/arch/arm/boot/dts/imx25-pdk.dts
@@ -304,8 +304,6 @@
};

&usbhost1 {
- phy_type = "serial";
- dr_mode = "host";
status = "okay";
};

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 9a097ef014af5..40b95a290bd6b 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -570,6 +570,9 @@
clock-names = "ipg", "ahb", "per";
fsl,usbmisc = <&usbmisc 1>;
fsl,usbphy = <&usbphy1>;
+ maximum-speed = "full-speed";
+ phy_type = "serial";
+ dr_mode = "host";
status = "disabled";
};

--
2.24.0

2019-11-15 20:16:15

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH v2] ARM: dts: imx25: fix usbhost1 node

Hello Michael,

On Fri, Nov 15, 2019 at 09:34:15AM +0100, Michael Grzeschik wrote:
> The usb port represented by &usbhost1 uses an USB phy internal to the
> SoC. We add the phy_type to the base dtsi so the board dts only have to
> overwrite it if they use a different configuration. While at it we also
> pin the usbhost port to host mode and limit the speed of the phy to
> full-speed only, which it is only capable of.

The subject line suggests this is a fix but the commit log and the
actual change don't support this. Maybe better:

ARM: dts: imx25: consolidate properties of usbhost1 in dtsi file

?

> diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
> index 9a097ef014af5..40b95a290bd6b 100644
> --- a/arch/arm/boot/dts/imx25.dtsi
> +++ b/arch/arm/boot/dts/imx25.dtsi
> @@ -570,6 +570,9 @@
> clock-names = "ipg", "ahb", "per";
> fsl,usbmisc = <&usbmisc 1>;
> fsl,usbphy = <&usbphy1>;
> + maximum-speed = "full-speed";
> + phy_type = "serial";
> + dr_mode = "host";

Would it make sense to split this patch in two? One that moves phy_type
and dr_mode from the dts files using imx25.dtsi (which has no effects on
the resulting dtb files). And another that adds maximum-speed.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |

2019-11-20 08:31:47

by Michael Grzeschik

[permalink] [raw]
Subject: Re: [PATCH v2] ARM: dts: imx25: fix usbhost1 node

On Fri, Nov 15, 2019 at 09:14:09PM +0100, Uwe Kleine-K?nig wrote:
> Hello Michael,
>
> On Fri, Nov 15, 2019 at 09:34:15AM +0100, Michael Grzeschik wrote:
> > The usb port represented by &usbhost1 uses an USB phy internal to the
> > SoC. We add the phy_type to the base dtsi so the board dts only have to
> > overwrite it if they use a different configuration. While at it we also
> > pin the usbhost port to host mode and limit the speed of the phy to
> > full-speed only, which it is only capable of.
>
> The subject line suggests this is a fix but the commit log and the
> actual change don't support this. Maybe better:
>
> ARM: dts: imx25: consolidate properties of usbhost1 in dtsi file
>

Will send a new series with this suggestion.

> ?
>
> > diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
> > index 9a097ef014af5..40b95a290bd6b 100644
> > --- a/arch/arm/boot/dts/imx25.dtsi
> > +++ b/arch/arm/boot/dts/imx25.dtsi
> > @@ -570,6 +570,9 @@
> > clock-names = "ipg", "ahb", "per";
> > fsl,usbmisc = <&usbmisc 1>;
> > fsl,usbphy = <&usbphy1>;
> > + maximum-speed = "full-speed";
> > + phy_type = "serial";
> > + dr_mode = "host";
>
> Would it make sense to split this patch in two? One that moves phy_type
> and dr_mode from the dts files using imx25.dtsi (which has no effects on
> the resulting dtb files). And another that adds maximum-speed.

And a second patch including the speed limitation change.

Thanks,
Michael

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |


Attachments:
(No filename) (1.79 kB)
signature.asc (849.00 B)
Download all attachments

2019-11-20 21:15:43

by Michael Grzeschik

[permalink] [raw]
Subject: [PATCH v3 0/2] ARM: dts: imx25: usbhost port1 improvemts

Michael Grzeschik (2):
ARM: dts: imx25: consolidate properties of usbhost1 in dtsi file
ARM: dts: imx25: describe maximum speed of internal usbhost port1 phy

arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts | 2 --
arch/arm/boot/dts/imx25-pdk.dts | 2 --
arch/arm/boot/dts/imx25.dtsi | 3 +++
3 files changed, 3 insertions(+), 4 deletions(-)

--
2.24.0


2019-11-20 21:18:57

by Michael Grzeschik

[permalink] [raw]
Subject: [PATCH v3 2/2] ARM: dts: imx25: describe maximum speed of internal usbhost port1 phy

The internal usbphy of usbhost port1 is only full-speed capable.
We set this limitation in the dtsi.

Signed-off-by: Michael Grzeschik <[email protected]>
---
arch/arm/boot/dts/imx25.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 7c7795b40ee0c..40b95a290bd6b 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -570,6 +570,7 @@
clock-names = "ipg", "ahb", "per";
fsl,usbmisc = <&usbmisc 1>;
fsl,usbphy = <&usbphy1>;
+ maximum-speed = "full-speed";
phy_type = "serial";
dr_mode = "host";
status = "disabled";
--
2.24.0


2019-11-20 21:31:50

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] ARM: dts: imx25: describe maximum speed of internal usbhost port1 phy

On Wed, Nov 20, 2019 at 6:14 PM Michael Grzeschik
<[email protected]> wrote:
>
> The internal usbphy of usbhost port1 is only full-speed capable.
> We set this limitation in the dtsi.
>
> Signed-off-by: Michael Grzeschik <[email protected]>

Reviewed-by: Fabio Estevam <[email protected]>

2019-12-04 12:24:24

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] ARM: dts: imx25: usbhost port1 improvemts

On Wed, Nov 20, 2019 at 10:13:32PM +0100, Michael Grzeschik wrote:
> Michael Grzeschik (2):
> ARM: dts: imx25: consolidate properties of usbhost1 in dtsi file
> ARM: dts: imx25: describe maximum speed of internal usbhost port1 phy

Applied, thanks.