espressif,esp-hosted-mcu (on sd bus)

Description

Espressif ESP-Hosted-MCU Wi-Fi co-processor over SDIO.

An Espressif SoC running esp-hosted-mcu coprocessor firmware, attached to the
host over the SDIO bus. The node is a child of an SDHC slot. Data-ready is
signalled by the coprocessor through an SDIO interrupt register, so no
data-ready GPIO is used.

The coprocessor is normally restarted through a dedicated reset line wired to
a host GPIO, which is the recommended configuration. Where no such line
exists, reset-gpios may be omitted and the coprocessor is left to the power
cycle the SD subsystem performs when it enumerates the card.

That fallback only restarts the coprocessor when both of the following hold,
so check them before relying on it. The host controller driver must act on
SDHC_POWER_OFF and SDHC_POWER_ON, which many do not: a driver that ignores the
power mode still reports success, so an ineffective cycle is indistinguishable
from a real one. The board must also route the coprocessor supply through
whatever the controller switches, and describe it in devicetree; on an
espressif,esp32-sdhc-slot that means giving the slot node a pwr-gpios
property, without which the power mode only gates the card clock and leaves
the coprocessor running.

Where either does not hold, the coprocessor is never actually restarted and
enumeration only succeeds if it happens to be cold-booting already.

The coprocessor firmware version the host expects is a Kconfig option, not a
devicetree property: the firmware is flashed to a separate chip and the driver
queries it at init.

Examples

&sdhc1 {
        #address-cells = <1>;
        #size-cells = <0>;

        esp_hosted_mcu: esp-hosted-mcu@0 {
                compatible = "espressif,esp-hosted-mcu";
                reg = <0>;
                reset-gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

reset-gpios

phandle-array

Coprocessor reset line, driven by the host. Recommended, and the only
mechanism that restarts the coprocessor on its own. When absent the
coprocessor falls back to the SD power cycle, which is only effective
under the two conditions described above.