Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1505466rwi; Mon, 10 Oct 2022 18:00:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4RICLhABbRstENbVrmr5GPNrfIkwhBpz2Lrn/swqUugPtyKr/7lgCc61lS6H5TtG+pQRYk X-Received: by 2002:a05:6a00:88f:b0:52c:6962:274f with SMTP id q15-20020a056a00088f00b0052c6962274fmr23305757pfj.12.1665450004056; Mon, 10 Oct 2022 18:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665450004; cv=none; d=google.com; s=arc-20160816; b=Puw0EJRxhpe6y+dRZ0qnMzdLUd4SCqErY65E5S7xVL9tNSHfP+IgXv2l2LBOOpNY4x oQqYeZMAhFt22jiqK6FwifNTpOJ1KRk3i/kFkD2Uf587Y8lJvc//JktUk68pLrQ9KXzo NRdikQvMdA8S+MQQIDY5z1TbwmXFTFKplroI9jkCWcCVGTd0G5NxR4Fczqg6fCc6839z mqxpZ0aSUZeLo3FZZX5F7NgRIdLVIBhcF4nrJw+5li19KkbbqCgT59H9Xeriw3tJb8lT KlxTq2SwhQF8r6ema2Xc76V6NfTd1K+9vALC1NEATLaWhqOTUydTXH8a2ygpcUR2tlW/ LM9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CAG1OQzBDKZih+9JChCc9zr67psu/gssWF1Btg5zONk=; b=egxMFruvbi1uJBYbRNl0GjFGzAQ6P1Ddu/wnMeXFZpeoEr7is1q4HJBUvSfPN6HG2v llJwGpaS9zJpCYER0Df/kmxITzBNyKrLK0UAJn8VgBaxzAjF+HYMDGwt4en7gI7/9gG9 j4elldYdJxGXzTL95+95sv/cI0Plj1rB+5BOMi+Z1uKHDe4Y8FpQ5co/vYl+k+8mtbaH auZoTcxGhqSGYuFmHLygwr9EqA6TNM0mzzDW4MQIIsgom9IOX/MltWilfI6a8c40ipwv gv9eiHawFhwp9Lo34vRE7GdQbs2qtZ49uPjWc3Y8stRXIQOMxmvaZEuH3zg/Gj7U4l0B 3XKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=idJlfjxY; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=semihalf.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a170902f14d00b00178b562e79asi12813587plb.263.2022.10.10.17.59.51; Mon, 10 Oct 2022 18:00:04 -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=@semihalf.com header.s=google header.b=idJlfjxY; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=semihalf.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbiJKAia (ORCPT + 99 others); Mon, 10 Oct 2022 20:38:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229646AbiJKAi0 (ORCPT ); Mon, 10 Oct 2022 20:38:26 -0400 Received: from mail-oo1-xc31.google.com (mail-oo1-xc31.google.com [IPv6:2607:f8b0:4864:20::c31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 176BF8262F for ; Mon, 10 Oct 2022 17:38:23 -0700 (PDT) Received: by mail-oo1-xc31.google.com with SMTP id m11-20020a4aab8b000000b00476743c0743so9041050oon.10 for ; Mon, 10 Oct 2022 17:38:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CAG1OQzBDKZih+9JChCc9zr67psu/gssWF1Btg5zONk=; b=idJlfjxY7IFFy99rv+yG23stcCoHJT1jjKgm6bgeMQ/xKZY2zAIVr8XXAYR3ZHseNV g8kD2/0OfdQ4bXxvxGnfSUly7+r/N4aMViJF1HlYWfw2QKLb7kAZHepM5szrixev40Zx lE9xcHFGv4ExvLzPq13oL+oTfZKRIbkrMepw1j+Fw527JbfH/U9LYfkjhv6iMuRxBewz WxryNyjsrEalBrs9P/nZEnyKUO4o8p/5ClH+LezZF0J81Sut3XIK/0gshgCQD9PA7IN5 9Tc91gaIFlEy+zhAtG+YHdE65Ps5MumNBC6ULGdWuTCAa9TY3TM5zU7GSVMRLs5Cq5Vm 9gog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CAG1OQzBDKZih+9JChCc9zr67psu/gssWF1Btg5zONk=; b=2YTnt68CBge80r+xdCaj/a4hVECmmHMzmc+hy1Dk/eyT1M/F5xm2n18pg12IVuZUvX bi1ABfJbteStFib5Gl9XFsRy1yOvz50wRaikKof3VcetkqITseg2eVXk6TFFUAqorZEP Z6w35qYw00znpigmBdHi6srUnHcuC6On6nmPTCf4r+Q4h9IadrI+1TE93YWhTecSG+or d75n+KqhrV1tEQyICSXups2rfRXQ9I7cbhH9T4FYhrQv17mxQ78qpCbX/RVTbEZSjJTn pIdL5XmlQq+I15wI674utsnXLPeTQPM/xpIsqEoQUQH5hXUjflhRhsEbE4/7MSx9vocX vogA== X-Gm-Message-State: ACrzQf0aaqsJX7sqezzEoPZELIcKh7szWINb/WQgiZCXjZVMsB89rN4/ WGJ068bB4DDPXPlGDM1bquUE+T0qLPYUXEvowUurNw== X-Received: by 2002:a9d:7a8a:0:b0:656:284c:d5bd with SMTP id l10-20020a9d7a8a000000b00656284cd5bdmr9205692otn.52.1665448702387; Mon, 10 Oct 2022 17:38:22 -0700 (PDT) MIME-Version: 1.0 References: <20220926232136.38567-1-mig@semihalf.com> In-Reply-To: <20220926232136.38567-1-mig@semihalf.com> From: Marcin Wojtas Date: Tue, 11 Oct 2022 02:38:13 +0200 Message-ID: Subject: Re: [PATCH v2] dt-bindings: net: marvell,pp2: convert to json-schema To: =?UTF-8?Q?Micha=C5=82_Grzelak?= Cc: devicetree@vger.kernel.org, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Hi Micha=C5=82, Additional comments inline. wt., 27 wrz 2022 o 01:22 Micha=C5=82 Grzelak napisa=C5= =82(a): > > This converts 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. > > Signed-off-by: Micha=C5=82 Grzelak > --- > .../devicetree/bindings/net/marvell,pp2.yaml | 241 ++++++++++++++++++ > .../devicetree/bindings/net/marvell-pp2.txt | 141 ---------- > MAINTAINERS | 2 +- > 3 files changed, 242 insertions(+), 142 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/marvell,pp2.yam= l > delete mode 100644 Documentation/devicetree/bindings/net/marvell-pp2.txt > > diff --git a/Documentation/devicetree/bindings/net/marvell,pp2.yaml b/Doc= umentation/devicetree/bindings/net/marvell,pp2.yaml > new file mode 100644 > index 000000000000..6faa4c87dfc6 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/marvell,pp2.yaml > @@ -0,0 +1,241 @@ > +# 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 > + description: | > + For "marvell,armada-375-pp2", must contain the following register = sets: > + - common controller registers > + - LMS registers > + - one register area per Ethernet port > + For "marvell,armada-7k-pp22" used by 7K/8K and CN913X, must contai= n the following register sets: > + - packet processor registers > + - networking interfaces registers > + - CM3 address space used for TX Flow Control > + > + 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 > + '#size-cells': true > + '#address-cells': true > + > + marvell,system-controller: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: a phandle to the system controller. > + > +patternProperties: > + '^eth[0-9a-f]*(@.*)?$': > + type: object > + properties: > + interrupts: > + minItems: 1 > + maxItems: 10 > + description: interrupt(s) for the port > + > + interrupt-names: > + 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. > + > + port-id: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: ID of the port from the MAC point of view. > + > + 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 t= he > + per-port registers in the second register area. > + > + required: > + - interrupts > + - port-id > + - phy-mode > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + > +allOf: > + - $ref: ethernet-controller.yaml# > + - if: > + properties: > + compatible: > + const: marvell,armada-7k-pp22 > + then: > + patternProperties: > + '^eth[0-9a-f]*(@.*)?$': > + required: > + - gop-port-id For this variant, 'marvell,system-controller' should also be marked as requ= ired. > + > +unevaluatedProperties: false > + > +examples: > + - | > + // For Armada 375 variant > + #include > + #include > + > + ethernet@f0000 { > + compatible =3D "marvell,armada-375-pp2"; > + reg =3D <0xf0000 0xa000>, > + <0xc0000 0x3060>, > + <0xc4000 0x100>, > + <0xc5000 0x100>; > + clocks =3D <&gateclk 3>, <&gateclk 19>; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + clock-names =3D "pp_clk", "gop_clk"; > + > + eth0: eth0@c4000 { > + reg =3D <0xc4000>; > + interrupts =3D ; > + port-id =3D <0>; > + phy =3D <&phy0>; > + phy-mode =3D "gmii"; > + }; > + > + eth1: eth1@c5000 { > + reg =3D <0xc5000>; > + interrupts =3D ; > + port-id =3D <1>; > + phy =3D <&phy3>; > + phy-mode =3D "gmii"; > + }; > + }; > + > + - | > + // For Armada 7k/8k and Cn913x variants > + #include > + #include > + > + cpm_ethernet: ethernet@0 { > + compatible =3D "marvell,armada-7k-pp22"; > + reg =3D <0x0 0x100000>, <0x129000 0xb000>, <0x220000 0x800>; > + clocks =3D <&cpm_syscon0 1 3>, <&cpm_syscon0 1 9>, > + <&cpm_syscon0 1 5>, <&cpm_syscon0 1 6>, <&cpm_syscon0 1 1= 8>; s/syscon0/clk/ Also add missing marvell,system-controller. Best regards, Marcin