diff mbox series

evb_rk3399: add usb ohci definations

Message ID 20210526093319.274254-1-art@khadas.com
State Superseded
Delegated to: Kever Yang
Headers show
Series evb_rk3399: add usb ohci definations | expand

Commit Message

Art Nikpal May 26, 2021, 9:33 a.m. UTC
Problem: not possible to use CONFIG_USB_OHCI_HCD=y and
CONFIG_USB_OHCI_GENERIC=y options without CONFIG_USB_OHCI_NEW and
CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS definations

Add missed definations.

Signed-off-by: Artem Lapkin <art@khadas.com>
---
 include/configs/evb_rk3399.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Kever Yang June 1, 2021, 12:15 p.m. UTC | #1
Hi Artem,

On 2021/5/26 下午5:33, Artem Lapkin wrote:
> Problem: not possible to use CONFIG_USB_OHCI_HCD=y and
> CONFIG_USB_OHCI_GENERIC=y options without CONFIG_USB_OHCI_NEW and
> CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS definations
>
> Add missed definations.

But , evb_rk3399 board does not enable CONFIG_USB_OHCI_HCD and 
CONFIG_USB_OHCI_GENERIC.


Thanks,

- Kever

>
> Signed-off-by: Artem Lapkin <art@khadas.com>
> ---
>   include/configs/evb_rk3399.h | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h
> index b7e85037..492b7b4d 100644
> --- a/include/configs/evb_rk3399.h
> +++ b/include/configs/evb_rk3399.h
> @@ -15,4 +15,7 @@
>   
>   #define SDRAM_BANK_SIZE			(2UL << 30)
>   
> +#define CONFIG_USB_OHCI_NEW
> +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     2
> +
>   #endif
Art Nikpal June 2, 2021, 2:33 a.m. UTC | #2
> But , evb_rk3399 board does not enable CONFIG_USB_OHCI_HCD and CONFIG_USB_OHCI_GENERIC.

yes i know it !

for example some other rk3399 boards have it because (usb 1.1 didnt
work without ohci on usb2.0 port and not possible to use usb kbd for
this port )

grep CONFIG_USB_OHCI_GENERIC configs/*3399*
configs/pinebook-pro-rk3399_defconfig:CONFIG_USB_OHCI_GENERIC=y
configs/rock960-rk3399_defconfig:CONFIG_USB_OHCI_GENERIC=y
configs/rockpro64-rk3399_defconfig:CONFIG_USB_OHCI_GENERIC=y

many other boards which used TARGET_EVB_RK3399=y must have  same
problem (with usb1.1)

and i think other boards must have possibilities to use
CONFIG_USB_OHCI_HCD and CONFIG_USB_OHCI_GENERIC.

grep EVB configs/*3399*

configs/evb-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/firefly-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/khadas-edge-captain-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/khadas-edge-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/khadas-edge-v-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/leez-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/nanopc-t4-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/nanopi-m4-2gb-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/nanopi-m4b-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/nanopi-m4-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/nanopi-neo4-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/nanopi-r4s-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/orangepi-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/rock-pi-4c-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/rock-pi-4-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
configs/rock-pi-n10-rk3399pro_defconfig:CONFIG_TARGET_EVB_RK3399=y

On Tue, Jun 1, 2021 at 8:15 PM Kever Yang <kever.yang@rock-chips.com> wrote:
>
> Hi Artem,
>
> On 2021/5/26 下午5:33, Artem Lapkin wrote:
> > Problem: not possible to use CONFIG_USB_OHCI_HCD=y and
> > CONFIG_USB_OHCI_GENERIC=y options without CONFIG_USB_OHCI_NEW and
> > CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS definations
> >
> > Add missed definations.
>
> But , evb_rk3399 board does not enable CONFIG_USB_OHCI_HCD and
> CONFIG_USB_OHCI_GENERIC.
>
>
> Thanks,
>
> - Kever
>
> >
> > Signed-off-by: Artem Lapkin <art@khadas.com>
> > ---
> >   include/configs/evb_rk3399.h | 3 +++
> >   1 file changed, 3 insertions(+)
> >
> > diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h
> > index b7e85037..492b7b4d 100644
> > --- a/include/configs/evb_rk3399.h
> > +++ b/include/configs/evb_rk3399.h
> > @@ -15,4 +15,7 @@
> >
> >   #define SDRAM_BANK_SIZE                     (2UL << 30)
> >
> > +#define CONFIG_USB_OHCI_NEW
> > +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     2
> > +
> >   #endif
>
>
Art Nikpal June 2, 2021, 2:44 a.m. UTC | #3
workable example for CONFIG_USB_OHCI_HCD and CONFIG_USB_OHCI_GENERIC
(usb kbd on usb2.0 port)

kedge# usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller

  1  Hub (12 Mb/s, 0mA)
  |   U-Boot Root Hub
  |
  +-2  Human Interface (1.5 Mb/s, 100mA)
        Dell KB216 Wired Keyboard

  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller

  1  Hub (12 Mb/s, 0mA)
      U-Boot Root Hub

  1  Hub (5 Gb/s, 0mA)
     U-Boot XHCI Host Controller


and for usbkbd connected to usb3 port

kedge# usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller

  1  Hub (12 Mb/s, 0mA)
      U-Boot Root Hub

  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller

  1  Hub (12 Mb/s, 0mA)
      U-Boot Root Hub

  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller
  |
  +-2  Human Interface (1.5 Mb/s, 100mA)
        Dell KB216 Wired Keyboard

PS: usb2.0 port cant recognize any usb1.1 devices without OHCI

On Wed, Jun 2, 2021 at 10:33 AM Art Nikpal <email2tema@gmail.com> wrote:
>
> > But , evb_rk3399 board does not enable CONFIG_USB_OHCI_HCD and CONFIG_USB_OHCI_GENERIC.
>
> yes i know it !
>
> for example some other rk3399 boards have it because (usb 1.1 didnt
> work without ohci on usb2.0 port and not possible to use usb kbd for
> this port )
>
> grep CONFIG_USB_OHCI_GENERIC configs/*3399*
> configs/pinebook-pro-rk3399_defconfig:CONFIG_USB_OHCI_GENERIC=y
> configs/rock960-rk3399_defconfig:CONFIG_USB_OHCI_GENERIC=y
> configs/rockpro64-rk3399_defconfig:CONFIG_USB_OHCI_GENERIC=y
>
> many other boards which used TARGET_EVB_RK3399=y must have  same
> problem (with usb1.1)
>
> and i think other boards must have possibilities to use
> CONFIG_USB_OHCI_HCD and CONFIG_USB_OHCI_GENERIC.
>
> grep EVB configs/*3399*
>
> configs/evb-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/firefly-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/khadas-edge-captain-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/khadas-edge-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/khadas-edge-v-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/leez-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/nanopc-t4-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/nanopi-m4-2gb-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/nanopi-m4b-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/nanopi-m4-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/nanopi-neo4-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/nanopi-r4s-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/orangepi-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/rock-pi-4c-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/rock-pi-4-rk3399_defconfig:CONFIG_TARGET_EVB_RK3399=y
> configs/rock-pi-n10-rk3399pro_defconfig:CONFIG_TARGET_EVB_RK3399=y
>
> On Tue, Jun 1, 2021 at 8:15 PM Kever Yang <kever.yang@rock-chips.com> wrote:
> >
> > Hi Artem,
> >
> > On 2021/5/26 下午5:33, Artem Lapkin wrote:
> > > Problem: not possible to use CONFIG_USB_OHCI_HCD=y and
> > > CONFIG_USB_OHCI_GENERIC=y options without CONFIG_USB_OHCI_NEW and
> > > CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS definations
> > >
> > > Add missed definations.
> >
> > But , evb_rk3399 board does not enable CONFIG_USB_OHCI_HCD and
> > CONFIG_USB_OHCI_GENERIC.
> >
> >
> > Thanks,
> >
> > - Kever
> >
> > >
> > > Signed-off-by: Artem Lapkin <art@khadas.com>
> > > ---
> > >   include/configs/evb_rk3399.h | 3 +++
> > >   1 file changed, 3 insertions(+)
> > >
> > > diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h
> > > index b7e85037..492b7b4d 100644
> > > --- a/include/configs/evb_rk3399.h
> > > +++ b/include/configs/evb_rk3399.h
> > > @@ -15,4 +15,7 @@
> > >
> > >   #define SDRAM_BANK_SIZE                     (2UL << 30)
> > >
> > > +#define CONFIG_USB_OHCI_NEW
> > > +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     2
> > > +
> > >   #endif
> >
> >
Peter Robinson June 2, 2021, 7:38 a.m. UTC | #4
On Wed, Jun 2, 2021 at 3:33 AM Art Nikpal <email2tema@gmail.com> wrote:
>
> > But , evb_rk3399 board does not enable CONFIG_USB_OHCI_HCD and CONFIG_USB_OHCI_GENERIC.
>
> yes i know it !
>
> for example some other rk3399 boards have it because (usb 1.1 didnt
> work without ohci on usb2.0 port and not possible to use usb kbd for
> this port )
>
> grep CONFIG_USB_OHCI_GENERIC configs/*3399*
> configs/pinebook-pro-rk3399_defconfig:CONFIG_USB_OHCI_GENERIC=y
> configs/rock960-rk3399_defconfig:CONFIG_USB_OHCI_GENERIC=y
> configs/rockpro64-rk3399_defconfig:CONFIG_USB_OHCI_GENERIC=y
>
> many other boards which used TARGET_EVB_RK3399=y must have  same
> problem (with usb1.1)

The 3 boards you mention above define their own target and don't use
TARGET_EVB_RK3399

> and i think other boards must have possibilities to use
> CONFIG_USB_OHCI_HCD and CONFIG_USB_OHCI_GENERIC.

So I think Kever's point was that without defining the following two
options in the appropriate config files your patch has no effect
because the OHCI support isn't actually built for the boards. I
suggest a v2 patch which does that.

CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y

Regards,
Peter
diff mbox series

Patch

diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h
index b7e85037..492b7b4d 100644
--- a/include/configs/evb_rk3399.h
+++ b/include/configs/evb_rk3399.h
@@ -15,4 +15,7 @@ 
 
 #define SDRAM_BANK_SIZE			(2UL << 30)
 
+#define CONFIG_USB_OHCI_NEW
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     2
+
 #endif