From patchwork Thu Oct 16 20:26:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Belisko X-Patchwork-Id: 400374 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BFE4514008C for ; Fri, 17 Oct 2014 07:27:14 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751942AbaJPU04 (ORCPT ); Thu, 16 Oct 2014 16:26:56 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:37005 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbaJPU0l (ORCPT ); Thu, 16 Oct 2014 16:26:41 -0400 Received: by mail-lb0-f173.google.com with SMTP id 10so3444645lbg.4 for ; Thu, 16 Oct 2014 13:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=0TG2Rz7ozqSBb/dIefHTGhMqPYZlqJMkalDBHQaPwM8=; b=m1xhm3YQxpT4mxq2CTq+cNoyPDReLAeetVPWLCtrQ3pw+DsIdAaodOt4C/gcjWhTsg Vx81nnzYGRC419YdhYOzIYO8ezq0JRMGc7Lz9vcle/KFM4oWikv3yHprSIlqAja1EfnI zfCcuXsQUdTtwBaIDkatso/w+kZOBdGQyFAvDLcyln1ADJbFhyBf+R9H9HAskTDnD48v ZHoRPKONAzp0eDlVlSqwSud7LpNLjK4gPvB+nBcpqEAv28UctgtUX8jpiZPp2b3jrfk4 NsLepWLm/weUby89a/yMdjo06HKDCyVVFnagExIQDzXlMulBp42XKSDTbhh9tNN6WiYi Z8cQ== X-Received: by 10.152.19.9 with SMTP id a9mr4107266lae.41.1413491200025; Thu, 16 Oct 2014 13:26:40 -0700 (PDT) Received: from nb.lan (ip-85.163.14.80.o2inet.sk. [85.163.14.80]) by mx.google.com with ESMTPSA id z4sm8106482laz.39.2014.10.16.13.26.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Oct 2014 13:26:39 -0700 (PDT) From: Marek Belisko To: arnd@arndb.de, gregkh@linuxfoundation.org Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, grant.likely@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Belisko , "H. Nikolaus Schaller" Subject: [PATCH 2/2] Documentation: devicetree: Add bindings for Wi2Wi w2sg0004 gps Date: Thu, 16 Oct 2014 22:26:23 +0200 Message-Id: <1413491183-15018-2-git-send-email-marek@goldelico.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413491183-15018-1-git-send-email-marek@goldelico.com> References: <1413491183-15018-1-git-send-email-marek@goldelico.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: H. Nikolaus Schaller Signed-off-by: Marek Belisko --- .../devicetree/bindings/misc/wi2wi,w2sg0004.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt diff --git a/Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt b/Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt new file mode 100644 index 0000000..e144441 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt @@ -0,0 +1,44 @@ +Wi2Wi GPS module connected through UART + +Required properties: +- compatible: wi2wi,w2sg0004 or wi2wi,w2sg0084 +- pinctrl: specify two states (default and monitor). One is the default (UART) mode + and the other is for monitoring the RX line by an interrupt +- on-off-gpio: the GPIO that controls the module's on-off toggle input + +Optional properties: +- lna-suppy: an (optional) LNA regulator that is enabled together with the GPS receiver + +example: + + gps_receiver: w2sg0004 { + compatible = "wi2wi,w2sg0004"; + gpio-controller; + #gpio-cells = <2>; + + pinctrl-names = "default", "monitor"; + pinctrl-0 = <&uart2_pins>; + pinctrl-1 = <&uart2_rx_irq_pins>; + + interrupt-parent = <&gpio5>; + interrupts = <19 IRQ_TYPE_EDGE_FALLING>; /* GPIO_147: RX - trigger on arrival of start bit */ + lna-supply = <&vsim>; /* LNA regulator */ + on-off-gpio = <&gpio5 17 0>; /* GPIO_145: trigger for turning on/off w2sg0004 */ + +&pinmux { + + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = < + 0x14a (PIN_INPUT | MUX_MODE0) /* uart2_tx.uart2_rx */ + 0x148 (PIN_OUTPUT | MUX_MODE0) /* uart2_tx.uart2_tx */ + >; + }; + + uart2_rx_irq_pins: pinmux_uart2_rx_irq_pins { + pinctrl-single,pins = < + /* switch RX to GPIO so that we can get interrupts by the start bit */ + 0x14a (PIN_INPUT | MUX_MODE4) /* uart2_tx.uart2_rx */ + >; + }; + +}