Electronic device, driver loading method and readable storage medium
By pre-setting the hardware identification on the secondary board of the electronic device and using the communication interface to load the driver, the problem of identifying and loading circuit module drivers with different parameters is solved, and cost reduction and device miniaturization are achieved.
Patent Information
- Application Number
- PCT/CN2023/132817
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-08
- Filing Date
- 2023-11-21
- Publication Date
- 2024-09-12
AI Technical Summary
When existing electronic equipment identifies and loads circuit module drivers with different parameters, it is necessary to set up a voltage dividing circuit to distinguish the sub-boards, resulting in increased costs and non-miniaturization of the equipment.
By pre-setting the hardware identification in the active device of the secondary board, and using the communication interface to obtain the hardware identification to load the matching driver, it is avoided to set the voltage dividing circuit on the main board and the secondary board.
It reduces the manufacturing cost of electronic equipment, saves the space occupied by connecting devices, facilitates the miniaturization of equipment, and enriches the types and number of devices that can be connected to the processor.
Smart Images

Figure CN2023132817_12092024_PF_FP
Abstract
Description
Electronic device, driver loading method and readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 8, 2023, with application number 202310254526.1 and application name “Electronic device, drive loading method and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to an electronic device, a driver loading method, and a readable storage medium. Background Art
[0003] Electronic devices typically include multiple circuit modules. For example, electronic devices typically include a main board and at least one secondary board. The main board can be used to set up the main components of the electronic device, such as the processor and memory. The secondary board typically includes circuit modules for implementing one or more functions of the electronic device, such as audio, display, wireless communication, power supply, and camera functions.
[0004] In order to meet the needs of different users or the requirements of different regions for electronic devices, developers of electronic devices usually develop multiple models of circuit modules with different parameters (for example, using different devices) for circuit modules with similar functions. For example, the circuit module for realizing the shooting function may include multiple models of circuit modules with different cameras, and the circuit module for realizing the wireless communication function may include multiple models of circuit modules with different radio frequency devices. During the startup process of the electronic device, the electronic device can support the circuit module by loading different drivers for the circuit modules with different parameters. However, how to identify the parameters of the sub-board connected to the main board of the electronic device, or other sub-boards connected to the sub-board, is an urgent problem that needs to be solved.
[0005] Summary of the Invention
[0006] In view of this, embodiments of the present application provide an electronic device, a driver loading method, and a readable storage medium.
[0007] In a first aspect, the present application provides an electronic device comprising a first circuit board and a second circuit board; wherein the first circuit board comprises a first device, the first device comprises a storage unit, and the storage unit stores a hardware identification of the first circuit board; the second circuit board comprises a processing unit, and the processing unit is used to obtain the hardware identification from the storage unit and load a driver matching the hardware identification for the first circuit board based on the hardware identification.
[0008] In other words, the electronic device uses the storage unit of the first device to store the hardware identification of the first circuit board, allowing the processing unit of the second circuit board to load a matching driver for the first circuit board based on the hardware identification. This eliminates the need for developers to configure voltage divider circuits on the first and second circuit boards to obtain the hardware identification of the first circuit board. This reduces the manufacturing cost of the electronic device, saves space occupied by connectors between the main board and the secondary board, and facilitates miniaturization of the electronic device.
[0009] In a possible implementation of the first aspect, the first circuit board is a sub-board of the electronic device, and the second circuit board is a main board of the electronic device.
[0010] In a possible implementation of the above-mentioned first aspect, the above-mentioned first device includes at least one of the following devices: a radio frequency chip, a power management chip, a power driver chip, a processor, a sensor, a sensor driver chip, an audio chip, a camera driver chip, and a backlight driver chip.
[0011] In a possible implementation of the first aspect, the storage unit includes at least one of a register, a cache, and a latch.
[0012] In a possible implementation of the first aspect, the hardware identifier is determined based on parameters of a circuit module in the first circuit board.
[0013] That is, for circuit modules with the same function but different parameters (such as audio modules, sensor modules, mobile communication modules, display modules, camera modules, backlight modules, etc.), the hardware identification is different. For example, when the circuit module is a communication module, the hardware identification is different for the communication parameters supported (such as channels, network standards, frequencies, bandwidths, etc.), so that the processing unit can load the driver that matches the communication parameters according to the different hardware identifications. For another example, when the circuit module is a camera module, the hardware identification is different for camera modules with different shooting parameters and image sensors, so that the processing unit can load the driver that matches the shooting parameters or image sensors according to the different hardware identifications.
[0014] In a possible implementation of the first aspect, the first device includes a first pin, and the hardware identifier is stored in a memory by inputting a voltage corresponding to a parameter of the circuit module into the first pin.
[0015] In a possible implementation of the first aspect, the hardware identifier is inputted into the first pin at a level corresponding to a parameter of the circuit module and stored in the memory, including:
[0016] When the parameters of the circuit module are the first parameters, inputting a first voltage to the first pin;
[0017] When the parameter of the circuit module is a second parameter, a second voltage is input to the first pin.
[0018] That is, the developer of the electronic device can adjust the hardware identification stored in the storage unit by configuring the first pin of the first device (eg, the slave device identification configuration pin below) to match the hardware identification with the parameters of the circuit module.
[0019] In a possible implementation of the first aspect, the first circuit board and the second circuit board establish a communication connection through a communication interface, and the processing unit obtains the hardware identification from the storage unit through the communication interface.
[0020] That is to say, the processing unit obtains the hardware identification of the first circuit through the communication interface between the first circuit board and the second circuit, without occupying additional pins of the processing unit, so that the processing unit can connect to other devices or modules through more pins, which is conducive to enriching the types and quantities of devices that can be connected to the processing unit, thereby enriching the functions of the electronic device.
[0021] In a possible implementation of the first aspect above, the above-mentioned communication interface includes any one of the following communication interfaces: mobile industry processor interface, integrated circuit bus interface, improved integrated circuit bus interface, camera serial interface, display serial interface, integrated circuit built-in audio interface, pulse code modulation interface, universal asynchronous receiver and transmitter interface, and digital radio frequency interface.
[0022] In a second aspect, the present application provides a driver loading method, which is applied to the electronic device provided by the above-mentioned first aspect and any possible implementation of the above-mentioned first aspect; and the method includes: the processing unit obtains the hardware identification of the first circuit board from the storage unit; the processor loads the driver program matching the first circuit board based on the hardware identification.
[0023] In a third aspect, the present application provides a readable storage medium, which stores instructions. When the instructions are executed by an electronic device, the electronic device implements the driver loading method provided in the second aspect above.
[0024] It can be understood that the beneficial effects of the second and third aspects mentioned above can be referred to the description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] FIG1 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application;
[0026] FIG2 shows a schematic diagram of providing a voltage divider circuit in a main board 40 and a sub-board 50 according to some embodiments of the present application;
[0027] FIG3 shows a schematic diagram of a connection between a main board 40 and a sub-board 50 according to some embodiments of the present application;
[0028] FIG4 shows a schematic diagram of an active device 51 according to some embodiments of the present application;
[0029] FIG5 is a schematic diagram showing a hardware identification of a sub-board 50 configured with different parameters according to some embodiments of the present application;
[0030] FIG6 shows a schematic diagram of the connection relationship between a main board 40, a sub-board 50' and a sub-board 70 according to some embodiments of the present application;
[0031] FIG7 shows a schematic structural diagram of an electronic device 20 according to some embodiments of the present application;
[0032] FIG8 is a schematic diagram showing a flow chart of a driver loading method according to some embodiments of the present application;
[0033] FIG9 shows a schematic block diagram of a mobile phone 10 according to some embodiments of the present application. DETAILED DESCRIPTION
[0034] Illustrative embodiments of the present application include, but are not limited to, electronic devices, driver loading methods, and readable storage media.
[0035] The technical solution of this application is introduced below with reference to the accompanying drawings.
[0036] It is understood that the technical solution of the present application can be used in any electronic device including multiple circuit modules, including but not limited to mobile phones, tablet computers, laptop computers, desktop computers, wearable devices (such as smart watches and smart bracelets), smart home devices, Internet of Things devices, etc. The present application does not limit the specific form of the electronic device. For ease of description, the technical solution of the present application is introduced below using mobile phone 10 as an example.
[0037] For example, FIG1 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application.
[0038] As shown in Figure 1, mobile phone 10 includes a display module 20, a phone body 30, a mainboard 40, and at least one sub-board 50. In some embodiments, mainboard 10 is provided with a communication interface 41, a communication interface 42, and a processor 43. Sub-board 50 is provided with an active device 51 and a communication interface 52. Display module 20 is electrically connected to communication interface 41 via a flexible printed circuit (FPC) 91; sub-board 50 and mainboard 40 are electrically connected via FPC 92, which has one end connected to communication interface 42 and the other end connected to communication interface 52.
[0039] In some embodiments, the mainboard 40 is used to house the main functional components of the mobile phone 10, such as the processor 43, memory, etc., as well as communication interfaces for connecting to the sub-board, such as the communication interface 41 and the pass interface 42. In other embodiments, the mainboard 40 may also include other components related to the functions of the mobile phone 10, which are not limited here.
[0040] It can be understood that in some embodiments, when the communication interface 41 and the communication interface 42 are mobile industry processor interfaces (MIPI), the FPC 92 may include a data communication line MIPI_SDA for transmitting data and a clock communication line MIPI_CLK for transmitting a clock signal.
[0041] It is understandable that in other embodiments, the mainboard 40 may include more or fewer devices, which is not limited here.
[0042] The display module 20 may include a display screen, a display driver chip, a communication interface, etc. (not shown), and is configured to display images based on data sent from the mobile phone 10 via the FPC 91 .
[0043] It can be understood that the above-mentioned connection of the circuit module of the mobile phone 10 with an FPC is only an example. In other embodiments, the various circuit modules in the mobile phone 10 can also be connected through other connectors, such as wires, board-to-board (BTB) connectors, etc., which are not limited here.
[0044] The sub-board 50 may include a circuit module that implements any one or more functions in the mobile phone 10, such as an audio module, a sensor module, a mobile communication module, a display module, a camera module, a backlight module, etc.
[0045] In order to meet the needs of different users and the requirements of the area where the mobile phone 10 is located, for a sub-board 50 including the same type of circuit modules, the developer of the mobile phone 10 can obtain a sub-board 50 with different parameters (for example, using different devices, having different hardware parameters, having the same software parameters, etc.) by setting different devices or parameters in the circuit module.
[0046] For example, in some embodiments, when the circuit module included in the sub-board 50 is a camera module, lenses, cameras, and image sensors with different parameters can be placed high in the sub-board 50 to obtain camera modules with different shooting parameters (such as resolution, aperture range, magnification, etc.), so that camera modules with different shooting parameters can be used according to the specific model of the mobile phone 10 and the needs of the user of the mobile phone 10.
[0047] For another example, in some embodiments, when the circuit module included in the sub-board 50 is a mobile communication module, RF front-end devices with different parameters, such as a power amplifier (PA), an antenna switch, a filter, a duplexer, a low noise amplifier (LNA), etc., can be set in the mobile communication module to obtain a mobile communication module with different communication parameters (such as channel, network standard, frequency, bandwidth, etc.), so as to facilitate the use of mobile communication modules with different communication parameters according to the use area of the mobile phone 10.
[0048] To ensure that the processor 43 of the mobile phone 10 can distinguish between the sub-boards 50 with different parameters and load the corresponding driver for the sub-boards, in some embodiments, resistors can be provided on the main board and the sub-board to form a voltage divider circuit, and different voltage divider values can be set for sub-boards with different parameters including the same type of circuit modules to distinguish the sub-boards with different parameters.
[0049] Specifically, FIG2 shows a schematic diagram of setting a voltage divider circuit in a main board 40 and a sub-board 50 according to some embodiments of the present application.
[0050] As shown in FIG2 , a resistor R1 is provided on the mainboard 40, and a resistor R2 is provided on the sub-board 50. One end of the resistor R1 is connected to the power supply voltage (VCC), one end of the resistor R2 is connected to the ground (GND), and the other end of the resistor R1 and the other end of the resistor R2 are electrically connected via FPC L1. Furthermore, one end of the resistor R1 and the other end of the resistor R2 are connected to a general-purpose input / output (GPIO) pin of the processor 43, or are connected to an input / output (IO) pin of the processor 43 via an analog to digital converter (ADC), or are connected to a pin of the processor 43 with an analog to digital conversion function, so that the processor 43 can obtain the voltage divided value of the resistor R2.
[0051] In this way, the developer of the mobile phone 10 can adjust the voltage divider value of the resistor R2 detected by the processor 43 (for example, the resistance value of R2 / (the resistance value of R1+the resistance value of R2)) by setting resistors R2 with different resistance values in the sub-boards 50 with different parameters. Then, the processor 43 can distinguish the sub-boards 50 with different parameters according to the different detected voltage divider values and load matching drivers for the sub-boards 50 with different parameters.
[0052] However, in the embodiment shown in FIG2 , each sub-board must be provided with at least one resistor R2, and each sub-board 50 must be electrically connected to the main board 40 via at least one communication line (e.g., the aforementioned FPC L1) or one terminal block. This increases the number of connectors and the space occupied between the main board 40 and each sub-board 50, increases the development cost of the mobile phone 10, and is not conducive to the miniaturization of the mobile phone 10.
[0053] In view of this, an embodiment of the present application provides an electronic device, comprising a main board and at least one slave board. The developer of the electronic device can pre-set hardware identifiers (e.g., unique slave identities (USIDs)) corresponding to slave boards with different parameters in active devices (as first devices) on the slave boards. Thus, when the electronic device is started or detects a slave board connection, it can obtain the hardware identifier of the slave board from the active devices on the slave board through the communication interface between the main board and the slave board, and load a driver that matches the circuit module in the slave board based on the obtained hardware identifier.
[0054] For example, referring to FIG3 , the developer of the mobile phone 10 can pre-set the hardware identifiers corresponding to the sub-boards 50 with different parameters in the active device 51. When the mobile phone 10 is started or detects that the sub-board 50 is connected, it can obtain the hardware identifier of the sub-board 50 from the active device 51 through the communication interface 42, FPC 92, and communication interface 52 and load the driver program that matches the circuit module in the sub-board 50 based on the obtained hardware identifier.
[0055] In this way, developers do not need to distinguish between sub-boards with different parameters by setting up voltage divider circuits on the main board and the sub-board. Instead, they can distinguish between sub-boards with different parameters through hardware identifiers in active devices on the sub-boards. This can reduce the cost of the mobile phone 10, save the space occupied by the connecting devices between the main board and the sub-board in the mobile phone 10, and is conducive to the miniaturization of the mobile phone 10.
[0056] In addition, since the mobile phone 10 obtains the hardware identification of the sub-board through the communication interface between the main board and the sub-board, there is no need to occupy additional pins of the processor 43, so the processor 43 can connect to other devices or modules through more pins, which is conducive to enriching the types and quantities of devices that the processor 43 can connect to, thereby enriching the functions of the mobile phone 10.
[0057] It is understood that the active device 51 can be any device including a storage unit provided on the sub-board. The storage unit (e.g., register, volatile memory, non-volatile memory, latch, cache, etc.) in the active device can be used for hardware identification, including but not limited to RF chips (e.g., RF front-end chips), power management chips, power driver chips, processors, sensors, sensor driver chips, audio chips, camera driver chips, backlight driver chips, memories, etc. For ease of description, the following description takes the active device 51 as an antenna switch as an example.
[0058] It is understood that in some embodiments, the communication interface between the main board 40 and the sub-board 50 of the mobile phone 10 (such as the communication interface 41, the communication interface 42, etc.) can be any communication interface, including but not limited to MIPI, an integrated circuit bus (inter-integrated circuit, I2C) interface, an improved integrated circuit bus (I3C) interface, a camera serial interface (CSI), a display serial interface (DSI), an integrated circuit built-in audio (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a digital radio frequency (DigRF), a UniPro-M interface (an interface defined by the MIPI Alliance), etc. The types of communication interfaces are not limited in the embodiments of the present application. For ease of description, the following is an introduction taking the communication interface as MIPI as an example.
[0059] It can be understood that the hardware identifier is an arbitrary identifier that can be used to distinguish circuit modules with different parameters. In some embodiments, according to the MIPI RF front-end (mobile industry processor interface radio frequency front-end, MIPI RFFE) protocol specification requirements, RF front-end devices that meet the MIPI RFFE requirements, such as antenna switches, etc., usually have the function of configuring USID. Developers can configure the USID of the RF front-end device by writing the USID to the RF front-end device in advance or by connecting different levels to the USID configuration pin (as the first pin) of the RF front-end device. Therefore, in some embodiments, when the active device 51 is a device that meets the MIPI RFFE specification, the hardware identifier of the sub-board 50 can be the USID of the active device.
[0060] It is understandable that in other embodiments, the hardware identifier may be set in the active device in other forms, such as being stored in the active device through software transmission, hardware writing, etc.
[0061] For example, FIG4 shows a schematic diagram of an active device 51 according to some embodiments of the present application.
[0062] As shown in FIG4 , the active device 51 (antenna switch) includes 10 pins P1 , P1 , . . . , P10 .
[0063] Pins P1 and P2 are respectively used to connect the data communication line MIPI_SDA and the clock communication line MIPI_SCL of the FPC 91, and are respectively used to realize data transmission and clock synchronization between the active device 51 and the processor 43; Pin P4 is the input / output voltage (voltage input / output, VIO) pin of the active device 51, and is used to connect a reference voltage, such as VCC; Pins P9 and P10 are used for grounding; Pins P6, P7, P8 and P9 are respectively used to connect to the interfaces of different antennas, such as the interface RF1 of the first antenna, the interface RF2 of the second antenna, the interface RF3 of the third antenna, and the interface RF4 of the fourth antenna.
[0064] Pin P3 is connected to different voltage levels or left unconnected. When connected to different voltage levels or left unconnected, the USID sent by the active device to the processor 43 via the MIPI interface (e.g., via pin P1) is different. For example, when pin P3 is connected to a high voltage, e.g., the same voltage as pin P4, the USID sent by the active device 51 to the processor 43 is 0X6; when pin P3 is connected to a low voltage, e.g., connected to GND, the USID sent by the active device 51 to the processor 43 is 0X9; and when pin P3 is left unconnected, the USID sent by the active device 51 to the processor 43 is 0X7.
[0065] It can be understood that the active device 51 further includes a memory (not shown), such as a register, a cache, etc., and the memory is used to store different USIDs according to the access level of the pin P3.
[0066] Based on the active device 51 shown in FIG4 , developers can distinguish between sub-boards 50 with different parameters by connecting different voltage levels to the P3 pin of the active device 51 according to different parameters in the sub-board 50 .
[0067] For example, referring to Figure 5 , the electrical connection between the secondary board 40 and the main board 40 is established only via the FPC 92, the communication interface 42, and the communication interface 52. Assume that the mobile phone 10 can be sold and used in a first region and a second region, and that the first and second regions have different requirements for the parameters of the secondary board 50, such as different supported frequency bands. Therefore, the developer of the mobile phone 10 can connect the P3 pin of the active device 51 in the secondary board 50 sold and used in the first region to a low level (e.g., GND), while connecting the P3 pin of the active device 51 in the secondary board 50 sold and used in the second region to a high level (e.g., VCC). In this way, when the processor 43 of the mobile phone 10 detects the connection of a secondary board 50 or at startup, and if the secondary board connected to the main board 40 is the secondary board sold and used in the first region, it can obtain the hardware identifier (e.g., USID) = 0X6 through the communication interface 42 and load the driver program that matches the secondary board 50 (or the circuit module in the secondary board 50) sold and used in the first region. When the sub-board connected to the main board 40 is the sub-board 50 sold and used in the second region, the hardware identification (for example, USID) = 0X9 can be obtained through the communication interface 42, and a driver matching the sub-board 50 (or the circuit module in the sub-board 50) sold and used in the first region can be loaded.
[0068] In this way, compared with the method shown in Figure 2, there is no need to set resistors R1 and R2 respectively in the main board 40 and the sub-board 50, nor is there a need to connect resistors R1 and R2 through FPC L1, which can reduce production costs and reduce the space occupied by the connecting components between the main board 40 and the sub-board 50, which is conducive to the miniaturization of the mobile phone 10.
[0069] It can be understood that the aforementioned embodiments introduce the technical solution of the present application by taking the main board 40 as an example to load the driver for the sub-board 50. In other embodiments, the technical solution of the present application can also be applied to other scenarios, such as the scenario of loading a driver for another sub-board connected to a sub-board, which is not limited here.
[0070] For example, FIG. 6 shows a schematic diagram of the connection relationship among a main board 40 , a sub-board 50 ′, and a sub-board 70 according to some embodiments of the present application.
[0071] As shown in Figure 6 , compared to the sub-board 50 in the previous embodiment, the sub-board 50' further includes a processor 53 and a communication interface 54. The connection relationship between the main board 40 and the sub-board 50' can be referred to the embodiment shown in Figure 5 , and will not be further described here. The sub-board 70 includes active components 71 and a communication interface 72. An electrical connection can be established between the sub-board 70 and the sub-board 50' via the FPC 93, the communication interface 54, and the communication interface 72.
[0072] To meet the needs of different users or regional requirements for the parameters of the secondary board 70, the developer of the mobile phone 10 can configure different hardware identifiers for the secondary boards 70 with different parameters. For example, the USID configuration pin of the active device 71 can be connected to different voltage levels or left floating. Furthermore, upon detecting the connection of the secondary board 70, the processor 53 on the secondary board 50' or the processor 43 on the main board 40 can obtain the hardware identifier of the secondary board 70 from the active device 71. Based on the obtained hardware identifier, the driver program matching the circuit module on the secondary board 70 is then loaded.
[0073] Based on the embodiments shown in FIG. 2 to FIG. 6 , the embodiment of the present application further provides an electronic device 20 .
[0074] Specifically, FIG7 shows a schematic structural diagram of an electronic device 20 according to some embodiments of the present application.
[0075] As shown in FIG7 , the electronic device 20 includes a circuit board 21 and a circuit board 22 . The circuit board 21 and the circuit board 22 are electrically connected via a communication interface 23 .
[0076] A circuit module 211 is provided in the circuit board 21 , and the circuit module 211 includes a processor 212 .
[0077] The processor 212 may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a microprocessor (MCU), an artificial intelligence (AI) processor, a field programmable gate array (FPGA), an embedded controller (EC), or other processing modules or processing circuits. In some embodiments, different processing units may be independent devices or integrated into one or more processors.
[0078] In some embodiments, the processor 212 can be used to execute instructions to obtain the hardware identification in the active device 222 through the communication interface 23 when the electronic device 20 is started or when the circuit board 22 is detected to be connected, and load a matching driver for the circuit module 221 based on the obtained hardware identification.
[0079] The circuit module 211 may be any circuit module including the processor 212, such as an audio module, a sensor module, a mobile communication module, a display module, a camera module, a backlight module, or a circuit including the processor 212, which is not limited here.
[0080] The circuit board 22 is provided with a circuit module 221 , which includes an active device 222 . The active device 222 is configured with a hardware identifier corresponding to the parameters of the circuit module 221 .
[0081] It can be understood that the communication interface 23 can be the aforementioned MIPI, I2C interface, I3C interface, CSI, DSI, I2S interface, PCM interface, UART interface, DigRF interface, UniPort-M interface, etc., or any other communication interface, which is not limited here.
[0082] It can be understood that the circuit module 221 can be any circuit module including active devices, such as an audio module, a sensor module, a mobile communication module, a display module, a camera module, a backlight module, etc., which is not limited here.
[0083] It can be understood that the active device 222 can be any device that can store hardware identification, including but not limited to RF chips (such as RF front-end chips), power management chips, power driver chips, processors, sensors, sensor driver chips, audio chips, camera driver chips, backlight driver chips, etc.
[0084] It can be understood that the structure of the electronic device 20 shown in FIG7 is only an example. In other embodiments, the electronic device 20 may include more or fewer modules, or some modules may be split or combined, which is not limited here.
[0085] Based on the above-mentioned electronic device 20, developers do not need to distinguish sub-boards with different parameters by setting voltage divider circuits on the circuit board 21 and the circuit board 22. Instead, they distinguish sub-boards with different parameters through hardware identification in the active devices on the circuit board 22. This can reduce the cost of the electronic device 20, save the space occupied by the connecting devices between the circuit board 21 and the circuit board 22 in the electronic device 20, and is conducive to the miniaturization of the electronic device 20.
[0086] Based on the embodiments shown in Figures 2 to 7 , embodiments of the present application provide a driver loading method, which is applied to an electronic device including at least a first circuit board and a second circuit board, wherein the first circuit board and the second circuit board are electrically connected via a communication interface. For example, the aforementioned electronic device 20, mobile phone 10, etc.
[0087] Specifically, FIG8 shows a flowchart of a driver loading method according to some embodiments of the present application. As shown in FIG8 , the method includes the following steps:
[0088] S801: When the second circuit board is connected to the first circuit board, the processor obtains the hardware identification of the second circuit board from the active components of the second circuit board using the communication interface.
[0089] When detecting that the second circuit board is connected to the first circuit board, the processor uses the communication interface to obtain the hardware identification of the second circuit board from the active device of the second circuit board.
[0090] It can be understood that the processor is any processor in the electronic device, and the first circuit board and the second circuit board can be any circuit boards in the electronic device.
[0091] For example, for the scenarios shown in FIG. 3 and FIG. 5 , the processor may be the processor 43 of the mobile phone 10 , the first circuit board may be the main board 40 , and the second circuit board may be the sub-board 50 ;
[0092] For example, in the case shown in FIG. 6 , the processor may be the processor 43 or the processor 53 of the mobile phone 10 , the first circuit board may be the sub-board 50 ′, and the second circuit board may be the sub-board 70 ;
[0093] Exemplarily, for the situation shown in FIG. 7 , the processor may be the processor 212 of the electronic device 20 , the first circuit board may be the circuit board 21 , and the second circuit board may be the circuit board 22 .
[0094] S802: The processor determines whether the obtained hardware identification matches the first circuit board.
[0095] After obtaining the hardware identifiers of the active components on the second circuit board, the processor determines whether the obtained hardware identifiers match those of the first circuit board. If so, the second circuit board can be connected to the first circuit board and the process proceeds to step S803. Otherwise, the second circuit board cannot be connected to the first circuit board and the process proceeds to step S804.
[0096] It can be understood that in some embodiments, the electronic device can pre-store the hardware identification information of a circuit board that can be connected and used with the first circuit board, so that after the electronic device obtains the hardware identification of the second circuit board, it can determine that the obtained hardware identification matches the first circuit board when the hardware identification of the second circuit board exists in the pre-stored hardware identification information.
[0097] S803: The processor loads a matching driver for the circuit module in the second circuit board according to the acquired hardware identifier.
[0098] When the processor determines that the acquired hardware identification matches the first circuit board, the processor may load a matching driver for the circuit module in the second circuit board according to the acquired hardware identification.
[0099] For example, the electronic device may store driver programs corresponding to different hardware identifiers, and then the electronic device may query the corresponding driver program according to the obtained hardware identifier, and load the query driver program for the circuit module in the second circuit board.
[0100] S804: The processor prompts that the circuit board does not match.
[0101] When the processor determines that the obtained hardware identification does not match the first circuit board, it can prompt the operator through audio, video, vibration, powering off the second circuit board, etc. that the second circuit board does not match the first circuit board, so that the operator can replace the second circuit board.
[0102] Furthermore, FIG9 shows a schematic block diagram of a mobile phone 10 according to some embodiments of the present application.
[0103] As shown in Figure 9, the mobile phone 10 includes a main board 40, a wireless communication module sub-board 101, a mobile communication module sub-board 102, an audio module sub-board 103, a display module sub-board 104, a sensor module sub-board 105, a camera module sub-board 106, a power module sub-board 107 and a backlight module sub-board 108.
[0104] The motherboard 40 may include a processor 43 and other functional components of the mobile phone 10, such as a memory (not shown). The processor 43 may include one or more processing units, such as a processing module or processing circuit including a CPU, a GPU, a DSP, an MCU, an AI processor, an FPGA, or an EC. In some embodiments, the different processing units may be independent devices or integrated into one or more processors.
[0105] In some embodiments, the processor 43 can be used to execute instructions to obtain the hardware identification of the active device 222 on each sub-board through the communication interface when the mobile phone 10 is started or when it is detected that other sub-boards are connected to the main board, and load a matching driver for each sub-board based on the obtained hardware identification.
[0106] In some embodiments, the main board 40 can establish communication connections with other sub-boards through communication interfaces such as MIPI, I2C interface, I3C interface, CSI, DSI, I2S interface, PCM interface, UART interface, DigRF interface, UniPort-M interface, and obtain the stored hardware identification of the active devices on each sub-board through the communication interface.
[0107] In some embodiments, the memory provided on the mainboard 40 may include a program storage area and a data storage area. In some embodiments, the program storage area may store an operating system, an application required for at least one function, and the like. The data storage area may store data created during the use of the mobile phone 10. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), and the like. The processor 43 executes various functional applications of the mobile phone 10 by running instructions stored in the memory and / or instructions stored in the memory provided in the processor 43, such as obtaining hardware identifiers in active devices of each sub-board and loading drivers for each sub-board.
[0108] The wireless communication module sub-board 101 can be used to provide wireless communication solutions for the mobile phone 10, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module sub-board can be one or more devices integrating at least one communication processing module, and the active devices in the integrated modules or devices can be used to store the hardware identification corresponding to the mobile communication module that cannot be parameterized.
[0109] The wireless communication module sub-board 101 may include at least one active device such as a filter, a power amplifier, an LNA, an antenna switch, etc. These active devices may be used to store the hardware identification corresponding to the mobile communication module that cannot be parameterized.
[0110] In some embodiments, the wireless communication module sub-board 101 can establish an electrical connection with the main board 40 through a MIPI, DigRF interface, etc.
[0111] The mobile communication module sub-board 102 can be used to provide wireless communication solutions for the mobile phone 10, including 2G / 3G / 4G / 5G. The mobile communication module sub-board 102 can include at least one filter, a power amplifier, an LNA, an antenna switch, and other components. The antenna on the mobile communication module sub-board 102 can receive electromagnetic waves, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module sub-board 102 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via the antenna.
[0112] In some embodiments, the mobile communication module sub-board 102 may include radio frequency front-end devices such as an antenna switch, etc., for storing the hardware identification corresponding to the mobile communication module that cannot be parameterized.
[0113] In some embodiments, the mobile communication module sub-board 102 can establish an electrical connection with the main board 40 through a MIPI, DigRF interface, etc.
[0114] The audio module sub-board 103 may include modules or components for implementing the audio functions of the mobile phone 10, thereby converting digital audio information into analog audio signals. For example, the audio module sub-board 103 may integrate a speaker (also called a "speaker") for converting audio electrical signals into sound signals, a receiver (also called a "handset") for converting audio electrical signals into sound signals, a microphone (also called a "microphone") for converting sound signals into electrical signals, and an earphone jack for connecting a wired headset.
[0115] In some embodiments, the audio module sub-board 103 may include active devices such as an audio driver chip and an amplifier. These active devices may be used to store hardware identifiers corresponding to audio module sub-boards with different parameters.
[0116] In some embodiments, the audio module sub-board 103 can establish an electrical connection with the main board 40 through MIPI, I2S interface, Soundwire (an audio bus defined by the MIPI Alliance) interface, serial low-power inter-chip media bus (SLIMbus) interface, etc.
[0117] The display module sub-board 104 may include a display screen for displaying images, videos, etc. The display screen includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-LED, a micro-OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, the display module sub-board 104 may include one or N display screens 194, where N is a positive integer greater than one.
[0118] In some embodiments, the display module sub-board 104 may include active devices such as a display driver chip, which is used to store hardware identifications of display module sub-boards 104 with the same parameters.
[0119] It can be understood that in some embodiments, the display module sub-board 104 can establish an electrical connection with the main board 40 through MIPI, DSI, digital video port (DVP), etc.
[0120] The sensor module sub-board 105 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0121] In some embodiments, the pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor can be set on the display screen. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a device including at least two parallel plates with conductive material. When force acts on the pressure sensor, the capacitance between the electrodes changes. The mobile phone 10 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen, the mobile phone 10 detects the intensity of the touch operation based on the pressure sensor. The mobile phone 10 can also calculate the position of the touch based on the detection signal of the pressure sensor.
[0122] The accelerometer can detect the magnitude of the phone's acceleration in all directions (typically three axes). When the phone is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0123] The ambient light sensor senses ambient light brightness. Phone 10 can adaptively adjust the display brightness based on the perceived ambient light level. The ambient light sensor can also be used to automatically adjust the white balance when taking photos. The ambient light sensor can also work in conjunction with the proximity sensor to detect whether the phone 10 is in a pocket, preventing accidental touches.
[0124] The fingerprint sensor is used to collect fingerprints. The mobile phone 10 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.
[0125] A touch sensor, also known as a "touch control device," can be located on a display screen. The touch sensor and the display screen together form a touch screen, also known as a "touch screen." The touch sensor is used to detect touch operations applied to or near the touch sensor. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen. In other embodiments, the touch sensor can also be located on the surface of the mobile phone 10, in a location different from that of the display screen.
[0126] The bone conduction sensor can acquire vibration signals. In some embodiments, the bone conduction sensor can acquire vibration signals from vibrating bones in the human body. The bone conduction sensor can also contact the human pulse to receive blood pressure signals.
[0127] In some embodiments, the sensor module sub-board 105 may further include a driver chip corresponding to each sensor. The driver chip or each sensor may be used to store hardware identifications of the sensor module sub-board 105 corresponding to different parameters.
[0128] In some embodiments, the sensor module sub-board 105 can establish an electrical connection with the main board 40 through a MIPI, an I2C interface, an I3C interface, etc.
[0129] It is understood that in some embodiments, since different sensors are arranged at different positions of the mobile phone 10, one or more sensors in the sensor module sub-board 105 can be split into multiple sub-boards according to the installation positions of the sensors.
[0130] The camera module sub-board 106 may include at least one camera (also known as a lens) for capturing still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then passed to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format such as RGB or YUV.
[0131] In some embodiments, the camera module sub-board 106 may further include a processor such as an ISP and a DSP for storing hardware identifiers corresponding to camera module sub-boards with different parameters.
[0132] In some embodiments, the camera module sub-board 106 can establish an electrical connection with the main board 40 via MIPI, CSI, DVP, etc.
[0133] The power module sub-board 107 may include a power management chip, a battery, etc., and is used to supply power to various modules of the mobile phone 10 .
[0134] In some embodiments, the power management chip or other active devices provided on the power module sub-board 107 can be used to store hardware identifiers corresponding to power module sub-boards with different parameters (eg, different charging powers, different power management chips).
[0135] The backlight module sub-board 108 may include a backlight driver chip (eg, a light-emitting diode driver chip), a backlight source, etc., for providing backlight for the display screen of the mobile phone 10 .
[0136] In some embodiments, the backlight driver chip or other active devices in the backlight module sub-board 108 can be used to store hardware identifiers corresponding to the backlight module sub-board 108 with different parameters.
[0137] It is understandable that in other embodiments, the mobile phone 10 may include more or fewer modules, and may combine or split some modules, which is not limited here.
[0138] It can be understood that the above-mentioned interface between each sub-board and the main board 40 is only an example. In other embodiments, each sub-board can also be connected to the main board through other communication interfaces, which is not limited here.
[0139] It should be understood that the structure of the mobile phone 10 shown in the embodiment of the present application does not constitute a specific limitation on the mobile phone 10. In other embodiments of the present application, the mobile phone 10 may include more or fewer components than shown, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0140] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0141] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0142] Program code can be implemented with a high-level programming language or an object-oriented programming language to communicate with the processing system. Where necessary, program code can also be implemented in assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0143] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to floppy disks, optical disks, compact disc read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Accordingly, machine-readable media includes any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).
[0144] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of a structural or method feature in a particular figure does not imply that such feature is required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.
[0145] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems raised by this application. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units / modules that are not closely related to solving the technical problems raised by this application. This does not mean that other units / modules do not exist in the above-mentioned device embodiments.
[0146] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "including a" does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0147] It should be noted that, in the embodiments of the present application, “electrically connected to”, “connected to”, and “connected to” may be a direct connection or an indirect connection.
[0148] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0149] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An electronic device, characterized in that: The electronic device comprises a first circuit board and a second circuit board; wherein, The first circuit board includes a first device, the first device includes a storage unit, and the storage unit stores a hardware identification of the first circuit board; The second circuit board includes a processing unit, and the processing unit is used to obtain the hardware identification from the storage unit, and load a driver matching the hardware identification for the first circuit board based on the hardware identification.
2. The electronic device according to claim 1, characterized in that: The first circuit board is a sub-board of the electronic device, and the second circuit board is a main board of the electronic device.
3. The electronic device according to claim 1, characterized in that: The first device includes at least one of the following devices: a radio frequency chip, a power management chip, a power driver chip, a processor, a sensor, a sensor driver chip, an audio chip, a camera driver chip, and a backlight driver chip. The electronic device according to claim 3 , wherein the storage unit comprises at least one of a register, a cache, and a latch.
5. The electronic device according to claim 1, characterized in that: The hardware identification is determined based on parameters of a circuit module in the first circuit board.
6. The electronic device according to claim 5, characterized in that: The first device includes a first pin, and the hardware identifier is stored in the memory by inputting a voltage corresponding to the parameter of the circuit module to the first pin.
7. The electronic device according to claim 6, characterized in that: The hardware identification is inputted into the first pin and stored in the memory at a level corresponding to the parameter of the circuit module, including: When the parameter of the circuit module is a first parameter, inputting a first voltage to the first pin; When the parameter of the circuit module is a second parameter, a second voltage is input to the first pin.
8. The electronic device according to any one of claims 1 to 7, characterized in that: The first circuit board and the second circuit board establish a communication connection via a communication interface, and the processing unit obtains the hardware identification from the storage unit via the communication interface.
9. The electronic device according to claim 8, characterized in that: The communication interface includes any one of the following communication interfaces: mobile industry processor interface, integrated circuit bus interface, improved integrated circuit bus interface, camera serial interface, display serial interface, integrated circuit built-in audio interface, pulse code modulation interface, universal asynchronous receiver and transmitter interface, digital radio frequency interface.
10. A driver loading method, characterized in that: The electronic device according to any one of claims 1 to 9; and The method comprises: The processing unit obtains the hardware identification of the first circuit board from the storage unit; The processor loads a driver program matching the first circuit board based on the hardware identification.
11. A readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed by the electronic device, the electronic device implements the driver loading method according to claim 10.
Citation Information
Patent Citations
Method and device for identifying loudspeakers, circuit board and terminal
CN105228074A
Control method and system suitable for garden electric tool
CN107015510A
Electronic device and hardware configuration method and device thereof
CN110795153A
Circuit board, electronic equipment and signal processing method and device
CN113489504A
Intelligence lock circuit board of a plurality of fingerprint head sensors of joinable
CN205722063U
