1// Copyright 2017 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "tpm.h"
6
7#include <ddk/binding.h>
8#include <ddk/driver.h>
9
10static zx_driver_ops_t tpm_driver_ops = {
11    .version = DRIVER_OPS_VERSION,
12    .bind = tpm_bind,
13};
14
15// clang-format off
16ZIRCON_DRIVER_BEGIN(tpm, tpm_driver_ops, "zircon", "0.1", 3)
17    // Handle I2C
18    // TODO(teisenbe): Make this less hacky when we have a proper I2C protocol
19    BI_ABORT_IF(NE, BIND_PCI_VID, 0x8086),
20    BI_ABORT_IF(NE, BIND_PCI_DID, 0x9d61),
21    BI_MATCH_IF(EQ, BIND_I2C_ADDR, 0x0050),
22ZIRCON_DRIVER_END(tpm);
23// clang-format on
24