* [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding
@ 2012-09-01 9:26 Andrew Lunn
2012-09-01 9:26 ` [PATCH 2/2] ARM: Kirkwood: Convert all DT boards to EHCI via DT Andrew Lunn
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Andrew Lunn @ 2012-09-01 9:26 UTC (permalink / raw)
To: linux-arm-kernel
Based on previous work by Michael Walle and Jason Cooper.
Made their work actually work, which required added interrupt from DT
and auxdata, along with setting the dma_mask, which DT does not
currently do.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
.../devicetree/bindings/usb/ehci-orion.txt | 19 +++++++
drivers/usb/host/ehci-orion.c | 59 +++++++++++++++++++-
2 files changed, 75 insertions(+), 3 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/ehci-orion.txt
diff --git a/Documentation/devicetree/bindings/usb/ehci-orion.txt b/Documentation/devicetree/bindings/usb/ehci-orion.txt
new file mode 100644
index 0000000..1bd704e
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ehci-orion.txt
@@ -0,0 +1,19 @@
+* EHCI controller, Orion Marvell variants
+
+Required properties:
+- compatible: must be "marvell,orion-ehci"
+- reg: physical base address of the controller and length of memory mapped
+ region.
+- interrupts: The EHCI interrupt
+- phy-version: Can be one of:
+ "NA" - Don't touch the phy, something else has already configured it.
+ "orion5x" - PHY setup as specified by the Orion5x Errata
+
+Example:
+
+ ehci at 50000 {
+ compatible = "marvell,orion-ehci";
+ reg = <0x50000 0x1000>;
+ interrupts = <19>;
+ phy-version = "NA";
+ };
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index b34b928..605feb09 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -14,6 +14,9 @@
#include <linux/mbus.h>
#include <linux/clk.h>
#include <linux/platform_data/ehci-orion.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_irq.h>
#define rdl(off) __raw_readl(hcd->regs + (off))
#define wrl(off, val) __raw_writel((val), hcd->regs + (off))
@@ -181,6 +184,27 @@ ehci_orion_conf_mbus_windows(struct usb_hcd *hcd,
}
}
+static const int get_phy_version(struct device_node *np)
+{
+ const char *pm;
+ int err;
+
+ err = of_property_read_string(np, "phy-version", &pm);
+
+ if (err < 0)
+ return err;
+
+
+ if (!strcasecmp(pm, "NA"))
+ return EHCI_PHY_NA;
+ if (!strcasecmp(pm, "orion5x"))
+ return EHCI_PHY_ORION;
+
+ return -ENODEV;
+}
+
+static u64 ehci_orion_dma_mask = DMA_BIT_MASK(32);
+
static int __devinit ehci_orion_drv_probe(struct platform_device *pdev)
{
struct orion_ehci_data *pd = pdev->dev.platform_data;
@@ -191,13 +215,17 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev)
struct clk *clk;
void __iomem *regs;
int irq, err;
+ enum orion_ehci_phy_ver phy_version;
if (usb_disabled())
return -ENODEV;
pr_debug("Initializing Orion-SoC USB Host Controller\n");
- irq = platform_get_irq(pdev, 0);
+ if (pdev->dev.of_node)
+ irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
+ else
+ irq = platform_get_irq(pdev, 0);
if (irq <= 0) {
dev_err(&pdev->dev,
"Found HC with no IRQ. Check %s setup!\n",
@@ -215,6 +243,14 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev)
goto err1;
}
+ /*
+ * Right now device-tree probed devices don't get dma_mask
+ * set. Since shared usb code relies on it, set it here for
+ * now. Once we have dma capability bindings this can go away.
+ */
+ if (!pdev->dev.dma_mask)
+ pdev->dev.dma_mask = &ehci_orion_dma_mask;
+
if (!request_mem_region(res->start, resource_size(res),
ehci_orion_hc_driver.description)) {
dev_dbg(&pdev->dev, "controller already in use\n");
@@ -262,7 +298,14 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev)
/*
* setup Orion USB controller.
*/
- switch (pd->phy_version) {
+ if (pdev->dev.of_node) {
+ phy_version = get_phy_version(pdev->dev.of_node);
+ if (phy_version < 0)
+ goto err3;
+ } else
+ phy_version = pd->phy_version;
+
+ switch (phy_version) {
case EHCI_PHY_NA: /* dont change USB phy settings */
break;
case EHCI_PHY_ORION:
@@ -317,9 +360,19 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev)
MODULE_ALIAS("platform:orion-ehci");
+static const struct of_device_id ehci_orion_dt_ids[] __devinitdata = {
+ { .compatible = "marvell,orion-ehci", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, ehci_orion_dt_ids);
+
static struct platform_driver ehci_orion_driver = {
.probe = ehci_orion_drv_probe,
.remove = __exit_p(ehci_orion_drv_remove),
.shutdown = usb_hcd_platform_shutdown,
- .driver.name = "orion-ehci",
+ .driver = {
+ .name = "orion-ehci",
+ .owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(ehci_orion_dt_ids),
+ },
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] ARM: Kirkwood: Convert all DT boards to EHCI via DT.
2012-09-01 9:26 [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding Andrew Lunn
@ 2012-09-01 9:26 ` Andrew Lunn
2012-09-09 19:12 ` Jason Cooper
2012-09-03 6:56 ` [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding Sebastian Hesselbarth
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Andrew Lunn @ 2012-09-01 9:26 UTC (permalink / raw)
To: linux-arm-kernel
Now that the EHCI driver has DT support, drop old style configuration
of it and add DT in its place. Since all the boards enable the EHCI,
enable it by default in kirkwood.dtsi. Any new boards which don't have
USB can specifically disable it.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/boot/dts/kirkwood.dtsi | 8 ++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 1 -
arch/arm/mach-kirkwood/board-dockstar.c | 1 -
arch/arm/mach-kirkwood/board-dreamplug.c | 1 -
arch/arm/mach-kirkwood/board-dt.c | 1 +
arch/arm/mach-kirkwood/board-goflexnet.c | 1 -
arch/arm/mach-kirkwood/board-ib62x0.c | 1 -
arch/arm/mach-kirkwood/board-iconnect.c | 1 -
arch/arm/mach-kirkwood/board-iomega_ix2_200.c | 2 --
arch/arm/mach-kirkwood/board-lsxl.c | 1 -
arch/arm/mach-kirkwood/board-ts219.c | 1 -
11 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index cef9616..b36bb85 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -76,6 +76,14 @@
status = "okay";
};
+ ehci at 50000 {
+ compatible = "marvell,orion-ehci";
+ reg = <0x50000 0x1000>;
+ interrupts = <19>;
+ phy-version = "NA";
+ status = "okay";
+ };
+
sata at 80000 {
compatible = "marvell,orion-sata";
reg = <0x80000 0x5000>;
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 8103961..0fc78a6 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -111,7 +111,6 @@ void __init dnskw_init(void)
{
kirkwood_mpp_conf(dnskw_mpp_config);
- kirkwood_ehci_init();
kirkwood_ge00_init(&dnskw_ge00_data);
platform_device_register(&dnskw_fan_device);
diff --git a/arch/arm/mach-kirkwood/board-dockstar.c b/arch/arm/mach-kirkwood/board-dockstar.c
index ed35c12..08835fa 100644
--- a/arch/arm/mach-kirkwood/board-dockstar.c
+++ b/arch/arm/mach-kirkwood/board-dockstar.c
@@ -55,7 +55,6 @@ void __init dockstar_dt_init(void)
if (gpio_request(29, "USB Power Enable") != 0 ||
gpio_direction_output(29, 1) != 0)
pr_err("can't setup GPIO 29 (USB Power Enable)\n");
- kirkwood_ehci_init();
kirkwood_ge00_init(&dockstar_ge00_data);
}
diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c
index b5a4922..66c5ac8 100644
--- a/arch/arm/mach-kirkwood/board-dreamplug.c
+++ b/arch/arm/mach-kirkwood/board-dreamplug.c
@@ -64,7 +64,6 @@ void __init dreamplug_init(void)
*/
kirkwood_mpp_conf(dreamplug_mpp_config);
- kirkwood_ehci_init();
kirkwood_ge00_init(&dreamplug_ge00_data);
kirkwood_ge01_init(&dreamplug_ge01_data);
kirkwood_sdio_init(&dreamplug_mvsdio_data);
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 30a4caa..16b767e 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -33,6 +33,7 @@ struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL),
+ OF_DEV_AUXDATA("marvell,orion-ehci", 0xf1050000, "orion-ehci.0", NULL),
{},
};
diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c
index 52cde7c..6c1e353 100644
--- a/arch/arm/mach-kirkwood/board-goflexnet.c
+++ b/arch/arm/mach-kirkwood/board-goflexnet.c
@@ -65,7 +65,6 @@ void __init goflexnet_init(void)
if (gpio_request(29, "USB Power Enable") != 0 ||
gpio_direction_output(29, 1) != 0)
pr_err("can't setup GPIO 29 (USB Power Enable)\n");
- kirkwood_ehci_init();
kirkwood_ge00_init(&goflexnet_ge00_data);
}
diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c
index 4304a44..4baedae 100644
--- a/arch/arm/mach-kirkwood/board-ib62x0.c
+++ b/arch/arm/mach-kirkwood/board-ib62x0.c
@@ -61,7 +61,6 @@ void __init ib62x0_init(void)
*/
kirkwood_mpp_conf(ib62x0_mpp_config);
- kirkwood_ehci_init();
kirkwood_ge00_init(&ib62x0_ge00_data);
if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 &&
gpio_direction_output(IB62X0_GPIO_POWER_OFF, 0) == 0)
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c
index 71a6cc0..b6b89ea 100644
--- a/arch/arm/mach-kirkwood/board-iconnect.c
+++ b/arch/arm/mach-kirkwood/board-iconnect.c
@@ -46,7 +46,6 @@ void __init iconnect_init(void)
{
kirkwood_mpp_conf(iconnect_mpp_config);
- kirkwood_ehci_init();
kirkwood_ge00_init(&iconnect_ge00_data);
}
diff --git a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c
index 8f506af..f9900fa 100644
--- a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c
+++ b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c
@@ -51,7 +51,5 @@ void __init iomega_ix2_200_init(void)
*/
kirkwood_mpp_conf(iomega_ix2_200_mpp_config);
- kirkwood_ehci_init();
-
kirkwood_ge01_init(&iomega_ix2_200_ge00_data);
}
diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c
index bf247f0..d8cd69a5 100644
--- a/arch/arm/mach-kirkwood/board-lsxl.c
+++ b/arch/arm/mach-kirkwood/board-lsxl.c
@@ -125,7 +125,6 @@ void __init lsxl_init(void)
gpio_set_value(LSXL_GPIO_USB_POWER, 1);
gpio_set_value(LSXL_GPIO_HDD_POWER, 1);
- kirkwood_ehci_init();
kirkwood_ge00_init(&lsxl_ge00_data);
kirkwood_ge01_init(&lsxl_ge01_data);
platform_device_register(&lsxl_fan_device);
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c
index 304ba38..98eb3c2 100644
--- a/arch/arm/mach-kirkwood/board-ts219.c
+++ b/arch/arm/mach-kirkwood/board-ts219.c
@@ -66,7 +66,6 @@ void __init qnap_dt_ts219_init(void)
qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
kirkwood_ge00_init(&qnap_ts219_ge00_data);
- kirkwood_ehci_init();
pm_power_off = qnap_tsx1x_power_off;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding
2012-09-01 9:26 [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding Andrew Lunn
2012-09-01 9:26 ` [PATCH 2/2] ARM: Kirkwood: Convert all DT boards to EHCI via DT Andrew Lunn
@ 2012-09-03 6:56 ` Sebastian Hesselbarth
2012-09-04 15:06 ` Alan Stern
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Sebastian Hesselbarth @ 2012-09-03 6:56 UTC (permalink / raw)
To: linux-arm-kernel
On 09/01/2012 11:26 AM, Andrew Lunn wrote:
> Based on previous work by Michael Walle and Jason Cooper.
>
> Made their work actually work, which required added interrupt from DT
> and auxdata, along with setting the dma_mask, which DT does not
> currently do.
Andrew,
you can add a
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
for DT-enabled Dove on both ehci controllers.
One thing iI stumbled upon is that drivers/usb/Kconfig is missing
PLAT_ORION for USB_ARCH_HAS_EHCI. I think it just worked until now
because there is also PCI in this config option. IIRC it can be
disabled now and therefore there should be an entry for PLAT_ORION.
Sebastian
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding
2012-09-01 9:26 [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding Andrew Lunn
2012-09-01 9:26 ` [PATCH 2/2] ARM: Kirkwood: Convert all DT boards to EHCI via DT Andrew Lunn
2012-09-03 6:56 ` [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding Sebastian Hesselbarth
@ 2012-09-04 15:06 ` Alan Stern
2012-09-09 19:11 ` Jason Cooper
2012-09-22 5:02 ` Olof Johansson
4 siblings, 0 replies; 10+ messages in thread
From: Alan Stern @ 2012-09-04 15:06 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, 1 Sep 2012, Andrew Lunn wrote:
> Based on previous work by Michael Walle and Jason Cooper.
>
> Made their work actually work, which required added interrupt from DT
> and auxdata, along with setting the dma_mask, which DT does not
> currently do.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
For the changes to ehci-orion.c:
Acked-by: Alan Stern <stern@rowland.harvard.edu>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding
2012-09-01 9:26 [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding Andrew Lunn
` (2 preceding siblings ...)
2012-09-04 15:06 ` Alan Stern
@ 2012-09-09 19:11 ` Jason Cooper
2012-09-22 5:02 ` Olof Johansson
4 siblings, 0 replies; 10+ messages in thread
From: Jason Cooper @ 2012-09-09 19:11 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Sep 01, 2012 at 11:26:25AM +0200, Andrew Lunn wrote:
> Based on previous work by Michael Walle and Jason Cooper.
>
> Made their work actually work, which required added interrupt from DT
> and auxdata, along with setting the dma_mask, which DT does not
> currently do.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied to:
git://git.infradead.org/users/jcooper/linux.git kirkwood/dt
thx,
Jason.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding
2012-09-01 9:26 [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding Andrew Lunn
` (3 preceding siblings ...)
2012-09-09 19:11 ` Jason Cooper
@ 2012-09-22 5:02 ` Olof Johansson
2012-09-24 7:13 ` Andrew Lunn
4 siblings, 1 reply; 10+ messages in thread
From: Olof Johansson @ 2012-09-22 5:02 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Sorry for the late feedback but I didn't notice this until I looked at
the pull request from Jason.
Please go back and revisit these bindings. I'll merge in the current
version but they need to be fixed up.
Also, always cc devicetree-discuss and the DT maintainers on new bindings.
On Sat, Sep 1, 2012 at 2:26 AM, Andrew Lunn <andrew@lunn.ch> wrote:
> Based on previous work by Michael Walle and Jason Cooper.
>
> Made their work actually work, which required added interrupt from DT
> and auxdata, along with setting the dma_mask, which DT does not
> currently do.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> .../devicetree/bindings/usb/ehci-orion.txt | 19 +++++++
> drivers/usb/host/ehci-orion.c | 59 +++++++++++++++++++-
> 2 files changed, 75 insertions(+), 3 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/usb/ehci-orion.txt
>
> diff --git a/Documentation/devicetree/bindings/usb/ehci-orion.txt b/Documentation/devicetree/bindings/usb/ehci-orion.txt
> new file mode 100644
> index 0000000..1bd704e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/ehci-orion.txt
> @@ -0,0 +1,19 @@
> +* EHCI controller, Orion Marvell variants
> +
> +Required properties:
> +- compatible: must be "marvell,orion-ehci"
> +- reg: physical base address of the controller and length of memory mapped
> + region.
> +- interrupts: The EHCI interrupt
> +- phy-version: Can be one of:
> + "NA" - Don't touch the phy, something else has already configured it.
> + "orion5x" - PHY setup as specified by the Orion5x Errata
> +
> +Example:
> +
> + ehci at 50000 {
> + compatible = "marvell,orion-ehci";
> + reg = <0x50000 0x1000>;
> + interrupts = <19>;
> + phy-version = "NA";
> + };
This isn't an appropriate binding for phy. I know, it maps straight
over from the platform data, but it doesn't focus on what the actual
hardware is.
A couple of options. What probably makes most sense depending on how
other phy bindings are moving ahead is to add a phy node under the
ehci controller for the "orion5x" case, and have an appropriate
compatible value there. No node means the same as "NA" in the above
binding. Alternatively, have a phy phandle that points to the phy
device if it sits on an i2c bus, etc.
-Olof
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding
2012-09-22 5:02 ` Olof Johansson
@ 2012-09-24 7:13 ` Andrew Lunn
2012-09-26 23:49 ` Olof Johansson
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Lunn @ 2012-09-24 7:13 UTC (permalink / raw)
To: linux-arm-kernel
> > +Required properties:
> > +- compatible: must be "marvell,orion-ehci"
> > +- reg: physical base address of the controller and length of memory mapped
> > + region.
> > +- interrupts: The EHCI interrupt
> > +- phy-version: Can be one of:
> > + "NA" - Don't touch the phy, something else has already configured it.
> > + "orion5x" - PHY setup as specified by the Orion5x Errata
> > +
> > +Example:
> > +
> > + ehci at 50000 {
> > + compatible = "marvell,orion-ehci";
> > + reg = <0x50000 0x1000>;
> > + interrupts = <19>;
> > + phy-version = "NA";
> > + };
>
> This isn't an appropriate binding for phy. I know, it maps straight
> over from the platform data, but it doesn't focus on what the actual
> hardware is.
>
> A couple of options. What probably makes most sense depending on how
> other phy bindings are moving ahead is to add a phy node under the
> ehci controller for the "orion5x" case, and have an appropriate
> compatible value there. No node means the same as "NA" in the above
> binding. Alternatively, have a phy phandle that points to the phy
> device if it sits on an i2c bus, etc.
I Olaf
Could i suggest a third option:
I just drop USB phy configuration all together. Only mach-orion5x
needs this and nobody has shown any interest in moving mach-orion5x to
DT. So i would just hard code it to "NA".
If anybody does show interest in DT for orion5x, we can add a phy node
under ehci as a pure extension which does not affect backward
compatibility.
Thanks
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding
2012-09-24 7:13 ` Andrew Lunn
@ 2012-09-26 23:49 ` Olof Johansson
2012-10-17 15:18 ` Jason Cooper
0 siblings, 1 reply; 10+ messages in thread
From: Olof Johansson @ 2012-09-26 23:49 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 24, 2012 at 09:13:53AM +0200, Andrew Lunn wrote:
> > > +Required properties:
> > > +- compatible: must be "marvell,orion-ehci"
> > > +- reg: physical base address of the controller and length of memory mapped
> > > + region.
> > > +- interrupts: The EHCI interrupt
> > > +- phy-version: Can be one of:
> > > + "NA" - Don't touch the phy, something else has already configured it.
> > > + "orion5x" - PHY setup as specified by the Orion5x Errata
> > > +
> > > +Example:
> > > +
> > > + ehci at 50000 {
> > > + compatible = "marvell,orion-ehci";
> > > + reg = <0x50000 0x1000>;
> > > + interrupts = <19>;
> > > + phy-version = "NA";
> > > + };
> >
> > This isn't an appropriate binding for phy. I know, it maps straight
> > over from the platform data, but it doesn't focus on what the actual
> > hardware is.
> >
> > A couple of options. What probably makes most sense depending on how
> > other phy bindings are moving ahead is to add a phy node under the
> > ehci controller for the "orion5x" case, and have an appropriate
> > compatible value there. No node means the same as "NA" in the above
> > binding. Alternatively, have a phy phandle that points to the phy
> > device if it sits on an i2c bus, etc.
>
> I Olaf
>
> Could i suggest a third option:
>
> I just drop USB phy configuration all together. Only mach-orion5x
> needs this and nobody has shown any interest in moving mach-orion5x to
> DT. So i would just hard code it to "NA".
>
> If anybody does show interest in DT for orion5x, we can add a phy node
> under ehci as a pure extension which does not affect backward
> compatibility.
Yeah, that works too.
-Olof
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding
2012-09-26 23:49 ` Olof Johansson
@ 2012-10-17 15:18 ` Jason Cooper
0 siblings, 0 replies; 10+ messages in thread
From: Jason Cooper @ 2012-10-17 15:18 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 26, 2012 at 04:49:41PM -0700, Olof Johansson wrote:
> On Mon, Sep 24, 2012 at 09:13:53AM +0200, Andrew Lunn wrote:
> > > > +Required properties:
> > > > +- compatible: must be "marvell,orion-ehci"
> > > > +- reg: physical base address of the controller and length of memory mapped
> > > > + region.
> > > > +- interrupts: The EHCI interrupt
> > > > +- phy-version: Can be one of:
> > > > + "NA" - Don't touch the phy, something else has already configured it.
> > > > + "orion5x" - PHY setup as specified by the Orion5x Errata
> > > > +
> > > > +Example:
> > > > +
> > > > + ehci at 50000 {
> > > > + compatible = "marvell,orion-ehci";
> > > > + reg = <0x50000 0x1000>;
> > > > + interrupts = <19>;
> > > > + phy-version = "NA";
> > > > + };
> > >
> > > This isn't an appropriate binding for phy. I know, it maps straight
> > > over from the platform data, but it doesn't focus on what the actual
> > > hardware is.
> > >
> > > A couple of options. What probably makes most sense depending on how
> > > other phy bindings are moving ahead is to add a phy node under the
> > > ehci controller for the "orion5x" case, and have an appropriate
> > > compatible value there. No node means the same as "NA" in the above
> > > binding. Alternatively, have a phy phandle that points to the phy
> > > device if it sits on an i2c bus, etc.
> >
> > I Olaf
> >
> > Could i suggest a third option:
> >
> > I just drop USB phy configuration all together. Only mach-orion5x
> > needs this and nobody has shown any interest in moving mach-orion5x to
> > DT. So i would just hard code it to "NA".
> >
> > If anybody does show interest in DT for orion5x, we can add a phy node
> > under ehci as a pure extension which does not affect backward
> > compatibility.
>
> Yeah, that works too.
Andrew,
Did I miss the update of this series/patch?
thx,
Jason.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-10-17 15:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-01 9:26 [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding Andrew Lunn
2012-09-01 9:26 ` [PATCH 2/2] ARM: Kirkwood: Convert all DT boards to EHCI via DT Andrew Lunn
2012-09-09 19:12 ` Jason Cooper
2012-09-03 6:56 ` [PATCH 1/2] ARM: Kirkwood: ehci-orion: Add device tree binding Sebastian Hesselbarth
2012-09-04 15:06 ` Alan Stern
2012-09-09 19:11 ` Jason Cooper
2012-09-22 5:02 ` Olof Johansson
2012-09-24 7:13 ` Andrew Lunn
2012-09-26 23:49 ` Olof Johansson
2012-10-17 15:18 ` Jason Cooper
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).