[PATCH] Restore USB-OHCI node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Valeria De Fonzo <valeria.defonzo@xxxxxxxxx>

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@xxxxxxxxx>
---
 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




[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux