From patchwork Fri Jun 2 23:52:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thor Thayer X-Patchwork-Id: 9763703 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 A2BF0602F0 for ; Fri, 2 Jun 2017 23:50:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93BB620952 for ; Fri, 2 Jun 2017 23:50:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88471285DD; Fri, 2 Jun 2017 23:50:49 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2617E20952 for ; Fri, 2 Jun 2017 23:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2zhfaaOUraTO/bbcLYPbWrDVYakS5FtdLdFCtPWorEE=; b=C7RMHv0l2qACrZ5ZwbHJiTLeqm Buz09NWB9sIYnIxSKsyms0RFZ8irQkOqI5ImF3l8U5D+GWTLbpemYpSu13ha9U8NCsEVaWf9nCYFK yjpEWoZIOUxwhXHTgMmleg4e56wd+/TEqjWVpcXSNcayEHpHboqwaYgmrRoRG8oYrUoOidLfYsDHy 5PSTNjVicjk28Y0u8iYnxoKpyQfN0cymAvzOrK65ARVXhx8FmAFF0Y4SZM2mOXxMdsxwn3ipKtBi/ s8KZ8mzHthLcLVWoGxverFhBlaexrMWHM+TvtVrgTskhonDn/F8vH+Ulw+GbIvoAKCmnkFUH0eDq5 bP+yNJaQ==; 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 1dGwL8-0004MC-Kq; Fri, 02 Jun 2017 23:50:46 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dGwKi-0002cb-Gr for linux-arm-kernel@lists.infradead.org; Fri, 02 Jun 2017 23:50:23 +0000 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jun 2017 16:49:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,287,1493708400"; d="scan'208";a="110334809" Received: from tthayer-hp-z620-workstation.an.intel.com ([10.122.105.144]) by fmsmga006.fm.intel.com with ESMTP; 02 Jun 2017 16:49:57 -0700 From: thor.thayer@linux.intel.com To: wsa@the-dreams.de, robh+dt@kernel.org, mark.rutland@arm.com, dinguyen@kernel.org, thor.thayer@linux.intel.com Subject: [PATCHv3 1/4] ARM: dts: socfpga: Add Altera I2C Controller to CycloneV Date: Fri, 2 Jun 2017 18:52:36 -0500 Message-Id: <1496447559-19782-2-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496447559-19782-1-git-send-email-thor.thayer@linux.intel.com> References: <1496447559-19782-1-git-send-email-thor.thayer@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170602_165020_599649_202E82C5 X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. 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: devicetree@vger.kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, mchehab@kernel.org, davem@davemloft.net, linux-arm-kernel@lists.infradead.org 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: Thor Thayer Add the Altera I2C Controller to the CycloneV SoCFPGA device tree. Signed-off-by: Thor Thayer --- v2 Remove altr, from fifo-size. Rename compatible string to "altr,softip-i2c" v3 Add version to commpatible string "altr,softip-i2c-v1.0" --- arch/arm/boot/dts/socfpga.dtsi | 13 ++++++++++--- arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 28 +++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi index b2674bd..d69c13d 100644 --- a/arch/arm/boot/dts/socfpga.dtsi +++ b/arch/arm/boot/dts/socfpga.dtsi @@ -133,6 +133,13 @@ #address-cells = <1>; #size-cells = <0>; + clk_0: clk_0 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <50000000>; + clock-output-names = "clk_0-clk"; + }; + osc1: osc1 { #clock-cells = <0>; compatible = "fixed-clock"; @@ -529,11 +536,11 @@ }; }; - fpga_bridge0: fpga_bridge@ff400000 { + fpga_bridge0: fpga_bridge@ff200000 { compatible = "altr,socfpga-lwhps2fpga-bridge"; - reg = <0xff400000 0x100000>; + reg = <0xff200000 0x00200000>; resets = <&rst LWHPS2FPGA_RESET>; - clocks = <&l4_main_clk>; + clocks = <&clk_0>; }; fpga_bridge1: fpga_bridge@ff500000 { diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts index 155829f..f99576b 100644 --- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts +++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts @@ -68,6 +68,7 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + }; &can0 { @@ -101,7 +102,7 @@ }; &i2c0 { - status = "okay"; + status = "disabled"; clock-frequency = <100000>; /* @@ -176,3 +177,28 @@ &usb1 { status = "okay"; }; + +&fpga_bridge0 { + reg-names = "axi_h2f_lw"; + #address-cells = <2>; + #size-cells = <1>; + ranges = <0x00000001 0x00080000 0xff280000 0x00000040>; + + i2c_0: i2c@0x100080000 { + compatible = "altr,softip-i2c-v1.0"; + reg = <0x00000001 0x00080000 0x00000040>; + interrupt-parent = <&intc>; + interrupts = <0 43 4>; + clocks = <&clk_0>; + fifo-size = <4>; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; + + eeprom@51 { + compatible = "atmel,24c32"; + reg = <0x51>; + pagesize = <32>; + }; + }; +};