225 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2# Copyright (c) 2023 Ideas on Board3%YAML 1.24---5$id: http://devicetree.org/schemas/media/i2c/thine,thp7312.yaml#6$schema: http://devicetree.org/meta-schemas/core.yaml#7 8title: THine THP73129 10maintainers:11 - Paul Elder <paul.elder@@ideasonboard.com>12 13description:14 The THP7312 is a standalone ISP controlled over i2c, and is capable of15 various image processing and correction functions, including 3A control. It16 can be connected to CMOS image sensors from various vendors, supporting both17 MIPI CSI-2 and parallel interfaces. It can also output on either MIPI CSI-218 or parallel. The hardware is capable of transmitting and receiving MIPI19 interleaved data streams with data types or multiple virtual channel20 identifiers.21 22allOf:23 - $ref: /schemas/media/video-interface-devices.yaml#24 25properties:26 compatible:27 const: thine,thp731228 29 reg:30 maxItems: 131 32 clocks:33 maxItems: 134 description: CLKI clock input35 36 thine,boot-mode:37 $ref: /schemas/types.yaml#/definitions/uint3238 minimum: 039 maximum: 140 default: 141 description:42 Boot mode of the THP7312, reflecting the value of the BOOT[0] pin strap.43 0 is for the SPI/2-wire slave boot, 1 is for the SPI master boot (from44 external flash ROM).45 46 reset-gpios:47 maxItems: 148 description:49 Reference to the GPIO connected to the RESET_N pin, if any.50 Must be released (set high) after all supplies are applied.51 52 vddcore-supply:53 description:54 1.2V supply for core, PLL, MIPI rx and MIPI tx.55 56 vhtermrx-supply:57 description:58 Supply for input (RX). 1.8V for MIPI, or 1.8/2.8/3.3V for parallel.59 60 vddtx-supply:61 description:62 Supply for output (TX). 1.8V for MIPI, or 1.8/2.8/3.3V for parallel.63 64 vddhost-supply:65 description:66 Supply for host interface. 1.8V, 2.8V, or 3.3V.67 68 vddcmos-supply:69 description:70 Supply for sensor interface. 1.8V, 2.8V, or 3.3V.71 72 vddgpio-0-supply:73 description:74 Supply for GPIO_0. 1.8V, 2.8V, or 3.3V.75 76 vddgpio-1-supply:77 description:78 Supply for GPIO_1. 1.8V, 2.8V, or 3.3V.79 80 orientation: true81 rotation: true82 83 port:84 $ref: /schemas/graph.yaml#/$defs/port-base85 additionalProperties: false86 87 properties:88 endpoint:89 $ref: /schemas/media/video-interfaces.yaml#90 unevaluatedProperties: false91 92 properties:93 bus-type:94 const: 4 # CSI-2 D-PHY95 96 data-lanes:97 description:98 This property is for lane reordering between the THP7312 and the99 SoC. The sensor supports either two-lane, or four-lane operation.100 If this property is omitted four-lane operation is assumed. For101 two-lane operation the property must be set to <1 2>.102 minItems: 2103 maxItems: 4104 items:105 maximum: 4106 107 sensors:108 type: object109 description: List of connected sensors110 111 properties:112 "#address-cells":113 const: 1114 115 "#size-cells":116 const: 0117 118 patternProperties:119 "^sensor@[01]$":120 type: object121 description:122 Sensors connected to the first and second input, with one node per123 sensor.124 125 properties:126 thine,model:127 $ref: /schemas/types.yaml#/definitions/string128 description:129 Model of the connected sensors. Must be a valid compatible string.130 131 reg:132 description: THP7312 input port number133 items:134 - maximum: 1135 136 data-lanes:137 $ref: /schemas/media/video-interfaces.yaml#/properties/data-lanes138 items:139 maxItems: 4140 description:141 This property is for lane reordering between the THP7312 and the imaging142 sensor that it is connected to.143 144 required:145 - reg146 - data-lanes147 148 additionalProperties: false149 150 required:151 - "#address-cells"152 - "#size-cells"153 154 additionalProperties: false155 156required:157 - compatible158 - reg159 - reset-gpios160 - clocks161 - vddcore-supply162 - vhtermrx-supply163 - vddtx-supply164 - vddhost-supply165 - vddcmos-supply166 - vddgpio-0-supply167 - vddgpio-1-supply168 - sensors169 - port170 171additionalProperties: false172 173examples:174 - |175 #include <dt-bindings/gpio/gpio.h>176 #include <dt-bindings/media/video-interfaces.h>177 178 i2c {179 #address-cells = <1>;180 #size-cells = <0>;181 182 camera@61 {183 compatible = "thine,thp7312";184 reg = <0x61>;185 186 pinctrl-names = "default";187 pinctrl-0 = <&cam1_pins_default>;188 189 reset-gpios = <&pio 119 GPIO_ACTIVE_LOW>;190 clocks = <&camera61_clk>;191 192 vddcore-supply = <&vsys_v4p2>;193 vhtermrx-supply = <&vsys_v4p2>;194 vddtx-supply = <&vsys_v4p2>;195 vddhost-supply = <&vsys_v4p2>;196 vddcmos-supply = <&vsys_v4p2>;197 vddgpio-0-supply = <&vsys_v4p2>;198 vddgpio-1-supply = <&vsys_v4p2>;199 200 orientation = <0>;201 rotation = <0>;202 203 sensors {204 #address-cells = <1>;205 #size-cells = <0>;206 207 sensor@0 {208 thine,model = "sony,imx258";209 reg = <0>;210 211 data-lanes = <4 1 3 2>;212 };213 };214 215 port {216 thp7312_2_endpoint: endpoint {217 remote-endpoint = <&mipi_thp7312_2>;218 bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;219 data-lanes = <4 2 1 3>;220 };221 };222 };223 };224...225