Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp523800imm; Fri, 31 Aug 2018 06:42:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZnB0ooFM85nm6tJfxenWM0hzB0T1XdfKr6Jxk4xjajmYVGXiXk0H6aSzTBbSOQIEgVP7p2 X-Received: by 2002:a63:2906:: with SMTP id p6-v6mr14452796pgp.204.1535722925266; Fri, 31 Aug 2018 06:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535722925; cv=none; d=google.com; s=arc-20160816; b=JlzBYvYVDeH1kJ6SBZYRfudmBRmFkQVbEKUu6cwOZWGp9Ybx89ZRTy/nxo4aF1B5ub bqRrEZxzV0G2saBQwyUPaoFQNGDPcHCTZB6GWb/ljfNkWbcjxfGDaQawTNYIqjoRWSay U8DPvfpB7tZA0fs17gajDzyZYxdVf3G+VYLIxPkYEIOEa1rbvl4wzhKQLCAZKEGkTXM6 EjVt02REF5ErfHmgxIshO24WA//WwQ6A5gbOBgEChKrPJlq5/gyfvutOz4xF7Kx/qxTK kwnllH5gksEougJY5QQkwKVXo9Nt6KlNZDFAmeyKpVXdFkAbz1sUCSzaoG/YlaeM+FSf kHoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=LU161eXp4eVe4JGuvlMn/FzhddCgnsZ/82tY/b3Cl34=; b=b9RbdJ2XMKYCLhsCw6ZAeE3ufa3tXmydpJxF9IAD+B/PQfy/WA88wdwAZxLl0Qs0zR NeybPj9sW3xMSw3XpFRaXEMmi3paT7RTwjPdnsEwPFIFfHD5Eluzdp4Gs6o4GBu5ZYjU WRCl9j3J4zXb+o1JCU02HGrGzqN4f42/JQyLNSk7sFSLjhLSzaerJRi6eNo9njiBh8tr S3kdI6YoHG5AlQ1rTaNsiQYYFw4g1Tn7gIXt5AzK0pMmnVseWGHNRjcZWkeEE46JrIcx IV1olYHk7yIB+zHewVyvV46UhSZv21QmSfT8T+6cX0/9CxiwW6oJ4a1oJw698RFbEqHQ Sx3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16-v6si6586078plr.343.2018.08.31.06.41.49; Fri, 31 Aug 2018 06:42:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728522AbeHaRsH (ORCPT + 99 others); Fri, 31 Aug 2018 13:48:07 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:58953 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728464AbeHaRsG (ORCPT ); Fri, 31 Aug 2018 13:48:06 -0400 X-IronPort-AV: E=Sophos;i="5.53,311,1531810800"; d="scan'208";a="16999758" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 31 Aug 2018 06:40:34 -0700 Received: from m19893.microchip.com (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Fri, 31 Aug 2018 06:40:32 -0700 From: Radu Pirea To: , , , , , , , , , CC: , , , , , Radu Pirea Subject: [RESEND PATCH v11 2/6] dt-bindings: add binding for atmel-usart in SPI mode Date: Fri, 31 Aug 2018 16:41:37 +0300 Message-ID: <20180831134141.9335-3-radu.pirea@microchip.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180831134141.9335-1-radu.pirea@microchip.com> References: <20180831134141.9335-1-radu.pirea@microchip.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch moves the bindings for serial from serial/atmel-usart.txt to mfd/atmel-usart.txt and adds bindings for USART in SPI mode. Signed-off-by: Radu Pirea Reviewed-by: Rob Herring Acked-for-MFD-by: Lee Jones Acked-by: Nicolas Ferre --- .../bindings/{serial => mfd}/atmel-usart.txt | 25 +++++++++++++++++-- include/dt-bindings/mfd/at91-usart.h | 17 +++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) rename Documentation/devicetree/bindings/{serial => mfd}/atmel-usart.txt (76%) create mode 100644 include/dt-bindings/mfd/at91-usart.h diff --git a/Documentation/devicetree/bindings/serial/atmel-usart.txt b/Documentation/devicetree/bindings/mfd/atmel-usart.txt similarity index 76% rename from Documentation/devicetree/bindings/serial/atmel-usart.txt rename to Documentation/devicetree/bindings/mfd/atmel-usart.txt index 7c0d6b2f53e4..0348fef0f497 100644 --- a/Documentation/devicetree/bindings/serial/atmel-usart.txt +++ b/Documentation/devicetree/bindings/mfd/atmel-usart.txt @@ -1,6 +1,6 @@ * Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART) -Required properties: +Required properties for USART: - compatible: Should be "atmel,-usart" or "atmel,-dbgu" The compatible indicated will be the first SoC to support an additional mode or an USART new feature. @@ -11,7 +11,13 @@ Required properties: Required elements: "usart" - clocks: phandles to input clocks. -Optional properties: +Required properties for USART in SPI mode: +- #size-cells : Must be <0> +- #address-cells : Must be <1> +- cs-gpios: chipselects (internal cs not supported) +- atmel,usart-mode : Must be (found in dt-bindings/mfd/at91-usart.h) + +Optional properties in serial mode: - atmel,use-dma-rx: use of PDC or DMA for receiving data - atmel,use-dma-tx: use of PDC or DMA for transmitting data - {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD line respectively. @@ -62,3 +68,18 @@ Example: dma-names = "tx", "rx"; atmel,fifo-size = <32>; }; + +- SPI mode: + #include + + spi0: spi@f001c000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "atmel,at91rm9200-usart", "atmel,at91sam9260-usart"; + atmel,usart-mode = ; + reg = <0xf001c000 0x100>; + interrupts = <12 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&usart0_clk>; + clock-names = "usart"; + cs-gpios = <&pioB 3 0>; + }; diff --git a/include/dt-bindings/mfd/at91-usart.h b/include/dt-bindings/mfd/at91-usart.h new file mode 100644 index 000000000000..2de5bc312e1e --- /dev/null +++ b/include/dt-bindings/mfd/at91-usart.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * This header provides macros for AT91 USART DT bindings. + * + * Copyright (C) 2018 Microchip Technology + * + * Author: Radu Pirea + * + */ + +#ifndef __DT_BINDINGS_AT91_USART_H__ +#define __DT_BINDINGS_AT91_USART_H__ + +#define AT91_USART_MODE_SERIAL 0 +#define AT91_USART_MODE_SPI 1 + +#endif /* __DT_BINDINGS_AT91_USART_H__ */ -- 2.18.0