From nobody Wed Nov 27 14:41:00 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 5570C15382F; Wed, 9 Oct 2024 10:23:36 +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=1728469419; cv=none; b=BoMAYfVLg5NEH/yBMMzLT7I024Up+3MiCuBhjtyb3aLuOIzLwzqrmvjcMyaSCy9tAs9xsoGIIYHwXQGJFqS1dab6GMUz9PUvLBYE5o1k3FK11C4U7oBqHXk2ShWlvSph9zf+ARsGPAjnUpMkigI2qNXWngkTIhvx7yA6z9fGL5c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728469419; c=relaxed/simple; bh=Gt3hGkoAzabIVH8zY4nDCI6BKaAN8fyT7T/ZIpE2M2A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H21x4b5llD+mpYbw9u/GnKXMAwA/mHMaQcf30g3PrQqTd/CcPrLB2YO/HvOEZiDbPtB9BiXB/PmA91QKe8dsJk8LHndASqtEd2AeVPQoK27Gi/D/E5kFCuTju7X2ucUC9Wa0qwU//CrBnFqOQN3Vlml9ZvnKVYZDOvxY74o61XQ= 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=E/xAQ5Ml; 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="E/xAQ5Ml" Received: by mail.gandi.net (Postfix) with ESMTPSA id 9C385C0009; Wed, 9 Oct 2024 10:23:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728469410; 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=9JzFndJasV9hTE/+nDW57u4YoWhXSvTvpEanaE8uI/o=; b=E/xAQ5Ml1/q830mRWRzkPOZj5iMY+fVjN3OyBP7GZ4d6bao52g6idAuLIkYHbGFYpORGg0 KybJI/ImVnVtaYG+qGKw4dpPpggcOkZ6AR+DwUShaQt1yD+H9e9qW+nPmpbhhvFyvJlq75 xOUbgzePw/vQbCkPwgjWPAMk+VZTCJEsTBrXriO1p9eE6qMgfgYePZ9TnYo3miHoghT6bc eGEsbgMRl+A0rbb1SAba95bHkYWYoOEPFCdj8kZYXQnP1rwQ/AGatxW7aHYtrLQqj6w6ve TpBBDsSTc0iGVz8V7OsZZgwaeIGqD8X2YoFxkftI1sGyWfLGIEqqTZE2YcEsng== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 09 Oct 2024 12:23:27 +0200 Subject: [PATCH v2 1/6] dt-bindings: i2c: nomadik: add mobileye,eyeq6h-i2c bindings 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-1-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 After EyeQ5, it is time for Mobileye EyeQ6H to reuse the Nomadik I2C controller. Add a specific compatible because its HW integration is slightly different from EyeQ5. Do NOT add an example as it looks like EyeQ5 from a DT standpoint (without the mobileye,olb property). Signed-off-by: Th=C3=A9o Lebrun Reviewed-by: Linus Walleij --- Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml b/Do= cumentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml index 44c54b162bb10741ec7aac70d165403c28176eba..7e84465c20094b799697a71a66c= 66d144d621f46 100644 --- a/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml @@ -22,6 +22,7 @@ select: enum: - st,nomadik-i2c - mobileye,eyeq5-i2c + - mobileye,eyeq6h-i2c required: - compatible =20 @@ -29,15 +30,15 @@ properties: compatible: oneOf: - items: - - const: st,nomadik-i2c + - enum: + - st,nomadik-i2c + - mobileye,eyeq5-i2c + - mobileye,eyeq6h-i2c - const: arm,primecell - items: - const: stericsson,db8500-i2c - const: st,nomadik-i2c - const: arm,primecell - - items: - - const: mobileye,eyeq5-i2c - - const: arm,primecell =20 reg: maxItems: 1 @@ -54,7 +55,7 @@ properties: - items: - const: mclk - const: apb_pclk - # Clock name in DB8500 or EyeQ5 + # Clock name in DB8500 or EyeQ - items: - const: i2cclk - const: apb_pclk --=20 2.46.2 From nobody Wed Nov 27 14:41:00 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 2669818E76E; Wed, 9 Oct 2024 10:23:38 +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=1728469421; cv=none; b=KToHsWT1hOPCg2twzUU9xRJo0i81WWa+orWfZm9ZC+oEWZHGlUiz3IbGg6YmuTVIIKQSGpqjrm9Fsy3cgU8V6Jju6a76BZB7fFSLZAbwQ5OZvCAyr2D2buFWlG3jcEwgIVoJ8DfmPSvh3E+PfpJKl67uuDrG+qGx9d9lR15wDEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728469421; c=relaxed/simple; bh=BsPvupA8qNH3O5GjZQoZ0xKLNEBQPI09j/+PzdRqiWU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GY1x1LUYXMEXlzCNd+iFlan3JMBYxehjm2W6uiRP3xxm6l8lwABseOC4THPyvH17Bvv25cZPBivB+mN0KlMv6tCqlNrPmPT0wiigZ4FKSNtH9GnfXZ/FTBaj/cUjR1Enfdi2jOyI0R/NDSSPLYHM55i/gBnTBMzD2WVWEe1YFPE= 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=QJdb+oUp; 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="QJdb+oUp" Received: by mail.gandi.net (Postfix) with ESMTPSA id 43984C000B; Wed, 9 Oct 2024 10:23:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728469410; 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=ykpyCvhbG4GX53O/kYa1itG9c8NJMGXkUeCkiHCbXvk=; b=QJdb+oUpgnOdxhkgszUGcd9LFYP1TkF00gHZb93gY0DTgQ5CJZsDkoefRa7k3RA5O/93zT kqyJjtCuvSUx1/+GGq5j4Mkc4KwTdVbh6uFfR9kbUHNUFn97q4e6CJ0CiXRA1/hwcSJasy 0XjStrs0cZh7LGX3tq8pkBKIrOe/XOdV1i/l8XswnMG4dZ0QZb9vljtivLLZP6+m0yFjrw jpG7TigaqMSVw+cc7vu7zlLrGHGFGvSg7Z888t2eL/uK/g347czAcqcraKau41niJCduWw x0OWpOClaYIRV8kJ2DEcSyUjE1uRkHUoLQFS5BzdRs2a92OKfNfGlQE0W5Zitg== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 09 Oct 2024 12:23:28 +0200 Subject: [PATCH v2 2/6] dt-bindings: i2c: nomadik: support 400kHz < clock-frequency <= 3.4MHz 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-2-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 Hardware is not limited to 400kHz, its documentation does mention how to configure it for high-speed (a specific Speed-Mode enum value and a different bus rate clock divider register to be used). Signed-off-by: Th=C3=A9o Lebrun Reviewed-by: Linus Walleij --- Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml b/Do= cumentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml index 7e84465c20094b799697a71a66c66d144d621f46..012402debfeb244b85dcecdc041= 1a77ada4494df 100644 --- a/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml @@ -68,7 +68,7 @@ properties: =20 clock-frequency: minimum: 1 - maximum: 400000 + maximum: 3400000 =20 mobileye,olb: $ref: /schemas/types.yaml#/definitions/phandle-array --=20 2.46.2 From nobody Wed Nov 27 14:41:00 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 2664918E764; Wed, 9 Oct 2024 10:23:38 +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=lNf8kXyZvfu3J4EzxmaxwTVCfX94ZeuCr5lxjHYHseHTtAhTb8sWO0+th+zenRwKP4MUHOuVtSjDhIcIQeaFMm+KRsHsGKh4NgbqPU1d/S/ELHMDPNyMU5WQjW8Lgcg1EhbGTQbp15KwTimXsp0Ogy/i5+4hRaTF3cMiW5tdXzQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728469425; c=relaxed/simple; bh=QMCIUPpXqgRCwrZH7410pZ8JrhRNP9EubqVL/sVI/CI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Iy+Q9IrjO6l1GzI/KO2Don4dyQ/oXl55ZX+6GtNEDDMzpaBO1RkvRf8haSwvTIPfcPwTrKTCK0FF5N2Yf/8hvYeEFuGtqkzich6APYgnJT83L2nyJemClFGyIWsKwJhNt1OYMWW4f8cyn1f/7X06hdXKkzFBksRUFGdB/YnIF98= 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=CPK8keeX; 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="CPK8keeX" Received: by mail.gandi.net (Postfix) with ESMTPSA id E3964C0002; Wed, 9 Oct 2024 10:23:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728469411; 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=0RkPb/ZmhIYMKGdFcEhqFg5pBv1BW4T9WKx57Ml1gvk=; b=CPK8keeXpLYeRc5B4XVCc9+5LgzrWTEVrhI0PvfIa/eFGmxVo4iKx89i9vd6RXM5x8xL6M tgwYN+SH9n7NCVl+0NI3tcOnQ4gO2ZOLp/jf7yiNaPFgrbIMvJ9CjRe9D29F9smL59d4Rd mIMbJG0XZmRGJH1Nc4AyOKD9NrTvYBp4/fFmj+9vFd0wqCIUN023lDdT+HjC5Fkfq78M9a Ex1K6FrwMEWxSiTGZzeVWXbSAJo2IHrpxvaDdS0tTA+Fv4Ho/OPT6o3ZBCWPunbiFUVJnW rRVbu4l48DOSU3ou2k5qjLpNZVfo810k/EcT0Ay6utwfAbWvN8dAe3yUPPo7yA== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 09 Oct 2024 12:23:29 +0200 Subject: [PATCH v2 3/6] i2c: nomadik: switch from of_device_is_compatible() to of_match_device() 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-3-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 Compatible-specific behavior is implemented using a if-condition on the return value from of_device_is_compatible(), from probe. It does not scale well when compatible number increases. Switch to using a match table and a call to of_match_device(). We DO NOT attach a .of_match_table field to our amba driver, as we do not use the table to match our driver to devices. Sort probe variable declarations in reverse christmas tree to try and introduce some logic into the ordering. Signed-off-by: Th=C3=A9o Lebrun Reviewed-by: Linus Walleij --- drivers/i2c/busses/i2c-nomadik.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-noma= dik.c index ad0f02acdb1215a1c04729f97bb14a4d93f88456..c40328d1bca6cdefc61906cf916= 0f8411e37922a 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -1046,8 +1047,6 @@ static int nmk_i2c_eyeq5_probe(struct nmk_i2c_dev *pr= iv) struct regmap *olb; unsigned int id; =20 - priv->has_32b_bus =3D true; - olb =3D syscon_regmap_lookup_by_phandle_args(np, "mobileye,olb", 1, &id); if (IS_ERR(olb)) return PTR_ERR(olb); @@ -1068,15 +1067,35 @@ static int nmk_i2c_eyeq5_probe(struct nmk_i2c_dev *= priv) return 0; } =20 +#define NMK_I2C_EYEQ_FLAG_32B_BUS BIT(0) +#define NMK_I2C_EYEQ_FLAG_IS_EYEQ5 BIT(1) + +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), + }, +}; + static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *i= d) { - int ret =3D 0; - struct nmk_i2c_dev *priv; - struct device_node *np =3D adev->dev.of_node; - struct device *dev =3D &adev->dev; - struct i2c_adapter *adap; struct i2c_vendor_data *vendor =3D id->data; u32 max_fifo_threshold =3D (vendor->fifodepth / 2) - 1; + struct device_node *np =3D adev->dev.of_node; + const struct of_device_id *match; + struct device *dev =3D &adev->dev; + unsigned long match_flags =3D 0; + struct nmk_i2c_dev *priv; + struct i2c_adapter *adap; + int ret =3D 0; + + /* + * We do not want to attach a .of_match_table to our amba driver. + * Do not convert to device_get_match_data(). + */ + match =3D of_match_device(nmk_i2c_eyeq_match_table, dev); + if (match) + match_flags =3D (unsigned long)match->data; =20 priv =3D devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -1084,10 +1103,10 @@ static int nmk_i2c_probe(struct amba_device *adev, = const struct amba_id *id) =20 priv->vendor =3D vendor; priv->adev =3D adev; - priv->has_32b_bus =3D false; + priv->has_32b_bus =3D match_flags & NMK_I2C_EYEQ_FLAG_32B_BUS; nmk_i2c_of_probe(np, priv); =20 - if (of_device_is_compatible(np, "mobileye,eyeq5-i2c")) { + if (match_flags & NMK_I2C_EYEQ_FLAG_IS_EYEQ5) { ret =3D nmk_i2c_eyeq5_probe(priv); if (ret) return dev_err_probe(dev, ret, "failed OLB lookup\n"); --=20 2.46.2 From nobody Wed Nov 27 14:41:00 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 From nobody Wed Nov 27 14:41:00 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 5CC5118EFF9; 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=1728469421; cv=none; b=pr/GCn12qFCSH8YIpaxgOLGSJIMStsmzRKQDj7lSPEk2KnDpNZuD9Wo6aLC7MjkDl9j7ecGpiP2bq1uNCga3gLDvJgM+E9ENhDEBkk7NrLfOi/Evier/fSwIUGEHIm1YMdBtDuBV6W251BMSsSJ8xFxQbrJH4b0LS9SzIhtEcfw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728469421; c=relaxed/simple; bh=tQRb8t9Bgm9pTxnllpvl7n/2CRPhE+WTxJ55NgaJtb4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ALACF8JMIkz6SRjtL74BvlKdkhEwceqpyFchyYkYMt5HSxHfQ1w8hIcsh8fU3hV1H1RzmH375zMDCyXFlVKkatVvIWqS4nxdc8BBjaAsgCp7Yl7hFrEF7sUzmKrXXiY0IaH09XByyijqEX10w0VprNaF7b0z6X2TM3vOec03G+U= 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=T9vRPdRi; 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="T9vRPdRi" Received: by mail.gandi.net (Postfix) with ESMTPSA id 2D749C000D; Wed, 9 Oct 2024 10:23:32 +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=BV6jtGBlKFIHxumMjV1kYyi9dXX5jMmSnqUBcSCcyT4=; b=T9vRPdRiFoyAgmJHbkPIWpP17ik6oZp5Jh8CbHNa3CLZxmANyGkn44dth9algKv03fh1XK kvgTofQ+xvG1Ll9LZloX/bNUCxKbgVEyQf/SRFfB8iaqne9ol8Bt7ARp2BY3WkQwNCD6Co 2b3GL0sotik4uGPv+9U68OsbViQKJX6f7deTnN33to/aB1wx5MKLkg+fFDsV3agUBdvyPr tPmIuuJDQWGicMLrXPsoavsQOjg/Hm2IaKJMJHPMsRZwKoe4ZTg/45eHRQDtp2o/UwDN0w 52XVKgSlnDVjXzukdvSPd1nGbuQZcRgdygvevvqD1hsvVY3970inXYJJ+qwHMQ== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 09 Oct 2024 12:23:31 +0200 Subject: [PATCH v2 5/6] i2c: nomadik: fix BRCR computation 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-5-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 Current BRCR computation is: brcr =3D floor(i2cclk / (clkfreq * div)) With brcr: "baud rate counter", an internal clock divider, and i2cclk: input clock rate (24MHz, 38.4MHz or 48MHz), and clkfreq: desired bus rate, and div: speed-mode dependent divider (2 for standard, 3 otherwise). Assume i2cclk=3D48MHz, clkfreq=3D3.4MHz, div=3D3, then brcr =3D floor(48MHz / (3.4MHz * 3)) =3D 4 and resulting bus rate =3D 48MHz / (4 * 3) =3D 4MHz Assume i2cclk=3D38.4MHz, clkfreq=3D1.0MHz, div=3D3, then brcr =3D floor(38.4MHz / (1.0MHz * 3)) =3D 12 and resulting bus rate =3D 38.4MHz / (12 * 3) =3D 1066kHz The current computation means we always pick the smallest divider that gives a bus rate above target. We should instead pick the largest divider that gives a bus rate below target, using: brcr =3D floor(i2cclk / (clkfreq * div)) + 1 If we redo the above examples: Assume i2cclk=3D48MHz, clkfreq=3D3.4MHz, div=3D3, then brcr =3D floor(48MHz / (3.4MHz * 3)) + 1 =3D 5 and resulting bus rate =3D 48MHz / (5 * 3) =3D 3.2MHz Assume i2cclk=3D38.4MHz, clkfreq=3D1.0MHz, div=3D3, then brcr =3D floor(38.4MHz / (1.0MHz * 3)) + 1 =3D 13 and resulting bus rate =3D 38.4MHz / (13 * 3) =3D 985kHz This is much less of an issue with slower bus rates (ie those currently supported), because the gap from one divider to the next is much smaller. It however keeps us from always using bus rates superior to the target. This fix is required for later on supporting faster bus rates: I2C_FREQ_MODE_FAST_PLUS (1MHz) and I2C_FREQ_MODE_HIGH_SPEED (3.4MHz). Signed-off-by: Th=C3=A9o Lebrun --- drivers/i2c/busses/i2c-nomadik.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-noma= dik.c index 8f52ae4d6285af2dd2b3dc7070672757e831a019..b2b9da0b32ed903c080f4bdc427= ea0dd7b031b49 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -454,9 +454,12 @@ static void setup_i2c_controller(struct nmk_i2c_dev *p= riv) * operation, and the other is for std, fast mode, fast mode * plus operation. Currently we do not supprt high speed mode * so set brcr1 to 0. + * + * BRCR is a clock divider amount. Pick highest value that + * leads to rate strictly below target. */ brcr1 =3D FIELD_PREP(I2C_BRCR_BRCNT1, 0); - brcr2 =3D FIELD_PREP(I2C_BRCR_BRCNT2, i2c_clk / (priv->clk_freq * div)); + brcr2 =3D FIELD_PREP(I2C_BRCR_BRCNT2, i2c_clk / (priv->clk_freq * div) + = 1); =20 /* set the baud rate counter register */ writel((brcr1 | brcr2), priv->virtbase + I2C_BRCR); --=20 2.46.2 From nobody Wed Nov 27 14:41:00 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 30CB118FDDC; 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=1728469422; cv=none; b=UwQk3CfLZf5y547CsECHn7HR4PctkJBOqGm6sfu4D8Nh46ibVfLIFP/1xwYyyG8ILf4aawOxnJzHB+UzqK/mTJluxFZdPivA8/URGXS9ufckBwzKHJ6kVRYgLk6ceMaEABKFO7B4/rHdWOaIfAekjED7AMVeg3abexslWsa9m3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728469422; c=relaxed/simple; bh=Olp5EwdvvkcdWx4Um1FowhF/GtYV24TawE4qMAcHWmY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tbb6sPz6Yc0pXqL6JW9N4c6nHUjVxiRZYmxs2rXtdPafX3XuyTQ36WrWGlbneF/N7Eg4DeZqSDibzKMS8N5HJe/v0GlqRBGy1QfS9y93+MjCMDAso3lBGU9t8LW0qrz2/0hT1rc0fgDFktDRGxwBXJHI9cLPdPEnW2U1RSk6yxY= 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=og5cD5ou; 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="og5cD5ou" Received: by mail.gandi.net (Postfix) with ESMTPSA id C1A3EC0005; Wed, 9 Oct 2024 10:23:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728469413; 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=iESo5G7yB8Huxqo8RT5l/9twIQ+BPxWkXsgQj+Afnmg=; b=og5cD5ouK7G/7e2Jcykmwe5oCh1x150S4iqYjEyXVZ+xFiGWfdjy8qAalE5708/HWta/as 9CjAaZ2MuI+A2sEfaJgT9x98Dwocb5KwtmFGN2gmus1k5Bz8LK/R5s9NRRaSqe4On4ZT8k WdWfzZbCg5xIjxI76rY7is/E7LIXki/YO5r47NYRTD/rC4i7q3tDq/QEnrfKIl0g8+yGE3 nnanSRuNYARm4rZRCtSCF2y7UazhPyZpsaG28mlUwbWckcGXPxQb3VTE/jOqI0fmXsKeIH X/f1qiPpzhkAuMywOaF6x7b9JjPYE6fXTXEZjwdFlXJy+rzAgyneg/p/6/rFPA== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 09 Oct 2024 12:23:32 +0200 Subject: [PATCH v2 6/6] i2c: nomadik: support >=1MHz speed modes 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-6-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 - BRCR value must go into the BRCR1 field when in high-speed mode. It goes into BRCR2 otherwise. - Remove fallback to standard mode if priv->sm > I2C_FREQ_MODE_FAST. - Set SM properly in probe; previously it only checked STANDARD versus FAST. Now we set STANDARD, FAST, FAST_PLUS or HIGH_SPEED. - Remove all comment sections saying we only support low-speeds. Signed-off-by: Th=C3=A9o Lebrun Reviewed-by: Linus Walleij --- drivers/i2c/busses/i2c-nomadik.c | 40 ++++++++++++++++--------------------= ---- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-noma= dik.c index b2b9da0b32ed903c080f4bdc427ea0dd7b031b49..0c1ea6c6d75e16b0336debe9282= 9f33c512aaea0 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -397,7 +397,7 @@ static u32 load_i2c_mcr_reg(struct nmk_i2c_dev *priv, u= 16 flags) */ static void setup_i2c_controller(struct nmk_i2c_dev *priv) { - u32 brcr1, brcr2; + u32 brcr; u32 i2c_clk, div; u32 ns; u16 slsu; @@ -444,7 +444,7 @@ static void setup_i2c_controller(struct nmk_i2c_dev *pr= iv) /* * The spec says, in case of std. mode the divider is * 2 whereas it is 3 for fast and fastplus mode of - * operation. TODO - high speed support. + * operation. */ div =3D (priv->clk_freq > I2C_MAX_STANDARD_MODE_FREQ) ? 3 : 2; =20 @@ -452,33 +452,22 @@ static void setup_i2c_controller(struct nmk_i2c_dev *= priv) * generate the mask for baud rate counters. The controller * has two baud rate counters. One is used for High speed * operation, and the other is for std, fast mode, fast mode - * plus operation. Currently we do not supprt high speed mode - * so set brcr1 to 0. + * plus operation. * * BRCR is a clock divider amount. Pick highest value that * leads to rate strictly below target. */ - brcr1 =3D FIELD_PREP(I2C_BRCR_BRCNT1, 0); - brcr2 =3D FIELD_PREP(I2C_BRCR_BRCNT2, i2c_clk / (priv->clk_freq * div) + = 1); + brcr =3D i2c_clk / (priv->clk_freq * div) + 1; + + if (priv->sm =3D=3D I2C_FREQ_MODE_HIGH_SPEED) + brcr =3D FIELD_PREP(I2C_BRCR_BRCNT1, brcr); + else + brcr =3D FIELD_PREP(I2C_BRCR_BRCNT2, brcr); =20 /* set the baud rate counter register */ - writel((brcr1 | brcr2), priv->virtbase + I2C_BRCR); + writel(brcr, priv->virtbase + I2C_BRCR); =20 - /* - * set the speed mode. Currently we support - * only standard and fast mode of operation - * TODO - support for fast mode plus (up to 1Mb/s) - * and high speed (up to 3.4 Mb/s) - */ - if (priv->sm > I2C_FREQ_MODE_FAST) { - dev_err(&priv->adev->dev, - "do not support this mode defaulting to std. mode\n"); - brcr2 =3D FIELD_PREP(I2C_BRCR_BRCNT2, - i2c_clk / (I2C_MAX_STANDARD_MODE_FREQ * 2)); - writel((brcr1 | brcr2), priv->virtbase + I2C_BRCR); - writel(FIELD_PREP(I2C_CR_SM, I2C_FREQ_MODE_STANDARD), - priv->virtbase + I2C_CR); - } + /* set the speed mode */ writel(FIELD_PREP(I2C_CR_SM, priv->sm), priv->virtbase + I2C_CR); =20 /* set the Tx and Rx FIFO threshold */ @@ -1019,11 +1008,14 @@ static void nmk_i2c_of_probe(struct device_node *np, if (of_property_read_u32(np, "clock-frequency", &priv->clk_freq)) priv->clk_freq =3D I2C_MAX_STANDARD_MODE_FREQ; =20 - /* This driver only supports 'standard' and 'fast' modes of operation. */ if (priv->clk_freq <=3D I2C_MAX_STANDARD_MODE_FREQ) priv->sm =3D I2C_FREQ_MODE_STANDARD; - else + else if (priv->clk_freq <=3D I2C_MAX_FAST_MODE_FREQ) priv->sm =3D I2C_FREQ_MODE_FAST; + else if (priv->clk_freq <=3D I2C_MAX_FAST_MODE_PLUS_FREQ) + priv->sm =3D I2C_FREQ_MODE_FAST_PLUS; + else + priv->sm =3D I2C_FREQ_MODE_HIGH_SPEED; priv->tft =3D 1; /* Tx FIFO threshold */ priv->rft =3D 8; /* Rx FIFO threshold */ =20 --=20 2.46.2