Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2761762pxy; Tue, 3 Aug 2021 14:41:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuo3a6kkHeq3/Rb/Y74Pkdmtg2S7ABfWSzTtnZxFsug74KwfuHU/AWkV/49HMAp5GYPlhr X-Received: by 2002:a92:cb48:: with SMTP id f8mr1103806ilq.197.1628026866332; Tue, 03 Aug 2021 14:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628026866; cv=none; d=google.com; s=arc-20160816; b=YeAbLfX/ogtQ0jl8hJSl8XNR5nkcZgr31SyTYBFt1QBKV3swYPzYkTeG7vFsLBvILi lN7Le3T/aDwxAAGzmDRelz+ejoRsIoHn3snsmuhMEnVqpRc0ixtOjkUwSR8vwcoqT5Ck JwxIC+qlpU92mavsqv5HMakPXR7pUfY5oyMmYYYW3rNB8x3m4NO5pYTK9WJZWHyzcMwQ VLRlYO98LOijKdSrxKEiccehHN5ix5cE/JMiE3HgnoYyvWNCYU8mj+2HlmWkn/hIYMIz BH/xxCMUzjhEB9JBm+18qCQ98soGVggJgGcehlDzZpAZJWFm7YUhzoiyat5p3nSa+XQa QCYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Wqy35kTjsNzZy2xWbHN8s1URPPVgyYNRzMN78986A28=; b=qF5H5KV99heReg/QzfovcBSobh4cDoyTJz+P4sBOiMrpOIOkFjrUENnik7Af//WFXr GFhrjyN7WF6TmNWio37Jv7QoXkvXGQOZj5gJA3oAwbvMft/W7MkPgOTDbOST/HQDcpSH a2B9u8y4J6wPKp8cW584LgNlW77HHw9GvK6W65UvCCe8NsVTIGgAVCQz88bgzWlUWxXl vmjV15yQeNN2SVh3QGSsyjuKdo+d70kh8W9BRa8ExOQzdLkLjKrqLXrX7Oqw9yHmyyYV 9+9q0viic0iqCYSnlWfewze3KD+A2HXyqJQk+WqSoiBxm1skLn8k8iKol6Ou9FUUmVom Uqew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id b15si16891497ioj.7.2021.08.03.14.40.52; Tue, 03 Aug 2021 14:41:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229800AbhHCUg3 (ORCPT + 99 others); Tue, 3 Aug 2021 16:36:29 -0400 Received: from mail-il1-f176.google.com ([209.85.166.176]:34658 "EHLO mail-il1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbhHCUg2 (ORCPT ); Tue, 3 Aug 2021 16:36:28 -0400 Received: by mail-il1-f176.google.com with SMTP id a14so20712819ila.1; Tue, 03 Aug 2021 13:36:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Wqy35kTjsNzZy2xWbHN8s1URPPVgyYNRzMN78986A28=; b=ri4LK7MfM3IMd3oLJpHmRrnfrXY8Hkxbr/6O1tVnU0UGmBfMsezqExlkQKyweQvxFn 81+9dxn2aKLHMVmh6htORLsiahebVN1q6oSI6I7QrZsIqR7sRSzYL/DcqgKQ1xKTAhD0 EPrElqgehsJAxpx7LlQsje4Q7rgHQZMAo+0pyYodvYwyRcqk+cg5gGF5ZiXcbXn15+yn xyMzis6gW3NgSKOTZRAkil7pmLaSbzg9F0jZlCO7JDfDYe/rQOZ1GC0s2DgbWsVBxGNO 1Xrf1V2xX4yjFKNuBgykyRAPYliYG1//OMDIVF1jpVyDLAnK7jn23k7hbxmL8Mwt6h1I Rcaw== X-Gm-Message-State: AOAM531Ti4pTbtoiAx+6fBJN9QTRYIUqZkmz0/zuT238eQLxmBx+erpe in+tVbOgN64F0SGQjZoWxw== X-Received: by 2002:a92:9412:: with SMTP id c18mr1922089ili.38.1628022976687; Tue, 03 Aug 2021 13:36:16 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id l4sm2620ilh.41.2021.08.03.13.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 13:36:15 -0700 (PDT) Received: (nullmailer pid 3688203 invoked by uid 1000); Tue, 03 Aug 2021 20:36:13 -0000 Date: Tue, 3 Aug 2021 14:36:13 -0600 From: Rob Herring To: Dario Binacchi Cc: linux-kernel@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Marc Kleine-Budde , Wolfgang Grandegger , devicetree@vger.kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v4] dt-bindings: net: can: c_can: convert to json-schema Message-ID: References: <20210801075322.30269-1-dariobin@libero.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210801075322.30269-1-dariobin@libero.it> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 01, 2021 at 09:53:22AM +0200, Dario Binacchi wrote: > Convert the Bosch C_CAN/D_CAN controller device tree binding > documentation to json-schema. > > Document missing properties. > Remove "ti,hwmods" as it is no longer used in TI dts. > Make "clocks" required as it is used in all dts. > Correct nodename in the example. > > Signed-off-by: Dario Binacchi > > --- > > Changes in v4: > - Fix 'syscon-raminit' property to pass checks. > - Drop 'status' property from CAN node of examples. > - Replace CAN node of examples (compatible = "bosch,d_can") with a > recent version taken from socfpga.dtsi dts. > - Update the 'interrupts' property due to the examples updating. > - Add 'resets' property due to the examples updating. > > Changes in v3: > - Add type (phandle-array) and size (maxItems: 2) to syscon-raminit > property. > > Changes in v2: > - Drop Documentation references. > > .../bindings/net/can/bosch,c_can.yaml | 94 +++++++++++++++++++ > .../devicetree/bindings/net/can/c_can.txt | 65 ------------- > 2 files changed, 94 insertions(+), 65 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/can/bosch,c_can.yaml > delete mode 100644 Documentation/devicetree/bindings/net/can/c_can.txt > > diff --git a/Documentation/devicetree/bindings/net/can/bosch,c_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,c_can.yaml > new file mode 100644 > index 000000000000..9f1028fe58d5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/can/bosch,c_can.yaml > @@ -0,0 +1,94 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/can/bosch,c_can.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Bosch C_CAN/D_CAN controller Device Tree Bindings > + > +description: Bosch C_CAN/D_CAN controller for CAN bus > + > +maintainers: > + - Dario Binacchi > + > +allOf: > + - $ref: can-controller.yaml# > + > +properties: > + compatible: > + oneOf: > + - enum: > + - bosch,c_can > + - bosch,d_can > + - ti,dra7-d_can > + - ti,am3352-d_can > + - items: > + - enum: > + - ti,am4372-d_can > + - const: ti,am3352-d_can > + > + reg: > + maxItems: 1 > + > + interrupts: > + minItems: 1 > + maxItems: 4 Well, now you have to define what each interrupt is. > + > + power-domains: > + description: | > + Should contain a phandle to a PM domain provider node and an args > + specifier containing the DCAN device id value. It's mandatory for > + Keystone 2 66AK2G SoCs only. > + maxItems: 1 > + > + clocks: > + description: | > + CAN functional clock phandle. > + maxItems: 1 > + > + clock-names: > + maxItems: 1 > + > + syscon-raminit: > + description: | > + Handle to system control region that contains the RAMINIT register, > + register offset to the RAMINIT register and the CAN instance number (0 > + offset). > + $ref: /schemas/types.yaml#/definitions/phandle-array > + items: > + items: > + - description: The phandle to the system control region. > + - description: The register offset. > + - description: The CAN instance number. > + > + resets: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + can@ffc00000 { > + compatible = "bosch,d_can"; > + reg = <0xffc00000 0x1000>; > + interrupts = <0 131 4>, <0 132 4>, <0 133 4>, <0 134 4>; > + clocks = <&can0_clk>; > + resets = <&rst CAN0_RESET>; > + }; > + - | > + can@0 { > + compatible = "ti,am3352-d_can"; > + reg = <0x0 0x2000>; > + clocks = <&dcan1_fck>; > + clock-names = "fck"; > + syscon-raminit = <&scm_conf 0x644 1>; > + interrupts = <55>; > + };