From patchwork Fri May 31 12:29:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kanak Shilledar X-Patchwork-Id: 13681647 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 3AB1DC25B7E for ; Fri, 31 May 2024 12:30:33 +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=xYDEM13vAYS+C/E8l/1M4F3UOSgBCWbKCp1cKCsRppA=; b=0cEglK50r9SnV1 OP4BJRu1AKFFig5d9B85wBqlXErrAHac0RNKcqYehvrwBSF5lITArtVuDJscaoUogjglTfaTBTzR5 uzC242gcBmS46dZsPeUUJvJ0OCOWfnmEwcugYqjzWldWG6mdQrfjEC+h1hIblEQ5ikPmxrmo/ZEBh eeNcKITC96urMg42QX22cStws4m+IPQV6R5Tji1cCuFkZg79uxj6vl2RAOP6xlOtu70G8M/G31v7A G788hsVpLuzCeA6pqlxVy3dlvlH/XRk9JamKEIaz39H7trul69g8v6VfcYGvZtyfm6LF5+ZieOL6w iNzaeq3pzceo2m0WNU+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD1Oj-0000000ACBW-3o0v; Fri, 31 May 2024 12:30:17 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD1Of-0000000ACB2-3Ojw; Fri, 31 May 2024 12:30:15 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-7024426c75dso695621b3a.1; Fri, 31 May 2024 05:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717158611; x=1717763411; 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=forXuWPFy2XsVfocDJuDgmCjaOGTlPxEs7gWnYosGQU=; b=c/Zibb8mT69nXSJVPaPEBEfbyaj1rsO4HferQ9Ef/U++ezaLE88f+hZaL8ILF69mK5 drWCj3mHIQ4oxcxoMxAI0QM/lzlaAfaOnxjr/bredpwHzmmVz16Yy3O85Sm1TCT/PIco OeqTT+Kw+yXVrgwMyMFqHPxMuY6f0C48EwBPNpcSz7F5vCSV3a8fYHDplUo3XPaww/0j 38AXYU9SScmhRTB9I32KWCtcN1b1cLVetqQ4GbS6lnwmBuIGlWnl08CTgZavNRgVOJMh pe5VgX1CXmYINnNYfK2yjB1bHb9bCqySVwOPyWyG9aFmhBeI6nYtoL8txXC0XcvrIO+W zNbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717158611; x=1717763411; 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=forXuWPFy2XsVfocDJuDgmCjaOGTlPxEs7gWnYosGQU=; b=ZGZIcRiKmG127B/8UCYa6GXnIKp372RUuOAULZsLXpScXMfV6tuMFcR4HXozjJzPTm uRddsDaMwRhqlZwHaLMiipoDFGKENtGuI/M+aJpVJFcD/h9yP4pNnEmAWq3eWGweXB25 nRpC0aciCzWUyu3GXACHIf9ldDoHr9BXXw8nrfcZzatwGSqIHnjAKOjWnNUAEZfxZ8H7 FFsCAR6sjKoIss3Sy5gSEpIiyLddk4P+ihramehL9WCt9W/2g4Y+1v/fF840pKGo0cV4 sROk+xv4A+5fx8Pe46GOGem0cBQSz/TtDZsEz7b72O+M8si5hbvQvn+8yu/03tm0eT3c sUaw== X-Forwarded-Encrypted: i=1; AJvYcCX2Ni/KJJgAB3o8A6CaLpl9/do4HYDbQht7ulT8LdmzPizjkblFxAMlgM5hOuKWDehNmRXcFKag/p2TEVoJM0KdeBdkEIqabMVmq7JH91IXdexG4+XzywFesgzP/qbPsP9YOZzIavCVl5SQ53D/XSqxblrnQrMusiWlaQ== X-Gm-Message-State: AOJu0YzRJm5Vdu6P+yv0Q4zFkBqrOLwPh3XKpkeNvqx+K/+i65zOsSge MJ1wmKaUpWBRepUj05ApmVQmZbt4tHUqvSbi6t4t1jtdUUhBPeQN X-Google-Smtp-Source: AGHT+IHrSpIGiBHstlMPdxkIWgAD6jVOeR2hwOCG67G+LZyMrCJvZ6auiVBIez1jv5QaTvEr+Bv3AQ== X-Received: by 2002:a05:6a00:1a91:b0:702:3174:c03d with SMTP id d2e1a72fcca58-702477bd7aemr1741085b3a.7.1717158610682; Fri, 31 May 2024 05:30:10 -0700 (PDT) Received: from localhost.localdomain ([223.178.85.118]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-70242ae88casm1280863b3a.125.2024.05.31.05.30.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:30:09 -0700 (PDT) From: Kanak Shilledar X-Google-Original-From: Kanak Shilledar To: Cc: Kanak Shilledar , Kanak Shilledar , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Stefan Wahren , 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: [RESEND v3] dt-bindings: spi: brcm,bcm2835-spi: convert to dtschema Date: Fri, 31 May 2024 17:59:37 +0530 Message-Id: <20240531122941.3524-1-kanakshilledar111@protonmail.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-20240531_053013_896210_1C10E199 X-CRM114-Status: GOOD ( 16.12 ) 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 From: Kanak Shilledar 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 v3: - Updated DCO email address 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>; + };