From patchwork Fri Oct 18 09:51:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 21112 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D1A8825D9E for ; Fri, 18 Oct 2013 09:51:44 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id uy5sf4555545obc.3 for ; Fri, 18 Oct 2013 02:51:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=jaP+eY0pB1rVWu5FEM42hBhp4shq7ETMRca/rL060Qk=; b=FrB6G3UsCHZcnk7qz5uknWePEnePBYvAGYA1dQQ+kc5BZaDCaSQnwU9fU3cOw+dOBx XQznaLhsbhrydE1E7LV7tmWme9NSCTB4gLC0fbZMJlscZVmpT09kO1GyvBcEoomhqlY+ 8dniPStD99m6hTVuYTKmAYDs57kBWA1VmAuUqs/rHjjZFmq/95PssT6WJJltulXN31e9 l/WEOBD6vhs7+FH5QxIwly77XlIhTNSNxa8HV6XIxFYuk3npobPyTP5fcvpJ9UFeXbaC bUJeNaWMGjEB3EJmIxoB8RpJH6lgW5k9Gex2p+N9BPfJLeyGOtgIVERALqHw2pM/FWqO ueZA== X-Received: by 10.42.179.10 with SMTP id bo10mr656956icb.8.1382089903778; Fri, 18 Oct 2013 02:51:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.59.82 with SMTP id x18ls1214453qeq.88.gmail; Fri, 18 Oct 2013 02:51:43 -0700 (PDT) X-Received: by 10.52.26.69 with SMTP id j5mr542472vdg.21.1382089903641; Fri, 18 Oct 2013 02:51:43 -0700 (PDT) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id vh9si142528vcb.100.2013.10.18.02.51.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 02:51:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.42; Received: by mail-vb0-f42.google.com with SMTP id e12so1745303vbg.15 for ; Fri, 18 Oct 2013 02:51:43 -0700 (PDT) X-Gm-Message-State: ALoCoQmPvJJuQ2BG2neTItKFPptN4obh+/5uz4aLAYcjsPIixbWe51Lub+d4PDqN0bvydPsjVJwy X-Received: by 10.58.156.106 with SMTP id wd10mr1306526veb.7.1382089903191; Fri, 18 Oct 2013 02:51:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp22740vcz; Fri, 18 Oct 2013 02:51:42 -0700 (PDT) X-Received: by 10.180.187.51 with SMTP id fp19mr2156645wic.1.1382089902138; Fri, 18 Oct 2013 02:51:42 -0700 (PDT) Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by mx.google.com with ESMTPS id ut3si244577wjc.140.2013.10.18.02.51.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 02:51:42 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.43 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.43; Received: by mail-wg0-f43.google.com with SMTP id b13so3422705wgh.34 for ; Fri, 18 Oct 2013 02:51:41 -0700 (PDT) X-Received: by 10.180.80.227 with SMTP id u3mr1636564wix.7.1382089901463; Fri, 18 Oct 2013 02:51:41 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id bs15sm25303018wib.10.2013.10.18.02.51.39 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2013 02:51:40 -0700 (PDT) From: Linus Walleij To: devicetree@vger.kernel.org, Samuel Ortiz , Lee Jones Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij Subject: [PATCH 1/5 v2] mfd: tc3589x: Add device tree bindings Date: Fri, 18 Oct 2013 11:51:30 +0200 Message-Id: <1382089890-20689-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This defines the device tree bindings for the Toshiba TC3589x series of multi-purpose expanders. Only the stuff I can test is defined: GPIO and keypad. Others may implement more subdevices further down the road. This is to complement commit a435ae1d51e2f18414f2a87219fdbe068231e692 "mfd: Enable the tc3589x for Device Tree" which left off the definition of the device tree bindings. Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Include a verbose example in the DT bindings. - Explain why this is a stand-alone bindings patch. --- Documentation/devicetree/bindings/mfd/tc3589x.txt | 107 ++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/tc3589x.txt diff --git a/Documentation/devicetree/bindings/mfd/tc3589x.txt b/Documentation/devicetree/bindings/mfd/tc3589x.txt new file mode 100644 index 0000000..565a426 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/tc3589x.txt @@ -0,0 +1,107 @@ +* Toshiba TC3589x multi-purpose expander + +The Toshiba TC3589x series are I2C-based MFD devices which may expose the +following built-in devices: gpio, keypad, rotator (vibrator), PWM (for +e.g. LEDs or vibrators) The included models are: + +- TC35890 +- TC35892 +- TC35893 +- TC35894 +- TC35895 +- TC35896 + +Required properties: + - compatible : must be "toshiba,tc35890", "toshiba,tc35892", "toshiba,tc35893", + "toshiba,tc35894", "toshiba,tc35895" or "toshiba,tc35896" + - reg : I2C address of the device + - interrupt-parent : specifies which IRQ controller we're connected to + - interrupts : the interrupt on the parent the controller is connected to + - interrupt-controller : marks the device node as an interrupt controller + - #interrupt-cells : should be <1>, the first cell is the IRQ offset on this + TC3589x interrupt controller. + +Optional nodes: + +- GPIO + This GPIO module inside the TC3589x has 24 (TC35890, TC35892) or 20 + (other models) GPIO lines. + - compatible : must be "toshiba,tc3589x-gpio" + - interrupts : interrupt on the parent, which must be the tc3589x MFD device + - interrupt-controller : marks the device node as an interrupt controller + - #interrupt-cells : should be <2>, the first cell is the IRQ offset on this + TC3589x GPIO interrupt controller, the second cell is the interrupt flags + in accordance with . The following + flags are valid: + - IRQ_TYPE_LEVEL_LOW + - IRQ_TYPE_LEVEL_HIGH + - IRQ_TYPE_EDGE_RISING + - IRQ_TYPE_EDGE_FALLING + - IRQ_TYPE_EDGE_BOTH + - gpio-controller : marks the device node as a GPIO controller + - #gpio-cells : should be <2>, the first cell is the GPIO offset on this + GPIO controller, the second cell is the flags. + +- Keypad + This keypad is the same on all variants, supporting up to 96 different + keys. The linux-specific properties are modeled on those already existing + in other input drivers. + - compatible : must be "toshiba,tc3589x-keypad" + - debounce-delay-ms : debounce interval in milliseconds + - keypad,num-rows : number of rows in the matrix, see + bindings/input/matrix-keymap.txt + - keypad,num-columns : number of columns in the matrix, see + bindings/input/matrix-keymap.txt + - linux,keymap: the definition can be found in + bindings/input/matrix-keymap.txt + - linux,no-autorepeat: do no enable autorepeat feature. + - linux,wakeup: use any event on keypad as wakeup event. + +Example: + +tc35893@44 { + compatible = "toshiba,tc35893"; + reg = <0x44>; + interrupt-parent = <&gpio6>; + interrupts = <26 IRQ_TYPE_EDGE_RISING>; + + interrupt-controller; + #interrupt-cells = <1>; + + tc3589x_gpio { + compatible = "toshiba,tc3589x-gpio"; + interrupts = <0>; + + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + }; + tc3589x_keypad { + compatible = "toshiba,tc3589x-keypad"; + interrupts = <6>; + debounce-delay-ms = <4>; + keypad,num-columns = /bits/ 8 <8>; + keypad,num-rows = /bits/ 8 <8>; + linux,no-autorepeat; + linux,wakeup; + linux,keymap = <0x0301006b + 0x04010066 + 0x06040072 + 0x040200d7 + 0x0303006a + 0x0205000e + 0x0607008b + 0x0500001c + 0x0403000b + 0x03040034 + 0x05020067 + 0x0305006c + 0x040500e7 + 0x0005009e + 0x06020073 + 0x01030039 + 0x07060069 + 0x050500d9>; + }; +};