From patchwork Thu Dec 14 04:23:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 10111429 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 8D4F56019C for ; Thu, 14 Dec 2017 04:24:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BD6329B2C for ; Thu, 14 Dec 2017 04:24:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F5AF29B2E; Thu, 14 Dec 2017 04:24:36 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED 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 DFC4029B2C for ; Thu, 14 Dec 2017 04:24:35 +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=XHmxk5pwAfvVO9F57jfcHd7Xk7QksfMbZUvyTqYhNsU=; b=OousTAaKHSP84N+b9DEBCj+0bK 3trHSYhJXIGKNqVA/7mEC9qAQ1L0d7vuyHTh4A4uvu5CDFHzTcpJ//uoc8p18PzWEJEd1Vfkk7kUC h2VcNFUquyQTkKkp3dN/+Viur4scrsBIIh/AW4vRMpCh00tJUW1osVdHuHkIM4SJ9Ekt4E3Pivyz9 v9LjjcwlXXkVktnHWnIzN8cTnaRwAcH71XufKNlQ+xNJfwWRFTrFOF8z4Gc2fKCugnHqfE+srkShm xhEIXAufhzGG3I1RGaP9kA3nykd/K6q9YEQKaJNX7PW+5oXTDBHubyk4jzQP8mhpLJGhcMUTzSaiX m1+heSyw==; 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 1ePL4V-0001Lx-6L; Thu, 14 Dec 2017 04:24:35 +0000 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76] helo=wens.csie.org) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ePL4A-0000pk-77 for linux-arm-kernel@lists.infradead.org; Thu, 14 Dec 2017 04:24:16 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id 48E5160204; Thu, 14 Dec 2017 12:23:52 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH v2 2/3] ARM: dts: sun8i: a83t: Add I2C device nodes and pinmux settings Date: Thu, 14 Dec 2017 12:23:49 +0800 Message-Id: <20171214042350.29469-3-wens@csie.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171214042350.29469-1-wens@csie.org> References: <20171214042350.29469-1-wens@csie.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171213_202414_434977_28BC1B01 X-CRM114-Status: UNSURE ( 7.90 ) 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, Chen-Yu Tsai , linux-kernel@vger.kernel.org, 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 The A83T has 3 I2C controllers under the standard bus. There is one more in the R_ block section. The pin functions for the 3 controllers are on PH 0~6. I2C2 can also be used on pins PE14 and PE15, but these pins can also mux the CSI (camera sensor interface) controller's embedded I2C controller. The latter seems to be preferred in the reference designs for I2C camera sensor access, freeing I2C2 for other uses. This patch adds device nodes for the three standard I2C controllers, as well as pinmux settings for the PH pins. For I2C0 and I2C1, since they only have one possible setting, just set them by default. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a83t.dtsi | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index 354cb4b48f47..de5119a2a91c 100644 --- a/arch/arm/boot/dts/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi @@ -348,6 +348,21 @@ drive-strength = <40>; }; + i2c0_pins: i2c0-pins { + pins = "PH0", "PH1"; + function = "i2c0"; + }; + + i2c1_pins: i2c1-pins { + pins = "PH2", "PH3"; + function = "i2c1"; + }; + + i2c2_ph_pins: i2c2-ph-pins { + pins = "PH4", "PH5"; + function = "i2c2"; + }; + i2s1_pins: i2s1-pins { /* I2S1 does not have external MCLK pin */ pins = "PG10", "PG11", "PG12", "PG13"; @@ -499,6 +514,46 @@ status = "disabled"; }; + i2c0: i2c@1c2ac00 { + compatible = "allwinner,sun8i-a83t-i2c", + "allwinner,sun6i-a31-i2c"; + reg = <0x01c2ac00 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2C0>; + resets = <&ccu RST_BUS_I2C0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c1: i2c@1c2b000 { + compatible = "allwinner,sun8i-a83t-i2c", + "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b000 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2C1>; + resets = <&ccu RST_BUS_I2C1>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c2: i2c@1c2b400 { + compatible = "allwinner,sun8i-a83t-i2c", + "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b400 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2C2>; + resets = <&ccu RST_BUS_I2C2>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + emac: ethernet@1c30000 { compatible = "allwinner,sun8i-a83t-emac"; syscon = <&syscon>;