History log of /fuchsia/zircon/system/dev/board/astro/astro-sdio.c
Revision Date Author Comments
# 4ad425fe 19-Sep-2018 Ruchira Ravoori <ravoorir@google.com>

[zircon][aml-sd-emmc] Remove wifi gpio from the parent gpio info

The wifi specific gpio is moved to the gpio info of the child driver.
This changeset removes it from the parent info.

Test: Tested that sdio devices came up on vim2 and astro.

Change-Id: I99cb13e26b030fdca2aa708adf97a9b0e008be9f


# 6c2ccb39 19-Sep-2018 Mike Voydanoff <voydanoff@google.com>

[gpio] Refactor the GPIO protocol

This is a first step in a move toward using protocols to represent
individual resources. A similar change will be made to the I2C protocol
to bring it in line with how I2C is used on x86 platforms.

From the client's point of view, an instance of the ZX_PROTOCOL_GPIO
protocol now represents a single pin. The protocol remains the same,
except the "uint32_t index" has been removed from all the protocol functions.

For devices that have only one GPIO resource assigned to them, the driver
can simply call device_get_protocol() to access the GPIO protocol for the pin.
To for devices with more than one GPIO pins, a new API in the platform bus called
pdev_get_protocol() must be used instead.

In addition, we add a new protocol ZX_PROTOCOL_GPIO_IMPL, which is now
implemented by the GPIO drivers. This protocol is essentially the same as
the old GPIO protocol, except "index" has been renamed "pin".
Board drivers may use this protocol directly when doing low level system
configuration, specifying pin numbers directly.

TEST: Booted on VIM2 and Hikey.
On VIM2, USB, display, ethernet and the GPIO test driver are working properly
On Hikey, the system boots and USB is functional.

Change-Id: I44f1bc11ad9793543361a2d19d7a2de4458c334b


# d44283af 04-Sep-2018 Ruchira Ravoori <ravoorir@google.com>

[zircon][sdio] Add a sdio client driver metadata structure

This changeset adds a metadata structure that can be used to pass board
specific wifi information from board driver to the upper level drivers.

Test: Verified that the metadata is received in the wifi driver
correctly

Change-Id: I6bd45ca4d607390a419218096f51bb78026f9fd8


# 02bc77e5 30-Aug-2018 Mike Voydanoff <voydanoff@google.com>

[vim2][astro][sdio] Provide platform device protocol to Wifi driver

This allows the Wifi driver to access its WIFI_SDIO_WAKE_HOST,
which will allow us to remove the get_oob_irq() callbacks from the
SDIO and SDMMC protocols.
It will also allow the Wifi driver to use GPIOs for debugging purposes.

TEST: verified that SDIO driver comes up on VIM2 and astro, and Wifi driver comes up on VIM2.

Change-Id: Ib1754ebd77101e6e8989f05d34177b0b61591e67


# 5c6d16a0 29-Aug-2018 Mike Voydanoff <voydanoff@google.com>

[dev][platform-bus] separate regular metadata from bootloader metadata

In the platform bus protocol, we use the pbus_metadata_t struct
for board drivers to pass metadata to the platform devices.
Instead of overloading this struct to work both for immediately
provided metadata and metadata passed from the bootloader, we now have
a separate struct pbus_boot_metadata_t used for specifying bootloader
metadata to be assigned to a platform device.

ZX-2513 #in progress

TEST: booted VIM2, astro and gauss and verified that drivers that
use metadata started up successfully.

Change-Id: I7065fd497646f386987cb5dc317d1c66daa8df0a


# 0d71f953 21-Aug-2018 Mike Voydanoff <voydanoff@google.com>

[dev][platform-bus] Clean-up and simplify platform bus protocol:

- Remove "flags" parameter from pbus_device_add().
Now platform devices can only be started in new devhosts.

- Add new API pbus_protocol_device_add(), for binding drivers that implement
platform bus protocols like GPIO and I2C_IMPL.
pbus_protocol_device_add() is equivalent to pbus_device_add(PDEV_ADD_PBUS_DEVHOST)
followed by pbus_wait_protocol().

- Remove pbus_wait_protocol(). pbus_protocol_device_add() does the wait for you automatically.

- Rename pbus_set_protocol() to pbus_register_protocol()

These changes will hopefully make the platform bus protocol easier
to understand and use.
I found two places where people accidentally using PDEV_ADD_PBUS_DEVHOST
inappropriately (probably copy & paste errors), which resulted in
the entire network stack and storage stack running in the platform bus devhost.
Hopefully this change will make it impossible for mistakes like that to happen again.

While doing this I also noticed that the gauss nand driver and vim2 ethernet driver
were running in the platform bus devhost. This change fixes that.

Also removed some remnants of the pbus_device_enable() API, which has been removed previously.

TEST: boot up on qemu, VIM2, gauss and astro and verified platform devices all start up properly

Change-Id: I580269bc6f53a63348ba8ab580259b1ba56dd393


# 609cc892 16-Jul-2018 Ruchira Ravoori <ravoorir@google.com>

[zircon][sdio]Add UHS support

This changeset adds support for ultra high speed for sdio.
Astro fails the read commands when frequency is more than 25Mhz,
mostly related to the PORT issues on it, which needs further investigation.

Test: Tested SDIO probing on Vim2 and Astro.

Change-Id: Ibb6cb4f79203ea76b300c3f0ea6fe06f772bcad5


# 350aac28 28-Jun-2018 Mike Voydanoff <voydanoff@google.com>

[ddk][platform-bus] Misc driver metadata cleanup

Rename "boot_metadata" to "metadata" in the plaform bus and device protocols,
since not all metadata provided by the platform bus comes from the bootloader.

Rename DEVICE_METADATA_DRIVER_DATA to DEVICE_METADATA_PRIVATE to clarify
that this signifies that the metadata type is local to a particular driver
or protocol.

Remove unused pbus_publish_boot_metadata() from platform bus protocol

Test: manual testing on VIM2

Change-Id: If969bb0005da7cb66901a796effc8231a8cb2ebe


# 0c9112ee 20-Jun-2018 Ruchira Ravoori <ravoorir@google.com>

[zircon][sdio] Add support to get oob irq handle

This changeset adds support to get the out-of-bandwidth irq handle for
SDIO. The irq needs to be accessed by the upper layers in sdio driver
stack but the gpio information is at the board level. In future we
need to think of a way to access the interrupt directly in the upper
layer without the involvement of the controller.

Test: Sanity check of EMMC on pixelbook, VIM2, sdio on estelle

Change-Id: I39919f79e006e598172db91f6d02855b8986f816


# e163899b 08-Jun-2018 Ruchira Ravoori <ravoorir@google.com>

[zircon][sdio] Update board files to support sdio on aml-s905d2 and astro

This changeset updates the board files for sdio support but keeps it
diabled until sdio is fully functional

Change-Id: Ie2c6387bf9972ea9b970ad6e84dda5f5a3360ccb