Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2332763ybc; Wed, 20 Nov 2019 12:28:06 -0800 (PST) X-Google-Smtp-Source: APXvYqxcp1A4L6wDr/jvpx1azZEDiVqVMg+EkkA4VgeR2zN1G3Fn6RN8Q6RGKFbubN8h0ekh8PHK X-Received: by 2002:a17:906:cc93:: with SMTP id oq19mr7771112ejb.316.1574281686395; Wed, 20 Nov 2019 12:28:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574281686; cv=none; d=google.com; s=arc-20160816; b=e5wo+JmxTNmuqbHq3DJdsQS7yOr0SqwR+aI4e/+dMlx3nS+Qr3BI8pfUySoi7ZkEkA rpieIcAHm4h1ZEV+Uljtean8z0RYmhWu6i54CaKBXB0rLnT3ZQ8bQcpDmIeVywjXg7Dm WDqXyLc92u98/mqr2hbp0va+wirV/Ura0D73jOQmdZ5e8qVKej21nrP/JSmiFTiCZ6iE 2VvbA0dvHGwKwdOR63E8ywDMghLHUYS3zAN9WUZg/oSH+T4RR4KIpfH9g3SOSsiKAfVQ iku9NgqFPAUqpLn5xDoHmST/9MS9Cin/k1VFv7otnYVCyZLm6cdAgE4wzMXOFH2G9NCk ru4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Mcc+ESErtfmeqgzY8vG9PEyGgUUtpjeT4hOGFsg8IIw=; b=B7I3F9l5pK4Y+V8DxykaiyM1MH2e2Ql+sI/kFERlavKm0JPgy/44Ux5Ux3Cw/ZMCwZ 66gtXouvneBVkAc/KjdqB6httjRU38AHbcRJAQKXwBXFJAWJOhA6goIjJ9E0upG3PoOG NoTySMr1rSqVvrmVoPsuDO0f2SAvGbvKRyNLyUXtEfNK1P6+Eub3d0x6wxMm9I+YD9NY g1pNEvaYC9ThxvLgwvSPDIc9flEtC4OcWIKNyTB0mCUaiKmxssK9t+tcV7mCeg3ogIJK LV81Nt2HgzCwrOvnPhnoib8LOGj0cVjl9jQ5EutWAvr2QWHqIs0+C/duMXTExwmDpTf2 F4NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YsO2Djb3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si150971ejy.259.2019.11.20.12.27.42; Wed, 20 Nov 2019 12:28:06 -0800 (PST) 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=@kernel.org header.s=default header.b=YsO2Djb3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbfKTU0h (ORCPT + 99 others); Wed, 20 Nov 2019 15:26:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:49438 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbfKTU0h (ORCPT ); Wed, 20 Nov 2019 15:26:37 -0500 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3EAE20895; Wed, 20 Nov 2019 20:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574281595; bh=AEVIorR6/VAlI4BJXRw6tPbken7vkQ0aTtyblIbcMdo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YsO2Djb3qDyV5DUI+gOfSBEoyXrLr4bGjbyQsw4ZyMIjgrbsGPYPzv+oYJneg+R/Q lBr2gXtZLDWn8l/hjcPNRxT8TShMH2IIMvdXNP3uImH3y+gg4xiIQvklZTexnD3O2v ZO3RzynVtL7N12dcNqyMglcvuVYYyjb/NP0T1OEA= Received: by mail-qt1-f171.google.com with SMTP id o49so983011qta.7; Wed, 20 Nov 2019 12:26:35 -0800 (PST) X-Gm-Message-State: APjAAAV/hE7nnTDjwEIFj4q2dYeif7r2NRjpmnzSWCkyFXbXx22Kq66w 3E8B32HpluVdELdL0TBEnyngA0qXuaIUCETGsQ== X-Received: by 2002:ac8:73ce:: with SMTP id v14mr4714242qtp.136.1574281594774; Wed, 20 Nov 2019 12:26:34 -0800 (PST) MIME-Version: 1.0 References: <20191118101420.23610-1-arnaud.pouliquen@st.com> In-Reply-To: <20191118101420.23610-1-arnaud.pouliquen@st.com> From: Rob Herring Date: Wed, 20 Nov 2019 14:26:23 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] dt-bindings: mailbox: convert stm32-ipcc to json-schema To: Arnaud Pouliquen Cc: Mark Rutland , Alexandre Torgue , Jassi Brar , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "linux-kernel@vger.kernel.org" , Fabien Dessenne Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 18, 2019 at 4:15 AM Arnaud Pouliquen wrote: > > Convert the STM32 IPCC bindings to DT schema format using > json-schema > > Signed-off-by: Arnaud Pouliquen > --- > .../bindings/mailbox/st,stm32-ipcc.yaml | 91 +++++++++++++++++++ > .../bindings/mailbox/stm32-ipcc.txt | 47 ---------- > 2 files changed, 91 insertions(+), 47 deletions(-) > create mode 100644 Documentation/devicetree/bindings/mailbox/st,stm32-ipcc.yaml > delete mode 100644 Documentation/devicetree/bindings/mailbox/stm32-ipcc.txt Thanks for helping me find 2 meta-schema errors. :) Please update dt-schema and re-run 'make dt_binding_check'. > diff --git a/Documentation/devicetree/bindings/mailbox/st,stm32-ipcc.yaml b/Documentation/devicetree/bindings/mailbox/st,stm32-ipcc.yaml > new file mode 100644 > index 000000000000..90157d4deac1 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/st,stm32-ipcc.yaml > @@ -0,0 +1,91 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/mailbox/st,stm32-ipcc.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: STMicroelectronics STM32 IPC controller bindings > + > +description: > + The IPCC block provides a non blocking signaling mechanism to post and > + retrieve messages in an atomic way between two processors. > + It provides the signaling for N bidirectionnal channels. The number of > + channels (N) can be read from a dedicated register. > + > +maintainers: > + - Fabien Dessenne > + - Arnaud Pouliquen > + > +properties: > + compatible: > + const: st,stm32mp1-ipcc > + > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + interrupts: > + items: > + - description: rx channel occupied > + - description: tx channel free > + - description: wakeup source > + minItems: 2 > + maxItems: 3 > + > + interrupt-names: > + items: > + enums: [ rx, tx, wakeup ] 'enums' is not a valid keyword. 'enum' is valid, but his should be in a defined order (so a list of items). > + minItems: 2 > + maxItems: 3 > + > + wakeup-source: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + Enables wake up of host system on wakeup IRQ assertion. Just 'true' is enough here. Assume we have a common definition. > + > + "#mbox-cells": > + const: 1 > + > + st,proc-id: > + description: Processor id using the mailbox (0 or 1) > + allOf: > + - minimum: 0 > + - maximum: 1 'enum: [ 0, 1 ]' is more concise. Also, needs a $ref to the type. > + - default: 0 > + > +required: > + - compatible > + - reg > + - st,proc-id > + - clocks > + - interrupt-names > + - "#mbox-cells" > + > +oneOf: > + - required: > + - interrupts > + - required: > + - interrupts-extended The tooling takes care of this for you. Just list 'interrupts' as required. > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + ipcc: mailbox@4c001000 { > + compatible = "st,stm32mp1-ipcc"; > + #mbox-cells = <1>; > + reg = <0x4c001000 0x400>; > + st,proc-id = <0>; > + interrupts-extended = <&intc GIC_SPI 100 IRQ_TYPE_NONE>, > + <&intc GIC_SPI 101 IRQ_TYPE_NONE>, > + <&aiec 62 1>; > + interrupt-names = "rx", "tx", "wakeup"; > + clocks = <&rcc_clk IPCC>; > + wakeup-source; > + }; > + > +...