linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: icenowy@aosc.io (Icenowy Zheng)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] phy: sun4i-usb: add support for R40 USB PHY
Date: Sun,  8 Oct 2017 12:29:01 +0800	[thread overview]
Message-ID: <20171008042906.46779-2-icenowy@aosc.io> (raw)
In-Reply-To: <20171008042906.46779-1-icenowy@aosc.io>

Allwinner R40 features a USB PHY like the one in A64, but with 3 PHYs.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt |  1 +
 drivers/phy/allwinner/phy-sun4i-usb.c                   | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
index cbc7847dbf6c..0f00abd40a50 100644
--- a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
@@ -11,6 +11,7 @@ Required properties:
   * allwinner,sun8i-a33-usb-phy
   * allwinner,sun8i-a83t-usb-phy
   * allwinner,sun8i-h3-usb-phy
+  * allwinner,sun8i-r40-usb-phy
   * allwinner,sun8i-v3s-usb-phy
   * allwinner,sun50i-a64-usb-phy
 - reg : a list of offset + length pairs
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 1161e11fb3cf..9df7a2c9ca75 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -112,6 +112,7 @@ enum sun4i_usb_phy_type {
 	sun8i_a33_phy,
 	sun8i_a83t_phy,
 	sun8i_h3_phy,
+	sun8i_r40_phy,
 	sun8i_v3s_phy,
 	sun50i_a64_phy,
 };
@@ -919,6 +920,16 @@ static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = {
 	.phy0_dual_route = true,
 };
 
+static const struct sun4i_usb_phy_cfg sun8i_r40_cfg = {
+	.num_phys = 3,
+	.type = sun8i_r40_phy,
+	.disc_thresh = 3,
+	.phyctl_offset = REG_PHYCTL_A33,
+	.dedicated_clocks = true,
+	.enable_pmu_unk1 = true,
+	.phy0_dual_route = true,
+};
+
 static const struct sun4i_usb_phy_cfg sun8i_v3s_cfg = {
 	.num_phys = 1,
 	.type = sun8i_v3s_phy,
@@ -947,6 +958,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = {
 	{ .compatible = "allwinner,sun8i-a33-usb-phy", .data = &sun8i_a33_cfg },
 	{ .compatible = "allwinner,sun8i-a83t-usb-phy", .data = &sun8i_a83t_cfg },
 	{ .compatible = "allwinner,sun8i-h3-usb-phy", .data = &sun8i_h3_cfg },
+	{ .compatible = "allwinner,sun8i-r40-usb-phy", .data = &sun8i_r40_cfg },
 	{ .compatible = "allwinner,sun8i-v3s-usb-phy", .data = &sun8i_v3s_cfg },
 	{ .compatible = "allwinner,sun50i-a64-usb-phy",
 	  .data = &sun50i_a64_cfg},
-- 
2.13.6

  reply	other threads:[~2017-10-08  4:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-08  4:29 [PATCH 0/6] Allwinner R40 USB host support Icenowy Zheng
2017-10-08  4:29 ` Icenowy Zheng [this message]
2017-10-09 20:58   ` [PATCH 1/6] phy: sun4i-usb: add support for R40 USB PHY Maxime Ripard
2017-10-18 11:39     ` Kishon Vijay Abraham I
2017-10-18 11:42       ` Maxime Ripard
2017-10-18 11:46         ` Kishon Vijay Abraham I
2017-12-30 11:38           ` Icenowy Zheng
2018-01-03  8:40             ` Kishon Vijay Abraham I
2017-10-13 19:29   ` Rob Herring
2017-10-08  4:29 ` [PATCH 2/6] ARM: sun8i: r40: add USB host port nodes for R40 Icenowy Zheng
2017-10-09 21:03   ` Maxime Ripard
2017-10-09 23:24     ` Icenowy Zheng
2017-10-16  9:32       ` Maxime Ripard
2017-10-16  9:39         ` icenowy at aosc.io
2017-10-16 12:06           ` Maxime Ripard
2017-10-18 12:21             ` icenowy at aosc.io
2017-10-08  4:29 ` [PATCH 3/6] ARM: sun8i: r40: add 5V regulator for Banana Pi M2 Ultra Icenowy Zheng
2017-10-09 21:04   ` Maxime Ripard
2017-10-09 23:25     ` Icenowy Zheng
2017-10-10  2:25       ` [linux-sunxi] " Chen-Yu Tsai
2017-10-10  9:39         ` Maxime Ripard
2017-10-08  4:29 ` [PATCH 4/6] ARM: sun8i: v40: add 5V regulator for Banana Pi M2 Berry Icenowy Zheng
2017-10-08  4:29 ` [PATCH 5/6] ARM: sun8i: r40: enable USB host for Banana Pi M2 Ultra Icenowy Zheng
2017-10-08  4:29 ` [PATCH 6/6] ARM: sun8i: v40: enable USB host ports for Banana Pi M2 Berry Icenowy Zheng

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=20171008042906.46779-2-icenowy@aosc.io \
    --to=icenowy@aosc.io \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).