| # 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" ] |
| |
| 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" |
| header_output = "nelson-bind.h" |
| tests = "bind-tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.google.platform", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| driver_bind_rules("backlight_bind") { |
| rules = "bind/backlight.bind" |
| header_output = "backlight_bind.h" |
| bind_output = "backlight_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.i2c", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.ti.platform", |
| ] |
| } |
| |
| driver_bind_rules("bt_uart_bind") { |
| rules = "bind/bt_uart.bind" |
| header_output = "bt_uart_bind.h" |
| bind_output = "bt_uart_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.pwm", |
| ] |
| } |
| |
| driver_bind_rules("nelson_buttons_bind") { |
| rules = "bind/nelson_buttons.bind" |
| header_output = "nelson_buttons_bind.h" |
| bind_output = "nelson_buttons_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| ] |
| } |
| |
| driver_bind_rules("display_bind") { |
| rules = "bind/display.bind" |
| header_output = "display_bind.h" |
| bind_output = "display_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.dsi", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.sysmem", |
| ] |
| } |
| |
| driver_bind_rules("nelson_emmc_bind") { |
| rules = "bind/nelson_emmc.bind" |
| header_output = "nelson_emmc_bind.h" |
| bind_output = "nelson_emmc_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| 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.s905d3", |
| "//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.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.pwm", |
| ] |
| } |
| |
| driver_bind_rules("mali_bind") { |
| rules = "bind/mali.bind" |
| header_output = "mali_bind.h" |
| bind_output = "mali_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.registers", |
| ] |
| } |
| |
| driver_bind_rules("aml_nna_bind") { |
| rules = "bind/aml_nna.bind" |
| header_output = "aml_nna_bind.h" |
| bind_output = "aml_nna_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.registers", |
| ] |
| } |
| |
| driver_bind_rules("ti_ina231_mlb_bind") { |
| rules = "bind/ti_ina231_mlb.bind" |
| header_output = "ti_ina231_mlb_bind.h" |
| bind_output = "ti_ina231_mlb_bind.bc" |
| deps = [ "//src/devices/bind/fuchsia.i2c" ] |
| } |
| |
| driver_bind_rules("ti_ina231_speakers_bind") { |
| rules = "bind/ti_ina231_speakers.bind" |
| header_output = "ti_ina231_speakers_bind.h" |
| bind_output = "ti_ina231_speakers_bind.bc" |
| deps = [ "//src/devices/bind/fuchsia.i2c" ] |
| } |
| |
| driver_bind_rules("brownout_protection_bind") { |
| rules = "bind/brownout_protection.bind" |
| header_output = "brownout_protection_bind.h" |
| bind_output = "brownout_protection_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.codec", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.power", |
| "//src/devices/bind/fuchsia.ti.platform", |
| ] |
| } |
| |
| driver_bind_rules("pwm_init_bind") { |
| rules = "bind/pwm_init.bind" |
| header_output = "pwm_init_bind.h" |
| bind_output = "pwm_init_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.pwm", |
| ] |
| } |
| |
| 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.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.pwm", |
| ] |
| } |
| |
| driver_bind_rules("nelson_wifi_bind") { |
| rules = "bind/wifi.bind" |
| header_output = "wifi_bind.h" |
| bind_output = "wifi_bind.bc" |
| tests = "bind/wifi-bind-tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.broadcom.sdio", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.sdmmc", |
| ] |
| } |
| |
| driver_bind_rules("aml_secure_mem_bind") { |
| rules = "bind/aml_secure_mem.bind" |
| header_output = "aml_secure_mem_bind.h" |
| bind_output = "aml_secure_mem_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("selina_bind") { |
| rules = "bind/selina.bind" |
| header_output = "selina_bind.h" |
| bind_output = "selina_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.infineon.platform", |
| "//src/devices/bind/fuchsia.spi", |
| ] |
| } |
| |
| driver_bind_rules("spi_1_bind") { |
| rules = "bind/spi_1.bind" |
| header_output = "spi_1_bind.h" |
| bind_output = "spi_1_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.registers", |
| ] |
| } |
| |
| driver_bind_rules("tee_bind") { |
| rules = "bind/tee.bind" |
| header_output = "tee_bind.h" |
| bind_output = "tee_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.rpmb", |
| "//src/devices/bind/fuchsia.sysmem", |
| ] |
| } |
| |
| driver_bind_rules("aml_thermal_pll_bind") { |
| rules = "bind/aml_thermal_pll.bind" |
| header_output = "aml_thermal_pll_bind.h" |
| bind_output = "aml_thermal_pll_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.amlogic.platform.meson", |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.clock", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.pwm", |
| ] |
| } |
| |
| driver_bind_rules("gt6853_touch_bind") { |
| rules = "bind/gt6853_touch.bind" |
| header_output = "gt6853_touch_bind.h" |
| bind_output = "gt6853_touch_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.i2c", |
| ] |
| } |
| |
| driver_bind_rules("gtx8x_touch_bind") { |
| rules = "bind/gtx8x_touch.bind" |
| header_output = "gtx8x_touch_bind.h" |
| bind_output = "gtx8x_touch_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.i2c", |
| ] |
| } |
| |
| 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.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.i2c", |
| ] |
| } |
| |
| 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("dwc2_bind") { |
| rules = "bind/dwc2.bind" |
| header_output = "dwc2_bind.h" |
| bind_output = "dwc2_bind.bc" |
| deps = [ |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.usb.phy", |
| ] |
| } |
| |
| driver_bind_rules("aml_video_bind") { |
| rules = "bind/aml_video.bind" |
| header_output = "aml_video_bind.h" |
| bind_output = "aml_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", |
| ] |
| } |
| |
| fuchsia_driver("nelson-module-driver") { |
| output_name = "nelson-module" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ |
| "nelson-audio.cc", |
| "nelson-backlight.cc", |
| "nelson-bluetooth.cc", |
| "nelson-buttons.cc", |
| "nelson-canvas.cc", |
| "nelson-clk.cc", |
| "nelson-cpu.cc", |
| "nelson-display.cc", |
| "nelson-dsi.cc", |
| "nelson-emmc.cc", |
| "nelson-gpio.cc", |
| "nelson-i2c.cc", |
| "nelson-light.cc", |
| "nelson-mali.cc", |
| "nelson-nna.cc", |
| "nelson-power.cc", |
| "nelson-pwm.cc", |
| "nelson-ram.cc", |
| "nelson-registers.cc", |
| "nelson-sdio.cc", |
| "nelson-securemem.cc", |
| "nelson-selina.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 = [ |
| ":aml_nna_bind_header", |
| ":aml_sdio_bind_header", |
| ":aml_secure_mem_bind_header", |
| ":aml_thermal_pll_bind_header", |
| ":aml_video_bind_header", |
| ":backlight_bind_header", |
| ":brownout_protection_bind_header", |
| ":bt_uart_bind_header", |
| ":display_bind_header", |
| ":dwc2_bind_header", |
| ":ft3x27_touch_bind_header", |
| ":gpio_light_bind_header", |
| ":gt6853_touch_bind_header", |
| ":gtx8x_touch_bind_header", |
| ":mali_bind_header", |
| ":nelson-bind", |
| ":nelson_buttons_bind_header", |
| ":nelson_emmc_bind_header", |
| ":nelson_wifi_bind_header", |
| ":pwm_init_bind_header", |
| ":selina_bind_header", |
| ":spi_1_bind_header", |
| ":tcs3400_light_bind_header", |
| ":tee_bind_header", |
| ":ti_ina231_mlb_bind_header", |
| ":ti_ina231_speakers_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.sdmmc:fuchsia.hardware.sdmmc_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/power/drivers/ti-ina231:metadata", |
| "//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/inspect", |
| "//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\"" ] |
| } |
| } |
| |
| fuchsia_driver_component("nelson-module") { |
| component_name = "nelson-module" |
| deps = [ ":nelson-module-driver" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":nelson-bind_test", |
| ":nelson_wifi_bind_test", |
| ] |
| } |