History

usb: add bus type for USB ULPI

UTMI+ Low Pin Interface (ULPI) is a commonly used PHY interface for USB 2.0. The ULPI specification describes a standard set of registers which the vendors can extend for their specific needs. ULPI PHYs provide often functions such as charger detection and ADP sensing and probing. There are two major issues that the bus type is meant to tackle: Firstly, ULPI registers are accessed from the controller. The bus provides convenient method for the controller drivers to share that access with the actual PHY drivers. Secondly, there are already platforms that assume ULPI PHYs are runtime detected, such as many Intel Baytrail based platforms. They do not provide any kind of hardware description for the ULPI PHYs like separate ACPI device object that could be used to enumerate a device from.

Heikki Krogerus committed 11 years ago

Commit 289fcff1 parent 3521a3911 files · +521 −132Browse files

Showing the changes to scripts/mod (2 of 11 files). Show all

Unified · Split

2 files
  1. scripts/mod/devicetable-offsets.c +4 −0
  2. scripts/mod/file2alias.c +13 −0
scripts/mod/devicetable-offsets.c+4−0
@@ -189,5 +189,9 @@ int main(void) · 188 unmodified lines
189189 DEVID_FIELD(rio_device_id, asm_did);
190190 DEVID_FIELD(rio_device_id, asm_vid);
191191
192+ DEVID(ulpi_device_id);
193+ DEVID_FIELD(ulpi_device_id, vendor);
194+ DEVID_FIELD(ulpi_device_id, product);
195+
192196 return 0;
193197 }
scripts/mod/file2alias.c+13−0
@@ -1192,6 +1192,19 @@ static int do_rio_entry(const char *filename, · 1191 unmodified lines
11921192 }
11931193 ADD_TO_DEVTABLE("rapidio", rio_device_id, do_rio_entry);
11941194
1195+/* Looks like: ulpi:vNpN */
1196+static int do_ulpi_entry(const char *filename, void *symval,
1197+ char *alias)
1198+{
1199+ DEF_FIELD(symval, ulpi_device_id, vendor);
1200+ DEF_FIELD(symval, ulpi_device_id, product);
1201+
1202+ sprintf(alias, "ulpi:v%04xp%04x", vendor, product);
1203+
1204+ return 1;
1205+}
1206+ADD_TO_DEVTABLE("ulpi", ulpi_device_id, do_ulpi_entry);
1207+
11951208 /* Does namelen bytes of name exactly match the symbol? */
11961209 static bool sym_is(const char *name, unsigned namelen, const char *symbol)
11971210 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t