From patchwork Tue Jun 18 07:42:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bonnefille X-Patchwork-Id: 13701913 X-Patchwork-Delegate: mail@conchuod.ie Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8CC21C27C4F for ; Tue, 18 Jun 2024 07:43:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=thpFDQPvcdmPCM6uBvV1TgErkfutDswrsJLU6tIXp4I=; b=QA0oW57j+R4uNL p7rUAo1m82eP+OoZbNRTflXYN2odXjh7iFNRhKXUcm3ieldfKPuUDHP49lYrDFADVqGC0jvuQuCc+ yapC30Z3tKU7g5rmmQ7P9nBk0S628XB/ig9AwXMASG8+K4JSsOUT3aaDyhsofj0mvEkC+gAOjAIJ1 qXAWXg+cw3PRCrAV987G/fi7pWqpq0EiqG+SjhBshJ0n2LBjWeWLXhADynPlRusWp3K1Xd80z5thW NG3WqX3H/anOKb9BiqG7vnvbINLRViu1Rp7qBfIdNACVPIZJscVtNo9PWkk3lZbXVInPLFgh/mypv E/zMkOi6iJgra9uZmMRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTUQ-0000000DzFc-3L9w; Tue, 18 Jun 2024 07:42:50 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTUO-0000000DzDt-0JWo for linux-riscv@lists.infradead.org; Tue, 18 Jun 2024 07:42:49 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id EFFC2C000E; Tue, 18 Jun 2024 07:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718696566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qH0TLo/HOE8dSrccrpGSd7Xk4cZ6R5fApRIBhbaTVh4=; b=eVJGNGIHm/wAkcTIVwVaD5bTZnAMeCsF2erBGvqOZ8QpKKIE9U5wVZLfohj5MXMe4Pk5hG xvtyArETpp4JEzA//SGEvnBw9P9Ihqk4Vk0mreDYT/1NLUDUSsMiBLyHlReiZ6Sti0MPZO H7sI8t4Pnx9RR4WMwETxFXVcZAV2hkCKFa9g+NZuwaDjkzKcPaDL/XgEyVhxHa/1u8JERF AYnwf9cKJjs9TCxvOK/lNhFi4G8ZIkSgKTB3XQ22YzcSUbMH/biiojaSnJYxbIVQGcN9as XoVWZ8KhNxouyGaibO5qtj0di/SgcmjUMUlsViBKWrjCBmB5GdaSzm98gqEPaQ== From: Thomas Bonnefille Date: Tue, 18 Jun 2024 09:42:38 +0200 Subject: [PATCH v3 1/3] dt-bindings: i2c: dw: Document compatible thead,th1520-i2c MIME-Version: 1.0 Message-Id: <20240618-i2c-th1520-v3-1-3042590a16b1@bootlin.com> References: <20240618-i2c-th1520-v3-0-3042590a16b1@bootlin.com> In-Reply-To: <20240618-i2c-th1520-v3-0-3042590a16b1@bootlin.com> To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , Guo Ren , Fu Wei , Drew Fustini , Emil Renner Berthing , Conor Dooley , Jarkko Nikula Cc: Palmer Dabbelt , Albert Ou , Paul Walmsley , Thomas Petazzoni , =?utf-8?q?Miqu=C3=A8l_Ray?= =?utf-8?q?nal?= , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Thomas Bonnefille , Conor Dooley X-Mailer: b4 0.14.0 X-GND-Sasl: thomas.bonnefille@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_004248_319427_1F34E795 X-CRM114-Status: UNSURE ( 7.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add documentation for compatible string thead,th1520-i2c which can be used specifically for the TH1520 SoC. Signed-off-by: Thomas Bonnefille Acked-by: Conor Dooley Reviewed-by: Jarkko Nikula --- Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml index d9293c57f573..60035a787e5c 100644 --- a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml @@ -33,6 +33,10 @@ properties: - const: snps,designware-i2c - description: Baikal-T1 SoC System I2C controller const: baikal,bt1-sys-i2c + - description: T-HEAD TH1520 SoCs I2C controller + items: + - const: thead,th1520-i2c + - const: snps,designware-i2c reg: minItems: 1 From patchwork Tue Jun 18 07:42:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bonnefille X-Patchwork-Id: 13701916 X-Patchwork-Delegate: mail@conchuod.ie Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB147C2BA15 for ; Tue, 18 Jun 2024 07:43:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wJkuUTFpIs8PB9WlrqJFTq6C0s5MrDDDBFxpx6UvhJo=; b=jGFKvxZOC+fKmj fyusah9Oj/blUnFnC8yD39zAeD6YncZErtxa4gdDI8tVLNFWDAchgj0M2N9s8wW7OSiJciufE9tou +NI4w+2AoLutqcWHYQXIqYpIfwuHx4PQfpJecZY6OOLucblBog3m5WBexrk9KQi1MnH7/DWg2SlQ4 Uys20FQjI+OE4363qjJ7o8xTWh2BqmSZHw6v1hqMGN75uSA6WbxbU6a+QDPufmncv28IoR0WEiWD9 BGLQfGFnf22V5Kc8flqiNy1kgzuOEqXzFEZStxMq+EpFWjftaGN3yTRzMPkNwVqPxbhnAYL/3Cp8A v48TDl/hW9xlqAmDKJbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTUS-0000000DzGC-23IR; Tue, 18 Jun 2024 07:42:52 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTUO-0000000DzEA-1jFx for linux-riscv@lists.infradead.org; Tue, 18 Jun 2024 07:42:49 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 1DD3DC0009; Tue, 18 Jun 2024 07:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718696567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZIh3G9QrANhkJpdTb5SbPP1mqAoTXQh4UYfOgsrNlms=; b=cAFaoOlyFgRFwuNf+An7h77nqUItpuH8TrH9YDslPI57rUwQGcEi/RmR61/KxZVqt+BYz0 dnXzE7Bl4eyp89VUObOfd6g3O3nVxYKQc4q/OdNOAK2m5l6lNDFYt44oklKCu8XKj2fyy3 PMmBmixglFkiUkwOpgE0XAwkreNR9SViS2UkjHCJbsgxzUvSahm8Hng3AZJfx9HLsos5hY qUySbuHV3TX8MUuQiBN7hS2cOWFrNmn1fP+dTAuvNUQqUlsUx0EyH1qKde6T6K0t0PN+yh pbsoDIYfZUhgqCSexC/3mnryH6LGyCdgvgHY7eos2BP92b6peOgGVZCxxc/rsQ== From: Thomas Bonnefille Date: Tue, 18 Jun 2024 09:42:39 +0200 Subject: [PATCH v3 2/3] riscv: dts: thead: Add TH1520 I2C nodes MIME-Version: 1.0 Message-Id: <20240618-i2c-th1520-v3-2-3042590a16b1@bootlin.com> References: <20240618-i2c-th1520-v3-0-3042590a16b1@bootlin.com> In-Reply-To: <20240618-i2c-th1520-v3-0-3042590a16b1@bootlin.com> To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , Guo Ren , Fu Wei , Drew Fustini , Emil Renner Berthing , Conor Dooley , Jarkko Nikula Cc: Palmer Dabbelt , Albert Ou , Paul Walmsley , Thomas Petazzoni , =?utf-8?q?Miqu=C3=A8l_Ray?= =?utf-8?q?nal?= , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Thomas Bonnefille X-Mailer: b4 0.14.0 X-GND-Sasl: thomas.bonnefille@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_004248_765987_FB82D3DA X-CRM114-Status: UNSURE ( 7.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add nodes for the six I2C on the T-Head TH1520 RISCV SoC. Signed-off-by: Thomas Bonnefille Reviewed-by: Drew Fustini --- arch/riscv/boot/dts/thead/th1520.dtsi | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi index d88d4cade02c..f0b2b05e9bd4 100644 --- a/arch/riscv/boot/dts/thead/th1520.dtsi +++ b/arch/riscv/boot/dts/thead/th1520.dtsi @@ -232,6 +232,36 @@ uart3: serial@ffe7f04000 { status = "disabled"; }; + i2c0: i2c@ffe7f20000 { + compatible = "thead,th1520-i2c", "snps,designware-i2c"; + reg = <0xff 0xe7f20000 0x0 0x4000>; + interrupts = <44 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk CLK_I2C0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c1: i2c@ffe7f24000 { + compatible = "thead,th1520-i2c", "snps,designware-i2c"; + reg = <0xff 0xe7f24000 0x0 0x4000>; + interrupts = <45 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk CLK_I2C1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c4: i2c@ffe7f28000 { + compatible = "thead,th1520-i2c", "snps,designware-i2c"; + reg = <0xff 0xe7f28000 0x0 0x4000>; + interrupts = <48 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk CLK_I2C4>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + gpio@ffe7f34000 { compatible = "snps,dw-apb-gpio"; reg = <0xff 0xe7f34000 0x0 0x1000>; @@ -320,6 +350,16 @@ padctrl0_apsys: pinctrl@ffec007000 { clocks = <&clk CLK_PADCTRL0>; }; + i2c2: i2c@ffec00c000 { + compatible = "thead,th1520-i2c", "snps,designware-i2c"; + reg = <0xff 0xec00c000 0x0 0x4000>; + interrupts = <46 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk CLK_I2C2>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + uart2: serial@ffec010000 { compatible = "snps,dw-apb-uart"; reg = <0xff 0xec010000 0x0 0x4000>; @@ -331,6 +371,16 @@ uart2: serial@ffec010000 { status = "disabled"; }; + i2c3: i2c@ffec014000 { + compatible = "thead,th1520-i2c", "snps,designware-i2c"; + reg = <0xff 0xec014000 0x0 0x4000>; + interrupts = <47 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk CLK_I2C3>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + dmac0: dma-controller@ffefc00000 { compatible = "snps,axi-dma-1.01a"; reg = <0xff 0xefc00000 0x0 0x1000>; @@ -405,6 +455,16 @@ uart5: serial@fff7f0c000 { status = "disabled"; }; + i2c5: i2c@fff7f2c000 { + compatible = "thead,th1520-i2c", "snps,designware-i2c"; + reg = <0xff 0xf7f2c000 0x0 0x4000>; + interrupts = <49 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk CLK_I2C5>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + timer4: timer@ffffc33000 { compatible = "snps,dw-apb-timer"; reg = <0xff 0xffc33000 0x0 0x14>; From patchwork Tue Jun 18 07:42:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bonnefille X-Patchwork-Id: 13701915 X-Patchwork-Delegate: mail@conchuod.ie Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF48BC2BA15 for ; Tue, 18 Jun 2024 07:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gm7R+fLAxlb5hdk5KiS+v2ShlL1U6gn8knNS3/75wOw=; b=aTFJIg3HzmUPUU QFqxv7FDg80U5RGivSmlOQM7o8b9iz0ta/MR0ORc9H/QjVE/X8gfpFZOZrJcFQtDTpcRehlCTvPVd Z68qyYhlHPFSrEo9WD9oFaxDiGisyKuyU2woE+FfPsNaX1kImMnD7cK0chP21quRBWKq2JVCp0ph6 +q7X4IxcGXHhEQUgfk2Y94Hw7kh8BBYkjUFaaVc3NrPT7z7yPr2SM5sCa/KhlBkrTVxeVrNaxcmw5 8o53G/AcG/4pFyqWOqT2sKoyiqkP/WzKvtq43OYxMDAi+SVe9/IR1vFyZCgtiRckPC1uODiKh0tc9 4Jm+wNIESBlQuMgosnDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTUV-0000000DzHX-1oMy; Tue, 18 Jun 2024 07:42:55 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTUP-0000000DzET-2A4k for linux-riscv@lists.infradead.org; Tue, 18 Jun 2024 07:42:50 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2364FC0006; Tue, 18 Jun 2024 07:42:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718696568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uDrhgwuXd70Ld1fOjbKx/CsMOE1aQz4gBxg+9d7X2Fs=; b=cC4g8M+R9T8xiB4utbsDsV9ioGrkhXazt/uGvvcMQmw4m7NojFcB9lR1Jwj7y6jQ4msh7E NyqAM+DHkmqHFp3GI/ZlbAiyiXymwhgjuX+Xv/QVCYj/MRI4gmV96PRgN3OL5sKFnfaGQX ExDB2qQEGjDmJYou1w3mSF9p0wkJzSy8AXu4bqdDF46eeYqLRqiIG2GYL5nD/dG0CGXGQs zibKo7DGPqAdBD5A+lv2iVIg6XTyr57TLc49sx3KUS7bzqXU6bI9Bt5joUHUF9LL9ygYSr QbA1v4J2xhVzdCZQyQUwKCrWuQ9ERUVKkZlgAL0z1suwtB/ueGEL/FCh1l4taA== From: Thomas Bonnefille Date: Tue, 18 Jun 2024 09:42:40 +0200 Subject: [PATCH v3 3/3] riscv: dts: thead: Enable I2C on the BeagleV-Ahead MIME-Version: 1.0 Message-Id: <20240618-i2c-th1520-v3-3-3042590a16b1@bootlin.com> References: <20240618-i2c-th1520-v3-0-3042590a16b1@bootlin.com> In-Reply-To: <20240618-i2c-th1520-v3-0-3042590a16b1@bootlin.com> To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , Guo Ren , Fu Wei , Drew Fustini , Emil Renner Berthing , Conor Dooley , Jarkko Nikula Cc: Palmer Dabbelt , Albert Ou , Paul Walmsley , Thomas Petazzoni , =?utf-8?q?Miqu=C3=A8l_Ray?= =?utf-8?q?nal?= , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Thomas Bonnefille X-Mailer: b4 0.14.0 X-GND-Sasl: thomas.bonnefille@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_004249_870630_89AFF5B5 X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org This commit enables the I2C0 controller of the TH1520, together with the FT24C32A EEPROM that is connected to it. In addition, this commit also enables the I2C controllers I2C2, I2C4 and I2C5 as they are all three exposed on headers (P9 19 and 20 for I2C2, P9 17 and 18 for I2C5 and MikroBus 7 and 5 for I2C4). It also defined the required pinctrl nodes. Signed-off-by: Thomas Bonnefille Reviewed-by: Drew Fustini --- arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts index 57a2578123eb..b5c4f1811955 100644 --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -122,6 +122,19 @@ led-pins { }; &padctrl0_apsys { + i2c2_pins: i2c2-0 { + i2c-pins { + pins = "I2C2_SDA", + "I2C2_SCL"; + function = "i2c"; + bias-pull-up = <48000>; + drive-strength = <7>; + input-enable; + input-schmitt-enable; + slew-rate = <0>; + }; + }; + uart0_pins: uart0-0 { tx-pins { pins = "UART0_TXD"; @@ -145,8 +158,79 @@ rx-pins { }; }; +&padctrl1_apsys { + i2c0_pins: i2c0-0 { + i2c-pins { + pins = "I2C0_SDA", + "I2C0_SCL"; + function = "i2c"; + bias-pull-up = <48000>; + drive-strength = <7>; + input-enable; + input-schmitt-enable; + slew-rate = <0>; + }; + }; + + i2c4_pins: i2c4-0 { + i2c-pins { + pins = "GPIO0_19", /* I2C4_SDA */ + "GPIO0_18"; /* I2C4_SCL */ + function = "i2c"; + bias-pull-up = <48000>; + drive-strength = <7>; + input-enable; + input-schmitt-enable; + slew-rate = <0>; + }; + }; + + i2c5_pins: i2c5-0 { + i2c-pins { + pins = "QSPI1_D0_MOSI", /* I2C5_SDA */ + "QSPI1_CSN0"; /* I2C5_SCL */ + function = "i2c"; + bias-pull-up = <48000>; + drive-strength = <7>; + input-enable; + input-schmitt-enable; + slew-rate = <0>; + }; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins>; status = "okay"; }; + +&i2c0 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; + + eeprom@50 { + compatible = "atmel,24c32"; + reg = <0x50>; + }; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; + status = "okay"; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4_pins>; + status = "okay"; +}; + +&i2c5 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c5_pins>; + status = "okay"; +};