mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: <gregkh@linuxfoundation.org>
Cc: <kishon@ti.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 06/19] phy-sun4i-usb: Add support for the usb-phys on the sun8i-a23 SoC
Date: Tue, 11 Aug 2015 21:27:05 +0530	[thread overview]
Message-ID: <1439308638-14582-7-git-send-email-kishon@ti.com> (raw)
In-Reply-To: <1439308638-14582-1-git-send-email-kishon@ti.com>

From: Hans de Goede <hdegoede@redhat.com>

The usb-phys on the sun8i-a23 SoC have the same setup wrt clocks as on the
sun6i-a31 SoC, but there are only 2 instead of 3 like on the sun5i-a13 SoC.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 .../devicetree/bindings/phy/sun4i-usb-phy.txt      |    2 ++
 drivers/phy/phy-sun4i-usb.c                        |    7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
index 557fa99..f0c640a 100644
--- a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
@@ -7,6 +7,7 @@ Required properties:
   * allwinner,sun5i-a13-usb-phy
   * allwinner,sun6i-a31-usb-phy
   * allwinner,sun7i-a20-usb-phy
+  * allwinner,sun8i-a23-usb-phy
 - reg : a list of offset + length pairs
 - reg-names :
   * "phy_ctrl"
@@ -17,6 +18,7 @@ Required properties:
 - clock-names :
   * "usb_phy" for sun4i, sun5i or sun7i
   * "usb0_phy", "usb1_phy" and "usb2_phy" for sun6i
+  * "usb0_phy", "usb1_phy" for sun8i
 - resets : a list of phandle + reset specifier pairs
 - reset-names :
   * "usb0_reset"
diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index 50ecab9..00424dd 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -442,7 +442,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
 	INIT_DELAYED_WORK(&data->detect, sun4i_usb_phy0_id_vbus_det_scan);
 	dev_set_drvdata(dev, data);
 
-	if (of_device_is_compatible(np, "allwinner,sun5i-a13-usb-phy"))
+	if (of_device_is_compatible(np, "allwinner,sun5i-a13-usb-phy") ||
+	    of_device_is_compatible(np, "allwinner,sun8i-a23-usb-phy"))
 		data->num_phys = 2;
 	else
 		data->num_phys = 3;
@@ -453,7 +454,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
 	else
 		data->disc_thresh = 3;
 
-	if (of_device_is_compatible(np, "allwinner,sun6i-a31-usb-phy"))
+	if (of_device_is_compatible(np, "allwinner,sun6i-a31-usb-phy") ||
+	    of_device_is_compatible(np, "allwinner,sun8i-a23-usb-phy"))
 		dedicated_clocks = true;
 	else
 		dedicated_clocks = false;
@@ -588,6 +590,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = {
 	{ .compatible = "allwinner,sun5i-a13-usb-phy" },
 	{ .compatible = "allwinner,sun6i-a31-usb-phy" },
 	{ .compatible = "allwinner,sun7i-a20-usb-phy" },
+	{ .compatible = "allwinner,sun8i-a23-usb-phy" },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match);
-- 
1.7.9.5


  parent reply	other threads:[~2015-08-11 15:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 15:56 [GIT PULL 00/19] phy: for 4.3 Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 01/19] phy: add lpc18xx usb otg phy driver Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 02/19] phy: dt bindings: add NXP LPC18xx/43xx USB OTG PHY bindings Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 03/19] phy-sun4i-usb: Add id and vbus detection support for the otg phy (phy0) Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 04/19] phy-sun4i-usb: Add extcon " Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 05/19] phy-sun4i-usb: Swap check for disconnect threshold Kishon Vijay Abraham I
2015-08-11 15:57 ` Kishon Vijay Abraham I [this message]
2015-08-11 15:57 ` [PATCH 07/19] phy-sun4i-usb: Add support for the usb-phys on the sun8i-a33 SoC Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 08/19] phy-sun4i-usb: Add support for boards with broken Vusb-detection Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 09/19] phy-sun4i-usb: Add support for monitoring vbus via a power-supply Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 10/19] phy: berlin: .owner field is setup by core Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 11/19] phy: berlin: Do not use sata name in usb phy driver Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 12/19] phy: berlin: Trivial coding style cleanup Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 13/19] phy: Drop owner assignment from i2c_driver Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 14/19] phy: Drop owner assignment from platform_driver Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 15/19] phy-sun4i-sub: Move vbus-detect helper functions up in the file Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 16/19] phy-sun4i-usb: Only check vbus-det on power-on on boards with vbus-det Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 17/19] phy: ulpi_phy: Add const qualifier to ops Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 18/19] phy: Constify struct phy_ops variables Kishon Vijay Abraham I
2015-08-11 15:57 ` [PATCH 19/19] phy: lpc18xx-usb-otg: fix clock order in phy init Kishon Vijay Abraham I
2015-08-14 23:47 ` [GIT PULL 00/19] phy: for 4.3 Greg KH

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=1439308638-14582-7-git-send-email-kishon@ti.com \
    --to=kishon@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®