From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757811AbbEaJoU (ORCPT ); Sun, 31 May 2015 05:44:20 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:34871 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115AbbEaJoM (ORCPT ); Sun, 31 May 2015 05:44:12 -0400 From: Daniel Tang To: arm@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Tang Subject: [PATCH] devicetree: Add support for I2C and related devices to TI-NSPIRE platform Date: Sun, 31 May 2015 19:44:02 +1000 Message-Id: <1433065442-92750-1-git-send-email-dt.tangr@gmail.com> X-Mailer: git-send-email 2.2.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds device tree entries for I2C hardware to the TI-NSPIRE platforms that have it. It also adds support for the touchpad that communicates over the I2C bus. Signed-off-by: Daniel Tang --- arch/arm/boot/dts/nspire-cx.dts | 13 +++++++++++++ arch/arm/boot/dts/nspire-tp.dts | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/arch/arm/boot/dts/nspire-cx.dts b/arch/arm/boot/dts/nspire-cx.dts index 08e0b81..e369e3b 100644 --- a/arch/arm/boot/dts/nspire-cx.dts +++ b/arch/arm/boot/dts/nspire-cx.dts @@ -104,9 +104,22 @@ #size-cells = <1>; i2c@90050000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,designware-i2c"; reg = <0x90050000 0x1000>; interrupts = <20>; + + clocks = <&apb_pclk>; + + i2c-sda-falling-time-ns = <810>; + i2c-scl-falling-time-ns = <2410>; + + touchpad@20 { + compatible = "synaptics_i2c"; + reg = <0x20>; + }; }; }; }; diff --git a/arch/arm/boot/dts/nspire-tp.dts b/arch/arm/boot/dts/nspire-tp.dts index 621391c..49fb97a 100644 --- a/arch/arm/boot/dts/nspire-tp.dts +++ b/arch/arm/boot/dts/nspire-tp.dts @@ -41,4 +41,18 @@ / { model = "TI-NSPIRE Touchpad"; compatible = "ti,nspire-tp"; + + i2c@gpio { + #address-cells = <1>; + #size-cells = <0>; + + compatible = "i2c-gpio"; + gpios = < &gpio 3 0 /* sda */ + &gpio 1 0 /* scl */ >; + + touchpad@20 { + compatible = "synaptics_i2c"; + reg = <0x20>; + }; + }; }; -- 2.2.1