Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp78523pxu; Tue, 13 Oct 2020 17:16:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5aJ1Vph3ENO8oyyG9oG8lnceDj3rJ889qpD00miw5VoudTafAFQbE3N1gXCZ3QP/yhHtL X-Received: by 2002:a17:906:4e19:: with SMTP id z25mr2591436eju.44.1602634568309; Tue, 13 Oct 2020 17:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602634568; cv=none; d=google.com; s=arc-20160816; b=ybgV/OD2eHNUKLbuh5E4Kr0mwPYMtY4Nma8Zk5ZMV+AfuWuNukZx0kvDB/vvI0onwB kbiPt044/m6NLi5p9AZLn+2Q3CQ98RoDKFiXzmB+fKOU4IyyW2wIRsCx9IeaUwdJ07jf TMmJC/JWDSZoUyH7VuBC6gMYJ9M2Glf258MGbhaZksnT4z+9kegTKfxGWPCa/B5Gdt4x MZWJpn34KkAj3t3zFrARn2i2lw0W4nzgB/wlfvNo6445dJJrGoTgNoiDv0lbb9M1L+I2 YiYa6hXF3BRXejQnBvuV2R2za5t0SVikYSHAplX6www76DAsQfUny92H1nqe5+4veX3P HtmA== 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=OZ/eS1qPTmzOSxijyOeTEv/iETW9q80iAo0sLSTFilA=; b=vgoFzs4Sjw429e2fQc1KiUInm+jslaadszb7NAfP9gwR9i+BmWK0Lb+7UYseZ+FBhG 3sAmNaURr6ZJo/OTEoQdMx4y1ArgF7/glwuvSwayGGxW2eKFs3EqQOOkYOEjueoYq05m Rq7BeNROry2XR2qocFSvB1BnAOQcwRULGSwLmuqK3qyyXXBLI7lqohNnJs9+kJiEhVlL Yr80Rv+ZiwSLtU3xSEjukZtSlOoDmJOQB4acsPRemYsFCZrESAmBN8gAFM5aTuVfW11j ZCk3bG66ZVSMuqeGoy2/6StctjkzLLi0s/+zl+H6piUyTN+J3xZKwFZ99qSGTlCPLY9V eMKg== 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 w26si933173edq.89.2020.10.13.17.15.44; Tue, 13 Oct 2020 17:16:08 -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 S1731420AbgJMP5M (ORCPT + 99 others); Tue, 13 Oct 2020 11:57:12 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:34949 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731302AbgJMP5L (ORCPT ); Tue, 13 Oct 2020 11:57:11 -0400 Received: by mail-oi1-f193.google.com with SMTP id w141so23030294oia.2; Tue, 13 Oct 2020 08:57:10 -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=OZ/eS1qPTmzOSxijyOeTEv/iETW9q80iAo0sLSTFilA=; b=XCIz20HcArs9IXMapoZitc5f+MJDNUl6CtRTyoV6FBXMYhWXRLJQHBwt7l1i/hbj3E opZ7+Zh6r4+aa6UoOAkruMQAbBc3u7/eA2EtbdXmXBIR2kXcpGkXz3EGuziRzIf/Yq/o SPvxs2pNx9UtJ20ugwUPAjFicXbMegXLf45MyqeCnao08r1HK7Xl/5pnutEmtVf9Hqmg 4vL7GT01sZy/QijxWWscvOKYvqD07U4xXG7RZ1CUkKPXOJYCyzyhNYkEsJFM2bLP5m0b Potk137WhzZSqPlnYEMlUiH/UQR+yBNAYIobqsnaj+1SyXcuSUPCGz7FHXL8Epk4h5e1 sd2A== X-Gm-Message-State: AOAM5338lrHgmM+b9AjRHQqC+pKjoGVx9cSeqGnnnDVsnNQovDHHktds J+Rw3ETT4zZFbhHZIeNqvgzISl4izlK0 X-Received: by 2002:aca:c485:: with SMTP id u127mr249666oif.92.1602604630073; Tue, 13 Oct 2020 08:57:10 -0700 (PDT) Received: from xps15 (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id m13sm47370otn.20.2020.10.13.08.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 08:57:09 -0700 (PDT) Received: (nullmailer pid 3594570 invoked by uid 1000); Tue, 13 Oct 2020 15:57:08 -0000 Date: Tue, 13 Oct 2020 10:57:08 -0500 From: Rob Herring To: Oleksij Rempel Cc: mkl@pengutronix.de, Wolfgang Grandegger , "David S. Miller" , Jakub Kicinski , kernel@pengutronix.de, linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] dt-bindings: can: flexcan: convert fsl,*flexcan bindings to yaml Message-ID: <20201013155708.GA3588169@bogus> References: <20201009132912.7583-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201009132912.7583-1-o.rempel@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 09, 2020 at 03:29:12PM +0200, Oleksij Rempel wrote: > In order to automate the verification of DT nodes convert > fsl-flexcan.txt to fsl,flexcan.yaml > > Signed-off-by: Oleksij Rempel > --- > .../bindings/net/can/fsl,flexcan.yaml | 137 ++++++++++++++++++ > .../bindings/net/can/fsl-flexcan.txt | 57 -------- > 2 files changed, 137 insertions(+), 57 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml > delete mode 100644 Documentation/devicetree/bindings/net/can/fsl-flexcan.txt > > diff --git a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml > new file mode 100644 > index 000000000000..6486047f48b8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml > @@ -0,0 +1,137 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/can/fsl,flexcan.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: > + Flexcan CAN controller on Freescale's ARM and PowerPC system-on-a-chip (SOC). > + > +maintainers: > + - Marc Kleine-Budde > + > +properties: > + compatible: > + oneOf: > + - enum: > + - fsl,imx8qm-flexcan > + - fsl,imx8mp-flexcan > + - fsl,imx6q-flexcan > + - fsl,imx53-flexcan > + - fsl,imx35-flexcan > + - fsl,imx28-flexcan > + - fsl,imx25-flexcan > + - fsl,p1010-flexcan > + - fsl,vf610-flexcan > + - fsl,ls1021ar2-flexcan > + - fsl,lx2160ar1-flexcan > + - items: > + - enum: > + - fsl,imx7d-flexcan > + - fsl,imx6ul-flexcan > + - fsl,imx6sx-flexcan > + - const: fsl,imx6q-flexcan > + - items: > + - enum: > + - fsl,ls1028ar1-flexcan > + - const: fsl,lx2160ar1-flexcan > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + maxItems: 2 > + > + clock-names: > + items: > + - const: ipg > + - const: per > + > + clock-frequency: > + description: | > + The oscillator frequency driving the flexcan device, filled in by the > + boot loader. This property should only be used the used operating system > + doesn't support the clocks and clock-names property. > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + xceiver-supply: > + description: Regulator that powers the CAN transceiver. > + maxItems: 1 > + > + big-endian: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | > + This means the registers of FlexCAN controller are big endian. This is > + optional property.i.e. if this property is not present in device tree > + node then controller is assumed to be little endian. If this property is > + present then controller is assumed to be big endian. > + > + fsl,stop-mode: > + description: | > + Register bits of stop mode control. > + > + The format should be as follows: > + > + gpr is the phandle to general purpose register node. > + req_gpr is the gpr register offset of CAN stop request. > + req_bit is the bit offset of CAN stop request. > + $ref: /schemas/types.yaml#/definitions/uint32-array Should be a phandle-array. > + items: > + items: > + - description: The 'gpr' is the phandle to general purpose register node. > + - description: The 'req_gpr' is the gpr register offset of CAN stop request. > + maximum: 0xff > + - description: The 'req_bit' is the bit offset of CAN stop request. > + maximum: 0x1f > + minItems: 1 > + maxItems: 1 Drop the outer 'items' and these 2. > + > + fsl,clk-source: > + description: | > + Select the clock source to the CAN Protocol Engine (PE). It's SoC > + implementation dependent. Refer to RM for detailed definition. If this > + property is not set in device tree node then driver selects clock source 1 > + by default. > + 0: clock source 0 (oscillator clock) > + 1: clock source 1 (peripheral clock) > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 1 > + minimum: 0 > + maximum: 1 > + > + wakeup-source: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + Enable CAN remote wakeup. > + > +required: > + - compatible > + - reg > + - interrupts > + > +additionalProperties: false > + > +examples: > + - | > + can@1c000 { > + compatible = "fsl,p1010-flexcan"; > + reg = <0x1c000 0x1000>; > + interrupts = <48 0x2>; > + interrupt-parent = <&mpic>; > + clock-frequency = <200000000>; > + fsl,clk-source = <0>; > + }; > + - | > + #include > + > + flexcan@2090000 { can@... > + compatible = "fsl,imx6q-flexcan"; > + reg = <0x02090000 0x4000>; > + interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clks 1>, <&clks 2>; > + clock-names = "ipg", "per"; > + fsl,stop-mode = <&gpr 0x34 28>; > + }; > diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt > deleted file mode 100644 > index e10b6eb955e1..000000000000 > --- a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt > +++ /dev/null > @@ -1,57 +0,0 @@ > -Flexcan CAN controller on Freescale's ARM and PowerPC system-on-a-chip (SOC). > - > -Required properties: > - > -- compatible : Should be "fsl,-flexcan" > - > - where is imx8qm, imx6q, imx28, imx53, imx35, imx25, p1010, > - vf610, ls1021ar2, lx2160ar1, ls1028ar1. > - > - The ls1028ar1 must be followed by lx2160ar1, e.g. > - - "fsl,ls1028ar1-flexcan", "fsl,lx2160ar1-flexcan" > - > - An implementation should also claim any of the following compatibles > - that it is fully backwards compatible with: > - > - - fsl,p1010-flexcan > - > -- reg : Offset and length of the register set for this device > -- interrupts : Interrupt tuple for this device > - > -Optional properties: > - > -- clock-frequency : The oscillator frequency driving the flexcan device > - > -- xceiver-supply: Regulator that powers the CAN transceiver > - > -- big-endian: This means the registers of FlexCAN controller are big endian. > - This is optional property.i.e. if this property is not present in > - device tree node then controller is assumed to be little endian. > - if this property is present then controller is assumed to be big > - endian. > - > -- fsl,stop-mode: register bits of stop mode control, the format is > - <&gpr req_gpr req_bit>. > - gpr is the phandle to general purpose register node. > - req_gpr is the gpr register offset of CAN stop request. > - req_bit is the bit offset of CAN stop request. > - > -- fsl,clk-source: Select the clock source to the CAN Protocol Engine (PE). > - It's SoC Implementation dependent. Refer to RM for detailed > - definition. If this property is not set in device tree node > - then driver selects clock source 1 by default. > - 0: clock source 0 (oscillator clock) > - 1: clock source 1 (peripheral clock) > - > -- wakeup-source: enable CAN remote wakeup > - > -Example: > - > - can@1c000 { > - compatible = "fsl,p1010-flexcan"; > - reg = <0x1c000 0x1000>; > - interrupts = <48 0x2>; > - interrupt-parent = <&mpic>; > - clock-frequency = <200000000>; // filled in by bootloader > - fsl,clk-source = <0>; // select clock source 0 for PE > - }; > -- > 2.28.0 >