^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * Copyright (C) 2009 Francisco Jerez.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * All Rights Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Permission is hereby granted, free of charge, to any person obtaining
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * a copy of this software and associated documentation files (the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * "Software"), to deal in the Software without restriction, including
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * without limitation the rights to use, copy, modify, merge, publish,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * distribute, sublicense, and/or sell copies of the Software, and to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * permit persons to whom the Software is furnished to do so, subject to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) * the following conditions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * The above copyright notice and this permission notice (including the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) * next paragraph) shall be included in all copies or substantial
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) * portions of the Software.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #ifndef __DRM_I2C_CH7006_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define __DRM_I2C_CH7006_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) * struct ch7006_encoder_params
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) * Describes how the ch7006 is wired up with the GPU. It should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) * used as the @params parameter of its @set_config method.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) * See "http://www.chrontel.com/pdf/7006.pdf" for their precise
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) * meaning.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) struct ch7006_encoder_params {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) CH7006_FORMAT_RGB16 = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) CH7006_FORMAT_YCrCb24m16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) CH7006_FORMAT_RGB24m16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) CH7006_FORMAT_RGB15,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) CH7006_FORMAT_RGB24m12C,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) CH7006_FORMAT_RGB24m12I,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) CH7006_FORMAT_RGB24m8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) CH7006_FORMAT_RGB16m8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) CH7006_FORMAT_RGB15m8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) CH7006_FORMAT_YCrCb24m8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) } input_format;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) CH7006_CLOCK_SLAVE = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) CH7006_CLOCK_MASTER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) } clock_mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) CH7006_CLOCK_EDGE_NEG = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) CH7006_CLOCK_EDGE_POS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) } clock_edge;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) int xcm, pcm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) CH7006_SYNC_SLAVE = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) CH7006_SYNC_MASTER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) } sync_direction;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) CH7006_SYNC_SEPARATED = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) CH7006_SYNC_EMBEDDED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) } sync_encoding;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) CH7006_POUT_1_8V = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) CH7006_POUT_3_3V,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) } pout_level;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) CH7006_ACTIVE_HSYNC = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) CH7006_ACTIVE_DSTART,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) } active_detect;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) #endif