* [PATCH 0/2] phy: ti: am654: Add USB super-speed support
@ 2020-05-13 13:12 Roger Quadros
2020-05-13 13:12 ` [PATCH 1/2] phy: ti: am654: show up in regmap debugfs Roger Quadros
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Roger Quadros @ 2020-05-13 13:12 UTC (permalink / raw)
To: kishon; +Cc: vigneshr, nsekhar, linux-kernel, Roger Quadros
Hi Kishon,
This series adds USB3.0 support to am654-serdes PHY driver.
cheers,
-roger
Roger Quadros (2):
phy: ti: am654: show up in regmap debugfs
phy: ti: am654: add support for USB super-speed
drivers/phy/ti/phy-am654-serdes.c | 104 +++++++++++++++++++++++++++++-
1 file changed, 102 insertions(+), 2 deletions(-)
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] phy: ti: am654: show up in regmap debugfs
2020-05-13 13:12 [PATCH 0/2] phy: ti: am654: Add USB super-speed support Roger Quadros
@ 2020-05-13 13:12 ` Roger Quadros
2020-05-13 13:12 ` [PATCH 2/2] phy: ti: am654: add support for USB super-speed Roger Quadros
2020-05-18 12:33 ` [PATCH 0/2] phy: ti: am654: Add USB super-speed support Kishon Vijay Abraham I
2 siblings, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2020-05-13 13:12 UTC (permalink / raw)
To: kishon; +Cc: vigneshr, nsekhar, linux-kernel, Roger Quadros
The max_register property must be set in order to
show up the registers in debugfs.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/phy/ti/phy-am654-serdes.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/phy/ti/phy-am654-serdes.c b/drivers/phy/ti/phy-am654-serdes.c
index 88a047b9fa6f..29e34d29895a 100644
--- a/drivers/phy/ti/phy-am654-serdes.c
+++ b/drivers/phy/ti/phy-am654-serdes.c
@@ -77,6 +77,7 @@ static struct regmap_config serdes_am654_regmap_config = {
.val_bits = 32,
.reg_stride = 4,
.fast_io = true,
+ .max_register = 0x1ffc,
};
static const struct reg_field cmu_master_cdn_o = REG_FIELD(CMU_R07C, 24, 24);
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] phy: ti: am654: add support for USB super-speed
2020-05-13 13:12 [PATCH 0/2] phy: ti: am654: Add USB super-speed support Roger Quadros
2020-05-13 13:12 ` [PATCH 1/2] phy: ti: am654: show up in regmap debugfs Roger Quadros
@ 2020-05-13 13:12 ` Roger Quadros
2020-05-18 12:33 ` [PATCH 0/2] phy: ti: am654: Add USB super-speed support Kishon Vijay Abraham I
2 siblings, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2020-05-13 13:12 UTC (permalink / raw)
To: kishon; +Cc: vigneshr, nsekhar, linux-kernel, Roger Quadros
The SERDES PHY can support USB super-speed lane.
Add support for that.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/phy/ti/phy-am654-serdes.c | 103 +++++++++++++++++++++++++++++-
1 file changed, 101 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/ti/phy-am654-serdes.c b/drivers/phy/ti/phy-am654-serdes.c
index 29e34d29895a..0a166d5a6414 100644
--- a/drivers/phy/ti/phy-am654-serdes.c
+++ b/drivers/phy/ti/phy-am654-serdes.c
@@ -201,9 +201,91 @@ static int serdes_am654_power_off(struct phy *x)
return 0;
}
-static int serdes_am654_init(struct phy *x)
+#define SERDES_AM654_CFG(offset, a, b, val) \
+ regmap_update_bits(phy->regmap, (offset),\
+ GENMASK((a), (b)), (val) << (b))
+
+static int serdes_am654_usb3_init(struct serdes_am654 *phy)
+{
+ SERDES_AM654_CFG(0x0000, 31, 24, 0x17);
+ SERDES_AM654_CFG(0x0004, 15, 8, 0x02);
+ SERDES_AM654_CFG(0x0004, 7, 0, 0x0e);
+ SERDES_AM654_CFG(0x0008, 23, 16, 0x2e);
+ SERDES_AM654_CFG(0x0008, 31, 24, 0x2e);
+ SERDES_AM654_CFG(0x0060, 7, 0, 0x4b);
+ SERDES_AM654_CFG(0x0060, 15, 8, 0x98);
+ SERDES_AM654_CFG(0x0060, 23, 16, 0x60);
+ SERDES_AM654_CFG(0x00d0, 31, 24, 0x45);
+ SERDES_AM654_CFG(0x00e8, 15, 8, 0x0e);
+ SERDES_AM654_CFG(0x0220, 7, 0, 0x34);
+ SERDES_AM654_CFG(0x0220, 15, 8, 0x34);
+ SERDES_AM654_CFG(0x0220, 31, 24, 0x37);
+ SERDES_AM654_CFG(0x0224, 7, 0, 0x37);
+ SERDES_AM654_CFG(0x0224, 15, 8, 0x37);
+ SERDES_AM654_CFG(0x0228, 23, 16, 0x37);
+ SERDES_AM654_CFG(0x0228, 31, 24, 0x37);
+ SERDES_AM654_CFG(0x022c, 7, 0, 0x37);
+ SERDES_AM654_CFG(0x022c, 15, 8, 0x37);
+ SERDES_AM654_CFG(0x0230, 15, 8, 0x2a);
+ SERDES_AM654_CFG(0x0230, 23, 16, 0x2a);
+ SERDES_AM654_CFG(0x0240, 23, 16, 0x10);
+ SERDES_AM654_CFG(0x0240, 31, 24, 0x34);
+ SERDES_AM654_CFG(0x0244, 7, 0, 0x40);
+ SERDES_AM654_CFG(0x0244, 23, 16, 0x34);
+ SERDES_AM654_CFG(0x0248, 15, 8, 0x0d);
+ SERDES_AM654_CFG(0x0258, 15, 8, 0x16);
+ SERDES_AM654_CFG(0x0258, 23, 16, 0x84);
+ SERDES_AM654_CFG(0x0258, 31, 24, 0xf2);
+ SERDES_AM654_CFG(0x025c, 7, 0, 0x21);
+ SERDES_AM654_CFG(0x0260, 7, 0, 0x27);
+ SERDES_AM654_CFG(0x0260, 15, 8, 0x04);
+ SERDES_AM654_CFG(0x0268, 15, 8, 0x04);
+ SERDES_AM654_CFG(0x0288, 15, 8, 0x2c);
+ SERDES_AM654_CFG(0x0330, 31, 24, 0xa0);
+ SERDES_AM654_CFG(0x0338, 23, 16, 0x03);
+ SERDES_AM654_CFG(0x0338, 31, 24, 0x00);
+ SERDES_AM654_CFG(0x033c, 7, 0, 0x00);
+ SERDES_AM654_CFG(0x0344, 31, 24, 0x18);
+ SERDES_AM654_CFG(0x034c, 7, 0, 0x18);
+ SERDES_AM654_CFG(0x039c, 23, 16, 0x3b);
+ SERDES_AM654_CFG(0x0a04, 7, 0, 0x03);
+ SERDES_AM654_CFG(0x0a14, 31, 24, 0x3c);
+ SERDES_AM654_CFG(0x0a18, 15, 8, 0x3c);
+ SERDES_AM654_CFG(0x0a38, 7, 0, 0x3e);
+ SERDES_AM654_CFG(0x0a38, 15, 8, 0x3e);
+ SERDES_AM654_CFG(0x0ae0, 7, 0, 0x07);
+ SERDES_AM654_CFG(0x0b6c, 23, 16, 0xcd);
+ SERDES_AM654_CFG(0x0b6c, 31, 24, 0x04);
+ SERDES_AM654_CFG(0x0b98, 23, 16, 0x03);
+ SERDES_AM654_CFG(0x1400, 7, 0, 0x3f);
+ SERDES_AM654_CFG(0x1404, 23, 16, 0x6f);
+ SERDES_AM654_CFG(0x1404, 31, 24, 0x6f);
+ SERDES_AM654_CFG(0x140c, 7, 0, 0x6f);
+ SERDES_AM654_CFG(0x140c, 15, 8, 0x6f);
+ SERDES_AM654_CFG(0x1410, 15, 8, 0x27);
+ SERDES_AM654_CFG(0x1414, 7, 0, 0x0c);
+ SERDES_AM654_CFG(0x1414, 23, 16, 0x07);
+ SERDES_AM654_CFG(0x1418, 23, 16, 0x40);
+ SERDES_AM654_CFG(0x141c, 7, 0, 0x00);
+ SERDES_AM654_CFG(0x141c, 15, 8, 0x1f);
+ SERDES_AM654_CFG(0x1428, 31, 24, 0x08);
+ SERDES_AM654_CFG(0x1434, 31, 24, 0x00);
+ SERDES_AM654_CFG(0x1444, 7, 0, 0x94);
+ SERDES_AM654_CFG(0x1460, 31, 24, 0x7f);
+ SERDES_AM654_CFG(0x1464, 7, 0, 0x43);
+ SERDES_AM654_CFG(0x1464, 23, 16, 0x6f);
+ SERDES_AM654_CFG(0x1464, 31, 24, 0x43);
+ SERDES_AM654_CFG(0x1484, 23, 16, 0x8f);
+ SERDES_AM654_CFG(0x1498, 7, 0, 0x4f);
+ SERDES_AM654_CFG(0x1498, 23, 16, 0x4f);
+ SERDES_AM654_CFG(0x007c, 31, 24, 0x0d);
+ SERDES_AM654_CFG(0x0b90, 15, 8, 0x0f);
+
+ return 0;
+}
+
+static int serdes_am654_pcie_init(struct serdes_am654 *phy)
{
- struct serdes_am654 *phy = phy_get_drvdata(x);
int ret;
ret = regmap_field_write(phy->config_version, VERSION);
@@ -221,11 +303,28 @@ static int serdes_am654_init(struct phy *x)
return 0;
}
+static int serdes_am654_init(struct phy *x)
+{
+ struct serdes_am654 *phy = phy_get_drvdata(x);
+
+ switch (phy->type) {
+ case PHY_TYPE_PCIE:
+ return serdes_am654_pcie_init(phy);
+ case PHY_TYPE_USB3:
+ return serdes_am654_usb3_init(phy);
+ default:
+ return -EINVAL;
+ }
+}
+
static int serdes_am654_reset(struct phy *x)
{
struct serdes_am654 *phy = phy_get_drvdata(x);
int ret;
+ serdes_am654_disable_pll(phy);
+ serdes_am654_disable_txrx(phy);
+
ret = regmap_field_write(phy->por_en, 0x1);
if (ret)
return ret;
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] phy: ti: am654: Add USB super-speed support
2020-05-13 13:12 [PATCH 0/2] phy: ti: am654: Add USB super-speed support Roger Quadros
2020-05-13 13:12 ` [PATCH 1/2] phy: ti: am654: show up in regmap debugfs Roger Quadros
2020-05-13 13:12 ` [PATCH 2/2] phy: ti: am654: add support for USB super-speed Roger Quadros
@ 2020-05-18 12:33 ` Kishon Vijay Abraham I
2 siblings, 0 replies; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2020-05-18 12:33 UTC (permalink / raw)
To: Roger Quadros; +Cc: vigneshr, nsekhar, linux-kernel, Vinod Koul
On 5/13/2020 6:42 PM, Roger Quadros wrote:
> Hi Kishon,
>
> This series adds USB3.0 support to am654-serdes PHY driver.
merged, thanks!
-Kishon
>
> cheers,
> -roger
>
> Roger Quadros (2):
> phy: ti: am654: show up in regmap debugfs
> phy: ti: am654: add support for USB super-speed
>
> drivers/phy/ti/phy-am654-serdes.c | 104 +++++++++++++++++++++++++++++-
> 1 file changed, 102 insertions(+), 2 deletions(-)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-18 12:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 13:12 [PATCH 0/2] phy: ti: am654: Add USB super-speed support Roger Quadros
2020-05-13 13:12 ` [PATCH 1/2] phy: ti: am654: show up in regmap debugfs Roger Quadros
2020-05-13 13:12 ` [PATCH 2/2] phy: ti: am654: add support for USB super-speed Roger Quadros
2020-05-18 12:33 ` [PATCH 0/2] phy: ti: am654: Add USB super-speed support Kishon Vijay Abraham I
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.