From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Biju Das <biju.das@bp.renesas.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
Alan Stern <stern@rowland.harvard.edu>
Cc: Biju Das <biju.das@bp.renesas.com>,
Simon Horman <horms+renesas@verge.net.au>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Simon Horman <horms@verge.net.au>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Chris Paterson <Chris.Paterson2@renesas.com>,
Fabrizio Castro <fabrizio.castro@bp.renesas.com>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH V5 04/13] phy: rcar-gen3-usb2: Add support for r8a77470
Date: Thu, 11 Apr 2019 05:10:04 +0000 [thread overview]
Message-ID: <TYAPR01MB42710C4444EE893A1031B5F8D82F0@TYAPR01MB4271.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <1554907730-14792-5-git-send-email-biju.das@bp.renesas.com>
Hi Biju-san,
> From: Biju Das, Sent: Wednesday, April 10, 2019 11:49 PM
>
> This patch adds support for r8a77470 (RZ/G1C). We can reuse this driver for
> initializing timing/interrupt generation registers.
>
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
Thank you for the patch! I tested this patch on r8a77965-salvator-xs
and I didn't find any regressions. So,
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Best regards,
Yoshihiro Shimoda
> V4-->V5
> * Incorporated Kishan and Shimoda-san's review comment
> https://patchwork.kernel.org/patch/10893387/
> V3-->V4
> * Incorporated Kishan and Shimoda-san's review comment
> https://patchwork.kernel.org/patch/10883265/
> V2-->V3
> * Incorporated shimoda-san's review comment
> Ref: https://patchwork.kernel.org/patch/10655855/
> ---
> drivers/phy/renesas/Kconfig | 2 +-
> drivers/phy/renesas/phy-rcar-gen3-usb2.c | 39 +++++++++++++++++++++++++++-----
> 2 files changed, 34 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/phy/renesas/Kconfig b/drivers/phy/renesas/Kconfig
> index e340a92..111bdca 100644
> --- a/drivers/phy/renesas/Kconfig
> +++ b/drivers/phy/renesas/Kconfig
> @@ -19,7 +19,7 @@ config PHY_RCAR_GEN3_PCIE
> config PHY_RCAR_GEN3_USB2
> tristate "Renesas R-Car generation 3 USB 2.0 PHY driver"
> depends on ARCH_RENESAS
> - depends on EXTCON
> + depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in
> depends on USB_SUPPORT
> select GENERIC_PHY
> select USB_COMMON
> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> index 0a34782..e3a88b9 100644
> --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> @@ -393,6 +393,12 @@ static const struct phy_ops rcar_gen3_phy_usb2_ops = {
> .owner = THIS_MODULE,
> };
>
> +static const struct phy_ops rz_g1c_phy_usb2_ops = {
> + .init = rcar_gen3_phy_usb2_init,
> + .exit = rcar_gen3_phy_usb2_exit,
> + .owner = THIS_MODULE,
> +};
> +
> static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
> {
> struct rcar_gen3_chan *ch = _ch;
> @@ -411,11 +417,27 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
> }
>
> static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = {
> - { .compatible = "renesas,usb2-phy-r8a7795" },
> - { .compatible = "renesas,usb2-phy-r8a7796" },
> - { .compatible = "renesas,usb2-phy-r8a77965" },
> - { .compatible = "renesas,rcar-gen3-usb2-phy" },
> - { }
> + {
> + .compatible = "renesas,usb2-phy-r8a77470",
> + .data = &rz_g1c_phy_usb2_ops,
> + },
> + {
> + .compatible = "renesas,usb2-phy-r8a7795",
> + .data = &rcar_gen3_phy_usb2_ops,
> + },
> + {
> + .compatible = "renesas,usb2-phy-r8a7796",
> + .data = &rcar_gen3_phy_usb2_ops,
> + },
> + {
> + .compatible = "renesas,usb2-phy-r8a77965",
> + .data = &rcar_gen3_phy_usb2_ops,
> + },
> + {
> + .compatible = "renesas,rcar-gen3-usb2-phy",
> + .data = &rcar_gen3_phy_usb2_ops,
> + },
> + { /* sentinel */ },
> };
> MODULE_DEVICE_TABLE(of, rcar_gen3_phy_usb2_match_table);
>
> @@ -431,6 +453,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
> struct rcar_gen3_chan *channel;
> struct phy_provider *provider;
> struct resource *res;
> + const struct phy_ops *phy_usb2_ops;
> int irq, ret = 0;
>
> if (!dev->of_node) {
> @@ -481,7 +504,11 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
> * And then, phy-core will manage runtime pm for this device.
> */
> pm_runtime_enable(dev);
> - channel->phy = devm_phy_create(dev, NULL, &rcar_gen3_phy_usb2_ops);
> + phy_usb2_ops = of_device_get_match_data(dev);
> + if (!phy_usb2_ops)
> + return -EINVAL;
> +
> + channel->phy = devm_phy_create(dev, NULL, phy_usb2_ops);
> if (IS_ERR(channel->phy)) {
> dev_err(dev, "Failed to create USB2 PHY\n");
> ret = PTR_ERR(channel->phy);
> --
> 2.7.4
next prev parent reply other threads:[~2019-04-11 5:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 14:48 [PATCH V5 00/13] Add USB2.0 support Biju Das
2019-04-10 14:48 ` [PATCH V5 01/13] dt-bindings: phy: rcar-gen2: Add r8a77470 support Biju Das
2019-04-10 14:48 ` [PATCH V5 02/13] phy: renesas: phy-rcar-gen2: Add support for r8a77470 Biju Das
2019-04-11 5:08 ` Yoshihiro Shimoda
2019-04-10 14:48 ` [PATCH V5 03/13] dt-bindings: rcar-gen3-phy-usb2: Add r8a77470 support Biju Das
2019-04-10 14:48 ` [PATCH V5 04/13] phy: rcar-gen3-usb2: Add support for r8a77470 Biju Das
2019-04-11 5:10 ` Yoshihiro Shimoda [this message]
2019-04-10 14:48 ` [PATCH V5 05/13] ARM: shmobile: Enable PHY_RCAR_GEN3_USB2 in shmobile_defconfig Biju Das
2019-04-12 12:15 ` Simon Horman
2019-04-10 14:48 ` [PATCH V5 06/13] dt-bindings: usb: renesas_usbhs: Add support for r8a77470 Biju Das
2019-04-29 9:16 ` Biju Das
2019-04-29 9:30 ` Greg Kroah-Hartman
2019-04-29 9:46 ` Biju Das
2019-04-10 14:48 ` [PATCH V5 07/13] ARM: shmobile: Enable USB [EO]HCI HCD PLATFORM support in shmobile_defconfig Biju Das
2019-04-12 12:16 ` Simon Horman
2019-04-10 14:48 ` [PATCH V5 08/13] ARM: dts: r8a77470: Add USB PHY DT support Biju Das
2019-04-12 12:18 ` Simon Horman
2019-04-30 13:00 ` Geert Uytterhoeven
2019-04-10 14:48 ` [PATCH V5 09/13] ARM: dts: iwg23s-sbc: Enable USB Phy[01] Biju Das
2019-04-12 12:21 ` Simon Horman
2019-04-10 14:48 ` [PATCH V5 10/13] ARM: dts: r8a77470: Add USB2.0 Host (EHCI/OHCI) device Biju Das
2019-04-12 12:22 ` Simon Horman
2019-04-10 14:48 ` [PATCH V5 11/13] ARM: dts: iwg23s-sbc: Enable USB USB2.0 Host Biju Das
2019-04-10 14:48 ` [PATCH V5 12/13] ARM: dts: r8a77470: Add HSUSB device nodes Biju Das
2019-04-12 12:25 ` Simon Horman
2019-04-30 12:58 ` Geert Uytterhoeven
2019-04-10 14:48 ` [PATCH V5 13/13] ARM: dts: iwg23s-sbc: Enable HS-USB Biju Das
2019-04-12 12:26 ` Simon Horman
2019-04-17 6:07 ` [PATCH V5 00/13] Add USB2.0 support Kishon Vijay Abraham I
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=TYAPR01MB42710C4444EE893A1031B5F8D82F0@TYAPR01MB4271.jpnprd01.prod.outlook.com \
--to=yoshihiro.shimoda.uh@renesas.com \
--cc=Chris.Paterson2@renesas.com \
--cc=biju.das@bp.renesas.com \
--cc=fabrizio.castro@bp.renesas.com \
--cc=geert+renesas@glider.be \
--cc=horms+renesas@verge.net.au \
--cc=horms@verge.net.au \
--cc=kishon@ti.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).