| # Copyright 2019 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. | |
| import("//build/bind/bind.gni") | |
| import("//build/cipd.gni") | |
| import("//build/drivers.gni") | |
| if (internal_access) { | |
| config_tas2770 = "audio/config/tas2770/tas2770_config.h" | |
| copy("config-tas2770-copy") { | |
| sources = [ "//prebuilt/$config_tas2770" ] | |
| outputs = [ "$root_out_dir/$config_tas2770" ] | |
| } | |
| } | |
| driver_bind_rules("astro-bind") { | |
| rules = "astro.bind" | |
| header_output = "astro-bind.h" | |
| bind_output = "astro.bindbc" | |
| tests = "bind-tests.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.google.platform", | |
| "//src/devices/bind/fuchsia.hardware.platform.bus", | |
| ] | |
| } | |
| driver_bind_rules("astro-backlight-bind") { | |
| rules = "bind/astro-backlight.bind" | |
| header_output = "astro-backlight-bind.h" | |
| bind_output = "astro-backlight.bindbc" | |
| tests = "bind-tests/astro-backlight-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.i2c", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.ti.platform", | |
| ] | |
| } | |
| driver_bind_rules("astro-bluetooth-bind") { | |
| rules = "bind/astro-bluetooth.bind" | |
| header_output = "astro-bluetooth-bind.h" | |
| bind_output = "astro-bluetooth.bindbc" | |
| tests = "bind-tests/astro-bluetooth-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.pwm", | |
| ] | |
| } | |
| driver_bind_rules("astro-buttons-bind") { | |
| rules = "bind/astro-buttons.bind" | |
| header_output = "astro-buttons-bind.h" | |
| bind_output = "astro-buttons-bind.bc" | |
| tests = "bind-tests/astro-buttons-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.gpio", | |
| ] | |
| } | |
| driver_bind_rules("astro-cpu-bind") { | |
| rules = "bind/astro-cpu.bind" | |
| header_output = "astro-cpu-bind.h" | |
| bind_output = "astro-cpu-bind.bc" | |
| tests = "bind-tests/astro-cpu-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.amlogic.platform.meson", | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.clock", | |
| "//src/devices/bind/fuchsia.google.platform", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.power", | |
| "//src/devices/bind/fuchsia.sysmem", | |
| "//src/devices/bind/fuchsia.tee", | |
| ] | |
| } | |
| driver_bind_rules("astro-display-bind") { | |
| rules = "bind/astro-display.bind" | |
| header_output = "astro-display-bind.h" | |
| bind_output = "astro-display-bind.bc" | |
| tests = "bind-tests/astro-display-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.dsi", | |
| "//src/devices/bind/fuchsia.gpio", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.sysmem", | |
| ] | |
| } | |
| driver_bind_rules("astro-mali-bind") { | |
| rules = "bind/astro-mali.bind" | |
| header_output = "astro-mali-bind.h" | |
| bind_output = "astro-mali-bind.bc" | |
| tests = "bind-tests/astro-mali-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.registers", | |
| ] | |
| } | |
| driver_bind_rules("astro-pwm-bind") { | |
| rules = "bind/astro-pwm.bind" | |
| header_output = "astro-pwm-bind.h" | |
| bind_output = "astro-pwm-bind.bc" | |
| tests = "bind-tests/astro-pwm-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.gpio", | |
| "//src/devices/bind/fuchsia.pwm", | |
| ] | |
| } | |
| driver_bind_rules("astro-securemem-bind") { | |
| rules = "bind/astro-securemem.bind" | |
| header_output = "astro-securemem-bind.h" | |
| bind_output = "astro-securemem-bind.bc" | |
| tests = "bind-tests/astro-securemem-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.sysmem", | |
| "//src/devices/bind/fuchsia.tee", | |
| ] | |
| } | |
| driver_bind_rules("astro-tee-bind") { | |
| rules = "bind/astro-tee.bind" | |
| header_output = "astro-tee-bind.h" | |
| bind_output = "astro-tee-bind.bc" | |
| tests = "bind-tests/astro-tee-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.sysmem", | |
| ] | |
| } | |
| driver_bind_rules("astro-video-bind") { | |
| rules = "bind/astro-video.bind" | |
| header_output = "astro-video-bind.h" | |
| bind_output = "astro-video_bind.bc" | |
| tests = "bind-tests/astro-video-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.amlogic.platform.meson", | |
| "//src/devices/bind/fuchsia.clock", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.sysmem", | |
| "//src/devices/bind/fuchsia.tee", | |
| ] | |
| } | |
| driver_bind_rules("astro-gpio-light-bind") { | |
| rules = "bind/astro-gpio-light.bind" | |
| header_output = "astro-gpio-light-bind.h" | |
| bind_output = "astro-gpio-light-bind.bc" | |
| tests = "bind-tests/astro-gpio-light-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.gpio", | |
| "//src/devices/bind/fuchsia.i2c", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.pwm", | |
| ] | |
| } | |
| driver_bind_rules("tcs3400-light-bind") { | |
| rules = "bind/tcs3400-light.bind" | |
| header_output = "tcs3400-light-bind.h" | |
| bind_output = "tcs3400-light-bind.bc" | |
| tests = "bind-tests/tcs3400-light-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.gpio", | |
| "//src/devices/bind/fuchsia.i2c", | |
| ] | |
| } | |
| driver_bind_rules("pd-armcore-bind") { | |
| rules = "bind/pd-armcore.bind" | |
| header_output = "pd-armcore-bind.h" | |
| bind_output = "pd-armcore-bind.bc" | |
| tests = "bind-tests/pd-armcore-test.json" | |
| deps = [ "//src/devices/bind/fuchsia.power" ] | |
| } | |
| driver_bind_rules("pwm-ao-d-bind") { | |
| rules = "bind/pwm-ao-d.bind" | |
| header_output = "pwm-ao-d-bind.h" | |
| bind_output = "pwm-ao-d-bind.bc" | |
| tests = "bind-tests/pwm-ao-d-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.google.platform", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.pwm", | |
| ] | |
| } | |
| driver_bind_rules("astro-aml-usb-phy-v2-bind") { | |
| rules = "bind/astro-aml-usb-phy-v2.bind" | |
| header_output = "astro-aml-usb-phy-v2-bind.h" | |
| bind_output = "astro-aml-usb-phy-v2-bind.bc" | |
| tests = "bind-tests/astro-aml-usb-phy-v2-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.registers", | |
| ] | |
| } | |
| driver_bind_rules("astro-dwc2-phy-bind") { | |
| rules = "bind/astro-dwc2-phy.bind" | |
| header_output = "astro-dwc2-phy-bind.h" | |
| bind_output = "astro-dwc2-phy-bind.bc" | |
| tests = "bind-tests/astro-dwc2-phy-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.usb.phy", | |
| ] | |
| } | |
| driver_bind_rules("astro-xhci-bind") { | |
| rules = "bind/astro-xhci.bind" | |
| header_output = "astro-xhci-bind.h" | |
| bind_output = "astro-xhci-bind.bc" | |
| tests = "bind-tests/astro-xhci-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.usb.phy", | |
| ] | |
| } | |
| driver_bind_rules("astro-dai-test-in-bind") { | |
| rules = "bind/astro-dai-test-in.bind" | |
| header_output = "astro-dai-test-in-bind.h" | |
| bind_output = "astro-dai-test-in-bind.bc" | |
| tests = "bind-tests/astro-dai-test-in-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.dai", | |
| ] | |
| } | |
| driver_bind_rules("astro-dai-test-out-bind") { | |
| rules = "bind/astro-dai-test-out.bind" | |
| header_output = "astro-dai-test-out-bind.h" | |
| bind_output = "astro-dai-test-out-bind.bc" | |
| tests = "bind-tests/astro-dai-test-out-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.dai", | |
| ] | |
| } | |
| driver_bind_rules("audio-codec-tas27xx-bind") { | |
| rules = "bind/audio-codec-tas27xx.bind" | |
| header_output = "audio-codec-tas27xx-bind.h" | |
| bind_output = "audio-codec-tas27xx-bind.bc" | |
| tests = "bind-tests/audio-codec-tas27xx-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.gpio", | |
| "//src/devices/bind/fuchsia.i2c", | |
| ] | |
| } | |
| driver_bind_rules("astro-aml-sdio-bind") { | |
| rules = "bind/astro-aml-sdio.bind" | |
| header_output = "astro-aml-sdio-bind.h" | |
| bind_output = "astro-aml-sdio-bind.bc" | |
| tests = "bind-tests/astro-aml-sdio-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform", | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.gpio", | |
| "//src/devices/bind/fuchsia.platform", | |
| "//src/devices/bind/fuchsia.pwm", | |
| ] | |
| } | |
| driver_bind_rules("astro-wifi-bind") { | |
| rules = "bind/astro-wifi.bind" | |
| header_output = "astro-wifi-bind.h" | |
| bind_output = "astro-wifi-bind.bc" | |
| tests = "bind-tests/astro-wifi-test.json" | |
| deps = [ | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", | |
| "//src/devices/bind/fuchsia.gpio", | |
| "//src/devices/bind/fuchsia.sdmmc", | |
| ] | |
| } | |
| fuchsia_driver("astro-driver") { | |
| output_name = "astro" | |
| configs += [ | |
| "//build/config:all_source", | |
| "//build/config/fuchsia:enable_zircon_asserts", | |
| ] | |
| sources = [ | |
| "astro-audio.cc", | |
| "astro-backlight.cc", | |
| "astro-bluetooth.cc", | |
| "astro-buttons.cc", | |
| "astro-canvas.cc", | |
| "astro-clk.cc", | |
| "astro-cpu.cc", | |
| "astro-display.cc", | |
| "astro-dsi.cc", | |
| "astro-gpio.cc", | |
| "astro-i2c.cc", | |
| "astro-light.cc", | |
| "astro-mali.cc", | |
| "astro-power.cc", | |
| "astro-pwm.cc", | |
| "astro-ram.cc", | |
| "astro-rawnand.cc", | |
| "astro-registers.cc", | |
| "astro-sdio.cc", | |
| "astro-securemem.cc", | |
| "astro-sysmem.cc", | |
| "astro-tee.cc", | |
| "astro-thermal.cc", | |
| "astro-thermistor.cc", | |
| "astro-touch.cc", | |
| "astro-usb.cc", | |
| "astro-video.cc", | |
| "astro.cc", | |
| ] | |
| deps = [ | |
| ":astro-aml-sdio-bind_header", | |
| ":astro-aml-usb-phy-v2-bind_header", | |
| ":astro-backlight-bind_header", | |
| ":astro-bind", | |
| ":astro-bluetooth-bind_header", | |
| ":astro-buttons-bind_header", | |
| ":astro-cpu-bind_header", | |
| ":astro-dai-test-in-bind_header", | |
| ":astro-dai-test-out-bind_header", | |
| ":astro-display-bind_header", | |
| ":astro-dwc2-phy-bind_header", | |
| ":astro-gpio-light-bind_header", | |
| ":astro-mali-bind_header", | |
| ":astro-pwm-bind_header", | |
| ":astro-securemem-bind_header", | |
| ":astro-tee-bind_header", | |
| ":astro-video-bind_header", | |
| ":astro-wifi-bind_header", | |
| ":astro-xhci-bind_header", | |
| ":audio-codec-tas27xx-bind_header", | |
| ":pd-armcore-bind_header", | |
| ":pwm-ao-d-bind_header", | |
| ":tcs3400-light-bind_header", | |
| "//sdk/banjo/fuchsia.hardware.clockimpl:fuchsia.hardware.clockimpl_banjo_cpp", | |
| "//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp", | |
| "//sdk/banjo/fuchsia.hardware.gpioimpl:fuchsia.hardware.gpioimpl_banjo_cpp", | |
| "//sdk/banjo/fuchsia.hardware.iommu:fuchsia.hardware.iommu_banjo_cpp", | |
| "//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp", | |
| "//sdk/banjo/fuchsia.hardware.powerimpl:fuchsia.hardware.powerimpl_banjo_cpp", | |
| "//sdk/banjo/fuchsia.hardware.serial:fuchsia.hardware.serial_banjo_cpp", | |
| "//sdk/banjo/fuchsia.sysmem:fuchsia.sysmem_banjo_c", | |
| "//sdk/fidl/fuchsia.hardware.gpu.amlogic:fuchsia.hardware.gpu.amlogic_cpp_wire", | |
| "//sdk/fidl/fuchsia.hardware.light:fuchsia.hardware.light_c", | |
| "//sdk/fidl/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_cpp_driver", | |
| "//sdk/fidl/fuchsia.hardware.serial:fuchsia.hardware.serial_c", | |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp_wire", | |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", | |
| "//src/devices/bind/fuchsia:fuchsia_cpp", | |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2:fuchsia.amlogic.platform.s905d2_cpp", | |
| "//src/devices/bind/fuchsia.ams.platform:fuchsia.ams.platform_cpp", | |
| "//src/devices/bind/fuchsia.gpio:fuchsia.gpio_cpp", | |
| "//src/devices/bind/fuchsia.i2c:fuchsia.i2c_cpp", | |
| "//src/devices/bus/lib/platform-bus-composites", | |
| "//src/devices/lib/amlogic", | |
| "//src/devices/lib/broadcom", | |
| "//src/devices/lib/driver", | |
| "//src/devices/lib/driver:driver_runtime", | |
| "//src/devices/lib/fidl-metadata", | |
| "//src/devices/lib/focaltech", | |
| "//src/devices/lib/metadata:llcpp", | |
| "//src/devices/lib/mmio", | |
| "//src/devices/lib/thermal", | |
| "//src/devices/lib/ti", | |
| "//src/devices/usb/lib/usb", | |
| "//src/devices/usb/lib/usb:cdc", | |
| "//src/devices/usb/lib/usb:peripheral", | |
| "//src/devices/usb/lib/usb:peripheral-config", | |
| "//src/graphics/display/lib/device-protocol-display", | |
| "//src/lib/ddk", | |
| "//src/lib/ddk:ddk-metadata-headers", | |
| # TODO(fxb/38132): Migrate to the new bind rules and delete the below | |
| "//src/lib/ddk:ddk-deprecated-binding-headers", | |
| "//src/lib/ddktl", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/hwreg", | |
| "//zircon/system/ulib/sync", | |
| "//zircon/system/ulib/zircon-internal", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| if (internal_access) { | |
| deps += [ ":config-tas2770-copy($shlib_toolchain)" ] | |
| include_dirs = [ "$root_out_dir" ] | |
| defines = [ "TAS2770_CONFIG_PATH=\"$config_tas2770\"" ] | |
| } | |
| # TODO(fxbug.dev/94768): This target uses mutable tables which are deprecated, | |
| # rather than builders. | |
| configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ] | |
| # TODO(fxbug.dev/95833): This target uses the deprecated C bindings. | |
| # Consider switching to the C++ bindings. See linked bug for details. | |
| configs += [ "//build/c:fidl-deprecated-c-bindings" ] | |
| } | |
| fuchsia_driver_component("astro") { | |
| component_name = "astro" | |
| deps = [ ":astro-driver" ] | |
| info = "astro-info.json" | |
| manifest = "meta/astro.cml" | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":astro-aml-sdio-bind_test", | |
| ":astro-aml-usb-phy-v2-bind_test", | |
| ":astro-backlight-bind_test", | |
| ":astro-bind_test", | |
| ":astro-bluetooth-bind_test", | |
| ":astro-buttons-bind_test", | |
| ":astro-cpu-bind_test", | |
| ":astro-dai-test-in-bind_test", | |
| ":astro-dai-test-out-bind_test", | |
| ":astro-display-bind_test", | |
| ":astro-dwc2-phy-bind_test", | |
| ":astro-gpio-light-bind_test", | |
| ":astro-mali-bind_test", | |
| ":astro-pwm-bind_test", | |
| ":astro-securemem-bind_test", | |
| ":astro-tee-bind_test", | |
| ":astro-video-bind_test", | |
| ":astro-wifi-bind_test", | |
| ":astro-xhci-bind_test", | |
| ":audio-codec-tas27xx-bind_test", | |
| ":pd-armcore-bind_test", | |
| ":pwm-ao-d-bind_test", | |
| ":tcs3400-light-bind_test", | |
| ] | |
| } |