From patchwork Sun Apr 25 00:30:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 427264 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2511716jao; Sat, 24 Apr 2021 17:30:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuXN0mkaktf7nMY2nHYTx0mdM3yFuDAzcjsOpYtoo8XstUdWgkrjZH9iaSLF+klRpGX4Tj X-Received: by 2002:aa7:c3ca:: with SMTP id l10mr12744556edr.55.1619310659616; Sat, 24 Apr 2021 17:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619310659; cv=none; d=google.com; s=arc-20160816; b=kysLOpasXyzlt8s5Yp9lVJW8vlPVJcYcDd4flvB9hr2Sd/jZciZ9TbK9514saJuD+g wP9JSOOX+R2npM/d9YDHQq7uPgQe5Y2FQfSiRmleGpGaZP2IVimgI41FNf7wTtzNmh4D 0iVkp6ashU7nj4MYq31Ftz1D0Xgvs4Xqsfm1xKKF5nAKVlecM4Evq7nPE4xc6JHBvINq DMkEkZ4hRv5nOlfW0F2FXN9jrCoY3V8beqtOJUZ6nHu0fn/JIv2TJ+RS3Qs10VaZpHUc lYmx4Ei7qNudkhi7n89wRFoyfuYOAN7cmuBhcKS8lwF5Qo1tbH/qqlZvE5RqCO2bAIOG 4dxA== 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=GWMZ3joFDXAfixsaT3M1mL9BXCqmaTfhrxyajNcq/7M=; b=DFe2xJxwJAsHxrkCSA/YgtuYmq3h4M8LMjSi7jOWluQBjCAwYUV7Qg6xL0j9p4SSl4 9uLsTHC8jCb9N1RGU5smKY5F18ZnLqR4LOMt9CS7vQvGW6BqySqjWKkGKhx9BblWnqvf 792EwsjX8USMKxdKx6apLYijqa52r4DIOxNFGYj6Due6QaxqU5YQMMNWXr/qnoWtvdAE /S2wmsp8GNjPhieKmWQky82gNfJnTdqYM/oZ6BJq/kMO2t9cO7WZdLcLrwUygtfhGcoo IefE8RsRLwoX/HL8MkWwzwvxceUOJ6rkWE1nZviaRo2kVh7Cf5z5LqIlAnLOkhdzlI4N UAIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nse9hLCS; 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 y16si9277216edv.521.2021.04.24.17.30.59; Sat, 24 Apr 2021 17:30:59 -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=Nse9hLCS; 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 S229770AbhDYAbc (ORCPT + 6 others); Sat, 24 Apr 2021 20:31:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229723AbhDYAbc (ORCPT ); Sat, 24 Apr 2021 20:31:32 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06C6EC06174A for ; Sat, 24 Apr 2021 17:30:52 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id x20so52578338lfu.6 for ; Sat, 24 Apr 2021 17:30:52 -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=GWMZ3joFDXAfixsaT3M1mL9BXCqmaTfhrxyajNcq/7M=; b=Nse9hLCSJYQ8gYGGbutxJq0dJTWct2loAtnwFpLBlNUPSClQLOb4Rebe77I5YgTh3O xwKgfyf+hg6kJNaQbvPDkggyFtqhzt0Ej9r6Jym1oos+JJB0G23f8p+K7lEh9Vcnjq3s rWpN8digbAv+eVpqIqqdwN7Nqz9YTQRwUcdLLQstPjTZYmPs00Y9QfuWnFpULQFhwpMm nq/4LxDvHT8kfFNVJhcXCdRoJyW8C/WJ0R+UAJ6f2I0dNTLyv6Y9U6fbSNtoQzc3OzzD LewKAxtCZivQuIAJDB4blLvTHtlV3nnj/HKnLpw5z9DFkpzPp5Z2m+DxavI211WxP9+y ru2g== 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=GWMZ3joFDXAfixsaT3M1mL9BXCqmaTfhrxyajNcq/7M=; b=Wr102UQYp2qb1CV+O3Nv/vP52RbKt5uEN64bnmGA2lJ95wS4t1zLjpMq7FOavWu7eL 82YIzNgnsC/4F5fv4g74YCuWP/2/wLaEVTP/ioaiU9Yk6gFpmpHcng7n58PugzszIRqv k9fQGztH1ns/X7bhZFFgzo77p2VrMHHotUdxGB4J4uAvl47bopulMLwEKfoCO7Exiz9b 8a3hNCviV4wK2eumCU/UdsERRcT1wz9GefYfrvAZqUQIHYOyGRpDiUM7p458nZOwpZei sdKnJFrwdlln/0tqFBZLMspXywrZbp0sE7MEJUQ2w6waP9rePbqfl45ZF8jcMaMevD3D beDw== X-Gm-Message-State: AOAM532vWZ8jEtfHqNE6TlJ9vuOBFn3Yi6O9KwXpJa8rzODXsGRr8jEx 37fi7W50pB/nKFsCbKvqjHar7w== X-Received: by 2002:a05:6512:3e1:: with SMTP id n1mr7434540lfq.31.1619310650872; Sat, 24 Apr 2021 17:30:50 -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 t5sm950352lfe.211.2021.04.24.17.30.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Apr 2021 17:30:50 -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 v4] net: ethernet: ixp4xx: Add DT bindings Date: Sun, 25 Apr 2021 02:30:36 +0200 Message-Id: <20210425003038.2937498-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 v3->v4: - Use a phandle to reference the NPE - Make a more verbose example with two ethernet devices sharing a MDIO bus on just one of them - Spelling fix 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 | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml -- 2.29.2 Reviewed-by: Andrew Lunn 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..f2e91d1bf7d7 --- /dev/null +++ b/Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml @@ -0,0 +1,102 @@ +# 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 Manager 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-handle: + $ref: '/schemas/types.yaml#/definitions/phandle-array' + maxItems: 1 + description: phandle to the NPE this ethernet instance is using + and the instance to use in the second cell + + mdio: + type: object + $ref: "mdio.yaml#" + description: optional node for embedded MDIO controller + +required: + - compatible + - reg + - queue-rx + - queue-txready + - intel,npe-handle + +additionalProperties: false + +examples: + - | + npe: npe@c8006000 { + compatible = "intel,ixp4xx-network-processing-engine"; + reg = <0xc8006000 0x1000>, <0xc8007000 0x1000>, <0xc8008000 0x1000>; + }; + + ethernet@c8009000 { + compatible = "intel,ixp4xx-ethernet"; + reg = <0xc8009000 0x1000>; + status = "disabled"; + queue-rx = <&qmgr 4>; + queue-txready = <&qmgr 21>; + intel,npe-handle = <&npe 1>; + phy-mode = "rgmii"; + phy-handle = <&phy1>; + }; + + ethernet@c800c000 { + compatible = "intel,ixp4xx-ethernet"; + reg = <0xc800c000 0x1000>; + status = "disabled"; + queue-rx = <&qmgr 3>; + queue-txready = <&qmgr 20>; + intel,npe-handle = <&npe 2>; + phy-mode = "rgmii"; + phy-handle = <&phy2>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + phy1: ethernet-phy@1 { + reg = <1>; + }; + phy2: ethernet-phy@2 { + reg = <2>; + }; + }; + };