Electronic device and charging method
By detecting the USB interface port type through the power management chip and controlling the module impedance state of the fast charging chip and the power management chip, the increased cost caused by adding a switch in the existing technology is solved, and the compatibility between fast charging and data transmission is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
- Filing Date
- 2022-04-18
- Publication Date
- 2026-05-22
Smart Images

Figure CN114678936B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more particularly to an electronic device and a charging method. Background Technology
[0002] With the rapid development of technology, mobile phones, which provide convenience for people's lives, work, study, and entertainment, have become indispensable items in daily life. From being limited to making calls and sending text messages, mobile phones now offer a wide range of functions, including video conferencing and gaming. Their performance has also increased significantly. As mobile phone performance improves, power consumption and battery capacity also increase, making the need for fast charging increasingly urgent.
[0003] Existing solutions for fast charging involve adding a switch to the phone to separate fast charging and data transfer, achieving compatibility between the two without interference. Existing solutions include... Figure 1 As shown, taking the charger connected to a Universal Serial Bus (USB) interface as an example: the USB interface is used for inserting the USB cable; the switch is used to toggle between connecting the USB interface to the fast charging chip or the power management chip to achieve compatibility between fast charging and data transmission; the fast charging chip is used to quickly charge the phone battery, and this chip also integrates a fast charging protocol module; the power management chip is used to provide power to the main chip and other modules. (Example follows) Figure 1 The prior art shown will be further explained. First, when a device is plugged into a USB port, the power management chip identifies it as a charger device. Then, the phone switches to path 1 to connect the USB port to the fast charging chip, thereby achieving compatibility between the fast charging chip's protocol module and the charger. It is evident that the prior art separates fast charging and data transmission through a switch to achieve compatibility between the two. However, adding a switch increases the cost of the phone. Summary of the Invention
[0004] This application provides an electronic device and a charging method that can save on the cost of electronic devices while achieving compatibility between fast charging and data transmission.
[0005] In a first aspect, this application provides an electronic device comprising a Universal Serial Bus (USB) interface, a fast charging chip, a power management chip, and a main chip, wherein: the fast charging chip includes a USB DataPositive (DP) module and a USB DataMinus (DM) module; the power management chip includes a DP input module, a DM input module, a DP output module, and a DM output module, wherein the DP input module and the DM input module are not connected to the DP output module and the DM output module by default; the USB interface is connected to the DP module and the DM module of the fast charging chip, the USB interface is connected to the DP input module and the DM input module of the power management chip, and the DP output module and the DM output module of the power management chip are connected to the main chip; the fast charging chip is used to quickly charge the battery in the electronic device, and the DP module and the DM module of the fast charging chip are in a high-impedance state by default; the power management chip is used to detect the port type connected to the USB interface, and the DP input module and the DM input module are in a low-impedance state by default; when the power management chip detects that the port type is a Dedicated Charging Port... When the DP input module and the DM input module are connected to the port (DCP), the DP input module and the DM input module switch to a high impedance state, and the DP module and the DM module of the fast charging chip switch to a low impedance state. When the power management chip detects that the type of the port is Standard Downstream Port (SDP) / Charging Downstream Port (CDP), the DP input module and the DM input module are connected to the DP output module and the DM output module.
[0006] In one possible implementation, the electronic device also includes an inductor located on the line connecting the USB interface to the DP and DM modules of the fast charging chip.
[0007] In one possible implementation, the main chip is connected to the fast charging chip via an I2C bus. The main chip includes a USB Port Physical Layer (USB PHY) module, which includes a DP module and a DM module. The DP output module and DM output module of the power management chip are specifically connected to the DP module and DM module of the main chip. When the power management chip detects that the port type is DCP, the DP input module and the DM input module are connected to the DP output module and the DM output module. When the power management chip detects that the port type is DCP, the USB PHY module is used to switch the state of the DP input module and the DM input module to a high impedance state, and the main chip is used to switch the state of the DP module and the DM module of the fast charging chip to a low impedance state via the I2C bus.
[0008] In one possible implementation, the power management chip further includes a switch and a port detection module. Specifically, the power management chip detects the port type of the USB interface through the port detection module. The switch is connected to the port detection module, and the switch is also connected to the DP output module and the DM output module. The switch is used to switch connection modes. The connection modes include a first connection mode and a second connection mode. The default connection mode is the first connection mode. In the first connection mode, the DP input module and the DM input module are connected to the port detection module, and in the second connection mode, the DP input module and the DM input module are connected to the DP output module and the DM output module.
[0009] In one possible implementation, the power management chip is also used to perform a secondary detection of the port type connected to the USB interface when it is detected that the port type connected to the USB interface is unknown.
[0010] Secondly, this application provides a charging method applied to an electronic device, the electronic device including a Universal Serial Bus (USB) interface, a fast charging chip, a power management chip, and a main chip, the fast charging chip including a data positive (DP) module and a data negative (DM) module; the power management chip including a DP input module, a DM input module, a DP output module, and a DM output module; the method includes: detecting the port type of the USB interface through the power management chip, wherein the DP input module and the DM input module are in a low impedance state by default, and the fast charging chip is in a high impedance state by default; when the power management chip detects that the port type is a Dedicated Charging Port (DCP), switching the state of the DP input module and the DM input module to a high impedance state, and switching the state of the fast charging chip to a low impedance state; when the power management chip detects that the port type is a Standard Downlink Port (SDP) / Charging Downlink Port (CDP), connecting the DP input module and the DM input module to the DP output module and the DM output module.
[0011] In one possible implementation, the DP input module and the DM input module are not connected to the DP output module and the DM output module by default; the USB interface is connected to the DP module and the DM module of the fast charging chip, the USB interface is connected to the DP input module and the DM input module of the power management chip, and the DP output module and the DM output module of the power management chip are connected to the main chip.
[0012] In one possible implementation, the electronic device also includes an inductor located on the line connecting the USB interface to the DP and DM modules of the fast charging chip.
[0013] In one possible implementation, the main chip includes a Universal Serial Bus Physical Layer (USB PHY) module. When the power management chip detects that the port type is DCP, it switches the state of the DP input module and the DM input module to a high-impedance state and switches the state of the DP module and the DM module of the fast charging chip to a low-impedance state. This includes: when the power management chip detects that the port type is DCP, connecting the DP input module and the DM input module to the DP output module and the DM output module, switching the state of the DP input module and the DM input module to a high-impedance state through the USB PHY module, and switching the state of the fast charging chip to a low-impedance state through the I2C bus of the main chip.
[0014] In one possible implementation, the power management chip further includes a switch and a port detection module. Specifically, the power management chip detects the port type of the USB interface through the port detection module. The switch is connected to the port detection module, and the switch is also connected to the DP output module and the DM output module. The switch is used to switch connection modes. The connection modes include a first connection mode and a second connection mode. The default connection mode is the first connection mode. In the first connection mode, the DP input module and the DM input module are connected to the port detection module, and in the second connection mode, the DP input module and the DM input module are connected to the DP output module and the DM output module.
[0015] In one possible implementation, the method further includes: when the port type connected to the USB interface is detected to be unknown, the power management chip performs a secondary detection on the port type connected to the USB interface.
[0016] Thirdly, this application provides a computer-readable storage medium for storing instructions that, when executed, cause the method described in the second aspect or any possible implementation thereof to be implemented.
[0017] Fourthly, this application provides a computer program product comprising a computer program or instructions that, when executed on a computer, cause the method described in the second aspect or any possible implementation thereof to be implemented.
[0018] The solution presented in this application allows the power management chip to determine the USB interface connection and then control the impedance states of the DP and DM modules of the fast charging chip, as well as the impedance states of the DP and DM input modules of the power management chip, based on the determination result. This solution reduces the cost of electronic devices while achieving compatibility between fast charging and data transmission. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the structure of a prior art electronic device provided in an embodiment of this application;
[0021] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0022] Figure 3 This is a schematic diagram of the structure of another electronic device provided in an embodiment of this application;
[0023] Figure 4 This is a schematic diagram of the structure of another electronic device provided in the embodiments of this application;
[0024] Figure 5 This is a schematic diagram of the structure of another electronic device provided in the embodiments of this application;
[0025] Figure 6 This is a schematic flowchart of a charging method provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0028] It should be noted that the terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the term "comprising" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0029] To facilitate understanding of the solutions provided in the embodiments of this application, some technical terms involved in this application will be introduced below:
[0030] I. Electronic Equipment
[0031] Electronic devices can be mobile phones, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, in-vehicle terminal devices, wireless terminals in self-driving vehicles, wireless terminals in remote medical care, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, wearable terminal devices, and so on. Electronic devices can also be chips embedded in the above-mentioned devices.
[0032] II. Fast charging
[0033] Since power is directly proportional to both voltage and current—meaning higher voltage and greater current result in greater power—fast charging employs two main approaches: 1. Increasing Voltage: During charging, the charger first transforms 220V to 5V / 9V / 12V. The electronic device contains a charging controller that further steps down the low voltage to a high current, achieving fast charging. Therefore, the charging speed is actually controlled by the electronic device, not the charger. The controller chip regulates the overall current flowing into and out of the battery, preventing dangerous peak currents. 2. Increasing Current: To avoid losses from the secondary voltage reduction in the charging controller (IC), another approach is to bypass the IC's step-down process and directly use a high current at a low voltage. 3. Simultaneous Adjustment: Currently, the limit for electronic device (such as mobile phone) batteries is approximately 5V 5A, or 25W. Fast charging protocols exceeding 25W are mostly proprietary. As mentioned above, the voltage conversion efficiency of the charging controller is limited; a charge pump can achieve higher efficiency and generate an output voltage higher than the input voltage.
[0034] III. Universal Serial Bus (USB)
[0035] Since its introduction, USB has successfully replaced serial and parallel ports, becoming one of the standard expansion interfaces and essential interfaces for a large number of computers and smart devices in the 21st century. It has now evolved to USB 4.0. USB boasts advantages such as high transmission speed, ease of use, hot-swapping support, flexible connections, and independent power supply. It can connect various peripherals such as keyboards, mice, and large-capacity storage devices, and is also widely used in smartphones. The interaction between computers and other smart devices and the outside world primarily relies on networks and USB interfaces.
[0036] USB uses a four-wire cable. Two wires are used for serial data transmission (DM and DP), and the other two provide power to downstream devices. For any successfully connected and mutually recognized peripherals, data will be transmitted at the highest rate supported by both devices. The USB bus automatically and dynamically switches between high-speed and low-speed modes in compatible transmission modes based on the peripheral's capabilities, locking to the appropriate rate. USB supports four basic data transfer modes: control transfers, isochronous transfers, interrupt transfers, and block transfers.
[0037] IV. BC1.2
[0038] The Battery Charging (BC1.2) protocol is primarily used to standardize battery charging requirements. BC1.2 introduces a charging port identification mechanism, mainly including the following USB port types: 1. Standard Downlink Port (SDP): SDP ports support the USB protocol, with a maximum current of 500 mA. SDP can be considered a regular USB interface; 2. Dedicated Charging Port (DCP): DCP does not support data protocols but supports fast charging and can provide high current. DCP is mainly used for dedicated chargers such as wall chargers; 3. Charging Downlink Port (CDP): CDP supports both data protocols and fast charging.
[0039] V. Bidirectional Binary Synchronous Serial Bus (Inter-Integrated Circuit, I2C)
[0040] I2C transmits information between devices connected to a bus. This information transmission primarily involves the exchange between master and slave devices. The master device initiates data transmission on the bus and generates a clock to enable transmission; any addressed device is considered a slave. The master-slave and send-receive relationships on the bus are not constant but depend on the direction of data transmission. If the master wants to send data to a slave device, it first addresses the slave device, then actively sends data, and finally terminates the transmission. If the master wants to receive data from a slave device, it first addresses the slave device, then receives the data sent by the slave, and finally terminates the reception process. In this case, the master is responsible for generating the timing clock and terminating the data transmission.
[0041] Please see Figure 2 , Figure 2This is a system architecture diagram provided in an embodiment of this application. The system architecture typically includes an access device 201 and an electronic device 202. The access device 201 includes, but is not limited to, the following devices: devices that provide power to the electronic device 202 via a data cable (such as chargers, portable power banks, car chargers, etc.) and devices that can transmit data to the electronic device 202 via a data cable (such as laptops, desktop computers, in-vehicle smart terminals, etc.). The electronic device 202 includes, but is not limited to, the following devices: smart home appliances, smartphones, tablets, etc. The access device 201 and the electronic device 202 are connected via USB.
[0042] To better understand the electronic device provided in the embodiments of this application, the following describes... Figure 2 The electronic device 202 in the document will be explained further.
[0043] The electronic device includes a Universal Serial Bus (USB) interface, a fast charging chip, a power management chip, and a main chip. The fast charging chip includes a Data Positive (DP) module and a Data Negative (DM) module. The power management chip includes a DP input module, a DM input module, a DP output module, and a DM output module. The DP input and DM input modules are not connected to the DP output and DM output modules by default. The USB interface is connected to the DP and DM modules of the fast charging chip, and the DP and DM input modules of the power management chip are also connected. The DP and DM output modules of the power management chip are connected to the main chip. The fast charging chip is used to charge the electronic device. The battery in the device is fast-charged. The DP and DM modules of the fast-charging chip are in a high-impedance state by default. The power management chip is used to detect the port type connected to the USB interface. The DP input module and DM input module are in a low-impedance state by default. When the power management chip detects that the port type is a Dedicated Charging Port (DCP), the DP input module and DM input module switch to a high-impedance state, and the DP module and DM module of the fast-charging chip switch to a low-impedance state. When the power management chip detects that the port type is a Standard Downlink Port (SDP) / Charging Downlink Port (CDP), the DP input module and DM input module are connected to the DP output module and DM output module.
[0044] In this embodiment, the USB interface is connected to the power management chip by default, and the power management chip determines the port type of the USB interface. When the port type is detected as DCP, the DP input module and DM input module of the power management chip are switched to a high-impedance state to create an open circuit between the USB interface and the power management chip, and the DP module and DM module of the fast charging chip are switched to a low-impedance state to connect the USB interface to the fast charging chip, enabling the external device to charge the electronic device. When the port type is detected as SDP / CDP, the DP input module and DM input module of the power management chip are connected to the DP output module and DM output module to connect the USB interface to the main chip, enabling data transmission between the external device and the electronic device.
[0045] Optionally, the fast charging chip includes a fast charging protocol. When the fast charging protocol of the electronic device matches the charging protocol of the external device (such as a charger), the electronic device can be charged quickly. Since the electronic device and the external device are connected via USB, which uses a four-wire cable, two of which are used for data transmission (DP and DM), the fast charging chip connected to the USB interface includes a DP module and a DM module. When a device is connected to the USB interface, the DP module of the fast charging chip connects to the DP wire of the USB four-wire cable, and the DM module of the fast charging chip connects to the DM wire of the USB four-wire cable.
[0046] For example, a fast charging protocol could be USB Power Delivery (PD) fast charging, which requires a USB Type-C interface and can be used for charging mobile phones and powering displays. Most current smartphones support PD fast charging. Fast charging protocols can also be proprietary protocols developed by mobile phone manufacturers. These proprietary protocols typically use low voltage and high current to increase charging power.
[0047] Optionally, a USB interface is a pre-installed interface on an electronic device for connecting a USB plug. This USB interface can input current and input / output data. For example, when the device connected to the USB interface is a charger, the USB interface inputs current; when the device connected to the USB interface is a computer, the USB interface inputs / outputs data.
[0048] For example, the USB interface can be a Mini USB interface, which is widely used in media players, external hard drives, and other digital devices. The USB interface can also be a Micro USB interface, which can only be inserted from one side. It is the next generation of Mini USB, smaller, with a longer lifespan and greater strength, and is mainly used for connecting or transferring data to various USB flash drives or mobile devices. Compared to Mini USB, it offers faster transfer speeds. The USB interface can also be a USB Type-C interface: this is a connection interface based on the USB 3.1 standard, featuring reversible insertion and high transfer speeds.
[0049] Optionally, the main chip is used to control the various modules and process data. This main chip can be a general-purpose processing chip for the mobile phone, or it can be a proprietary processing chip developed by each mobile phone manufacturer.
[0050] Optionally, the power management chip is the core of the power supply process for electronic devices. This power management chip is responsible for the power conversion, distribution, and detection control functions required by the electronic device.
[0051] For example, a power management chip can be an integrated power management IC (PMIC). A PMIC is an integrated circuit used for voltage conversion, regulation, and battery management. A PMIC can handle power system timing, power various loads, and provide protection against overvoltage, undervoltage, overcurrent, and thermal failures. A single PMIC can manage multiple external power supplies, mapping different system requirements to the appropriate regulator output voltage.
[0052] In one possible embodiment, please refer to Figure 3 ,like Figure 3 The electronic device shown also includes an inductor located on the line connecting the USB interface to the DP module and DM module of the fast charging chip.
[0053] The inductor located on the line connecting the USB interface to the DP and DM modules of the fast charging chip is mainly used to improve the eye diagram of USB communication in the circuit diagram provided in this application and to improve the signal quality in the circuit. To better understand the role of the inductor, the USB eye diagram will first be explained below. The USB eye diagram is a result of accumulating and superimposing the acquired serial signal bits using a persistence method. The superimposed graphic shape looks very much like an eye, hence the name eye diagram. Because the USB eye diagram completely represents the bit information of the serial signal in a single graphic, it has become the most important tool for measuring signal quality; therefore, eye diagram measurement is also called signal quality testing. The inductor is added to improve signal quality, thereby improving the USB eye diagram.
[0054] In one possible embodiment, the main chip includes a Universal Serial Bus Physical Layer (USB PHY) module, which includes a DP module and a DM module. The DP output module and DM output module of the power management chip are specifically connected to the DP module and DM module of the main chip. When the power management chip detects that the port type is DCP, the DP input module and the DM input module are connected to the DP output module and the DM output module. When the power management chip detects that the port type is DCP, the USB PHY module is used to switch the state of the DP input module and the DM input module to a high impedance state, and the main chip is used to switch the state of the DP module and the DM module of the fast charging chip to a low impedance state through the I2C bus.
[0055] Please see Figure 4 ,like Figure 4 The master chip shown is connected to the fast charging chip via an I2C bus. The I2C bus is a standard bidirectional interface that uses a controller (called the master controller) to communicate with the slave device. For a detailed explanation of I2C, please refer to the above-mentioned technical terminology introduction; it will not be repeated here. In this embodiment, the I2C bus connects the master chip and the fast charging chip. The master chip acts as the master controller, and the fast charging chip acts as the slave controller. The master chip can communicate with the fast charging chip via the I2C bus to switch the states of the fast charging chip's DP and DM modules to a low-impedance state. The serial bus physical layer is used to switch the states of the power management chip's DP and DM input modules to a high-impedance state, and is also used for data transmission between USB interface access devices and electronic devices.
[0056] For example, when the device connected to the USB interface is a charger (a device for fast charging electronic devices), firstly, the power management chip determines that the port type of the USB interface is DCP. The power management chip then connects its DP input module and DM input module to its DP output module and DM output module. Next, the USB PHY module in the main chip, through the line connected to the power management chip, switches the DP input module and DM input module of the power management chip from a low-impedance state to a high-impedance state. Furthermore, the main chip sends an impedance switching command to the fast charging chip via the I2C bus, causing the fast charging chip to switch its DP module and DM module from a high-impedance state to a low-impedance state. This establishes connection between the charger and the fast charging chip, enabling fast charging of the electronic device. When the port is determined to be DCP, the flow of signals / current sent by the main chip can be found in [reference needed]. Figure 4 The arrow in the image indicates the direction.
[0057] In one possible embodiment, please refer to Figure 5 ,like Figure 5 The power management chip also includes a switch and a port detection module. Specifically, the power management chip detects the port type of the USB interface through the port detection module. The switch is connected to the port detection module, the DP output module, and the DM output module. The switch is used to switch the connection mode. The connection mode includes a first connection mode and a second connection mode. The default connection mode is the first connection mode. In the first connection mode, the DP input module and the DM input module are connected to the port detection module. In the second connection mode, the DP input module and the DM input module are connected to the DP output module and the DM output module.
[0058] The switch defaults to connecting the DP and DM input modules to the port detection module. When the switch is triggered, these modules connect to the DP and DM output modules. To elaborate, first, the power management chip's DP and DM input modules connect to the port detection module. After the port detection module detects the USB interface's port type, it switches the switch from the first connection mode (power management chip's DP and DM input modules connected to the port detection module) to the second connection mode (power management chip's DP and DM input modules connected to the power management chip's DP and DM output modules), thus enabling subsequent operations.
[0059] Optionally, the port detection module may include BC1.2. BC1.2 is primarily used to regulate battery charging requirements and introduces a port identification mechanism. For example, BC1.2 can determine whether a port is a charging port or a data port as follows: First, the PD (Power Distribution Device) is pulled high to 0.6 volts, then the PD voltage is detected. If the PD voltage is less than a specified reference voltage, the port type is considered to be a data port (SDP); if the PD voltage is greater than the reference voltage, it is considered a charging port (CDP or DCP). It should be noted that this port detection module can also identify the port type in other ways; the BC1.2 protocol is only used as an example and is not a limitation.
[0060] In one possible embodiment, the power management chip is further configured to perform secondary detection of the port type connected to the USB interface when it detects that the port type connected to the USB interface is unknown.
[0061] Specifically, if the power management chip cannot determine the port type of the USB interface on the first test, the power management chip will perform a second test on the port type of the USB interface.
[0062] Optionally, when the power management chip performs secondary detection and determines that the USB interface type is DCP, the DP input module and DM input module of the power management chip switch to a high-impedance state, and the DP module and DM module of the fast charging chip switch to a low-impedance state. When the power management chip performs secondary detection and determines that the USB interface type is SDP / CDP, the DP input module and DM input module of the power management chip are connected to the DP output module and DM output module. When the power management chip still cannot determine the port type of the USB interface during secondary detection, the detection of the USB interface is stopped.
[0063] See Figure 6 This is a flowchart of a charging method provided in an embodiment of this application. The method is applied to an electronic device, which includes a USB interface, a fast charging chip, a power management chip, and a main chip. The fast charging chip includes a DP module and a DM module; the power management chip includes a DP input module, a DM input module, a DP output module, and a DM output module.
[0064] The method includes:
[0065] S601. The power management chip detects the port type of the USB interface. The DP input module and DM input module are in low impedance state by default, and the fast charging chip is in high impedance state by default.
[0066] S602. When the power management chip detects that the port type is DCP, it switches the state of the DP input module and DM input module to high impedance state, and switches the state of the fast charging chip to low impedance state.
[0067] S603. When the power management chip detects that the access port type is SDP / CDP, it connects the DP input module and DM input module with the DP output module and DM output module.
[0068] In one possible implementation, the DP input module and the DM input module are not connected to the DP output module and the DM output module by default; the USB interface is connected to the DP module and the DM module of the fast charging chip, the USB interface is connected to the DP input module and the DM input module of the power management chip, and the DP output module and the DM output module of the power management chip are connected to the main chip.
[0069] In one possible implementation, the electronic device also includes an inductor located on the line connecting the USB interface to the DP and DM modules of the fast charging chip.
[0070] In one possible implementation, the main chip includes a Universal Serial Bus Physical Layer (USB PHY) module. When the power management chip detects that the port type is DCP, it switches the state of the DP input module and the DM input module to a high-impedance state and switches the state of the DP module and the DM module of the fast charging chip to a low-impedance state. This includes: when the power management chip detects that the port type is DCP, connecting the DP input module and the DM input module to the DP output module and the DM output module, switching the state of the DP input module and the DM input module to a high-impedance state through the USB PHY module, and switching the state of the fast charging chip to a low-impedance state through the I2C bus of the main chip.
[0071] In one possible implementation, the power management chip further includes a switch and a port detection module. Specifically, the power management chip detects the port type of the USB interface through the port detection module. The switch is connected to the port detection module, and the switch is also connected to the DP output module and the DM output module. The switch is used to switch connection modes. The connection modes include a first connection mode and a second connection mode. The default connection mode is the first connection mode. In the first connection mode, the DP input module and the DM input module are connected to the port detection module, and in the second connection mode, the DP input module and the DM input module are connected to the DP output module and the DM output module.
[0072] In one possible implementation, when the port type connected to the USB interface is detected to be unknown, the power management chip performs a secondary detection on the port type connected to the USB interface.
[0073] For example, the electronic device can be as described above. Figures 2-5 The corresponding embodiments describe any of the electronic devices. Specific implementation methods for each step can be found in the relevant descriptions above, and will not be repeated here.
[0074] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the functions of any of the above-described method embodiments. For details, please refer to the implementation methods provided in the above steps, which will not be repeated here.
[0075] This application also provides a computer program product that, when executed by a computer, implements the functions of any of the above method embodiments.
[0076] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).
[0077] Regarding the modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, hardware modules / units, or a combination of both. For example, for various devices and products applied to or integrated into a chip, all of their modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on the chip's integrated processor, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into a chip module, all of their modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same part (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units... It can be implemented using software programs that run on the processor integrated within the chip module. The remaining (if any) modules / units can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into the terminal, the modules / units they contain can all be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components within the terminal. Alternatively, at least some modules / units can be implemented using software programs that run on the processor integrated within the terminal, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits.
[0078] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some operations can be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0079] The descriptions of the various embodiments provided in this application can be referenced mutually. Each embodiment has its own emphasis, and parts not described in detail in a certain embodiment can be referred to the relevant descriptions of other embodiments. For the sake of convenience and brevity, for example, the functions and operations of the various devices and equipment provided in the embodiments of this application can be referred to the relevant descriptions of the method embodiments of this application. The method embodiments and the device embodiments can also be referenced, combined or cited from each other.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. An electronic device, characterized in that, The electronic device includes a USB interface, a fast charging chip, a power management chip, and a main chip, wherein: The fast charging chip includes a DP module and a DM module; The power management chip includes a DP input module, a DM input module, a DP output module, and a DM output module. The DP input module and the DM input module are not connected to the DP output module and the DM output module by default. The USB interface is connected to the DP module and DM module of the fast charging chip, the USB interface is connected to the DP input module and DM input module of the power management chip, and the DP output module and DM output module of the power management chip are connected to the main chip. The fast charging chip is used to quickly charge the battery in the electronic device. The DP module and DM module of the fast charging chip are in a high impedance state by default. The power management chip is used to detect the port type connected to the USB interface. The DP input module and DM input module are in a low impedance state by default. When the power management chip detects that the port type is DCP, the DP input module and the DM input module switch to a high impedance state, and the DP module and DM module of the fast charging chip switch to a low impedance state. When the power management chip detects that the port type is SDP / CDP, the DP input module and the DM input module are connected to the DP output module and the DM output module.
2. The electronic device according to claim 1, characterized in that, The electronic device also includes an inductor located on the line connecting the USB interface to the DP module and DM module of the fast charging chip.
3. The electronic device according to claim 1, characterized in that, The main chip is connected to the fast charging chip via an I2C bus; The main chip includes a USB PHY module, which includes a DP module and a DM module. The DP output module and DM output module of the power management chip are specifically connected to the DP module and DM module of the main chip. When the power management chip detects that the port type is DCP, the DP input module and the DM input module are connected to the DP output module and the DM output module; When the power management chip detects that the port type is DCP, the USB PHY module switches the state of the DP input module and the DM input module to a high impedance state, and the main chip switches the state of the DP module and the DM module of the fast charging chip to a low impedance state through the I2C bus.
4. The electronic device according to claim 1, characterized in that, The power management chip also includes a switch and a port detection module. Specifically, the power management chip detects the port type of the USB interface through the port detection module. The switch is connected to the port detection module, and the switch is also connected to the DP output module and the DM output module. The switch is used to switch the connection mode; the connection mode includes a first connection mode and a second connection mode; the default connection mode is the first connection mode; the first connection mode is that the DP input module and the DM input module are connected to the port detection module, and the second connection mode is that the DP input module and the DM input module are connected to the DP output module and the DM output module.
5. The electronic device according to any one of claims 1 to 4, characterized in that, The power management chip is also used to perform secondary detection on the port type connected to the USB interface when it detects that the port type connected to the USB interface is unknown.
6. A charging method, characterized in that, The method is applied to an electronic device, which includes a USB interface, a fast charging chip, a power management chip, and a main chip. The fast charging chip includes a DP module and a DM module; the power management chip includes a DP input module, a DM input module, a DP output module, and a DM output module. The method includes: The power management chip detects the port type connected to the USB interface, wherein the DP input module and DM input module are in low impedance state by default, and the fast charging chip is in high impedance state by default. When the power management chip detects that the port type is DCP, it switches the state of the DP input module and the DM input module to a high impedance state, and switches the state of the fast charging chip to a low impedance state. When the power management chip detects that the access port type is SDP / CDP, it connects the DP input module and the DM input module to the DP output module and the DM output module.
7. The method according to claim 6, characterized in that, The DP input module and the DM input module are not connected to the DP output module and the DM output module by default; the USB interface is connected to the DP module and the DM module of the fast charging chip, the USB interface is connected to the DP input module and the DM input module of the power management chip, and the DP output module and the DM output module of the power management chip are connected to the main chip.
8. The method according to claim 6, characterized in that, The electronic device also includes an inductor located on the line connecting the USB interface to the DP module and DM module of the fast charging chip.
9. The method according to claim 6, characterized in that, The main chip includes a USB PHY module. When the power management chip detects that the port type is DCP, it switches the states of the DP input module and the DM input module to a high-impedance state, and switches the states of the DP module and the DM module of the fast charging chip to a low-impedance state, including: When the power management chip detects that the port type is DCP, it connects the DP input module and the DM input module to the DP output module and the DM output module. The USB PHY module switches the state of the DP input module and the DM input module to a high impedance state, and the main chip uses the I2C bus to switch the state of the fast charging chip to a low impedance state.
10. The method according to claim 6, characterized in that, The power management chip also includes a switch and a port detection module. Specifically, the power management chip detects the port type of the USB interface through the port detection module. The switch is connected to the port detection module and to the DP output module and the DM output module. The switch is used to switch connection modes. The connection modes include a first connection mode and a second connection mode. The default connection mode is the first connection mode. In the first connection mode, the DP input module and the DM input module are connected to the port detection module. In the second connection mode, the DP input module and the DM input module are connected to the DP output module and the DM output module.
11. The method according to any one of claims 6 to 9, characterized in that, The method further includes: When the type of the port connected to the USB interface is detected to be unknown, the power management chip performs a secondary detection on the type of the port connected to the USB interface.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store instructions that, when executed, cause the method as described in any one of claims 6-11 to be implemented.
13. A computer program product, characterized in that, The computer program product includes a computer program or instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 6-11.