| # 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.platform", |
| ] |
| } |
| |
| driver_bind_rules("astro-backlight-bind") { |
| rules = "bind/astro-backlight.bind" |
| header_output = "astro-backlight-bind.h" |
| bind_output = "astro-backlight.bindbc" |
| 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 = "bluetooth-bind-tests.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" |
| 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" |
| 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" |
| 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" |
| 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" |
| 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" |
| 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" |
| 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" |
| 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("ft3x27-touch-bind") { |
| rules = "bind/ft3x27-touch.bind" |
| header_output = "ft3x27-touch-bind.h" |
| bind_output = "ft3x27-touch-bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.i2c", |
| ] |
| } |
| |
| driver_bind_rules("gt92xx-touch-bind") { |
| rules = "bind/gt92xx-touch.bind" |
| header_output = "gt92xx-touch-bind.h" |
| bind_output = "gt92xx-touch-bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.i2c", |
| ] |
| } |
| |
| driver_bind_rules("gpio-light-bind") { |
| rules = "bind/gpio-light.bind" |
| header_output = "gpio-light-bind.h" |
| bind_output = "gpio-light-bind.bc" |
| 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" |
| 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" |
| 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" |
| 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("aml-usb-phy-v2-bind") { |
| rules = "bind/aml-usb-phy-v2.bind" |
| header_output = "aml-usb-phy-v2-bind.h" |
| bind_output = "aml-usb-phy-v2-bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.registers", |
| ] |
| } |
| |
| driver_bind_rules("dwc2-phy-bind") { |
| rules = "bind/dwc2-phy.bind" |
| header_output = "dwc2-phy-bind.h" |
| bind_output = "dwc2-phy-bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.usb.phy", |
| ] |
| } |
| |
| driver_bind_rules("xhci-bind") { |
| rules = "bind/xhci.bind" |
| header_output = "xhci-bind.h" |
| bind_output = "xhci-bind.bc" |
| 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" |
| 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" |
| 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" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.i2c", |
| ] |
| } |
| |
| driver_bind_rules("aml-sdio-bind") { |
| rules = "bind/aml-sdio.bind" |
| header_output = "aml-sdio-bind.h" |
| bind_output = "aml-sdio-bind.bc" |
| 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("wifi-bind") { |
| rules = "bind/wifi.bind" |
| header_output = "wifi-bind.h" |
| bind_output = "wifi-bind.bc" |
| 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 = [ |
| ":aml-sdio-bind_header", |
| ":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-mali-bind_header", |
| ":astro-pwm-bind_header", |
| ":astro-securemem-bind_header", |
| ":astro-tee-bind_header", |
| ":astro-video-bind_header", |
| ":audio-codec-tas27xx-bind_header", |
| ":dwc2-phy-bind_header", |
| ":ft3x27-touch-bind_header", |
| ":gpio-light-bind_header", |
| ":gt92xx-touch-bind_header", |
| ":pd-armcore-bind_header", |
| ":pwm-ao-d-bind_header", |
| ":tcs3400-light-bind_header", |
| ":wifi-bind_header", |
| ":xhci-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.bus:fuchsia.hardware.platform.bus_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_llcpp", |
| "//sdk/fidl/fuchsia.hardware.light:fuchsia.hardware.light_c", |
| "//sdk/fidl/fuchsia.hardware.serial:fuchsia.hardware.serial_c", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//src/devices/bind/fuchsia.ams.platform:bind.fuchsia.ams.platform", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/broadcom", |
| "//src/devices/lib/driver", |
| "//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/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\"" ] |
| } |
| } |
| |
| fuchsia_driver_component("astro") { |
| component_name = "astro" |
| deps = [ ":astro-driver" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":astro-bind_test" ] |
| } |