From patchwork Sat May 11 06:14:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kanak Shilledar X-Patchwork-Id: 13662276 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 C2620C04FFE for ; Sat, 11 May 2024 06:15:53 +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: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:In-Reply-To:References: List-Owner; bh=9z+IQrX6ugKQkMkIjnNoZhRqK07YtX0MyZG0S2alcXo=; b=XZysugxFiD9YAk ejXmjz7aTandjLtFAKfAmSezpdCEpNMC4WrkK/91I8Y2kSxUoCPuIt0isBesMPbI8iIRyLtAyGj47 1SVrO3cbqOI2cnhwpA7uM8lKWmni8D1pRMaxIhYO0Nu4DNrgr/tIYT9zIppUeGsfkJqochCohiRt8 wQ1hrdMQYfVcLJNUO/2O6ChawJo8sinVIHut/FprEOuBHxzMHxpfT1DNDxgSne6VQhQk2iTcheekw 6PrQtWZH0yZDLK60fvWPnU6FAO0daKh3QK8TDI10kT93YBsWAx5du2F3uWyD/B6VPgCKIwgNTcIeT DKaYSdrRuh3sBasQf78g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5g1A-00000007NNA-3wmo; Sat, 11 May 2024 06:15:36 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5g17-00000007NM4-0KNp; Sat, 11 May 2024 06:15:34 +0000 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-517ab9a4a13so1989132a12.1; Fri, 10 May 2024 23:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715408127; x=1716012927; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Mk1p9NsMzvwBrXgYJqVUrzqhtMjz3H+uq2RwIwI5Iro=; b=PQv5csXHg6fslHg50EkNWDfLfCi5llNgWc7f5ScAiGOOxRz0Q9MmKpxeV6W51atZ/7 QBFpjzv11axf5OpnzVAlfYmdtoM56apuSLhwk8RC3Lgv/mtML5qHIumiCo1hWAJzLMRd cuk2MXYy1x9JkUqZ0K0vsjIWvvLY31gn8tazc+ERu0jg1XZgGx3KNVEhfkpTOd82hy2y 9L61XWphbY/vhpLNjcQEfNvZMC13tiGf2Af2zjDnY6JZoBXgnzkJ3VRcUpBTUG568maI zvtRbAIGxQ1JdkMP0OorpMO7CpEpafWQbm0LN6sIWF+b/w3gadexCY1govTdeEwCWq30 aPWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715408127; x=1716012927; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Mk1p9NsMzvwBrXgYJqVUrzqhtMjz3H+uq2RwIwI5Iro=; b=Cj8YligS9ccsf4x9ieY7cEEfDZeVcJkMGTWmYcGBZe52KnSQ1UUmjU0EhUvuTdOzVe /48yW406hY6d2fD/2SBPi46ocZuse98YMwzuwdFqTFuofSb7NvpWL3V9sqXn5n0dNFZa fhNuxxlnhxzci84iOfW0gO+dibPSUInT6Vn4IPrqjoED5rJW7lFOj/gxn/u9EpjInn7X unXMLIjhYeHF3ucSWZDbv6zGQWGzwxtXNAo3Z3emkgMPwmbP6PQU2SUXl56iZ7pH9RCN /AD+1xyDNKUZa1Lmy0OUhsa5Y07dtxxjba7DB7AezvOjc87hQYRDr4dHJ/Vw9++ptr+U 1awg== X-Forwarded-Encrypted: i=1; AJvYcCX7N0FqG6DkczbBN83gd7w/V9tSVHzYY6+vSsUNzEJGk/AoDlUSUJzxOMJ4dgNDLMrlrgiD260e3pCmxqLEv9+LSbKDB5kcuJXlG7//2L7kPfzYrZ2QuFpFdxlk4wS/E35uDblOPSw+nDpzc0Z7117QRuqm366vm8ZDiA== X-Gm-Message-State: AOJu0YwgOUk2cmCCKeL8byleGM1DAAJobLV+Okz2teqfLhjt6Z8PI62V P6AFHcOdAdvGrMdrYt80DRuSk8HkBjJxWGk5saF9Yd/RZ31Arg+J X-Google-Smtp-Source: AGHT+IE/5w+T17713VvVQvihpBps/gl8gaAUn7yc0SAhP030RjyD/9WHrSttR/cH4OahChBLKer4zA== X-Received: by 2002:a17:902:7082:b0:1e2:1805:52c5 with SMTP id d9443c01a7336-1ef43d28349mr49186255ad.16.1715408126567; Fri, 10 May 2024 23:15:26 -0700 (PDT) Received: from localhost.localdomain ([223.178.81.214]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-1ef0c15a8fcsm42249005ad.278.2024.05.10.23.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 23:15:26 -0700 (PDT) From: Kanak Shilledar To: Cc: wahrenst@gmx.net, Kanak Shilledar , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Kanak Shilledar , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] dt-bindings: spi: brcm,bcm2835-spi: convert to dtschema Date: Sat, 11 May 2024 11:44:56 +0530 Message-Id: <20240511061457.8363-1-kanakshilledar@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240510_231533_212328_3FC1D553 X-CRM114-Status: GOOD ( 15.74 ) 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 BCM2835 SPI0 controller to newer DT schema. Created DT schema based on the .txt file which had `comaptible`, `reg`, `interrupts`, `clocks` as required properties. Added GPL-2.0 OR BSD-2-Clause License Signed-off-by: Kanak Shilledar --- Changes in v2: - Updated the maintainers --- .../bindings/spi/brcm,bcm2835-spi.txt | 23 --------- .../bindings/spi/brcm,bcm2835-spi.yaml | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 23 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt create mode 100644 Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.yaml diff --git a/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt b/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt deleted file mode 100644 index 3d55dd64b1be..000000000000 --- a/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt +++ /dev/null @@ -1,23 +0,0 @@ -Broadcom BCM2835 SPI0 controller - -The BCM2835 contains two forms of SPI master controller, one known simply as -SPI0, and the other known as the "Universal SPI Master"; part of the -auxiliary block. This binding applies to the SPI0 controller. - -Required properties: -- compatible: Should be one of "brcm,bcm2835-spi" for BCM2835/2836/2837 or - "brcm,bcm2711-spi" for BCM2711 or "brcm,bcm7211-spi" for BCM7211. -- reg: Should contain register location and length. -- interrupts: Should contain interrupt. -- clocks: The clock feeding the SPI controller. - -Example: - -spi@20204000 { - compatible = "brcm,bcm2835-spi"; - reg = <0x7e204000 0x1000>; - interrupts = <2 22>; - clocks = <&clk_spi>; - #address-cells = <1>; - #size-cells = <0>; -}; diff --git a/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.yaml b/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.yaml new file mode 100644 index 000000000000..94da68792194 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/brcm,bcm2835-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom BCM2835 SPI0 controller + +maintainers: + - Florian Fainelli + - Kanak Shilledar + - Stefan Wahren + +allOf: + - $ref: spi-controller.yaml# + +properties: + compatible: + enum: + - brcm,bcm2835-spi + - brcm,bcm2711-spi + - brcm,bcm7211-spi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + spi@20204000 { + compatible = "brcm,bcm2835-spi"; + reg = <0x7e204000 0x1000>; + interrupts = <2 22>; + clocks = <&clk_spi>; + #address-cells = <1>; + #size-cells = <0>; + };