blob: 8008deb2ec066de9907c50146ed8f26a3498c147 [file] [log] [blame]
# Copyright 2023 Google LLC.
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
package(default_visibility = ["//visibility:public"])
cc_library(
name = "smc_ctrl",
srcs = [
"autogen/dif_smc_ctrl_autogen.c",
"autogen/dif_smc_ctrl_autogen.h",
"dif_smc_ctrl.c",
],
hdrs = [
"dif_smc_ctrl.h",
],
deps = [
"//hw/top_matcha/ip/smc_ctrl/data:smc_ctrl_regs",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "cam_ctrl",
srcs = [
"autogen/dif_cam_ctrl_autogen.c",
"autogen/dif_cam_ctrl_autogen.h",
"dif_cam_ctrl.c",
],
hdrs = [
"dif_cam_ctrl.h",
],
deps = [
"//hw/top_matcha/ip/cam_ctrl/data:cam_ctrl_regs",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "isp_wrapper",
srcs = [
"autogen/dif_isp_wrapper_autogen.c",
"autogen/dif_isp_wrapper_autogen.h",
] + select({
"//rules:sparrow_platform": [
"dif_isp_wrapper_pico.c",
],
"//conditions:default": [
"dif_isp_wrapper.c",
],
}),
hdrs = [
"dif_isp_wrapper.h",
"@isp_yocto//include:yocto_isp_register_address.h",
],
deps = [
"//hw/top_matcha/ip/isp_wrapper/data:isp_wrapper_regs",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "rv_plic_sec",
srcs = [
"autogen/dif_rv_plic_autogen.c",
"autogen/dif_rv_plic_autogen.h",
"dif_rv_plic.c",
],
hdrs = [
"dif_rv_plic.h",
],
deps = [
"//hw/top_matcha:rv_plic_regs_h",
"@lowrisc_opentitan//sw/device/lib/base:bitfield",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "rv_plic_smc",
srcs = [
"autogen/dif_rv_plic_autogen.h",
"autogen/dif_rv_plic_smc_autogen.c",
"dif_rv_plic_smc.c",
],
hdrs = [
"dif_rv_plic.h",
],
deps = [
"//hw/top_matcha:rv_plic_smc_regs_h",
"@lowrisc_opentitan//sw/device/lib/base:bitfield",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "tlul_mailbox",
srcs = [
"autogen/dif_tlul_mailbox_autogen.c",
"autogen/dif_tlul_mailbox_autogen.h",
"dif_tlul_mailbox.c",
],
hdrs = [
"dif_tlul_mailbox.h",
],
deps = [
"//hw/top_matcha/ip/tlul_mailbox/data:tlul_mailbox_regs",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "ml_top",
srcs = [
"autogen/dif_ml_top_autogen.c",
"autogen/dif_ml_top_autogen.h",
"dif_ml_top.c",
],
hdrs = [
"dif_ml_top.h",
],
deps = [
"//hw/top_matcha/ip/ml_top/data:ml_top_regs",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "dma",
srcs = [
"autogen/dif_dma_autogen.c",
"autogen/dif_dma_autogen.h",
"dif_dma.c",
],
hdrs = [
"dif_dma.h",
],
deps = [
"//hw/top_matcha/ip/dma/data:dma_regs",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "pinmux",
srcs = [
"dif_pinmux.c",
"@lowrisc_opentitan//sw/device/lib/dif:autogen/dif_pinmux_autogen.c",
"@lowrisc_opentitan//sw/device/lib/dif:autogen/dif_pinmux_autogen.h",
],
hdrs = [
"@lowrisc_opentitan//sw/device/lib/dif:dif_pinmux.h",
],
deps = [
"//hw/top_matcha:pinmux_regs",
"@lowrisc_opentitan//sw/device/lib/base:bitfield",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "rstmgr",
srcs = [
"@lowrisc_opentitan//sw/device/lib/dif:autogen/dif_rstmgr_autogen.c",
"@lowrisc_opentitan//sw/device/lib/dif:dif_rstmgr.c",
],
deps = [
"//hw/top_matcha/ip/rstmgr/data/autogen:rstmgr_regs",
"@lowrisc_opentitan//sw/device/lib/base:bitfield",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
"@lowrisc_opentitan//sw/device/lib/dif:rstmgr_intf",
],
)
cc_library(
name = "clkmgr",
srcs = [
"dif_clkmgr.c",
"@lowrisc_opentitan//sw/device/lib/dif:autogen/dif_clkmgr_autogen.c",
"@lowrisc_opentitan//sw/device/lib/dif:autogen/dif_clkmgr_autogen.h",
],
hdrs = ["dif_clkmgr.h"],
deps = [
"//hw/top_matcha:clkmgr_regs",
"@lowrisc_opentitan//sw/device/lib/base:bitfield",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "i2s",
srcs = [
"autogen/dif_i2s_autogen.c",
"autogen/dif_i2s_autogen.h",
"dif_i2s.c",
],
hdrs = [
"dif_i2s.h",
],
deps = [
"//hw/top_matcha/ip/i2s/data:i2s_regs",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
cc_library(
name = "alert_handler",
srcs = [
"@lowrisc_opentitan//sw/device/lib/dif:autogen/dif_alert_handler_autogen.c",
"@lowrisc_opentitan//sw/device/lib/dif:dif_alert_handler.c",
],
hdrs = [
"@lowrisc_opentitan//sw/device/lib/dif:autogen/dif_alert_handler_autogen.h",
"@lowrisc_opentitan//sw/device/lib/dif:dif_alert_handler.h",
],
deps = [
"//hw/top_matcha:alert_handler_regs_h",
"@lowrisc_opentitan//sw/device/lib/base:bitfield",
"@lowrisc_opentitan//sw/device/lib/base:macros",
"@lowrisc_opentitan//sw/device/lib/base:memory",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/base:multibits",
"@lowrisc_opentitan//sw/device/lib/dif:base",
],
)
#TODO(b/249392661): Add unit test for each dif component.