* [PATCH/RFC 00/10] Add support for USB2.0 host/peripheral on R-Car H3
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
This patch set is based on the renesas-drivers.git /
renesas-drivers-2016-01-26-v4.5-rc1 tag
(commit id = 106b6565bfb6e2f35339347f3cfd0858f08bfcaa),
and the following patches:
[ renesas_usbhs driver ]
http://thread.gmane.org/gmane.linux.usb.general/135895
[ generic phy driver for R-Car H3 ]
http://thread.gmane.org/gmane.linux.kernel/2120685
This patch set contains patches that are related to generic phy driver.
As I wrote a comment in patch 8, to handle VBUS on/off for USB2.0 host
channel 0, I use a regulator driver instead of extcon/max3355 driver.
This is a reason that I marked this patch set is a RFC because I'm not
sure that this way is acceptable or not.
Also patch 6 should resolve checkpatch.pl warnings, and patch 7 should
have dmas property to use USB-DMAC.
Takeshi Kihara (1):
pinctrl: sh-pfc: r8a7795: Add USB2.0 host support
Yoshihiro Shimoda (9):
phy: rcar-gen3-usb2: Add phy-supply description in device tree doc
phy: rcar-gen3-usb2: remove unnecesary struct rcar_gen3_data
phy: rcar-gen3-usb2: add extcon support
arm64: dts: r8a7795: add usb2_phy device nodes
arm64: dts: r8a7795: add USB2.0 Host (EHCI/OHCI) device nodes
arm64: dts: r8a7795: add HS-USB device node
arm64: dts: salvator-x: enable usb2_phy
arm64: dts: salvator-x: enable USB 2.0 Host channels
arm64: dts: salvator-x: enable HS-USB
.../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 +
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 73 +++++++++++++-
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 107 +++++++++++++++++++++
drivers/phy/Kconfig | 1 +
drivers/phy/phy-rcar-gen3-usb2.c | 59 ++++++++----
drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 43 +++++++++
6 files changed, 265 insertions(+), 20 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH/RFC 00/10] Add support for USB2.0 host/peripheral on R-Car H3
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
This patch set is based on the renesas-drivers.git /
renesas-drivers-2016-01-26-v4.5-rc1 tag
(commit id = 106b6565bfb6e2f35339347f3cfd0858f08bfcaa),
and the following patches:
[ renesas_usbhs driver ]
http://thread.gmane.org/gmane.linux.usb.general/135895
[ generic phy driver for R-Car H3 ]
http://thread.gmane.org/gmane.linux.kernel/2120685
This patch set contains patches that are related to generic phy driver.
As I wrote a comment in patch 8, to handle VBUS on/off for USB2.0 host
channel 0, I use a regulator driver instead of extcon/max3355 driver.
This is a reason that I marked this patch set is a RFC because I'm not
sure that this way is acceptable or not.
Also patch 6 should resolve checkpatch.pl warnings, and patch 7 should
have dmas property to use USB-DMAC.
Takeshi Kihara (1):
pinctrl: sh-pfc: r8a7795: Add USB2.0 host support
Yoshihiro Shimoda (9):
phy: rcar-gen3-usb2: Add phy-supply description in device tree doc
phy: rcar-gen3-usb2: remove unnecesary struct rcar_gen3_data
phy: rcar-gen3-usb2: add extcon support
arm64: dts: r8a7795: add usb2_phy device nodes
arm64: dts: r8a7795: add USB2.0 Host (EHCI/OHCI) device nodes
arm64: dts: r8a7795: add HS-USB device node
arm64: dts: salvator-x: enable usb2_phy
arm64: dts: salvator-x: enable USB 2.0 Host channels
arm64: dts: salvator-x: enable HS-USB
.../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 +
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 73 +++++++++++++-
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 107 +++++++++++++++++++++
drivers/phy/Kconfig | 1 +
drivers/phy/phy-rcar-gen3-usb2.c | 59 ++++++++----
drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 43 +++++++++
6 files changed, 265 insertions(+), 20 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH/RFC 01/10] pinctrl: sh-pfc: r8a7795: Add USB2.0 host support
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Takeshi Kihara, Yoshihiro Shimoda
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
This patch adds USB[0-2] (USB2.0 host) pinmux support to r8a7795 SoC.
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 43 ++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
index ce4f5cd..19819ca 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
@@ -3090,6 +3090,31 @@ static const unsigned int ssi9_ctrl_b_mux[] = {
SSI_SCK9_B_MARK, SSI_WS9_B_MARK,
};
+/* - USB0 ------------------------------------------------------------------- */
+static const unsigned int usb0_pins[] = {
+ /* PWEN, OVC */
+ RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
+};
+static const unsigned int usb0_mux[] = {
+ USB0_PWEN_MARK, USB0_OVC_MARK,
+};
+/* - USB1 ------------------------------------------------------------------- */
+static const unsigned int usb1_pins[] = {
+ /* PWEN, OVC */
+ RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
+};
+static const unsigned int usb1_mux[] = {
+ USB1_PWEN_MARK, USB1_OVC_MARK,
+};
+/* - USB2 ------------------------------------------------------------------- */
+static const unsigned int usb2_pins[] = {
+ /* PWEN, OVC */
+ RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
+};
+static const unsigned int usb2_mux[] = {
+ USB2_PWEN_MARK, USB2_OVC_MARK,
+};
+
static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(audio_clk_a_a),
SH_PFC_PIN_GROUP(audio_clk_a_b),
@@ -3322,6 +3347,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(ssi9_data_b),
SH_PFC_PIN_GROUP(ssi9_ctrl_a),
SH_PFC_PIN_GROUP(ssi9_ctrl_b),
+ SH_PFC_PIN_GROUP(usb0),
+ SH_PFC_PIN_GROUP(usb1),
+ SH_PFC_PIN_GROUP(usb2),
};
static const char * const audio_clk_groups[] = {
@@ -3636,6 +3664,18 @@ static const char * const ssi_groups[] = {
"ssi9_ctrl_b",
};
+static const char * const usb0_groups[] = {
+ "usb0",
+};
+
+static const char * const usb1_groups[] = {
+ "usb1",
+};
+
+static const char * const usb2_groups[] = {
+ "usb2",
+};
+
static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(audio_clk),
SH_PFC_FUNCTION(avb),
@@ -3664,6 +3704,9 @@ static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(sdhi2),
SH_PFC_FUNCTION(sdhi3),
SH_PFC_FUNCTION(ssi),
+ SH_PFC_FUNCTION(usb0),
+ SH_PFC_FUNCTION(usb1),
+ SH_PFC_FUNCTION(usb2),
};
static const struct pinmux_cfg_reg pinmux_config_regs[] = {
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 01/10] pinctrl: sh-pfc: r8a7795: Add USB2.0 host support
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Takeshi Kihara, Yoshihiro Shimoda
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
This patch adds USB[0-2] (USB2.0 host) pinmux support to r8a7795 SoC.
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 43 ++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
index ce4f5cd..19819ca 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
@@ -3090,6 +3090,31 @@ static const unsigned int ssi9_ctrl_b_mux[] = {
SSI_SCK9_B_MARK, SSI_WS9_B_MARK,
};
+/* - USB0 ------------------------------------------------------------------- */
+static const unsigned int usb0_pins[] = {
+ /* PWEN, OVC */
+ RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
+};
+static const unsigned int usb0_mux[] = {
+ USB0_PWEN_MARK, USB0_OVC_MARK,
+};
+/* - USB1 ------------------------------------------------------------------- */
+static const unsigned int usb1_pins[] = {
+ /* PWEN, OVC */
+ RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
+};
+static const unsigned int usb1_mux[] = {
+ USB1_PWEN_MARK, USB1_OVC_MARK,
+};
+/* - USB2 ------------------------------------------------------------------- */
+static const unsigned int usb2_pins[] = {
+ /* PWEN, OVC */
+ RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
+};
+static const unsigned int usb2_mux[] = {
+ USB2_PWEN_MARK, USB2_OVC_MARK,
+};
+
static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(audio_clk_a_a),
SH_PFC_PIN_GROUP(audio_clk_a_b),
@@ -3322,6 +3347,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(ssi9_data_b),
SH_PFC_PIN_GROUP(ssi9_ctrl_a),
SH_PFC_PIN_GROUP(ssi9_ctrl_b),
+ SH_PFC_PIN_GROUP(usb0),
+ SH_PFC_PIN_GROUP(usb1),
+ SH_PFC_PIN_GROUP(usb2),
};
static const char * const audio_clk_groups[] = {
@@ -3636,6 +3664,18 @@ static const char * const ssi_groups[] = {
"ssi9_ctrl_b",
};
+static const char * const usb0_groups[] = {
+ "usb0",
+};
+
+static const char * const usb1_groups[] = {
+ "usb1",
+};
+
+static const char * const usb2_groups[] = {
+ "usb2",
+};
+
static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(audio_clk),
SH_PFC_FUNCTION(avb),
@@ -3664,6 +3704,9 @@ static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(sdhi2),
SH_PFC_FUNCTION(sdhi3),
SH_PFC_FUNCTION(ssi),
+ SH_PFC_FUNCTION(usb0),
+ SH_PFC_FUNCTION(usb1),
+ SH_PFC_FUNCTION(usb2),
};
static const struct pinmux_cfg_reg pinmux_config_regs[] = {
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 02/10] phy: rcar-gen3-usb2: Add phy-supply description in device tree doc
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
To handle the VBUS on/off by a regulator driver, this patch adds
description about phy-supply in the rcar-gen3-phy-usb2.txt.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
index eaf7e9b..48b33a9 100644
--- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
+++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
@@ -15,6 +15,8 @@ To use a USB channel where USB 2.0 Host and HSUSB (USB 2.0 Peripheral) are
combined, the device tree node should set interrupt properties to use the
channel as USB OTG:
- interrupts: interrupt specifier for the PHY.
+- phy-supply: Phandle to a regulator that provides power to the VBUS. This
+ regulator will be managed during the PHY power on/off sequence.
Example (R-Car H3):
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 02/10] phy: rcar-gen3-usb2: Add phy-supply description in device tree doc
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
To handle the VBUS on/off by a regulator driver, this patch adds
description about phy-supply in the rcar-gen3-phy-usb2.txt.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
index eaf7e9b..48b33a9 100644
--- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
+++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
@@ -15,6 +15,8 @@ To use a USB channel where USB 2.0 Host and HSUSB (USB 2.0 Peripheral) are
combined, the device tree node should set interrupt properties to use the
channel as USB OTG:
- interrupts: interrupt specifier for the PHY.
+- phy-supply: Phandle to a regulator that provides power to the VBUS. This
+ regulator will be managed during the PHY power on/off sequence.
Example (R-Car H3):
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 03/10] phy: rcar-gen3-usb2: remove unnecesary struct rcar_gen3_data
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Since this driver uses the struct rcar_gen3_data in struct rcar_gen3_chan
only, we can remove the rcar_gen3_data.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/phy/phy-rcar-gen3-usb2.c | 33 ++++++++++++++-------------------
1 file changed, 14 insertions(+), 19 deletions(-)
diff --git a/drivers/phy/phy-rcar-gen3-usb2.c b/drivers/phy/phy-rcar-gen3-usb2.c
index bc4f7dd..2da2148 100644
--- a/drivers/phy/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/phy-rcar-gen3-usb2.c
@@ -74,20 +74,15 @@
#define USB2_ADPCTRL_IDPULLUP BIT(5) /* 1 = ID sampling is enabled */
#define USB2_ADPCTRL_DRVVBUS BIT(4)
-struct rcar_gen3_data {
- void __iomem *base;
- struct clk *clk;
-};
-
struct rcar_gen3_chan {
- struct rcar_gen3_data usb2;
+ void __iomem *base;
struct phy *phy;
bool has_otg;
};
static void rcar_gen3_set_host_mode(struct rcar_gen3_chan *ch, int host)
{
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 val = readl(usb2_base + USB2_COMMCTRL);
dev_vdbg(&ch->phy->dev, "%s: %08x, %d\n", __func__, val, host);
@@ -100,7 +95,7 @@ static void rcar_gen3_set_host_mode(struct rcar_gen3_chan *ch, int host)
static void rcar_gen3_set_linectrl(struct rcar_gen3_chan *ch, int dp, int dm)
{
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 val = readl(usb2_base + USB2_LINECTRL1);
dev_vdbg(&ch->phy->dev, "%s: %08x, %d, %d\n", __func__, val, dp, dm);
@@ -114,7 +109,7 @@ static void rcar_gen3_set_linectrl(struct rcar_gen3_chan *ch, int dp, int dm)
static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus)
{
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 val = readl(usb2_base + USB2_ADPCTRL);
dev_vdbg(&ch->phy->dev, "%s: %08x, %d\n", __func__, val, vbus);
@@ -141,13 +136,13 @@ static void rcar_gen3_init_for_peri(struct rcar_gen3_chan *ch)
static bool rcar_gen3_check_vbus(struct rcar_gen3_chan *ch)
{
- return !!(readl(ch->usb2.base + USB2_ADPCTRL) &
+ return !!(readl(ch->base + USB2_ADPCTRL) &
USB2_ADPCTRL_OTGSESSVLD);
}
static bool rcar_gen3_check_id(struct rcar_gen3_chan *ch)
{
- return !!(readl(ch->usb2.base + USB2_ADPCTRL) & USB2_ADPCTRL_IDDIG);
+ return !!(readl(ch->base + USB2_ADPCTRL) & USB2_ADPCTRL_IDDIG);
}
static void rcar_gen3_device_recognition(struct rcar_gen3_chan *ch)
@@ -166,7 +161,7 @@ static void rcar_gen3_device_recognition(struct rcar_gen3_chan *ch)
static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
{
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 val;
val = readl(usb2_base + USB2_VBCTRL);
@@ -187,7 +182,7 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
static int rcar_gen3_phy_usb2_init(struct phy *p)
{
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
- void __iomem *usb2_base = channel->usb2.base;
+ void __iomem *usb2_base = channel->base;
/* Initialize USB2 part */
writel(USB2_INT_ENABLE_INIT, usb2_base + USB2_INT_ENABLE);
@@ -205,7 +200,7 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
{
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
- writel(0, channel->usb2.base + USB2_INT_ENABLE);
+ writel(0, channel->base + USB2_INT_ENABLE);
return 0;
}
@@ -213,7 +208,7 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
static int rcar_gen3_phy_usb2_power_on(struct phy *p)
{
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
- void __iomem *usb2_base = channel->usb2.base;
+ void __iomem *usb2_base = channel->base;
u32 val;
val = readl(usb2_base + USB2_USBCTR);
@@ -235,7 +230,7 @@ static struct phy_ops rcar_gen3_phy_usb2_ops = {
static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
{
struct rcar_gen3_chan *ch = _ch;
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 status = readl(usb2_base + USB2_OBINTSTA);
irqreturn_t ret = IRQ_NONE;
@@ -273,9 +268,9 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- channel->usb2.base = devm_ioremap_resource(dev, res);
- if (IS_ERR(channel->usb2.base))
- return PTR_ERR(channel->usb2.base);
+ channel->base = devm_ioremap_resource(dev, res);
+ if (IS_ERR(channel->base))
+ return PTR_ERR(channel->base);
/* call request_irq for OTG */
irq = platform_get_irq(pdev, 0);
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 03/10] phy: rcar-gen3-usb2: remove unnecesary struct rcar_gen3_data
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Since this driver uses the struct rcar_gen3_data in struct rcar_gen3_chan
only, we can remove the rcar_gen3_data.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/phy/phy-rcar-gen3-usb2.c | 33 ++++++++++++++-------------------
1 file changed, 14 insertions(+), 19 deletions(-)
diff --git a/drivers/phy/phy-rcar-gen3-usb2.c b/drivers/phy/phy-rcar-gen3-usb2.c
index bc4f7dd..2da2148 100644
--- a/drivers/phy/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/phy-rcar-gen3-usb2.c
@@ -74,20 +74,15 @@
#define USB2_ADPCTRL_IDPULLUP BIT(5) /* 1 = ID sampling is enabled */
#define USB2_ADPCTRL_DRVVBUS BIT(4)
-struct rcar_gen3_data {
- void __iomem *base;
- struct clk *clk;
-};
-
struct rcar_gen3_chan {
- struct rcar_gen3_data usb2;
+ void __iomem *base;
struct phy *phy;
bool has_otg;
};
static void rcar_gen3_set_host_mode(struct rcar_gen3_chan *ch, int host)
{
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 val = readl(usb2_base + USB2_COMMCTRL);
dev_vdbg(&ch->phy->dev, "%s: %08x, %d\n", __func__, val, host);
@@ -100,7 +95,7 @@ static void rcar_gen3_set_host_mode(struct rcar_gen3_chan *ch, int host)
static void rcar_gen3_set_linectrl(struct rcar_gen3_chan *ch, int dp, int dm)
{
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 val = readl(usb2_base + USB2_LINECTRL1);
dev_vdbg(&ch->phy->dev, "%s: %08x, %d, %d\n", __func__, val, dp, dm);
@@ -114,7 +109,7 @@ static void rcar_gen3_set_linectrl(struct rcar_gen3_chan *ch, int dp, int dm)
static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus)
{
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 val = readl(usb2_base + USB2_ADPCTRL);
dev_vdbg(&ch->phy->dev, "%s: %08x, %d\n", __func__, val, vbus);
@@ -141,13 +136,13 @@ static void rcar_gen3_init_for_peri(struct rcar_gen3_chan *ch)
static bool rcar_gen3_check_vbus(struct rcar_gen3_chan *ch)
{
- return !!(readl(ch->usb2.base + USB2_ADPCTRL) &
+ return !!(readl(ch->base + USB2_ADPCTRL) &
USB2_ADPCTRL_OTGSESSVLD);
}
static bool rcar_gen3_check_id(struct rcar_gen3_chan *ch)
{
- return !!(readl(ch->usb2.base + USB2_ADPCTRL) & USB2_ADPCTRL_IDDIG);
+ return !!(readl(ch->base + USB2_ADPCTRL) & USB2_ADPCTRL_IDDIG);
}
static void rcar_gen3_device_recognition(struct rcar_gen3_chan *ch)
@@ -166,7 +161,7 @@ static void rcar_gen3_device_recognition(struct rcar_gen3_chan *ch)
static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
{
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 val;
val = readl(usb2_base + USB2_VBCTRL);
@@ -187,7 +182,7 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
static int rcar_gen3_phy_usb2_init(struct phy *p)
{
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
- void __iomem *usb2_base = channel->usb2.base;
+ void __iomem *usb2_base = channel->base;
/* Initialize USB2 part */
writel(USB2_INT_ENABLE_INIT, usb2_base + USB2_INT_ENABLE);
@@ -205,7 +200,7 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
{
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
- writel(0, channel->usb2.base + USB2_INT_ENABLE);
+ writel(0, channel->base + USB2_INT_ENABLE);
return 0;
}
@@ -213,7 +208,7 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
static int rcar_gen3_phy_usb2_power_on(struct phy *p)
{
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
- void __iomem *usb2_base = channel->usb2.base;
+ void __iomem *usb2_base = channel->base;
u32 val;
val = readl(usb2_base + USB2_USBCTR);
@@ -235,7 +230,7 @@ static struct phy_ops rcar_gen3_phy_usb2_ops = {
static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
{
struct rcar_gen3_chan *ch = _ch;
- void __iomem *usb2_base = ch->usb2.base;
+ void __iomem *usb2_base = ch->base;
u32 status = readl(usb2_base + USB2_OBINTSTA);
irqreturn_t ret = IRQ_NONE;
@@ -273,9 +268,9 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- channel->usb2.base = devm_ioremap_resource(dev, res);
- if (IS_ERR(channel->usb2.base))
- return PTR_ERR(channel->usb2.base);
+ channel->base = devm_ioremap_resource(dev, res);
+ if (IS_ERR(channel->base))
+ return PTR_ERR(channel->base);
/* call request_irq for OTG */
irq = platform_get_irq(pdev, 0);
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 04/10] phy: rcar-gen3-usb2: add extcon support
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
This patch adds extcon support for otg related channel.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/phy/Kconfig | 1 +
drivers/phy/phy-rcar-gen3-usb2.c | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index e7e117d..6d0e625 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -121,6 +121,7 @@ config PHY_RCAR_GEN2
config PHY_RCAR_GEN3_USB2
tristate "Renesas R-Car generation 3 USB 2.0 PHY driver"
depends on OF && ARCH_SHMOBILE
+ depends on EXTCON
select GENERIC_PHY
help
Support for USB 2.0 PHY found on Renesas R-Car generation 3 SoCs.
diff --git a/drivers/phy/phy-rcar-gen3-usb2.c b/drivers/phy/phy-rcar-gen3-usb2.c
index 2da2148..5ff5653 100644
--- a/drivers/phy/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/phy-rcar-gen3-usb2.c
@@ -12,6 +12,7 @@
* published by the Free Software Foundation.
*/
+#include <linux/extcon.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
@@ -76,6 +77,7 @@
struct rcar_gen3_chan {
void __iomem *base;
+ struct extcon_dev *extcon;
struct phy *phy;
bool has_otg;
};
@@ -125,6 +127,9 @@ static void rcar_gen3_init_for_host(struct rcar_gen3_chan *ch)
rcar_gen3_set_linectrl(ch, 1, 1);
rcar_gen3_set_host_mode(ch, 1);
rcar_gen3_enable_vbus_ctrl(ch, 1);
+
+ extcon_set_cable_state_(ch->extcon, EXTCON_USB_HOST, true);
+ extcon_set_cable_state_(ch->extcon, EXTCON_USB, false);
}
static void rcar_gen3_init_for_peri(struct rcar_gen3_chan *ch)
@@ -132,6 +137,9 @@ static void rcar_gen3_init_for_peri(struct rcar_gen3_chan *ch)
rcar_gen3_set_linectrl(ch, 0, 1);
rcar_gen3_set_host_mode(ch, 0);
rcar_gen3_enable_vbus_ctrl(ch, 0);
+
+ extcon_set_cable_state_(ch->extcon, EXTCON_USB_HOST, false);
+ extcon_set_cable_state_(ch->extcon, EXTCON_USB, true);
}
static bool rcar_gen3_check_vbus(struct rcar_gen3_chan *ch)
@@ -250,6 +258,12 @@ static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = {
};
MODULE_DEVICE_TABLE(of, rcar_gen3_phy_usb2_match_table);
+static const unsigned int rcar_gen3_phy_cable[] = {
+ EXTCON_USB,
+ EXTCON_USB_HOST,
+ EXTCON_NONE,
+};
+
static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -275,11 +289,23 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
/* call request_irq for OTG */
irq = platform_get_irq(pdev, 0);
if (irq >= 0) {
+ int ret;
+
irq = devm_request_irq(dev, irq, rcar_gen3_phy_usb2_irq,
IRQF_SHARED, dev_name(dev), channel);
if (irq < 0)
dev_err(dev, "No irq handler (%d)\n", irq);
channel->has_otg = true;
+ channel->extcon = devm_extcon_dev_allocate(dev,
+ rcar_gen3_phy_cable);
+ if (IS_ERR(channel->extcon))
+ return PTR_ERR(channel->extcon);
+
+ ret = devm_extcon_dev_register(dev, channel->extcon);
+ if (ret < 0) {
+ dev_err(dev, "Failed to register extcon\n");
+ return ret;
+ }
}
/* devm_phy_create() will call pm_runtime_enable(dev); */
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 04/10] phy: rcar-gen3-usb2: add extcon support
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
This patch adds extcon support for otg related channel.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/phy/Kconfig | 1 +
drivers/phy/phy-rcar-gen3-usb2.c | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index e7e117d..6d0e625 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -121,6 +121,7 @@ config PHY_RCAR_GEN2
config PHY_RCAR_GEN3_USB2
tristate "Renesas R-Car generation 3 USB 2.0 PHY driver"
depends on OF && ARCH_SHMOBILE
+ depends on EXTCON
select GENERIC_PHY
help
Support for USB 2.0 PHY found on Renesas R-Car generation 3 SoCs.
diff --git a/drivers/phy/phy-rcar-gen3-usb2.c b/drivers/phy/phy-rcar-gen3-usb2.c
index 2da2148..5ff5653 100644
--- a/drivers/phy/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/phy-rcar-gen3-usb2.c
@@ -12,6 +12,7 @@
* published by the Free Software Foundation.
*/
+#include <linux/extcon.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
@@ -76,6 +77,7 @@
struct rcar_gen3_chan {
void __iomem *base;
+ struct extcon_dev *extcon;
struct phy *phy;
bool has_otg;
};
@@ -125,6 +127,9 @@ static void rcar_gen3_init_for_host(struct rcar_gen3_chan *ch)
rcar_gen3_set_linectrl(ch, 1, 1);
rcar_gen3_set_host_mode(ch, 1);
rcar_gen3_enable_vbus_ctrl(ch, 1);
+
+ extcon_set_cable_state_(ch->extcon, EXTCON_USB_HOST, true);
+ extcon_set_cable_state_(ch->extcon, EXTCON_USB, false);
}
static void rcar_gen3_init_for_peri(struct rcar_gen3_chan *ch)
@@ -132,6 +137,9 @@ static void rcar_gen3_init_for_peri(struct rcar_gen3_chan *ch)
rcar_gen3_set_linectrl(ch, 0, 1);
rcar_gen3_set_host_mode(ch, 0);
rcar_gen3_enable_vbus_ctrl(ch, 0);
+
+ extcon_set_cable_state_(ch->extcon, EXTCON_USB_HOST, false);
+ extcon_set_cable_state_(ch->extcon, EXTCON_USB, true);
}
static bool rcar_gen3_check_vbus(struct rcar_gen3_chan *ch)
@@ -250,6 +258,12 @@ static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = {
};
MODULE_DEVICE_TABLE(of, rcar_gen3_phy_usb2_match_table);
+static const unsigned int rcar_gen3_phy_cable[] = {
+ EXTCON_USB,
+ EXTCON_USB_HOST,
+ EXTCON_NONE,
+};
+
static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -275,11 +289,23 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
/* call request_irq for OTG */
irq = platform_get_irq(pdev, 0);
if (irq >= 0) {
+ int ret;
+
irq = devm_request_irq(dev, irq, rcar_gen3_phy_usb2_irq,
IRQF_SHARED, dev_name(dev), channel);
if (irq < 0)
dev_err(dev, "No irq handler (%d)\n", irq);
channel->has_otg = true;
+ channel->extcon = devm_extcon_dev_allocate(dev,
+ rcar_gen3_phy_cable);
+ if (IS_ERR(channel->extcon))
+ return PTR_ERR(channel->extcon);
+
+ ret = devm_extcon_dev_register(dev, channel->extcon);
+ if (ret < 0) {
+ dev_err(dev, "Failed to register extcon\n");
+ return ret;
+ }
}
/* devm_phy_create() will call pm_runtime_enable(dev); */
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 05/10] arm64: dts: r8a7795: add usb2_phy device nodes
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 119549e..f0f0c27 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -880,5 +880,33 @@
power-domains = <&cpg>;
status = "disabled";
};
+
+ usb2_phy0: usb-phy@ee080200 {
+ compatible = "renesas,usb2-phy-r8a7795";
+ reg = <0 0xee080200 0 0x700>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 703>;
+ power-domains = <&cpg>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ usb2_phy1: usb-phy@ee0a0200 {
+ compatible = "renesas,usb2-phy-r8a7795";
+ reg = <0 0xee0a0200 0 0x700>;
+ clocks = <&cpg CPG_MOD 702>;
+ power-domains = <&cpg>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ usb2_phy2: usb-phy@ee0c0200 {
+ compatible = "renesas,usb2-phy-r8a7795";
+ reg = <0 0xee0c0200 0 0x700>;
+ clocks = <&cpg CPG_MOD 701>;
+ power-domains = <&cpg>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 05/10] arm64: dts: r8a7795: add usb2_phy device nodes
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 119549e..f0f0c27 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -880,5 +880,33 @@
power-domains = <&cpg>;
status = "disabled";
};
+
+ usb2_phy0: usb-phy@ee080200 {
+ compatible = "renesas,usb2-phy-r8a7795";
+ reg = <0 0xee080200 0 0x700>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 703>;
+ power-domains = <&cpg>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ usb2_phy1: usb-phy@ee0a0200 {
+ compatible = "renesas,usb2-phy-r8a7795";
+ reg = <0 0xee0a0200 0 0x700>;
+ clocks = <&cpg CPG_MOD 702>;
+ power-domains = <&cpg>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ usb2_phy2: usb-phy@ee0c0200 {
+ compatible = "renesas,usb2-phy-r8a7795";
+ reg = <0 0xee0c0200 0 0x700>;
+ clocks = <&cpg CPG_MOD 701>;
+ power-domains = <&cpg>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 06/10] arm64: dts: r8a7795: add USB2.0 Host (EHCI/OHCI) device nodes
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 66 ++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index f0f0c27..76800ba 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -908,5 +908,71 @@
#phy-cells = <0>;
status = "disabled";
};
+
+ ehci0: usb@ee080100 {
+ compatible = "renesas,ehci-r8a7795", "generic-ehci";
+ reg = <0 0xee080100 0 0x100>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 703>;
+ phys = <&usb2_phy0>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ehci1: usb@ee0a0100 {
+ compatible = "renesas,ehci-r8a7795", "generic-ehci";
+ reg = <0 0xee0a0100 0 0x100>;
+ interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 702>;
+ phys = <&usb2_phy1>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ehci2: usb@ee0c0100 {
+ compatible = "renesas,ehci-r8a7795", "generic-ehci";
+ reg = <0 0xee0c0100 0 0x100>;
+ interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 701>;
+ phys = <&usb2_phy2>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ohci0: usb@ee080000 {
+ compatible = "renesas,ohci-r8a7795", "generic-ohci";
+ reg = <0 0xee080000 0 0x100>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 703>;
+ phys = <&usb2_phy0>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ohci1: usb@ee0a0000 {
+ compatible = "renesas,ohci-r8a7795", "generic-ohci";
+ reg = <0 0xee0a0000 0 0x100>;
+ interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 702>;
+ phys = <&usb2_phy1>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ohci2: usb@ee0c0000 {
+ compatible = "renesas,ohci-r8a7795", "generic-ohci";
+ reg = <0 0xee0c0000 0 0x100>;
+ interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 701>;
+ phys = <&usb2_phy2>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 06/10] arm64: dts: r8a7795: add USB2.0 Host (EHCI/OHCI) device nodes
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 66 ++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index f0f0c27..76800ba 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -908,5 +908,71 @@
#phy-cells = <0>;
status = "disabled";
};
+
+ ehci0: usb@ee080100 {
+ compatible = "renesas,ehci-r8a7795", "generic-ehci";
+ reg = <0 0xee080100 0 0x100>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 703>;
+ phys = <&usb2_phy0>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ehci1: usb@ee0a0100 {
+ compatible = "renesas,ehci-r8a7795", "generic-ehci";
+ reg = <0 0xee0a0100 0 0x100>;
+ interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 702>;
+ phys = <&usb2_phy1>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ehci2: usb@ee0c0100 {
+ compatible = "renesas,ehci-r8a7795", "generic-ehci";
+ reg = <0 0xee0c0100 0 0x100>;
+ interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 701>;
+ phys = <&usb2_phy2>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ohci0: usb@ee080000 {
+ compatible = "renesas,ohci-r8a7795", "generic-ohci";
+ reg = <0 0xee080000 0 0x100>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 703>;
+ phys = <&usb2_phy0>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ohci1: usb@ee0a0000 {
+ compatible = "renesas,ohci-r8a7795", "generic-ohci";
+ reg = <0 0xee0a0000 0 0x100>;
+ interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 702>;
+ phys = <&usb2_phy1>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ ohci2: usb@ee0c0000 {
+ compatible = "renesas,ohci-r8a7795", "generic-ohci";
+ reg = <0 0xee0c0000 0 0x100>;
+ interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 701>;
+ phys = <&usb2_phy2>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 07/10] arm64: dts: r8a7795: add HS-USB device node
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 76800ba..1a47a06 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -974,5 +974,18 @@
power-domains = <&cpg>;
status = "disabled";
};
+
+ hsusb: usb@e6590000 {
+ compatible = "renesas,usbhs-r8a7795",
+ "renesas,rcar-gen3-usbhs";
+ reg = <0 0xe6590000 0 0x100>;
+ interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 704>;
+ renesas,buswait = <11>;
+ phys = <&usb2_phy0>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 07/10] arm64: dts: r8a7795: add HS-USB device node
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 76800ba..1a47a06 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -974,5 +974,18 @@
power-domains = <&cpg>;
status = "disabled";
};
+
+ hsusb: usb@e6590000 {
+ compatible = "renesas,usbhs-r8a7795",
+ "renesas,rcar-gen3-usbhs";
+ reg = <0 0xe6590000 0 0x100>;
+ interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 704>;
+ renesas,buswait = <11>;
+ phys = <&usb2_phy0>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 08/10] arm64: dts: salvator-x: enable usb2_phy
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
This patch also adds a regulator node for USB2.0 to handle VBUS on/off
by the generic PHY framework.
This board has a MAX3355 chip. However, we cannot use the extcon/max3355
driver because the ID pin doesn't connect to a gpio pin (in other words,
it connects to the SoC specific pin).
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 45 +++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 9af1e3f..3ff6e79 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -33,6 +33,7 @@
/dts-v1/;
#include "r8a7795.dtsi"
+#include <dt-bindings/gpio/gpio.h>
/ {
model = "Renesas Salvator-X board based on r8a7795";
@@ -86,6 +87,15 @@
sound-dai = <&ak4613>;
};
};
+
+ vcc_usb2_phy0: regulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "USB20_VBUS0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
};
&extal_clk {
@@ -122,8 +132,22 @@
"audio_clkout_a", "audio_clkout3_a";
renesas,function = "audio_clk";
};
-};
+ usb0_pins: usb0 {
+ renesas,groups = "usb0";
+ renesas,function = "usb";
+ };
+
+ usb1_pins: usb1 {
+ renesas,groups = "usb1";
+ renesas,function = "usb";
+ };
+
+ usb2_pins: usb2 {
+ renesas,groups = "usb2";
+ renesas,function = "usb";
+ };
+};
&scif1 {
pinctrl-0 = <&scif1_pins>;
pinctrl-names = "default";
@@ -253,3 +277,22 @@
&xhci0 {
status = "okay";
};
+
+&usb2_phy0 {
+ status = "okay";
+ phy-supply = <&vcc_usb2_phy0>;
+ pinctrl-0 = <&usb0_pins>;
+ pinctrl-names = "default";
+};
+
+&usb2_phy1 {
+ status = "okay";
+ pinctrl-0 = <&usb1_pins>;
+ pinctrl-names = "default";
+};
+
+&usb2_phy2 {
+ status = "okay";
+ pinctrl-0 = <&usb2_pins>;
+ pinctrl-names = "default";
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 08/10] arm64: dts: salvator-x: enable usb2_phy
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
This patch also adds a regulator node for USB2.0 to handle VBUS on/off
by the generic PHY framework.
This board has a MAX3355 chip. However, we cannot use the extcon/max3355
driver because the ID pin doesn't connect to a gpio pin (in other words,
it connects to the SoC specific pin).
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 45 +++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 9af1e3f..3ff6e79 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -33,6 +33,7 @@
/dts-v1/;
#include "r8a7795.dtsi"
+#include <dt-bindings/gpio/gpio.h>
/ {
model = "Renesas Salvator-X board based on r8a7795";
@@ -86,6 +87,15 @@
sound-dai = <&ak4613>;
};
};
+
+ vcc_usb2_phy0: regulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "USB20_VBUS0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
};
&extal_clk {
@@ -122,8 +132,22 @@
"audio_clkout_a", "audio_clkout3_a";
renesas,function = "audio_clk";
};
-};
+ usb0_pins: usb0 {
+ renesas,groups = "usb0";
+ renesas,function = "usb";
+ };
+
+ usb1_pins: usb1 {
+ renesas,groups = "usb1";
+ renesas,function = "usb";
+ };
+
+ usb2_pins: usb2 {
+ renesas,groups = "usb2";
+ renesas,function = "usb";
+ };
+};
&scif1 {
pinctrl-0 = <&scif1_pins>;
pinctrl-names = "default";
@@ -253,3 +277,22 @@
&xhci0 {
status = "okay";
};
+
+&usb2_phy0 {
+ status = "okay";
+ phy-supply = <&vcc_usb2_phy0>;
+ pinctrl-0 = <&usb0_pins>;
+ pinctrl-names = "default";
+};
+
+&usb2_phy1 {
+ status = "okay";
+ pinctrl-0 = <&usb1_pins>;
+ pinctrl-names = "default";
+};
+
+&usb2_phy2 {
+ status = "okay";
+ pinctrl-0 = <&usb2_pins>;
+ pinctrl-names = "default";
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 09/10] arm64: dts: salvator-x: enable USB 2.0 Host channels
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
We should set SW15 to pin 2-3 side on the board before we use CN9
as USB host or peripheral.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 3ff6e79..c92ec89 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -296,3 +296,27 @@
pinctrl-0 = <&usb2_pins>;
pinctrl-names = "default";
};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ehci2 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&ohci2 {
+ status = "okay";
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 09/10] arm64: dts: salvator-x: enable USB 2.0 Host channels
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
We should set SW15 to pin 2-3 side on the board before we use CN9
as USB host or peripheral.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 3ff6e79..c92ec89 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -296,3 +296,27 @@
pinctrl-0 = <&usb2_pins>;
pinctrl-names = "default";
};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ehci2 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&ohci2 {
+ status = "okay";
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 10/10] arm64: dts: salvator-x: enable HS-USB
2016-02-02 10:18 ` Yoshihiro Shimoda
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
-1 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index c92ec89..6935aa0 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -320,3 +320,7 @@
&ohci2 {
status = "okay";
};
+
+&hsusb {
+ status = "okay";
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH/RFC 10/10] arm64: dts: salvator-x: enable HS-USB
@ 2016-02-02 10:18 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-02 10:18 UTC (permalink / raw)
To: horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak
Cc: devicetree, linux-renesas-soc, Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index c92ec89..6935aa0 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -320,3 +320,7 @@
&ohci2 {
status = "okay";
};
+
+&hsusb {
+ status = "okay";
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH/RFC 02/10] phy: rcar-gen3-usb2: Add phy-supply description in device tree doc
2016-02-02 10:18 ` Yoshihiro Shimoda
(?)
@ 2016-02-03 20:45 ` Rob Herring
2016-02-04 8:49 ` Yoshihiro Shimoda
-1 siblings, 1 reply; 25+ messages in thread
From: Rob Herring @ 2016-02-03 20:45 UTC (permalink / raw)
To: Yoshihiro Shimoda
Cc: horms, magnus.damm, pawel.moll, mark.rutland, ijc+devicetree,
galak, devicetree, linux-renesas-soc
On Tue, Feb 02, 2016 at 07:18:50PM +0900, Yoshihiro Shimoda wrote:
> To handle the VBUS on/off by a regulator driver, this patch adds
> description about phy-supply in the rcar-gen3-phy-usb2.txt.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
> Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> index eaf7e9b..48b33a9 100644
> --- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> @@ -15,6 +15,8 @@ To use a USB channel where USB 2.0 Host and HSUSB (USB 2.0 Peripheral) are
> combined, the device tree node should set interrupt properties to use the
> channel as USB OTG:
> - interrupts: interrupt specifier for the PHY.
> +- phy-supply: Phandle to a regulator that provides power to the VBUS. This
> + regulator will be managed during the PHY power on/off sequence.
Is "phy" the actual name of the input supply to the phy?
>
> Example (R-Car H3):
>
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 25+ messages in thread
* RE: [PATCH/RFC 02/10] phy: rcar-gen3-usb2: Add phy-supply description in device tree doc
2016-02-03 20:45 ` Rob Herring
@ 2016-02-04 8:49 ` Yoshihiro Shimoda
0 siblings, 0 replies; 25+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-04 8:49 UTC (permalink / raw)
To: Rob Herring
Cc: horms, magnus.damm, pawel.moll, mark.rutland, ijc+devicetree,
galak, devicetree, linux-renesas-soc
Hi Rob,
> From: Rob Herring
> Sent: Thursday, February 04, 2016 5:45 AM
>
> On Tue, Feb 02, 2016 at 07:18:50PM +0900, Yoshihiro Shimoda wrote:
> > To handle the VBUS on/off by a regulator driver, this patch adds
> > description about phy-supply in the rcar-gen3-phy-usb2.txt.
> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > ---
> > Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> > index eaf7e9b..48b33a9 100644
> > --- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> > +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> > @@ -15,6 +15,8 @@ To use a USB channel where USB 2.0 Host and HSUSB (USB 2.0 Peripheral) are
> > combined, the device tree node should set interrupt properties to use the
> > channel as USB OTG:
> > - interrupts: interrupt specifier for the PHY.
> > +- phy-supply: Phandle to a regulator that provides power to the VBUS. This
> > + regulator will be managed during the PHY power on/off sequence.
>
> Is "phy" the actual name of the input supply to the phy?
Thank you for the comment!
Yes, the "phy" is the actual name for the phy.
So, I checked other phy drivers and then some drivers have "vbus-supply" to handle the vbus.
And then, I think that this driver (or Generic PHY framework?) should have such property
to handle the vbus.
Best regards,
Yoshihiro Shimoda
> >
> > Example (R-Car H3):
> >
> > --
> > 1.9.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe devicetree" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH/RFC 01/10] pinctrl: sh-pfc: r8a7795: Add USB2.0 host support
2016-02-02 10:18 ` Yoshihiro Shimoda
(?)
@ 2016-02-08 15:58 ` Geert Uytterhoeven
-1 siblings, 0 replies; 25+ messages in thread
From: Geert Uytterhoeven @ 2016-02-08 15:58 UTC (permalink / raw)
To: Yoshihiro Shimoda
Cc: Simon Horman, Magnus Damm, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, devicetree, linux-renesas-soc,
Takeshi Kihara
On Tue, Feb 2, 2016 at 11:18 AM, Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>
> This patch adds USB[0-2] (USB2.0 host) pinmux support to r8a7795 SoC.
>
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thanks, will queue for next renesas-drivers and v4.6.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2016-02-08 15:58 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-02 10:18 [PATCH/RFC 00/10] Add support for USB2.0 host/peripheral on R-Car H3 Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-02 10:18 ` [PATCH/RFC 01/10] pinctrl: sh-pfc: r8a7795: Add USB2.0 host support Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-08 15:58 ` Geert Uytterhoeven
2016-02-02 10:18 ` [PATCH/RFC 02/10] phy: rcar-gen3-usb2: Add phy-supply description in device tree doc Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-03 20:45 ` Rob Herring
2016-02-04 8:49 ` Yoshihiro Shimoda
2016-02-02 10:18 ` [PATCH/RFC 03/10] phy: rcar-gen3-usb2: remove unnecesary struct rcar_gen3_data Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-02 10:18 ` [PATCH/RFC 04/10] phy: rcar-gen3-usb2: add extcon support Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-02 10:18 ` [PATCH/RFC 05/10] arm64: dts: r8a7795: add usb2_phy device nodes Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-02 10:18 ` [PATCH/RFC 06/10] arm64: dts: r8a7795: add USB2.0 Host (EHCI/OHCI) " Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-02 10:18 ` [PATCH/RFC 07/10] arm64: dts: r8a7795: add HS-USB device node Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-02 10:18 ` [PATCH/RFC 08/10] arm64: dts: salvator-x: enable usb2_phy Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-02 10:18 ` [PATCH/RFC 09/10] arm64: dts: salvator-x: enable USB 2.0 Host channels Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
2016-02-02 10:18 ` [PATCH/RFC 10/10] arm64: dts: salvator-x: enable HS-USB Yoshihiro Shimoda
2016-02-02 10:18 ` Yoshihiro Shimoda
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.