&uart5 compatible = "sprd,u25-diag"; reg = <0 0x70150000 0 0x1000>; interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ap_clk CLK_UART5>; clock-names = "diag"; sprd,diag-mode = "usb"; /* or "uart" */ sprd,diag-channels = <4>; /* number of logical channels */ status = "okay"; ;
int main() int fd = open("/dev/sprd_diag", O_RDWR); if (fd < 0) return 1; sprd u25 diag driver
1.0 Module: SPRD U25 Diagnostic Communication Driver Subsystem: TTY/Serial Diag (Diagnostics) Applicable SoC: Unisoc (Spreadtrum) U25 series (e.g., UIS8581, UMS512, Tiger T series) &uart5 compatible = "sprd,u25-diag"; reg = <0 0x70150000
Most users will never need the SPRD U25 Diag Driver. If you are just plugging your phone in to charge or copy photos, the standard drivers bundled with Windows or the manufacturer’s suite are sufficient. However, if you fall into the following categories, this driver is mandatory: It implements a proprietary transport layer over USB
The SPRD U25 Diag Driver is a kernel-level character device driver that enables host-PC diagnostic communication with Unisoc U25-based embedded devices (Android, Linux, or RTOS). It implements a proprietary transport layer over USB (CDC ACM or vendor-specific endpoints) or virtual serial (IPC over SMEM/SMD). The driver exposes a /dev/diag or /dev/sprd_diag interface used by engineering tools, log extraction utilities (e.g., sprd_log ), and factory calibration software.