From patchwork Thu Nov 24 11:15:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 13054845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B05CBC43219 for ; Thu, 24 Nov 2022 11:17:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=13TbWH367Y7/Exju4sUJVhxQXgduWfHdhXJnozlZYIc=; b=yhd4euSDhgjV3I d+lnZH7c2T6PHj9fahp6B1sT3e781Ox39I1H/J+pPksD5HalG5BZwEV5bG9LkSdgRWbxwr5ziQpU3 S+fuc1kVqa8PwHf/eQAAxIi7cjXSPMP8jLW11myGA1kZkJ6Qkk1k3+tkij9FFuv57rJGoUg8aiLCH 4ft8BmjwzzRu89KuEODJMd8P2ejbQJ3qEdQZvJ3b70lDgo5CrA5SeZ5Vl5kAxNBPnGad7Vi7JHGHg pVEVDrj5sPT+RadpJoLrDNddXvZeMsJ+90dRwjGymcp9XVCcZOY55Jvzj9WnHeHXLPCeUDtEoIUkM BwpYv8v/wQLerX3TxvUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyADj-007yeA-6a; Thu, 24 Nov 2022 11:16:43 +0000 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyADB-007yQj-LI for linux-arm-kernel@lists.infradead.org; Thu, 24 Nov 2022 11:16:11 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 846881C0015; Thu, 24 Nov 2022 11:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1669288568; 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=wAx8VtTdz4qwIpgQj6QKnIjD5MlND5gXjXhbAzs+LZw=; b=lRbAy1VF1dKDs7kpuf9TWgf81sL6Qv/MZQY4zGhvLdtm0UyHfC8hdVSrKp+rRF2NIgbHJB jyngQajMS8US3CAO8hW/8m3OhXZKPmKIbnGWB/7kBmeZYJ1/YmkTg1/Hi7ctdu26z/aMhE rnnvlt3nqcrV0xQse4qWGRra4CLes0m9vLvcXKkmSjZimxTCOaIDHS1pmpKN7TeXk/JDIk h2TakiF23+yU9Xpi6k/+IwxlOeB/isqLDtxD+17M4hgQQ87pjfD7duNzOjDpmI25M/NDtT WTrHN0dSrBhJH4XzOzN1TNAmPVAvPl+mLQZmgguqbEbVRnFsiM6rojT4A1idpQ== From: Miquel Raynal To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , netdev@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , Marcin Wojtas , , , Vadym Kochan , Miquel Raynal Subject: [PATCH net-next v2 2/7] dt-bindings: net: marvell,dfx-server: Convert to yaml Date: Thu, 24 Nov 2022 12:15:51 +0100 Message-Id: <20221124111556.264647-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221124111556.264647-1-miquel.raynal@bootlin.com> References: <20221124111556.264647-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221124_031610_020879_6BCC52B2 X-CRM114-Status: GOOD ( 15.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Even though this description is not used anywhere upstream (no matching driver), while on this file I decided I would try a conversion to yaml in order to clarify the prestera family description. I cannot keep the nodename dfx-server@xxxx so I switched to dfx-bus@xxxx which matches simple-bus.yaml. Otherwise I took the example context from the only user of this compatible: armada-xp-98dx3236.dtsi, which is a rather old and not perfect DT. Signed-off-by: Miquel Raynal Reviewed-by: Krzysztof Kozlowski --- .../bindings/net/marvell,dfx-server.yaml | 62 +++++++++++++++++++ .../bindings/net/marvell,prestera.txt | 18 ------ 2 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/marvell,dfx-server.yaml diff --git a/Documentation/devicetree/bindings/net/marvell,dfx-server.yaml b/Documentation/devicetree/bindings/net/marvell,dfx-server.yaml new file mode 100644 index 000000000000..8a14c919e3f7 --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell,dfx-server.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/marvell,dfx-server.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Prestera DFX server + +maintainers: + - Miquel Raynal + +select: + properties: + compatible: + contains: + const: marvell,dfx-server + required: + - compatible + +properties: + compatible: + items: + - const: marvell,dfx-server + - const: simple-bus + + reg: + maxItems: 1 + + ranges: true + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + +required: + - compatible + - reg + - ranges + +# The DFX server may expose clocks described as subnodes +additionalProperties: + type: object + +examples: + - | + + #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16)) + bus@0 { + reg = <0 0>; + #address-cells = <2>; + #size-cells = <1>; + + dfx-bus@ac000000 { + compatible = "marvell,dfx-server", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>; + reg = ; + }; + }; diff --git a/Documentation/devicetree/bindings/net/marvell,prestera.txt b/Documentation/devicetree/bindings/net/marvell,prestera.txt index 83370ebf5b89..8868d774da67 100644 --- a/Documentation/devicetree/bindings/net/marvell,prestera.txt +++ b/Documentation/devicetree/bindings/net/marvell,prestera.txt @@ -27,21 +27,3 @@ switch { dfx = <&dfx>; }; }; - -DFX Server bindings -------------------- - -Required properties: -- compatible: must be "marvell,dfx-server", "simple-bus" -- ranges: describes the address mapping of a memory-mapped bus. -- reg: address and length of the register set for the device. - -Example: - -dfx-server { - compatible = "marvell,dfx-server", "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>; - reg = ; -};