Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1607303iog; Sat, 25 Jun 2022 14:12:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uFfxqCl7ZmtqzALx6cjH211WfooL1DpGvVrKTf9kgxs4lfWjW88NbDRv58tRYA7/NlKS8t X-Received: by 2002:a17:907:7da2:b0:711:f36e:b855 with SMTP id oz34-20020a1709077da200b00711f36eb855mr5643227ejc.308.1656191562591; Sat, 25 Jun 2022 14:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656191562; cv=none; d=google.com; s=arc-20160816; b=k+dOUT3hxScZQQIwvFpSc0w489kRr18RDkAOkBUfoxh3hrcqM5X3mEjPgTtMTKBH3F LRKgIMncuqiMuHmeUQ/KoCL6jhYkLtWyywt5ROARMSUKN6MDBMMIQ/xMCzier1cyWRL9 D9OurkKFty5IC4GrUr/NRuvQjyOJRqX9Om/sb+l9GuW8XrjQVDuDMOtWOhJlpKK3tFaD EPQhDLByCh97qrGuAGni8hlC5Ur4bPYtCbAdN9/7TXyUjyeyn2jtf3p7tDhcafzA/1tm tr8UYVZGNMXxsGVuAaJP1zO9mLnHZ/KJ6ywSrYCa2klosU9YwSu5QEKutxDq9SVAVhr4 HP+Q== 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=8DfPB+6+v8MPZjnhRqnPJ95rq7IbN6JaoTlReGsTtZw=; b=Gv14HXsvlHQf5AnS1bqu6ebONMATLuIYkkzgtAb7wAFqcYXUr2xz+kkDWaC1ngeN6N NJ+5XpItphTSwj1s6jnrMbTMeTHRbNZ34RQCEhdd+GRacWy7wqPkfSScx7Mqo7RmdRf/ JxHEEpfx+EsBk66O6bEipgViMsyE0EaDOEqRxA5ywhjjNQVbro0m7e8anlNxIi+7VJln to0YnMcvZo3rUT73fgmvvr83NrzV8iaAO8mg3d63w5I+mIWvxBhJbiiM9FXQgUXggi/p IZPpmna3e+1vKZ+D+FDptBHK+f0UhwpeSCHgdsMUsgBbv0TyVsbpbiBA89vViE8SX/Z5 eFPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J1Y9airS; 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 rh25-20020a17090720f900b006e7d38a8843si6636495ejb.443.2022.06.25.14.12.17; Sat, 25 Jun 2022 14:12:42 -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=J1Y9airS; 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 S233398AbiFYU7i (ORCPT + 99 others); Sat, 25 Jun 2022 16:59:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233267AbiFYU7h (ORCPT ); Sat, 25 Jun 2022 16:59:37 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF5212AC6 for ; Sat, 25 Jun 2022 13:59:36 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id o9so7896777edt.12 for ; Sat, 25 Jun 2022 13:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=8DfPB+6+v8MPZjnhRqnPJ95rq7IbN6JaoTlReGsTtZw=; b=J1Y9airSGKm4W7Ntehp1NBPUtCHFAsGVCmPiLsw4GI8HIpoML+FgByP9iG2S0A9b85 dvac41Ml0vNUDWuyyje4WZ/buNkqUi7buep79Rv5+UMFwHoKlrHl6otkBjf2bhnjfPhQ iZiwzxC9IkBC+mhJ+ef7vpBe2zQaQTkqLVApmDYudVZVcxlvcZCI2dE+fGtfJicQAt+0 GXWFSEclRoyQhImU3H4mY1VtsqoQ8W1JbU7qefb1Jznc+vLRA436+2qJ4xQlVzam8WSM eCXATZxTwl5LLJlXW+l4xcNBRjEo1pbmMl2pUoUpFlKDZZfxb0yVjefS9BIGOpwqjenv OrHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=8DfPB+6+v8MPZjnhRqnPJ95rq7IbN6JaoTlReGsTtZw=; b=hVS/cyyxDFH6iR63/Cv+2rT5UG/E+paASziS72iff8MJqn97LrCiidT7Evv8Ofwrod ERh3fMUirwh0YSLMgOu0rFBoSR7a+V0V0HAB0n829SrA1CdENmYNUwYB0/DhQ/TU5PeH J7x8x58oNuDHBjjz6k2yzkx80Vq/kEQdb8fS90PrEVQAVDBgAYvG2hKZjjQTQq5VL1Dr dffLMmvUsSnQjCTGEzN+2BWqQKG1puGbDiaT9xNqjr+/MEDO6tyYcB1pDMGVCJk0ZRam 60dmUQXtdqpUxU0EUkHEy+At2KPW47qkcEeVt5cPlL+Y0HgKqYgH6j6xG67QliTxrgHK IZvw== X-Gm-Message-State: AJIora95W/roqVZkTIrLlbTvpRpN4KOyyIqqsAGCeFGWSToz20M0zeIy OHfq0i5S3VV8Fa4iIw/H/umTNw== X-Received: by 2002:a05:6402:4244:b0:437:726c:e1a with SMTP id g4-20020a056402424400b00437726c0e1amr4502166edb.107.1656190775076; Sat, 25 Jun 2022 13:59:35 -0700 (PDT) Received: from [192.168.0.239] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id g3-20020a1709061c8300b0070759e37183sm3007655ejh.59.2022.06.25.13.59.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Jun 2022 13:59:34 -0700 (PDT) Message-ID: Date: Sat, 25 Jun 2022 22:59:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [net-next 2/2] dt-bindings: net: adin1110: Add docs Content-Language: en-US To: alexandru.tachici@analog.com, netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, gerhard@engleder-embedded.com, geert+renesas@glider.be, joel@jms.id.au, stefan.wahren@i2se.com, wellslutw@gmail.com, geert@linux-m68k.org, robh+dt@kernel.org, d.michailidis@fungible.com, stephen@networkplumber.org, l.stelmach@samsung.com, linux-kernel@vger.kernel.org References: <20220624200628.77047-1-alexandru.tachici@analog.com> <20220624200628.77047-3-alexandru.tachici@analog.com> From: Krzysztof Kozlowski In-Reply-To: <20220624200628.77047-3-alexandru.tachici@analog.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 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,T_SCC_BODY_TEXT_LINE autolearn=ham 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 24/06/2022 22:06, alexandru.tachici@analog.com wrote: > From: Alexandru Tachici > > Add bindings for the ADIN1110/2111 MAC-PHY/SWITCH. > > Signed-off-by: Alexandru Tachici > --- > .../devicetree/bindings/net/adi,adin1110.yaml | 127 ++++++++++++++++++ > 1 file changed, 127 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/adi,adin1110.yaml > > diff --git a/Documentation/devicetree/bindings/net/adi,adin1110.yaml b/Documentation/devicetree/bindings/net/adi,adin1110.yaml > new file mode 100644 > index 000000000000..0ac18dd62e5a > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/adi,adin1110.yaml > @@ -0,0 +1,127 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/net/adi,adin1110.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" No quotes in both of above. > + > +title: ADI ADIN1110 MAC-PHY > + > +allOf: allOf goes after description. > + - $ref: ethernet-controller.yaml# > + - $ref: spi-controller.yaml# From the description it looks it is SPI device, not a controller. > + > +maintainers: > + - Alexandru Tachici > + > +description: | > + The ADIN1110 is a low power single port 10BASE-T1L MAC- > + PHY designed for industrial Ethernet applications. It integrates > + an Ethernet PHY core with a MAC and all the associated analog > + circuitry, input and output clock buffering. > + > + The ADIN2111 is a low power, low complexity, two-Ethernet ports > + switch with integrated 10BASE-T1L PHYs and one serial peripheral > + interface (SPI) port. The device is designed for industrial Ethernet > + applications using low power constrained nodes and is compliant > + with the IEEE 802.3cg-2019 Ethernet standard for long reach > + 10 Mbps single pair Ethernet (SPE). > + > + The device has a 4-wire SPI interface for communication > + between the MAC and host processor. > + > +properties: > + compatible: > + enum: > + - adi,adin1110 > + - adi,adin2111 > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + reg: > + maxItems: 1 > + > + adi,spi-crc: > + description: | > + Enable CRC8 checks on SPI read/writes. > + type: boolean > + > + interrupts: > + maxItems: 1 > + > +patternProperties: > + "^phy@[0-1]$": [01] is shorter "phy" child node is deprecated, so phy@0 and phy@1, I think, as well. Look how other ethernet controllers are doing it. > + description: | > + ADIN1100 PHY that is present on the same chip as the MAC. > + type: object > + > + properties: > + reg: maxItems:1 > + items: > + maximum: 1 > + > + allOf: > + - if: > + properties: > + compatible: I am not sure this works correctly... You reference here parent properties but then change them to some other compatible? Did you actually test that this works as it should? > + contains: > + const: adi,adin1110 > + then: > + properties: > + compatible: > + const: ethernet-phy-id0283.bc91 > + else: > + properties: > + compatible: > + const: ethernet-phy-id0283.bca1 > + > + required: > + - compatible > + - reg > + > +required: > + - compatible > + - reg > + - interrupts > + - phy@0 > + > +unevaluatedProperties: false > + > +examples: > + - | > + spi0 { 1. spi, not spi0 2. Wrong indentation. Use 4 spaces for DTS example. > + #address-cells = <1>; > + #size-cells = <0>; > + status = "okay"; This is not needed. > + > + ethernet@0 { > + compatible = "adi,adin2111"; > + reg = <0>; > + spi-max-frequency = <24500000>; > + > + adi,spi-crc; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + interrupt-parent = <&gpio>; > + interrupts = <25 2>; "2" looks like interrupt flag, so use it. > + > + mac-address = [ ca 2f b7 10 23 63 ]; This should be rather some 00 11 22 type of MAC, or you expect to encode same MAC in several devices? > + > + phy@0 { > + #phy-cells = <0>; > + compatible = "ethernet-phy-id0283.bca1"; > + reg = <0>; > + }; > + > + phy@1 { > + #phy-cells = <0>; > + compatible = "ethernet-phy-id0283.bca1"; > + reg = <1>; > + }; > + }; > + }; Best regards, Krzysztof