THine THP7312

Schema identifier ($id): "http://devicetree.org/schemas/media/i2c/thine,thp7312.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Paul Elder <paul.elder@@ideasonboard.com>"

The THP7312 is a standalone ISP controlled over i2c, and is capable of various image processing and correction functions, including 3A control. It can be connected to CMOS image sensors from various vendors, supporting both MIPI CSI-2 and parallel interfaces. It can also output on either MIPI CSI-2 or parallel. The hardware is capable of transmitting and receiving MIPI interleaved data streams with data types or multiple virtual channel identifiers.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/media/video-interface-devices.yaml#

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "thine,thp7312"

reg — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Maximum number of items (maxItems): 1

CLKI clock input

thine,boot-mode — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Minimum value (minimum): 0

Maximum value (maximum): 1

Default value (default): 1

Boot mode of the THP7312, reflecting the value of the BOOT[0] pin strap. 0 is for the SPI/2-wire slave boot, 1 is for the SPI master boot (from external flash ROM).

reset-gpios — required here #

Maximum number of items (maxItems): 1

Reference to the GPIO connected to the RESET_N pin, if any. Must be released (set high) after all supplies are applied.

vddcore-supply — required here #

1.2V supply for core, PLL, MIPI rx and MIPI tx.

vhtermrx-supply — required here #

Supply for input (RX). 1.8V for MIPI, or 1.8/2.8/3.3V for parallel.

vddtx-supply — required here #

Supply for output (TX). 1.8V for MIPI, or 1.8/2.8/3.3V for parallel.

vddhost-supply — required here #

Supply for host interface. 1.8V, 2.8V, or 3.3V.

vddcmos-supply — required here #

Supply for sensor interface. 1.8V, 2.8V, or 3.3V.

vddgpio-0-supply — required here #

Supply for GPIO_0. 1.8V, 2.8V, or 3.3V.

vddgpio-1-supply — required here #

Supply for GPIO_1. 1.8V, 2.8V, or 3.3V.

orientation — not listed as required here #

true — No constraints added by this property rule.

rotation — not listed as required here #

true — No constraints added by this property rule.

port — required here #

Shared schema rule ($ref): /schemas/graph.yaml#/$defs/port-base

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

endpoint — not listed as required here

Shared schema rule ($ref): /schemas/media/video-interfaces.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

bus-type — not listed as required here

Exact value (const): 4

data-lanes — not listed as required here

This property is for lane reordering between the THP7312 and the SoC. The sensor supports either two-lane, or four-lane operation. If this property is omitted four-lane operation is assumed. For two-lane operation the property must be set to <1 2>.

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 4

Array item rules (items)

Maximum value (maximum): 4

sensors — required here #

Value type (type): "object"

List of connected sensors

Properties and child nodes (properties) #

#address-cells — required here

Exact value (const): 1

#size-cells — required here

Exact value (const): 0

Properties matching a name pattern (patternProperties) #

^sensor@[01]$ — name matches this regular expression

Value type (type): "object"

Sensors connected to the first and second input, with one node per sensor.

Properties and child nodes (properties)

thine,model — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/string

Model of the connected sensors. Must be a valid compatible string.

reg — required here

THP7312 input port number

Array item rules (items)

Item 1

Maximum value (maximum): 1

data-lanes — required here

Shared schema rule ($ref): /schemas/media/video-interfaces.yaml#/properties/data-lanes

Maximum number of items (maxItems): 4

This property is for lane reordering between the THP7312 and the imaging sensor that it is connected to.

Required in this object (required): "reg", "data-lanes"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Required in this object (required): "#address-cells", "#size-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg", "reset-gpios", "clocks", "vddcore-supply", "vhtermrx-supply", "vddtx-supply", "vddhost-supply", "vddcmos-supply", "vddgpio-0-supply", "vddgpio-1-supply", "sensors", "port"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/media/video-interfaces.h>

i2c {
    #address-cells = <1>;
    #size-cells = <0>;

    camera@61 {
        compatible = "thine,thp7312";
        reg = <0x61>;

        pinctrl-names = "default";
        pinctrl-0 = <&cam1_pins_default>;

        reset-gpios = <&pio 119 GPIO_ACTIVE_LOW>;
        clocks = <&camera61_clk>;

        vddcore-supply = <&vsys_v4p2>;
        vhtermrx-supply = <&vsys_v4p2>;
        vddtx-supply = <&vsys_v4p2>;
        vddhost-supply = <&vsys_v4p2>;
        vddcmos-supply = <&vsys_v4p2>;
        vddgpio-0-supply = <&vsys_v4p2>;
        vddgpio-1-supply = <&vsys_v4p2>;

        orientation = <0>;
        rotation = <0>;

        sensors {
            #address-cells = <1>;
            #size-cells = <0>;

            sensor@0 {
                thine,model = "sony,imx258";
                reg = <0>;

                data-lanes = <4 1 3 2>;
            };
        };

        port {
            thp7312_2_endpoint: endpoint {
                remote-endpoint = <&mipi_thp7312_2>;
                bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
                data-lanes = <4 2 1 3>;
            };
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Line 2: Copyright (c) 2023 Ideas on Board

Line 94: CSI-2 D-PHY

Edit this page