From patchwork Thu Oct 17 15:02:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karan Sanghavi X-Patchwork-Id: 13840189 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 B68D2D374A7 for ; Thu, 17 Oct 2024 15:04:13 +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=pbTepaupxmjTIi44JHiVOejj/VBl6pEdVxqjDmlhRUs=; b=u2LG0S71pjC9+NXIIgXNACrNW3 uogJWNtraD8x0I4/2aPq1NO86An4ylterF7/r6Um8dr6s+we2OzsbxLI5Er4+UG2hs8Xz/ub5SINL 3hIcj5pWqQ+InPYNGNSQuOUiSqk2bf9y0Av/L2S+y+o7VABOAOvoXX7eHj8WkI38dCuoQqgolGpcY W3HRBGY488mY1tUpxfp7NI0Am2uSvXk73rGiOdnAVScA6tnMevYde8SfgIqGoNFFPxexns4l08qCo u2ONH9+CrcfmH/SHtn1WMLTxFR7jaKdf/P/xstp29bK49EtDlCr4442Xq5yxJLfSn1njAcbzA93/M ZKhfE/9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1S2f-0000000FDAS-1Hg8; Thu, 17 Oct 2024 15:03:57 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1S18-0000000FCuY-0Hfw; Thu, 17 Oct 2024 15:02:26 +0000 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-7e6cbf6cd1dso733282a12.3; Thu, 17 Oct 2024 08:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729177340; x=1729782140; 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=pbTepaupxmjTIi44JHiVOejj/VBl6pEdVxqjDmlhRUs=; b=JFoPMQp3PDGMdAxw032lcgoD/1DS0NTIF3602tog5EXGWRYPtggZ1wHHb1vo5Bob7h eNiDaPjQpEiWKRycR1xji1XstE3TbM9u/hcQXYUzROwetHqqyHnGzlRz/uqZkbZcVnIk isMqUbirXPhEURnAMyIXO+RkTzuIP4m+lmCiYQan3mYllGhThK9EUEJ8S6LBA4oYR/Vn 3GtiXSjOjQWCep3R70W2Om/t4q9n5FE+qbJ4cfd8SwlQofbO2f3QwLexB3/ifVj6Duor 0n/rP7L3qlB/oqzNYbwqbf1CA9aw+Rd7yRfmS9gUiKpNM0GXXdG3TtEAGNM/ZOaLLs7Q jujQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729177340; x=1729782140; 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=pbTepaupxmjTIi44JHiVOejj/VBl6pEdVxqjDmlhRUs=; b=joRdWylAI8tKpHOM73FYOfYr435jQCXrtD9O+tIC9GIHF5s1o0QQEIBpuIz19wL7GC 5cO1Di5hjneng+siWTOJjUWRbvzWzNlnrwji5xIyb/UpNtOQdx+MblzYarId3rxLeZm2 qP+NeDx+P2BWeZJ9tNvemiqli+7F7H2qdh2s7tF/W3lunotM0/r/3fgY3JR1NglGSJww 3Ws++60NnR3UV7cgLaaaDVVOrhIInA+0yl4heu+d59ftpW8rsfpJwtogUSqo8IdINifW KxNE7KiVcm/KaHKSgTm+5BiM123fPmuvels2PM/DfsHap6oDmEGP+PyLdRmryRfc2Yah 01XQ== X-Forwarded-Encrypted: i=1; AJvYcCWPnuUV6tOtylzC2ozrlKwWOcNG5jLMrL5ZZCHFX7MO8aCIN3iaueFpEvZOXveOWW0SBThN2HHp/rFe0iDJpMUJaw==@lists.infradead.org, AJvYcCWxKcbyJ1ZNGzbeZePQknByqftUfzwTLBGtcURQTATKPrnxdbjJP7DnSdTPszSOsBJsg7vt7uEzkUUrPK2k4v0Q@lists.infradead.org X-Gm-Message-State: AOJu0YySTVAwDSe8+UQeqj/Bw+Td1cDzclfmWcCzu8vzV/1+q2znJQuN eehNJfY2aZnDAuuYhId7H90PLMLdGtJov/2AqSyDal9ig3impeiI X-Google-Smtp-Source: AGHT+IFsfvLVFEbRGcztXFhYtd+BhQrK0AtsjOFGGM8AyzG1oCWj10f8ehC+PZ4ZYN6vG21JfEzzUw== X-Received: by 2002:a05:6a21:6b86:b0:1d9:a1c:70a7 with SMTP id adf61e73a8af0-1d90a1c71a9mr8497972637.48.1729177340206; Thu, 17 Oct 2024 08:02:20 -0700 (PDT) Received: from Emma ([2401:4900:1c97:c88d:5054:ff:fe53:2787]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ea9c715d7dsm5049956a12.88.2024.10.17.08.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2024 08:02:19 -0700 (PDT) Date: Thu, 17 Oct 2024 15:02:16 +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 v4] spi: dt-bindings: brcm,bcm2835-aux-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-20241017_080222_131818_6700B19E X-CRM114-Status: GOOD ( 17.27 ) 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 Changes since v3: - Updated the patch subject line - Reformatted the description to fit within 80 characters Changes since V2: - Modified the Patch subject - Removed unnecessary description and example Signed-off-by: Karan Sanghavi Reviewed-by: Krzysztof Kozlowski --- .../bindings/spi/brcm,bcm2835-aux-spi.txt | 38 ------------- .../bindings/spi/brcm,bcm2835-aux-spi.yaml | 53 +++++++++++++++++++ 2 files changed, 53 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..6df060778 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.yaml @@ -0,0 +1,53 @@ +# 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," which is 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>; + };