From patchwork Thu Jul 23 08:17:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kurt Kanzenbach X-Patchwork-Id: 1334599 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=SEypb57n; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=KC9+afCP; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4BC4vX07Cwz9sRk for ; Thu, 23 Jul 2020 18:17:44 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727939AbgGWIRn (ORCPT ); Thu, 23 Jul 2020 04:17:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727804AbgGWIRh (ORCPT ); Thu, 23 Jul 2020 04:17:37 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 489B5C0619DC; Thu, 23 Jul 2020 01:17:37 -0700 (PDT) From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1595492254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dnjGn/AU+fRt0hpW+UXz0JagirHdk28DLXmyBPvv19g=; b=SEypb57nnN9grdWOCwBey1cyuVRmJlRal2ROTB5aswjCEu1mPmntswo2YLn5NmuV/0k3Tl ndB8TEi/P79y8k+1LnAgVnQqW9LXnA+WdOZvs0nFr0CqwsuObs379PGOW3SjfsAtG1Pf4Y bCO3mONcOkFlETuiu83gQsi5v7Bh2L63ixczpiXiEhnPTF63uzPeJoFV52+0PAculJt5BZ Vd5CrmcxdaJiJ5Z6IslUESBpAb9Shc2spxemo5SikoS8eeIZdGIo1DxtwIhkmdQcKnL9xP NO17+7z7Ec+zsjpyy31pxugIUexT45rjihE/FBvZPZQTaPfsaVRj+/un389qew== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1595492254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dnjGn/AU+fRt0hpW+UXz0JagirHdk28DLXmyBPvv19g=; b=KC9+afCPXnPf+iSA8Pa91xafcnq3pwkZiqpEKhzJujnbmi5PJdIep+nAxj+tloi6nRzxqj 4/t+cWcd67ePIKBw== To: Andrew Lunn , Vivien Didelot , Florian Fainelli Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Sebastian Andrzej Siewior , Richard Cochran , Kamil Alkhouri , ilias.apalodimas@linaro.org, Vladimir Oltean , Kurt Kanzenbach Subject: [PATCH v2 8/8] dt-bindings: net: dsa: Add documentation for Hellcreek switches Date: Thu, 23 Jul 2020 10:17:14 +0200 Message-Id: <20200723081714.16005-9-kurt@linutronix.de> In-Reply-To: <20200723081714.16005-1-kurt@linutronix.de> References: <20200723081714.16005-1-kurt@linutronix.de> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add basic documentation and example. Signed-off-by: Kurt Kanzenbach --- .../bindings/net/dsa/hellcreek.yaml | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dsa/hellcreek.yaml diff --git a/Documentation/devicetree/bindings/net/dsa/hellcreek.yaml b/Documentation/devicetree/bindings/net/dsa/hellcreek.yaml new file mode 100644 index 000000000000..1b192ba7f4ca --- /dev/null +++ b/Documentation/devicetree/bindings/net/dsa/hellcreek.yaml @@ -0,0 +1,126 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/dsa/hellcreek.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Hirschmann Hellcreek TSN Switch Device Tree Bindings + +allOf: + - $ref: dsa.yaml# + +maintainers: + - Andrew Lunn + - Florian Fainelli + - Vivien Didelot + - Kurt Kanzenbach + +description: + The Hellcreek TSN Switch IP is a 802.1Q Ethernet compliant switch. It supports + the Precision Time Protocol, Hardware Timestamping as well the Time Aware + Shaper. + +properties: + compatible: + oneOf: + - const: hirschmann,hellcreek + + reg: + description: + The physical base address and size of TSN and PTP memory base + minItems: 2 + maxItems: 2 + + reg-names: + description: + Names of the physical base addresses + minItems: 2 + maxItems: 2 + items: + enum: ["reg", "ptp"] + + leds: + type: object + properties: + '#address-cells': + const: 1 + '#size-cells': + const: 0 + + patternProperties: + "^led@[0-9]+$": + type: object + description: Hellcreek leds + + properties: + reg: + items: + - enum: [0, 1] + description: Led number + + label: true + + default-state: true + + required: + - reg + + additionalProperties: false + +required: + - compatible + - reg + - reg-names + - ports + - leds + +examples: + - | + switch0: switch@ff240000 { + compatible = "hirschmann,hellcreek"; + status = "okay"; + reg = <0xff240000 0x1000>, + <0xff250000 0x1000>; + reg-names = "reg", "ptp"; + dsa,member = <0 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "cpu"; + ethernet = <&gmac0>; + }; + + port@2 { + reg = <2>; + label = "lan0"; + phy-handle = <&phy1>; + }; + + port@3 { + reg = <3>; + label = "lan1"; + phy-handle = <&phy2>; + }; + }; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + label = "sync_good"; + default-state = "on"; + }; + + led@1 { + reg = <1>; + label = "is_gm"; + default-state = "off"; + }; + }; + };