sgm4154x int pin must be set as pull up as it will trigger a fall edge signal to interrupt drivers, configure internal pullup resistor to make it work. sgm4154x driver has to enable dpdm regulator to detect the charge type correctly. Once this regulator is enabled, the usb enumeration stop working as the OTG module fails to send signal to dwc3 usb driver, so the dwc3 usb driver has to rely on external extcon to signal the USB cable events, as long as events triggerred, dwc3 usb driver can auto resume the OTG devices, so the enumeration can go on. Set dwc3 work under "otg" mode as it can auto resume the OTG device. Change-Id: Ia287a6b829c1b85ca60ea079ded91e120357487f Reviewed-on: https://gerrit.mot.com/2130435 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wei Xu <xuwei9@lenovo.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
31 lines
995 B
Devicetree
31 lines
995 B
Devicetree
/* Copyright (c) 2021, 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
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
&soc {
|
|
rpm: rt-pd-manager {
|
|
compatible = "richtek,rt-pd-manager";
|
|
#io-channel-cells = <1>;
|
|
io-channels = <&mmi_discrete_charger PSY_IIO_USB_REAL_TYPE>,
|
|
<&mmi_discrete_charger PSY_IIO_MMI_OTG_ENABLE>,
|
|
<&mmi_discrete_charger PSY_IIO_TYPEC_MODE>,
|
|
<&mmi_discrete_charger PSY_IIO_PD_ACTIVE>;
|
|
io-channel-names = "usb_real_type",
|
|
"otg_enable",
|
|
"typec_mode",
|
|
"pd_active";
|
|
};
|
|
};
|
|
|
|
&usb0 {
|
|
extcon = <&eud>, <&rpm>;
|
|
};
|