Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2425787imm; Tue, 4 Sep 2018 04:22:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ87b/baWKLb+417Bb9ODtTxoFjo9TUErna6GY8zBNb6kLM1F82tJOUXMNDxtn85RS0vHb0 X-Received: by 2002:a63:2d87:: with SMTP id t129-v6mr9350907pgt.128.1536060178321; Tue, 04 Sep 2018 04:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536060178; cv=none; d=google.com; s=arc-20160816; b=dodyas9K+aMlJlp7cr9n7dhwaCtuJrZtdS+J3VFwMtpICpCrTLeXbLt4g8XVH2uvHG 3GF1M9UJdfzv8tEy93iVThj9a2ySeYD1jreae0fUXxgK53ru61WgKkVCPWbi+BUS6M3o 9DoEfB+3wXlkfcUEoKfNsJUgGprRnlSFX2r5XHauSBhTXjCWHwKPvZFc2Mp5c4yNodC2 r24N0Pq7//SfOw5sQxlvJRYuC6OZSvucMqpnKf2rSTokdX7CfEgOF+yjlvDQbJXHh0ds gbqMKJ/K/bgGLM20vWycqaF+HSJhIJNTLcjra5HzqcR7rH9KqXG3K4XHjql2sVliq2JY 0sqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=NfYSqIC3dfvapR78ZuUvvZ5sCJ4qdpBOtWXkY7msMxY=; b=fQGV7wi/ZXRiZkm2mRy755ORz5eLePQHBdskMjlBNd4EigWLqjP5aobuqJvDp/YCHe PFikvL3s/KI8GxzO/2XxCqaQ0O/AhCJmz+VFUdOEq1x76eLEXdc9zxE6jjSGFxIRrJgm cjl6QLtYNt0XpvqWVEKrk2FVmfQVy9E/hD6tDfPc5TVB04EI7IYosJD6uPUitbtCL5sH mQtspqMAg8DinpfXBWnW6ZQsZW7lXJboiBRR6llBAtcve2HlYtMQNa1OuPbwAnV61rV7 djlQ68/1FaDa0R1igOgZVNqjWnzH7VKfRg3+nEKgWCKFDkbpi1RrYYbtARyAMj8F9+mj uFaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@upb.ro header.s=96342B8A-77E4-11E5-BA93-D93D0963A2DF header.b="GKdfUA+/"; 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 t64-v6si20779836pgc.516.2018.09.04.04.22.42; Tue, 04 Sep 2018 04:22:58 -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; dkim=pass header.i=@upb.ro header.s=96342B8A-77E4-11E5-BA93-D93D0963A2DF header.b="GKdfUA+/"; 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 S1727401AbeIDPpA (ORCPT + 99 others); Tue, 4 Sep 2018 11:45:00 -0400 Received: from mail-sender200.upb.ro ([141.85.13.200]:56696 "EHLO mx.upb.ro" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727155AbeIDPo7 (ORCPT ); Tue, 4 Sep 2018 11:44:59 -0400 Received: from mx.upb.ro (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTPS id E4C44B56005F; Tue, 4 Sep 2018 14:13:20 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id C1510B560059; Tue, 4 Sep 2018 14:13:20 +0300 (EEST) DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro C1510B560059 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro; s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1536059600; bh=NfYSqIC3dfvapR78ZuUvvZ5sCJ4qdpBOtWXkY7msMxY=; h=From:To:Date:Message-Id; b=GKdfUA+/7YaDX2R+JDD+YUqOI7hhn+7BEBZNOvmdKgMQmqtA9ukdM/0AEPEoIboI7 eDUuVmykjHxmP7uUvPZpHRgopnTb0fT/HYUxEbRkZ8zAoiZ668R10oWd/YZMDuu9bT FrvuYclhT52b0cB8aOOWVEvkuZTbEVGzoVcTxBjM= Received: from mx.upb.ro ([127.0.0.1]) by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id puJh2dql3P6j; Tue, 4 Sep 2018 14:13:20 +0300 (EEST) Received: from asus-rog.localdomain (arh.pub.ro [141.85.160.17]) by mx.upb.ro (Postfix) with ESMTPSA id 92C4AB56005F; Tue, 4 Sep 2018 14:13:20 +0300 (EEST) From: Radu Pirea To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, gregkh@linuxfoundation.org, broonie@kernel.org, jslaby@suse.com, richard.genoud@gmail.com, davem@davemloft.net, mchehab+samsung@kernel.org, akpm@linux-foundation.org, arnd@arndb.de Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-spi@vger.kernel.org, Radu Pirea Subject: [PATCH v12 2/6] dt-bindings: add binding for atmel-usart in SPI mode Date: Tue, 4 Sep 2018 14:13:06 +0300 Message-Id: <20180904111310.4049-3-radu_nicolae.pirea@upb.ro> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180904111310.4049-1-radu_nicolae.pirea@upb.ro> References: <20180904111310.4049-1-radu_nicolae.pirea@upb.ro> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Radu Pirea 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..7f0cd72f47d2 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 5>; + 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