CN116226020A - Control method, device, equipment and storage medium of DP and USB interface - Google Patents

Control method, device, equipment and storage medium of DP and USB interface Download PDF

Info

Publication number
CN116226020A
CN116226020A CN202310231662.9A CN202310231662A CN116226020A CN 116226020 A CN116226020 A CN 116226020A CN 202310231662 A CN202310231662 A CN 202310231662A CN 116226020 A CN116226020 A CN 116226020A
Authority
CN
China
Prior art keywords
usb
usb interface
interface
description file
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310231662.9A
Other languages
Chinese (zh)
Inventor
韩萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Fibocom Wireless Software Inc
Original Assignee
Xian Fibocom Wireless Software Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Fibocom Wireless Software Inc filed Critical Xian Fibocom Wireless Software Inc
Priority to CN202310231662.9A priority Critical patent/CN116226020A/en
Publication of CN116226020A publication Critical patent/CN116226020A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Information Transfer Systems (AREA)

Abstract

The application is applicable to the technical field of data transmission, and particularly discloses a control method, a device, equipment and a storage medium of a DP and a USB interface, wherein a DP equipment tree description file and a USB equipment tree description file are respectively built in equipment tree description files by aiming at a module selected by the DP and the USB interface in advance, and at least one of the DP equipment tree description file and the USB equipment tree description file is added with an attribute shielding field of the other interface so as to realize a loading mode of covering the equipment tree description files; after the equipment system is powered on, the default starting flow of the DP and USB interface alternative module is controlled to enter, after normal starting, the corresponding interface control operation is switched to according to the access signal of the peripheral interface corresponding to the DP and USB interface alternative module, so that the function decoupling and co-decoupling of the DP interface and the USB interface in the DP and USB interface alternative architecture are realized, and the effect that the functions of the DP and the USB interface are complete and independent under the condition of sharing a signal line and the co-power condition is achieved.

Description

Control method, device, equipment and storage medium of DP and USB interface
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a method, an apparatus, a device, and a storage medium for controlling DP and USB interfaces.
Background
The DisplayPort (abbreviated as DP interface) is a high-definition digital display interface standard, and uses DP transmission protocol to connect audio source, video source and display, and also supports universal serial bus (Universal Serial Bus, abbreviated as USB) and other forms of data transmission. The conventional video graphics array (Video Graphics Array, VGA for short), digital video interface (Digital Visual Interface, DVI for short) and video serial communication interface (Flat Panel Display Link, FPD-Link for short) are being gradually replaced by the DP interface, and the DP interface can be backward compatible with the conventional interface.
The DP display signal line of some intelligent modules today can realize the display function by sharing the USB signal line, specifically, a two-in-one switch chip is used to switch the signal supply of the USB interface and the DP interface, and the DP interface adopts the communication signal channel of the USB when performing data communication.
FIG. 1 is a circuit diagram of a conventional DP and USB alternative switch module; fig. 2 is a circuit diagram of a conventional DP and USB power supply principle.
As shown in fig. 1, the first terminal of the alternative switch chip U1 is connected to the device processor, and is a communication signal channel of USB3.0, and includes a transmit signal pin ss_tx0_ P, SS _tx0_ M, SS _tx1_ P, SS _tx1_m and a receive signal pin ss_rx0_ P, SS _rx0_ M, SS _rx1_ P, SS _rx1_m, and the alternative switch chip is controlled to switch the signal channel through the USB3.0 chn_sel signal pin. The second end of the switch chip U1 is connected to the DP interface and the USB interface, respectively, wherein the pins connected to the DP interface include a transmit signal pin dp_usb0_ss_tx0_ P, DP _usb0_ss_tx0_ M, DP _usb0_ss_tx1_ P, DP _usb0_ss_tx1_m and a receive signal pin dp_usb 0_ss_x0_ P, DP _usb 0_ss_x0_ M, DP _usb 0_ss_s1_ P, DP _usb 0_ss_s1_m, and the pins connected to the USB interface include a transmit signal pin evb_usb 0_ss_x0_ P, EVB _usb 0_ss_ss_tx 0_s39_usb 0_ss_tx 1_823_usb 0_ss_ss_tx 1_usb 0_tx 1_b_b and a receive signal pin evb_usb 0_ss_s0_ P, EVB _usb0_ss_ M, DP _usb 0_ss_0_x0_ P, DP _ss_0_s0_s0_ M, EVB _s0_s1_s1_s1_s1_p_s1_m. Although the DP and the USB multiplex one USB communication signal channel of the device, the problem of uncontrollable preemption exists due to the coupling of the DP and the USB functions.
Meanwhile, in order to realize the power supply control of the architecture of the DP and USB interfaces, as shown in fig. 1 and 2, taking the SC138 item as an example, the power supply chip U2 may use the SGM6014 and use vreg_l15a_3p128 as the reference voltage, and realize the 3.3V power supply of the DP module and the USB3.0 module by controlling the level of a single general purpose input/output port (General Purpose Input Output, abbreviated as GPIO) (such as PM6125_gpio_2 in fig. 2). At this time, there is a problem of coupling of power supply functions between the DP and the USB. In the examples given in fig. 1 and 2, the power supply pin of the alternative switch chip U1 is controlled by the DP interface driver, and the power-on and power-off logic is as follows: the USB interface is powered on when the USB flash disk system is started, the display screen is powered off when the display screen is stopped, and the USB interface is powered on when the display screen is started, so that the USB flash disk system cannot wake up when the USB flash disk system is started in the state of stopping the display screen, or the USB flash disk which is transmitting data is lost after the display screen is stopped, namely the power supply of the alternative switch is powered off when the USB flash disk system is stopped in the state of stopping the display screen, and the USB interface cannot work normally. Otherwise, if the power supply strategy of the USB is adopted, the power supply function of the DP interface is limited.
Therefore, the existing architecture of alternative DP and USB interfaces has the problems of functional coupling and power supply coupling, and the functions of the two interfaces are mutually interfered when the interfaces are used, so that all functions as can be realized by the independent DP interface and the independent USB interface can not be realized, and bad experience is brought to users.
How to realize functional decoupling and co-decoupling of alternative architectures of the DP and the USB interfaces is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a control method, a device, equipment and a storage medium of a DP and USB interface, which are used for realizing functional decoupling and co-decoupling of an alternative architecture of the DP and the USB interface.
In order to solve the above technical problems, the present application provides a control method for DP and USB interfaces, including:
a DP device tree description file and a USB device tree description file are respectively established in the device tree description file of the device aiming at the DP and USB interface alternative module in advance;
after the equipment system is electrified, controlling a default starting flow of the DP and USB interface alternative module;
checking access signals of peripheral interfaces corresponding to the DP and USB interface alternative modules; if the access signal of the DP interface is detected, the DP equipment tree description file is called to execute the DP interface control operation; if the access signal of the USB interface is detected, the USB equipment tree description file is called to execute the USB interface control operation;
and the DP equipment tree description file comprises a USB resource attribute shielding field for the DP and USB interface alternative module, and/or the USB equipment tree description file comprises a DP resource attribute shielding field for the DP and USB interface alternative module.
Optionally, the power supply pin of the module with the alternative DP and USB interface is driven and controlled by the DP interface;
correspondingly, the default starting flow is the DP interface control operation.
Optionally, the power supply pin of the module with the DP and the USB interface is driven and controlled by the USB interface;
correspondingly, the default starting flow is the USB interface control operation.
Optionally, the control enters a default start-up procedure of the optional module of the DP and the USB interface, which specifically includes:
applying for a power control GPIO of the module with the DP and the USB interface selected from the two;
and analyzing the equipment tree description file corresponding to the alternative module of the DP and the USB interface to generate GPIO operation variables shared by the DP and the USB.
Optionally, executing the DP interface control operation specifically includes:
if the display screen of the equipment is detected to be in a display state, controlling a power supply pin of the module with the DP and the USB interface to be in a power-on state;
and if the display screen is detected to be in the screen-off state, controlling the power supply pin of the module with the DP and the USB interface to be powered down.
Optionally, the USB interface control operation is executed, specifically:
and controlling the power supply pin of the module with the DP and the USB interface to keep a power-on state.
Optionally, a power management controller applied to the device.
In order to solve the above technical problem, the present application further provides a control device for DP and USB interfaces, including:
the deployment unit is used for respectively establishing a DP device tree description file and a USB device tree description file in the device tree description file of the device aiming at the DP and USB interface alternative module in advance;
the power-on control unit is used for controlling a default starting flow of the DP and USB interface alternative module after the equipment system is electrified;
the switching control unit is used for checking the access signals of the peripheral interfaces corresponding to the DP and USB interface alternative module; if the access signal of the DP interface is detected, the DP equipment tree description file is called to execute the DP interface control operation; if the access signal of the USB interface is detected, the USB equipment tree description file is called to execute the USB interface control operation;
and the DP equipment tree description file comprises a USB resource attribute shielding field for the DP and USB interface alternative module, and/or the USB equipment tree description file comprises a DP resource attribute shielding field for the DP and USB interface alternative module.
In order to solve the above technical problem, the present application further provides a control device for DP and USB interfaces, including:
a memory for storing a computer program;
a processor for executing the computer program, which when executed by the processor implements the steps of the control method of the DP and USB interfaces as described in any one of the above.
To solve the above technical problem, the present application further provides a storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the control method of the DP and USB interfaces according to any one of the above.
According to the control method for the DP and the USB interface, the DP device tree description file and the USB device tree description file are respectively built in the device tree description file of the device according to the DP and USB interface alternative module in advance, and at least one attribute shielding field for the other interface is added in the DP device tree description file and the USB device tree description file, so that a loading mode of covering the device tree description file is realized; after the equipment system is electrified, firstly controlling a default starting flow of the DP and the USB interface alternative module, checking an access signal of a peripheral interface corresponding to the DP and the USB interface alternative module after the DP and the USB interface alternative module are normally started, and calling a DP equipment tree description file to execute a DP interface control operation if the DP interface is accessed; and if the USB interface is accessed, invoking the USB equipment tree description file to execute USB interface control operation. Therefore, the control method of the DP and the USB interface realizes functional decoupling and co-decoupling of the DP interface and the USB interface in the architecture with the alternative DP and the USB interface, and achieves the effect that the DP and the USB interface have complete and independent functions and are not coupled under the condition of sharing a signal line and the condition of sharing electricity.
The application further provides a control device, equipment and storage medium of the DP and USB interface, which have the beneficial effects and are not repeated here.
Drawings
For a clearer description of embodiments of the present application or of the prior art, the drawings that are used in the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description that follow are only some embodiments of the present application, and that other drawings may be obtained from these drawings by a person of ordinary skill in the art without inventive effort.
FIG. 1 is a circuit diagram of a conventional DP and USB alternative switch module;
FIG. 2 is a circuit diagram of the conventional DP and USB power supply principle;
FIG. 3 is a flowchart of a control method for DP and USB interfaces according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a control device for DP and USB interfaces according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a control device for DP and USB interfaces according to an embodiment of the present application.
Detailed Description
The core of the application is to provide a control method, a device, equipment and a storage medium of a DP and USB interface, which are used for realizing functional decoupling and co-decoupling of a DP and USB interface alternative architecture.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Example 1
Fig. 3 is a flowchart of a control method of DP and USB interfaces according to an embodiment of the present application.
As shown in fig. 3, the control method for DP and USB interfaces provided in the embodiment of the present application includes:
s301: and respectively establishing a DP device tree description file and a USB device tree description file in the device tree description file of the device aiming at the DP and USB interface alternative module in advance.
S302: after the equipment system is powered on, the control enters a default starting flow of the optional module of the DP and the USB interface.
S303: checking access signals of peripheral interfaces corresponding to the DP and the USB interface alternative module; if the access signal of the DP interface is detected, the DP equipment tree description file is called to execute the DP interface control operation; and if the access signal of the USB interface is detected, invoking the USB equipment tree description file to execute the USB interface control operation.
The DP device tree description file contains a USB resource attribute shielding field for the module with the alternative DP and USB interface, and/or the USB device tree description file contains a DP resource attribute shielding field for the module with the alternative DP and USB interface.
In a specific implementation, the control method of the DP and USB interface provided in the embodiments of the present application may be implemented based on an existing DP and USB interface alternative hardware architecture as shown in fig. 1 and fig. 2, and may be specifically applied to a power management controller (Power management controller, PMC) of a device where the DP and USB interface are located. The USB in the embodiment of the present application may specifically refer to USB 3.0.
For S301, to implement functional decoupling of DP and USB corresponding to the optional module of the DP and USB, first, device tree description files (Device Tree Source, DTS) of DP and USB in the optional module of the DP and USB are stripped, and resource configuration DTSs of DP and USB are respectively built in a main DTS of the device, and shielding between the DP interface and the USB interface is implemented by adopting a recording mode of covering the DTSs. When the power management controller detects that the peripheral interfaces corresponding to the DP and the USB interface alternative module are accessed by equipment, the corresponding equipment tree description file is called and analyzed, and when a shielding field (flag attribute) is obtained through analysis, attribute shielding of the other peripheral interface is realized, and functional interference and power supply interference of the other peripheral interface to the current peripheral interface are avoided.
Specifically, the USB resource attribute mask field of the optional module of the DP and the USB interface may be added only in the DP device tree description file, so that the USB function may be normally used only when the USB interface has device access in the peripheral interface corresponding to the optional module of the DP and the USB interface, and the DP function may be normally used only when the DP peripheral interface has device access.
Or, the DP resource attribute mask field of the module selected by the DP and the USB interface may be added to the USB device tree description file, so that the DP function can be normally used when only the DP peripheral interface has device access in the peripheral interfaces corresponding to the module selected by the DP and the USB interface, and the USB function can be normally used as long as the USB peripheral interface has device access.
Or, a USB resource attribute shielding field of the optional module of the DP and the USB interface can be added in the DP device tree description file, and a DP resource attribute shielding field of the optional module of the DP and the USB interface can be added in the USB device tree description file, so that in a peripheral interface corresponding to the optional module of the DP and the USB interface, the function of one of the DP peripheral interface and the USB peripheral interface which is accessed later can be normally used, and the function decoupling of the DP and the USB is realized.
For S302, a default startup procedure is set in the device tree description file corresponding to the optional module of the DP and USB interface in advance. In the conventional DP and USB interface alternative architecture of fig. 1 and 2 described in the background section of the present application, the default start-up procedure corresponding to the DP and USB interface alternative module is a DP start-up procedure, that is, the control of the DP and USB interface alternative module is performed according to the logic that the power is turned on when the power is turned on, the power is turned off when the display screen is turned off, and the power is turned on when the display screen is turned on. In the control method of the DP and USB interface provided in the embodiments of the present application, the default startup procedure may be a DP startup procedure or a USB startup procedure, and the default startup procedure may be distinguished according to the power driving adopted.
S302: the default starting process for controlling to enter the DP and USB interface alternative module can specifically include:
applying for a power control GPIO of a module selected from the DP and the USB interface;
and analyzing the equipment tree description file corresponding to the optional module of the DP and the USB interface to generate GPIO operation variables shared by the DP and the USB.
In the default starting flow, the equipment kernel checks the equipment tree description file of the power supply GPIO to analyze, and generates a GPIO operation variable shared by the DP and the USB for realizing the switching control of the DP and the USB interface module. At this time, according to the hot plug attribute of the peripheral interface of the device, when the device is connected to the DP interface or the device is connected to the USB interface, the interrupt is triggered, the corresponding device tree description file is analyzed, and if the resource attribute shielding field is identified, the shielding of the attribute to be shielded is realized.
According to the control method of the DP and the USB interface, provided by the embodiment of the application, by covering the equipment tree description file, the shared variable and the scheme of interrupt triggering power supply and depending on the Linux equipment tree flow, the effect that the DP and the USB are complete and independent in function and have no coupling under the conditions of shared signal lines and shared electricity is achieved by improving the power supply loading flow of the DP and the USB.
And for S303, if the DP peripheral interface access device corresponding to the module selected by the DP and the USB interface is detected and identified by the power management controller, an interrupt is triggered, and the DP peripheral interface is successfully powered on. If the insertion detection and identification of the USB peripheral interface access equipment corresponding to the DP and the USB interface alternative module are executed by the power management controller, the interrupt is triggered, and the USB interface is successfully powered on.
The DP interface control operation and the USB interface control operation may both adopt a control manner of powering up and powering down along with the plugging of the device, or may adopt different power supply control manners.
For example, performing the DP interface control operation in S303 may specifically include:
if the display screen of the equipment is detected to be in a display state, controlling a power supply pin of the alternative module of the DP and the USB interface to be in a power-on state;
and if the display screen is detected to be in the screen-off state, controlling the power supply pin of the module with the DP and the USB interface to be powered down.
Alternatively, depending on whether the state of the DP peripheral interface is the disconnected state or the connected state, the control method comprises the steps that the control GPIO is pulled down by 3.3V to be powered down when the DP peripheral interface is in a disconnection state, and the control GPIO is pulled up by 3.3V to be powered up when the DP peripheral interface is in a connection state.
Because the default starting flow is already performed at this time, the power-on and power-off of the DP peripheral interface corresponding to the optional module of the DP and the USB interface are controlled only according to the on-off signal of the display screen, so that the energy-saving effect is realized.
In S303, the USB interface control operation may be specifically:
and controlling the power supply pin of the optional module of the DP and the USB interface to keep a power-on state.
When the USB of the module with the DP and the USB interface is in operation, the power-on state is always kept, and the phenomenon that the USB flash disk does not respond or data transmission is interrupted is avoided. In particular, depending on whether the state of the USB peripheral interface is a disconnected or connected state, the control method comprises the steps that when the USB peripheral interface is in a disconnection state, the control GPIO is powered down by 3.3V, and when the USB peripheral interface is in a connection state, the control GPIO is powered up by 3.3V.
After the execution of S302, the step of checking the access signal of the peripheral interface corresponding to the module selected by the DP and the USB interface in S301 may be circularly executed, and switching to the corresponding interface control operation according to the type of the access signal; it is also possible to return to S302 to determine whether the device is started for the first time after S303 is performed once, to select whether to perform the default startup procedure or S303.
According to the control method for the DP and the USB interface, the DP device tree description file and the USB device tree description file are respectively built in the device tree description file of the device according to the DP and USB interface two-choice module in advance, and at least one of the DP device tree description file and the USB device tree description file is added with an attribute shielding field for the other interface, so that a loading mode of covering the device tree description file is realized; after the equipment system is electrified, firstly controlling a default starting flow of the DP and the USB interface alternative module, checking an access signal of a peripheral interface corresponding to the DP and the USB interface alternative module after the DP and the USB interface alternative module are normally started, and calling a DP equipment tree description file to execute a DP interface control operation if the DP interface is accessed; and if the USB interface is accessed, invoking the USB equipment tree description file to execute USB interface control operation. Therefore, the control method of the DP and the USB interface realizes functional decoupling and co-decoupling of the DP interface and the USB interface in the architecture with the alternative DP and the USB interface, and achieves the effect that the DP and the USB interface have complete and independent functions and are not coupled under the condition of sharing a signal line and the condition of sharing electricity.
Example two
Based on the above embodiments, in the control method for the DP and USB interface provided in the embodiments of the present application, if the power supply pin of the module selected by the DP and USB interface is controlled by the DP interface, the default start flow is the DP interface control operation.
In a specific implementation, reference may be made to the hardware architecture of the DP and USB interface optional module shown in fig. 1 and fig. 2 and the corresponding circuit driven by the DP interface to control power on and power off, that is, the hardware circuit of the DP and USB interface optional module may not be modified, and functional decoupling and common decoupling of the DP and USB in the case of sharing signal lines and common electricity may be implemented only by changing the power supply loading flow of the DP and USB in the Linux device tree flow.
After the equipment system is electrified, analyzing an equipment tree description file of the alternative module of the DP and the USB interface, applying for a power control GPIO of the alternative module of the DP and the USB interface, generating GPIO operation variables shared by the DP and the USB for the alternative module of the DP and the USB interface, judging whether the equipment is started for the first time (namely, whether the equipment is started or not), and if so, determining whether the equipment tree description file of the DP takes effect or not by detecting a plug signal of the DP interface; if yes, entering a DP starting flow, pulling up 3.3V by a power control GPIO, and if not, entering a USB starting flow; if the device is not started for the first time, determining whether to execute the DP interface control operation or the USB interface control operation according to the plug signal of the DP interface and the plug signal of the USB interface.
The control method of the DP and the USB interface provided by the embodiment of the application provides a control scheme suitable for the DP and the USB interface alternative module based on the DP interface drive control, and functional decoupling and common decoupling of the DP and the USB under the conditions of sharing a signal line and common electricity can be realized without modifying a hardware circuit of the existing DP and the USB interface alternative module.
Example III
Based on the above embodiment, in the control method for the DP and the USB interface provided in the embodiments of the present application, if the power supply pin of the module selected by the DP and the USB interface is controlled by the USB interface driver, the default start flow is the USB interface control operation.
In a specific implementation, reference may be made to the hardware architecture of the DP and USB interface one-out-of-two module shown in fig. 1, where all power supply pins of the one-out-of-two switch chip U1 are controlled by the USB interface driver. Under the hardware architecture, the functional decoupling and the common decoupling of the DP and the USB under the common signal line and the common electricity condition can be realized by changing the power supply loading flow of the DP and the USB in the Linux equipment tree flow.
After the equipment system is electrified, analyzing an equipment tree description file of the DP and USB interface alternative module, applying for a power control GPIO of the DP and USB interface alternative module, generating a GPIO operation variable shared by the DP and the USB for the DP and USB interface alternative module, then judging whether the equipment is started for the first time (namely, whether the equipment is started or not), if so, determining whether the equipment tree description file of the USB takes effect or not by detecting a plug signal of the USB interface; if yes, entering a USB starting flow, pulling up 3.3V by a power control GPIO, and if not, entering a DP starting flow; if the device is not started for the first time, determining whether to execute the DP interface control operation or the USB interface control operation according to the plug signal of the DP interface and the plug signal of the USB interface.
The control method of the DP and the USB interface provided by the embodiment of the application provides a control scheme suitable for the DP and the USB interface alternative module based on USB interface drive control, and functional decoupling and common decoupling of the DP and the USB under the conditions of sharing a signal line and common electricity can be realized without modifying a hardware circuit of the existing DP and the USB interface alternative module.
Various embodiments corresponding to the control methods of the DP and the USB interface are described in detail above, and on the basis of the embodiments, the present application also discloses a control device, a device and a storage medium of the DP and the USB interface corresponding to the methods.
Example IV
Fig. 4 is a schematic structural diagram of a control device for DP and USB interfaces according to an embodiment of the present application.
As shown in fig. 4, the control device for DP and USB interfaces provided in the embodiment of the present application includes:
a deployment unit 401, configured to pre-establish a DP device tree description file and a USB device tree description file in the device tree description file of the device for the DP and USB interface optional module, respectively;
the power-on control unit 402 is configured to control a default start-up procedure for entering the DP and USB interface alternative module after the device system is powered on;
a switching control unit 403, configured to check an access signal of a peripheral interface corresponding to the optional module of the DP and the USB interface; if the access signal of the DP interface is detected, the DP equipment tree description file is called to execute the DP interface control operation; if the access signal of the USB interface is detected, the USB equipment tree description file is called to execute the USB interface control operation;
the DP device tree description file contains a USB resource attribute shielding field for the module with the alternative DP and USB interface, and/or the USB device tree description file contains a DP resource attribute shielding field for the module with the alternative DP and USB interface.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
Example five
Fig. 5 is a schematic structural diagram of a control device for DP and USB interfaces according to an embodiment of the present application.
As shown in fig. 5, the control device for DP and USB interfaces provided in the embodiment of the present application includes:
a memory 510 for storing a computer program 511;
a processor 520 for executing a computer program 511, which computer program 511 when executed by the processor 520 implements the steps of the control method of the DP and USB interfaces according to any of the embodiments described above.
Processor 520 may include one or more processing cores, such as a 3-core processor, an 8-core processor, etc., among others. The processor 520 may be implemented in at least one hardware form of digital signal processing DSP (Digital Signal Processing), field programmable gate array FPGA (Field-Programmable Gate Array), programmable logic array PLA (Programmable Logic Array). Processor 520 may also include a main processor, which is a processor for processing data in an awake state, also referred to as central processor CPU (Central Processing Unit), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 520 may be integrated with an image processor GPU (Graphics Processing Unit), a GPU for use in responsible for rendering and rendering of the content required for display by the display screen. In some embodiments, the processor 520 may also include an artificial intelligence AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 510 may include one or more storage media, which may be non-transitory. Memory 510 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 510 is at least used for storing a computer program 511, where the computer program 511, after being loaded and executed by the processor 520, can implement relevant steps in the control method of the DP and USB interfaces disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 510 may further include an operating system 512, data 513, and the like, where the storage manner may be transient storage or permanent storage. The operating system 512 may be Windows. The data 513 may include, but is not limited to, data related to the methods described above.
In some embodiments, the control device of the DP and USB interfaces may further include a display 530, a power supply 540, a communication interface 550, an input-output interface 560, a sensor 570, and a communication bus 580.
Those skilled in the art will appreciate that the configuration shown in fig. 5 does not constitute a limitation of the control devices of the DP and USB interfaces, and may include more or less components than those illustrated.
The control device for the DP and USB interface provided in the embodiment of the present application includes a memory and a processor, where the processor can implement the control method for the DP and USB interface as described above when executing a program stored in the memory, and the effects are the same as above.
Example six
It should be noted that the apparatus and device embodiments described above are merely exemplary, and for example, the division of modules is merely a logic function division, and there may be other division manners in actual implementation, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms. The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
The integrated modules may be stored in a storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. With such understanding, the technical solution of the present application, or a part contributing to the prior art or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, performing all or part of the steps of the method described in the various embodiments of the present application.
To this end, the embodiments of the present application also provide a storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the control method, such as DP and USB interfaces.
The storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (ram) RAM (Random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The computer program included in the storage medium provided in this embodiment can realize the steps of the control method of the DP and USB interfaces as described above when executed by the processor, and the same effects are achieved.
The above describes in detail a control method, device, equipment and storage medium for DP and USB interfaces provided in the present application. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. The apparatus, device and storage medium disclosed in the embodiments are relatively simple to describe, and the relevant parts refer to the description of the method section since they correspond to the methods disclosed in the embodiments. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the claims of the present application.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A control method for DP and USB interfaces, comprising:
a DP device tree description file and a USB device tree description file are respectively established in the device tree description file of the device aiming at the DP and USB interface alternative module in advance;
after the equipment system is electrified, controlling a default starting flow of the DP and USB interface alternative module;
checking access signals of peripheral interfaces corresponding to the DP and USB interface alternative modules; if the access signal of the DP interface is detected, the DP equipment tree description file is called to execute the DP interface control operation; if the access signal of the USB interface is detected, the USB equipment tree description file is called to execute the USB interface control operation;
and the DP equipment tree description file comprises a USB resource attribute shielding field for the DP and USB interface alternative module, and/or the USB equipment tree description file comprises a DP resource attribute shielding field for the DP and USB interface alternative module.
2. The control method of the DP and USB interfaces according to claim 1, wherein the power supply pin of the module selected by the DP and USB interfaces is controlled by the DP interface;
correspondingly, the default starting flow is the DP interface control operation.
3. The control method of the DP and USB interface according to claim 1, wherein the power supply pin of the module selected by the DP and USB interface is controlled by the USB interface driver;
correspondingly, the default starting flow is the USB interface control operation.
4. The method for controlling a DP and USB interface according to claim 1, wherein said controlling enters a default start-up procedure of the DP and USB interface module, specifically comprising:
applying for a power control GPIO of the module with the DP and the USB interface selected from the two;
and analyzing the equipment tree description file corresponding to the alternative module of the DP and the USB interface to generate GPIO operation variables shared by the DP and the USB.
5. The DP and USB interface control method according to claim 1, wherein executing the DP interface control operation specifically includes:
if the display screen of the equipment is detected to be in a display state, controlling a power supply pin of the module with the DP and the USB interface to be in a power-on state;
and if the display screen is detected to be in the screen-off state, controlling the power supply pin of the module with the DP and the USB interface to be powered down.
6. The DP and USB interface control method according to claim 1, wherein the USB interface control operation is performed, specifically:
and controlling the power supply pin of the module with the DP and the USB interface to keep a power-on state.
7. The control method of DP and USB interfaces according to claim 1, wherein a power management controller applied to the device.
8. A control device for DP and USB interfaces, comprising:
the deployment unit is used for respectively establishing a DP device tree description file and a USB device tree description file in the device tree description file of the device aiming at the DP and USB interface alternative module in advance;
the power-on control unit is used for controlling a default starting flow of the DP and USB interface alternative module after the equipment system is electrified;
the switching control unit is used for checking the access signals of the peripheral interfaces corresponding to the DP and USB interface alternative module; if the access signal of the DP interface is detected, the DP equipment tree description file is called to execute the DP interface control operation; if the access signal of the USB interface is detected, the USB equipment tree description file is called to execute the USB interface control operation;
and the DP equipment tree description file comprises a USB resource attribute shielding field for the DP and USB interface alternative module, and/or the USB equipment tree description file comprises a DP resource attribute shielding field for the DP and USB interface alternative module.
9. A control device for DP and USB interfaces, comprising:
a memory for storing a computer program;
a processor for executing the computer program, which when executed by the processor realizes the steps of the control method of the DP and USB interfaces according to any one of claims 1 to 7.
10. A storage medium having stored thereon a computer program, wherein the computer program when executed by a processor realizes the steps of the control method of a DP and USB interface according to any one of claims 1 to 7.
CN202310231662.9A 2023-03-10 2023-03-10 Control method, device, equipment and storage medium of DP and USB interface Pending CN116226020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310231662.9A CN116226020A (en) 2023-03-10 2023-03-10 Control method, device, equipment and storage medium of DP and USB interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310231662.9A CN116226020A (en) 2023-03-10 2023-03-10 Control method, device, equipment and storage medium of DP and USB interface

Publications (1)

Publication Number Publication Date
CN116226020A true CN116226020A (en) 2023-06-06

Family

ID=86574904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310231662.9A Pending CN116226020A (en) 2023-03-10 2023-03-10 Control method, device, equipment and storage medium of DP and USB interface

Country Status (1)

Country Link
CN (1) CN116226020A (en)

Similar Documents

Publication Publication Date Title
US10747267B2 (en) Configuring docks
CN108920397B (en) Device identification method and device, storage medium and electronic device
US10042800B2 (en) Active USB device and switching method for operating mode thereof
US7072989B1 (en) USB peripheral device storing an indication of an operating power mode when a host went into hibernate and restarting at the power mode accordingly
US20120151231A1 (en) Power supply switching device, a power supply switching device control method and a power supply control program
CN109672950B (en) Power saving circuit and power saving method based on Type-C earphone
US20140059257A1 (en) Keyboard-video-mouse system and method of providing and using the same
CN102073602A (en) Computer system, connection control device as well as connecting and disconnecting method
CN112732616A (en) BMC starting method, device and equipment based on SPI controller
CN112799985B (en) USB interface control method, USB control circuit and intelligent networking equipment mainboard
CN108153626B (en) USB, serial port multiplexing and safety isolation system
CN102169442A (en) Method, equipment, device and system for performing system boot by using USB (universal serial bus) device
CN115269474A (en) Server and PCIe hot plug control method, device and medium thereof
CN108108314B (en) Exchanger system
US7523336B2 (en) Controlled power sequencing for independent logic circuits that transfers voltage at a first level for a predetermined period of time and subsequently at a highest level
US20150149677A1 (en) Hot plugging system and method
CN116226020A (en) Control method, device, equipment and storage medium of DP and USB interface
CN116775525A (en) Data transmission circuit, method, device, equipment and medium
WO2017071285A1 (en) Mobile terminal control method and device
CN115509333A (en) Server collaborative power-on and power-off device, method, system and medium
CN107093408B (en) The control method and device of backlight lightening when smart machine is switched on
JP5492844B2 (en) Interface connection method and computer
JP2001067157A5 (en) Computers and their peripheral systems, computer peripherals, computers and their control methods, and computer-readable storage media
CN214540750U (en) USB control circuit, intelligent networking equipment mainboard and electronic equipment
CN111741344B (en) Video display method of VR equipment and VR equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination