linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] [PART 4/4] USB: ohci-da8xx: Add DT support
@ 2016-11-08 18:58 Axel Haslam
  2016-11-08 18:58 ` [PATCH 1/3] USB: ohci: da8xx: Add devicetree bindings Axel Haslam
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Axel Haslam @ 2016-11-08 18:58 UTC (permalink / raw)
  To: gregkh, stern, nsekhar, khilman, david, robh+dt
  Cc: linux-usb, linux-kernel, linux-arm-kernel, devicetree, Axel Haslam

This series defines the bindings and adds device tree support
for the davinci OHCI driver.

DEPENDENCIES:
1. [PATCH 0/3] fix ohci phy name
https://lkml.org/lkml/2016/11/2/208
2. [PATCH/RFC v2 0/3] regulator: handling of error conditions for usb drivers
https://lkml.org/lkml/2016/11/3/188
3. [PATCH v4 0/3] [PART 1/4] USB: ohci-da8xx: Allow a regulator for VBUS and over current
4. [PATCH 0/3] [PART 2/4] ARM: davinci: OHCI: Use a regulator instead of callbacks
5. [PATCH 0/2] [PART 3/4] USB: ohci-da8xx: Remove platform callbacks

A branch with all the dependencies can be found here:
https://github.com/axelhaslamx/linux-axel/commits/ohci-da8xx-dt-v4


Axel Haslam (3):
  USB: ohci: da8xx: Add devicetree bindings
  USB: ohci: da8xx: Allow probing from DT
  ARM: dts: da850: add usb device node

 .../devicetree/bindings/usb/ohci-da8xx.txt         | 39 ++++++++++++++++++++++
 arch/arm/boot/dts/da850-lcdk.dts                   |  8 +++++
 arch/arm/boot/dts/da850.dtsi                       |  8 +++++
 drivers/usb/host/ohci-da8xx.c                      |  8 +++++
 4 files changed, 63 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/ohci-da8xx.txt

-- 
2.10.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] USB: ohci: da8xx: Add devicetree bindings
  2016-11-08 18:58 [PATCH 0/3] [PART 4/4] USB: ohci-da8xx: Add DT support Axel Haslam
@ 2016-11-08 18:58 ` Axel Haslam
  2016-11-08 18:58 ` [PATCH 2/3] USB: ohci: da8xx: Allow probing from DT Axel Haslam
  2016-11-08 18:58 ` [PATCH 3/3] ARM: dts: da850: add usb device node Axel Haslam
  2 siblings, 0 replies; 5+ messages in thread
From: Axel Haslam @ 2016-11-08 18:58 UTC (permalink / raw)
  To: gregkh, stern, nsekhar, khilman, david, robh+dt
  Cc: linux-usb, linux-kernel, linux-arm-kernel, devicetree, Axel Haslam

This patch documents the device tree bindings required for
the ohci controller found in TI da8xx family of SoC's

Cc: devicetree@vger.kernel.org
Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
---
 .../devicetree/bindings/usb/ohci-da8xx.txt         | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/ohci-da8xx.txt

diff --git a/Documentation/devicetree/bindings/usb/ohci-da8xx.txt b/Documentation/devicetree/bindings/usb/ohci-da8xx.txt
new file mode 100644
index 0000000..66672e6
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ohci-da8xx.txt
@@ -0,0 +1,39 @@
+DA8XX USB OHCI controller
+
+Required properties:
+
+ - compatible: Should be "ti,da830-ohci"
+ - reg:        Should contain one register range i.e. start and length
+ - interrupts: Description of the interrupt line
+ - phys:       Phandle for the PHY device
+ - phy-names:  Should be "usb-phy"
+
+Optional properties:
+ - vbus-supply: Regulator that controls vbus power
+
+Example:
+
+reg_usb_ohci: regulator@0 {
+        compatible = "regulator-fixed";
+        gpio = <&gpio 109 0>;
+        over-current-gpios = <&gpio 36 0>;
+        regulator-boot-on;
+        enable-active-high;
+        regulator-name = "usb_ohci_vbus";
+        regulator-min-microvolt = <5000000>;
+        regulator-max-microvolt = <5000000>;
+};
+
+usb_phy: usb-phy {
+        compatible = "ti,da830-usb-phy";
+        #phy-cells = <1>;
+};
+
+ohci: usb@0225000 {
+        compatible = "ti,da830-ohci";
+        reg = <0x225000 0x1000>;
+        interrupts = <59>;
+        phys = <&usb_phy 1>;
+        phy-names = "usb-phy";
+        vbus-supply = <&reg_usb_ohci>;
+};
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] USB: ohci: da8xx: Allow probing from DT
  2016-11-08 18:58 [PATCH 0/3] [PART 4/4] USB: ohci-da8xx: Add DT support Axel Haslam
  2016-11-08 18:58 ` [PATCH 1/3] USB: ohci: da8xx: Add devicetree bindings Axel Haslam
@ 2016-11-08 18:58 ` Axel Haslam
  2016-11-08 18:58 ` [PATCH 3/3] ARM: dts: da850: add usb device node Axel Haslam
  2 siblings, 0 replies; 5+ messages in thread
From: Axel Haslam @ 2016-11-08 18:58 UTC (permalink / raw)
  To: gregkh, stern, nsekhar, khilman, david, robh+dt
  Cc: linux-usb, linux-kernel, linux-arm-kernel, devicetree, Axel Haslam

This adds the compatible string to the ohci driver
to be able to probe from DT

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
---
 drivers/usb/host/ohci-da8xx.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index 83b182e..bbfe342 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -321,6 +321,13 @@ static int ohci_da8xx_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 }
 
 /*-------------------------------------------------------------------------*/
+#ifdef CONFIG_OF
+static const struct of_device_id da8xx_ohci_ids[] = {
+	{ .compatible = "ti,da830-ohci" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, da8xx_ohci_ids);
+#endif
 
 static int ohci_da8xx_probe(struct platform_device *pdev)
 {
@@ -472,6 +479,7 @@ static struct platform_driver ohci_hcd_da8xx_driver = {
 #endif
 	.driver		= {
 		.name	= DRV_NAME,
+		.of_match_table = of_match_ptr(da8xx_ohci_ids),
 	},
 };
 
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ARM: dts: da850: add usb device node
  2016-11-08 18:58 [PATCH 0/3] [PART 4/4] USB: ohci-da8xx: Add DT support Axel Haslam
  2016-11-08 18:58 ` [PATCH 1/3] USB: ohci: da8xx: Add devicetree bindings Axel Haslam
  2016-11-08 18:58 ` [PATCH 2/3] USB: ohci: da8xx: Allow probing from DT Axel Haslam
@ 2016-11-08 18:58 ` Axel Haslam
  2016-11-08 20:34   ` kbuild test robot
  2 siblings, 1 reply; 5+ messages in thread
From: Axel Haslam @ 2016-11-08 18:58 UTC (permalink / raw)
  To: gregkh, stern, nsekhar, khilman, david, robh+dt
  Cc: linux-usb, linux-kernel, linux-arm-kernel, devicetree, Axel Haslam

This adds the ohci device node for the da850 soc.
It also enables it for the omapl138 hawk board.

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
---
 arch/arm/boot/dts/da850-lcdk.dts | 8 ++++++++
 arch/arm/boot/dts/da850.dtsi     | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts
index 7b8ab21..aaf533e 100644
--- a/arch/arm/boot/dts/da850-lcdk.dts
+++ b/arch/arm/boot/dts/da850-lcdk.dts
@@ -86,6 +86,14 @@
 	};
 };
 
+&usb_phy {
+	status = "okay";
+};
+
+&ohci {
+	status = "okay";
+};
+
 &serial2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&serial2_rxtx_pins>;
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 2534aab..c74f1a6 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -405,6 +405,14 @@
 					>;
 			status = "disabled";
 		};
+		ohci: usb@225000 {
+			compatible = "ti,da830-ohci";
+			reg = <0x225000 0x1000>;
+			interrupts = <59>;
+			phys = <&usb_phy 1>;
+			phy-names = "usb-phy";
+			status = "disabled";
+		};
 		gpio: gpio@226000 {
 			compatible = "ti,dm6441-gpio";
 			gpio-controller;
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] ARM: dts: da850: add usb device node
  2016-11-08 18:58 ` [PATCH 3/3] ARM: dts: da850: add usb device node Axel Haslam
@ 2016-11-08 20:34   ` kbuild test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2016-11-08 20:34 UTC (permalink / raw)
  To: Axel Haslam
  Cc: kbuild-all, gregkh, stern, nsekhar, khilman, david, robh+dt,
	linux-usb, linux-kernel, linux-arm-kernel, devicetree,
	Axel Haslam

[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]

Hi Axel,

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on next-20161108]
[cannot apply to robh/for-next v4.9-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Axel-Haslam/USB-ohci-da8xx-Add-devicetree-bindings/20161109-031338
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

>> Error: arch/arm/boot/dts/da850-lcdk.dts:89.1-9 Label or path usb_phy not found
   FATAL ERROR: Syntax error parsing input tree

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21781 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-08 20:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 18:58 [PATCH 0/3] [PART 4/4] USB: ohci-da8xx: Add DT support Axel Haslam
2016-11-08 18:58 ` [PATCH 1/3] USB: ohci: da8xx: Add devicetree bindings Axel Haslam
2016-11-08 18:58 ` [PATCH 2/3] USB: ohci: da8xx: Allow probing from DT Axel Haslam
2016-11-08 18:58 ` [PATCH 3/3] ARM: dts: da850: add usb device node Axel Haslam
2016-11-08 20:34   ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).