[PATCH] arm64: dts: ti: k3-j722s: Add main_i2c4 device node

Nora Schiffer nora.schiffer at ew.tq-group.com
Mon Mar 23 03:11:49 PDT 2026


On Wed, 2026-03-04 at 14:41 +0530, Aniket Limaye wrote:
> Add missing device tree node for main_i2c4, and the corresponding ranges
> in cbass_main. Interrupt for this i2c controller is routed through the
> Main GPIOMUX Router.
> Base address, Interrupt IDs are taken from J722S TRM [0].
> Device, Clock IDs are taken from TISCI docs [1].
> 
> Additionally, the I2C4 is the only interrupt source to the GPIOMUX INTR
> router that generates level interrupts, while all other sources generate
> edge interrupts. Due to this, the router needs to handle interrupt-type
> on a per-line basis. Modify the router node and its consumers to
> specify the interrupt type corresponding to each interrupt line.
> 
> [0]: https://www.ti.com/lit/zip/sprujb3
> [1]:
> https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/index.html#j722s
> 
> Signed-off-by: Jared McArthur <j-mcarthur at ti.com>
> Signed-off-by: Aniket Limaye <a-limaye at ti.com>
> ---
> Note:
> Support for per-line interrupt-types was added through a recent series
> [2], which was already merged in.
> 
> Testing:
> - Enable I2C4 (additional DT patch) on j722s-evm and run i2cdetect [3].
> - Add testcode to ignore the NACK interrupt, which results in an irq
>   storm -> showing that GIC is actually receiving level interrupt from
>   the INTR [4].

I ran a basic test on our MBa67xx board based on current linux-next with this
patch applied. Probe and configuration of a RPi DSI camera module (IMX219)
connected to I2C4 is working as expected.

Tested-by: Nora Schiffer <nora.schiffer at ew.tq-group.com>



> 
> [2]: https://lore.kernel.org/all/20260123-ul-driver-i2c-j722s-v4-0-b08625c487d5@ti.com/
> [3]: https://gist.github.com/aniket-l/844925345316adf9f65f04c8cdedd62d#file-j722s-evm-main-i2c4-working-logs-txt
> [4]: https://gist.github.com/aniket-l/844925345316adf9f65f04c8cdedd62d#file-j722s-evm-main-i2c4-irqstorm-logs-txt
> ---
>  arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 13 +++++++------
>  arch/arm64/boot/dts/ti/k3-j722s-main.dtsi              | 13 +++++++++++++
>  arch/arm64/boot/dts/ti/k3-j722s.dtsi                   |  3 ++-
>  3 files changed, 22 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
> index 0e1af2a69ca2..f130c7cb998d 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
> @@ -543,10 +543,9 @@ main_spi2: spi at 20120000 {
>  	main_gpio_intr: interrupt-controller at a00000 {
>  		compatible = "ti,sci-intr";
>  		reg = <0x00 0x00a00000 0x00 0x800>;
> -		ti,intr-trigger-type = <1>;
>  		interrupt-controller;
>  		interrupt-parent = <&gic500>;
> -		#interrupt-cells = <1>;
> +		#interrupt-cells = <2>;
>  		ti,sci = <&dmsc>;
>  		ti,sci-dev-id = <3>;
>  		ti,interrupt-ranges = <0 32 16>;
> @@ -558,8 +557,9 @@ main_gpio0: gpio at 600000 {
>  		gpio-controller;
>  		#gpio-cells = <2>;
>  		interrupt-parent = <&main_gpio_intr>;
> -		interrupts = <190>, <191>, <192>,
> -			     <193>, <194>, <195>;
> +		interrupts = <190 IRQ_TYPE_EDGE_RISING>, <191 IRQ_TYPE_EDGE_RISING>,
> +			     <192 IRQ_TYPE_EDGE_RISING>, <193 IRQ_TYPE_EDGE_RISING>,
> +			     <194 IRQ_TYPE_EDGE_RISING>, <195 IRQ_TYPE_EDGE_RISING>;
>  		interrupt-controller;
>  		#interrupt-cells = <2>;
>  		ti,davinci-gpio-unbanked = <0>;
> @@ -574,8 +574,9 @@ main_gpio1: gpio at 601000 {
>  		gpio-controller;
>  		#gpio-cells = <2>;
>  		interrupt-parent = <&main_gpio_intr>;
> -		interrupts = <180>, <181>, <182>,
> -			     <183>, <184>, <185>;
> +		interrupts = <180 IRQ_TYPE_EDGE_RISING>, <181 IRQ_TYPE_EDGE_RISING>,
> +			     <182 IRQ_TYPE_EDGE_RISING>, <183 IRQ_TYPE_EDGE_RISING>,
> +			     <184 IRQ_TYPE_EDGE_RISING>, <185 IRQ_TYPE_EDGE_RISING>;
>  		interrupt-controller;
>  		#interrupt-cells = <2>;
>  		ti,davinci-gpio-unbanked = <0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
> index 9ee5d0c8ffd1..ddf20e44f0ea 100644
> --- a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
> @@ -154,6 +154,19 @@ usb1: usb at 31200000 {
>  		};
>  	};
>  
> +	main_i2c4: i2c at fe80000 {
> +		compatible = "ti,am64-i2c", "ti,omap4-i2c";
> +		reg = <0x00 0x0fe80000 0x00 0x100>;
> +		interrupt-parent = <&main_gpio_intr>;
> +		interrupts = <178 IRQ_TYPE_LEVEL_HIGH>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		power-domains = <&k3_pds 257 TI_SCI_PD_EXCLUSIVE>;
> +		clocks = <&k3_clks 257 2>;
> +		clock-names = "fck";
> +		status = "disabled";
> +	};
> +
>  	ti_csi2rx1: ticsi2rx at 30122000 {
>  		compatible = "ti,j721e-csi2rx-shim";
>  		reg = <0x00 0x30122000 0x00 0x1000>;
> diff --git a/arch/arm64/boot/dts/ti/k3-j722s.dtsi b/arch/arm64/boot/dts/ti/k3-j722s.dtsi
> index 059c65ece183..1b36dcf37925 100644
> --- a/arch/arm64/boot/dts/ti/k3-j722s.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j722s.dtsi
> @@ -160,7 +160,8 @@ cbass_main: bus at f0000 {
>  			 <0x00 0x0fd80000 0x00 0x0fd80000 0x00 0x00080000>, /* GPU */
>  			 <0x00 0x0fd20000 0x00 0x0fd20000 0x00 0x00000100>, /* JPEGENC0_CORE */
>  			 <0x00 0x0fd20200 0x00 0x0fd20200 0x00 0x00000200>, /* JPEGENC0_CORE_MMU */
> -			 <0x00 0x20000000 0x00 0x20000000 0x00 0x0a008000>, /* Third peripheral window */
> +			 <0x00 0x0fe00000 0x00 0x0fe00000 0x00 0x000f0400>, /* Third peripheral window */
> +			 <0x00 0x20000000 0x00 0x20000000 0x00 0x0a008000>, /* Fourth peripheral window */
>  			 <0x00 0x30040000 0x00 0x30040000 0x00 0x00080000>, /* PRUSS-M */
>  			 <0x00 0x301c0000 0x00 0x301c0000 0x00 0x00001000>, /* DPHY-TX */
>  			 <0x00 0x30101000 0x00 0x30101000 0x00 0x00080100>, /* CSI window */
> 
> ---
> base-commit: d517cb8cea012f43b069617fc8179b45404f8018
> change-id: 20260303-j722s-main-i2c4-dt-8a1344d04ffe
> 
> Best regards,

-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/



More information about the linux-arm-kernel mailing list