From patchwork Sat Jun 5 00:29:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 12300961 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7CDCC4743D for ; Sat, 5 Jun 2021 00:34:41 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A0C7A61028 for ; Sat, 5 Jun 2021 00:34:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0C7A61028 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=nigauri.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=vp9nmrjcDsb4zVA4bicu7h2mD/NIAMqUyuchpuWf1UU=; b=UPNZbknwxKuJ04 GVew8rvgXWo7wYLUX7Jg63nas0XlZJtTObm5clLK/movyFT/6BhksiQmCi6DmAV2+Gf4B61ggWghp p5L88MMiMvWxVgS+BVvl2AcfX6CKe6kXetCMz1kwrQQjiIROgBrxX6WpXv1g8S5z16UajwJUK+wv6 uNu86hP0PJxZ8o6OjG1RBAIOI1ZLOKTVemU2hyIzAe0SjIKS6lwAcoxgQZMwz6nhQLHEd8vqo81Zf yYy4JMMBLisHEczKzBrYWIPSTW8r5i/tl2o3zI69n4PP+WiNCmgpDZCYw3xqDcxzyx3UWOAC8m46P QTFZNxkiNghohWneyxIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpKDD-00FcsC-Vc; Sat, 05 Jun 2021 00:30:52 +0000 Received: from mail-pf1-f181.google.com ([209.85.210.181]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpKD7-00FcrU-VH for linux-arm-kernel@lists.infradead.org; Sat, 05 Jun 2021 00:30:49 +0000 Received: by mail-pf1-f181.google.com with SMTP id h12so5777821pfe.2 for ; Fri, 04 Jun 2021 17:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nigauri-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PZP7uoqK4rZTbRyor5ljz0z5OefandIGr44+CvdyTHk=; b=wG/O3dkQkvY2siVOpGfkrEcJx8jL0hjMDTrnKdjGD/YpTa07gbC+SvH/o7A3yU+FL6 HMfua4DtIHs0eS7xyT6QIhk7ZZLaMt3QKqJRXz9Jgta48+AWUhAU/XIoa1DG7bBkZHpY VOMeXGUumIRi60JC0GIz0Jr4a6OeMnm8VhLly3U2SDBkXeWv0XzUSWHiOzScOhMivIqJ fHjBajoDDSfwOufXRUHt8ZtL7c2KdF3lIlYAWmIAma2PdrT7ElXV0SgWkJFKXRMr9UE/ dSjxQpprIYDR2fCRUyCBMtDX6+WWuCNG7DWXny3HGZSWtnws2ub+j9FznQLTV4KdVjx+ /98A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PZP7uoqK4rZTbRyor5ljz0z5OefandIGr44+CvdyTHk=; b=CfZEaNoDn2r72CyJlGAsfN14B7+bwZOra2Urs1juVQlKXcc7mKipzAq0GDMndJv8Mu c0ky/pFUdruHMLT0hlpLvXuIuOei5ScnzwSAMXqsUfG7fghWUXGV4Hpdb3yGelLoAoL7 LUXUkB9ASdR4hUr7xns2SKmdX42Xd9aTiAHWFIgqq9OG02Ql3d2Bp9gh35Cfz1G0O+F1 xsMmv2UKslx/GX3Vib6VXrvV6LUtQfXfaebTJsclOl6Rder5bAz8tru76l0jZXWGqY5C TL/3aHzEhc96uLtNfrzbZpNVKgWGqNGdMmKmQDkz98Y/R/+E5TpZhnM0b50PUWOkgi0T Uj9Q== X-Gm-Message-State: AOAM531uQ1ZeDJuBLGWXTA9hmkQh9x2rGrOGfEkESQpmE6LNs5Z/B1Im SyF9lB3PFNUQErgrFDI3Jo2A X-Google-Smtp-Source: ABdhPJx188cd5LTGTHCHNR4bRrRTAV1T+k04ZIfLNyVyN4S9b49HoZgXJMag3gBLT+KUq73YSYeYhg== X-Received: by 2002:a05:6a00:1a8b:b029:28e:7b62:5118 with SMTP id e11-20020a056a001a8bb029028e7b625118mr7040711pfv.49.1622852985186; Fri, 04 Jun 2021 17:29:45 -0700 (PDT) Received: from localhost ([2405:6581:5360:1800:7285:c2ff:fec2:8f97]) by smtp.gmail.com with ESMTPSA id x19sm2683648pgj.66.2021.06.04.17.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 17:29:44 -0700 (PDT) From: Nobuhiro Iwamatsu To: broonie@kernel.org, michal.simek@xilinx.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Nobuhiro Iwamatsu Subject: [PATCH v2] dt-bindings: spi: xilinx: convert to yaml Date: Sat, 5 Jun 2021 09:29:31 +0900 Message-Id: <20210605002931.858031-1-iwamatsu@nigauri.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210604_173046_041244_12946499 X-CRM114-Status: GOOD ( 15.23 ) 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 SPI for Xilinx bindings documentation to YAML schemas. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Rob Herring --- v2: Use enum instead of oneOf with const. Add constraints to xlnx,num-ss-bits and xlnx,num-transfer-bits. .../devicetree/bindings/spi/spi-xilinx.txt | 23 -------- .../devicetree/bindings/spi/spi-xilinx.yaml | 57 +++++++++++++++++++ 2 files changed, 57 insertions(+), 23 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/spi-xilinx.txt create mode 100644 Documentation/devicetree/bindings/spi/spi-xilinx.yaml diff --git a/Documentation/devicetree/bindings/spi/spi-xilinx.txt b/Documentation/devicetree/bindings/spi/spi-xilinx.txt deleted file mode 100644 index 5f4ed3e5c9942c..00000000000000 --- a/Documentation/devicetree/bindings/spi/spi-xilinx.txt +++ /dev/null @@ -1,23 +0,0 @@ -Xilinx SPI controller Device Tree Bindings -------------------------------------------------- - -Required properties: -- compatible : Should be "xlnx,xps-spi-2.00.a", "xlnx,xps-spi-2.00.b" or "xlnx,axi-quad-spi-1.00.a" -- reg : Physical base address and size of SPI registers map. -- interrupts : Property with a value describing the interrupt - number. - -Optional properties: -- xlnx,num-ss-bits : Number of chip selects used. -- xlnx,num-transfer-bits : Number of bits per transfer. This will be 8 if not specified - -Example: - axi_quad_spi@41e00000 { - compatible = "xlnx,xps-spi-2.00.a"; - interrupt-parent = <&intc>; - interrupts = <0 31 1>; - reg = <0x41e00000 0x10000>; - xlnx,num-ss-bits = <0x1>; - xlnx,num-transfer-bits = <32>; - }; - diff --git a/Documentation/devicetree/bindings/spi/spi-xilinx.yaml b/Documentation/devicetree/bindings/spi/spi-xilinx.yaml new file mode 100644 index 00000000000000..593f7693baceed --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-xilinx.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/spi-xilinx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Xilinx SPI controller Device Tree Bindings + +maintainers: + - Michal Simek + +allOf: + - $ref: "spi-controller.yaml#" + +properties: + compatible: + enum: + - xlnx,xps-spi-2.00.a + - xlnx,xps-spi-2.00.b + - xlnx,axi-quad-spi-1.00.a + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + xlnx,num-ss-bits: + description: Number of chip selects used. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 32 + + xlnx,num-transfer-bits: + description: Number of bits per transfer. This will be 8 if not specified. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [8, 16, 32] + default: 8 + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + spi0: spi@41e00000 { + compatible = "xlnx,xps-spi-2.00.a"; + interrupt-parent = <&intc>; + interrupts = <0 31 1>; + reg = <0x41e00000 0x10000>; + xlnx,num-ss-bits = <0x1>; + xlnx,num-transfer-bits = <32>; + }; +...