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 01/14] phy: sun4i-usb: add support for V3s USB PHY
Date: Mon, 30 Jan 2017 17:19:25 +0530	[thread overview]
Message-ID: <1485776992-8818-3-git-send-email-kishon@ti.com> (raw)
In-Reply-To: <1485776992-8818-1-git-send-email-kishon@ti.com>

From: Icenowy Zheng <icenowy@aosc.xyz>

Allwinner V3s come with a USB PHY controller slightly different to other
SoCs, with only one PHY.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 .../devicetree/bindings/phy/sun4i-usb-phy.txt      |    1 +
 drivers/phy/phy-sun4i-usb.c                        |   14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
index 287150d..e423342 100644
--- a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
@@ -10,6 +10,7 @@ Required properties:
   * allwinner,sun8i-a23-usb-phy
   * allwinner,sun8i-a33-usb-phy
   * allwinner,sun8i-h3-usb-phy
+  * allwinner,sun8i-v3s-usb-phy
   * allwinner,sun50i-a64-usb-phy
 - reg : a list of offset + length pairs
 - reg-names :
diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index bf28a0f..4102841 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -99,6 +99,7 @@ enum sun4i_usb_phy_type {
 	sun6i_a31_phy,
 	sun8i_a33_phy,
 	sun8i_h3_phy,
+	sun8i_v3s_phy,
 	sun50i_a64_phy,
 };
 
@@ -188,7 +189,8 @@ static void sun4i_usb_phy_write(struct sun4i_usb_phy *phy, u32 addr, u32 data,
 	spin_lock_irqsave(&phy_data->reg_lock, flags);
 
 	if (phy_data->cfg->type == sun8i_a33_phy ||
-	    phy_data->cfg->type == sun50i_a64_phy) {
+	    phy_data->cfg->type == sun50i_a64_phy ||
+	    phy_data->cfg->type == sun8i_v3s_phy) {
 		/* A33 or A64 needs us to set phyctl to 0 explicitly */
 		writel(0, phyctl);
 	}
@@ -825,6 +827,15 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
 	.enable_pmu_unk1 = true,
 };
 
+static const struct sun4i_usb_phy_cfg sun8i_v3s_cfg = {
+	.num_phys = 1,
+	.type = sun8i_v3s_phy,
+	.disc_thresh = 3,
+	.phyctl_offset = REG_PHYCTL_A33,
+	.dedicated_clocks = true,
+	.enable_pmu_unk1 = true,
+};
+
 static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = {
 	.num_phys = 2,
 	.type = sun50i_a64_phy,
@@ -842,6 +853,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
 	{ .compatible = "allwinner,sun8i-a23-usb-phy", .data = &sun8i_a23_cfg },
 	{ .compatible = "allwinner,sun8i-a33-usb-phy", .data = &sun8i_a33_cfg },
 	{ .compatible = "allwinner,sun8i-h3-usb-phy", .data = &sun8i_h3_cfg },
+	{ .compatible = "allwinner,sun8i-v3s-usb-phy", .data = &sun8i_v3s_cfg },
 	{ .compatible = "allwinner,sun50i-a64-usb-phy",
 	  .data = &sun50i_a64_cfg},
 	{ },
-- 
1.7.9.5

  parent reply	other threads:[~2017-01-30 12:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30 11:49 [GIT PULL] phy: for 4.11 Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 01/15] phy: rockchip-inno-usb2: Set EXTCON_USB when EXTCON_CHG_USB_SDP was set Kishon Vijay Abraham I
2017-01-30 11:49 ` Kishon Vijay Abraham I [this message]
2017-01-30 11:49 ` [PATCH 02/14] phy: rcar-gen3-usb2: Replace the deprecated extcon API Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 02/15] phy: sun4i-usb: add support for V3s USB PHY Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 03/15] phy: rcar-gen3-usb2: Replace the deprecated extcon API Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 03/14] phy: sun4i-usb: " Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 04/14] drivers: phy: constify phy_ops structures Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 04/15] phy: sun4i-usb: Replace the deprecated extcon API Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 05/15] drivers: phy: constify phy_ops structures Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 05/14] phy: Add support for Qualcomm's USB HSIC phy Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 06/14] phy: Add support for Qualcomm's USB HS phy Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 06/15] phy: Add support for Qualcomm's USB HSIC phy Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 07/15] phy: Add support for Qualcomm's USB HS phy Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 07/14] phy: qcom-ufs: Don't kfree devres resource Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 08/15] " Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 09/15] phy: qcom-ufs: Correct usage of regulator_get() Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 09/14] phy: qcom-ufs: Remove -always-on property Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 10/15] " Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 10/14] phy: qcom-ufs: Suppress extraneous logging Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 11/14] dt-bindings: phy: Add documentation for NSP USB3 PHY Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 11/15] phy: qcom-ufs: Suppress extraneous logging Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 12/15] dt-bindings: phy: Add documentation for NSP USB3 PHY Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 12/14] phy: Add USB3 PHY support for Broadcom NSP SoC Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 13/15] " Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 13/14] phy: fix rockchip-inno-usb2 build errors Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 14/15] " Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 14/14] phy: qcom-ufs: Fix misplaced jump label Kishon Vijay Abraham I
2017-01-30 11:49 ` [PATCH 15/15] " Kishon Vijay Abraham I
2017-01-31  9:53 ` [GIT PULL] phy: for 4.11 Greg KH
2017-01-31 10:03   ` 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=1485776992-8818-3-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

Powered by JetHome