* [PATCH 0/3] i2c: add Ambarella IDC master for CV75
@ 2026-12-01 10:46 Long Zhao via B4 Relay
2026-12-01 10:46 ` [PATCH 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-01 10:46 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.
The SoC support, including ARCH_AMBARELLA and the RCT clock ID
header used by the binding example, is in the arm-soc immutable
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/log/?h=ambarella/common
Tested on the CV75 EVK via the local cv75-mix branch: the board
boots with CONFIG_I2C_AMBARELLA=y and the four I2C controllers
probe.
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 | 63 +++
MAINTAINERS | 7 +
drivers/i2c/busses/Kconfig | 11 +
drivers/i2c/busses/Makefile | 1 +
drivers/i2c/busses/i2c-ambarella.c | 469 +++++++++++++++++++++
5 files changed, 551 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 1/3] dt-bindings: i2c: add Ambarella IDC controller
2026-12-01 10:46 [PATCH 0/3] i2c: add Ambarella IDC master for CV75 Long Zhao via B4 Relay
@ 2026-12-01 10:46 ` Long Zhao via B4 Relay
2026-12-01 10:56 ` sashiko-bot
0 siblings, 1 reply; 3+ messages in thread
From: Long Zhao via B4 Relay @ 2026-12-01 10:46 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 | 63 ++++++++++++++++++++++
1 file changed, 63 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..285525655dec
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/ambarella,cv75-i2c.yaml
@@ -0,0 +1,63 @@
+# 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
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+ description:
+ SoC APB clock that drives the controller (CV75 gclk_apb).
+
+ clock-frequency:
+ description: Desired I2C bus clock frequency in Hz.
+ minimum: 1000
+ maximum: 1000000
+ default: 100000
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/ambarella,cv75-rct.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ i2c@e4008000 {
+ compatible = "ambarella,cv75-i2c";
+ reg = <0xe4008000 0x1000>;
+ interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&rct CV75_GCLK_APB>;
+ clock-frequency = <100000>;
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/3] dt-bindings: i2c: add Ambarella IDC controller
2026-12-01 10:46 ` [PATCH 1/3] dt-bindings: i2c: add Ambarella IDC controller Long Zhao via B4 Relay
@ 2026-12-01 10:56 ` sashiko-bot
0 siblings, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-12-01 10:56 UTC (permalink / raw)
To: Long Zhao; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] dt-bindings: i2c: ambarella,cv75-i2c: missing
ambarella,cv75-rct.h header
- [Low] dt-bindings: i2c: ambarella,cv75-i2c: interrupts listed before
clocks
- [Low] dt-bindings: i2c: ambarella,cv75-i2c: undocumented ambarella
vendor prefix
--
commit 10b02ab07af3011c549ab6187e63cc6723edbba9
Author: Long Zhao <longzhao@ambarella.com>
dt-bindings: i2c: add Ambarella IDC controller
This commit adds a Device Tree binding schema for the Ambarella CV75 I2C
master controller.
> 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..285525655dec7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/ambarella,cv75-i2c.yaml
> @@ -0,0 +1,63 @@
> +# 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
[Severity: Low]
Is the ambarella vendor prefix documented in
Documentation/devicetree/bindings/vendor-prefixes.yaml? Without an entry
there, checkpatch.pl and DT schema checks report ambarella,cv75-i2c as an
undocumented vendor prefix.
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> + description:
> + SoC APB clock that drives the controller (CV75 gclk_apb).
> +
> + clock-frequency:
> + description: Desired I2C bus clock frequency in Hz.
> + minimum: 1000
> + maximum: 1000000
> + default: 100000
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/ambarella,cv75-rct.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + i2c@e4008000 {
> + compatible = "ambarella,cv75-i2c";
> + reg = <0xe4008000 0x1000>;
> + interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
> + clocks = <&rct CV75_GCLK_APB>;
[Severity: Medium]
Does this example build with make dt_binding_check?
include/dt-bindings/clock/ambarella,cv75-rct.h and CV75_GCLK_APB are not
present in the tree, so preprocessing the example fails with a missing
header error.
> + clock-frequency = <100000>;
> + };
[Severity: Low]
This isn't a bug, but interrupts is listed before clocks in properties,
required, and the example node, whereas standard DT binding property order
places clocks before interrupts.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201-cv75-i2c-v1-0-729176f61836@ambarella.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-01 10:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 10:46 [PATCH 0/3] i2c: add Ambarella IDC master for CV75 Long Zhao via B4 Relay
2026-12-01 10:46 ` [PATCH 1/3] dt-bindings: i2c: add Ambarella IDC controller Long Zhao via B4 Relay
2026-12-01 10:56 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox