From patchwork Fri Apr 23 08:22:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 426272 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1092420jao; Fri, 23 Apr 2021 01:22:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbEjCUba7gaAahcVfqouoaht6wnxp/qn0YdWmYZNGEQ40coIvetoA1b0A3CVUJNWQS3dNz X-Received: by 2002:a17:90a:488a:: with SMTP id b10mr3136043pjh.2.1619166138683; Fri, 23 Apr 2021 01:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619166138; cv=none; d=google.com; s=arc-20160816; b=vHZulgHhSG6p7z6WQMJw2IM7rNIvBOGdLBw1wRAN+AjQ98ZkZvfG6iB/XlpAovvVCq Hvf0w9tAx/tmaNbHsnLv73HVjNjoZV4fYI18ayE93MBdIBg+WOq2/2Lh23MLFFyhF4ou rRYSFQoVm1dLSQ3UW1/fgU+iM01C4sC9IGayHmmyofK/S1iOdd/ABEXUckpxR5dVWN/3 s1LPsEPEKRl1ZUZ0eGNIQq7eYL8JAd3uAL54SfxNJ5JJFcto8nqcHqAelAyGxKEvZmYj yC8upL7nHg3EaTL48HH+FrDNNhOzW23niny+SFhrb5u8mW6hRnjtAcX98AUwLTD4rADa C5rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qWBkgkLzB2qRvLb6AJXGYdWv19iR0S4JnZjEAIUSrBk=; b=SxChQ3UcR3IX2EJAOW+i7VacK1KyJH9AUWtQZpUiSv1tf8/pmRKqb+xk7sXKtknVAS KoFJEPGuuiuQFllehjzj5Vpg0FoWNPygOldl8PanxD4VgL76h+v4Od/8EZ9SiS+SfKBy 87U3DvSR+9SYCENxzFfmxjUuFNlF/8RT1GoweJ+F2LvMg8dbU2xg3ieR1Ww9Qjo4Siet yfh3iwaTBE1DLsHAFUeOQjFXd3Vwm5q6UaGnc3/a2UC4nCYANSfrRx+ywF+ACrqBxkto f0pER+K1DSDJ8yg4Iwd2+x0SB8+3I9LYTE2K5fubtH1qfhp/Qomz4R13yHf3A11VZTT5 jWhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LWPq+d2s; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si6066488pgr.135.2021.04.23.01.22.18; Fri, 23 Apr 2021 01:22:18 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LWPq+d2s; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S241361AbhDWIWx (ORCPT + 6 others); Fri, 23 Apr 2021 04:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241196AbhDWIWw (ORCPT ); Fri, 23 Apr 2021 04:22:52 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CD5EC061574 for ; Fri, 23 Apr 2021 01:22:13 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id r128so49285475lff.4 for ; Fri, 23 Apr 2021 01:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qWBkgkLzB2qRvLb6AJXGYdWv19iR0S4JnZjEAIUSrBk=; b=LWPq+d2szR6MC/Ahhk1UXiNveVPJTDobHg9JtntjxCeTvsr100pE2nNxi26KPQxFFp FmDKXmznsNFa9/CkBXuwQqwG7QFuvLClN3noH5kKwXGvyjaKTCKU+0yRfPCdIEPtZmHx qLIC3UeqYHzwsowST1oPsBp0aB9U+unmtxLRRVl8co2wXTvba5Gj2mhBa49CRgi/vf3e BruU+fadCo56PRfo8ZdZoBtzRuAe+wDvQLM8NMiNFfMlyV1XRSOCNcMmZJSS4P7wln57 9wybHstYmpoM3Dw3AAKSOAMSacqaEBy/w3plpkqv8rXaqlOAfAYhEz/Qtcthszkk6wo/ KVZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qWBkgkLzB2qRvLb6AJXGYdWv19iR0S4JnZjEAIUSrBk=; b=IuadWwZL5H4dXUU5dO6Mn2DgEsimnY12cVk3eauSjn7BDfFfpMqtuXvPhiTTkqi1/a cTUTqCQDX+3n1/mO4/XZmv3oT216In4NyLB23S8L3KWHiZKbeCxtoGOL8BTtHup2v+xy ebULXGeSCimV8hvGfFDQWffYfHCj26LijOHb92MpraUGCdg9W6BD/CCnRc4H81wWYpoX VSx5t72PntCfPwqRm8321zLP1gO3L5ZCNDRDoXpSqAqTsc79fo5V+ZqOV42iQshr1fva CvQhrYI/vV+esB4Fy3cKU4rdNkEd2Uwy9iPQLDbd1WPbVCZLQAKSzUm2py7Ac3nBXwd1 3n9w== X-Gm-Message-State: AOAM5304GScLdj0RDLtBKJZ/zd91HQggSH/Ptt6x6z9c7YaPb5Ge1ZIT AxKj4rr50kuRkWfa3MDrOo2Gkg== X-Received: by 2002:a19:f018:: with SMTP id p24mr1822876lfc.421.1619166132016; Fri, 23 Apr 2021 01:22:12 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id x74sm484475lff.145.2021.04.23.01.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Apr 2021 01:22:11 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" Cc: Andrew Lunn , Heiner Kallweit , Russell King , Linus Walleij , Zoltan HERPAI , Raylynn Knight , devicetree@vger.kernel.org Subject: [PATCH 1/3 net-next v3] net: ethernet: ixp4xx: Add DT bindings Date: Fri, 23 Apr 2021 10:22:06 +0200 Message-Id: <20210423082208.2244803-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds device tree bindings for the IXP4xx ethernet controller with optional MDIO bridge. Cc: Zoltan HERPAI Cc: Raylynn Knight Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Designate phy nodes with ethernet-phy@ - Include phy-mode in the schema ChangeLog v1->v2: - Add schema for the (optional) embedded MDIO bus inside the ethernet controller in an "mdio" node instead of just letting the code randomly populate and present it to the operating system. - Reference the standard schemas for ethernet controller and MDIO buses. - Add intel,npe to indentify the NPE unit used with each ethernet adapter. --- .../bindings/net/intel,ixp4xx-ethernet.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml -- 2.29.2 diff --git a/Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml b/Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml new file mode 100644 index 000000000000..978e7f236f3a --- /dev/null +++ b/Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2018 Linaro Ltd. +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/net/intel,ixp4xx-ethernet.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Intel IXP4xx ethernet + +allOf: + - $ref: "ethernet-controller.yaml#" + +maintainers: + - Linus Walleij + +description: | + The Intel IXP4xx ethernet makes use of the IXP4xx NPE (Network + Processing Engine) and the IXP4xx Queue Mangager to process + the ethernet frames. It can optionally contain an MDIO bus to + talk to PHYs. + +properties: + compatible: + const: intel,ixp4xx-ethernet + + reg: + maxItems: 1 + description: Ethernet MMIO address range + + queue-rx: + $ref: '/schemas/types.yaml#/definitions/phandle-array' + maxItems: 1 + description: phandle to the RX queue on the NPE + + queue-txready: + $ref: '/schemas/types.yaml#/definitions/phandle-array' + maxItems: 1 + description: phandle to the TX READY queue on the NPE + + phy-mode: true + + phy-handle: true + + intel,npe: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + description: which NPE (Network Processing Engine) this ethernet + instance is using + + mdio: + type: object + $ref: "mdio.yaml#" + description: optional node for embedded MDIO controller + +required: + - compatible + - reg + - queue-rx + - queue-txready + +additionalProperties: false + +examples: + - | + ethernet@c8009000 { + compatible = "intel,ixp4xx-ethernet"; + reg = <0xc8009000 0x1000>; + status = "disabled"; + queue-rx = <&qmgr 3>; + queue-txready = <&qmgr 20>; + intel,npe = <1>; + phy-mode = "rgmii"; + phy-handle = <&phy1>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + phy1: ethernet-phy@1 { + reg = <1>; + }; + }; + };