Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2782594rwi; Tue, 11 Oct 2022 13:19:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7IrF8j5rGTaDH+sjYR6/9+ChKg8pUuGc7kX/rbwZ6Z+glZ+tD0E4nvMxB/kt7D8Z3TpYZS X-Received: by 2002:aa7:88d6:0:b0:565:5fc2:78ec with SMTP id k22-20020aa788d6000000b005655fc278ecmr2762643pff.78.1665519597689; Tue, 11 Oct 2022 13:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665519597; cv=none; d=google.com; s=arc-20160816; b=L7nRYyxqErqc33VuGpkBZ5Nb0lvwpITvJOoh6+eoUsPgbhucRWdBL9H0CL0HwPk68s 891aC3xkMr8vZQwvmjyONJIWvhVHDZ3bLMchqkhnhoTyNQDrz82t0j3ZhBuD0P1YjviG M7ij6/6j4EwYkaqAribVIr+C/rwXp8fPE37WT5BWyLboBaMjdW3My7UzDlEsf/c/SJUF MyL8fK2tuB6oAqLt/+Pb1BTfuDXbjpQC2h6QuX/zlpKRhiYeco4aiChZ0ckXhJPKqF0h T8R8auDrYm9YonuX8HlQpHXghd8gOh9gRl9ZxnZxYk1nDm1w/aynB+zVK3aawLBLwS1F kuyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EOgw9McyN4wBcrcTn/HK7y9+xspiN02elC5wKkWVEUY=; b=yx8IwVCoklZVcBTTMaZcyuIiflBSjaD+BtLU7jIPof1T5b6oto1uQCtxEA6Rz3vL+w nxdPmhLclptM9PGE75BI6lrl7FerZA60gmSv4x8n1i2bxhhHlSkb/nM7ztwxJg9rw3iZ fiC7K3y+uTYULuCnR8fp4kH+dmKU+P6pbGAVUmWkHXyVch2YUrzhDL+9oMBo0I3casEU Hzulf4mMFSk3/pcIDkuhJ7dMktX/Id8X6UrzX3/Q7Rekk++zF06uYXHJB9mcbXcrpewf ZFM8xojFbp521gErNtk00MKF8mTru3yyVSMl6wtSfWaH32fns6gNtFQgBd9rbzLbS4MH Ezrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hf0lUM5d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a170902cec400b00176ab430a57si18871203plg.546.2022.10.11.13.19.45; Tue, 11 Oct 2022 13:19:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hf0lUM5d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229529AbiJKTuY (ORCPT + 99 others); Tue, 11 Oct 2022 15:50:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbiJKTuT (ORCPT ); Tue, 11 Oct 2022 15:50:19 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A71F972B78 for ; Tue, 11 Oct 2022 12:50:12 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id h15so4822195qtu.2 for ; Tue, 11 Oct 2022 12:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EOgw9McyN4wBcrcTn/HK7y9+xspiN02elC5wKkWVEUY=; b=hf0lUM5dUGuQsbRA/lN+Gm2FbwkDaoyyl87xR22mBJTljuiGuo8ajBD7lw6dlRc780 LdFQ8KzqKwa9zRpQ8a1Sfzai/SppbDhEgO6V+NbWPqHn6k4nX0eXtXlvXOCm3eXx9FV1 IFFVkHYZM/uW4w0tKVjqk/2VYAKWeveyffuroBqaFM5Q7YWbvr8kgD+ohbN5zrGEWbk0 dmkINW97D4dXN5CQAX07m1yL04z0GqIy5PYxRGmc74sYTc9cYljpVl3J2+VUjLe8uRZ8 zsrhYvLAr4JtbVmB5SZrK/Os2a6vgJweKzwQN0mRQmvgt7M0NC3oKVpwB3ggV0vxQWmg PDSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EOgw9McyN4wBcrcTn/HK7y9+xspiN02elC5wKkWVEUY=; b=MhzJ/Z41avpqn8IS00bvgkvpVNhzMxagD5+VaEcCAEyVPyJBVyn5NVcdvErhwlEUCy Qb0rofAWbMlgExZG8E86Zf62pZynLbnCk1GOlXEHkjbSEG0qyuNnXnzv6D4IOQOPEILW C8XxayIaJ9y4YQzDulqFVrNPe19MpSn4V3fZupDXuBJuHJfUZu3U7Uu9WL/26FXVUG9T S0YtYRIQfsMsKY8uXESkX/2oV2eaaD12ZX3/aH9QATgoJw4y75BOmUxGiQ5fWZB46+yJ RwQn7g0Ah+GWUeQ+X5BDSITUkW5sIyQYWumxn/bFAM2H4VZpKalPsUjEAQXVSBiAYT7U 40cQ== X-Gm-Message-State: ACrzQf3ct3KuqIjyWeScKJ7i/qHQsI0IE8GfGnkA5xdeQY0mVEruu95x SFjqZmHzlj6vUIHp6VGjmyUmMA== X-Received: by 2002:a05:622a:288:b0:35c:fe52:2e5 with SMTP id z8-20020a05622a028800b0035cfe5202e5mr20249391qtw.59.1665517810295; Tue, 11 Oct 2022 12:50:10 -0700 (PDT) Received: from [192.168.1.57] (cpe-72-225-192-120.nyc.res.rr.com. [72.225.192.120]) by smtp.gmail.com with ESMTPSA id ge27-20020a05622a5c9b00b00342b7e4241fsm11273997qtb.77.2022.10.11.12.50.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Oct 2022 12:50:09 -0700 (PDT) Message-ID: Date: Tue, 11 Oct 2022 15:47:58 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH v3 1/3] dt-bindings: net: marvell,pp2: convert to json-schema Content-Language: en-US To: =?UTF-8?Q?Micha=c5=82_Grzelak?= , devicetree@vger.kernel.org Cc: mw@semihalf.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, upstream@semihalf.com References: <20221011190613.13008-1-mig@semihalf.com> <20221011190613.13008-2-mig@semihalf.com> From: Krzysztof Kozlowski In-Reply-To: <20221011190613.13008-2-mig@semihalf.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/10/2022 15:06, Michał Grzelak wrote: > Convert the marvell,pp2 bindings from text to proper schema. > > Move 'marvell,system-controller' and 'dma-coherent' properties from > port up to the controller node, to match what is actually done in DT. You need to also mention other changes done during conversion - requiring subnodes to be named "(ethernet-)?ports", deprecating port-id. > > Signed-off-by: Michał Grzelak > --- > .../devicetree/bindings/net/marvell,pp2.yaml | 286 ++++++++++++++++++ > .../devicetree/bindings/net/marvell-pp2.txt | 141 --------- > MAINTAINERS | 2 +- > 3 files changed, 287 insertions(+), 142 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/marvell,pp2.yaml > delete mode 100644 Documentation/devicetree/bindings/net/marvell-pp2.txt > > diff --git a/Documentation/devicetree/bindings/net/marvell,pp2.yaml b/Documentation/devicetree/bindings/net/marvell,pp2.yaml > new file mode 100644 > index 000000000000..24c6aeb46814 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/marvell,pp2.yaml > @@ -0,0 +1,286 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/marvell,pp2.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Marvell CN913X / Marvell Armada 375, 7K, 8K Ethernet Controller > + > +maintainers: > + - Marcin Wojtas > + - Russell King > + > +description: | > + Marvell Armada 375 Ethernet Controller (PPv2.1) > + Marvell Armada 7K/8K Ethernet Controller (PPv2.2) > + Marvell CN913X Ethernet Controller (PPv2.3) > + > +properties: > + compatible: > + enum: > + - marvell,armada-375-pp2 > + - marvell,armada-7k-pp22 > + > + reg: > + minItems: 3 > + maxItems: 4 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + clocks: > + minItems: 2 > + items: > + - description: main controller clock > + - description: GOP clock > + - description: MG clock > + - description: MG Core clock > + - description: AXI clock > + > + clock-names: > + minItems: 2 > + items: > + - const: pp_clk > + - const: gop_clk > + - const: mg_clk > + - const: mg_core_clk > + - const: axi_clk > + > + dma-coherent: true > + > + marvell,system-controller: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: a phandle to the system controller. > + > +patternProperties: > + '^(ethernet-)?port@[0-9]+$': > + type: object > + description: subnode for each ethernet port. > + > + properties: > + interrupts: > + minItems: 1 > + maxItems: 10 > + description: interrupt(s) for the port > + > + interrupt-names: > + minItems: 1 > + items: > + - const: hif0 > + - const: hif1 > + - const: hif2 > + - const: hif3 > + - const: hif4 > + - const: hif5 > + - const: hif6 > + - const: hif7 > + - const: hif8 > + - const: link > + > + description: > > + if more than a single interrupt for is given, must be the > + name associated to the interrupts listed. Valid names are: > + "hifX", with X in [0..8], and "link". The names "tx-cpu0", > + "tx-cpu1", "tx-cpu2", "tx-cpu3" and "rx-shared" are supported > + for backward compatibility but shouldn't be used for new > + additions. > + > + reg: > + description: ID of the port from the MAC point of view. > + > + port-id: > + $ref: /schemas/types.yaml#/definitions/uint32 deprecated: true > + description: > > + ID of the port from the MAC point of view. > + Legacy binding for backward compatibility. > + > + phy: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > > + a phandle to a phy node defining the PHY address > + (as the reg property, a single integer). > + > + phy-mode: > + $ref: ethernet-controller.yaml#/properties/phy-mode > + > + marvell,loopback: > + $ref: /schemas/types.yaml#/definitions/flag > + description: port is loopback mode. > + > + gop-port-id: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > > + only for marvell,armada-7k-pp22, ID of the port from the > + GOP (Group Of Ports) point of view. This ID is used to index the > + per-port registers in the second register area. > + > + required: > + - interrupts > + - port-id > + - phy-mode > + - reg Keep the same order of items here as in list of properties > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + > +allOf: > + - $ref: ethernet-controller.yaml# Hmm, are you sure this applies to top-level properties, not to ethernet-port subnodes? Your ports have phy-mode and phy - just like ethernet-controller. If I understand correctly, your Armada Ethernet Controller actually consists of multiple ethernet controllers? If so, this should be moved to proper place inside patternProperties. Maybe the subnodes should also be renamed from ports to just "ethernet" (as ethernet-controller.yaml expects), but other schemas do not follow this convention, > + - if: > + properties: > + compatible: > + const: marvell,armada-7k-pp22 Best regards, Krzysztof