From patchwork Wed Oct 16 18:54:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karan Sanghavi X-Patchwork-Id: 13838769 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 60E21D2A53D for ; Wed, 16 Oct 2024 18:55:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=1WEbBQ2/i7lkFW0aLtN2j+zp34lAewWd7prOWA+b1kM=; b=wMkn/o11IS6C0GMRrFuftaX3R0 7+wc/PFW4n4QlXTn2tZh5N0o7a1W+/uA/bG26I2Xea/RxeO68QzHa88sRl1ZFC+hQuw3ppunMOuU8 QMxyiC9k9n9ri8iEsc2LYtbvp2axty2aSeBtcaI27YghKnElXcwOf4n8bkYhsHrSzvAivlYQXhjZc 3sRi7aOlSKp8+DhJLQwmbSYAFiRtwVDlcYAufZLJ3QfludRJTnra1uN8qdJgSoDnUgWZ7fEZucvF9 99tfiv6K7mM8K0LB6Ocml/9Pq1Wd5JmSdfX7FHsMUmXp0vvkM5/C8rM1oPHJSzprzVHPvRDubGjoy fof0LRbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t19BK-0000000Cjkf-0EbH; Wed, 16 Oct 2024 18:55:38 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t199r-0000000CjOI-3GEa; Wed, 16 Oct 2024 18:54:09 +0000 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-20cdb889222so1398375ad.3; Wed, 16 Oct 2024 11:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729104846; x=1729709646; darn=lists.infradead.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=1WEbBQ2/i7lkFW0aLtN2j+zp34lAewWd7prOWA+b1kM=; b=jx6G5payDCFc+XZmGK4JDzsUH/+WjLjVKoo4Va/7B3Ak7pIYscbOj+FbpW6u1d1Kve kQCZt0f8V3xcyOcJzMC1UxE3Cs36J5gjbCao5pQY0W8VEJwPOY6r8ZrppYvj9nH3LSR+ p20gKknOslSBP5ZqullIaPIXj3FmNzgt34TRxQH0H79Uklol4TuDEqE3qYDJvQ5BKDyB ldmkqWIcsPb4g4FxR4MgT/qAhKO5+K79WtUB2spxS4IS5BNksEKieM4RdUsAZAXkecOS qbjAClX5LWeJI16f8e3vUENWG3Om0E+J1+Ik1vzHZPXrlXIYKtyEmvRijIzY69TgFkKE r/8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729104846; x=1729709646; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1WEbBQ2/i7lkFW0aLtN2j+zp34lAewWd7prOWA+b1kM=; b=GYtHWNGkbc+86uJxdaqf5grLzH8UhMxKPc8Y7Qq5GupdqBOjhnBVhvvhOBb7eun+zB GjKIxgUNWdrmahSA9sxSmfOGkNCP/CdxKs6PeObq5vh16lvD7JmQoeQbg3oMIxXAv1Cl 6+2vi7CM8dSb7XiOR38PwfzEahDicsKvzIe7P6neNUgiuLWQyWgUISWfPXkX1Qdxctr7 BFlt5RDYpH2eYZm/bT4QGhRe9qwBpBhdr3kC+D7rbMGHfMNoj/3CK51usPq5Hb+0jQ5J KKWu3e6zoYmqr+Ir+HQzMcNV0pbrxtDSSIHXZbpPu1OTEPivGIP4th62kTVkBFXKAKUQ IKcg== X-Forwarded-Encrypted: i=1; AJvYcCXC2FXSxwqiSLg5phH6F/mJiHKdECd3isH6CpaINoT2yvwjbkB7gC0K6h5KlsgFXfWey9ddPUYAx0mcyMtF7sArkA==@lists.infradead.org, AJvYcCXeSWGltD1/iA32WkC2zRfzBkn0Pa3JiTLShFX9z+gts2Tb0NsMbFlDpTpQYLRPOTB1Oi4E57wkh6iHpaUkVkAF@lists.infradead.org X-Gm-Message-State: AOJu0YxLbZ4d2M7yMjYiUp4AcBnPJ72gcZ4JYjaj2BqrWQFPMk3hKcGR fBV1Un6EOSpBeW+mRYIg80IHTnLmd0Dd7bXciP4JfxsMB97+vDn+ X-Google-Smtp-Source: AGHT+IFNUMYvFYf4p3MkHE6cA9zg4WL2xzIDxgXIGOqB3badx678F5VvqdOq/3/xoTfYOzgxjR4ntA== X-Received: by 2002:a17:903:120a:b0:205:3e6d:9949 with SMTP id d9443c01a7336-20ca16be7demr281535785ad.52.1729104846268; Wed, 16 Oct 2024 11:54:06 -0700 (PDT) Received: from Emma ([2401:4900:1c97:c88d:5054:ff:fe53:2787]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20d1805e56bsm31733715ad.286.2024.10.16.11.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 11:54:05 -0700 (PDT) Date: Wed, 16 Oct 2024 18:54:03 +0000 From: Karan Sanghavi To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli Cc: Ray Jui , Scott Branden , Broadcom internal kernel review list , Karan Sanghavi , 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, Shuah Khan , Anup Subject: [PATCH v3] dt-bindings: spi: Convert to dtschema Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_115407_840479_3DA348CC X-CRM114-Status: GOOD ( 17.56 ) 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 bcm2835-aux-spi binding to Dt schema Signed-off-by: Karan Sanghavi Reviewed-by: Krzysztof Kozlowski --- Changes since V2: - Modified the Patch subject - Removed unnecessary description and example .../bindings/spi/brcm,bcm2835-aux-spi.txt | 38 -------------- .../bindings/spi/brcm,bcm2835-aux-spi.yaml | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt create mode 100644 Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.yaml diff --git a/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt b/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt deleted file mode 100644 index d7668f41b..000000000 --- a/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt +++ /dev/null @@ -1,38 +0,0 @@ -Broadcom BCM2835 auxiliary SPI1/2 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 SPI1/2 controller. - -Required properties: -- compatible: Should be "brcm,bcm2835-aux-spi". -- reg: Should contain register location and length for the spi block -- interrupts: Should contain shared interrupt of the aux block -- clocks: The clock feeding the SPI controller - needs to - point to the auxiliary clock driver of the bcm2835, - as this clock will enable the output gate for the specific - clock. -- cs-gpios: the cs-gpios (native cs is NOT supported) - see also spi-bus.txt - -Example: - -spi1@7e215080 { - compatible = "brcm,bcm2835-aux-spi"; - reg = <0x7e215080 0x40>; - interrupts = <1 29>; - clocks = <&aux_clocks BCM2835_AUX_CLOCK_SPI1>; - #address-cells = <1>; - #size-cells = <0>; - cs-gpios = <&gpio 18>, <&gpio 17>, <&gpio 16>; -}; - -spi2@7e2150c0 { - compatible = "brcm,bcm2835-aux-spi"; - reg = <0x7e2150c0 0x40>; - interrupts = <1 29>; - clocks = <&aux_clocks BCM2835_AUX_CLOCK_SPI2>; - #address-cells = <1>; - #size-cells = <0>; - cs-gpios = <&gpio 43>, <&gpio 44>, <&gpio 45>; -}; diff --git a/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.yaml b/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.yaml new file mode 100644 index 000000000..351019d68 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/brcm,bcm2835-aux-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom BCM2835 Auxiliary SPI1/2 Controller + +maintainers: + - Karan Sanghavi + +description: The BCM2835 contains two forms of SPI master controller. One is known simply as + SPI0, and the other as the "Universal SPI Master," part of the auxiliary block. + This binding applies to the SPI1 and SPI2 auxiliary controllers. + +allOf: + - $ref: spi-controller.yaml# + +properties: + compatible: + enum: + - brcm,bcm2835-aux-spi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + #include + spi@7e215080 { + compatible = "brcm,bcm2835-aux-spi"; + reg = <0x7e215080 0x40>; + interrupts = <1 29>; + clocks = <&aux_clocks BCM2835_AUX_CLOCK_SPI1>; + #address-cells = <1>; + #size-cells = <0>; + };