1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/media/i2c/techwell,tw9900.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Techwell TW9900 NTSC/PAL video decoder 8 9maintainers: 10 - Mehdi Djait <mehdi.djait@bootlin.com> 11 12description: 13 The tw9900 is a multi-standard video decoder, supporting NTSC, PAL standards 14 with auto-detection features. 15 16properties: 17 compatible: 18 const: techwell,tw9900 19 20 reg: 21 maxItems: 1 22 23 vdd-supply: 24 description: VDD power supply 25 26 reset-gpios: 27 description: GPIO descriptor for the RESET input pin 28 maxItems: 1 29 30 powerdown-gpios: 31 description: GPIO descriptor for the POWERDOWN input pin 32 maxItems: 1 33 34 ports: 35 $ref: /schemas/graph.yaml#/properties/ports 36 37 properties: 38 port@0: 39 $ref: /schemas/graph.yaml#/$defs/port-base 40 description: Analog input port 41 42 properties: 43 endpoint@0: 44 $ref: /schemas/graph.yaml#/properties/endpoint 45 description: CVBS over MUX0 46 47 endpoint@1: 48 $ref: /schemas/graph.yaml#/properties/endpoint 49 description: CVBS over MUX1 50 51 endpoint@2: 52 $ref: /schemas/graph.yaml#/properties/endpoint 53 description: Chroma over CIN0 and Y over MUX0 54 55 endpoint@3: 56 $ref: /schemas/graph.yaml#/properties/endpoint 57 description: Chroma over CIN0 and Y over MUX1 58 59 oneOf: 60 - required: 61 - endpoint@0 62 - required: 63 - endpoint@1 64 - required: 65 - endpoint@2 66 - required: 67 - endpoint@3 68 69 port@1: 70 $ref: /schemas/graph.yaml#/properties/port 71 description: Video port for the decoder output. 72 73 74 required: 75 - port@0 76 - port@1 77 78required: 79 - compatible 80 - ports 81 - reg 82 - vdd-supply 83 84additionalProperties: false 85 86examples: 87 - | 88 #include <dt-bindings/display/sdtv-standards.h> 89 #include <dt-bindings/gpio/gpio.h> 90 91 composite_connector { 92 compatible = "composite-video-connector"; 93 label = "tv"; 94 sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>; 95 96 port { 97 composite_to_tw9900: endpoint { 98 remote-endpoint = <&tw9900_to_composite>; 99 }; 100 }; 101 }; 102 103 i2c { 104 #address-cells = <1>; 105 #size-cells = <0>; 106 107 video-decoder@44 { 108 compatible = "techwell,tw9900"; 109 reg = <0x44>; 110 111 vdd-supply = <&tw9900_supply>; 112 reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; 113 114 ports { 115 #address-cells = <1>; 116 #size-cells = <0>; 117 118 port@0 { 119 #address-cells = <1>; 120 #size-cells = <0>; 121 122 reg = <0>; 123 tw9900_to_composite: endpoint@0 { 124 reg = <0>; 125 remote-endpoint = <&composite_to_tw9900>; 126 }; 127 }; 128 129 port@1 { 130 reg = <1>; 131 endpoint { 132 remote-endpoint = <&cif_in>; 133 }; 134 }; 135 }; 136 }; 137 }; 138