From nobody Wed Nov 27 17:53:49 2024 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 16CBB19995E; Wed, 9 Oct 2024 14:01:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728482474; cv=none; b=l2WLqzepj2EcmKi9rPeXdTSDzHkrb52IcBOXHXjuNJwRAJ9om2/6wffjQ+tHF0/XGM3rPRSJicBkHcIZp26qk/VwgAqWbuhpGwPlB+DnSonRumnZ4S5PimMq31Lg6btVd7+YSiguFzpoBJpTL4+2DzW8BAjfYLNdj4EeHkjItd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728482474; c=relaxed/simple; bh=yfaVgBPbGJvvDLZMPnLTI2HWdOa8D9pnhvAtR5Ux59U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TeTbipAUl3Z8oJbPS1T6V8svv9ngR01Ove9eqkTewAbbL++rAwk8tTh+jcBlI4qVClAJXhV6XCOd2BQcPdEHubh64bP5xvp3JWF6kHDaUcM96nzqK5oVlVzX5Mx8qXld+UVAebcG/DPUCRxbKc+ZuVIf1/89yyFnqZ3vHHehfkw= 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=a8NfnaQs; arc=none smtp.client-ip=217.70.183.201 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="a8NfnaQs" Received: by mail.gandi.net (Postfix) with ESMTPSA id CF36E1BF20E; Wed, 9 Oct 2024 14:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728482470; 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=2PT2bSMDA58VSAM1Q9Akc5IbSMb7rRJeyxTRzP7FAJ8=; b=a8NfnaQsS+Jzoxbcv4gY17SL9n5+x7zfsvdNPXdI7XrpvaBaq17tS1D6Z7tQoR/AR3v0Xj McNGKxxGqo4HO/Vjt8+zswwAcVGpbaI4e2eZ9PAPFAm+I1BsI0IYPTa8wiOFdAUehrpkWG tP4RVgDdkcNc8JVRhjQ+opJMDk4r7ll1C3M+SAXbkYG7e1JYjvDAUfBcTbWeV74X+EzEO6 /9dSzBoyWKzZA6kVEvkhloI2twwTjeI6xlvE4YoyvbCj4vlibBKTP4OoBYzCKBKy9+BRhe tRMugjaYSLFUnM6eRhszVB2Kgd/0LVehoLnntwuy8z5ulKblxUnF1FJ92OB5zA== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 09 Oct 2024 16:01:10 +0200 Subject: [PATCH v3 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-v3-4-e7fd13bcf1c4@bootlin.com> References: <20241009-mbly-i2c-v3-0-e7fd13bcf1c4@bootlin.com> In-Reply-To: <20241009-mbly-i2c-v3-0-e7fd13bcf1c4@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. Reviewed-by: Linus Walleij Signed-off-by: Th=C3=A9o Lebrun --- 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