Thread (27 messages) 27 messages, 4 authors, 2019-03-13

Re: [PATCH v2 6/8] phy: amlogic: Add Amlogic G12A USB3 + PCIE Combo PHY Driver

From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: 2019-03-06 21:04:47
Also in: linux-amlogic, linux-usb, lkml

Hi Neil,

On Mon, Mar 4, 2019 at 11:40 AM Neil Armstrong [off-list ref] wrote:
[...]
+static int phy_g12a_usb3_init(struct phy *phy)
+{
+       struct phy_g12a_usb3_pcie_priv *priv = phy_get_drvdata(phy);
+       int data, ret;
+
+       /* Switch PHY to USB3 */
+       regmap_update_bits(priv->regmap, PHY_R0,
+                          PHY_R0_PCIE_USB3_SWITCH,
+                          PHY_R0_PCIE_USB3_SWITCH);
does this automatically clear PHY_R0_PCIE_POWER_STATE (in case the
bootloader incorrectly set that)?

[...]
+static int phy_g12a_usb3_pcie_init(struct phy *phy)
+{
+       struct phy_g12a_usb3_pcie_priv *priv = phy_get_drvdata(phy);
+       int ret;
+
+       ret = reset_control_reset(priv->reset);
+       if (ret)
+               return ret;
+
+       if (priv->mode == PHY_TYPE_USB3)
+               return phy_g12a_usb3_init(phy);
+
+       /* Power UP PCIE */
+       regmap_update_bits(priv->regmap, PHY_R0,
+                          PHY_R0_PCIE_POWER_STATE,
+                          FIELD_PREP(PHY_R0_PCIE_POWER_STATE, 0x1c));
similar to my question above: does this automatically clear
PHY_R0_PCIE_USB3_SWITCH (in case the bootloader incorrectly set that)?

Apart from these two questions this looks good to me!


Regards
Martin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help