18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (C) 2009 Francisco Jerez.
38c2ecf20Sopenharmony_ci * All Rights Reserved.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining
68c2ecf20Sopenharmony_ci * a copy of this software and associated documentation files (the
78c2ecf20Sopenharmony_ci * "Software"), to deal in the Software without restriction, including
88c2ecf20Sopenharmony_ci * without limitation the rights to use, copy, modify, merge, publish,
98c2ecf20Sopenharmony_ci * distribute, sublicense, and/or sell copies of the Software, and to
108c2ecf20Sopenharmony_ci * permit persons to whom the Software is furnished to do so, subject to
118c2ecf20Sopenharmony_ci * the following conditions:
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice (including the
148c2ecf20Sopenharmony_ci * next paragraph) shall be included in all copies or substantial
158c2ecf20Sopenharmony_ci * portions of the Software.
168c2ecf20Sopenharmony_ci *
178c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
188c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
198c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
208c2ecf20Sopenharmony_ci * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
218c2ecf20Sopenharmony_ci * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
228c2ecf20Sopenharmony_ci * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
238c2ecf20Sopenharmony_ci * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
248c2ecf20Sopenharmony_ci *
258c2ecf20Sopenharmony_ci */
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#ifndef __DRM_I2C_CH7006_H__
288c2ecf20Sopenharmony_ci#define __DRM_I2C_CH7006_H__
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci/**
318c2ecf20Sopenharmony_ci * struct ch7006_encoder_params
328c2ecf20Sopenharmony_ci *
338c2ecf20Sopenharmony_ci * Describes how the ch7006 is wired up with the GPU. It should be
348c2ecf20Sopenharmony_ci * used as the @params parameter of its @set_config method.
358c2ecf20Sopenharmony_ci *
368c2ecf20Sopenharmony_ci * See "http://www.chrontel.com/pdf/7006.pdf" for their precise
378c2ecf20Sopenharmony_ci * meaning.
388c2ecf20Sopenharmony_ci */
398c2ecf20Sopenharmony_cistruct ch7006_encoder_params {
408c2ecf20Sopenharmony_ci	enum {
418c2ecf20Sopenharmony_ci		CH7006_FORMAT_RGB16 = 0,
428c2ecf20Sopenharmony_ci		CH7006_FORMAT_YCrCb24m16,
438c2ecf20Sopenharmony_ci		CH7006_FORMAT_RGB24m16,
448c2ecf20Sopenharmony_ci		CH7006_FORMAT_RGB15,
458c2ecf20Sopenharmony_ci		CH7006_FORMAT_RGB24m12C,
468c2ecf20Sopenharmony_ci		CH7006_FORMAT_RGB24m12I,
478c2ecf20Sopenharmony_ci		CH7006_FORMAT_RGB24m8,
488c2ecf20Sopenharmony_ci		CH7006_FORMAT_RGB16m8,
498c2ecf20Sopenharmony_ci		CH7006_FORMAT_RGB15m8,
508c2ecf20Sopenharmony_ci		CH7006_FORMAT_YCrCb24m8,
518c2ecf20Sopenharmony_ci	} input_format;
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci	enum {
548c2ecf20Sopenharmony_ci		CH7006_CLOCK_SLAVE = 0,
558c2ecf20Sopenharmony_ci		CH7006_CLOCK_MASTER,
568c2ecf20Sopenharmony_ci	} clock_mode;
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci	enum {
598c2ecf20Sopenharmony_ci		CH7006_CLOCK_EDGE_NEG = 0,
608c2ecf20Sopenharmony_ci		CH7006_CLOCK_EDGE_POS,
618c2ecf20Sopenharmony_ci	} clock_edge;
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci	int xcm, pcm;
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci	enum {
668c2ecf20Sopenharmony_ci		CH7006_SYNC_SLAVE = 0,
678c2ecf20Sopenharmony_ci		CH7006_SYNC_MASTER,
688c2ecf20Sopenharmony_ci	} sync_direction;
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci	enum {
718c2ecf20Sopenharmony_ci		CH7006_SYNC_SEPARATED = 0,
728c2ecf20Sopenharmony_ci		CH7006_SYNC_EMBEDDED,
738c2ecf20Sopenharmony_ci	} sync_encoding;
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci	enum {
768c2ecf20Sopenharmony_ci		CH7006_POUT_1_8V = 0,
778c2ecf20Sopenharmony_ci		CH7006_POUT_3_3V,
788c2ecf20Sopenharmony_ci	} pout_level;
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci	enum {
818c2ecf20Sopenharmony_ci		CH7006_ACTIVE_HSYNC = 0,
828c2ecf20Sopenharmony_ci		CH7006_ACTIVE_DSTART,
838c2ecf20Sopenharmony_ci	} active_detect;
848c2ecf20Sopenharmony_ci};
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ci#endif
87