Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3577919ybh; Tue, 17 Mar 2020 02:42:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtU3bSLUfWZPLvIMiqAVydBmzQ9W+OPvBG98NvNXSBPJx3+bp1Um6gPKbP2dSdO1UPEgJqM X-Received: by 2002:a9d:1a2:: with SMTP id e31mr3110758ote.30.1584438129472; Tue, 17 Mar 2020 02:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584438129; cv=none; d=google.com; s=arc-20160816; b=zexNkZ2aOsj+tktsUsjhcNgfvZ/rcKgzNYnh0W+IlAZbsabiLqjX9EZMJP/010+nVE 1vE3P4THA1puezXTES7zwFebZ2M/R4CQ2DR7zOHaWbwbC4aNWE3LrHd8EjCfw8jEj8Lu zxX9pOSAA/BZ1x4KttaPGuUiq2/exeFQypnnrfQN/K1ivMA4NCQrCILMSR7OIL8+EoSX kOqvFY2PvGyJpXLwzINQYcbqD05gr0EV/N2OLCFwhGsJkzf4IPu4XL1XPDA3jUdtK1cY Vd0fZzrsLFiPmFev6B4aMTf4vwxvA8dbDMSODTepEWsJNZE+VRbnD//+eMx748/X7/mU 3xZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=B/G9HsLbSQ7IuWPEn2hD6uQT0ahrIA2ygV7+29cYVk4=; b=RkihjXRkZJWnALP4fOwx4ncFejxAc4gaPAPnukgl37FRitVwbl7q+h2kmI/ed4F0hB V6WdqnovnKV3zMLSQNCfe4qJ7Eao3ZLPLZu+mi3A8fGckydSujoGj12h5mFhE/x8wbCB u8HatXj/MfwvUkborlNBzUWUEap43E03x+E4ZNFRcRG9oaFfS5BxTSyMbI+UVliHnfJB wKo5H8EcNbdFUm12UbA+0vinFTtuMgc0p1be2lha9zDAn1Tqewuhzm9rmLVgDoj29kq3 b6xHIi0jMsVzXKWk5FPl3EwrmGIRh5+ZiCnvrn4b5yWBLtrAj4wdvbQnNkaIly/vgqvw A4dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d63si1511426oib.224.2020.03.17.02.41.57; Tue, 17 Mar 2020 02:42:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727237AbgCQJlQ (ORCPT + 99 others); Tue, 17 Mar 2020 05:41:16 -0400 Received: from v6.sk ([167.172.42.174]:50794 "EHLO v6.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727224AbgCQJlN (ORCPT ); Tue, 17 Mar 2020 05:41:13 -0400 Received: from localhost (v6.sk [IPv6:::1]) by v6.sk (Postfix) with ESMTP id A6A0D6109B; Tue, 17 Mar 2020 09:41:10 +0000 (UTC) From: Lubomir Rintel To: Rob Herring Cc: Linus Walleij , Bartosz Golaszewski , Thomas Gleixner , Jason Cooper , Marc Zyngier , Mauro Carvalho Chehab , Ulf Hansson , Kishon Vijay Abraham I , Alessandro Zummo , Alexandre Belloni , Greg Kroah-Hartman , Mark Brown , Daniel Lezcano , Andrew Lunn , Gregory Clement , Daniel Mack , Haojian Zhuang , Robert Jarzmik , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, linux-rtc@vger.kernel.org, linux-serial@vger.kernel.org, linux-spi@vger.kernel.org, linux-usb@vger.kernel.org, Lubomir Rintel Subject: [PATCH 24/28] dt-bindings: media: Convert marvell,mmp2-ccic to json-schema Date: Tue, 17 Mar 2020 10:39:18 +0100 Message-Id: <20200317093922.20785-25-lkundrak@v3.sk> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200317093922.20785-1-lkundrak@v3.sk> References: <20200317093922.20785-1-lkundrak@v3.sk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the marvell,mmp2-ccic binding to DT schema format using json-schema. Signed-off-by: Lubomir Rintel --- .../bindings/media/marvell,mmp2-ccic.txt | 50 --------- .../bindings/media/marvell,mmp2-ccic.yaml | 102 ++++++++++++++++++ 2 files changed, 102 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/marvell,mmp2-ccic.txt create mode 100644 Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml diff --git a/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.txt b/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.txt deleted file mode 100644 index 7ec2c8c8a3b98..0000000000000 --- a/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.txt +++ /dev/null @@ -1,50 +0,0 @@ -Marvell MMP2 camera host interface - -Required properties: - - compatible: Should be "marvell,mmp2-ccic". - - reg: Register base and size. - - interrupts: The interrupt number. - - #clock-cells: Must be 0. - -Optional properties: - - clocks: Reference to the input clock as specified by - Documentation/devicetree/bindings/clock/clock-bindings.txt. - - clock-names: Names of the clocks used; "axi" for the AXI bus interface, - "func" for the peripheral clock and "phy" for the parallel - video bus interface. - - clock-output-names: Optional clock source for sensors. Shall be "mclk". - -Required subnodes: - - port: The parallel bus interface port with a single endpoint linked to - the sensor's endpoint as described in - Documentation/devicetree/bindings/media/video-interfaces.txt. - -Required endpoint properties: - - bus-type: data bus type, <5> or <6> for Parallel or Bt.656 respectively - - pclk-sample: pixel clock polarity - - hsync-active: horizontal synchronization polarity (only required for - parallel bus) - - vsync-active: vertical synchronization polarity (only required for - parallel bus) - -Example: - - camera0: camera@d420a000 { - compatible = "marvell,mmp2-ccic"; - reg = <0xd420a000 0x800>; - interrupts = <42>; - clocks = <&soc_clocks MMP2_CLK_CCIC0>; - clock-names = "axi"; - #clock-cells = <0>; - clock-output-names = "mclk"; - - port { - camera0_0: endpoint { - remote-endpoint = <&ov7670_0>; - bus-type = <5>; /* Parallel */ - hsync-active = <1>; /* Active high */ - vsync-active = <1>; /* Active high */ - pclk-sample = <0>; /* Falling */ - }; - }; - }; diff --git a/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml b/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml new file mode 100644 index 0000000000000..890a3f9d0302f --- /dev/null +++ b/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) +# Copyright 2019,2020 Lubomir Rintel +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/marvell,mmp2-ccic.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell MMP2 camera host interface bindings + +maintainers: + - Lubomir Rintel + +properties: + $nodename: + pattern: '^camera@[a-f0-9]+$' + + compatible: + const: marvell,mmp2-ccic + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + port: + type: object + additionalProperties: false + + properties: + endpoint: + type: object + additionalProperties: false + + # Properties described in + # Documentation/devicetree/bindings/media/video-interfaces.txt + properties: + remote-endpoint: true + hsync-active: true + vsync-active: true + pclk-sample: true + bus-type: true + + required: + - remote-endpoint + + required: + - endpoint + + clocks: + minItems: 1 + maxItems: 3 + items: + - description: AXI bus interface clock + - description: Peripheral clock + - description: Parallel video bus interface clock + + clock-names: + minItems: 1 + maxItems: 3 + items: + - const: axi + - const: func + - const: phy + + '#clock-cells': + const: 0 + + clock-output-names: + const: mclk + +required: + - compatible + - reg + - interrupts + - port + +examples: + - | + #include + + camera@d420a000 { + compatible = "marvell,mmp2-ccic"; + reg = <0xd420a000 0x800>; + interrupts = <42>; + clocks = <&soc_clocks MMP2_CLK_CCIC0>; + clock-names = "axi"; + #clock-cells = <0>; + clock-output-names = "mclk"; + + port { + camera0_0: endpoint { + remote-endpoint = <&ov7670_0>; + bus-type = <5>; /* Parallel */ + hsync-active = <1>; /* Active high */ + vsync-active = <1>; /* Active high */ + pclk-sample = <0>; /* Falling */ + }; + }; + }; + +... -- 2.25.1