Loading arch/arm64/boot/dts/qcom/sdm845-670-usb-common.dtsi +3 −2 Original line number Diff line number Diff line /* * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -138,7 +138,8 @@ 0x254 /* QUSB2PHY_TEST1 */ 0x198 /* PLL_BIAS_CONTROL_2 */ 0x228 /* QUSB2PHY_SQ_CTRL1 */ 0x22c>; /* QUSB2PHY_SQ_CTRL2 */ 0x22c /* QUSB2PHY_SQ_CTRL2 */ 0x27c>; /* QUSB2PHY_DEBUG_CTRL1 */ qcom,qusb-phy-init-seq = /* <value reg_offset> */ Loading drivers/usb/phy/phy-msm-qusb-v2.c +9 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ #define SQ_CTRL1_CHIRP_DISABLE 0x20 #define SQ_CTRL2_CHIRP_DISABLE 0x80 #define DEBUG_CTRL1_OVERRIDE_VAL 0x09 /* PERIPH_SS_PHY_REFGEN_NORTH_BG_CTRL register bits */ #define BANDGAP_BYPASS BIT(0) Loading @@ -84,6 +86,7 @@ enum qusb_phy_reg { BIAS_CTRL_2, SQ_CTRL1, SQ_CTRL2, DEBUG_CTRL1, USB2_PHY_REG_MAX, }; Loading Loading @@ -553,6 +556,11 @@ static int qusb_phy_init(struct usb_phy *phy) writel_relaxed(BIAS_CTRL_2_OVERRIDE_VAL, qphy->base + qphy->phy_reg[BIAS_CTRL_2]); /* if soc revision is mentioned override DEBUG_CTRL1 value */ if (qphy->soc_min_rev) writel_relaxed(DEBUG_CTRL1_OVERRIDE_VAL, qphy->base + qphy->phy_reg[DEBUG_CTRL1]); /* ensure above writes are completed before re-enabling PHY */ wmb(); Loading Loading @@ -1228,7 +1236,7 @@ static int qusb_phy_probe(struct platform_device *pdev) * qusb_phy_disable_chirp is not required if soc version is * mentioned and is not base version. */ if (qphy->soc_min_rev == 0) if (!qphy->soc_min_rev) qphy->phy.disable_chirp = qusb_phy_disable_chirp; qphy->phy.start_port_reset = qusb_phy_enable_ext_pulldown; Loading Loading
arch/arm64/boot/dts/qcom/sdm845-670-usb-common.dtsi +3 −2 Original line number Diff line number Diff line /* * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -138,7 +138,8 @@ 0x254 /* QUSB2PHY_TEST1 */ 0x198 /* PLL_BIAS_CONTROL_2 */ 0x228 /* QUSB2PHY_SQ_CTRL1 */ 0x22c>; /* QUSB2PHY_SQ_CTRL2 */ 0x22c /* QUSB2PHY_SQ_CTRL2 */ 0x27c>; /* QUSB2PHY_DEBUG_CTRL1 */ qcom,qusb-phy-init-seq = /* <value reg_offset> */ Loading
drivers/usb/phy/phy-msm-qusb-v2.c +9 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ #define SQ_CTRL1_CHIRP_DISABLE 0x20 #define SQ_CTRL2_CHIRP_DISABLE 0x80 #define DEBUG_CTRL1_OVERRIDE_VAL 0x09 /* PERIPH_SS_PHY_REFGEN_NORTH_BG_CTRL register bits */ #define BANDGAP_BYPASS BIT(0) Loading @@ -84,6 +86,7 @@ enum qusb_phy_reg { BIAS_CTRL_2, SQ_CTRL1, SQ_CTRL2, DEBUG_CTRL1, USB2_PHY_REG_MAX, }; Loading Loading @@ -553,6 +556,11 @@ static int qusb_phy_init(struct usb_phy *phy) writel_relaxed(BIAS_CTRL_2_OVERRIDE_VAL, qphy->base + qphy->phy_reg[BIAS_CTRL_2]); /* if soc revision is mentioned override DEBUG_CTRL1 value */ if (qphy->soc_min_rev) writel_relaxed(DEBUG_CTRL1_OVERRIDE_VAL, qphy->base + qphy->phy_reg[DEBUG_CTRL1]); /* ensure above writes are completed before re-enabling PHY */ wmb(); Loading Loading @@ -1228,7 +1236,7 @@ static int qusb_phy_probe(struct platform_device *pdev) * qusb_phy_disable_chirp is not required if soc version is * mentioned and is not base version. */ if (qphy->soc_min_rev == 0) if (!qphy->soc_min_rev) qphy->phy.disable_chirp = qusb_phy_disable_chirp; qphy->phy.start_port_reset = qusb_phy_enable_ext_pulldown; Loading