ESPRESSObin with an mPCIe Video card.


Last Update: May 19, 2022 @ 14:40 In-progress information, subject to change.

This is an Application Note that investigates how to use the Globalscale ESPRESSObin V7 single board embedded computer to support an mPCIe graphics card.

The ESPRESSObin board is, in effect, a server, and does not have any display hardware, using just the serial port console for control. This leaves the mPCIe port as the only location for display hardware. Research identified a number of obsolete VGA-era mPCIe boards, but which are no longer available. In May 2021, the Commell (Taiwan) MPX-768 was announced, locally priced about CA$200 including shipping.

This board uses the Silicon Motion SM768 SOC device, with

  • embedded ARM Cortex R5 cpu + firmware that handles all the following;
    • 256MB internal DDR3 video ram.
    • embedded HDMI v1.4 controller (1920×1080 supported).
    • decoding and displaying various video formats.
    • communications via the mPCIe interface.
The V7 board with Commell MPX-768 graphics board installed. An extension cable to the HDMI connector is not shown.
The operating SM768 heatsink in ambient air environment was measured at 49C. The OEM specification lists 0-70C as the safe operating range.
An overnight soak test with a small fan fitted to the enclosure produced a 28C measurement.
Note also the SATA device connector pair on the bottom edge of the board. A half height 128GB SATA module will be fitted here, see another image below.

The MPX-768 is a valid mPCIe device, but does not use the SM768 SOC internal 4-port USB hub. Hence the V7 jumpers remain set to the default USB2 port.

Wikipedia has a detailed discussion of PCIExpress.

Developing a mPCIe driver is a non-trivial effort. A comprehensive discussion can be found here. Silicon Motion have helpfully provided us with the Ubuntu mPCIe driver source code for their SM768 SoC device. This code appears to build a Loadable Kernel Module (a.k.a. LKM), a .ko binary file.

The Mini PCIe interface explained, briefly…

Modern PC and ARM based hardware implements PCI, either as an internal module or external chip. Depending on the age of the PC, there may be PCI slots (with a parallel interface now considered obsolete), while recent PCs have PCI Express slots, which are smaller and use faster serial lanes.

PCI Express is based on point-to-point topology, with separate serial links connecting every device (also known as an endpoint), to the root complex controller that can be integrated into the CPU.

The Mini PCIe (or mPCIe) hardware interface is 52 pins, with (most commonly) a single Receive / Transmit differential pair on pins 23,25 and 31,33 respectively. There are two pins (36,38) reserved for a module USB connection that supports a USB device. Note here that the host hardware may not provide a way to access any mPCIe USB device(s).

Similarly, a PC host (e.g. laptop) may support configuring the mPCIe connection for a WiFi board only. Industrial embedded hardware (Intel or ARM based) often support multiple mPCIe modules.

The most common mPCIe boards are WiFi network devices in laptops, and usually fitted to internal connectors that require opening the laptop case. This is also because the mPCIe peripheral has two screws that secure it to the host hardware.

Hardware Assumptions to be investigated

The SM768 SOC on the MPX-768 board includes the ARM Cortex R5 cpu with its own OS firmware that is independent of the host hardware operating system (linux or Windows). Put another way, the host sends and receives commands and data to / from the MPX-768 via mPCIe bus.

What does linux detect with the lsusb command

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

No additional USB devices are identified with the V7 jumpers set to USB2. Jumper setting for PCIe has not been tested.

Can the MPX-768 ARM R5 firmware be updated?

The R5 firmware is loaded at the factory. Since this is a new product announced in mid 2021, the possibility exists that firmware will get updated. It’s unknown at present how or if this could be updated by the integrator or end user. In general, the process is likely to be an app (Windows or linux) that sends commands to the MPX-768 that sets it into update mode, and then receives the new firmware binary.

First Evaluation Setup: Windows Installation

Commell provide a Windows 10-64 bit driver (and Windows 7-32 bit version which we won’t use) so a mPCIe–>PCIe adapter board was required to test in a desktop workstation. This adapter board was tested in Windows 10-32 and 10-64 workstations using an Intel WiFi module. The WiFi module was identified and the appropriate driver loaded.

The aim here is to identify and document what the MPX-768 identifies itself as to Windows 10-64, and what additional functionality if any is present. For example, does any attached HDMI monitor configure itself to the MPX-768 and display data like any other screen: Yes!

Can the display resolution be set like existing displays? Yes, up to 1920×1080.

The Device Manager is expected to add a Display Adapter class entry, and also a Monitor entry. Yes it does. Entries refer to Silicon Motion not Commell.

The adapter board handles half and full length boards. The half length stand-offs have to be removed to install the full length MPX-768, as shown below.

The adapter bracket has to be modified to secure the HDMI connector and cable. An equivalent mounting scheme is used when the MPX-768 is moved to the ESPRESSObin V7 board.

The HDMI cable has 1.5mm SIL pitch connectors. An HDMI connector
mounting block was fabricated from polycarbonate plastic.

Unexpected Problem on Windows workstations

The mPCIe–>PCIe adapter board with an Intel WiFi module fitted can be installed in a suitable PCIe slot in an HP xw8200 workstation and a SuperMicro 7045W workstation. Both workstations power up correctly and identify the WiFi module.

Both workstations have PCIe 2.0 slots.

With the MPX-768 module fitted, both workstation PSUs will not start up, and indicate some sort of power fault error. This fault condition was not expected.

The MPX-768 can be fitted to the ESPRESSObin (see below) which powers up correctly and reports itself correctly to the lspci command.

Right click to see the full size image. The MPX-768 identifies itself to linux, and appears to be functional.

Note in the above image

  • pins 37, 39, 41 and 43 (GND, 3.3V_AUX2, 3.3V_AUX3, GND respectively) are not implemented on the adapter board, and are present on the ESPRESSObin board interface.
  • pin 2 (3.3V_AUX1) and pin 52 (3.3V_AUX5) are connected on the adapter board.
  • Pin 24 (3.3V_AUX4) is connected to the PCIe interface edge connector VAUX pin.

Pin 24 is the problem. On the test PC hosts, this is effectively GND. Some PCs and embedded systems may provide a VAUX 3.3v. The MPX-768 expects 3.3V on pin 24 (allowed by the mPCIe specification), and this is commoned with the other 3.3V pins. If pin 24 is connected to PCIe VAUX, the PC PSU is shorted and does not power up, as seen.

The mPCIe connector specification requires a 1.5V supply to three pins, namely 6, 28 and 48. Examination of the suspect adapter (see the above image) shows that 3V3 is passed from the PCIe interface connector to a LM1117_3.3 regulator. The regulator output (3.3V) is passed to pins 6, 28 and 48.

The ESPRESSObin design provides 1.5V to pins 6, 28 and 48. The MPX-768 is functional, but does not require this voltage. Pins 6, 28 and 48 are NC.

The MPX requires the 3.3V and GNDs to pins 37,39,41,43 only.

While the above adapter board supports a WiFi module, it was designed for an older mPCIe revision that does not include the reserved pins 37 -51.

Possible Substitute Adapter Boards

The PSU hardware fault can be fixed by adding some reserved VCC and GND wires, and it is possible to modify the current adapter.

The USB ‘B’ device connector is intended for USB peripheral device modules.
A cable to a PC host port is required.

We have identified a Startech board that is stated as having “Complete pass-through design from Mini PCI Express to PCI Express” support.

Portion of the schematic, showing the mPCIe connector, and the reserved pins 37, 39, 41 and 43.

Startech support helpfully provided the schematic which shows that the four 3V3 and GND pins are not connected, and VAUX is connected to pin 24. Hence the Startech board (or any similar interface adapter) is not compatible with the MPX-768 without the modifications shown below.

Technical information is provided for engineering evaluation purposes only. No liability is offered or assumed.
Ablecomm PEX-M117 is a more recent adapter that requires no reworking.

The Ablecomm (Taiwan) PEX-M117 adapter provides all the missing 3.3V and GND pins, and also a jumper block to select the 3.3V voltage source.

Technical information is provided for engineering evaluation purposes only. No liability is offered or assumed.

Referring to the above schematic, the J3 default settings will short the MPX pin 24 as described above. Jumpering pins 5-6 will isolate the P3.3Vaux as required. Pins 3 and 6 are common. What is required is either a USB connection that provides 5V to a 3v3 regulator, or if USB is not available or undesirable, pins 1-2-3 are jumpered. This provides the m3.3Vaux that powers the MPX board. The adapter bracket requires modifications for the HDMI connector, as described above.

Issue Solved

The required 3.3V and GND pins 37-43 are added, and circuit trace from Pin 24 to the PCIe connector is cut, allowing the host PC to power up and boot Windows. Device Manager reports that the Commell-provided Silicon Motion Display Adapter is present. Once the driver is loaded and the PC rebooted, two displays on the primary NVIDIA adapter and one on the MPX-768 adapter are functional. The MPX also supports two possible VGA modes, which will show in Display Settings as “display not detected” when HDMI is used.

Loading the Silicon Motion display driver also loads some name-related audio drivers. We found it necessary to disable these on our test configuration as this conflicted with the existing sound card.

Second Evaluation Setup: ESPRESSObin V7 Installation

The MPX-768 installed in the ESPRESSObin v7 board running Ubuntu v20.04. The driver has not been loaded. The lspci command reports the MPX-768 is present.

What does linux detect with the lspci -v command

00:00.0 VGA compatible controller: Silicon Motion, Inc. Device   0768 (rev 03) (prog-if 00 [VGA controller])
Subsystem: Silicon Motion, Inc. Device 0768
Flags: bus master, fast devsel, latency 0, IRQ 107
Memory at (32-bit, prefetchable)
Memory at e8000000 (32-bit, non-prefetchable) [size=2M]
Expansion ROM at e8200000 [disabled] [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] Secondary PCI Express

Silicon Motion is the manufacturer of the controller chip. Reference to Commell was expected (minor issue to be clarified).

Does the MPX-768 generate a default HDMI signal on power up?

No, but this was expected. The driver needs to be compiled, installed and the module configured (specific details and procedures to be added).

< more to be added >

Ubuntu and Direct Rendering Manager

Otherwise known as DRM, it is a subsystem of the Linux kernel responsible for interfacing with GPUs of modern video cards. DRM exposes an API that user-space programs can use to send commands and data to the GPU and perform operations such as configuring the mode setting of the display.

To work properly, the graphics adapter must set a mode—a combination of screen resolution, color depth and refresh rate—that is within the range of values supported by itself and the attached display screen.

Investigating DRM on Intel/AMD-based systems with displays

The display device (typically) appears as /dev/drm_dp_aux0 and */aux1

Special character files /dev/dri/card0 and /dev/dri/renderD128 are also present.

The installation and testing and adjustment of the existing DRM device will be investigated. Knowledge gained will be used to add DRM and hence support of the MPX-768 on the ESPRESSObin system.

< more details to be added in a separate page > 

Setting up the build environment

The build environment is in two stages. Firstly, on the Intel/AMD systems, the libdrm-dev package is installed, and some simple test apps that provide verification of the installation.

< more details to be added in a separate page >

Installation and Debugging

< more to be added >