Commit 1e284ea9 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

Merge git://linuxtv.org/sailus/media_tree into media_stage

* git://linuxtv.org/sailus/media_tree: (47 commits)
  media: i2c: ov4689: code cleanup
  media: ov9650: Drop platform data code path
  media: ov7670: Drop unused include
  media: ov2640: Drop legacy includes
  media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver
  media: dt-bindings: add bindings for Toshiba TC358746
  phy: dphy: add support to calculate the timing based on hs_clk_rate
  phy: dphy: refactor get_default_config
  v4l: subdev: Warn if disabling streaming failed, return success
  dw9768: Enable low-power probe on ACPI
  media: i2c: imx290: Replace GAIN control with ANALOGUE_GAIN
  media: i2c: imx290: Add crop selection targets support
  media: i2c: imx290: Factor out format retrieval to separate function
  media: i2c: imx290: Move registers with fixed value to init array
  media: i2c: imx290: Create controls for fwnode properties
  media: i2c: imx290: Implement HBLANK and VBLANK controls
  media: i2c: imx290: Split control initialization to separate function
  media: i2c: imx290: Fix max gain value
  media: i2c: imx290: Add exposure time control
  media: i2c: imx290: Define more register macros
  ...
parents dbc1fdcb 7336c54a
Loading
Loading
Loading
Loading
+0 −57
Original line number Diff line number Diff line
* Sony IMX290 1/2.8-Inch CMOS Image Sensor

The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with
Square Pixel for Color Cameras. It is programmable through I2C and 4-wire
interfaces. The sensor output is available via CMOS logic parallel SDR output,
Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2 bus is the
default. No bindings have been defined for the other busses.

Required Properties:
- compatible: Should be "sony,imx290"
- reg: I2C bus address of the device
- clocks: Reference to the xclk clock.
- clock-names: Should be "xclk".
- clock-frequency: Frequency of the xclk clock in Hz.
- vdddo-supply: Sensor digital IO regulator.
- vdda-supply: Sensor analog regulator.
- vddd-supply: Sensor digital core regulator.

Optional Properties:
- reset-gpios: Sensor reset GPIO

The imx290 device node should contain one 'port' child node with
an 'endpoint' subnode. For further reading on port node refer to
Documentation/devicetree/bindings/media/video-interfaces.txt.

Required Properties on endpoint:
- data-lanes: check ../video-interfaces.txt
- link-frequencies: check ../video-interfaces.txt
- remote-endpoint: check ../video-interfaces.txt

Example:
	&i2c1 {
		...
		imx290: camera-sensor@1a {
			compatible = "sony,imx290";
			reg = <0x1a>;

			reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
			pinctrl-names = "default";
			pinctrl-0 = <&camera_rear_default>;

			clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
			clock-names = "xclk";
			clock-frequency = <37125000>;

			vdddo-supply = <&camera_vdddo_1v8>;
			vdda-supply = <&camera_vdda_2v8>;
			vddd-supply = <&camera_vddd_1v5>;

			port {
				imx290_ep: endpoint {
					data-lanes = <1 2 3 4>;
					link-frequencies = /bits/ 64 <445500000>;
					remote-endpoint = <&csiphy0_ep>;
				};
			};
		};
+134 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/ovti,ov4689.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Omnivision OV4689 CMOS

maintainers:
  - Mikhail Rudenko <mike.rudenko@gmail.com>

description: |
  The Omnivision OV4689 is a high performance, 1/3-inch, 4 megapixel
  image sensor. Ihis chip supports high frame rate speeds up to 90 fps
  at 2688x1520 resolution. It is programmable through an I2C
  interface, and sensor output is sent via 1/2/4 lane MIPI CSI-2
  connection.

allOf:
  - $ref: /schemas/media/video-interface-devices.yaml#

properties:
  compatible:
    const: ovti,ov4689

  reg:
    maxItems: 1

  clocks:
    description:
      External clock (XVCLK) for the sensor, 6-64 MHz
    maxItems: 1

  dovdd-supply:
    description:
      Digital I/O voltage supply, 1.7-3.0 V

  avdd-supply:
    description:
      Analog voltage supply, 2.6-3.0 V

  dvdd-supply:
    description:
      Digital core voltage supply, 1.1-1.3 V

  powerdown-gpios:
    description:
      GPIO connected to the powerdown pin (active low)

  reset-gpios:
    maxItems: 1
    description:
      GPIO connected to the reset pin (active low)

  orientation: true

  rotation: true

  port:
    $ref: /schemas/graph.yaml#/$defs/port-base
    additionalProperties: false
    description:
      Output port node, single endpoint describing the CSI-2 transmitter

    properties:
      endpoint:
        $ref: /schemas/media/video-interfaces.yaml#
        unevaluatedProperties: false

        properties:
          data-lanes:
            oneOf:
              - items:
                  - const: 1
                  - const: 2
                  - const: 3
                  - const: 4
              - items:
                  - const: 1
                  - const: 2
              - items:
                  - const: 1
          link-frequencies: true

        required:
          - data-lanes
          - link-frequencies

required:
  - compatible
  - reg
  - clocks
  - dovdd-supply
  - avdd-supply
  - dvdd-supply
  - port

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

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

        ov4689: camera@36 {
            compatible = "ovti,ov4689";
            reg = <0x36>;

            clocks = <&ov4689_clk>;

            avdd-supply = <&ov4689_avdd>;
            dovdd-supply = <&ov4689_dovdd>;
            dvdd-supply = <&ov4689_dvdd>;

            powerdown-gpios = <&pio 107 GPIO_ACTIVE_LOW>;
            reset-gpios = <&pio 109 GPIO_ACTIVE_LOW>;

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

            port {
                wcam_out: endpoint {
                    remote-endpoint = <&mipi_in_wcam>;
                    data-lanes = <1 2 3 4>;
                    link-frequencies = /bits/ 64 <504000000>;
                };
            };
        };
    };

...
+129 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/sony,imx290.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Sony IMX290 1/2.8-Inch CMOS Image Sensor

maintainers:
  - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>

description: |-
  The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with Square
  Pixel for Color Cameras. It is programmable through I2C and 4-wire
  interfaces. The sensor output is available via CMOS logic parallel SDR
  output, Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2
  bus is the default. No bindings have been defined for the other busses.

properties:
  compatible:
    enum:
      - sony,imx290

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    description: Input clock (37.125 MHz or 74.25 MHz)
    items:
      - const: xclk

  clock-frequency:
    description: Frequency of the xclk clock in Hz

  vdda-supply:
    description: Analog power supply (2.9V)

  vddd-supply:
    description: Digital core power supply (1.2V)

  vdddo-supply:
    description: Digital I/O power supply (1.8V)

  reset-gpios:
    description: Sensor reset (XCLR) GPIO
    maxItems: 1

  port:
    $ref: /schemas/graph.yaml#/$defs/port-base
    description: |
      Video output port

    properties:
      endpoint:
        $ref: /schemas/media/video-interfaces.yaml#
        unevaluatedProperties: false

        properties:
          data-lanes:
            anyOf:
              - items:
                  - const: 1
                  - const: 2
              - items:
                  - const: 1
                  - const: 2
                  - const: 3
                  - const: 4

          link-frequencies: true

        required:
          - data-lanes
          - link-frequencies

    additionalProperties: false

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - clock-frequency
  - vdda-supply
  - vddd-supply
  - vdddo-supply
  - port

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

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

        imx290: camera-sensor@1a {
            compatible = "sony,imx290";
            reg = <0x1a>;

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

            clocks = <&gcc 90>;
            clock-names = "xclk";
            clock-frequency = <37125000>;

            vdddo-supply = <&camera_vdddo_1v8>;
            vdda-supply = <&camera_vdda_2v8>;
            vddd-supply = <&camera_vddd_1v5>;

            reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;

            port {
                imx290_ep: endpoint {
                    data-lanes = <1 2 3 4>;
                    link-frequencies = /bits/ 64 <445500000>;
                    remote-endpoint = <&csiphy0_ep>;
                };
            };
        };
    };
...
+113 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright (c) 2022 STMicroelectronics SA.
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/st,st-vgxy61.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: STMicroelectronics VGxy61 HDR Global Shutter Sensor Family Device Tree Bindings

maintainers:
  - Benjamin Mugnier <benjamin.mugnier@foss.st.com>
  - Sylvain Petinot <sylvain.petinot@foss.st.com>

description: |-
  STMicroelectronics VGxy61 family has a CSI-2 output port. CSI-2 output is a
  quad lanes 800Mbps per lane.
  Supported formats are RAW8, RAW10, RAW12, RAW14 and RAW16.
  Following part number are supported
  - VG5661 and VG6661 are 1.6 Mpx (1464 x 1104) monochrome and color sensors.
  Maximum frame rate is 75 fps.
  - VG5761 and VG6761 are 2.3 Mpx (1944 x 1204) monochrome and color sensors.
  Maximum frame rate is 60 fps.

properties:
  compatible:
    const: st,st-vgxy61

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  VCORE-supply:
    description:
      Sensor digital core supply. Must be 1.2 volts.

  VDDIO-supply:
    description:
      Sensor digital IO supply. Must be 1.8 volts.

  VANA-supply:
    description:
      Sensor analog supply. Must be 2.8 volts.

  reset-gpios:
    description:
      Reference to the GPIO connected to the reset pin, if any.
      This is an active low signal to the vgxy61.

  st,strobe-gpios-polarity:
    description:
      Invert polarity of illuminator's lights strobe GPIOs.
      These GPIOs directly drive the illuminator LEDs.
    type: boolean

  port:
    $ref: /schemas/graph.yaml#/$defs/port-base
    additionalProperties: false

    properties:
      endpoint:
        $ref: /schemas/media/video-interfaces.yaml#
        unevaluatedProperties: false

        properties:
          data-lanes:
            description:
              CSI lanes to use
            items:
              - const: 1
              - const: 2
              - const: 3
              - const: 4

          remote-endpoint: true

        required:
          - data-lanes

required:
  - compatible
  - clocks
  - VCORE-supply
  - VDDIO-supply
  - VANA-supply
  - port

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        vgxy61: csi2tx@10 {
            compatible = "st,st-vgxy61";
            reg = <0x10>;
            clocks = <&clk_ext_camera>;
            VCORE-supply = <&v1v2>;
            VDDIO-supply = <&v1v8>;
            VANA-supply = <&v2v8>;
            reset-gpios = <&mfxgpio 18 GPIO_ACTIVE_LOW>;
            port {
                ep0: endpoint {
                    data-lanes = <1 2 3 4>;
                    remote-endpoint = <&mipi_csi2_out>;
                };
            };
        };
    };
...
+178 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/toshiba,tc358746.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Toshiba TC358746 Parallel to MIPI CSI2 Bridge

maintainers:
  - Marco Felsch <kernel@pengutronix.de>

description: |-
  The Toshiba TC358746 converts a parallel video stream into a MIPI CSI-2
  stream. The direction can be either parallel-in -> csi-out or csi-in ->
  parallel-out The chip is programmable trough I2C and SPI but the SPI
  interface is only supported in parallel-in -> csi-out mode.

  Note that the current device tree bindings only support the
  parallel-in -> csi-out path.

properties:
  compatible:
    const: toshiba,tc358746

  reg:
    maxItems: 1

  clocks:
    description:
      The phandle to the reference clock source. This corresponds to the
      hardware pin REFCLK.
    maxItems: 1

  clock-names:
    const: refclk

  "#clock-cells":
    description: |
      The bridge can act as clock provider for the sensor. To enable this
      support #clock-cells must be specified. Attention if this feature is used
      then the mclk rate must be at least: (2 * link-frequency) / 8
                                           `------------------´   ^
                                           internal PLL rate   smallest possible
                                                                   mclk-div
    const: 0

  clock-output-names:
    description:
      The clock name of the MCLK output, the default name is tc358746-mclk.
    maxItems: 1

  vddc-supply:
    description: Digital core voltage supply, 1.2 volts

  vddio-supply:
    description: Digital I/O voltage supply, 1.8 volts

  vddmipi-supply:
    description: MIPI CSI phy voltage supply, 1.2 volts

  reset-gpios:
    description:
      The phandle and specifier for the GPIO that controls the chip reset.
      This corresponds to the hardware pin RESX which is physically active low.
    maxItems: 1

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: /schemas/graph.yaml#/$defs/port-base
        description: Input port

        properties:
          endpoint:
            $ref: /schemas/media/video-interfaces.yaml#
            unevaluatedProperties: false

            properties:
              hsync-active: true
              vsync-active: true
              bus-type:
                enum: [ 5, 6 ]

            required:
              - hsync-active
              - vsync-active
              - bus-type

      port@1:
        $ref: /schemas/graph.yaml#/$defs/port-base
        description: Output port

        properties:
          endpoint:
            $ref: /schemas/media/video-interfaces.yaml#
            unevaluatedProperties: false

            properties:
              data-lanes:
                minItems: 1
                maxItems: 4

              clock-noncontinuous: true
              link-frequencies: true

            required:
              - data-lanes
              - link-frequencies

    required:
      - port@0
      - port@1

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - vddc-supply
  - vddio-supply
  - vddmipi-supply
  - ports

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

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

      csi-bridge@e {
        compatible = "toshiba,tc358746";
        reg = <0xe>;

        clocks = <&refclk>;
        clock-names = "refclk";

        reset-gpios = <&gpio 2 GPIO_ACTIVE_LOW>;

        vddc-supply = <&v1_2d>;
        vddio-supply = <&v1_8d>;
        vddmipi-supply = <&v1_2d>;

        /* sensor mclk provider */
        #clock-cells = <0>;

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

          /* Input */
          port@0 {
            reg = <0>;
            tc358746_in: endpoint {
              remote-endpoint = <&sensor_out>;
              hsync-active = <0>;
              vsync-active = <0>;
              bus-type = <5>;
            };
          };

          /* Output */
          port@1 {
            reg = <1>;
            tc358746_out: endpoint {
              remote-endpoint = <&mipi_csi2_in>;
              data-lanes = <1 2>;
              clock-noncontinuous;
              link-frequencies = /bits/ 64 <216000000>;
            };
          };
        };
      };
    };
Loading