Home | History | Annotate | Line # | Download | only in media
      1  1.1  jmcneill /*	$NetBSD: tda1997x.h,v 1.1.1.1 2018/04/28 18:25:53 jmcneill Exp $	*/
      2  1.1  jmcneill 
      3  1.1  jmcneill /* SPDX-License-Identifier: GPL-2.0 */
      4  1.1  jmcneill /*
      5  1.1  jmcneill  * Copyright (C) 2017 Gateworks Corporation
      6  1.1  jmcneill  */
      7  1.1  jmcneill #ifndef _DT_BINDINGS_MEDIA_TDA1997X_H
      8  1.1  jmcneill #define _DT_BINDINGS_MEDIA_TDA1997X_H
      9  1.1  jmcneill 
     10  1.1  jmcneill /* TDA19973 36bit Video Port control registers */
     11  1.1  jmcneill #define TDA1997X_VP36_35_32	0
     12  1.1  jmcneill #define TDA1997X_VP36_31_28	1
     13  1.1  jmcneill #define TDA1997X_VP36_27_24	2
     14  1.1  jmcneill #define TDA1997X_VP36_23_20	3
     15  1.1  jmcneill #define TDA1997X_VP36_19_16	4
     16  1.1  jmcneill #define TDA1997X_VP36_15_12	5
     17  1.1  jmcneill #define TDA1997X_VP36_11_08	6
     18  1.1  jmcneill #define TDA1997X_VP36_07_04	7
     19  1.1  jmcneill #define TDA1997X_VP36_03_00	8
     20  1.1  jmcneill 
     21  1.1  jmcneill /* TDA19971 24bit Video Port control registers */
     22  1.1  jmcneill #define TDA1997X_VP24_V23_20	0
     23  1.1  jmcneill #define TDA1997X_VP24_V19_16	1
     24  1.1  jmcneill #define TDA1997X_VP24_V15_12	3
     25  1.1  jmcneill #define TDA1997X_VP24_V11_08	4
     26  1.1  jmcneill #define TDA1997X_VP24_V07_04	6
     27  1.1  jmcneill #define TDA1997X_VP24_V03_00	7
     28  1.1  jmcneill 
     29  1.1  jmcneill /* Pin groups */
     30  1.1  jmcneill #define TDA1997X_VP_OUT_EN        0x80	/* enable output group */
     31  1.1  jmcneill #define TDA1997X_VP_HIZ           0x40	/* hi-Z output group when not used */
     32  1.1  jmcneill #define TDA1997X_VP_SWP           0x10	/* pin-swap output group */
     33  1.1  jmcneill #define TDA1997X_R_CR_CBCR_3_0    (0 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ)
     34  1.1  jmcneill #define TDA1997X_R_CR_CBCR_7_4    (1 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ)
     35  1.1  jmcneill #define TDA1997X_R_CR_CBCR_11_8   (2 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ)
     36  1.1  jmcneill #define TDA1997X_B_CB_3_0         (3 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ)
     37  1.1  jmcneill #define TDA1997X_B_CB_7_4         (4 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ)
     38  1.1  jmcneill #define TDA1997X_B_CB_11_8        (5 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ)
     39  1.1  jmcneill #define TDA1997X_G_Y_3_0          (6 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ)
     40  1.1  jmcneill #define TDA1997X_G_Y_7_4          (7 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ)
     41  1.1  jmcneill #define TDA1997X_G_Y_11_8         (8 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ)
     42  1.1  jmcneill /* pinswapped groups */
     43  1.1  jmcneill #define TDA1997X_R_CR_CBCR_3_0_S  (TDA1997X_R_CR_CBCR_3_0 | TDA1997X_VP_SWAP)
     44  1.1  jmcneill #define TDA1997X_R_CR_CBCR_7_4_S  (TDA1997X_R_CR_CBCR_7_4 | TDA1997X_VP_SWAP)
     45  1.1  jmcneill #define TDA1997X_R_CR_CBCR_11_8_S (TDA1997X_R_CR_CBCR_11_8 | TDA1997X_VP_SWAP)
     46  1.1  jmcneill #define TDA1997X_B_CB_3_0_S       (TDA1997X_B_CB_3_0 | TDA1997X_VP_SWAP)
     47  1.1  jmcneill #define TDA1997X_B_CB_7_4_S       (TDA1997X_B_CB_7_4 | TDA1997X_VP_SWAP)
     48  1.1  jmcneill #define TDA1997X_B_CB_11_8_S      (TDA1997X_B_CB_11_8 | TDA1997X_VP_SWAP)
     49  1.1  jmcneill #define TDA1997X_G_Y_3_0_S        (TDA1997X_G_Y_3_0 | TDA1997X_VP_SWAP)
     50  1.1  jmcneill #define TDA1997X_G_Y_7_4_S        (TDA1997X_G_Y_7_4 | TDA1997X_VP_SWAP)
     51  1.1  jmcneill #define TDA1997X_G_Y_11_8_S       (TDA1997X_G_Y_11_8 | TDA1997X_VP_SWAP)
     52  1.1  jmcneill 
     53  1.1  jmcneill /* Audio bus DAI format */
     54  1.1  jmcneill #define TDA1997X_I2S16			1 /* I2S 16bit */
     55  1.1  jmcneill #define TDA1997X_I2S32			2 /* I2S 32bit */
     56  1.1  jmcneill #define TDA1997X_SPDIF			3 /* SPDIF */
     57  1.1  jmcneill #define TDA1997X_OBA			4 /* One Bit Audio */
     58  1.1  jmcneill #define TDA1997X_DST			5 /* Direct Stream Transfer */
     59  1.1  jmcneill #define TDA1997X_I2S16_HBR		6 /* HBR straight in I2S 16bit mode */
     60  1.1  jmcneill #define TDA1997X_I2S16_HBR_DEMUX	7 /* HBR demux in I2S 16bit mode */
     61  1.1  jmcneill #define TDA1997X_I2S32_HBR_DEMUX	8 /* HBR demux in I2S 32bit mode */
     62  1.1  jmcneill #define TDA1997X_SPDIF_HBR_DEMUX	9 /* HBR demux in SPDIF mode */
     63  1.1  jmcneill 
     64  1.1  jmcneill /* Audio bus channel layout */
     65  1.1  jmcneill #define TDA1997X_LAYOUT0	0	/* 2-channel */
     66  1.1  jmcneill #define TDA1997X_LAYOUT1	1	/* 8-channel */
     67  1.1  jmcneill 
     68  1.1  jmcneill /* Audio bus clock */
     69  1.1  jmcneill #define TDA1997X_ACLK_16FS	0
     70  1.1  jmcneill #define TDA1997X_ACLK_32FS	1
     71  1.1  jmcneill #define TDA1997X_ACLK_64FS	2
     72  1.1  jmcneill #define TDA1997X_ACLK_128FS	3
     73  1.1  jmcneill #define TDA1997X_ACLK_256FS	4
     74  1.1  jmcneill #define TDA1997X_ACLK_512FS	5
     75  1.1  jmcneill 
     76  1.1  jmcneill #endif /* _DT_BINDINGS_MEDIA_TDA1997X_H */
     77