From: "Théo Lebrun" <theo.lebrun@bootlin.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Andi Shyti <andi.shyti@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Grégory Clement" <gregory.clement@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
"Théo Lebrun" <theo.lebrun@bootlin.com>
Subject: [PATCH v3 0/6] i2c: nomadik: support >=1MHz & Mobileye EyeQ6H platform
Date: Wed, 09 Oct 2024 16:01:06 +0200 [thread overview]
Message-ID: <20241009-mbly-i2c-v3-0-e7fd13bcf1c4@bootlin.com> (raw)
Hi,
Three patches are about adding Mobileye EyeQ6H support to the Nomadik
I2C controller driver, in the same vein as was done a few months ago
for EyeQ5.
- dt-bindings:
- [PATCH 1/6]: add new compatible.
- driver:
- [PATCH 3/6]: we switch from using a match table, before adding the
new EyeQ6H compatible.
- [PATCH 4/6]: adding EyeQ6H is only about creating a new match
table entry thanks to the previous patch; we reuse
the .has_32b_bus flag created for EyeQ5.
Three patches are about supporting higher speeds (fast-plus and
high-speed).
- dt-bindings:
- [PATCH 2/6]: fix them, they indicated only a max of 400kHz.
- driver:
- [PATCH 5/6]: fix computation of the bus rate clock divider (BRCR).
For a bus rate of 400kHz, it would pick >400kHz. Now pick <400kHz.
- [PATCH 6/6]: support high SM (speed-mode) values.
This is not much work.
It works on EyeQ6H HW just fine. 1MHz has been tested but not 3.4MHz
because HW doesn't support it. The theory is there, and BRCR
computation has been checked to be valid with 3.4MHz clocks.
DTS patches targeting EyeQ5 & EyeQ6H devicetrees are not provided
because they depend on the platform's clock series [0].
Have a nice day,
Théo
[0]: https://lore.kernel.org/lkml/20241007-mbly-clk-v5-0-e9d8994269cb@bootlin.com/
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
Changes in v3:
- [PATCH 5/6] "i2c: nomadik: fix BRCR computation":
- Use DIV_ROUND_UP() for BRCR calculation.
- Improve code comment.
- Add small note in commit message about DIV_ROUND_UP() usage.
- For all patches but [PATCH 5/6], apply Reviewed-by: Linus Walleij.
- Link to v2: https://lore.kernel.org/r/20241009-mbly-i2c-v2-0-ac9230a8dac5@bootlin.com
Changes in v2:
- dt-bindings: change `clock-frequency: maximum` from 400kHz to 3.4MHz
in a separate patch.
- dt-bindings: use enum to list compatibles.
- Switch away from of_device_is_compatible() in probe. Use a match table
with flags inside .data, using of_match_device() from probe.
This is done as a separate commit before adding EyeQ6H support.
- Link to v1: https://lore.kernel.org/r/20241008-mbly-i2c-v1-0-a06c1317a2f7@bootlin.com
---
Théo Lebrun (6):
dt-bindings: i2c: nomadik: add mobileye,eyeq6h-i2c bindings
dt-bindings: i2c: nomadik: support 400kHz < clock-frequency <= 3.4MHz
i2c: nomadik: switch from of_device_is_compatible() to of_match_device()
i2c: nomadik: support Mobileye EyeQ6H I2C controller
i2c: nomadik: fix BRCR computation
i2c: nomadik: support >=1MHz speed modes
.../devicetree/bindings/i2c/st,nomadik-i2c.yaml | 13 ++--
drivers/i2c/busses/i2c-nomadik.c | 89 +++++++++++++---------
2 files changed, 61 insertions(+), 41 deletions(-)
---
base-commit: 6f1cfa7816af8b3286140f1b0476200d5e914eb9
change-id: 20241007-mbly-i2c-267c9d482b90
Best regards,
--
Théo Lebrun <theo.lebrun@bootlin.com>
next reply other threads:[~2024-10-09 14:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 14:01 Théo Lebrun [this message]
2024-10-09 14:01 ` [PATCH v3 1/6] dt-bindings: i2c: nomadik: add mobileye,eyeq6h-i2c bindings Théo Lebrun
2024-10-09 21:17 ` Rob Herring (Arm)
2024-10-09 14:01 ` [PATCH v3 2/6] dt-bindings: i2c: nomadik: support 400kHz < clock-frequency <= 3.4MHz Théo Lebrun
2024-10-09 21:17 ` Rob Herring (Arm)
2024-10-09 14:01 ` [PATCH v3 3/6] i2c: nomadik: switch from of_device_is_compatible() to of_match_device() Théo Lebrun
2024-10-09 14:01 ` [PATCH v3 4/6] i2c: nomadik: support Mobileye EyeQ6H I2C controller Théo Lebrun
2024-10-09 14:01 ` [PATCH v3 5/6] i2c: nomadik: fix BRCR computation Théo Lebrun
2024-10-09 15:52 ` Linus Walleij
2024-10-09 14:01 ` [PATCH v3 6/6] i2c: nomadik: support >=1MHz speed modes Théo Lebrun
2024-10-31 16:14 ` [PATCH v3 0/6] i2c: nomadik: support >=1MHz & Mobileye EyeQ6H platform Théo Lebrun
2024-11-18 23:17 ` Andi Shyti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241009-mbly-i2c-v3-0-e7fd13bcf1c4@bootlin.com \
--to=theo.lebrun@bootlin.com \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tawfik.bayouk@mobileye.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.kondratiev@mobileye.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).