Skip to contentSkip to conversation

usb: chipidea: add support for USB OTG controller on TI-NSPIRE

PATCH Superseded [email protected] 2 participants 3 messages Nov 24, 2013 – Nov 25, 2013

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 usb: chipidea: add support for USB OTG controller on TI-NSPIRE

From: Daniel Tang <[email protected]>

Changelog v2:
* Rename ci13xxx to ci_hdrc
* Fixed alignment issues

The USB controller in TI-NSPIRE calculators are based off either Freescale's USB OTG controller or the USB controller found in the IMX233, both of which are Chipidea compatible.

This patch adds a device tree binding for the controller.

---
 .../devicetree/bindings/usb/ci-hdrc-nspire.txt     | 17 +++++
 drivers/usb/chipidea/Makefile                      |  1 +
 drivers/usb/chipidea/ci_hdrc_nspire.c              | 74 ++++++++++++++++++++++
 3 files changed, 92 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/ci-hdrc-nspire.txt
 create mode 100644 drivers/usb/chipidea/ci_hdrc_nspire.c
Documentation/devicetree/bindings/usb/ci-hdrc-nspire.txt new file +17 -0
new file mode 100644
index 0000000..5ba8e90
@@ -0,0 +1,17 @@
+* TI-Nspire USB OTG Controller
+
+Required properties:
+- compatible: Should be "zevio,nspire-usb"
+- reg: Should contain registers location and length
+- interrupts: Should contain controller interrupt
+
+Recommended properies:
+- vbus-supply: regulator for vbus
+
+Examples:
+		usb0: usb at B0000000 {
+			reg = <0xB0000000 0x1000>;
+			compatible = "zevio,nspire-usb";
+			interrupts = <8>;
+			vbus-supply = <&vbus_reg>;
+		};
drivers/usb/chipidea/Makefile +1 -0
index a99d980..245ea4d 100644
@@ -10,6 +10,7 @@ ci_hdrc-$(CONFIG_USB_CHIPIDEA_DEBUG)	+= debug.o
 # Glue/Bridge layers go here
 
 obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_msm.o
+obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_nspire.o
 
 # PCI doesn't provide stubs, need to check
 ifneq ($(CONFIG_PCI),)
drivers/usb/chipidea/ci_hdrc_nspire.c new file +74 -0

74 lines not on this page · raw message

--
1.8.1.3

#1 lore raw
Quoted 6 lines · dt.tangr at gmail.com

From: Daniel Tang <[email protected]>

Changelog v2:
* Rename ci13xxx to ci_hdrc
* Fixed alignment issues

Quoted 8 lines

The USB controller in TI-NSPIRE calculators are based off either Freescale's USB OTG controller or the USB controller found in the IMX233, both of which are Chipidea compatible.

This patch adds a device tree binding for the controller.

---

Please put the "Changelog v2" here, the change log should not be in commit log, it is for review purpose.

drivers/usb/chipidea/ci_hdrc_nspire.c line 73

Quoted 7 lines
drivers/usb/chipidea/ci_hdrc_nspire.c new file +7 -0
+};
+
+MODULE_DEVICE_TABLE(of, ci_hdrc_nspire_dt_ids);
+module_platform_driver(ci_hdrc_nspire_driver);
+
+MODULE_ALIAS("platform:nspire_usb");
+MODULE_ALIAS("platform:ci_hdrc_nspire");

Just curious, why you need to two alias?

Signature · 2 lines
Best Regards,
Peter Chen
#2 lore raw

Hi,

Quoted 11 lines · Peter Chen

drivers/usb/chipidea/ci_hdrc_nspire.c line 73

Quoted 7 lines · dt.tangr at gmail.com
drivers/usb/chipidea/ci_hdrc_nspire.c new file +7 -0
+};
+
+MODULE_DEVICE_TABLE(of, ci_hdrc_nspire_dt_ids);
+module_platform_driver(ci_hdrc_nspire_driver);
+
+MODULE_ALIAS("platform:nspire_usb");
+MODULE_ALIAS("platform:ci_hdrc_nspire");

Just curious, why you need to two alias?

Oops, I must've forgotten to remove this. I'll remove it in the next patch.

Quoted 6 lines
Signature · 4 lines
-- 

Best Regards,
Peter Chen

Cheers,
Daniel Tang