blob: adc4dcfb72027518a0035ed7f385b165d565e8ac [file] [log] [blame]
# 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/components.gni")
import("//build/drivers.gni")
if (internal_access) {
config_tas5805m = "audio/config/tas5805m_config.h"
}
group("nelson") {
deps = [
":nelson-module",
"post-init:post-init",
]
if (internal_access) {
deps += [ ":config-tas5805" ]
}
}
if (internal_access) {
resource("config-tas5805") {
sources = [ "//prebuilt/$config_tas5805m" ]
outputs = [ "lib/$config_tas5805m" ]
}
}
driver_bind_rules("nelson-bind") {
rules = "nelson.bind"
tests = "bind-tests.json"
deps = [
"//sdk/fidl/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_bindlib",
"//src/devices/bind/fuchsia.google.platform",
"//src/devices/bind/fuchsia.power",
]
}
fuchsia_driver("nelson-module-driver") {
output_name = "nelson-module"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [
"nelson-adc.cc",
"nelson-audio.cc",
"nelson-backlight.cc",
"nelson-bluetooth.cc",
"nelson-buttons.cc",
"nelson-canvas.cc",
"nelson-clk.cc",
"nelson-cpu.cc",
"nelson-emmc.cc",
"nelson-gpio.cc",
"nelson-i2c.cc",
"nelson-light.cc",
"nelson-mali.cc",
"nelson-nna.cc",
"nelson-ot-radio.cc",
"nelson-power.cc",
"nelson-pwm.cc",
"nelson-ram.cc",
"nelson-registers.cc",
"nelson-sdio.cc",
"nelson-securemem.cc",
"nelson-spi.cc",
"nelson-sysmem.cc",
"nelson-tee.cc",
"nelson-thermal.cc",
"nelson-thermistor.cc",
"nelson-touch.cc",
"nelson-usb.cc",
"nelson-video.cc",
"nelson.cc",
]
deps = [
":nelson-bind",
"//sdk/banjo/fuchsia.hardware.iommu:fuchsia.hardware.iommu_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.sdmmc:fuchsia.hardware.sdmmc_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.adc:fuchsia.hardware.adc_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.amlogiccanvas:fuchsia.hardware.amlogiccanvas_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.audio:fuchsia.hardware.audio_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.clock:fuchsia.hardware.clock_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.clockimpl:fuchsia.hardware.clockimpl_cpp",
"//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.gpioimpl:fuchsia.hardware.gpioimpl_cpp",
"//sdk/fidl/fuchsia.hardware.gpt.metadata:fuchsia.hardware.gpt.metadata_cpp",
"//sdk/fidl/fuchsia.hardware.gpu.amlogic:fuchsia.hardware.gpu.amlogic_cpp",
"//sdk/fidl/fuchsia.hardware.gpu.mali:fuchsia.hardware.gpu.mali_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_cpp",
"//sdk/fidl/fuchsia.hardware.power.sensor:fuchsia.hardware.power.sensor_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.pwm:fuchsia.hardware.pwm_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.pwm:fuchsia.hardware.pwm_cpp",
"//sdk/fidl/fuchsia.hardware.registers:fuchsia.hardware.registers_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.rpmb:fuchsia.hardware.rpmb_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.sdio:fuchsia.hardware.sdio_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.sdmmc:fuchsia.hardware.sdmmc_cpp",
"//sdk/fidl/fuchsia.hardware.serial:fuchsia.hardware.serial_cpp",
"//sdk/fidl/fuchsia.hardware.spi:fuchsia.hardware.spi_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_cpp",
"//sdk/fidl/fuchsia.hardware.tee:fuchsia.hardware.tee_bindlib_cpp",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp",
"//sdk/fidl/fuchsia.hardware.usb.phy:fuchsia.hardware.usb.phy_bindlib_cpp",
"//sdk/fidl/fuchsia.scheduler:fuchsia.scheduler_cpp",
"//sdk/lib/driver/component/cpp:cpp",
"//sdk/lib/driver/outgoing/cpp",
"//src/connectivity/openthread/lib/ot-radio",
"//src/devices/bind/fuchsia:fuchsia_cpp",
"//src/devices/bind/fuchsia.adc:fuchsia.adc_cpp",
"//src/devices/bind/fuchsia.amlogic.platform:fuchsia.amlogic.platform_cpp",
"//src/devices/bind/fuchsia.amlogic.platform.meson:fuchsia.amlogic.platform.meson_cpp",
"//src/devices/bind/fuchsia.amlogic.platform.s905d3:fuchsia.amlogic.platform.s905d3_cpp",
"//src/devices/bind/fuchsia.ams.platform:fuchsia.ams.platform_cpp",
"//src/devices/bind/fuchsia.arm.platform:fuchsia.arm.platform_cpp",
"//src/devices/bind/fuchsia.broadcom.platform:fuchsia.broadcom.platform_cpp",
"//src/devices/bind/fuchsia.broadcom.platform.sdio:fuchsia.broadcom.platform.sdio_cpp",
"//src/devices/bind/fuchsia.clock:fuchsia.clock_cpp",
"//src/devices/bind/fuchsia.goodix.platform:fuchsia.goodix.platform_cpp",
"//src/devices/bind/fuchsia.google.platform:fuchsia.google.platform_cpp",
"//src/devices/bind/fuchsia.gpio:fuchsia.gpio_cpp",
"//src/devices/bind/fuchsia.i2c:fuchsia.i2c_cpp",
"//src/devices/bind/fuchsia.nordic.platform:fuchsia.nordic.platform_cpp",
"//src/devices/bind/fuchsia.platform:fuchsia.platform_cpp",
"//src/devices/bind/fuchsia.power:fuchsia.power_cpp",
"//src/devices/bind/fuchsia.pwm:fuchsia.pwm_cpp",
"//src/devices/bind/fuchsia.register:fuchsia.register_cpp",
"//src/devices/bind/fuchsia.sdio:fuchsia.sdio_cpp",
"//src/devices/bind/fuchsia.ti.platform:fuchsia.ti.platform_cpp",
"//src/devices/bind/fuchsia.usb.phy:fuchsia.usb.phy_cpp",
"//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/mmio",
"//src/devices/lib/thermal",
"//src/devices/lib/ti",
"//src/devices/power/drivers/ti-ina231:metadata",
"//src/devices/usb/lib/usb",
"//src/devices/usb/lib/usb:cdc",
"//src/devices/usb/lib/usb:dwc2",
"//src/graphics/display/lib/device-protocol-display",
"//src/lib/ddk",
"//src/lib/ddk:ddk-metadata-headers",
"//src/lib/ddktl",
# TODO(https://fxbug.dev/42113849): 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) {
include_dirs = [ "//prebuilt" ]
defines = [ "TAS5805M_CONFIG_PATH=\"$config_tas5805m\"" ]
}
# TODO(https://fxbug.dev/42176699): This target uses mutable tables which are deprecated,
# rather than builders.
configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ]
}
fuchsia_driver_component("nelson-module") {
component_name = "nelson-module"
deps = [ ":nelson-module-driver" ]
info = "nelson-module-info.json"
manifest = "meta/nelson-module.cml"
}
fuchsia_driver_package("package") {
package_name = "nelson-module"
driver_components = [
":nelson-module",
"post-init",
]
}
group("tests") {
testonly = true
deps = [ ":nelson-bind_test" ]
}