From patchwork Tue Dec 4 17:40:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khalil Blaiech X-Patchwork-Id: 1007779 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 438Th454P3z9s8J for ; Wed, 5 Dec 2018 04:41:56 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726421AbeLDRlz (ORCPT ); Tue, 4 Dec 2018 12:41:55 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:35092 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726112AbeLDRlz (ORCPT ); Tue, 4 Dec 2018 12:41:55 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kblaiech@mellanox.com) with ESMTPS (AES256-SHA encrypted); 4 Dec 2018 19:47:49 +0200 Received: from farm-0002.mtbu.labs.mlnx (farm-0002.mtbu.labs.mlnx [10.15.2.32]) by mtbu-labmailer.labs.mlnx (8.14.4/8.14.4) with ESMTP id wB4HfmLF011511; Tue, 4 Dec 2018 12:41:48 -0500 Received: (from kblaiech@localhost) by farm-0002.mtbu.labs.mlnx (8.14.7/8.13.8/Submit) id wB4Hfm2G029981; Tue, 4 Dec 2018 12:41:48 -0500 From: Khalil Blaiech To: Rob Herring , Wolfram Sang , Wolfram Sang , David Woods Cc: Khalil Blaiech , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 2/2] dt-bindings: i2c: I2C binding for Mellanox BlueField SoC Date: Tue, 4 Dec 2018 12:40:58 -0500 Message-Id: <559a79756c9da9a7b188ffa141a2056a83c60de6.1543941145.git.kblaiech@mellanox.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Added device tree bindings documentation for Mellanox BlueField I2C SMBus controller. Reviewed-by: David Woods Signed-off-by: Khalil Blaiech --- .../devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt diff --git a/Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt b/Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt new file mode 100644 index 0000000..61a8037 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt @@ -0,0 +1,67 @@ +Device tree configuration for the Mellanox I2C SMBus on BlueField SoCs + +Required Properties: +- reg : address offset and length of the device registers. The + registers consists of a set of dedicated and shared + resources: + + 1: Smbus block registers (dedicated) + 2: Cause master registers (dedicated) + 3: Cause slave registers (dedicated) + 4: Cause coalesce registers (shared) + 5: GPIO 0 registers (shared) + 6: CorePLL registers (shared) + + The BlueField SoCs includes three I2C bus controllers; + the set of resources
must be defined + as follow: + + i2c bus 0: + <0x02804000 0x800> /* Smbus[0] */ + <0x02801200 0x020> /* Cause Master[0] */ + <0x02801260 0x020> /* Cause Slave[0] */ + <0x02801300 0x010> /* Cause Coalesce */ + <0x02802000 0x100> /* GPIO 0 */ + <0x02800358 0x008> /* CorePll */ + + i2c bus 1: + <0x02804800 0x800> /* Smbus[1] */ + <0x02801220 0x020> /* Cause Master[1] */ + <0x02801280 0x020> /* Cause Slave[1] */ + <0x02801300 0x010> /* Cause Coalesce */ + <0x02802000 0x100> /* GPIO 0 */ + <0x02800358 0x008> /* CorePll */ + + i2c bus 2: + <0x02805000 0x800> /* Smbus[2] */ + <0x02801240 0x020> /* Cause Master[2] */ + <0x028012a0 0x020> /* Cause Slave[2] */ + <0x02801300 0x010> /* Cause Coalesce */ + <0x02802000 0x100> /* GPIO 0 */ + <0x02800358 0x008> /* CorePll */ + +- compatible : should be "mellanox,i2c-mlxbf". +- interrupts : interrupt number. + +Optional Properties: +- clock-frequency : bus frequency used to configure timing registers; + allowed values are 100000, 400000 and 1000000; + those are expressed in Hz. + +Example: + +aliases { + i2c0 = &i2c_0 +}; + +i2c_0: i2c { + compatible = "mellanox,i2c-mlxbf"; + reg = <0x02804000 0x800>, + <0x02801200 0x020>, + <0x02801260 0x020>, + <0x02801300 0x010>, + <0x02802000 0x100>, + <0x02800358 0x008>; + interrupts = <57>; + clock-frequency = <100000>; +};