From nobody Wed Nov 27 16:43:40 2024 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CCA618EFFB; Wed, 9 Oct 2024 10:23:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728469425; cv=none; b=jAka0EucFB4tWqQJww2Ym0aILcwt9MU+pZawUvRuSBce0JkWripHc85Aga3j87ECZa/WwzVbHBQg+UA/bu58u3+fZ8Dcj9I/S8zBL1eyZTwROXFpOYx57cOHg/REhTWd7y758zan2KgSoiBrthX2EBg6yAR5BzbUCSowJ1h7f8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728469425; c=relaxed/simple; bh=dkTSaolvKShmPE1pq7mHXITqc04AwoI+FTjdp4fPjXg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Bh8sJwvtv1vU/Aih9dyeR6YzLTMyEEqkT78QSgnmeWvl8tI2N+dHX4mjJ4GZTlL4u48GSYdoAmTz4s8JSI85guIEgUFFvZQUuL3RgP6hd9GHaeFNpIDQQgZljznON0rigVqqZT2XhQ9uW7XIb1vs5aC83AFa/us9/tFvaURqK3A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=BHzMpDl6; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="BHzMpDl6" 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=A9gory_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 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=C3=A9o 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-noma= dik.c index c40328d1bca6cdefc61906cf9160f8411e37922a..8f52ae4d6285af2dd2b3dc70706= 72757e831a019 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[] =3D { .compatible =3D "mobileye,eyeq5-i2c", .data =3D (void *)(NMK_I2C_EYEQ_FLAG_32B_BUS | NMK_I2C_EYEQ_FLAG_IS_EYEQ= 5), }, + { + .compatible =3D "mobileye,eyeq6h-i2c", + .data =3D (void *)NMK_I2C_EYEQ_FLAG_32B_BUS, + }, }; =20 static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *i= d) --=20 2.46.2