* [PATCH v2 1/9] usb: phy: nop: Add gpio_reset to platform data
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
@ 2013-08-15 10:18 ` Roger Quadros
2013-08-15 10:18 ` [PATCH v2 2/9] usb: phy: nop: Don't use regulator framework for RESET line Roger Quadros
` (8 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Roger Quadros @ 2013-08-15 10:18 UTC (permalink / raw)
To: linux-arm-kernel
The GPIO number of the RESET line can be passed to the
driver using the gpio_reset member.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
include/linux/usb/nop-usb-xceiv.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/include/linux/usb/nop-usb-xceiv.h b/include/linux/usb/nop-usb-xceiv.h
index 148d351..1e57acb 100644
--- a/include/linux/usb/nop-usb-xceiv.h
+++ b/include/linux/usb/nop-usb-xceiv.h
@@ -9,7 +9,9 @@ struct nop_usb_xceiv_platform_data {
/* if set fails with -EPROBE_DEFER if can't get regulator */
unsigned int needs_vcc:1;
- unsigned int needs_reset:1;
+ unsigned int needs_reset:1; /* Deprecated */
+
+ int gpio_reset;
};
#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/9] usb: phy: nop: Don't use regulator framework for RESET line
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
2013-08-15 10:18 ` [PATCH v2 1/9] usb: phy: nop: Add gpio_reset to platform data Roger Quadros
@ 2013-08-15 10:18 ` Roger Quadros
2013-09-23 18:05 ` Roger Quadros
2013-08-15 10:18 ` [PATCH v2 3/9] ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct usbhs_phy_data Roger Quadros
` (7 subsequent siblings)
9 siblings, 1 reply; 16+ messages in thread
From: Roger Quadros @ 2013-08-15 10:18 UTC (permalink / raw)
To: linux-arm-kernel
Modelling the RESET line as a regulator supply wasn't a good idea
as it kind of abuses the regulator framework and also makes adaptation
code more complex.
Instead, manage the RESET gpio line directly in the driver. Update
the device tree binding information.
This also makes us easy to migrate to a dedicated GPIO RESET controller
whenever it becomes available.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
.../devicetree/bindings/usb/usb-nop-xceiv.txt | 7 +-
drivers/usb/phy/phy-nop.c | 71 ++++++++++++++-----
2 files changed, 55 insertions(+), 23 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
index d7e2726..1bd37fa 100644
--- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
+++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
@@ -15,7 +15,7 @@ Optional properties:
- vcc-supply: phandle to the regulator that provides RESET to the PHY.
-- reset-supply: phandle to the regulator that provides power to the PHY.
+- reset-gpios: Should specify the GPIO for reset.
Example:
@@ -25,10 +25,9 @@ Example:
clocks = <&osc 0>;
clock-names = "main_clk";
vcc-supply = <&hsusb1_vcc_regulator>;
- reset-supply = <&hsusb1_reset_regulator>;
+ reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
};
hsusb1_phy is a NOP USB PHY device that gets its clock from an oscillator
and expects that clock to be configured to 19.2MHz by the NOP PHY driver.
-hsusb1_vcc_regulator provides power to the PHY and hsusb1_reset_regulator
-controls RESET.
+hsusb1_vcc_regulator provides power to the PHY and GPIO 7 controls RESET.
diff --git a/drivers/usb/phy/phy-nop.c b/drivers/usb/phy/phy-nop.c
index 55445e5d..1f88c32 100644
--- a/drivers/usb/phy/phy-nop.c
+++ b/drivers/usb/phy/phy-nop.c
@@ -35,6 +35,9 @@
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
#include <linux/of.h>
+#include <linux/of_gpio.h>
+#include <linux/gpio.h>
+#include <linux/delay.h>
struct nop_usb_xceiv {
struct usb_phy phy;
@@ -42,6 +45,8 @@ struct nop_usb_xceiv {
struct clk *clk;
struct regulator *vcc;
struct regulator *reset;
+ int gpio_reset;
+ bool reset_active_low;
};
static struct platform_device *pd;
@@ -70,6 +75,23 @@ static int nop_set_suspend(struct usb_phy *x, int suspend)
return 0;
}
+static void nop_reset_set(struct nop_usb_xceiv *nop, int asserted)
+{
+ int value;
+
+ if (!gpio_is_valid(nop->gpio_reset))
+ return;
+
+ value = asserted;
+ if (nop->reset_active_low)
+ value = !value;
+
+ gpio_set_value_cansleep(nop->gpio_reset, value);
+
+ if (!asserted)
+ usleep_range(10000, 20000);
+}
+
static int nop_init(struct usb_phy *phy)
{
struct nop_usb_xceiv *nop = dev_get_drvdata(phy->dev);
@@ -82,11 +104,8 @@ static int nop_init(struct usb_phy *phy)
if (!IS_ERR(nop->clk))
clk_enable(nop->clk);
- if (!IS_ERR(nop->reset)) {
- /* De-assert RESET */
- if (regulator_enable(nop->reset))
- dev_err(phy->dev, "Failed to de-assert reset\n");
- }
+ /* De-assert RESET */
+ nop_reset_set(nop, 0);
return 0;
}
@@ -95,11 +114,8 @@ static void nop_shutdown(struct usb_phy *phy)
{
struct nop_usb_xceiv *nop = dev_get_drvdata(phy->dev);
- if (!IS_ERR(nop->reset)) {
- /* Assert RESET */
- if (regulator_disable(nop->reset))
- dev_err(phy->dev, "Failed to assert reset\n");
- }
+ /* Assert RESET */
+ nop_reset_set(nop, 1);
if (!IS_ERR(nop->clk))
clk_disable(nop->clk);
@@ -148,7 +164,6 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
int err;
u32 clk_rate = 0;
bool needs_vcc = false;
- bool needs_reset = false;
nop = devm_kzalloc(&pdev->dev, sizeof(*nop), GFP_KERNEL);
if (!nop)
@@ -159,20 +174,28 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
if (!nop->phy.otg)
return -ENOMEM;
+ nop->reset_active_low = true; /* default behaviour */
+
if (dev->of_node) {
struct device_node *node = dev->of_node;
+ enum of_gpio_flags flags;
if (of_property_read_u32(node, "clock-frequency", &clk_rate))
clk_rate = 0;
needs_vcc = of_property_read_bool(node, "vcc-supply");
- needs_reset = of_property_read_bool(node, "reset-supply");
+ nop->gpio_reset = of_get_named_gpio_flags(node, "reset-gpios",
+ 0, &flags);
+ if (nop->gpio_reset == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
+
+ nop->reset_active_low = flags & OF_GPIO_ACTIVE_LOW;
} else if (pdata) {
type = pdata->type;
clk_rate = pdata->clk_rate;
needs_vcc = pdata->needs_vcc;
- needs_reset = pdata->needs_reset;
+ nop->gpio_reset = pdata->gpio_reset;
}
nop->clk = devm_clk_get(&pdev->dev, "main_clk");
@@ -205,12 +228,22 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
return -EPROBE_DEFER;
}
- nop->reset = devm_regulator_get(&pdev->dev, "reset");
- if (IS_ERR(nop->reset)) {
- dev_dbg(&pdev->dev, "Error getting reset regulator: %ld\n",
- PTR_ERR(nop->reset));
- if (needs_reset)
- return -EPROBE_DEFER;
+ if (gpio_is_valid(nop->gpio_reset)) {
+ unsigned long gpio_flags;
+
+ /* Assert RESET */
+ if (nop->reset_active_low)
+ gpio_flags = GPIOF_OUT_INIT_HIGH;
+ else
+ gpio_flags = GPIOF_OUT_INIT_LOW;
+
+ err = devm_gpio_request_one(dev, nop->gpio_reset,
+ gpio_flags, dev_name(dev));
+ if (err) {
+ dev_err(dev, "Error requesting RESET GPIO %d\n",
+ nop->gpio_reset);
+ return err;
+ }
}
nop->dev = &pdev->dev;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/9] usb: phy: nop: Don't use regulator framework for RESET line
2013-08-15 10:18 ` [PATCH v2 2/9] usb: phy: nop: Don't use regulator framework for RESET line Roger Quadros
@ 2013-09-23 18:05 ` Roger Quadros
0 siblings, 0 replies; 16+ messages in thread
From: Roger Quadros @ 2013-09-23 18:05 UTC (permalink / raw)
To: linux-arm-kernel
Hi Felipe,
There is an issue with this patch and is shown below.
I will send a v3 for this.
On 08/15/2013 01:18 PM, Roger Quadros wrote:
> Modelling the RESET line as a regulator supply wasn't a good idea
> as it kind of abuses the regulator framework and also makes adaptation
> code more complex.
>
> Instead, manage the RESET gpio line directly in the driver. Update
> the device tree binding information.
>
> This also makes us easy to migrate to a dedicated GPIO RESET controller
> whenever it becomes available.
>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> ---
> .../devicetree/bindings/usb/usb-nop-xceiv.txt | 7 +-
> drivers/usb/phy/phy-nop.c | 71 ++++++++++++++-----
> 2 files changed, 55 insertions(+), 23 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
> index d7e2726..1bd37fa 100644
> --- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
> +++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
> @@ -15,7 +15,7 @@ Optional properties:
>
> - vcc-supply: phandle to the regulator that provides RESET to the PHY.
>
> -- reset-supply: phandle to the regulator that provides power to the PHY.
> +- reset-gpios: Should specify the GPIO for reset.
>
> Example:
>
> @@ -25,10 +25,9 @@ Example:
> clocks = <&osc 0>;
> clock-names = "main_clk";
> vcc-supply = <&hsusb1_vcc_regulator>;
> - reset-supply = <&hsusb1_reset_regulator>;
> + reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
> };
>
> hsusb1_phy is a NOP USB PHY device that gets its clock from an oscillator
> and expects that clock to be configured to 19.2MHz by the NOP PHY driver.
> -hsusb1_vcc_regulator provides power to the PHY and hsusb1_reset_regulator
> -controls RESET.
> +hsusb1_vcc_regulator provides power to the PHY and GPIO 7 controls RESET.
> diff --git a/drivers/usb/phy/phy-nop.c b/drivers/usb/phy/phy-nop.c
> index 55445e5d..1f88c32 100644
> --- a/drivers/usb/phy/phy-nop.c
> +++ b/drivers/usb/phy/phy-nop.c
> @@ -35,6 +35,9 @@
> #include <linux/clk.h>
> #include <linux/regulator/consumer.h>
> #include <linux/of.h>
> +#include <linux/of_gpio.h>
> +#include <linux/gpio.h>
> +#include <linux/delay.h>
>
> struct nop_usb_xceiv {
> struct usb_phy phy;
> @@ -42,6 +45,8 @@ struct nop_usb_xceiv {
> struct clk *clk;
> struct regulator *vcc;
> struct regulator *reset;
> + int gpio_reset;
> + bool reset_active_low;
> };
>
> static struct platform_device *pd;
> @@ -70,6 +75,23 @@ static int nop_set_suspend(struct usb_phy *x, int suspend)
> return 0;
> }
>
> +static void nop_reset_set(struct nop_usb_xceiv *nop, int asserted)
> +{
> + int value;
> +
> + if (!gpio_is_valid(nop->gpio_reset))
> + return;
> +
> + value = asserted;
> + if (nop->reset_active_low)
> + value = !value;
> +
> + gpio_set_value_cansleep(nop->gpio_reset, value);
> +
> + if (!asserted)
> + usleep_range(10000, 20000);
> +}
> +
> static int nop_init(struct usb_phy *phy)
> {
> struct nop_usb_xceiv *nop = dev_get_drvdata(phy->dev);
> @@ -82,11 +104,8 @@ static int nop_init(struct usb_phy *phy)
> if (!IS_ERR(nop->clk))
> clk_enable(nop->clk);
>
> - if (!IS_ERR(nop->reset)) {
> - /* De-assert RESET */
> - if (regulator_enable(nop->reset))
> - dev_err(phy->dev, "Failed to de-assert reset\n");
> - }
> + /* De-assert RESET */
> + nop_reset_set(nop, 0);
>
> return 0;
> }
> @@ -95,11 +114,8 @@ static void nop_shutdown(struct usb_phy *phy)
> {
> struct nop_usb_xceiv *nop = dev_get_drvdata(phy->dev);
>
> - if (!IS_ERR(nop->reset)) {
> - /* Assert RESET */
> - if (regulator_disable(nop->reset))
> - dev_err(phy->dev, "Failed to assert reset\n");
> - }
> + /* Assert RESET */
> + nop_reset_set(nop, 1);
>
> if (!IS_ERR(nop->clk))
> clk_disable(nop->clk);
> @@ -148,7 +164,6 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
> int err;
> u32 clk_rate = 0;
> bool needs_vcc = false;
> - bool needs_reset = false;
>
> nop = devm_kzalloc(&pdev->dev, sizeof(*nop), GFP_KERNEL);
> if (!nop)
> @@ -159,20 +174,28 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
> if (!nop->phy.otg)
> return -ENOMEM;
>
> + nop->reset_active_low = true; /* default behaviour */
> +
> if (dev->of_node) {
> struct device_node *node = dev->of_node;
> + enum of_gpio_flags flags;
>
> if (of_property_read_u32(node, "clock-frequency", &clk_rate))
> clk_rate = 0;
>
> needs_vcc = of_property_read_bool(node, "vcc-supply");
> - needs_reset = of_property_read_bool(node, "reset-supply");
> + nop->gpio_reset = of_get_named_gpio_flags(node, "reset-gpios",
> + 0, &flags);
> + if (nop->gpio_reset == -EPROBE_DEFER)
> + return -EPROBE_DEFER;
> +
> + nop->reset_active_low = flags & OF_GPIO_ACTIVE_LOW;
>
> } else if (pdata) {
> type = pdata->type;
> clk_rate = pdata->clk_rate;
> needs_vcc = pdata->needs_vcc;
> - needs_reset = pdata->needs_reset;
> + nop->gpio_reset = pdata->gpio_reset;
> }
>
> nop->clk = devm_clk_get(&pdev->dev, "main_clk");
> @@ -205,12 +228,22 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
> return -EPROBE_DEFER;
> }
>
> - nop->reset = devm_regulator_get(&pdev->dev, "reset");
> - if (IS_ERR(nop->reset)) {
> - dev_dbg(&pdev->dev, "Error getting reset regulator: %ld\n",
> - PTR_ERR(nop->reset));
> - if (needs_reset)
> - return -EPROBE_DEFER;
> + if (gpio_is_valid(nop->gpio_reset)) {
> + unsigned long gpio_flags;
> +
> + /* Assert RESET */
> + if (nop->reset_active_low)
> + gpio_flags = GPIOF_OUT_INIT_HIGH;
> + else
> + gpio_flags = GPIOF_OUT_INIT_LOW;
The operations inside if/else need to be reversed.
> +
> + err = devm_gpio_request_one(dev, nop->gpio_reset,
> + gpio_flags, dev_name(dev));
> + if (err) {
> + dev_err(dev, "Error requesting RESET GPIO %d\n",
> + nop->gpio_reset);
> + return err;
> + }
> }
>
> nop->dev = &pdev->dev;
>
cheers,
-roger
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 3/9] ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct usbhs_phy_data
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
2013-08-15 10:18 ` [PATCH v2 1/9] usb: phy: nop: Add gpio_reset to platform data Roger Quadros
2013-08-15 10:18 ` [PATCH v2 2/9] usb: phy: nop: Don't use regulator framework for RESET line Roger Quadros
@ 2013-08-15 10:18 ` Roger Quadros
2013-09-20 15:44 ` Felipe Balbi
2013-08-15 10:18 ` [PATCH v2 4/9] ARM: OMAP2+: usb-host: Adapt to USB phy-nop RESET line changes Roger Quadros
` (6 subsequent siblings)
9 siblings, 1 reply; 16+ messages in thread
From: Roger Quadros @ 2013-08-15 10:18 UTC (permalink / raw)
To: linux-arm-kernel
The platform data bits can be inferred from the other members of
struct usbhs_phy_data. So get rid of the platform_data member.
Build the platform data for the PHY device in usbhs_init_phys() instead.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/mach-omap2/board-omap3beagle.c | 6 ------
arch/arm/mach-omap2/usb-host.c | 11 ++++++++++-
arch/arm/mach-omap2/usb.h | 1 -
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 04c1165..47bca8f 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -278,18 +278,12 @@ static struct regulator_consumer_supply beagle_vsim_supply[] = {
static struct gpio_led gpio_leds[];
-/* PHY's VCC regulator might be added later, so flag that we need it */
-static struct nop_usb_xceiv_platform_data hsusb2_phy_data = {
- .needs_vcc = true,
-};
-
static struct usbhs_phy_data phy_data[] = {
{
.port = 2,
.reset_gpio = 147,
.vcc_gpio = -1, /* updated in beagle_twl_gpio_setup */
.vcc_polarity = 1, /* updated in beagle_twl_gpio_setup */
- .platform_data = &hsusb2_phy_data,
},
};
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index 2eb19d4..1626801 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -435,6 +435,7 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
struct platform_device *pdev;
char *phy_id;
struct platform_device_info pdevinfo;
+ struct nop_usb_xceiv_platform_data nop_pdata;
for (i = 0; i < num_phys; i++) {
@@ -455,11 +456,19 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
return -ENOMEM;
}
+ /* set platform data */
+ memset(&nop_pdata, 0, sizeof(nop_pdata));
+ if (gpio_is_valid(phy->vcc_gpio))
+ nop_pdata.needs_vcc = true;
+ if (gpio_is_valid(phy->reset_gpio))
+ nop_pdata.needs_reset = true;
+ nop_pdata.type = USB_PHY_TYPE_USB2;
+
/* create a NOP PHY device */
memset(&pdevinfo, 0, sizeof(pdevinfo));
pdevinfo.name = nop_name;
pdevinfo.id = phy->port;
- pdevinfo.data = phy->platform_data;
+ pdevinfo.data = &nop_pdata;
pdevinfo.size_data = sizeof(struct nop_usb_xceiv_platform_data);
scnprintf(phy_id, MAX_STR, "nop_usb_xceiv.%d",
diff --git a/arch/arm/mach-omap2/usb.h b/arch/arm/mach-omap2/usb.h
index e7261eb..4ba2ae7 100644
--- a/arch/arm/mach-omap2/usb.h
+++ b/arch/arm/mach-omap2/usb.h
@@ -58,7 +58,6 @@ struct usbhs_phy_data {
int reset_gpio;
int vcc_gpio;
bool vcc_polarity; /* 1 active high, 0 active low */
- void *platform_data;
};
extern void usb_musb_init(struct omap_musb_board_data *board_data);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 3/9] ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct usbhs_phy_data
2013-08-15 10:18 ` [PATCH v2 3/9] ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct usbhs_phy_data Roger Quadros
@ 2013-09-20 15:44 ` Felipe Balbi
2013-09-20 16:18 ` Tony Lindgren
0 siblings, 1 reply; 16+ messages in thread
From: Felipe Balbi @ 2013-09-20 15:44 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Thu, Aug 15, 2013 at 01:18:23PM +0300, Roger Quadros wrote:
> The platform data bits can be inferred from the other members of
> struct usbhs_phy_data. So get rid of the platform_data member.
>
> Build the platform data for the PHY device in usbhs_init_phys() instead.
>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
Tony, do I get your Acked-by here and all following arch/arm/mach-omap2*
patches in this series ?
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130920/5c0baadd/attachment.sig>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 3/9] ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct usbhs_phy_data
2013-09-20 15:44 ` Felipe Balbi
@ 2013-09-20 16:18 ` Tony Lindgren
2013-09-20 16:24 ` Felipe Balbi
0 siblings, 1 reply; 16+ messages in thread
From: Tony Lindgren @ 2013-09-20 16:18 UTC (permalink / raw)
To: linux-arm-kernel
* Felipe Balbi <balbi@ti.com> [130920 08:52]:
> Hi,
>
> On Thu, Aug 15, 2013 at 01:18:23PM +0300, Roger Quadros wrote:
> > The platform data bits can be inferred from the other members of
> > struct usbhs_phy_data. So get rid of the platform_data member.
> >
> > Build the platform data for the PHY device in usbhs_init_phys() instead.
> >
> > Signed-off-by: Roger Quadros <rogerq@ti.com>
>
> Tony, do I get your Acked-by here and all following arch/arm/mach-omap2*
> patches in this series ?
If you can merge just this series without the .dts changes
into an immutable topic branch against let's say v3.12-rc2
when it comes out, then yes I can ack them:
Acked-by: Tony Lindgren <tony@atomide.com>
That way I can also pull in the topic branch as needed to
avoid self inflicted merge conflicts ;) And Benoit can
set up a separate .dts branch based on your branch to make
sure the dependencies are in place before merging that one
upstream.
Regards,
Tony
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 3/9] ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct usbhs_phy_data
2013-09-20 16:18 ` Tony Lindgren
@ 2013-09-20 16:24 ` Felipe Balbi
0 siblings, 0 replies; 16+ messages in thread
From: Felipe Balbi @ 2013-09-20 16:24 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 20, 2013 at 09:18:22AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [130920 08:52]:
> > Hi,
> >
> > On Thu, Aug 15, 2013 at 01:18:23PM +0300, Roger Quadros wrote:
> > > The platform data bits can be inferred from the other members of
> > > struct usbhs_phy_data. So get rid of the platform_data member.
> > >
> > > Build the platform data for the PHY device in usbhs_init_phys() instead.
> > >
> > > Signed-off-by: Roger Quadros <rogerq@ti.com>
> >
> > Tony, do I get your Acked-by here and all following arch/arm/mach-omap2*
> > patches in this series ?
>
> If you can merge just this series without the .dts changes
> into an immutable topic branch against let's say v3.12-rc2
> when it comes out, then yes I can ack them:
>
> Acked-by: Tony Lindgren <tony@atomide.com>
>
> That way I can also pull in the topic branch as needed to
> avoid self inflicted merge conflicts ;) And Benoit can
> set up a separate .dts branch based on your branch to make
> sure the dependencies are in place before merging that one
> upstream.
Alright, i'll put this in my todo for next week.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130920/aac5c4d4/attachment.sig>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 4/9] ARM: OMAP2+: usb-host: Adapt to USB phy-nop RESET line changes
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
` (2 preceding siblings ...)
2013-08-15 10:18 ` [PATCH v2 3/9] ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct usbhs_phy_data Roger Quadros
@ 2013-08-15 10:18 ` Roger Quadros
2013-08-15 10:18 ` [PATCH v2 5/9] ARM: dts: omap3-beagle: Use reset-gpios for hsusb2_reset Roger Quadros
` (5 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Roger Quadros @ 2013-08-15 10:18 UTC (permalink / raw)
To: linux-arm-kernel
The USB phy-nop nop driver expects the RESET line information
to be sent as a GPIO number via platform data. Adapt to that.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/mach-omap2/usb-host.c | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index 1626801..4528b40 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -460,8 +460,7 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
memset(&nop_pdata, 0, sizeof(nop_pdata));
if (gpio_is_valid(phy->vcc_gpio))
nop_pdata.needs_vcc = true;
- if (gpio_is_valid(phy->reset_gpio))
- nop_pdata.needs_reset = true;
+ nop_pdata.gpio_reset = phy->reset_gpio;
nop_pdata.type = USB_PHY_TYPE_USB2;
/* create a NOP PHY device */
@@ -483,14 +482,6 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
usb_bind_phy("ehci-omap.0", phy->port - 1, phy_id);
- /* Do we need RESET regulator ? */
- if (gpio_is_valid(phy->reset_gpio)) {
- scnprintf(rail_name, MAX_STR,
- "hsusb%d_reset", phy->port);
- usbhs_add_regulator(rail_name, phy_id, "reset",
- phy->reset_gpio, 1);
- }
-
/* Do we need VCC regulator ? */
if (gpio_is_valid(phy->vcc_gpio)) {
scnprintf(rail_name, MAX_STR, "hsusb%d_vcc", phy->port);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 5/9] ARM: dts: omap3-beagle: Use reset-gpios for hsusb2_reset
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
` (3 preceding siblings ...)
2013-08-15 10:18 ` [PATCH v2 4/9] ARM: OMAP2+: usb-host: Adapt to USB phy-nop RESET line changes Roger Quadros
@ 2013-08-15 10:18 ` Roger Quadros
2013-08-15 10:18 ` [PATCH v2 6/9] ARM: dts: omap4-panda: Use reset-gpios for hsusb1_reset Roger Quadros
` (4 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Roger Quadros @ 2013-08-15 10:18 UTC (permalink / raw)
To: linux-arm-kernel
We no longer need to model the RESET line as a regulator since
the USB phy-nop driver accepts "reset-gpios" property.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/boot/dts/omap3-beagle.dts | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index dfd8310..71bde47 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -44,17 +44,6 @@
};
};
- /* HS USB Port 2 RESET */
- hsusb2_reset: hsusb2_reset_reg {
- compatible = "regulator-fixed";
- regulator-name = "hsusb2_reset";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio5 19 0>; /* gpio_147 */
- startup-delay-us = <70000>;
- enable-active-high;
- };
-
/* HS USB Port 2 Power */
hsusb2_power: hsusb2_power_reg {
compatible = "regulator-fixed";
@@ -68,7 +57,7 @@
/* HS USB Host PHY on PORT 2 */
hsusb2_phy: hsusb2_phy {
compatible = "usb-nop-xceiv";
- reset-supply = <&hsusb2_reset>;
+ reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
vcc-supply = <&hsusb2_power>;
};
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 6/9] ARM: dts: omap4-panda: Use reset-gpios for hsusb1_reset
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
` (4 preceding siblings ...)
2013-08-15 10:18 ` [PATCH v2 5/9] ARM: dts: omap3-beagle: Use reset-gpios for hsusb2_reset Roger Quadros
@ 2013-08-15 10:18 ` Roger Quadros
2013-08-15 10:18 ` [PATCH v2 7/9] ARM: dts: omap5-uevm: Use reset-gpios for hsusb2_reset Roger Quadros
` (3 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Roger Quadros @ 2013-08-15 10:18 UTC (permalink / raw)
To: linux-arm-kernel
We no longer need to model the RESET line as a regulator since
the USB phy-nop driver accepts "reset-gpios" property.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/boot/dts/omap4-panda-common.dtsi | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index faa95b5..c60ebd0 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -60,22 +60,6 @@
"AFMR", "Line In";
};
- /*
- * Temp hack: Need to be replaced with the proper gpio-controlled
- * reset driver as soon it will be merged.
- * http://thread.gmane.org/gmane.linux.drivers.devicetree/36830
- */
- /* HS USB Port 1 RESET */
- hsusb1_reset: hsusb1_reset_reg {
- compatible = "regulator-fixed";
- regulator-name = "hsusb1_reset";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio2 30 0>; /* gpio_62 */
- startup-delay-us = <70000>;
- enable-active-high;
- };
-
/* HS USB Port 1 Power */
hsusb1_power: hsusb1_power_reg {
compatible = "regulator-fixed";
@@ -97,7 +81,7 @@
/* HS USB Host PHY on PORT 1 */
hsusb1_phy: hsusb1_phy {
compatible = "usb-nop-xceiv";
- reset-supply = <&hsusb1_reset>;
+ reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */
vcc-supply = <&hsusb1_power>;
/**
* FIXME:
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 7/9] ARM: dts: omap5-uevm: Use reset-gpios for hsusb2_reset
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
` (5 preceding siblings ...)
2013-08-15 10:18 ` [PATCH v2 6/9] ARM: dts: omap4-panda: Use reset-gpios for hsusb1_reset Roger Quadros
@ 2013-08-15 10:18 ` Roger Quadros
2013-08-15 10:18 ` [PATCH v2 8/9] ARM: dts: omap3-beagle: Make USB host pin naming consistent Roger Quadros
` (2 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Roger Quadros @ 2013-08-15 10:18 UTC (permalink / raw)
To: linux-arm-kernel
We no longer need to model the RESET line as a regulator since
the USB phy-nop driver accepts "reset-gpios" property.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/boot/dts/omap5-uevm.dts | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts
index 65d7b60..c087762 100644
--- a/arch/arm/boot/dts/omap5-uevm.dts
+++ b/arch/arm/boot/dts/omap5-uevm.dts
@@ -27,21 +27,10 @@
regulator-max-microvolt = <3000000>;
};
- /* HS USB Port 2 RESET */
- hsusb2_reset: hsusb2_reset_reg {
- compatible = "regulator-fixed";
- regulator-name = "hsusb2_reset";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio3 16 GPIO_ACTIVE_HIGH>; /* gpio3_80 HUB_NRESET */
- startup-delay-us = <70000>;
- enable-active-high;
- };
-
/* HS USB Host PHY on PORT 2 */
hsusb2_phy: hsusb2_phy {
compatible = "usb-nop-xceiv";
- reset-supply = <&hsusb2_reset>;
+ reset-gpios = <&gpio3 16 GPIO_ACTIVE_LOW>; /* gpio3_80 HUB_NRESET */
/**
* FIXME
* Put the right clock phandle here when available
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 8/9] ARM: dts: omap3-beagle: Make USB host pin naming consistent
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
` (6 preceding siblings ...)
2013-08-15 10:18 ` [PATCH v2 7/9] ARM: dts: omap5-uevm: Use reset-gpios for hsusb2_reset Roger Quadros
@ 2013-08-15 10:18 ` Roger Quadros
2013-08-15 10:18 ` [PATCH v2 9/9] ARM: dts: omap3-beagle-xm: Add USB Host support Roger Quadros
2013-08-16 10:52 ` [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Benoit Cousson
9 siblings, 0 replies; 16+ messages in thread
From: Roger Quadros @ 2013-08-15 10:18 UTC (permalink / raw)
To: linux-arm-kernel
Use a common naming scheme "mode0name.modename flags" for the
USB host pins to be consistent.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/boot/dts/omap3-beagle.dts | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index 71bde47..1237822 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -90,18 +90,18 @@
hsusbb2_pins: pinmux_hsusbb2_pins {
pinctrl-single,pins = <
- 0x5c0 (PIN_OUTPUT | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_clk */
- 0x5c2 (PIN_OUTPUT | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_stp */
- 0x5c4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dir */
- 0x5c6 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_nxt */
- 0x5c8 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat0 */
- 0x5cA (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat1 */
- 0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat2 */
- 0x1a6 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat3 */
- 0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat4 */
- 0x1aa (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat5 */
- 0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat6 */
- 0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat7 */
+ 0x5c0 (PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
+ 0x5c2 (PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
+ 0x5c4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
+ 0x5c6 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
+ 0x5c8 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
+ 0x5cA (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
+ 0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi1_cs3.hsusb2_data2 */
+ 0x1a6 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_clk.hsusb2_data7 */
+ 0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_simo.hsusb2_data4 */
+ 0x1aa (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_somi.hsusb2_data5 */
+ 0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_cs0.hsusb2_data6 */
+ 0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_cs1.hsusb2_data3 */
>;
};
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 9/9] ARM: dts: omap3-beagle-xm: Add USB Host support
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
` (7 preceding siblings ...)
2013-08-15 10:18 ` [PATCH v2 8/9] ARM: dts: omap3-beagle: Make USB host pin naming consistent Roger Quadros
@ 2013-08-15 10:18 ` Roger Quadros
2013-08-16 10:52 ` [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Benoit Cousson
9 siblings, 0 replies; 16+ messages in thread
From: Roger Quadros @ 2013-08-15 10:18 UTC (permalink / raw)
To: linux-arm-kernel
Provide RESET GPIO and Power regulator for the USB PHY,
the USB Host port mode and the PHY device for the controller.
Also provide pin multiplexer information for USB host pins.
We also relocate omap3_pmx_core pin definations so that they
are close to omap3_pmx_wkup pin definations.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/boot/dts/omap3-beagle-xm.dts | 65 ++++++++++++++++++++++++++++-----
1 files changed, 56 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index afdb164..b081f5a 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -69,6 +69,23 @@
};
};
+
+ /* HS USB Port 2 Power */
+ hsusb2_power: hsusb2_power_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "hsusb2_vbus";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&twl_gpio 18 0>; /* GPIO LEDA */
+ startup-delay-us = <70000>;
+ };
+
+ /* HS USB Host PHY on PORT 2 */
+ hsusb2_phy: hsusb2_phy {
+ compatible = "usb-nop-xceiv";
+ reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
+ vcc-supply = <&hsusb2_power>;
+ };
};
&omap3_pmx_wkup {
@@ -79,6 +96,37 @@
};
};
+&omap3_pmx_core {
+ pinctrl-names = "default";
+ pinctrl-0 = <
+ &hsusbb2_pins
+ >;
+
+ uart3_pins: pinmux_uart3_pins {
+ pinctrl-single,pins = <
+ 0x16e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
+ 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx OUTPUT | MODE0 */
+ >;
+ };
+
+ hsusbb2_pins: pinmux_hsusbb2_pins {
+ pinctrl-single,pins = <
+ 0x5c0 (PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
+ 0x5c2 (PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
+ 0x5c4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
+ 0x5c6 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
+ 0x5c8 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
+ 0x5cA (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
+ 0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi1_cs3.hsusb2_data2 */
+ 0x1a6 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_clk.hsusb2_data7 */
+ 0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_simo.hsusb2_data4 */
+ 0x1aa (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_somi.hsusb2_data5 */
+ 0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_cs0.hsusb2_data6 */
+ 0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_cs1.hsusb2_data3 */
+ >;
+ };
+};
+
&i2c1 {
clock-frequency = <2600000>;
@@ -148,15 +196,6 @@
power = <50>;
};
-&omap3_pmx_core {
- uart3_pins: pinmux_uart3_pins {
- pinctrl-single,pins = <
- 0x16e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
- 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx OUTPUT | MODE0 */
- >;
- };
-};
-
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>;
@@ -166,3 +205,11 @@
pinctrl-names = "default";
pinctrl-0 = <&gpio1_pins>;
};
+
+&usbhshost {
+ port2-mode = "ehci-phy";
+};
+
+&usbhsehci {
+ phys = <0 &hsusb2_phy>;
+};
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver
2013-08-15 10:18 [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Roger Quadros
` (8 preceding siblings ...)
2013-08-15 10:18 ` [PATCH v2 9/9] ARM: dts: omap3-beagle-xm: Add USB Host support Roger Quadros
@ 2013-08-16 10:52 ` Benoit Cousson
2013-08-19 7:37 ` Roger Quadros
9 siblings, 1 reply; 16+ messages in thread
From: Benoit Cousson @ 2013-08-16 10:52 UTC (permalink / raw)
To: linux-arm-kernel
Hi Roger,
On 15/08/2013 12:18, Roger Quadros wrote:
> Hi,
>
> Modelling the RESET line as a regulator supply wasn't a good idea
> as it abuses the regulator framework and makes adaptation
> code/data more complex.
>
> Instead, manage the RESET gpio line directly in the driver.
>
> This also makes us easy to migrate to a dedicated GPIO RESET controller
> whenever it becomes available. As of now, it doesn't seem to be making
> it into 3.12.
>
> *NOTE:* As there are changes to platform data, Patch 1 needs to be shared
> between the arm-soc tree and usb tree.
>
> Patch 1 is available at repo
> git://github.com/rogerq/linux.git
> in branch
> phy-reset-common
>
> Patch 2 contains the phy-nop driver changes
> Patches 3 and 4 adapt legacy boot code to the phy-nop driver changes.
> Patches 5, 6 and 7 adapt DT data to the binding changes.
> Patch 8 is cleanup of omap3-beagle DT.
> Patch 9 adds USB host support to omap3-beagle-xm using the new binding.
>
> Patches are based on v3.11-rc5.
> Tested leacy boot on omap3-beagle and omap3-beagle-xm
> Tested DT boot on omap3-beagle, omap3-beagle-xm and omap4-panda-es
>
> v2:
> - Added RESET GPIO polarity feature
> - Changed to gpio_set_value_cansleep()
>
> cheers,
> -roger
>
> ---
> Roger Quadros (9):
> usb: phy: nop: Add gpio_reset to platform data
> usb: phy: nop: Don't use regulator framework for RESET line
> ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct
> usbhs_phy_data
> ARM: OMAP2+: usb-host: Adapt to USB phy-nop RESET line changes
> ARM: dts: omap3-beagle: Use reset-gpios for hsusb2_reset
> ARM: dts: omap4-panda: Use reset-gpios for hsusb1_reset
> ARM: dts: omap5-uevm: Use reset-gpios for hsusb2_reset
> ARM: dts: omap3-beagle: Make USB host pin naming consistent
> ARM: dts: omap3-beagle-xm: Add USB Host support
The 5 DTS patches looks good to me, and I can apply them, but you need
to be sure that the driver will be merged for 3.12 as well.
Regards,
Benoit
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver
2013-08-16 10:52 ` [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver Benoit Cousson
@ 2013-08-19 7:37 ` Roger Quadros
0 siblings, 0 replies; 16+ messages in thread
From: Roger Quadros @ 2013-08-19 7:37 UTC (permalink / raw)
To: linux-arm-kernel
Hi Felipe,
On 08/16/2013 01:52 PM, Benoit Cousson wrote:
> Hi Roger,
>
> On 15/08/2013 12:18, Roger Quadros wrote:
>> Hi,
>>
>> Modelling the RESET line as a regulator supply wasn't a good idea
>> as it abuses the regulator framework and makes adaptation
>> code/data more complex.
>>
>> Instead, manage the RESET gpio line directly in the driver.
>>
>> This also makes us easy to migrate to a dedicated GPIO RESET controller
>> whenever it becomes available. As of now, it doesn't seem to be making
>> it into 3.12.
>>
>> *NOTE:* As there are changes to platform data, Patch 1 needs to be shared
>> between the arm-soc tree and usb tree.
>>
>> Patch 1 is available at repo
>> git://github.com/rogerq/linux.git
>> in branch
>> phy-reset-common
>>
>> Patch 2 contains the phy-nop driver changes
>> Patches 3 and 4 adapt legacy boot code to the phy-nop driver changes.
>> Patches 5, 6 and 7 adapt DT data to the binding changes.
>> Patch 8 is cleanup of omap3-beagle DT.
>> Patch 9 adds USB host support to omap3-beagle-xm using the new binding.
>>
>> Patches are based on v3.11-rc5.
>> Tested leacy boot on omap3-beagle and omap3-beagle-xm
>> Tested DT boot on omap3-beagle, omap3-beagle-xm and omap4-panda-es
>>
>> v2:
>> - Added RESET GPIO polarity feature
>> - Changed to gpio_set_value_cansleep()
>>
>> cheers,
>> -roger
>>
>> ---
>> Roger Quadros (9):
>> usb: phy: nop: Add gpio_reset to platform data
>> usb: phy: nop: Don't use regulator framework for RESET line
>> ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct
>> usbhs_phy_data
>> ARM: OMAP2+: usb-host: Adapt to USB phy-nop RESET line changes
>> ARM: dts: omap3-beagle: Use reset-gpios for hsusb2_reset
>> ARM: dts: omap4-panda: Use reset-gpios for hsusb1_reset
>> ARM: dts: omap5-uevm: Use reset-gpios for hsusb2_reset
>> ARM: dts: omap3-beagle: Make USB host pin naming consistent
>> ARM: dts: omap3-beagle-xm: Add USB Host support
>
> The 5 DTS patches looks good to me, and I can apply them, but you need to be sure that the driver will be merged for 3.12 as well.
Could you please let us know if this series can make it to 3.12? Thanks.
cheers,
-roger
^ permalink raw reply [flat|nested] 16+ messages in thread