All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH_V4 0/3] usb: ohci: jz4740: Add DT support and a fix
@ 2015-02-03 10:17 ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:17 UTC (permalink / raw)
  To: stern; +Cc: gregkh, lars, devicetree, linux-kernel, linux-usb, Zubair.Kakakhel

Hi,

Here are a few simple patches for the jz4740.

First adds a simple DT binding.
Seconds adds DT support.
Third is a minor fix in clock enabling.

Patches are based on 3.19-rc7. Quite disjoint and stay within jz4740 
so should apply easily on other trees.

If you would like to have them rebased to a different tree, please tell.

Thank-you

V4 changes
Removed clk bindings. They can be added later when the work on jz4740 clks
is done. Rather than add bindings now and change later.

V3 changes
DT corrections. Added ACKS for 2 and 3.

V2 changes
Removed an interrupt parent binding. Forgot a binding
Unprepared clock when disabling

ZubairLK

Paul Burton (3):
  dt: usb: jz4740: Add DT binding document for OHCI
  usb: ohci: jz4740: add DT support
  usb: ohci: jz4740: prepare the clock before enabling it

 .../devicetree/bindings/usb/ingenic,jz4740-ohci.txt | 21 +++++++++++++++++++++
 drivers/usb/host/ohci-jz4740.c                      | 15 ++++++++++++---
 2 files changed, 33 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt

-- 
1.9.1


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

* [PATCH_V4 0/3] usb: ohci: jz4740: Add DT support and a fix
@ 2015-02-03 10:17 ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:17 UTC (permalink / raw)
  To: stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz
  Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	lars-Qo5EllUWu/uELgA04lAiVw, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA

Hi,

Here are a few simple patches for the jz4740.

First adds a simple DT binding.
Seconds adds DT support.
Third is a minor fix in clock enabling.

Patches are based on 3.19-rc7. Quite disjoint and stay within jz4740 
so should apply easily on other trees.

If you would like to have them rebased to a different tree, please tell.

Thank-you

V4 changes
Removed clk bindings. They can be added later when the work on jz4740 clks
is done. Rather than add bindings now and change later.

V3 changes
DT corrections. Added ACKS for 2 and 3.

V2 changes
Removed an interrupt parent binding. Forgot a binding
Unprepared clock when disabling

ZubairLK

Paul Burton (3):
  dt: usb: jz4740: Add DT binding document for OHCI
  usb: ohci: jz4740: add DT support
  usb: ohci: jz4740: prepare the clock before enabling it

 .../devicetree/bindings/usb/ingenic,jz4740-ohci.txt | 21 +++++++++++++++++++++
 drivers/usb/host/ohci-jz4740.c                      | 15 ++++++++++++---
 2 files changed, 33 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
  2015-02-03 10:17 ` Zubair Lutfullah Kakakhel
@ 2015-02-03 10:17   ` Zubair Lutfullah Kakakhel
  -1 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:17 UTC (permalink / raw)
  To: stern; +Cc: gregkh, lars, devicetree, linux-kernel, linux-usb, Zubair.Kakakhel

From: Paul Burton <paul.burton@imgtec.com>

Add the binding documentation for the JZ4740 OHCI controller.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>

---
The jz4740 is platform only at the moment.

But DT support is being added

See http://patchwork.linux-mips.org/bundle/paulburton/ci20-v3.20/

V4 Changes
Removed clock binding because of pending work in clock tree. Will add
binding later. Rather than introduce a bad binding now and change later.

V3 Changes: named binding jz4740 instead of confusing it with jz47xx.
The driver name is jz4740. And will not be renamed

V2 Changes: Removed interrupt parent binding as that can be inherited.
Forgot a binding for clock-names
---
 .../devicetree/bindings/usb/ingenic,jz4740-ohci.txt | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt

diff --git a/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt b/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt
new file mode 100644
index 0000000..29c1934
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt
@@ -0,0 +1,21 @@
+Ingenic JZ4740 SoC OHCI controller binding
+
+The Ingenic JZ4740 SoC includes an OHCI compliant USB host controller
+interface for use with USB 1.1 devices.
+
+Required properties:
+ - compatible: Should be "ingenic,jz4740-ohci"
+ - reg: Should contain the address & size of the OHCI controller registers.
+ - interrupts: Should specify the interrupt line number
+
+Example for jz4740:
+
+/ {
+	ohci: jz4780-ohci@0x134a0000 {
+		compatible = "ingenic,jz4740-ohci";
+		reg = <0x134a0000 0x10000>;
+
+		interrupts = <5>;
+	};
+};
+
-- 
1.9.1


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

* [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
@ 2015-02-03 10:17   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:17 UTC (permalink / raw)
  To: stern; +Cc: gregkh, lars, devicetree, linux-kernel, linux-usb, Zubair.Kakakhel

From: Paul Burton <paul.burton@imgtec.com>

Add the binding documentation for the JZ4740 OHCI controller.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>

---
The jz4740 is platform only at the moment.

But DT support is being added

See http://patchwork.linux-mips.org/bundle/paulburton/ci20-v3.20/

V4 Changes
Removed clock binding because of pending work in clock tree. Will add
binding later. Rather than introduce a bad binding now and change later.

V3 Changes: named binding jz4740 instead of confusing it with jz47xx.
The driver name is jz4740. And will not be renamed

V2 Changes: Removed interrupt parent binding as that can be inherited.
Forgot a binding for clock-names
---
 .../devicetree/bindings/usb/ingenic,jz4740-ohci.txt | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt

diff --git a/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt b/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt
new file mode 100644
index 0000000..29c1934
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt
@@ -0,0 +1,21 @@
+Ingenic JZ4740 SoC OHCI controller binding
+
+The Ingenic JZ4740 SoC includes an OHCI compliant USB host controller
+interface for use with USB 1.1 devices.
+
+Required properties:
+ - compatible: Should be "ingenic,jz4740-ohci"
+ - reg: Should contain the address & size of the OHCI controller registers.
+ - interrupts: Should specify the interrupt line number
+
+Example for jz4740:
+
+/ {
+	ohci: jz4780-ohci@0x134a0000 {
+		compatible = "ingenic,jz4740-ohci";
+		reg = <0x134a0000 0x10000>;
+
+		interrupts = <5>;
+	};
+};
+
-- 
1.9.1

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

* [PATCH_V4 2/3] usb: ohci: jz4740: add DT support
  2015-02-03 10:17 ` Zubair Lutfullah Kakakhel
@ 2015-02-03 10:17   ` Zubair Lutfullah Kakakhel
  -1 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:17 UTC (permalink / raw)
  To: stern; +Cc: gregkh, lars, devicetree, linux-kernel, linux-usb, Zubair.Kakakhel

From: Paul Burton <paul.burton@imgtec.com>

This is a simple matter of providing a match table, the probe code needs
no modification.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
---
 drivers/usb/host/ohci-jz4740.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/host/ohci-jz4740.c b/drivers/usb/host/ohci-jz4740.c
index 8ddd8f5..bb69733 100644
--- a/drivers/usb/host/ohci-jz4740.c
+++ b/drivers/usb/host/ohci-jz4740.c
@@ -234,11 +234,20 @@ static int jz4740_ohci_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id jz4740_ohci_of_match[] = {
+	{ .compatible = "ingenic,jz4740-ohci", },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, jz4740_ohci_of_match);
+#endif
+
 static struct platform_driver ohci_hcd_jz4740_driver = {
 	.probe = jz4740_ohci_probe,
 	.remove = jz4740_ohci_remove,
 	.driver = {
 		.name = "jz4740-ohci",
+		.of_match_table = of_match_ptr(jz4740_ohci_of_match),
 		.owner = THIS_MODULE,
 	},
 };
-- 
1.9.1


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

* [PATCH_V4 2/3] usb: ohci: jz4740: add DT support
@ 2015-02-03 10:17   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:17 UTC (permalink / raw)
  To: stern; +Cc: gregkh, lars, devicetree, linux-kernel, linux-usb, Zubair.Kakakhel

From: Paul Burton <paul.burton@imgtec.com>

This is a simple matter of providing a match table, the probe code needs
no modification.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
---
 drivers/usb/host/ohci-jz4740.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/host/ohci-jz4740.c b/drivers/usb/host/ohci-jz4740.c
index 8ddd8f5..bb69733 100644
--- a/drivers/usb/host/ohci-jz4740.c
+++ b/drivers/usb/host/ohci-jz4740.c
@@ -234,11 +234,20 @@ static int jz4740_ohci_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id jz4740_ohci_of_match[] = {
+	{ .compatible = "ingenic,jz4740-ohci", },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, jz4740_ohci_of_match);
+#endif
+
 static struct platform_driver ohci_hcd_jz4740_driver = {
 	.probe = jz4740_ohci_probe,
 	.remove = jz4740_ohci_remove,
 	.driver = {
 		.name = "jz4740-ohci",
+		.of_match_table = of_match_ptr(jz4740_ohci_of_match),
 		.owner = THIS_MODULE,
 	},
 };
-- 
1.9.1

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

* [PATCH_V4 3/3] usb: ohci: jz4740: prepare the clock before enabling it
  2015-02-03 10:17 ` Zubair Lutfullah Kakakhel
@ 2015-02-03 10:17   ` Zubair Lutfullah Kakakhel
  -1 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:17 UTC (permalink / raw)
  To: stern; +Cc: gregkh, lars, devicetree, linux-kernel, linux-usb, Zubair.Kakakhel

From: Paul Burton <paul.burton@imgtec.com>

The clock must have been prepared before enabling it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>

--
V2 changes. Add disable_unprepare as well
---
 drivers/usb/host/ohci-jz4740.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ohci-jz4740.c b/drivers/usb/host/ohci-jz4740.c
index bb69733..129f6b9 100644
--- a/drivers/usb/host/ohci-jz4740.c
+++ b/drivers/usb/host/ohci-jz4740.c
@@ -189,7 +189,7 @@ static int jz4740_ohci_probe(struct platform_device *pdev)
 
 
 	clk_set_rate(jz4740_ohci->clk, 48000000);
-	clk_enable(jz4740_ohci->clk);
+	clk_prepare_enable(jz4740_ohci->clk);
 	if (jz4740_ohci->vbus)
 		ohci_jz4740_set_vbus_power(jz4740_ohci, true);
 
@@ -209,7 +209,7 @@ static int jz4740_ohci_probe(struct platform_device *pdev)
 err_disable:
 	if (jz4740_ohci->vbus)
 		regulator_disable(jz4740_ohci->vbus);
-	clk_disable(jz4740_ohci->clk);
+	clk_disable_unprepare(jz4740_ohci->clk);
 
 err_free:
 	usb_put_hcd(hcd);
@@ -227,7 +227,7 @@ static int jz4740_ohci_remove(struct platform_device *pdev)
 	if (jz4740_ohci->vbus)
 		regulator_disable(jz4740_ohci->vbus);
 
-	clk_disable(jz4740_ohci->clk);
+	clk_disable_unprepare(jz4740_ohci->clk);
 
 	usb_put_hcd(hcd);
 
-- 
1.9.1


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

* [PATCH_V4 3/3] usb: ohci: jz4740: prepare the clock before enabling it
@ 2015-02-03 10:17   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:17 UTC (permalink / raw)
  To: stern; +Cc: gregkh, lars, devicetree, linux-kernel, linux-usb, Zubair.Kakakhel

From: Paul Burton <paul.burton@imgtec.com>

The clock must have been prepared before enabling it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>

--
V2 changes. Add disable_unprepare as well
---
 drivers/usb/host/ohci-jz4740.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ohci-jz4740.c b/drivers/usb/host/ohci-jz4740.c
index bb69733..129f6b9 100644
--- a/drivers/usb/host/ohci-jz4740.c
+++ b/drivers/usb/host/ohci-jz4740.c
@@ -189,7 +189,7 @@ static int jz4740_ohci_probe(struct platform_device *pdev)
 
 
 	clk_set_rate(jz4740_ohci->clk, 48000000);
-	clk_enable(jz4740_ohci->clk);
+	clk_prepare_enable(jz4740_ohci->clk);
 	if (jz4740_ohci->vbus)
 		ohci_jz4740_set_vbus_power(jz4740_ohci, true);
 
@@ -209,7 +209,7 @@ static int jz4740_ohci_probe(struct platform_device *pdev)
 err_disable:
 	if (jz4740_ohci->vbus)
 		regulator_disable(jz4740_ohci->vbus);
-	clk_disable(jz4740_ohci->clk);
+	clk_disable_unprepare(jz4740_ohci->clk);
 
 err_free:
 	usb_put_hcd(hcd);
@@ -227,7 +227,7 @@ static int jz4740_ohci_remove(struct platform_device *pdev)
 	if (jz4740_ohci->vbus)
 		regulator_disable(jz4740_ohci->vbus);
 
-	clk_disable(jz4740_ohci->clk);
+	clk_disable_unprepare(jz4740_ohci->clk);
 
 	usb_put_hcd(hcd);
 
-- 
1.9.1

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

* Re: [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
@ 2015-02-03 10:32     ` Lars-Peter Clausen
  0 siblings, 0 replies; 16+ messages in thread
From: Lars-Peter Clausen @ 2015-02-03 10:32 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel, stern
  Cc: gregkh, devicetree, linux-kernel, linux-usb

On 02/03/2015 11:17 AM, Zubair Lutfullah Kakakhel wrote:
[...]
> V4 Changes
> Removed clock binding because of pending work in clock tree. Will add
> binding later. Rather than introduce a bad binding now and change later.

But this patch is introducing a bad binding. The part needs the clock to 
work. The binding you are specifying right now says that it works fine 
without any clocks.

 > [...]
> +Example for jz4740:
> +
> +/ {
> +	ohci: jz4780-ohci@0x134a0000 {

s/jz4780/jz4740

> +		compatible = "ingenic,jz4740-ohci";
> +		reg = <0x134a0000 0x10000>;
> +
> +		interrupts = <5>;
> +	};
> +};
> +
>


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

* Re: [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
@ 2015-02-03 10:32     ` Lars-Peter Clausen
  0 siblings, 0 replies; 16+ messages in thread
From: Lars-Peter Clausen @ 2015-02-03 10:32 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz
  Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

On 02/03/2015 11:17 AM, Zubair Lutfullah Kakakhel wrote:
[...]
> V4 Changes
> Removed clock binding because of pending work in clock tree. Will add
> binding later. Rather than introduce a bad binding now and change later.

But this patch is introducing a bad binding. The part needs the clock to 
work. The binding you are specifying right now says that it works fine 
without any clocks.

 > [...]
> +Example for jz4740:
> +
> +/ {
> +	ohci: jz4780-ohci@0x134a0000 {

s/jz4780/jz4740

> +		compatible = "ingenic,jz4740-ohci";
> +		reg = <0x134a0000 0x10000>;
> +
> +		interrupts = <5>;
> +	};
> +};
> +
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
  2015-02-03 10:32     ` Lars-Peter Clausen
@ 2015-02-03 10:53       ` Zubair Lutfullah Kakakhel
  -1 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:53 UTC (permalink / raw)
  To: Lars-Peter Clausen, stern; +Cc: gregkh, devicetree, linux-kernel, linux-usb


On 03/02/15 10:32, Lars-Peter Clausen wrote:
> On 02/03/2015 11:17 AM, Zubair Lutfullah Kakakhel wrote:
> [...]
>> V4 Changes
>> Removed clock binding because of pending work in clock tree. Will add
>> binding later. Rather than introduce a bad binding now and change later.
> 
> But this patch is introducing a bad binding. The part needs the clock to work. The binding you are specifying right now says that it works fine without any clocks.

Facing a chicken and egg problem with these patches here..

When the new clock driver gets in we can add the correct clock binding and replace
devm_clk_get(&pdev->dev, "uhc"); with devm_clk_get(&pdev->dev, NULL);

Specifying the current binding got NAKed by Arnd who mentioned that clock names shouldn't be needed as required properties.
And even if needed, then it shouldn't be "uhc" and more close to what other ohci drivers have.

Hence rather than bad binding now, we'll add a binding later..

> 
>> [...]
>> +Example for jz4740:
>> +
>> +/ {
>> +    ohci: jz4780-ohci@0x134a0000 {
> 
> s/jz4780/jz4740

Thanks

ZubairLK

> 
>> +        compatible = "ingenic,jz4740-ohci";
>> +        reg = <0x134a0000 0x10000>;
>> +
>> +        interrupts = <5>;
>> +    };
>> +};
>> +
>>
> 

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

* Re: [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
@ 2015-02-03 10:53       ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 16+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2015-02-03 10:53 UTC (permalink / raw)
  To: Lars-Peter Clausen, stern; +Cc: gregkh, devicetree, linux-kernel, linux-usb


On 03/02/15 10:32, Lars-Peter Clausen wrote:
> On 02/03/2015 11:17 AM, Zubair Lutfullah Kakakhel wrote:
> [...]
>> V4 Changes
>> Removed clock binding because of pending work in clock tree. Will add
>> binding later. Rather than introduce a bad binding now and change later.
> 
> But this patch is introducing a bad binding. The part needs the clock to work. The binding you are specifying right now says that it works fine without any clocks.

Facing a chicken and egg problem with these patches here..

When the new clock driver gets in we can add the correct clock binding and replace
devm_clk_get(&pdev->dev, "uhc"); with devm_clk_get(&pdev->dev, NULL);

Specifying the current binding got NAKed by Arnd who mentioned that clock names shouldn't be needed as required properties.
And even if needed, then it shouldn't be "uhc" and more close to what other ohci drivers have.

Hence rather than bad binding now, we'll add a binding later..

> 
>> [...]
>> +Example for jz4740:
>> +
>> +/ {
>> +    ohci: jz4780-ohci@0x134a0000 {
> 
> s/jz4780/jz4740

Thanks

ZubairLK

> 
>> +        compatible = "ingenic,jz4740-ohci";
>> +        reg = <0x134a0000 0x10000>;
>> +
>> +        interrupts = <5>;
>> +    };
>> +};
>> +
>>
> 

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

* Re: [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
@ 2015-02-03 11:54     ` Sergei Shtylyov
  0 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2015-02-03 11:54 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel, stern
  Cc: gregkh, lars, devicetree, linux-kernel, linux-usb

Hello.

On 2/3/2015 1:17 PM, Zubair Lutfullah Kakakhel wrote:

> From: Paul Burton <paul.burton@imgtec.com>

> Add the binding documentation for the JZ4740 OHCI controller.

> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>

[...]

> diff --git a/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt b/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt
> new file mode 100644
> index 0000000..29c1934
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt
> @@ -0,0 +1,21 @@
> +Ingenic JZ4740 SoC OHCI controller binding
> +
> +The Ingenic JZ4740 SoC includes an OHCI compliant USB host controller
> +interface for use with USB 1.1 devices.
> +
> +Required properties:
> + - compatible: Should be "ingenic,jz4740-ohci"
> + - reg: Should contain the address & size of the OHCI controller registers.
> + - interrupts: Should specify the interrupt line number
> +
> +Example for jz4740:
> +
> +/ {
> +	ohci: jz4780-ohci@0x134a0000 {

    The name should be "usb@134a0000", according to the ePAPR standard.

[...]

WBR, Sergei


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

* Re: [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
@ 2015-02-03 11:54     ` Sergei Shtylyov
  0 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2015-02-03 11:54 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz
  Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	lars-Qo5EllUWu/uELgA04lAiVw, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

Hello.

On 2/3/2015 1:17 PM, Zubair Lutfullah Kakakhel wrote:

> From: Paul Burton <paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>

> Add the binding documentation for the JZ4740 OHCI controller.

> Signed-off-by: Paul Burton <paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>

[...]

> diff --git a/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt b/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt
> new file mode 100644
> index 0000000..29c1934
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/ingenic,jz4740-ohci.txt
> @@ -0,0 +1,21 @@
> +Ingenic JZ4740 SoC OHCI controller binding
> +
> +The Ingenic JZ4740 SoC includes an OHCI compliant USB host controller
> +interface for use with USB 1.1 devices.
> +
> +Required properties:
> + - compatible: Should be "ingenic,jz4740-ohci"
> + - reg: Should contain the address & size of the OHCI controller registers.
> + - interrupts: Should specify the interrupt line number
> +
> +Example for jz4740:
> +
> +/ {
> +	ohci: jz4780-ohci@0x134a0000 {

    The name should be "usb@134a0000", according to the ePAPR standard.

[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
@ 2015-02-03 15:13         ` Lars-Peter Clausen
  0 siblings, 0 replies; 16+ messages in thread
From: Lars-Peter Clausen @ 2015-02-03 15:13 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel, stern
  Cc: gregkh, devicetree, linux-kernel, linux-usb

On 02/03/2015 11:53 AM, Zubair Lutfullah Kakakhel wrote:
>
> On 03/02/15 10:32, Lars-Peter Clausen wrote:
>> On 02/03/2015 11:17 AM, Zubair Lutfullah Kakakhel wrote:
>> [...]
>>> V4 Changes
>>> Removed clock binding because of pending work in clock tree. Will add
>>> binding later. Rather than introduce a bad binding now and change later.
>>
>> But this patch is introducing a bad binding. The part needs the clock to work. The binding you are specifying right now says that it works fine without any clocks.
>
> Facing a chicken and egg problem with these patches here..
>
> When the new clock driver gets in we can add the correct clock binding and replace
> devm_clk_get(&pdev->dev, "uhc"); with devm_clk_get(&pdev->dev, NULL);
>
> Specifying the current binding got NAKed by Arnd who mentioned that clock names shouldn't be needed as required properties.
> And even if needed, then it shouldn't be "uhc" and more close to what other ohci drivers have.

It's not a chicken and egg problem. The order is very clear, first convert 
the clock driver to the CCF, then update the driver to pass NULL instead of 
"uhc", then add the devicetree bindings.

- Lars


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

* Re: [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI
@ 2015-02-03 15:13         ` Lars-Peter Clausen
  0 siblings, 0 replies; 16+ messages in thread
From: Lars-Peter Clausen @ 2015-02-03 15:13 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz
  Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

On 02/03/2015 11:53 AM, Zubair Lutfullah Kakakhel wrote:
>
> On 03/02/15 10:32, Lars-Peter Clausen wrote:
>> On 02/03/2015 11:17 AM, Zubair Lutfullah Kakakhel wrote:
>> [...]
>>> V4 Changes
>>> Removed clock binding because of pending work in clock tree. Will add
>>> binding later. Rather than introduce a bad binding now and change later.
>>
>> But this patch is introducing a bad binding. The part needs the clock to work. The binding you are specifying right now says that it works fine without any clocks.
>
> Facing a chicken and egg problem with these patches here..
>
> When the new clock driver gets in we can add the correct clock binding and replace
> devm_clk_get(&pdev->dev, "uhc"); with devm_clk_get(&pdev->dev, NULL);
>
> Specifying the current binding got NAKed by Arnd who mentioned that clock names shouldn't be needed as required properties.
> And even if needed, then it shouldn't be "uhc" and more close to what other ohci drivers have.

It's not a chicken and egg problem. The order is very clear, first convert 
the clock driver to the CCF, then update the driver to pass NULL instead of 
"uhc", then add the devicetree bindings.

- Lars

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-02-03 15:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 10:17 [PATCH_V4 0/3] usb: ohci: jz4740: Add DT support and a fix Zubair Lutfullah Kakakhel
2015-02-03 10:17 ` Zubair Lutfullah Kakakhel
2015-02-03 10:17 ` [PATCH_V4 1/3] dt: usb: jz4740: Add DT binding document for OHCI Zubair Lutfullah Kakakhel
2015-02-03 10:17   ` Zubair Lutfullah Kakakhel
2015-02-03 10:32   ` Lars-Peter Clausen
2015-02-03 10:32     ` Lars-Peter Clausen
2015-02-03 10:53     ` Zubair Lutfullah Kakakhel
2015-02-03 10:53       ` Zubair Lutfullah Kakakhel
2015-02-03 15:13       ` Lars-Peter Clausen
2015-02-03 15:13         ` Lars-Peter Clausen
2015-02-03 11:54   ` Sergei Shtylyov
2015-02-03 11:54     ` Sergei Shtylyov
2015-02-03 10:17 ` [PATCH_V4 2/3] usb: ohci: jz4740: add DT support Zubair Lutfullah Kakakhel
2015-02-03 10:17   ` Zubair Lutfullah Kakakhel
2015-02-03 10:17 ` [PATCH_V4 3/3] usb: ohci: jz4740: prepare the clock before enabling it Zubair Lutfullah Kakakhel
2015-02-03 10:17   ` Zubair Lutfullah Kakakhel

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.