From patchwork Mon Aug 31 12:03:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 11746415 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 479F81575 for ; Mon, 31 Aug 2020 14:28:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FC0020866 for ; Mon, 31 Aug 2020 14:28:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jEq7eUK5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ksTyd2Rh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="WBmXwmcI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FC0020866 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=geanix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=plQG5Tqq68nzqxAt8M1k8N2Su/zbpL+wZDUUmdUm7ek=; b=jEq7eUK5ehZ1XqheWWSPR3M3bQ MDfpnw2eQPFLRvGI0sjmxFdr7++oKsZsOHchRb/abkEdSvWMX9dRdj/OBOnUn36HWb1t8ON70gM56 WU+Y7clC8W6gS6j+HA7mBZU18RHmTlnfyvZeQRHf+N8Pr0DVSw1tfh+EumIrKTMB4aAsVNHWLMGNr 1gyv0Jr5Woh0C8TRTCG1RGr9Ofu9Ti7H6BD57F/jKA0VhwsEqUIQfoHuSZT7chAzdBuuMUVx4MLS5 xcEnQDiG4K54Addr6bSKNoPdp7oLrnkOqxG2wPUjmiVJk3xpBSRlIWSBEf6CzyukoCdJlCL2T94Z5 1cmhYchQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCkmu-0003B6-0X; Mon, 31 Aug 2020 14:28:00 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCjoF-0001Jk-3H for linux-arm-kernel@merlin.infradead.org; Mon, 31 Aug 2020 13:25:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=uhkQEXfcFkuVB3xStAtIsQZbLZD8Ff/LWQyMLfevf0E=; b=ksTyd2RhJzkXnwztkrdW/YMNl6 FAR5d4Qd/EWbcfeT9xyjYWW+o6yxpeflsrU1ggQblm5gxIfNrkRibwZFdc6OF1ADyeNlrMpHDiQOv hS6jXJv9/dkHsIToWp4sobeZ+rkOuC42yamHI298WFpZXtqhJDdJ/kyFSjqbI5k+lL1zEFim9Udvk vICOqXHiUvpJwZOWGS7zjiWMoVlDQkJ8GQes/GEC04+atoUdOamXr7o2o+fnbe47W/P5SbShKMdBC uoYB9+Ttyf/kHJaGmGCZIaXQxIT+flyN9kKLNdab+Il55DjTlLK33QA9o6NvrMngRl4Bv0yeY7j5S dRkSI8yg==; Received: from first.geanix.com ([116.203.34.67]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCiXN-0002jR-K3 for linux-arm-kernel@lists.infradead.org; Mon, 31 Aug 2020 12:03:51 +0000 Received: from localhost (80-62-117-118-mobile.dk.customer.tdc.net [80.62.117.118]) by first.geanix.com (Postfix) with ESMTPSA id 0CC9AF046ED; Mon, 31 Aug 2020 12:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1598875421; bh=LMipcWiPizYsJCMljtwNV1plpCZBepDXQGB/VJenrco=; h=From:To:Cc:Subject:Date; b=WBmXwmcI/k4s4vqoOwjliYb0XaFEQhL+fE3J4l4nPktBrV/a2ZQHhCY/tNQAgow3X kwyWgYfXm1x1fP8lyIaPY+TKcCS81ZiRDk5c3Qjxz9k46+Jedn4B+qsOvFA2obAWl0 iFSxGMTyOB3J3q1qmATqTXrv4mLO/H/VMNdCSx+2iKqWmc/OgitNS1NnzyyN2Qlnxt XcjPAZdz5UGFJTYO1wHpoWog5ITpaxZae5z8wJqH5JbCWGWclbA4XWJwcyItmy7bQx oVvAlu6aaHIfAepe7ElwXvEQgzSVkAZY+Q8J2jg6rpv/nAYRRvvWOAALkWw8jj35kW YjSBh0xpDjyug== From: Esben Haabendal To: linux-arm-kernel@lists.infradead.org, Sekhar Nori , Bartosz Golaszewski Subject: [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master Date: Mon, 31 Aug 2020 14:03:38 +0200 Message-Id: <809cd1811e67c5b93362ecb135ef9e2c7dd4a70a.1598866516.git.esben@geanix.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3.1 required=4.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ff3d05386fc5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200831_130349_762825_F5AA3102 X-CRM114-Status: GOOD ( 12.00 ) X-Spam-Score: -2.1 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The I2C1 master is available at the SOM connector, and as such should be available for applications where SOM module is connected to a board with I2C chips connected to it. Signed-off-by: Esben Haabendal --- arch/arm/mach-davinci/board-mityomapl138.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 3382b93d9a2a..10e40f1abcbc 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -202,6 +202,11 @@ static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = { .bus_delay = 0, /* usec */ }; +static struct davinci_i2c_platform_data mityomap_i2c_1_pdata = { + .bus_freq = 100, /* kHz */ + .bus_delay = 0, /* usec */ +}; + /* TPS65023 voltage regulator support */ /* 1.2V Core */ static struct regulator_consumer_supply tps65023_dcdc1_consumers[] = { @@ -579,6 +584,10 @@ static void __init mityomapl138_init(void) if (ret) pr_warn("i2c0 registration failed: %d\n", ret); + ret = da8xx_register_i2c(1, &mityomap_i2c_1_pdata); + if (ret) + pr_warn("i2c1 registration failed: %d\n", ret); + ret = pmic_tps65023_init(); if (ret) pr_warn("TPS65023 PMIC init failed: %d\n", ret); From patchwork Mon Aug 31 12:03:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 11746413 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 534CA1575 for ; Mon, 31 Aug 2020 14:15:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C5EE20693 for ; Mon, 31 Aug 2020 14:15:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XJw+KIDf"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tibWQ+zR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="DQzxj72D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C5EE20693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=geanix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=00905rpLbnzsxY9hFAnywQdeKRpNX8tz7sxJTcSbbcE=; b=XJw+KIDfcu233HDTLpylVkA4S bkmrLFOQTpN1FwuGnmrE0C86q/V7F9CpqrkiwfvRu7G//Mmm24m1L1mAUvRJrRId/+BWIbL46h6H/ P52tDnPKMEmJsdKTc5ZXBnOSBTSBOGNtgZL3VgjUetI+1XGC80FKutMuf/DGBo3w4F2RhM1JIDw/B XjznB01c0VclvBXvpzr8k16fLJAa/G3HGEC1qMkSxWCOioYIbJf8IbkpwrzkQUYHnWF+En8hP/OdG nOQiVIaCu8/pC30XwZyTipHotsnOoUAEj1fQDMG5b0xt8ab683FLGfLlcIDG8ylpU1kPj4tp9CQKm +k9uW8oaw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCkaj-0001y8-UW; Mon, 31 Aug 2020 14:15:26 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCjoG-0001Jk-8Y for linux-arm-kernel@merlin.infradead.org; Mon, 31 Aug 2020 13:25:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=d0DZaH+r9/AA8DRT779YyrrCiDq2RY+rW03bKM/SPU4=; b=tibWQ+zRchMBROTSIDqkXCiVgi B/idJ8AZG0GjVczQOEijeYkioZNNQFEvNMNIjTLrHSURnCenNCQK5+SlY6NIPrD+VGtj4HqMvojIL GfTSx8oJwe/gZ8IU71LbWaaK3VE6YdoKt7wYPS+uMlcY/x0f+L6egsLVyZ7Yv5d/Kpo5FLzTf+9k7 Kyh3bxlrpqgn1Ph0S86ymjr5AJQ8IZX451v25+c76o5mPWSGhQAE8xhoM6GEvQ+rxa/IcH7+CsRgk yUrlrvw9MpJwkrBZUTX7t5sdkfQ49i9vNx/QeBDQC+UwgWva1CEUMmRL6jHO0IYI8AjjWQuVKkCc4 9djFvsmg==; Received: from first.geanix.com ([116.203.34.67]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCiXM-0002jS-QK for linux-arm-kernel@lists.infradead.org; Mon, 31 Aug 2020 12:03:51 +0000 Received: from localhost (80-62-117-118-mobile.dk.customer.tdc.net [80.62.117.118]) by first.geanix.com (Postfix) with ESMTPSA id BCDE5F04879; Mon, 31 Aug 2020 12:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1598875422; bh=YBMrFrD+i+eGpWtdNBOZllgzGIUWyKkqllbndIlYp6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DQzxj72DHGKQC19gfQIJL7v50RJozcxwd8sFZ3OQl6wS10YqE0n8BNsPEEFxxXC5H BYeRhjgjVLJYtN88RFQb9Gth2+Bv8wTCld4ESzEXE3mhOKPNL+gRKMKDUHEU/kXeuJ 451MwiqXZ5Lq9xjunIPU9Kmq8TORhcW5v6xpb5b70Lue1SQ9WDjwLTLRTXsuPmTvUG P/lcfDNF1ATLfn7+TFZFg64Bpnj53uhcvwqonmFbO4KCHEgXB6QRRK3JA4kG6ljXND 0kHIft7kCXkBd7VZ912ZgG0B/gMxb9PBBbgiP2joMAZhuIcxixqZ8oKq6SdH+ro68z WNIzw5AcfS/qQ== From: Esben Haabendal To: linux-arm-kernel@lists.infradead.org, Sekhar Nori , Bartosz Golaszewski Subject: [PATCH 2/2] ARM: davinci: mityomapl138: Ensure pinmux setup of I2C pins Date: Mon, 31 Aug 2020 14:03:39 +0200 Message-Id: <4f406035e7d67b5abae29fb2c257c95ddca18010.1598866516.git.esben@geanix.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <809cd1811e67c5b93362ecb135ef9e2c7dd4a70a.1598866516.git.esben@geanix.com> References: <809cd1811e67c5b93362ecb135ef9e2c7dd4a70a.1598866516.git.esben@geanix.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3.1 required=4.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ff3d05386fc5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200831_130349_023801_D9DE525F X-CRM114-Status: UNSURE ( 9.23 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Let Linux manage pinmux setup of I2C pins instead of relying on bootloader to do this. This is especially convenient for boards where bootloader update is not feasible. Signed-off-by: Esben Haabendal --- arch/arm/mach-davinci/board-mityomapl138.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 10e40f1abcbc..09cb0443197e 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -580,10 +580,18 @@ static void __init mityomapl138_init(void) nvmem_add_cell_table(&mityomapl138_nvmem_cell_table); nvmem_add_cell_lookups(&mityomapl138_nvmem_cell_lookup, 1); + ret = davinci_cfg_reg_list(da850_i2c0_pins); + if (ret) + pr_warn("i2c0 pinmux setup failed: %d\n", ret); + ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata); if (ret) pr_warn("i2c0 registration failed: %d\n", ret); + ret = davinci_cfg_reg_list(da850_i2c1_pins); + if (ret) + pr_warn("i2c1 pinmux setup failed: %d\n", ret); + ret = da8xx_register_i2c(1, &mityomap_i2c_1_pdata); if (ret) pr_warn("i2c1 registration failed: %d\n", ret);