SC60模块使用的是高通MSM8953套片,对应使用的电源芯片是PM8953和PMI632。
其中PM8953包括如下功能:
◆ Input power management
◆ Output power management
◆ General HK
◆ Audio
◆ IC interfaces
◆ Configurable pins:either multipurpose pins (MPPs) or general-purpose input/output (GPIOs)
而PMI632主要包括了如下功能:
◆ Switching charger
◆ Qualcomm battery gauge
◆ Type-C and Micro USB connectors support
◆ Quick Charge 2.0 and Quick Charge 3.0 support
◆ Battery current limiting (BCL) module
◆ General housekeeping
◆ Analog to digital converter (ADC)
◆ Battery interface module (BIM)
◆ Red, green, blue (RGB) LED drivers, PBS pattern generator(PPG)
◆ Vibrator driver
◆ Qualcomm® camera flash
◆ LCD bias
◆ HR-LED
◆ GPIOs that can be configured to function within some of the other categories
在不使用充电、FG 电量计、充电指示、闪光灯驱动、背光驱动、马达驱动、电池 ID 和电池温度检测的前提下,可以去掉PMI芯片的。
这里主要的修改就是USB。默认有PMI的模块,vbus脚是连接在PMI侧的,现在需要连接到PM8953的GPIO-7作为vbus插入检测,使用MSM8953的GPIO_1作为USB ID检测。参考图如下:
Usb3.0的主从设备检测是通过CC1和CC2控制USB_ID,再通过USB_ID输出,通知GPIO_1来实现:当插入device时,USB_ID会输出低电平,GPIO_1收到后,通知模块进入host模式;如不需要OTG功能,USB¬_ID脚可悬空。
驱动修改主要是增加extcon1节点了。
//stone added for usb-detect
&soc {
usb_detect {
compatible = "linux,extcon-usb-gpio";
vbus-gpio = <&pm8953_gpios 7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb2_vbus_det_default>;
};
};
&pm8953_gpios {
//shiyan added for usb-detect
gpio@c600 {
qcom,mode = <0>;
qcom,vin-sel = <3>; /*reference voltage 1.8v*/
qcom,src-sel =