From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FD76C48BCF for ; Wed, 9 Jun 2021 12:12:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 287F161285 for ; Wed, 9 Jun 2021 12:12:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234982AbhFIMOj (ORCPT ); Wed, 9 Jun 2021 08:14:39 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:40984 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231504AbhFIMOh (ORCPT ); Wed, 9 Jun 2021 08:14:37 -0400 Received: from mail-wr1-f70.google.com ([209.85.221.70]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lqx4c-0000WJ-4i for linux-kernel@vger.kernel.org; Wed, 09 Jun 2021 12:12:42 +0000 Received: by mail-wr1-f70.google.com with SMTP id n2-20020adfb7420000b029010e47b59f31so10601133wre.9 for ; Wed, 09 Jun 2021 05:12:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YiKsApz3Kn55IWmxBblM0+f7lrgP6BHHgzZj0LGtc3w=; b=XkbYiqm7yIoDX1YqFmseyobVFliExQB0hH3JHlLT367cLrbqVcyl+NvpO7R/ie0V/1 TdpwzU1n1m/XJfX/gy3WZvtxiS4fym9Qen0QmS66ib8DOmjsdPi4rtgEvurarPRM+R7r Ido22pDRd2Cy/zLrEvelgQs8tFB+X0JmC7IQzJDVLwsOmeRSVJWPABa+sWO/1KN+kfDV 6lfN6sgeRkTKYJxnP6sLemE/+ZU50DMkqAYv/kGiQwODqu1SB9C8brxWhaBFkjaevu5J /tzeVF+FhA/hSun+TLKvfgPjYAROC1dhqMN7Zr7y64gFmsVRA0cgjc6xVVu8abOiI7SV AGcQ== X-Gm-Message-State: AOAM532LAoxLd9JrlU7tcImKo5gU94iyN6tmLSCmFWlKgnZvuziLe6yI I0/LYzm1/HpZaRD8FrEQHomHen+fF+MfJ/tJWX/ptV5eBgA6KE8Wb9POLECkKyTyl/AvYOdBYSq 2pXQDtZqJAWD0WfLeZHa9YGhs5Gd50N85oi1LVfe27g== X-Received: by 2002:a05:600c:3ba0:: with SMTP id n32mr9527852wms.107.1623240761747; Wed, 09 Jun 2021 05:12:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0euTzMB48q6sD49NwO7dbIsHtvW8un1vfWvC33GDT6eTYVH+LHuyUI/ewSE9x5zE3LT1Eig== X-Received: by 2002:a05:600c:3ba0:: with SMTP id n32mr9527834wms.107.1623240761587; Wed, 09 Jun 2021 05:12:41 -0700 (PDT) Received: from [192.168.1.115] (xdsl-188-155-177-222.adslplus.ch. [188.155.177.222]) by smtp.gmail.com with ESMTPSA id o26sm10206773wms.27.2021.06.09.05.12.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 05:12:41 -0700 (PDT) Subject: Re: [PATCH v22 09/18] dt-binding: memory: pl353-smc: Convert to yaml To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , linux-mtd@lists.infradead.org, Rob Herring , devicetree@vger.kernel.org Cc: Michal Simek , Naga Sureshkumar Relli , Amit Kumar Mahapatra , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, helmut.grohne@intenta.de, Srinivas Goud , Siva Durga Prasad Paladugu References: <20210609080112.1753221-1-miquel.raynal@bootlin.com> <20210609080112.1753221-10-miquel.raynal@bootlin.com> From: Krzysztof Kozlowski Message-ID: Date: Wed, 9 Jun 2021 14:12:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210609080112.1753221-10-miquel.raynal@bootlin.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/06/2021 10:01, Miquel Raynal wrote: > Convert this binding file to yaml schema. > > Signed-off-by: Miquel Raynal > --- > .../memory-controllers/arm,pl353-smc.yaml | 133 ++++++++++++++++++ > .../bindings/memory-controllers/pl353-smc.txt | 45 ------ > 2 files changed, 133 insertions(+), 45 deletions(-) > create mode 100644 Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/pl353-smc.txt > > diff --git a/Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml b/Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml > new file mode 100644 > index 000000000000..1de6f87d4986 > --- /dev/null > +++ b/Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml > @@ -0,0 +1,133 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/memory-controllers/arm,pl353-smc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ARM PL353 Static Memory Controller (SMC) device-tree bindings > + > +maintainers: > + - Miquel Raynal > + - Naga Sureshkumar Relli > + > +description: > + The PL353 Static Memory Controller is a bus where you can connect two kinds > + of memory interfaces, which are NAND and memory mapped interfaces (such as > + SRAM or NOR). > + > +# We need a select here so we don't match all nodes with 'arm,primecell' > +select: > + properties: > + compatible: > + contains: > + enum: > + - arm,pl353-smc-r2p1 That's a const... but also I don't get the need for select. > + required: > + - compatible > + > +properties: > + $nodename: > + pattern: "^memory-controller@[0-9a-f]+$" > + > + compatible: > + oneOf: > + - items: > + - enum: > + - arm,pl353-smc-r2p1 > + - enum: > + - arm,primecell This looks unusual. Basically you change the bindings, because before they required "arm,pl353-smc-r2p1", "arm,primecell". Don't you want here items: - const: ... - const: ... ? > + > + "#address-cells": > + const: 2 > + > + "#size-cells": > + const: 1 > + > + reg: > + items: > + - description: configuration registers for the host and sub-controllers Just maxItems. Description is obvious. > + > + clocks: > + items: > + - description: the clock for the memory device bus > + - description: the main clock of the controller Isn't apb_pclk the bus clock (so second item below)? > + > + clock-names: > + items: > + - const: memclk > + - const: apb_pclk > + > + ranges: > + minItems: 1 > + maxItems: 3 > + description: | > + Memory bus areas for interacting with the devices. Reflects > + the memory layout with four integer values following: > + 0 > + items: > + - description: NAND bank 0 > + - description: NOR/SRAM bank 0 > + - description: NOR/SRAM bank 1 > + > + interrupts: true > + > +patternProperties: > + ".*@[0-9]+,[0-9]+$": Match with start ^. I think you cannot have 9 nodes and hex can appear in address so maybe: "^.*@[0-3],[a-f0-9]+$": > + type: object > + description: | > + The child device node represents the controller connected to the SMC > + bus. The controller can be a NAND controller or a pair of any memory > + mapped controllers such as NOR and SRAM controllers. > + Best regards, Krzysztof From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE455C48BCD for ; Wed, 9 Jun 2021 12:47:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E06361354 for ; Wed, 9 Jun 2021 12:47:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E06361354 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BOiXl/TUpC1w/9O75Ey3DSnsscz/O9/Obhrd0SjtpiI=; b=oLwsb1Fc1FFw56Jq9PBwDl+zLc yBVHlhNP9D9FvMi11FjhIJHkyZB5O3Ik6Lg3GxSrl6rT1vgOo0VduCBUWCOIrDXgiqPOQlTExWmJs YQfnot4+/LgDtWXISpbdfMjAOezcLq8QfArtl4aOiD50qBYxKLiUba8XWtaVyfhgPRZglKKeBTKY5 M/93zV+2e5xGRNzzBTznP7p4DbE4ql1XHEMp23vP+rejLYMY/UBN0L/ua7X3OUc/WS1SDKKIanuPI GyGauFjNLhgZhvrn5OFWdqyemZ9XUCp/FaC3LFoMz4UeQ2yNRqk/7euiNt2z6wAAqnw4aZV/EuXOw 8LBm2qPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqxbQ-00DmTS-FU; Wed, 09 Jun 2021 12:46:37 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqx4d-00DaqB-Rg for linux-mtd@lists.infradead.org; Wed, 09 Jun 2021 12:12:45 +0000 Received: from mail-wr1-f69.google.com ([209.85.221.69]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lqx4c-0000WO-6Q for linux-mtd@lists.infradead.org; Wed, 09 Jun 2021 12:12:42 +0000 Received: by mail-wr1-f69.google.com with SMTP id n4-20020a5d42040000b0290119fef97609so851351wrq.18 for ; Wed, 09 Jun 2021 05:12:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YiKsApz3Kn55IWmxBblM0+f7lrgP6BHHgzZj0LGtc3w=; b=rgRzHYv/xKrJtvXUVHzZt+oVW/m5zXWyVmU6aPBMqwbmxvGmBBV7OP5mFfDV/rsvWE ypiDMIAI15mZGolNbKadmcfLJKUFyEJEuDUjKE6UuDodweXyuNkCXvy1NiPcCi6sGItm jgwE2EHTWuSmXQ8Eb9WY4Mc/WGjSj4KNAPINUaP++n5JHAk/Lg2dOxGFolmh+Ph8TQCD xAvciG9CmIHJ7XefOYaCv14ee8SNbZ+n033/6RGPu9BLf8wlSNaR3FdS0S4KtAMTfENP hA/vPln2MUrRp+NyL5DVYDQt6YWNobrIvfmOuSMKzM04zx7v/PfnkwwZEfnsl3GF8om3 A8Jw== X-Gm-Message-State: AOAM532s6xDxKWNVLjkdDdAr1pkuvKFW9PfYQLXLl5ql99DmttFypb0b GZ7Sqk7esLXSzeR7YwR0WKwNymmHTs/ioduXPXImRBmzcBHie5w6wnRpwHZ9QNk8TuOKIXYFN9m usIn+h0/WELNTHys21f8bHew29NJYCnIq8mt4Dn4ehKc= X-Received: by 2002:a05:600c:3ba0:: with SMTP id n32mr9527873wms.107.1623240761876; Wed, 09 Jun 2021 05:12:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0euTzMB48q6sD49NwO7dbIsHtvW8un1vfWvC33GDT6eTYVH+LHuyUI/ewSE9x5zE3LT1Eig== X-Received: by 2002:a05:600c:3ba0:: with SMTP id n32mr9527834wms.107.1623240761587; Wed, 09 Jun 2021 05:12:41 -0700 (PDT) Received: from [192.168.1.115] (xdsl-188-155-177-222.adslplus.ch. [188.155.177.222]) by smtp.gmail.com with ESMTPSA id o26sm10206773wms.27.2021.06.09.05.12.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 05:12:41 -0700 (PDT) Subject: Re: [PATCH v22 09/18] dt-binding: memory: pl353-smc: Convert to yaml To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , linux-mtd@lists.infradead.org, Rob Herring , devicetree@vger.kernel.org Cc: Michal Simek , Naga Sureshkumar Relli , Amit Kumar Mahapatra , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, helmut.grohne@intenta.de, Srinivas Goud , Siva Durga Prasad Paladugu References: <20210609080112.1753221-1-miquel.raynal@bootlin.com> <20210609080112.1753221-10-miquel.raynal@bootlin.com> From: Krzysztof Kozlowski Message-ID: Date: Wed, 9 Jun 2021 14:12:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210609080112.1753221-10-miquel.raynal@bootlin.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_051243_960277_61934726 X-CRM114-Status: GOOD ( 23.59 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On 09/06/2021 10:01, Miquel Raynal wrote: > Convert this binding file to yaml schema. > > Signed-off-by: Miquel Raynal > --- > .../memory-controllers/arm,pl353-smc.yaml | 133 ++++++++++++++++++ > .../bindings/memory-controllers/pl353-smc.txt | 45 ------ > 2 files changed, 133 insertions(+), 45 deletions(-) > create mode 100644 Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/pl353-smc.txt > > diff --git a/Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml b/Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml > new file mode 100644 > index 000000000000..1de6f87d4986 > --- /dev/null > +++ b/Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml > @@ -0,0 +1,133 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/memory-controllers/arm,pl353-smc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ARM PL353 Static Memory Controller (SMC) device-tree bindings > + > +maintainers: > + - Miquel Raynal > + - Naga Sureshkumar Relli > + > +description: > + The PL353 Static Memory Controller is a bus where you can connect two kinds > + of memory interfaces, which are NAND and memory mapped interfaces (such as > + SRAM or NOR). > + > +# We need a select here so we don't match all nodes with 'arm,primecell' > +select: > + properties: > + compatible: > + contains: > + enum: > + - arm,pl353-smc-r2p1 That's a const... but also I don't get the need for select. > + required: > + - compatible > + > +properties: > + $nodename: > + pattern: "^memory-controller@[0-9a-f]+$" > + > + compatible: > + oneOf: > + - items: > + - enum: > + - arm,pl353-smc-r2p1 > + - enum: > + - arm,primecell This looks unusual. Basically you change the bindings, because before they required "arm,pl353-smc-r2p1", "arm,primecell". Don't you want here items: - const: ... - const: ... ? > + > + "#address-cells": > + const: 2 > + > + "#size-cells": > + const: 1 > + > + reg: > + items: > + - description: configuration registers for the host and sub-controllers Just maxItems. Description is obvious. > + > + clocks: > + items: > + - description: the clock for the memory device bus > + - description: the main clock of the controller Isn't apb_pclk the bus clock (so second item below)? > + > + clock-names: > + items: > + - const: memclk > + - const: apb_pclk > + > + ranges: > + minItems: 1 > + maxItems: 3 > + description: | > + Memory bus areas for interacting with the devices. Reflects > + the memory layout with four integer values following: > + 0 > + items: > + - description: NAND bank 0 > + - description: NOR/SRAM bank 0 > + - description: NOR/SRAM bank 1 > + > + interrupts: true > + > +patternProperties: > + ".*@[0-9]+,[0-9]+$": Match with start ^. I think you cannot have 9 nodes and hex can appear in address so maybe: "^.*@[0-3],[a-f0-9]+$": > + type: object > + description: | > + The child device node represents the controller connected to the SMC > + bus. The controller can be a NAND controller or a pair of any memory > + mapped controllers such as NOR and SRAM controllers. > + Best regards, Krzysztof ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2E31C48BCD for ; Wed, 9 Jun 2021 12:49:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 810A161354 for ; Wed, 9 Jun 2021 12:49:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 810A161354 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=AKeYk53V8urgiECchbKtT2UJFnBfr4ADkGu6UhAQJaU=; b=DzEdFcheCwHbT1EGcQGsyWRPFO D3bG0Naq+KBKz+ez1kH5YLwXeFzd8i+igrsfNFv5KSrWCUj4JBJpczdyilwYLHzDeS+IIt9hBcXVx xYI65tTPjPWdNi48Hq8e+65Qg6U1ZKA1IICtvcwrYxFos5O4GmG5Vu7vrlaUj3KlNQ/MeratAA/9k N178aILYR/GfzrPFJ0Bx7mUF8SSfqxEXg/Lc4qFxOhferzPh0QvGkiuuNmzliD3F+OKC8pvJzKmYu Zo6Der96+h3wxM9BBhBB0jJvOlfk2KZqYLnXfjb27UkORKvzBL4Tc6l9Z/w6+lQaJ0SEEIyxMLvWB V9xjbjqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqxaa-00Dm5U-HB; Wed, 09 Jun 2021 12:45:45 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqx4d-00Daq5-HJ for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 12:12:45 +0000 Received: from mail-wr1-f69.google.com ([209.85.221.69]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lqx4c-0000WG-3H for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 12:12:42 +0000 Received: by mail-wr1-f69.google.com with SMTP id d5-20020a0560001865b0290119bba6e1c7so6726924wri.20 for ; Wed, 09 Jun 2021 05:12:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YiKsApz3Kn55IWmxBblM0+f7lrgP6BHHgzZj0LGtc3w=; b=quosCfCNAxUDQWoE/BXcJVcpFh9nkI9RAsavUIgZjN5/zRvl9hhUBsqr2csEnDH7S3 JSjZN8phLYkZFkNJZgJ3ksByOd6k60VZ1M8R+Tb2wZg3pMcfirrFwuOpuHEZeuctwJaf fpz0fCxt/qK1xCdstJvlshsQ5cV1rf1aAJaieiaCfLNBVn89boD69aCVHhfPbYE9zofM iHSxIlCCnaaDAJY5gsj6fNlrbhs7ZR9eREU3yoN3et+sD2r/8+EQq95fgl8uc03B43Ri i8/xm6t/XDvXihnjEohF4rWzYo3xyMh98kqSYL/kZYg+nAVT4nAPJn2d8HlIX8NO9FNy qUjw== X-Gm-Message-State: AOAM532z1VcTnf1WCi3tDg9oDQjwdhu+f7N59nWfhl2pjOweVzd4sXc2 tifRJ7gTF0zYwGmFTe4RKAJ3ydDbGkOJuxtLay7rJT8ignwDm3UTLPGbfNbsiuf1rq9tENUxlP0 qU5A1IF9qHFFX8ZJWS/3SXJWly9IRT2ZIrlOHQQuch3VHkTMqXWb5 X-Received: by 2002:a05:600c:3ba0:: with SMTP id n32mr9527856wms.107.1623240761747; Wed, 09 Jun 2021 05:12:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0euTzMB48q6sD49NwO7dbIsHtvW8un1vfWvC33GDT6eTYVH+LHuyUI/ewSE9x5zE3LT1Eig== X-Received: by 2002:a05:600c:3ba0:: with SMTP id n32mr9527834wms.107.1623240761587; Wed, 09 Jun 2021 05:12:41 -0700 (PDT) Received: from [192.168.1.115] (xdsl-188-155-177-222.adslplus.ch. [188.155.177.222]) by smtp.gmail.com with ESMTPSA id o26sm10206773wms.27.2021.06.09.05.12.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 05:12:41 -0700 (PDT) Subject: Re: [PATCH v22 09/18] dt-binding: memory: pl353-smc: Convert to yaml To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , linux-mtd@lists.infradead.org, Rob Herring , devicetree@vger.kernel.org Cc: Michal Simek , Naga Sureshkumar Relli , Amit Kumar Mahapatra , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, helmut.grohne@intenta.de, Srinivas Goud , Siva Durga Prasad Paladugu References: <20210609080112.1753221-1-miquel.raynal@bootlin.com> <20210609080112.1753221-10-miquel.raynal@bootlin.com> From: Krzysztof Kozlowski Message-ID: Date: Wed, 9 Jun 2021 14:12:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210609080112.1753221-10-miquel.raynal@bootlin.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_051243_650297_7EC673D5 X-CRM114-Status: GOOD ( 24.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 09/06/2021 10:01, Miquel Raynal wrote: > Convert this binding file to yaml schema. > > Signed-off-by: Miquel Raynal > --- > .../memory-controllers/arm,pl353-smc.yaml | 133 ++++++++++++++++++ > .../bindings/memory-controllers/pl353-smc.txt | 45 ------ > 2 files changed, 133 insertions(+), 45 deletions(-) > create mode 100644 Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/pl353-smc.txt > > diff --git a/Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml b/Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml > new file mode 100644 > index 000000000000..1de6f87d4986 > --- /dev/null > +++ b/Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml > @@ -0,0 +1,133 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/memory-controllers/arm,pl353-smc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ARM PL353 Static Memory Controller (SMC) device-tree bindings > + > +maintainers: > + - Miquel Raynal > + - Naga Sureshkumar Relli > + > +description: > + The PL353 Static Memory Controller is a bus where you can connect two kinds > + of memory interfaces, which are NAND and memory mapped interfaces (such as > + SRAM or NOR). > + > +# We need a select here so we don't match all nodes with 'arm,primecell' > +select: > + properties: > + compatible: > + contains: > + enum: > + - arm,pl353-smc-r2p1 That's a const... but also I don't get the need for select. > + required: > + - compatible > + > +properties: > + $nodename: > + pattern: "^memory-controller@[0-9a-f]+$" > + > + compatible: > + oneOf: > + - items: > + - enum: > + - arm,pl353-smc-r2p1 > + - enum: > + - arm,primecell This looks unusual. Basically you change the bindings, because before they required "arm,pl353-smc-r2p1", "arm,primecell". Don't you want here items: - const: ... - const: ... ? > + > + "#address-cells": > + const: 2 > + > + "#size-cells": > + const: 1 > + > + reg: > + items: > + - description: configuration registers for the host and sub-controllers Just maxItems. Description is obvious. > + > + clocks: > + items: > + - description: the clock for the memory device bus > + - description: the main clock of the controller Isn't apb_pclk the bus clock (so second item below)? > + > + clock-names: > + items: > + - const: memclk > + - const: apb_pclk > + > + ranges: > + minItems: 1 > + maxItems: 3 > + description: | > + Memory bus areas for interacting with the devices. Reflects > + the memory layout with four integer values following: > + 0 > + items: > + - description: NAND bank 0 > + - description: NOR/SRAM bank 0 > + - description: NOR/SRAM bank 1 > + > + interrupts: true > + > +patternProperties: > + ".*@[0-9]+,[0-9]+$": Match with start ^. I think you cannot have 9 nodes and hex can appear in address so maybe: "^.*@[0-3],[a-f0-9]+$": > + type: object > + description: | > + The child device node represents the controller connected to the SMC > + bus. The controller can be a NAND controller or a pair of any memory > + mapped controllers such as NOR and SRAM controllers. > + Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel