From patchwork Fri Oct 7 15:18:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 679305 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3srCt50JhBz9t2F for ; Sat, 8 Oct 2016 02:21:49 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b=ACY0tUoh; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934042AbcJGPVm (ORCPT ); Fri, 7 Oct 2016 11:21:42 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:35842 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757151AbcJGPVC (ORCPT ); Fri, 7 Oct 2016 11:21:02 -0400 Received: by mail-wm0-f50.google.com with SMTP id k125so38690574wma.1 for ; Fri, 07 Oct 2016 08:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gGwjgVH+kCmqN6FuCgJy1OkCR0aT2cDRPdwMg07nXd4=; b=ACY0tUohTPUxVGsvUZN78rKKYCzl7pe68mexl7xHJUiLmrdbwHZ9z8LtRC0VaQeqSs asga2kIN867kkFXvnVuDw8gch0LZfTR+F73y6LygZORHZ+FpBrv+n10J+fj/ZrLE112B K8Y2kJtINkyihIb5ImOu56Sg5WG9F1+7Ja/3Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gGwjgVH+kCmqN6FuCgJy1OkCR0aT2cDRPdwMg07nXd4=; b=ZJO8hKLZPvbWaqGwJhNb9W7AzfIiuLSGd+F2ei9/Gt/X5ZiNRM+jCLDsRNeZtN0LXq R58iSvOhP/TKheHijqPAABGxud4bDEQcJqXAn/bVR5OfuZWk13OiRs4smsmNqCb7nALZ G9Vq1CmskrGm3HIWlsNVdEd/QHJo1BfqLAA9g2yRfPykmNN9/Hf4uHCB3UrxwNYyLrNv +HR4ZqCSiK7IDybe2QW42qC6HCq7LqjIpTViPHvO+0VhUMhVcZ6sny+20aA/Un2HSlEp NthL/d2/CvvXWHkAUUypgtAkbbRyn4127OoocaXDOK/ztdqiQMC6UGJoPwL3gLgvQ6bP ACEg== X-Gm-Message-State: AA6/9Rmh/FbWvgYnGsN+e5rniR+12pmFgldH0IqzzeBvIKux1C5TqFZWJCDzG+tB3u32Vw== X-Received: by 10.194.106.197 with SMTP id gw5mr14939751wjb.88.1475853661026; Fri, 07 Oct 2016 08:21:01 -0700 (PDT) Received: from localhost.localdomain ([195.97.110.117]) by smtp.gmail.com with ESMTPSA id bl3sm20115466wjc.26.2016.10.07.08.20.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Oct 2016 08:21:00 -0700 (PDT) From: Pantelis Antoniou To: Lee Jones Cc: Linus Walleij , Alexandre Courbot , Rob Herring , Mark Rutland , Frank Rowand , Wolfram Sang , David Woodhouse , Brian Norris , Florian Fainelli , Wim Van Sebroeck , Peter Rosin , Debjit Ghosh , Georgi Vlaev , Guenter Roeck , Maryam Seraj , Pantelis Antoniou , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, linux-watchdog@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 04/10] i2c: i2c-sam: Add device tree bindings Date: Fri, 7 Oct 2016 18:18:32 +0300 Message-Id: <1475853518-22264-5-git-send-email-pantelis.antoniou@konsulko.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1475853518-22264-1-git-send-email-pantelis.antoniou@konsulko.com> References: <1475853518-22264-1-git-send-email-pantelis.antoniou@konsulko.com> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org From: Georgi Vlaev Add binding document for the i2c driver of SAM FPGA. Signed-off-by: Georgi Vlaev [Ported from Juniper kernel] Signed-off-by: Pantelis Antoniou --- .../devicetree/bindings/i2c/i2c-sam-mux.txt | 20 ++++++++++ Documentation/devicetree/bindings/i2c/i2c-sam.txt | 44 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sam-mux.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sam.txt diff --git a/Documentation/devicetree/bindings/i2c/i2c-sam-mux.txt b/Documentation/devicetree/bindings/i2c/i2c-sam-mux.txt new file mode 100644 index 0000000..10ddffa --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-sam-mux.txt @@ -0,0 +1,20 @@ +Juniper's SAM FPGA I2C accelerator mux + +The SAM FPGA I2C mux is present only on Juniper SAM FPGA PTX series +of routers. + +The definition of the i2c sam bus is located in the i2c-sam.txt document. + +Required properties: +- compatible: should be "jnx,i2c-sam-mux". +- reg: master number and mux number. + +Optional properties: +- speed: If present must be either 100000 or 400000. No other values supported. + +Examples: + +pe1i2c: i2c-sam-mux@1,0 { + compatible = "jnx,i2c-sam-mux"; + reg = <1 0>; +}; diff --git a/Documentation/devicetree/bindings/i2c/i2c-sam.txt b/Documentation/devicetree/bindings/i2c/i2c-sam.txt new file mode 100644 index 0000000..4830b48 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-sam.txt @@ -0,0 +1,44 @@ +Juniper's SAM FPGA I2C accelerator + +The SAM FPGA accelerator is used to connect the large number of +I2C muxes that are present on Juniper PTX series of routers. +While it's an i2c bus, no other devices are located besides +i2c-sam-mux devices. + +The definition of the i2c sam mux is located in the i2c-sam-mux.txt document. + +Required properties: +- compatible: should be "jnx,i2c-sam". +- #address-cells: should be 2. +- #size-cells: should be 0. +- mux-channels: number of mux channels present + +Optional properties: +- reg: offset and length of the register set for the device are optional since + typically the register range is provided by the parent SAM MFD device. +- master-offset: Offset of where the master register memory starts. + Default value is 0x8000. +- reverse-fill: Fill the start entries of transactions in reverse order +- priority-tables: Use the pre-programmed priority tables in the FPGA +- i2c-options: list of options to be written to the option field in the + FPGA controlling things like SCL push-pull drives, hold-times, etc. +- bus-range: start of bus master range and number of masters. + +Examples: + +i2c-sam { + compatible = "jnx,i2c-sam"; + mux-channels = <2>; + #size-cells = <0>; + #address-cells = <2>; + + /* PE0 */ pe0i2c: i2c-sam-mux@0,0 { + compatible = "jnx,i2c-sam-mux"; + reg = <0 0>; + }; + + /* PE1 */ pe1i2c: i2c-sam-mux@1,0 { + compatible = "jnx,i2c-sam-mux"; + reg = <1 0>; + }; +};