From patchwork Thu Nov 17 21:55:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 21949 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp641025wrr; Thu, 17 Nov 2022 13:57:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf4+G0vS8RmaZ551e3ya1MwamqHM3O/Sw2sAI09kwAD0ToISqkzfFJbHpeNO6ODc22VcTgNl X-Received: by 2002:a62:1447:0:b0:56b:d027:214 with SMTP id 68-20020a621447000000b0056bd0270214mr4811632pfu.79.1668722219971; Thu, 17 Nov 2022 13:56:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668722219; cv=none; d=google.com; s=arc-20160816; b=nC9EDsswUwrbVRaS21YavUv5qOpVCITeuv+o4lF2q3yEBBjZyiD7whF10WyA4Libim RPQyz21/VB7Aec+AaSi81+iRUPp60L2egp7QWBegjhyKLoCzm+PW3qclU+NbUEMgBxiW FEe2hO/bCbjNs6FA41R7j0An2s8Y7hzEFxQ/EXXCW3a20A1/x4ufyfCVolYoDThilb3t zRcScJNqBYF7wryYnT4G8NRvah8dUqwc/QjKC9uvAH3OM6nbstoN8GWtaOMlW8EMkr0d w+CMVioKFwvvtSUBYWI+Rl0UqBeW3hgLC+d181kXxjSfFHVs82aAiRed69xhL01k8FC5 8q1w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BfPYpwFw+JIzja3Q3OeYl2Qetdc/wSXMPCm2N01jyAk=; b=GTJxylHFzbFy+D+MYfgEoLJ3pUFhivPYbrf+MMECTohw0+XJcNCVFQg6pcPEjO2gTx lNe1CDZP4OnyRjWY3J3S1Ktae3iRBr7kD1GKQxo7murqajJDEqtOM0tQSZX9oOyJ/daF 4gP2jB7J1x/9XbGD2+Y1OUJTsCbYGCRZ4roaYnBjBUyKorU+7hopAmcj1WDl8n7X1767 58vab2bCADdxU6YBJ3PWPXhVmzxq4ci55obD3j7b7V9hGginfZeJr/YCyFF4Eaf1xHZ0 DB9aAUpaXqxmuvHUMkp+6lz3JN17NtiwfAMXIUyMmguJFMexZzjMr+lWb6RmntX1zQ6z t3QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TifaughF; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a056a0022cc00b00557bb4f6977si2034134pfj.106.2022.11.17.13.56.24; Thu, 17 Nov 2022 13:56:59 -0800 (PST) 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=@bootlin.com header.s=gm1 header.b=TifaughF; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240955AbiKQV4J (ORCPT + 99 others); Thu, 17 Nov 2022 16:56:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240924AbiKQV4H (ORCPT ); Thu, 17 Nov 2022 16:56:07 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C322A701B1; Thu, 17 Nov 2022 13:56:05 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id D65FA1C0004; Thu, 17 Nov 2022 21:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1668722164; 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=BfPYpwFw+JIzja3Q3OeYl2Qetdc/wSXMPCm2N01jyAk=; b=TifaughFUXInS7qkNbiXMv18rofUv4SYpxL7Pj8hC2vlwvyLmqCN/uZiPILci0evs8FmZ3 wrf4PVVRfI6mVHhaaUgk6O3W4ulqebmqohn9xCr2KJjA1GrPqemj57I+iljPhw3fUE4Dg2 bJetUUKSPMWfPyVAHQWbYRVz2qF24jkb3aBrq3xhOy40rzdRiOhcuUIZu8uZPsbDGNBaRJ ff4R5czcHFiTDnuJSB2iLKVJyIs/oEHXd/0ZEkIhYtnlQwdMT9tbH0FGcqCqy8Mox+VyXj 0EtW/sOHUQAuEeqrM4CNdPSJ82m2eX4b0mSOsBeV30nONmQD8+3Kj50OacSUEg== From: Miquel Raynal To: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , netdev@vger.kernel.org Cc: Marcin Wojtas , Russell King , Taras Chornyi , , Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , Miquel Raynal Subject: [PATCH 2/6] dt-bindings: net: marvell,dfx-server: Convert to yaml Date: Thu, 17 Nov 2022 22:55:53 +0100 Message-Id: <20221117215557.1277033-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221117215557.1277033-1-miquel.raynal@bootlin.com> References: <20221117215557.1277033-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749782070231243493?= X-GMAIL-MSGID: =?utf-8?q?1749782070231243493?= 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 --- I am fine dropping this file entirely as well, if judged useless. --- .../bindings/net/marvell,dfx-server.yaml | 60 +++++++++++++++++++ .../bindings/net/marvell,prestera.txt | 18 ------ 2 files changed, 60 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..72151a78396f --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell,dfx-server.yaml @@ -0,0 +1,60 @@ +# 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: true + + ranges: true + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + +required: + - compatible + - reg + - ranges + +# The DFX server may expose clocks described as subnodes +additionalProperties: true + +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 = ; -};