1*ae5de77eSEmmanuel VadotDevice-Tree bindings for the NXP TDA1997x HDMI receiver 2*ae5de77eSEmmanuel Vadot 3*ae5de77eSEmmanuel VadotThe TDA19971/73 are HDMI video receivers. 4*ae5de77eSEmmanuel Vadot 5*ae5de77eSEmmanuel VadotThe TDA19971 Video port output pins can be used as follows: 6*ae5de77eSEmmanuel Vadot - RGB 8bit per color (24 bits total): R[11:4] B[11:4] G[11:4] 7*ae5de77eSEmmanuel Vadot - YUV444 8bit per color (24 bits total): Y[11:4] Cr[11:4] Cb[11:4] 8*ae5de77eSEmmanuel Vadot - YUV422 semi-planar 8bit per component (16 bits total): Y[11:4] CbCr[11:4] 9*ae5de77eSEmmanuel Vadot - YUV422 semi-planar 10bit per component (20 bits total): Y[11:2] CbCr[11:2] 10*ae5de77eSEmmanuel Vadot - YUV422 semi-planar 12bit per component (24 bits total): - Y[11:0] CbCr[11:0] 11*ae5de77eSEmmanuel Vadot - YUV422 BT656 8bit per component (8 bits total): YCbCr[11:4] (2-cycles) 12*ae5de77eSEmmanuel Vadot - YUV422 BT656 10bit per component (10 bits total): YCbCr[11:2] (2-cycles) 13*ae5de77eSEmmanuel Vadot - YUV422 BT656 12bit per component (12 bits total): YCbCr[11:0] (2-cycles) 14*ae5de77eSEmmanuel Vadot 15*ae5de77eSEmmanuel VadotThe TDA19973 Video port output pins can be used as follows: 16*ae5de77eSEmmanuel Vadot - RGB 12bit per color (36 bits total): R[11:0] B[11:0] G[11:0] 17*ae5de77eSEmmanuel Vadot - YUV444 12bit per color (36 bits total): Y[11:0] Cb[11:0] Cr[11:0] 18*ae5de77eSEmmanuel Vadot - YUV422 semi-planar 12bit per component (24 bits total): Y[11:0] CbCr[11:0] 19*ae5de77eSEmmanuel Vadot - YUV422 BT656 12bit per component (12 bits total): YCbCr[11:0] (2-cycles) 20*ae5de77eSEmmanuel Vadot 21*ae5de77eSEmmanuel VadotThe Video port output pins are mapped via 4-bit 'pin groups' allowing 22*ae5de77eSEmmanuel Vadotfor a variety of connection possibilities including swapping pin order within 23*ae5de77eSEmmanuel Vadotpin groups. The video_portcfg device-tree property consists of register mapping 24*ae5de77eSEmmanuel Vadotpairs which map a chip-specific VP output register to a 4-bit pin group. If 25*ae5de77eSEmmanuel Vadotthe pin group needs to be bit-swapped you can use the *_S pin-group defines. 26*ae5de77eSEmmanuel Vadot 27*ae5de77eSEmmanuel VadotRequired Properties: 28*ae5de77eSEmmanuel Vadot - compatible : 29*ae5de77eSEmmanuel Vadot - "nxp,tda19971" for the TDA19971 30*ae5de77eSEmmanuel Vadot - "nxp,tda19973" for the TDA19973 31*ae5de77eSEmmanuel Vadot - reg : I2C slave address 32*ae5de77eSEmmanuel Vadot - interrupts : The interrupt number 33*ae5de77eSEmmanuel Vadot - DOVDD-supply : Digital I/O supply 34*ae5de77eSEmmanuel Vadot - DVDD-supply : Digital Core supply 35*ae5de77eSEmmanuel Vadot - AVDD-supply : Analog supply 36*ae5de77eSEmmanuel Vadot - nxp,vidout-portcfg : array of pairs mapping VP output pins to pin groups. 37*ae5de77eSEmmanuel Vadot 38*ae5de77eSEmmanuel VadotOptional Properties: 39*ae5de77eSEmmanuel Vadot - nxp,audout-format : DAI bus format: "i2s" or "spdif". 40*ae5de77eSEmmanuel Vadot - nxp,audout-width : width of audio output data bus (1-4). 41*ae5de77eSEmmanuel Vadot - nxp,audout-layout : data layout (0=AP0 used, 1=AP0/AP1/AP2/AP3 used). 42*ae5de77eSEmmanuel Vadot - nxp,audout-mclk-fs : Multiplication factor between stream rate and codec 43*ae5de77eSEmmanuel Vadot mclk. 44*ae5de77eSEmmanuel Vadot 45*ae5de77eSEmmanuel VadotThe port node shall contain one endpoint child node for its digital 46*ae5de77eSEmmanuel Vadotoutput video port, in accordance with the video interface bindings defined in 47*ae5de77eSEmmanuel VadotDocumentation/devicetree/bindings/media/video-interfaces.txt. 48*ae5de77eSEmmanuel Vadot 49*ae5de77eSEmmanuel VadotOptional Endpoint Properties: 50*ae5de77eSEmmanuel Vadot The following three properties are defined in video-interfaces.txt and 51*ae5de77eSEmmanuel Vadot are valid for the output parallel bus endpoint: 52*ae5de77eSEmmanuel Vadot - hsync-active: Horizontal synchronization polarity. Defaults to active high. 53*ae5de77eSEmmanuel Vadot - vsync-active: Vertical synchronization polarity. Defaults to active high. 54*ae5de77eSEmmanuel Vadot - data-active: Data polarity. Defaults to active high. 55*ae5de77eSEmmanuel Vadot 56*ae5de77eSEmmanuel VadotExamples: 57*ae5de77eSEmmanuel Vadot - VP[15:0] connected to IMX6 CSI_DATA[19:4] for 16bit YUV422 58*ae5de77eSEmmanuel Vadot 16bit I2S layout0 with a 128*fs clock (A_WS, AP0, A_CLK pins) 59*ae5de77eSEmmanuel Vadot hdmi-receiver@48 { 60*ae5de77eSEmmanuel Vadot compatible = "nxp,tda19971"; 61*ae5de77eSEmmanuel Vadot pinctrl-names = "default"; 62*ae5de77eSEmmanuel Vadot pinctrl-0 = <&pinctrl_tda1997x>; 63*ae5de77eSEmmanuel Vadot reg = <0x48>; 64*ae5de77eSEmmanuel Vadot interrupt-parent = <&gpio1>; 65*ae5de77eSEmmanuel Vadot interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 66*ae5de77eSEmmanuel Vadot DOVDD-supply = <®_3p3v>; 67*ae5de77eSEmmanuel Vadot AVDD-supply = <®_1p8v>; 68*ae5de77eSEmmanuel Vadot DVDD-supply = <®_1p8v>; 69*ae5de77eSEmmanuel Vadot /* audio */ 70*ae5de77eSEmmanuel Vadot #sound-dai-cells = <0>; 71*ae5de77eSEmmanuel Vadot nxp,audout-format = "i2s"; 72*ae5de77eSEmmanuel Vadot nxp,audout-layout = <0>; 73*ae5de77eSEmmanuel Vadot nxp,audout-width = <16>; 74*ae5de77eSEmmanuel Vadot nxp,audout-mclk-fs = <128>; 75*ae5de77eSEmmanuel Vadot /* 76*ae5de77eSEmmanuel Vadot * The 8bpp YUV422 semi-planar mode outputs CbCr[11:4] 77*ae5de77eSEmmanuel Vadot * and Y[11:4] across 16bits in the same pixclk cycle. 78*ae5de77eSEmmanuel Vadot */ 79*ae5de77eSEmmanuel Vadot nxp,vidout-portcfg = 80*ae5de77eSEmmanuel Vadot /* Y[11:8]<->VP[15:12]<->CSI_DATA[19:16] */ 81*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V15_12 TDA1997X_G_Y_11_8 >, 82*ae5de77eSEmmanuel Vadot /* Y[7:4]<->VP[11:08]<->CSI_DATA[15:12] */ 83*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V11_08 TDA1997X_G_Y_7_4 >, 84*ae5de77eSEmmanuel Vadot /* CbCc[11:8]<->VP[07:04]<->CSI_DATA[11:8] */ 85*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V07_04 TDA1997X_R_CR_CBCR_11_8 >, 86*ae5de77eSEmmanuel Vadot /* CbCr[7:4]<->VP[03:00]<->CSI_DATA[7:4] */ 87*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V03_00 TDA1997X_R_CR_CBCR_7_4 >; 88*ae5de77eSEmmanuel Vadot 89*ae5de77eSEmmanuel Vadot port { 90*ae5de77eSEmmanuel Vadot tda1997x_to_ipu1_csi0_mux: endpoint { 91*ae5de77eSEmmanuel Vadot remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>; 92*ae5de77eSEmmanuel Vadot bus-width = <16>; 93*ae5de77eSEmmanuel Vadot hsync-active = <1>; 94*ae5de77eSEmmanuel Vadot vsync-active = <1>; 95*ae5de77eSEmmanuel Vadot data-active = <1>; 96*ae5de77eSEmmanuel Vadot }; 97*ae5de77eSEmmanuel Vadot }; 98*ae5de77eSEmmanuel Vadot }; 99*ae5de77eSEmmanuel Vadot - VP[15:8] connected to IMX6 CSI_DATA[19:12] for 8bit BT656 100*ae5de77eSEmmanuel Vadot 16bit I2S layout0 with a 128*fs clock (A_WS, AP0, A_CLK pins) 101*ae5de77eSEmmanuel Vadot hdmi-receiver@48 { 102*ae5de77eSEmmanuel Vadot compatible = "nxp,tda19971"; 103*ae5de77eSEmmanuel Vadot pinctrl-names = "default"; 104*ae5de77eSEmmanuel Vadot pinctrl-0 = <&pinctrl_tda1997x>; 105*ae5de77eSEmmanuel Vadot reg = <0x48>; 106*ae5de77eSEmmanuel Vadot interrupt-parent = <&gpio1>; 107*ae5de77eSEmmanuel Vadot interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 108*ae5de77eSEmmanuel Vadot DOVDD-supply = <®_3p3v>; 109*ae5de77eSEmmanuel Vadot AVDD-supply = <®_1p8v>; 110*ae5de77eSEmmanuel Vadot DVDD-supply = <®_1p8v>; 111*ae5de77eSEmmanuel Vadot /* audio */ 112*ae5de77eSEmmanuel Vadot #sound-dai-cells = <0>; 113*ae5de77eSEmmanuel Vadot nxp,audout-format = "i2s"; 114*ae5de77eSEmmanuel Vadot nxp,audout-layout = <0>; 115*ae5de77eSEmmanuel Vadot nxp,audout-width = <16>; 116*ae5de77eSEmmanuel Vadot nxp,audout-mclk-fs = <128>; 117*ae5de77eSEmmanuel Vadot /* 118*ae5de77eSEmmanuel Vadot * The 8bpp YUV422 semi-planar mode outputs CbCr[11:4] 119*ae5de77eSEmmanuel Vadot * and Y[11:4] across 16bits in the same pixclk cycle. 120*ae5de77eSEmmanuel Vadot */ 121*ae5de77eSEmmanuel Vadot nxp,vidout-portcfg = 122*ae5de77eSEmmanuel Vadot /* Y[11:8]<->VP[15:12]<->CSI_DATA[19:16] */ 123*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V15_12 TDA1997X_G_Y_11_8 >, 124*ae5de77eSEmmanuel Vadot /* Y[7:4]<->VP[11:08]<->CSI_DATA[15:12] */ 125*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V11_08 TDA1997X_G_Y_7_4 >, 126*ae5de77eSEmmanuel Vadot /* CbCc[11:8]<->VP[07:04]<->CSI_DATA[11:8] */ 127*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V07_04 TDA1997X_R_CR_CBCR_11_8 >, 128*ae5de77eSEmmanuel Vadot /* CbCr[7:4]<->VP[03:00]<->CSI_DATA[7:4] */ 129*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V03_00 TDA1997X_R_CR_CBCR_7_4 >; 130*ae5de77eSEmmanuel Vadot 131*ae5de77eSEmmanuel Vadot port { 132*ae5de77eSEmmanuel Vadot tda1997x_to_ipu1_csi0_mux: endpoint { 133*ae5de77eSEmmanuel Vadot remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>; 134*ae5de77eSEmmanuel Vadot bus-width = <16>; 135*ae5de77eSEmmanuel Vadot hsync-active = <1>; 136*ae5de77eSEmmanuel Vadot vsync-active = <1>; 137*ae5de77eSEmmanuel Vadot data-active = <1>; 138*ae5de77eSEmmanuel Vadot }; 139*ae5de77eSEmmanuel Vadot }; 140*ae5de77eSEmmanuel Vadot }; 141*ae5de77eSEmmanuel Vadot - VP[15:8] connected to IMX6 CSI_DATA[19:12] for 8bit BT656 142*ae5de77eSEmmanuel Vadot 16bit I2S layout0 with a 128*fs clock (A_WS, AP0, A_CLK pins) 143*ae5de77eSEmmanuel Vadot hdmi-receiver@48 { 144*ae5de77eSEmmanuel Vadot compatible = "nxp,tda19971"; 145*ae5de77eSEmmanuel Vadot pinctrl-names = "default"; 146*ae5de77eSEmmanuel Vadot pinctrl-0 = <&pinctrl_tda1997x>; 147*ae5de77eSEmmanuel Vadot reg = <0x48>; 148*ae5de77eSEmmanuel Vadot interrupt-parent = <&gpio1>; 149*ae5de77eSEmmanuel Vadot interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 150*ae5de77eSEmmanuel Vadot DOVDD-supply = <®_3p3v>; 151*ae5de77eSEmmanuel Vadot AVDD-supply = <®_1p8v>; 152*ae5de77eSEmmanuel Vadot DVDD-supply = <®_1p8v>; 153*ae5de77eSEmmanuel Vadot /* audio */ 154*ae5de77eSEmmanuel Vadot #sound-dai-cells = <0>; 155*ae5de77eSEmmanuel Vadot nxp,audout-format = "i2s"; 156*ae5de77eSEmmanuel Vadot nxp,audout-layout = <0>; 157*ae5de77eSEmmanuel Vadot nxp,audout-width = <16>; 158*ae5de77eSEmmanuel Vadot nxp,audout-mclk-fs = <128>; 159*ae5de77eSEmmanuel Vadot /* 160*ae5de77eSEmmanuel Vadot * The 8bpp BT656 mode outputs YCbCr[11:4] across 8bits over 161*ae5de77eSEmmanuel Vadot * 2 pixclk cycles. 162*ae5de77eSEmmanuel Vadot */ 163*ae5de77eSEmmanuel Vadot nxp,vidout-portcfg = 164*ae5de77eSEmmanuel Vadot /* YCbCr[11:8]<->VP[15:12]<->CSI_DATA[19:16] */ 165*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V15_12 TDA1997X_R_CR_CBCR_11_8 >, 166*ae5de77eSEmmanuel Vadot /* YCbCr[7:4]<->VP[11:08]<->CSI_DATA[15:12] */ 167*ae5de77eSEmmanuel Vadot < TDA1997X_VP24_V11_08 TDA1997X_R_CR_CBCR_7_4 >, 168*ae5de77eSEmmanuel Vadot 169*ae5de77eSEmmanuel Vadot port { 170*ae5de77eSEmmanuel Vadot tda1997x_to_ipu1_csi0_mux: endpoint { 171*ae5de77eSEmmanuel Vadot remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>; 172*ae5de77eSEmmanuel Vadot bus-width = <16>; 173*ae5de77eSEmmanuel Vadot hsync-active = <1>; 174*ae5de77eSEmmanuel Vadot vsync-active = <1>; 175*ae5de77eSEmmanuel Vadot data-active = <1>; 176*ae5de77eSEmmanuel Vadot }; 177*ae5de77eSEmmanuel Vadot }; 178*ae5de77eSEmmanuel Vadot }; 179