* [PATCH] Restore USB-OHCI node
@ 2020-10-26 14:04 Mauro Condarelli
2020-10-26 17:20 ` Serge Semin
0 siblings, 1 reply; 2+ messages in thread
From: Mauro Condarelli @ 2020-10-26 14:04 UTC (permalink / raw)
To: linux-mips; +Cc: Valeria De Fonzo, Mauro Condarelli
From: Valeria De Fonzo <valeria.defonzo@gmail.com>
This node was taken from OpenWRT mt7628an.dtsi
The OHCI controller described is *not* to be found in "MT7628 DATASHEET",
but it is needed to have any low-speed USB (e.g.: keyboard) working.
I am unsure how to handle this situation (undocumented feature).
Without this patch Linux sees only one USB device:
# lsusb
Bus 001 Device 001: ID 1d6b:0001
# cat /sys/bus/usb/devices/usb1/product
EHCI Host Controller
and low-speed peripherals (I tested with keyboard and a couple of USB
barcode scanners) are not recognized.
Moreover pluggin in one of the "unrecognizable" devices seems to block
USB completely (i.e.: plugging in a "working peripheral like a memory
device or a USB-serial does *not* work) till next reboot.
Apparently EHCI tries to hand-over peripheral to OHCI and gets stuck.
With this patch everything works as expected (kernel was compiled with
both OHCI and EHCI support as modules):
# lsusb
Bus 001 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0002
# cat /sys/bus/usb/devices/usb1/product
Generic Platform OHCI controller
# cat /sys/bus/usb/devices/usb2/product
EHCI Host Controller
<----- insert keybord
[340060.245767] usb 1-1: new low-speed USB device number 3 using ohci-platform
[340060.518484] usb 1-1: New USB device found, idVendor=0461, idProduct=0010, bcdDevice= 1.04
[340060.527103] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[340060.534432] usb 1-1: Product: USB Keyboard
[340060.546236] usb 1-1: Manufacturer: NOVATEK
[340060.585973] input: NOVATEK USB Keyboard as /devices/platform/101c1000.ohci/usb1/1-1/1-1:1.0/0003:0461:0010.0002/input/input1
[340060.677988] hid-generic 0003:0461:0010.0002: input,hidraw0: USB HID v1.10 Keyboard [NOVATEK USB Keyboard] on usb-101c1000.ohci-1/input0
[340060.718911] input: NOVATEK USB Keyboard System Control as /devices/platform/101c1000.ohci/usb1/1-1/1-1:1.1/0003:0461:0010.0003/input/input2
[340060.797867] input: NOVATEK USB Keyboard Consumer Control as /devices/platform/101c1000.ohci/usb1/1-1/1-1:1.1/0003:0461:0010.0003/input/input3
[340060.818325] hid-generic 0003:0461:0010.0003: input,hidraw1: USB HID v1.10 Device [NOVATEK USB Keyboard] on usb-101c1000.ohci-1/input1
No other changes were made neither to kernel nor rootfs (modules were
compiled also in kernel without this patch).
Signed-off-by: Mauro Condarelli <mc5686@mclink.it>
---
arch/mips/boot/dts/ralink/mt7628a.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi
index bf6b6a459bd6..b4ac008fdfdf 100644
--- a/arch/mips/boot/dts/ralink/mt7628a.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi
@@ -323,6 +323,17 @@ ehci@101c0000 {
interrupts = <18>;
};
+ ohci@101c1000 {
+ compatible = "generic-ohci";
+ reg = <0x101c1000 0x1000>;
+
+ phys = <&usb_phy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+ };
+
ethernet: ethernet@10100000 {
compatible = "ralink,rt5350-eth";
reg = <0x10100000 0x10000>;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Restore USB-OHCI node
2020-10-26 14:04 [PATCH] Restore USB-OHCI node Mauro Condarelli
@ 2020-10-26 17:20 ` Serge Semin
0 siblings, 0 replies; 2+ messages in thread
From: Serge Semin @ 2020-10-26 17:20 UTC (permalink / raw)
To: Mauro Condarelli; +Cc: linux-mips, Valeria De Fonzo
On Mon, Oct 26, 2020 at 03:04:55PM +0100, Mauro Condarelli wrote:
> From: Valeria De Fonzo <valeria.defonzo@gmail.com>
>
> This node was taken from OpenWRT mt7628an.dtsi
> The OHCI controller described is *not* to be found in "MT7628 DATASHEET",
> but it is needed to have any low-speed USB (e.g.: keyboard) working.
>
> I am unsure how to handle this situation (undocumented feature).
>
> Without this patch Linux sees only one USB device:
> # lsusb
> Bus 001 Device 001: ID 1d6b:0001
> # cat /sys/bus/usb/devices/usb1/product
> EHCI Host Controller
> and low-speed peripherals (I tested with keyboard and a couple of USB
> barcode scanners) are not recognized.
> Moreover pluggin in one of the "unrecognizable" devices seems to block
> USB completely (i.e.: plugging in a "working peripheral like a memory
> device or a USB-serial does *not* work) till next reboot.
> Apparently EHCI tries to hand-over peripheral to OHCI and gets stuck.
>
> With this patch everything works as expected (kernel was compiled with
> both OHCI and EHCI support as modules):
> # lsusb
> Bus 001 Device 001: ID 1d6b:0001
> Bus 002 Device 001: ID 1d6b:0002
> # cat /sys/bus/usb/devices/usb1/product
> Generic Platform OHCI controller
> # cat /sys/bus/usb/devices/usb2/product
> EHCI Host Controller
> <----- insert keybord
> [340060.245767] usb 1-1: new low-speed USB device number 3 using ohci-platform
> [340060.518484] usb 1-1: New USB device found, idVendor=0461, idProduct=0010, bcdDevice= 1.04
> [340060.527103] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> [340060.534432] usb 1-1: Product: USB Keyboard
> [340060.546236] usb 1-1: Manufacturer: NOVATEK
> [340060.585973] input: NOVATEK USB Keyboard as /devices/platform/101c1000.ohci/usb1/1-1/1-1:1.0/0003:0461:0010.0002/input/input1
> [340060.677988] hid-generic 0003:0461:0010.0002: input,hidraw0: USB HID v1.10 Keyboard [NOVATEK USB Keyboard] on usb-101c1000.ohci-1/input0
> [340060.718911] input: NOVATEK USB Keyboard System Control as /devices/platform/101c1000.ohci/usb1/1-1/1-1:1.1/0003:0461:0010.0003/input/input2
> [340060.797867] input: NOVATEK USB Keyboard Consumer Control as /devices/platform/101c1000.ohci/usb1/1-1/1-1:1.1/0003:0461:0010.0003/input/input3
> [340060.818325] hid-generic 0003:0461:0010.0003: input,hidraw1: USB HID v1.10 Device [NOVATEK USB Keyboard] on usb-101c1000.ohci-1/input1
> No other changes were made neither to kernel nor rootfs (modules were
> compiled also in kernel without this patch).
>
>
> Signed-off-by: Mauro Condarelli <mc5686@mclink.it>
> ---
> arch/mips/boot/dts/ralink/mt7628a.dtsi | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi
> index bf6b6a459bd6..b4ac008fdfdf 100644
> --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi
> +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi
> @@ -323,6 +323,17 @@ ehci@101c0000 {
> interrupts = <18>;
> };
>
> + ohci@101c1000 {
Please use the "usb@" node name as the generic USB DT bindings require for
all USB nodes. I am just trying to merge in a cleanup series to fix all the
USB nodes name to comply with that requirement:
Link: https://lore.kernel.org/linux-usb/20201020115959.2658-1-Sergey.Semin@baikalelectronics.ru/
-Sergey
> + compatible = "generic-ohci";
> + reg = <0x101c1000 0x1000>;
> +
> + phys = <&usb_phy>;
> + phy-names = "usb";
> +
> + interrupt-parent = <&intc>;
> + interrupts = <18>;
> + };
> +
> ethernet: ethernet@10100000 {
> compatible = "ralink,rt5350-eth";
> reg = <0x10100000 0x10000>;
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-26 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 14:04 [PATCH] Restore USB-OHCI node Mauro Condarelli
2020-10-26 17:20 ` Serge Semin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.