blob: ccbe8fd3abcff3aea794e90258e36fb28422cbc8 [file] [log] [blame]
// Copyright 2018 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.
library fuchsia.hardware.mipicsi;
using fuchsia.hardware.camera;
using zx;
type MipiInfo = struct {
// Number of channels used.
channel uint32;
// Number of lanes used.
lanes uint32;
// Used to program MIPI_PHY_THS_SETTLE. No documentation.
ui_value uint32;
// MIPI CSI Version.
csi_version uint32;
};
/// Values for Image Formats.
type MipiImageFormat = strict enum : uint32 {
AM_RAW6 = 0x1;
AM_RAW7 = 0x2;
AM_RAW8 = 0x3;
AM_RAW10 = 0x4;
AM_RAW12 = 0x5;
AM_RAW14 = 0x6;
};
/// Values for different MIPI modes.
type MipiModes = strict enum : uint32 {
DDR_MODE = 0x0;
// Direct mode.
DIR_MODE = 0x1;
// Dual Overlay mode.
DOL_MODE = 0x2;
};
/// Values for virtual channel.
type MipiPath = strict enum : uint32 {
PATH0 = 0x0;
PATH1 = 0x1;
};
type MipiAdapInfo = struct {
resolution fuchsia.hardware.camera.Dimensions;
format MipiImageFormat;
mode MipiModes;
path MipiPath;
};
@transport("Banjo")
@banjo_layout("ddk-protocol")
closed protocol MipiCsi {
strict Init(struct {
mipi_info MipiInfo;
adap_info MipiAdapInfo;
}) -> (struct {
s zx.Status;
});
strict DeInit() -> (struct {
s zx.Status;
});
};