From patchwork Wed Oct 9 10:23:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 13828139 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 72B43CF044A for ; Wed, 9 Oct 2024 10:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=MEnoUjAe0Fmg2cvSQx8nvgrabVcBeuNsNvfPdJB+sc0=; b=XzaxyfaQ2lltKbQMy7TWY80Fai hkB+QjMbCbI+0wQRgYNAV3y0351c9+gdwVGRB27sLFRRoCoV7n4gF9EwYEuXn5yCDCNPSdI+K95WM wnCmCT/KDRS7ybEJ4m4y/WCqE02L5wDATRdsm+P+YyG6HjNPLslIEqnUqbjfmE+GVw0wGP7+3TGsp ITtjqxTMDmA9lK6vJCFgb+7DGCbL2lSQvR/ThqaRntQs9qOs8InbeabxpyaeNyX6f8hVGAYu5iFml NvloL0l8ZpJ1Xu9WVkBgVQJvBz1E5pVyd0T5QV/C7GSnMSParrY+IEQyjPjGTyPppj/itXS5uzph4 OkYsEllA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syTyz-00000008tQt-1nCO; Wed, 09 Oct 2024 10:31:53 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syTqv-00000008ric-2Y3p for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 10:23:35 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 8753DC0006; Wed, 9 Oct 2024 10:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728469412; 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=MEnoUjAe0Fmg2cvSQx8nvgrabVcBeuNsNvfPdJB+sc0=; b=BHzMpDl6D19l57ssAOfyE8oP5ucN0qm5K2BXloajfsl1aIuLU25uTEwm1XdaVG6PX6rj2K by6xBW09IZmYJJRqTQCv9Mn7ogvFHhB1Yp3q7PvqhAOgfXAP6Wy/6V38D4vGSZpo1osgvQ mcJ2NPfgzMcW1GKWENMY/XQP7qjvpNvxEDunp/jz6WJdhZ6r4bvyFzlJtrcXuu5BFq3/Zc V3Eeafpfp+Svt4FGCawzMYcb9RpZusKZTn34c3ynE01oY8Cnwil1VolRbZQ+wNb76xy0t5 SeFVSXG1l8FbBXoe1mfNxGXC7IpQfMh9K8Pz17gNU/BB4elxm5d7dzyeuY2cgQ== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 09 Oct 2024 12:23:30 +0200 Subject: [PATCH v2 4/6] i2c: nomadik: support Mobileye EyeQ6H I2C controller MIME-Version: 1.0 Message-Id: <20241009-mbly-i2c-v2-4-ac9230a8dac5@bootlin.com> References: <20241009-mbly-i2c-v2-0-ac9230a8dac5@bootlin.com> In-Reply-To: <20241009-mbly-i2c-v2-0-ac9230a8dac5@bootlin.com> To: Linus Walleij , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , =?utf-8?q?Gr=C3=A9?= =?utf-8?q?gory_Clement?= , Thomas Petazzoni , Tawfik Bayouk , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.14.2 X-GND-Sasl: theo.lebrun@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_032333_841567_8258AB51 X-CRM114-Status: GOOD ( 13.67 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add EyeQ6H support to the nmk-i2c AMBA driver. It shares the same quirk as EyeQ5: the memory bus only supports 32-bit accesses. Avoid writeb() and readb() by reusing the same `priv->has_32b_bus` flag. It does NOT need to write speed-mode specific value into a register; therefore it does not depend on the mobileye,olb DT property. Signed-off-by: Théo Lebrun Reviewed-by: Linus Walleij --- drivers/i2c/busses/i2c-nomadik.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index c40328d1bca6cdefc61906cf9160f8411e37922a..8f52ae4d6285af2dd2b3dc7070672757e831a019 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -6,10 +6,10 @@ * I2C master mode controller driver, used in Nomadik 8815 * and Ux500 platforms. * - * The Mobileye EyeQ5 platform is also supported; it uses + * The Mobileye EyeQ5 and EyeQ6H platforms are also supported; they use * the same Ux500/DB8500 IP block with two quirks: * - The memory bus only supports 32-bit accesses. - * - A register must be configured for the I2C speed mode; + * - (only EyeQ5) A register must be configured for the I2C speed mode; * it is located in a shared register region called OLB. * * Author: Srinidhi Kasagar @@ -1075,6 +1075,10 @@ static const struct of_device_id nmk_i2c_eyeq_match_table[] = { .compatible = "mobileye,eyeq5-i2c", .data = (void *)(NMK_I2C_EYEQ_FLAG_32B_BUS | NMK_I2C_EYEQ_FLAG_IS_EYEQ5), }, + { + .compatible = "mobileye,eyeq6h-i2c", + .data = (void *)NMK_I2C_EYEQ_FLAG_32B_BUS, + }, }; static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)