From patchwork Thu Jan 12 22:35:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Bostic X-Patchwork-Id: 9514353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1DF5560476 for ; Thu, 12 Jan 2017 22:36:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23F292870A for ; Thu, 12 Jan 2017 22:36:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18D262871C; Thu, 12 Jan 2017 22:36:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BB38F2870A for ; Thu, 12 Jan 2017 22:36:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cRnyd-0003zb-Dh; Thu, 12 Jan 2017 22:36:11 +0000 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cRnyZ-0003vl-Tf for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2017 22:36:09 +0000 Received: by mail-oi0-x241.google.com with SMTP id u143so4796104oif.3 for ; Thu, 12 Jan 2017 14:35:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=kdUMK/yNCzNZrflqJiUQHjByJyMGG/0Qfd4JFtRTcUY=; b=eP6YTBlSFwOMjT3z/UamMfkNRKNrLlC2MMAfMxNAZ9A0E+0tF/cM1+WJvCjld9OwzA O0NAYqAEAqizNGwCSzGlZSu1TqD7BtFWBBq7H7dT8PyYWYpYzUCjPCj7bDy38EamJ/BN I2D8WPnKNryUDC9tm9CYqes1oeeyHLVhkutyeqcEtODDSP7qYJmqojJ/y7QPCxisBqdK z0Gt+mNS1d94iro/nvwWboTEVqih8e+u81HykDaIE1ewr3mEQvH30aONxlx7TasxukuQ ThqqfgnHQdhsj2PABCNJmij/RYxnfaUVeTh2x9incWiPVA9iMkgNkazL4HDJRoj9TABC lxUw== 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; bh=kdUMK/yNCzNZrflqJiUQHjByJyMGG/0Qfd4JFtRTcUY=; b=OInHMjf0lPWcRqJEkEzjHDVI224brIXZv4dkrHgZN6c+NuA/7d4lhFhVBjeEKK2rJo Kpjp8psnQwsfK/lRKM0/xAaPEe9e0tod2egKy74zJuZKHJaK3KxsLy0K13QsjdGWNP0T yfJMlEFVR8/lB/V7S1cXfKH3Juh7PKvfCC7LBL8EBUCvBHEgCjOMmh3GPuTsOHkzDHXQ 27RehwBqOjB0CK7q5BTyKvg0XSf32uQFHab9vMgIXLi8jWymrghyi1qiYhMkCWc00ZMn Ef7jWkI+qw0UJQirRq4CEXFGrBrrdQ+V99DVBVC6gop2m2AB15Mwv3E0S+bO3PdGNw8R 1KWQ== X-Gm-Message-State: AIkVDXKZEN5MJcEcQcuTXO6spUV7pGs4NsB6qRzMWRr9koOmTvz3iVPDlAISvKZnQPdGoQ== X-Received: by 10.202.72.2 with SMTP id v2mr7410908oia.56.1484260547176; Thu, 12 Jan 2017 14:35:47 -0800 (PST) Received: from Christophers-MacBook-Pro.local.com (45-20-192-79.lightspeed.austtx.sbcglobal.net. [45.20.192.79]) by smtp.gmail.com with ESMTPSA id g6sm4876941otb.10.2017.01.12.14.35.45 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Jan 2017 14:35:46 -0800 (PST) From: christopher.lee.bostic@gmail.com To: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, gregkh@linuxfoundation.org, mturquette@baylibre.com, geert+renesas@glider.be, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, joel@jms.id.au, jk@ozlabs.org, linux-kernel@vger.kernel.org, andrew@aj.id.au, alistair@popple.id.au, benh@kernel.crashing.org Subject: [PATCH v2 15/18] drivers/fsi: Add documentation for GPIO based FSI master Date: Thu, 12 Jan 2017 16:35:43 -0600 Message-Id: <1484260543-80300-1-git-send-email-christopher.lee.bostic@gmail.com> X-Mailer: git-send-email 2.7.4 (Apple Git-66) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170112_143608_035219_57196E0A X-CRM114-Status: GOOD ( 18.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Bostic MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Chris Bostic Define the device tree bindings for the GPIO master type. Signed-off-by: Chris Bostic --- V2 - Break out this documentation update from the code implementing The GPIO master function. - Move the documentation to an earlier patch than the code implementing the function. - Document all 'compatible' strings used in the series. - Write binding document in terms of hardware, not software. - Elaborate on what a GPIO based FSI master is versus a non GPIO based master. - Give a more detailed description of what each pin in the GPIO FSI master is to be used for. - Re-order compatible strings in example so that most specific comes first. - Indicate the proper order each pin should be initialized. - Fix an unmatched '>' bracket in the example for binding. - Bracket each element of the example list items individually. --- .../devicetree/bindings/fsi/fsi-master-gpio.txt | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/fsi/fsi-master-gpio.txt diff --git a/Documentation/devicetree/bindings/fsi/fsi-master-gpio.txt b/Documentation/devicetree/bindings/fsi/fsi-master-gpio.txt new file mode 100644 index 0000000..5d589bf --- /dev/null +++ b/Documentation/devicetree/bindings/fsi/fsi-master-gpio.txt @@ -0,0 +1,71 @@ +Device-tree bindings for FSI master implemented with GPIO +--------------------------------------------------------- + +Typically a FSI master is defined in hardware with output control +lines designated for Enable, Data, Clock, etc.. In the case of +a 'GPIO FSI master', however, it may be the case that there is no +such master defined in hardware and must be implemented in standard +GPIO to interact with its slaves. In this 'virtual' FSI master +case the GPIO pins representing clk and data are directly +connected to the slaves. + +The GPIO FSI master node +------------------------- +This node describes a FSI master implmented with GPIO. +Required property: + compatible = "ibm,fsi-master-gpio" + +The standard FSI master node +---------------------------- +This node describes a FSI master implmemented fully in hardware +with dedicated input/output pins required for its function (i.e. +not using generic GPIO pins). +Required property: + compatible = "ibm,fsi-master" + + +GPIO FSI master property/pin descriptions +------------------------------------------ +clk - The master controlled clock line that indicates to the + slave when to read in or send out new data - required. +data - The serial data line containing information to be sent or + received by the master. This line is bi-directional. During + command phase the master controls the line and when a response + is required the slave takes control - required. +enable - Controls power state of data line - optional. +trans - Voltage translator control. In some applications the data line + must have its signal levels altered by a translator. If this is + necessary then control of signal direction is managed via this + line - optional. +mux - Multiplexor control. This activates/deactivates the data line + in cases where it is one of many possible selections via mux - + optional. + +Required properties: + - compatible = "ibm,fsi-master-gpio"; + - clk-gpios; + - data-gpios; + +Optional properties: + - enable-gpios; + - trans-gpios; + - mux-gpios; + +Order of property activation: +1. clk +2. data +3. trans +4. enable +5. mux + + +Example: + +fsi-master { + compatible = "ibm,fsi-master-gpio", "ibm,fsi-master"; + clk-gpios = <&gpio 0>, <&gpio 6>; + data-gpios = <&gpio 1>, <&gpio 7>; + enable-gpios = <&gpio 2>, <&gpio 8>; + trans-gpios = <&gpio 3>, <&gpio 9>; + mux-gpios = <&gpio 4>, <&gpio 10>; +}