phy: rockchip-inno-usb2: add support for rk3368 SoC
authorFrank Wang <frank.wang@rock-chips.com>
Wed, 15 Mar 2017 03:36:16 +0000 (11:36 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 16 Mar 2017 00:33:35 +0000 (08:33 +0800)
This adds support host-port on rk3368 SoC and amend phy Documentation.

Change-Id: I49a2efe37aad8b34505e4dac08336dc4231f4669
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.txt
drivers/phy/phy-rockchip-inno-usb2.c

index 3a16dee132cce42825766286a2c63af5d51dc06f..6e3147d866de466247d04e5cc61172d0c00a9f77 100644 (file)
@@ -4,6 +4,7 @@ Required properties (phy (parent) node):
  - compatible : should be one of the listed compatibles:
        * "rockchip,rk3328-usb2phy"
        * "rockchip,rk3366-usb2phy"
+       * "rockchip,rk3368-usb2phy"
        * "rockchip,rk3399-usb2phy"
  - reg : the address offset of grf for usb-phy configuration.
  - #clock-cells : should be 0.
index 1471ea222d9c01454bc31694e580c829d3c30cdc..9b3fe5d544ddbd89037d7572fed7c0067ed7cdee 100644 (file)
@@ -1594,6 +1594,23 @@ static const struct rockchip_usb2phy_cfg rk3366_phy_cfgs[] = {
        { /* sentinel */ }
 };
 
+static const struct rockchip_usb2phy_cfg rk3368_phy_cfgs[] = {
+       {
+               .reg = 0x700,
+               .num_ports      = 2,
+               .clkout_ctl     = { 0x0724, 15, 15, 1, 0 },
+               .port_cfgs      = {
+                       [USB2PHY_PORT_HOST] = {
+                               .phy_sus        = { 0x0728, 15, 0, 0, 0x1d1 },
+                               .ls_det_en      = { 0x0680, 4, 4, 0, 1 },
+                               .ls_det_st      = { 0x0690, 4, 4, 0, 1 },
+                               .ls_det_clr     = { 0x06a0, 4, 4, 0, 1 }
+                       }
+               },
+       },
+       { /* sentinel */ }
+};
+
 static const struct rockchip_usb2phy_cfg rk3399_phy_cfgs[] = {
        {
                .reg            = 0xe450,
@@ -1685,6 +1702,7 @@ static const struct rockchip_usb2phy_cfg rk3399_phy_cfgs[] = {
 static const struct of_device_id rockchip_usb2phy_dt_match[] = {
        { .compatible = "rockchip,rk3328-usb2phy", .data = &rk3328_phy_cfgs },
        { .compatible = "rockchip,rk3366-usb2phy", .data = &rk3366_phy_cfgs },
+       { .compatible = "rockchip,rk3368-usb2phy", .data = &rk3368_phy_cfgs },
        { .compatible = "rockchip,rk3399-usb2phy", .data = &rk3399_phy_cfgs },
        {}
 };