Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp900671ybp; Fri, 11 Oct 2019 06:13:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmB86oKvrPs2YoAcmfxvi5BiLvqjcp5jdQyWb6xnwRZpva9V4N0E25I39EyqB0MxyeABbB X-Received: by 2002:a17:906:1390:: with SMTP id f16mr13496575ejc.295.1570799617137; Fri, 11 Oct 2019 06:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570799617; cv=none; d=google.com; s=arc-20160816; b=AHdMZ70ZKIqX0Tu6wYQvXf89NS/Csabufnx6h9IOAr5r5GIr8yCZ0R5TIEOX9g3490 r/FzTZPF6vpx4XQUxNhMDrSL9eUScwCTb6TXn0j2MpKWzftQWAPZCdxh0tEP5UznGkxB /XSFcQkUlv6NxIP2BjKJuvoHhy7eJC/WhgmQ6SQauaLZrMbKy7Vv4YbzplIz1ZpxaxAD kBH77DIj5Oxa8uDMSJS0sfdwOmmErGSAIpTmtUOY3IBy6eSn2cGUjaCyOgcD0ctpZU22 U1HPoyLcrHvg3vZhWc8wpYUDHQjyeEiqr7ecJgMm159DS89Pn+v3PbN9Wk37TVrMJjjS giBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=yHfi3HY0Dx0zI0TYh25CPOFtlp/IAVFsBZ0iGOQeTBA=; b=qeNFjeCPZK9wtRzBSED6vay53Mh9kstLRcqc1fG8PJ2As34Y3QrOUdG/1iYH7/1ess BJpRHfm0fOYYlG/6Vkw845qcRNwzEynFpxyEo6cLspbbX2XskJGM55cM1FoGpihOD+tG 7n4Kywr1QUr4fl17e8XZKqbB6sFcZ/UXb+sFq2+PoGrAdeN6Kpo1gAhR/V8e29QHWHsN CHg/nDmMbVDhuZ36h+Kbdkd4NBQ9z8FxpMPWaXyoTcZ3x9FcDkswoOy1He2wXv4FYOSG eTgfmMPE0mbEeCFs/4/6f4zuAa2iA/zDw9L3tMAQMWdkJzvhLt7DFEcHXqGYpN1oL4HC Nnaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=dPoarHUs; 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 hk1si5107557ejb.408.2019.10.11.06.13.13; Fri, 11 Oct 2019 06:13:37 -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; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=dPoarHUs; 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 S1728386AbfJKNMx (ORCPT + 99 others); Fri, 11 Oct 2019 09:12:53 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:7290 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727950AbfJKNMx (ORCPT ); Fri, 11 Oct 2019 09:12:53 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9BD6kEj021870; Fri, 11 Oct 2019 15:12:39 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=yHfi3HY0Dx0zI0TYh25CPOFtlp/IAVFsBZ0iGOQeTBA=; b=dPoarHUsPogZegM+gcEP3rgmifnOLuQNkLwQFyF0GhXD1EK/FUSr/9PNlxBp5WKXXC+l l+xu53QxA57RQ6JlFQo64U2K4stDLSy19zQuBB+ucDIj8/2fe/aoi0hWufpY/Rlh28Vs wzTbN8ANVUvwhWncH5yfIhkbuxIvhjk5gRiDFn5O1vuPm+kMRksA5bRcEAniz2MonyL/ eZuglXWoKkMwTXLX4AL+3QisXR9UbciTQwKHkZh0lg2qESFRs2NMd6o5naehCtIdsK94 CEkXQpfdFiVGufhPU5e8onN9kOFZVInpC9ZnkZCwO+BnJcBlB6eNDoHJPbBerwAF5+Sv pw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2vegxw9xuf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2019 15:12:39 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 83D2610002A; Fri, 11 Oct 2019 15:12:39 +0200 (CEST) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 75D112BEC5F; Fri, 11 Oct 2019 15:12:39 +0200 (CEST) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 11 Oct 2019 15:12:39 +0200 Received: from localhost (10.201.20.122) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 11 Oct 2019 15:12:38 +0200 From: Benjamin Gaignard To: , , , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH v2] dt-bindings: media: Convert stm32 dcmi bindings to json-schema Date: Fri, 11 Oct 2019 15:12:34 +0200 Message-ID: <20191011131234.24290-2-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20191011131234.24290-1-benjamin.gaignard@st.com> References: <20191011131234.24290-1-benjamin.gaignard@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-11_08:2019-10-10,2019-10-11 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the STM32 dcmi binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard --- changes in v2: - use BSD-2-Clause license - remove useless dma descriptions - fix clock property - add additionalProperties: false - fix reset indentation .../devicetree/bindings/media/st,stm32-dcmi.txt | 45 ----------- .../devicetree/bindings/media/st,stm32-dcmi.yaml | 86 ++++++++++++++++++++++ 2 files changed, 86 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/st,stm32-dcmi.txt create mode 100644 Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml diff --git a/Documentation/devicetree/bindings/media/st,stm32-dcmi.txt b/Documentation/devicetree/bindings/media/st,stm32-dcmi.txt deleted file mode 100644 index 3122ded82eb4..000000000000 --- a/Documentation/devicetree/bindings/media/st,stm32-dcmi.txt +++ /dev/null @@ -1,45 +0,0 @@ -STMicroelectronics STM32 Digital Camera Memory Interface (DCMI) - -Required properties: -- compatible: "st,stm32-dcmi" -- reg: physical base address and length of the registers set for the device -- interrupts: should contain IRQ line for the DCMI -- resets: reference to a reset controller, - see Documentation/devicetree/bindings/reset/st,stm32-rcc.txt -- clocks: list of clock specifiers, corresponding to entries in - the clock-names property -- clock-names: must contain "mclk", which is the DCMI peripherial clock -- pinctrl: the pincontrol settings to configure muxing properly - for pins that connect to DCMI device. - See Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml. -- dmas: phandle to DMA controller node, - see Documentation/devicetree/bindings/dma/stm32-dma.txt -- dma-names: must contain "tx", which is the transmit channel from DCMI to DMA - -DCMI 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: - - dcmi: dcmi@50050000 { - compatible = "st,stm32-dcmi"; - reg = <0x50050000 0x400>; - interrupts = <78>; - resets = <&rcc STM32F4_AHB2_RESET(DCMI)>; - clocks = <&rcc 0 STM32F4_AHB2_CLOCK(DCMI)>; - clock-names = "mclk"; - pinctrl-names = "default"; - pinctrl-0 = <&dcmi_pins>; - dmas = <&dma2 1 1 0x414 0x3>; - dma-names = "tx"; - port { - dcmi_0: endpoint { - remote-endpoint = <...>; - bus-width = <8>; - hsync-active = <0>; - vsync-active = <0>; - pclk-sample = <1>; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml b/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml new file mode 100644 index 000000000000..272827342ee2 --- /dev/null +++ b/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/st,stm32-dcmi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 Digital Camera Memory Interface (DCMI) binding + +maintainers: + - Hugues Fruchet + +properties: + compatible: + const: st,stm32-dcmi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: mclk + + dmas: + maxItems: 1 + + dma-names: + items: + - const: tx + + resets: + maxItems: 1 + + port: + type: object + description: + DCMI 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. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + - dmas + - dma-names + - port + +additionalProperties: false + +examples: + - | + #include + #include + #include + dcmi: dcmi@4c006000 { + compatible = "st,stm32-dcmi"; + reg = <0x4c006000 0x400>; + interrupts = ; + resets = <&rcc CAMITF_R>; + clocks = <&rcc DCMI>; + clock-names = "mclk"; + dmas = <&dmamux1 75 0x400 0x0d>; + dma-names = "tx"; + + port { + dcmi_0: endpoint { + remote-endpoint = <&ov5640_0>; + bus-width = <8>; + hsync-active = <0>; + vsync-active = <0>; + pclk-sample = <1>; + }; + }; + }; + +... -- 2.15.0