Commit 54203301 authored by Eugen Hristev's avatar Eugen Hristev Committed by Mauro Carvalho Chehab
Browse files

media: dt-bindings: media: atmel-isc: convert to yaml



Convert the Atmel ISC to yaml binding format.

Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 2672a939
Loading
Loading
Loading
Loading
+114 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2016-2021 Microchip Technology, Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/atmel,isc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel Image Sensor Controller (ISC)

maintainers:
  - Eugen Hristev <eugen.hristev@microchip.com>

description: |
  The Image Sensor Controller (ISC) device provides the video input capabilities for the
  Atmel/Microchip AT91 SAMA family of devices.

  The ISC has a single parallel input that supports RAW Bayer, RGB or YUV video,
  with both external synchronization and BT.656 synchronization for the latter.

properties:
  compatible:
    const: atmel,sama5d2-isc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    minItems: 3
    maxItems: 3

  clock-names:
    items:
      - const: hclock
      - const: iscck
      - const: gck

  '#clock-cells':
    const: 0

  clock-output-names:
    const: isc-mck

  port:
    $ref: /schemas/graph.yaml#/properties/port
    description:
      Input port node, single endpoint describing the input pad.

    properties:
      endpoint:
        $ref: video-interfaces.yaml#

        properties:
          remote-endpoint: true

          bus-width:
            enum: [8, 9, 10, 11, 12]
            default: 12

          hsync-active:
            enum: [0, 1]
            default: 1

          vsync-active:
            enum: [0, 1]
            default: 1

          pclk-sample:
            enum: [0, 1]
            default: 1

        required:
          - remote-endpoint

        additionalProperties: false

    additionalProperties: false

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - '#clock-cells'
  - clock-output-names
  - port

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    isc: isc@f0008000 {
        compatible = "atmel,sama5d2-isc";
        reg = <0xf0008000 0x4000>;
        interrupts = <46 IRQ_TYPE_LEVEL_HIGH 5>;
        clocks = <&isc_clk>, <&iscck>, <&isc_gclk>;
        clock-names = "hclock", "iscck", "gck";
        #clock-cells = <0>;
        clock-output-names = "isc-mck";

        port {
                isc_0: endpoint {
                       remote-endpoint = <&ov7740_0>;
                       hsync-active = <1>;
                       vsync-active = <0>;
                       pclk-sample = <1>;
                       bus-width = <8>;
                };
        };
    };
+0 −65
Original line number Diff line number Diff line
Atmel Image Sensor Controller (ISC)
----------------------------------------------

Required properties for ISC:
- compatible
	Must be "atmel,sama5d2-isc".
- reg
	Physical base address and length of the registers set for the device.
- interrupts
	Should contain IRQ line for the ISC.
- clocks
	List of clock specifiers, corresponding to entries in
	the clock-names property;
	Please refer to clock-bindings.txt.
- clock-names
	Required elements: "hclock", "iscck", "gck".
- #clock-cells
	Should be 0.
- clock-output-names
	Should be "isc-mck".
- pinctrl-names, pinctrl-0
	Please refer to pinctrl-bindings.txt.

ISC supports a single port node with parallel bus. It should contain one
'port' child node with child 'endpoint' node. Please refer to the bindings
defined in Documentation/devicetree/bindings/media/video-interfaces.txt.

Example:
isc: isc@f0008000 {
	compatible = "atmel,sama5d2-isc";
	reg = <0xf0008000 0x4000>;
	interrupts = <46 IRQ_TYPE_LEVEL_HIGH 5>;
	clocks = <&isc_clk>, <&iscck>, <&isc_gclk>;
	clock-names = "hclock", "iscck", "gck";
	#clock-cells = <0>;
	clock-output-names = "isc-mck";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>;

	port {
		isc_0: endpoint {
			remote-endpoint = <&ov7740_0>;
			hsync-active = <1>;
			vsync-active = <0>;
			pclk-sample = <1>;
		};
	};
};

i2c1: i2c@fc028000 {
	ov7740: camera@21 {
		compatible = "ovti,ov7740";
		reg = <0x21>;
		clocks = <&isc>;
		clock-names = "xvclk";
		assigned-clocks = <&isc>;
		assigned-clock-rates = <24000000>;

		port {
			ov7740_0: endpoint {
				remote-endpoint = <&isc_0>;
			};
		};
	};
};