| # 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("nelson_backlight_bind") { |
| rules = "bind/nelson_backlight.bind" |
| header_output = "nelson_backlight_bind.h" |
| bind_output = "nelson_backlight_bind.bc" |
| tests = "bind-tests/nelson_backlight-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.i2c", |
| "//src/devices/bind/fuchsia.misc", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.ti.platform", |
| ] |
| } |
| |
| driver_bind_rules("nelson_bt_uart_bind") { |
| rules = "bind/nelson_bt_uart.bind" |
| header_output = "nelson_bt_uart_bind.h" |
| bind_output = "nelson_bt_uart_bind.bc" |
| tests = "bind-tests/nelson_bt_uart-test.json" |
| 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" |
| tests = "bind-tests/nelson_buttons-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| ] |
| } |
| |
| driver_bind_rules("nelson_display_bind") { |
| rules = "bind/nelson_display.bind" |
| header_output = "nelson_display_bind.h" |
| bind_output = "nelson_display_bind.bc" |
| tests = "bind-tests/nelson_display-test.json" |
| 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" |
| tests = "bind-tests/nelson_emmc-test.json" |
| 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("nelson_tcs3400_light_bind") { |
| rules = "bind/nelson_tcs3400_light.bind" |
| header_output = "nelson_tcs3400_light_bind.h" |
| bind_output = "nelson_tcs3400_light_bind.bc" |
| tests = "bind-tests/nelson_tcs3400_light-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.i2c", |
| "//src/devices/bind/fuchsia.misc", |
| ] |
| } |
| |
| driver_bind_rules("nelson_gpio_light_bind") { |
| rules = "bind/nelson_gpio_light.bind" |
| header_output = "nelson_gpio_light_bind.h" |
| bind_output = "nelson_gpio_light_bind.bc" |
| tests = "bind-tests/nelson_gpio_light-test.json" |
| 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_mali_bind") { |
| rules = "bind/nelson_mali.bind" |
| header_output = "nelson_mali_bind.h" |
| bind_output = "nelson_mali_bind.bc" |
| tests = "bind-tests/nelson_mali-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.registers", |
| ] |
| } |
| |
| driver_bind_rules("nelson_aml_nna_bind") { |
| rules = "bind/nelson_aml_nna.bind" |
| header_output = "nelson_aml_nna_bind.h" |
| bind_output = "nelson_aml_nna_bind.bc" |
| tests = "bind-tests/nelson_aml_nna-test.json" |
| 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" |
| tests = "bind-tests/ti_ina231_mlb-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.i2c", |
| "//src/devices/bind/fuchsia.misc", |
| ] |
| } |
| |
| 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" |
| tests = "bind-tests/ti_ina231_speakers-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.i2c", |
| "//src/devices/bind/fuchsia.misc", |
| ] |
| } |
| |
| driver_bind_rules("brownout_protection_bind") { |
| rules = "bind/brownout_protection.bind" |
| header_output = "brownout_protection_bind.h" |
| bind_output = "brownout_protection_bind.bc" |
| tests = "bind-tests/brownout_protection-test.json" |
| 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" |
| tests = "bind-tests/pwm_init-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.pwm", |
| ] |
| } |
| |
| driver_bind_rules("nelson_aml_sdio_bind") { |
| rules = "bind/nelson_aml_sdio.bind" |
| header_output = "nelson_aml_sdio_bind.h" |
| bind_output = "nelson_aml_sdio_bind.bc" |
| tests = "bind-tests/nelson_aml_sdio-test.json" |
| 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/nelson_wifi.bind" |
| header_output = "nelson_wifi_bind.h" |
| bind_output = "nelson_wifi_bind.bc" |
| tests = "bind-tests/nelson-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" |
| tests = "bind-tests/aml_secure_mem-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("nelson_selina_bind") { |
| rules = "bind/nelson_selina.bind" |
| header_output = "nelson_selina_bind.h" |
| bind_output = "nelson_selina_bind.bc" |
| tests = "bind-tests/nelson_selina-test.json" |
| 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_0_bind") { |
| rules = "bind/spi_0.bind" |
| header_output = "spi_0_bind.h" |
| bind_output = "spi_0_bind.bc" |
| tests = "bind-tests/spi_0-test.json" |
| 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("spi_1_bind") { |
| rules = "bind/spi_1.bind" |
| header_output = "spi_1_bind.h" |
| bind_output = "spi_1_bind.bc" |
| tests = "bind-tests/spi_1-test.json" |
| 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("nelson_tee_bind") { |
| rules = "bind/nelson_tee.bind" |
| header_output = "nelson_tee_bind.h" |
| bind_output = "nelson_tee_bind.bc" |
| tests = "bind-tests/nelson_tee-test.json" |
| 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" |
| tests = "bind-tests/aml_thermal_pll-test.json" |
| 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" |
| tests = "bind-tests/gt6853_touch-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.goodix.platform", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.i2c", |
| "//src/devices/bind/fuchsia.misc", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| driver_bind_rules("nelson_xhci_bind") { |
| rules = "bind/nelson_xhci.bind" |
| header_output = "nelson_xhci_bind.h" |
| bind_output = "nelson_xhci_bind.bc" |
| tests = "bind-tests/nelson_xhci-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.usb.phy", |
| ] |
| } |
| |
| driver_bind_rules("nelson_dwc2_bind") { |
| rules = "bind/nelson_dwc2.bind" |
| header_output = "nelson_dwc2_bind.h" |
| bind_output = "nelson_dwc2_bind.bc" |
| tests = "bind-tests/dwc2-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.usb.phy", |
| ] |
| } |
| |
| driver_bind_rules("nelson_aml_video_bind") { |
| rules = "bind/nelson_aml_video.bind" |
| header_output = "nelson_aml_video_bind.h" |
| bind_output = "nelson_aml_video_bind.bc" |
| tests = "bind-tests/nelson_aml_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("nelson_ot_radio_bind") { |
| rules = "bind/nelson_ot_radio.bind" |
| header_output = "nelson_ot_radio_bind.h" |
| bind_output = "nelson_ot_radio_bind.bc" |
| tests = "bind-tests/nelson_ot_radio_test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d3", |
| "//src/devices/bind/fuchsia.google.platform", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.nordic.platform", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| 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-ot-radio.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_secure_mem_bind_header", |
| ":aml_thermal_pll_bind_header", |
| ":brownout_protection_bind_header", |
| ":gt6853_touch_bind_header", |
| ":nelson-bind", |
| ":nelson_aml_nna_bind_header", |
| ":nelson_aml_sdio_bind_header", |
| ":nelson_aml_video_bind_header", |
| ":nelson_backlight_bind_header", |
| ":nelson_bt_uart_bind_header", |
| ":nelson_buttons_bind_header", |
| ":nelson_display_bind_header", |
| ":nelson_dwc2_bind_header", |
| ":nelson_emmc_bind_header", |
| ":nelson_gpio_light_bind_header", |
| ":nelson_mali_bind_header", |
| ":nelson_ot_radio_bind_header", |
| ":nelson_selina_bind_header", |
| ":nelson_tcs3400_light_bind_header", |
| ":nelson_tee_bind_header", |
| ":nelson_wifi_bind_header", |
| ":nelson_xhci_bind_header", |
| ":pwm_init_bind_header", |
| ":spi_0_bind_header", |
| ":spi_1_bind_header", |
| ":ti_ina231_mlb_bind_header", |
| ":ti_ina231_speakers_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/connectivity/openthread/lib/ot-radio", |
| "//src/devices/bind/fuchsia.ams.platform:fuchsia.ams.platform_cpp", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/broadcom", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/fidl-metadata", |
| "//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\"" ] |
| } |
| |
| # 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("nelson-module") { |
| component_name = "nelson-module" |
| deps = [ ":nelson-module-driver" ] |
| info = "nelson-module-info.json" |
| colocate = true |
| root_resource = true |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":aml_secure_mem_bind_test", |
| ":aml_thermal_pll_bind_test", |
| ":brownout_protection_bind_test", |
| ":gt6853_touch_bind_test", |
| ":nelson-bind_test", |
| ":nelson_aml_nna_bind_test", |
| ":nelson_aml_sdio_bind_test", |
| ":nelson_aml_video_bind_test", |
| ":nelson_aml_video_bind_test", |
| ":nelson_backlight_bind_test", |
| ":nelson_bt_uart_bind_test", |
| ":nelson_display_bind_test", |
| ":nelson_dwc2_bind_test", |
| ":nelson_gpio_light_bind_test", |
| ":nelson_mali_bind_test", |
| ":nelson_ot_radio_bind_test", |
| ":nelson_selina_bind_test", |
| ":nelson_tcs3400_light_bind_test", |
| ":nelson_wifi_bind_test", |
| ":spi_0_bind_test", |
| ":spi_1_bind_test", |
| ] |
| } |