| // Copyright 2022 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| composite aml_usb_phy; |
| |
| using fuchsia.amlogic.platform; |
| using fuchsia.clock; |
| using fuchsia.gpio; |
| using fuchsia.platform; |
| using fuchsia.devicetree; |
| using fuchsia.hardware.registers; |
| |
| primary node "pdev" { |
| if fuchsia.BIND_PLATFORM_DEV_VID == fuchsia.platform.BIND_PLATFORM_DEV_VID.GENERIC { |
| fuchsia.BIND_PLATFORM_DEV_DID == fuchsia.platform.BIND_PLATFORM_DEV_DID.DEVICETREE; |
| accept fuchsia.devicetree.FIRST_COMPATIBLE { |
| "amlogic,g12a-usb-phy", |
| "amlogic,g12b-usb-phy", |
| } |
| } else { |
| fuchsia.BIND_PROTOCOL == fuchsia.platform.BIND_PROTOCOL.DEVICE; |
| fuchsia.BIND_PLATFORM_DEV_VID == fuchsia.amlogic.platform.BIND_PLATFORM_DEV_VID.AMLOGIC; |
| fuchsia.BIND_PLATFORM_DEV_DID == fuchsia.amlogic.platform.BIND_PLATFORM_DEV_DID.USB_PHY_V2; |
| fuchsia.BIND_PLATFORM_DEV_INSTANCE_ID == 0; |
| } |
| } |
| |
| node "register-reset" { |
| fuchsia.hardware.registers.Service == fuchsia.hardware.registers.Service.ZirconTransport; |
| } |
| |
| optional node "gpio-init" { |
| fuchsia.BIND_INIT_STEP == fuchsia.gpio.BIND_INIT_STEP.GPIO; |
| } |
| |
| optional node "clock-init" { |
| fuchsia.BIND_INIT_STEP == fuchsia.clock.BIND_INIT_STEP.CLOCK; |
| } |