diff mbox series

[2/3] ARM: dts: sun8i: v3s: enable EHCI/OHCI for Lichee Pi Zero

Message ID 20201122004011.1957325-1-icenowy@aosc.io (mailing list archive)
State New, archived
Headers show
Series ARM: dts: sun8i: v3s: enable EHCI/OHCI | expand

Commit Message

Icenowy Zheng Nov. 22, 2020, 12:40 a.m. UTC
As the USB port on Lichee Pi Zero works in the OTG mode, enable the
EHCI/OHCI controllers for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Chen-Yu Tsai Nov. 23, 2020, 3:37 a.m. UTC | #1
On Sun, Nov 22, 2020 at 8:40 AM Icenowy Zheng <icenowy@aosc.io> wrote:
>
> As the USB port on Lichee Pi Zero works in the OTG mode, enable the
> EHCI/OHCI controllers for it.

You should probably mention that the host controllers work better
than the OTG controller in host mode. Otherwise this change lacks
justification for enabling two extra hardware blocks.

ChenYu

> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
> index 2e4587d26ce5..0cd969194acb 100644
> --- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
> @@ -77,6 +77,10 @@ red_led {
>         };
>  };
>
> +&ehci0 {
> +       status = "okay";
> +};
> +
>  &mmc0 {
>         broken-cd;
>         bus-width = <4>;
> @@ -84,6 +88,10 @@ &mmc0 {
>         status = "okay";
>  };
>
> +&ohci0 {
> +       status = "okay";
> +};
> +
>  &uart0 {
>         pinctrl-0 = <&uart0_pb_pins>;
>         pinctrl-names = "default";
> --
> 2.28.0
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20201122004011.1957325-1-icenowy%40aosc.io.
Icenowy Zheng Nov. 23, 2020, 10:21 a.m. UTC | #2
于 2020年11月23日 GMT+08:00 上午11:37:43, Chen-Yu Tsai <wens@csie.org> 写到:
>On Sun, Nov 22, 2020 at 8:40 AM Icenowy Zheng <icenowy@aosc.io> wrote:
>>
>> As the USB port on Lichee Pi Zero works in the OTG mode, enable the
>> EHCI/OHCI controllers for it.
>
>You should probably mention that the host controllers work better
>than the OTG controller in host mode. Otherwise this change lacks
>justification for enabling two extra hardware blocks.

Our PHY driver do not sense whether ?HCI is enabled or not, so
for host to work it's necessary to be enabled, otherwise the phy
driver will just route USB to unenabled ?HCI and fail.

>
>ChenYu
>
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> ---
>>  arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
>b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
>> index 2e4587d26ce5..0cd969194acb 100644
>> --- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
>> +++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
>> @@ -77,6 +77,10 @@ red_led {
>>         };
>>  };
>>
>> +&ehci0 {
>> +       status = "okay";
>> +};
>> +
>>  &mmc0 {
>>         broken-cd;
>>         bus-width = <4>;
>> @@ -84,6 +88,10 @@ &mmc0 {
>>         status = "okay";
>>  };
>>
>> +&ohci0 {
>> +       status = "okay";
>> +};
>> +
>>  &uart0 {
>>         pinctrl-0 = <&uart0_pb_pins>;
>>         pinctrl-names = "default";
>> --
>> 2.28.0
>>
>> --
>> You received this message because you are subscribed to the Google
>Groups "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it,
>send an email to linux-sunxi+unsubscribe@googlegroups.com.
>> To view this discussion on the web, visit
>https://groups.google.com/d/msgid/linux-sunxi/20201122004011.1957325-1-icenowy%40aosc.io.
Chen-Yu Tsai Nov. 28, 2020, 3:09 a.m. UTC | #3
On Mon, Nov 23, 2020 at 6:22 PM Icenowy Zheng <icenowy@aosc.io> wrote:
>
>
>
> 于 2020年11月23日 GMT+08:00 上午11:37:43, Chen-Yu Tsai <wens@csie.org> 写到:
> >On Sun, Nov 22, 2020 at 8:40 AM Icenowy Zheng <icenowy@aosc.io> wrote:
> >>
> >> As the USB port on Lichee Pi Zero works in the OTG mode, enable the
> >> EHCI/OHCI controllers for it.
> >
> >You should probably mention that the host controllers work better
> >than the OTG controller in host mode. Otherwise this change lacks
> >justification for enabling two extra hardware blocks.
>
> Our PHY driver do not sense whether ?HCI is enabled or not, so
> for host to work it's necessary to be enabled, otherwise the phy
> driver will just route USB to unenabled ?HCI and fail.

So, this was never working in Linux to begin with? You should mention that.

Maybe a fixes tag is in order then.
Icenowy Zheng Nov. 28, 2020, 3:35 a.m. UTC | #4
于 2020年11月28日 GMT+08:00 上午11:09:17, Chen-Yu Tsai <wens@kernel.org> 写到:
>On Mon, Nov 23, 2020 at 6:22 PM Icenowy Zheng <icenowy@aosc.io> wrote:
>>
>>
>>
>> 于 2020年11月23日 GMT+08:00 上午11:37:43, Chen-Yu Tsai <wens@csie.org> 写到:
>> >On Sun, Nov 22, 2020 at 8:40 AM Icenowy Zheng <icenowy@aosc.io>
>wrote:
>> >>
>> >> As the USB port on Lichee Pi Zero works in the OTG mode, enable
>the
>> >> EHCI/OHCI controllers for it.
>> >
>> >You should probably mention that the host controllers work better
>> >than the OTG controller in host mode. Otherwise this change lacks
>> >justification for enabling two extra hardware blocks.
>>
>> Our PHY driver do not sense whether ?HCI is enabled or not, so
>> for host to work it's necessary to be enabled, otherwise the phy
>> driver will just route USB to unenabled ?HCI and fail.
>
>So, this was never working in Linux to begin with? You should mention
>that.

Okay.

>
>Maybe a fixes tag is in order then.

Well I can't judge whether this is necessary.
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
index 2e4587d26ce5..0cd969194acb 100644
--- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
@@ -77,6 +77,10 @@  red_led {
 	};
 };
 
+&ehci0 {
+	status = "okay";
+};
+
 &mmc0 {
 	broken-cd;
 	bus-width = <4>;
@@ -84,6 +88,10 @@  &mmc0 {
 	status = "okay";
 };
 
+&ohci0 {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-0 = <&uart0_pb_pins>;
 	pinctrl-names = "default";