From patchwork Thu Dec 9 12:29:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12695466 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 7E6B5C433FE for ; Thu, 9 Dec 2021 12:31:38 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z2RDEkz9w/KK/b8buFs/BIQowsxlCbwUIbEEx4hKeAY=; b=AAQsLyE5kdprNW 1K7RMrFIhVubd68dYIXTbWYj0nhdacMjWUDYyMX5650UvpSpSaIdf+upPz3+iiCVy67w5jpCVlijo ZYLcEPwKsf4oaFRVP04omEI6kiK8zH4zZQPXT7T3M+3S5is/GuUE3Xl4vRqTkHPXSUrCauAv1oB4O EF9l00mjXqnrKPn3iHLGALHHTsDLEswzuAcNWOqxEjISaMb0CwYwk8GxO7cyhafPkv3O6cYlSz1RQ Pb1XN9Dn4E+xjBCE/jI0GA1CLUd1k9rrWBaBaUC0Y4Lnsz2SnXOp7nUPTQYaXlwZA8mYD9E4BWGht +mP46WPyY5ythclCMgYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvIYj-00FvMN-Dh; Thu, 09 Dec 2021 12:30:01 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvIYV-00FvJA-BI for linux-arm-kernel@lists.infradead.org; Thu, 09 Dec 2021 12:29:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639052987; x=1670588987; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Xd9Rwi9IKDoW7SY8FYHsa3ZNF0l93uiiSgNbg2ztoig=; b=oxaw43OmLAoQlcotiJz9V2tRWzs0gTwgmYXy9rFIv118HB8l6nvbSysY wX7pihN10OPnqglBbRWDT1RdZ6vO7j32EcdijIZIwlVEp72AvHBU+1XBO e6La026u+9iqQPPoIgp/Qmy/LG6WTotAMH4VLfeXELCvZDwj+y/uBCn2d +vdaOcxFs3rsedo1NpFgPG4Utd8IjDEBLlwmikjc9UzKfOQ3YiGgJKXek vg6WIQYmdCkJuBs9AxkTBxuP2vc2JhHx0/4c1j+ueUJN6kSVdlK2AwHhJ o2KTEJHW3aSB88E+rKDxJo+5kbwxKkEN/HLOVvPD3n9hVFB1mMTGOCKA1 g==; IronPort-SDR: Jsuv8MMuzlCCj2a9A9IE96GxHYar/oz9bADe2OdIP/rQ/y5SHHUjSLjGrM91LiIfkT6PVddxEP RHe9ZVDlJUMWYBtoIZqGZRI6BgfMWNbjj68X/BESkwZVgCSwZq+zaejc3daoO6T9dHiq0gtj8x 01O+5FTskkfH9njODe9MlZfndpVMFKPR2il9oDxteheHjSGxpeZK8gAdR2ZPRSbrbzSyEuUlpi rLORDV0m6C3YzQImfIpU7AMCrR/s/SP4VOjiYY+Z1Sntxckt0GbZ4qsUsQ7omGrSkBCU9vV9sv 9LGSw7wUFX3ZfcCGBhGztpZF X-IronPort-AV: E=Sophos;i="5.88,192,1635231600"; d="scan'208";a="154857067" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 09 Dec 2021 05:29:46 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 9 Dec 2021 05:29:46 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 9 Dec 2021 05:29:43 -0700 From: Tudor Ambarus To: , Subject: [PATCH 1/2] dt-bindings: spi: atmel,quadspi: Convert to json-schema Date: Thu, 9 Dec 2021 14:29:38 +0200 Message-ID: <20211209122939.339810-2-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211209122939.339810-1-tudor.ambarus@microchip.com> References: <20211209122939.339810-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211209_042947_424998_384D9B86 X-CRM114-Status: GOOD ( 14.81 ) 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: , Cc: devicetree@vger.kernel.org, alexandre.belloni@bootlin.com, Tudor Ambarus , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, ludovic.desroches@microchip.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert the Atmel QuadSPI controller Device Tree binding documentation to json-schema. Signed-off-by: Tudor Ambarus Reviewed-by: Rob Herring --- .../bindings/spi/atmel,quadspi.yaml | 87 +++++++++++++++++++ .../devicetree/bindings/spi/atmel-quadspi.txt | 37 -------- 2 files changed, 87 insertions(+), 37 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/atmel,quadspi.yaml delete mode 100644 Documentation/devicetree/bindings/spi/atmel-quadspi.txt diff --git a/Documentation/devicetree/bindings/spi/atmel,quadspi.yaml b/Documentation/devicetree/bindings/spi/atmel,quadspi.yaml new file mode 100644 index 000000000000..7d0408f53c5f --- /dev/null +++ b/Documentation/devicetree/bindings/spi/atmel,quadspi.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/atmel,quadspi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel Quad Serial Peripheral Interface (QSPI) + +maintainers: + - Tudor Ambarus + +allOf: + - $ref: spi-controller.yaml# + +properties: + compatible: + enum: + - atmel,sama5d2-qspi + - microchip,sam9x60-qspi + + reg: + items: + - description: base registers + - description: mapped memory + + reg-names: + items: + - const: qspi_base + - const: qspi_mmap + + clocks: + minItems: 1 + items: + - description: peripheral clock + - description: system clock, if available + + clock-names: + minItems: 1 + items: + - const: pclk + - const: qspick + + interrupts: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +required: + - compatible + - reg + - reg-names + - interrupts + - clocks + - clock-names + - '#address-cells' + - '#size-cells' + +unevaluatedProperties: false + +examples: + - | + #include + #include + spi@f0020000 { + compatible = "atmel,sama5d2-qspi"; + reg = <0xf0020000 0x100>, <0xd0000000 0x8000000>; + reg-names = "qspi_base", "qspi_mmap"; + interrupts = <52 IRQ_TYPE_LEVEL_HIGH 7>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 52>; + clock-names = "pclk"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi0_default>; + + flash@0 { + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + reg = <0>; + spi-rx-bus-width = <4>; + spi-tx-bus-width = <4>; + }; + }; diff --git a/Documentation/devicetree/bindings/spi/atmel-quadspi.txt b/Documentation/devicetree/bindings/spi/atmel-quadspi.txt deleted file mode 100644 index 7c40ea694352..000000000000 --- a/Documentation/devicetree/bindings/spi/atmel-quadspi.txt +++ /dev/null @@ -1,37 +0,0 @@ -* Atmel Quad Serial Peripheral Interface (QSPI) - -Required properties: -- compatible: Should be one of the following: - - "atmel,sama5d2-qspi" - - "microchip,sam9x60-qspi" -- reg: Should contain the locations and lengths of the base registers - and the mapped memory. -- reg-names: Should contain the resource reg names: - - qspi_base: configuration register address space - - qspi_mmap: memory mapped address space -- interrupts: Should contain the interrupt for the device. -- clocks: Should reference the peripheral clock and the QSPI system - clock if available. -- clock-names: Should contain "pclk" for the peripheral clock and "qspick" - for the system clock when available. -- #address-cells: Should be <1>. -- #size-cells: Should be <0>. - -Example: - -spi@f0020000 { - compatible = "atmel,sama5d2-qspi"; - reg = <0xf0020000 0x100>, <0xd0000000 0x8000000>; - reg-names = "qspi_base", "qspi_mmap"; - interrupts = <52 IRQ_TYPE_LEVEL_HIGH 7>; - clocks = <&pmc PMC_TYPE_PERIPHERAL 52>; - clock-names = "pclk"; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_spi0_default>; - - m25p80@0 { - ... - }; -}; From patchwork Thu Dec 9 12:29:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12695464 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 9A5BBC433EF for ; Thu, 9 Dec 2021 12:31:37 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6A8PUWf3GyVy3rxixgzZDdugNozhdSsUX896yrICOq8=; b=W8fesWfvyW/3hD 42rSJFTuXNNGNPFJQfkQxr4ohcUlkc5VrJO9Nc7SN423jYLj+wk1Kau+U91+9R34Ek1w4ORZCAKv1 kvmyZzBUJmH/U6n7uUTD9zYaz8BRGBau0+PkQEQUZdt2ofAmNQz8v6pUiATSpJI/A39pPmOXT1uCn 5JkkBsphavGDqJsG2QDFjRNjr7W/UIOEWo9YVknxkrKp/Dm9uqSZs6h+RPhAZVx6Y2eI0tdPRFg8J gHvyQ1jFOrFFuhXB/raxwaWl0Zeethq3hH6QrpzW7BCU0l3K1CAGnI/wv6wGEOC6b6zgj9a72ihmA gPnoHIxxP/7jADupctNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvIYu-00FvPW-4o; Thu, 09 Dec 2021 12:30:12 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvIYZ-00FvKH-FX for linux-arm-kernel@lists.infradead.org; Thu, 09 Dec 2021 12:29:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639052991; x=1670588991; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IF3u07Cvca1snD/fcDu2THtejBBY9GEcAPFTH0zMSI4=; b=GAi/992054V5FXPZzsyWa5p7ueKTjKeEaT8aAlz1fzNEZ2aVBfKerR2z zhYz0LrwSTybQ35ExNThc8HJEhI5PrDY/Cs8Ma20tIIRZ85O4e24CVlKl N+Hct0J3LB3pR1AIORgiFVX/9yXV+RO/XTOACf7qDkNHt3tvyf0dN/Yvm FqmMN3UR2H9oKYqDcpAjjZPSjGcqrz0bwXrLAMTiI9abWSFwcZkDkbgm2 CIayGa+LNt83Psi1rDM9hH8pp2Ylu3ylCgWULpuJZN6UHKhDiT9zztij5 WGEx/Vq2YKPZ2nLjRQghNYmgPuHnGnAAKFbbp8SWvqC88nXbMzU57DtSt A==; IronPort-SDR: zpfq2qXK0NpfqfnHXH2olt3AIp44j/AFJp7QER9hBQdU6K+FjrGvHZ5GuxT8m0r/Orm64PiMiD MVz+DGcKCvFzZHNaKc2n6m4iho3RQvKMcmu/t2rOL8N/1ruJyM0mDC/zNHhY3luVnOJ53c/H4g /BPzFMBlwuP60/WFNEybttKAQ+vHSOW3rpAGxee4+JKubuna+h1E9u4Q3CL6bccRbqnqenNHk8 BDNKPXIxAeGj46qY1bA6PGF9xCbBFlZs7slv7fbeWJ5wdtzguTraBhQXpS8cYLajX7worBgcqX RGLGyuiG57HXEKV0zrSvEDXh X-IronPort-AV: E=Sophos;i="5.88,192,1635231600"; d="scan'208";a="141843400" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 09 Dec 2021 05:29:49 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 9 Dec 2021 05:29:49 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 9 Dec 2021 05:29:46 -0700 From: Tudor Ambarus To: , Subject: [PATCH 2/2] dt-bindings: spi: atmel,quadspi: Define sama7g5 QSPI Date: Thu, 9 Dec 2021 14:29:39 +0200 Message-ID: <20211209122939.339810-3-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211209122939.339810-1-tudor.ambarus@microchip.com> References: <20211209122939.339810-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211209_042951_632277_C078270E X-CRM114-Status: UNSURE ( 7.64 ) X-CRM114-Notice: Please train this message. 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: , Cc: devicetree@vger.kernel.org, alexandre.belloni@bootlin.com, Tudor Ambarus , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, ludovic.desroches@microchip.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org sama7g5 embedds 2 instances of the QSPI controller: 1/ One Octal Serial Peripheral Interface (QSPI0) Supporting up to 200 MHz DDR. Octal, TwinQuad, HyperFlash and OctaFlash Protocols Supported 2/ One Quad Serial Peripheral Interface (QSPI1) Supporting Up to 90 MHz DDR/133 MHz SDR Signed-off-by: Tudor Ambarus Reviewed-by: Rob Herring --- .../devicetree/bindings/spi/atmel,quadspi.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/atmel,quadspi.yaml b/Documentation/devicetree/bindings/spi/atmel,quadspi.yaml index 7d0408f53c5f..1d493add4053 100644 --- a/Documentation/devicetree/bindings/spi/atmel,quadspi.yaml +++ b/Documentation/devicetree/bindings/spi/atmel,quadspi.yaml @@ -17,6 +17,8 @@ properties: enum: - atmel,sama5d2-qspi - microchip,sam9x60-qspi + - microchip,sama7g5-qspi + - microchip,sama7g5-ospi reg: items: @@ -32,17 +34,27 @@ properties: minItems: 1 items: - description: peripheral clock - - description: system clock, if available + - description: system clock or generic clock, if available clock-names: minItems: 1 items: - const: pclk - - const: qspick + - enum: [ qspick, gclk ] interrupts: maxItems: 1 + dmas: + items: + - description: tx DMA channel + - description: rx DMA channel + + dma-names: + items: + - const: tx + - const: rx + '#address-cells': const: 1