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