From patchwork Tue Dec 14 03:58:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12696024 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 C9D24C433F5 for ; Tue, 14 Dec 2021 04:02:18 +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=zujdBEJK4lGY95qY+18bHjmXsjC0qWsv/jrrK8fHyiY=; b=z8tbZKgxpWPZZU a8h1BETVMuWK1h2IqMDC+OX3132axnD+Hjn2tOzWHIv/paoMKk1DpPYzUTqeD2STdcoRn2N+IBWwl jnO8FfX0yp8yZwrxgJ1PQZbM3qkxZJiPqmdQfarFzYlWoSvJ/KUG1Fce8ZVsj07NcAGHGNJmZGTg3 BPPC99l6yVRF3ylGmdS5frNaRA/PH4lnVHTgP3Tmdruf1Y7nLJqF/ufvRMYKajHBcJY7AASK/bimf cuu5Jl7nfgCuWltAsOY0/fK84RtmAJ+CRCOZWKpLXHcGsU6DiQhHcVxElyvzYmpBEKtyh3jSuNXqV CKzzeBDa0Sy7Kqp08d4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwyyM-00CTGp-Fd; Tue, 14 Dec 2021 03:59:26 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwyxU-00CT3f-9s for linux-arm-kernel@lists.infradead.org; Tue, 14 Dec 2021 03:58:33 +0000 Received: by mail-pj1-x1034.google.com with SMTP id p18-20020a17090ad31200b001a78bb52876so16171167pju.3 for ; Mon, 13 Dec 2021 19:58:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ew71xhC4xQ/czNjt0atU4xfLjLk+tfPXgytWCNx3psE=; b=EFWvyi8S0sJKUUwbkNAT0LO3Lpgl+AMd6mLuznt1LIEVI01tqP+jUae05VYpHnLBUq x2HjU8vDUYMKVmTQg3oFj6vag2ftk3HJQkUQYI5C7PWiJR2jGOz53kE9Mi4xYNRMR8wF rtiKVFg+HlZuk4e39IsKMChzGdQZwQ0iqVPhyiQ3kxsTP7jBgHeVpygNkbwSUjGpvG1s Dsju1PU8WbX/s7yAW6FbDmX6Hg6mdV54QrvwAl2s28qBI8T4OIRe1fbk1gc/lRCvVXXB Vx6CoT/KQxXblzTvo15Igq2YlXArI77tIOOeCBadxqJVmkEMScvQFoVWYE/Yc/Ptlipc A9Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ew71xhC4xQ/czNjt0atU4xfLjLk+tfPXgytWCNx3psE=; b=tkpvmRxKw5Znujq1mR0rwYVwq/qL0BmX1KMAcvLTrjt7y+ylONJAENAxNo1G4/6PTi cuVLqb2CRnZnwOum8cvY5HLTh1BLokoRLISWO27634Qzdl7dqy3gEN3wruU1oczPWw4z j+QT6f/n7AjvMSYtuKSz14LUNnPU5y9oIfKBpQZKezGpmPBqcXRib9Wxwaz3qqMX2is5 2zN5ks4wC2ZaPUpk3j0C3T4uUsPSSI+DHCzG+xaS24qaFDPwuGxK8vF43EHLwhQIiJch awosVGodcLpXWfmc+ynxRgJR8ioiuYIzrdxQ2/ek0WTtnJxFUNVolwPTgdUjkFjsIsGr 5xXQ== X-Gm-Message-State: AOAM532t1+KU1e9a11l5vqYeg2xpbkaUF+UIghtwPHEQLbXpgTtvfkTM 8HR0CXkEM3fiWyXzJn98xQyWvyJ8U3w= X-Google-Smtp-Source: ABdhPJwnfyilRO1XT08sTEPqvPT8W2vHgjvp+LhMypOKQ2ulno0jSvOJhSFaLuPhWDrF+CHK/9FTIg== X-Received: by 2002:a17:903:2305:b0:142:1bca:72eb with SMTP id d5-20020a170903230500b001421bca72ebmr2666496plh.67.1639454311823; Mon, 13 Dec 2021 19:58:31 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o17sm11430356pgb.42.2021.12.13.19.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 19:58:31 -0800 (PST) From: Florian Fainelli To: devicetree@vger.kernel.org Cc: Florian Fainelli , Bjorn Helgaas , Rob Herring , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM IPROC ARM ARCHITECTURE), linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM IPROC ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v6 5/6] dt-bindings: phy: Convert Cygnus PCIe PHY to YAML Date: Mon, 13 Dec 2021 19:58:19 -0800 Message-Id: <20211214035820.2984289-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211214035820.2984289-1-f.fainelli@gmail.com> References: <20211214035820.2984289-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_195832_355373_ADB55434 X-CRM114-Status: GOOD ( 17.00 ) 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 Convert the Broadcom Cygnus PCIe PHY Device Tree binding t YAML to help with validation. Signed-off-by: Florian Fainelli --- .../bindings/phy/brcm,cygnus-pcie-phy.txt | 47 ------------ .../bindings/phy/brcm,cygnus-pcie-phy.yaml | 76 +++++++++++++++++++ 2 files changed, 76 insertions(+), 47 deletions(-) delete mode 100644 Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt create mode 100644 Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt b/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt deleted file mode 100644 index 10efff28b52b..000000000000 --- a/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt +++ /dev/null @@ -1,47 +0,0 @@ -Broadcom Cygnus PCIe PHY - -Required properties: -- compatible: must be "brcm,cygnus-pcie-phy" -- reg: base address and length of the PCIe PHY block -- #address-cells: must be 1 -- #size-cells: must be 0 - -Each PCIe PHY should be represented by a child node - -Required properties For the child node: -- reg: the PHY ID -0 - PCIe RC 0 -1 - PCIe RC 1 -- #phy-cells: must be 0 - -Example: - pcie_phy: phy@301d0a0 { - compatible = "brcm,cygnus-pcie-phy"; - reg = <0x0301d0a0 0x14>; - - pcie0_phy: phy@0 { - reg = <0>; - #phy-cells = <0>; - }; - - pcie1_phy: phy@1 { - reg = <1>; - #phy-cells = <0>; - }; - }; - - /* users of the PCIe phy */ - - pcie0: pcie@18012000 { - ... - ... - phys = <&pcie0_phy>; - phy-names = "pcie-phy"; - }; - - pcie1: pcie@18013000 { - ... - ... - phys = ; - phy-names = "pcie-phy"; - }; diff --git a/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.yaml new file mode 100644 index 000000000000..045699c65779 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/brcm,cygnus-pcie-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom Cygnus PCIe PHY + +maintainers: + - Ray Jui + - Scott Branden + +properties: + $nodename: + pattern: "^pcie[-|_]phy(@.*)?$" + + compatible: + items: + - const: brcm,cygnus-pcie-phy + + reg: + maxItems: 1 + description: > + Base address and length of the PCIe PHY block + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^pcie-phy@[0-9]+$": + type: object + description: > + PCIe PHY child nodes + + properties: + reg: + maxItems: 1 + description: > + The PCIe PHY port number + + "#phy-cells": + const: 0 + + required: + - reg + - "#phy-cells" + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + pcie_phy: pcie_phy@301d0a0 { + compatible = "brcm,cygnus-pcie-phy"; + reg = <0x0301d0a0 0x14>; + #address-cells = <1>; + #size-cells = <0>; + + pcie0_phy: pcie-phy@0 { + reg = <0>; + #phy-cells = <0>; + }; + + pcie1_phy: pcie-phy@1 { + reg = <1>; + #phy-cells = <0>; + }; + };