* [PATCH v2 0/3] i2c: add Ambarella IDC master for CV75
@ 2026-12-03 4:35 Long Zhao via B4 Relay
2026-12-03 4:35 ` [PATCH v2 1/3] dt-bindings: i2c: add Ambarella IDC controller Long Zhao via B4 Relay
0 siblings, 1 reply; 3+ messages in thread
From: Long Zhao via B4 Relay @ 2026-12-03 4:35 UTC (permalink / raw)
To: Andi Shyti, linux-i2c
Cc: Long Zhao, linux-kernel, Long Zhao, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
Add the Ambarella I2C master binding and driver used on the CV75.
The driver supports standard, fast and fast-plus modes, 7-bit and
10-bit addressing, and repeated start.
Please take this series through the I2C tree. The CV75 SoC and DT
are already in linux-next; this series is the I2C binding and
driver only.
Tested on the CV75 EVK via the local cv75-mix branch with
CONFIG_I2C_AMBARELLA=y: controllers probe and bus transfers work.
Changes in v2:
- binding: drop ambarella,cv75-rct.h from the example and use
clocks = <&rct 3>. (Krzysztof)
- binding: list clocks before interrupts in properties, required,
and the example. (Sashiko)
- Link to v1: https://lore.kernel.org/r/20261201-cv75-i2c-v1-0-729176f61836@ambarella.com
To: Andi Shyti <andi.shyti@kernel.org>
To: linux-i2c@vger.kernel.org
Cc: Long Zhao <zl020895@163.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Long Zhao <longzhao@ambarella.com>
---
Long Zhao (3):
dt-bindings: i2c: add Ambarella IDC controller
i2c: ambarella: add IDC master for CV75
MAINTAINERS: add Ambarella I2C controller
.../bindings/i2c/ambarella,cv75-i2c.yaml | 62 +++
MAINTAINERS | 7 +
drivers/i2c/busses/Kconfig | 11 +
drivers/i2c/busses/Makefile | 1 +
drivers/i2c/busses/i2c-ambarella.c | 469 +++++++++++++++++++++
5 files changed, 550 insertions(+)
---
base-commit: 34cf6dafc47441dfb6b356a095b89c3585a93714
change-id: 20261124-cv75-i2c-a1b2c3d4e5f6
Best regards,
--
Long Zhao <longzhao@ambarella.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH v2 1/3] dt-bindings: i2c: add Ambarella IDC controller
2026-12-03 4:35 [PATCH v2 0/3] i2c: add Ambarella IDC master for CV75 Long Zhao via B4 Relay
@ 2026-12-03 4:35 ` Long Zhao via B4 Relay
2026-12-03 4:46 ` sashiko-bot
0 siblings, 1 reply; 3+ messages in thread
From: Long Zhao via B4 Relay @ 2026-12-03 4:35 UTC (permalink / raw)
To: Andi Shyti, linux-i2c
Cc: Long Zhao, linux-kernel, Long Zhao, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
From: Long Zhao <longzhao@ambarella.com>
Document the Ambarella I2C master used on CV75. The compatible
is ambarella,cv75-i2c. clock-frequency is optional and accepts any
value from 1 kHz to 1 MHz (default 100 kHz).
Signed-off-by: Long Zhao <longzhao@ambarella.com>
---
Cc: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: devicetree@vger.kernel.org
---
.../bindings/i2c/ambarella,cv75-i2c.yaml | 62 ++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/Documentation/devicetree/bindings/i2c/ambarella,cv75-i2c.yaml b/Documentation/devicetree/bindings/i2c/ambarella,cv75-i2c.yaml
new file mode 100644
index 000000000000..d65befcf8ae3
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/ambarella,cv75-i2c.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/ambarella,cv75-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ambarella I2C controller
+
+maintainers:
+ - Long Zhao <longzhao@ambarella.com>
+
+description:
+ Ambarella I2C master controller on media SoCs such as the CV75.
+ It supports standard, fast and fast-plus modes up to 1 MHz,
+ 7-bit and 10-bit addressing, and repeated start.
+ The controller input clock is the SoC APB clock (gclk_apb from the
+ RCT clock controller on CV75).
+
+allOf:
+ - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+ compatible:
+ enum:
+ - ambarella,cv75-i2c
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+ description:
+ SoC APB clock that drives the controller (CV75 gclk_apb).
+
+ interrupts:
+ maxItems: 1
+
+ clock-frequency:
+ description: Desired I2C bus clock frequency in Hz.
+ minimum: 1000
+ maximum: 1000000
+ default: 100000
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ i2c@e4008000 {
+ compatible = "ambarella,cv75-i2c";
+ reg = <0xe4008000 0x1000>;
+ clocks = <&rct 3>;
+ interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
+ clock-frequency = <100000>;
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2 1/3] dt-bindings: i2c: add Ambarella IDC controller
2026-12-03 4:35 ` [PATCH v2 1/3] dt-bindings: i2c: add Ambarella IDC controller Long Zhao via B4 Relay
@ 2026-12-03 4:46 ` sashiko-bot
0 siblings, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-12-03 4:46 UTC (permalink / raw)
To: Long Zhao; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] dt-bindings: i2c: ambarella,cv75-i2c: unregistered ambarella
vendor prefix
- [Low] dt-bindings: i2c: unexplained IDC acronym in commit subject
--
commit 8f70adc8f4f5689368da986214a3ac38b668dc63
Author: Long Zhao <longzhao@ambarella.com>
dt-bindings: i2c: add Ambarella IDC controller
This commit adds the devicetree binding schema for the Ambarella I2C
master controller on the CV75 SoC.
> dt-bindings: i2c: add Ambarella IDC controller
[Severity: Low]
The subject refers to an "IDC controller", while the commit body and the
binding schema only mention "I2C" without defining IDC. Should the
subject say "I2C" for consistency, or explain what IDC stands for in the
commit message and binding description?
> diff --git a/Documentation/devicetree/bindings/i2c/ambarella,cv75-i2c.yaml b/Documentation/devicetree/bindings/i2c/ambarella,cv75-i2c.yaml
> new file mode 100644
> index 0000000000000..d65befcf8ae30
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/ambarella,cv75-i2c.yaml
[ ... ]
> +properties:
> + compatible:
> + enum:
> + - ambarella,cv75-i2c
[Severity: Low]
Is the "ambarella" vendor prefix registered in
Documentation/devicetree/bindings/vendor-prefixes.yaml?
Without an "^ambarella,.*" entry there, make dt_binding_check fails
vendor-prefix validation on this schema and scripts/checkpatch.pl warns
about an undocumented DT compatible vendor string. Adding the vendor
prefix in a preceding patch would keep dt_binding_check passing across
the series.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-cv75-i2c-v2-0-8ed4bb03c85d@ambarella.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-03 4:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 4:35 [PATCH v2 0/3] i2c: add Ambarella IDC master for CV75 Long Zhao via B4 Relay
2026-12-03 4:35 ` [PATCH v2 1/3] dt-bindings: i2c: add Ambarella IDC controller Long Zhao via B4 Relay
2026-12-03 4:46 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox