Skip to content

Commit f1c5ba9

Browse files
aniket-lr-vignesh
authored andcommitted
arm64: dts: ti: k3-j722s: Add main_i2c4 device node
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@ti.com> Signed-off-by: Aniket Limaye <a-limaye@ti.com> Tested-by: Nora Schiffer <nora.schiffer@ew.tq-group.com> Link: https://patch.msgid.link/20260304-j722s-main-i2c4-dt-v1-1-03f79f0cdf97@ti.com Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
1 parent 5c86ef2 commit f1c5ba9

3 files changed

Lines changed: 22 additions & 7 deletions

File tree

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,9 @@
543543
main_gpio_intr: interrupt-controller@a00000 {
544544
compatible = "ti,sci-intr";
545545
reg = <0x00 0x00a00000 0x00 0x800>;
546-
ti,intr-trigger-type = <1>;
547546
interrupt-controller;
548547
interrupt-parent = <&gic500>;
549-
#interrupt-cells = <1>;
548+
#interrupt-cells = <2>;
550549
ti,sci = <&dmsc>;
551550
ti,sci-dev-id = <3>;
552551
ti,interrupt-ranges = <0 32 16>;
@@ -558,8 +557,9 @@
558557
gpio-controller;
559558
#gpio-cells = <2>;
560559
interrupt-parent = <&main_gpio_intr>;
561-
interrupts = <190>, <191>, <192>,
562-
<193>, <194>, <195>;
560+
interrupts = <190 IRQ_TYPE_EDGE_RISING>, <191 IRQ_TYPE_EDGE_RISING>,
561+
<192 IRQ_TYPE_EDGE_RISING>, <193 IRQ_TYPE_EDGE_RISING>,
562+
<194 IRQ_TYPE_EDGE_RISING>, <195 IRQ_TYPE_EDGE_RISING>;
563563
interrupt-controller;
564564
#interrupt-cells = <2>;
565565
ti,davinci-gpio-unbanked = <0>;
@@ -574,8 +574,9 @@
574574
gpio-controller;
575575
#gpio-cells = <2>;
576576
interrupt-parent = <&main_gpio_intr>;
577-
interrupts = <180>, <181>, <182>,
578-
<183>, <184>, <185>;
577+
interrupts = <180 IRQ_TYPE_EDGE_RISING>, <181 IRQ_TYPE_EDGE_RISING>,
578+
<182 IRQ_TYPE_EDGE_RISING>, <183 IRQ_TYPE_EDGE_RISING>,
579+
<184 IRQ_TYPE_EDGE_RISING>, <185 IRQ_TYPE_EDGE_RISING>;
579580
interrupt-controller;
580581
#interrupt-cells = <2>;
581582
ti,davinci-gpio-unbanked = <0>;

arch/arm64/boot/dts/ti/k3-j722s-main.dtsi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,19 @@
154154
};
155155
};
156156

157+
main_i2c4: i2c@fe80000 {
158+
compatible = "ti,am64-i2c", "ti,omap4-i2c";
159+
reg = <0x00 0x0fe80000 0x00 0x100>;
160+
interrupt-parent = <&main_gpio_intr>;
161+
interrupts = <178 IRQ_TYPE_LEVEL_HIGH>;
162+
#address-cells = <1>;
163+
#size-cells = <0>;
164+
power-domains = <&k3_pds 257 TI_SCI_PD_EXCLUSIVE>;
165+
clocks = <&k3_clks 257 2>;
166+
clock-names = "fck";
167+
status = "disabled";
168+
};
169+
157170
ti_csi2rx1: ticsi2rx@30122000 {
158171
compatible = "ti,j721e-csi2rx-shim";
159172
reg = <0x00 0x30122000 0x00 0x1000>;

arch/arm64/boot/dts/ti/k3-j722s.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@
160160
<0x00 0x0fd80000 0x00 0x0fd80000 0x00 0x00080000>, /* GPU */
161161
<0x00 0x0fd20000 0x00 0x0fd20000 0x00 0x00000100>, /* JPEGENC0_CORE */
162162
<0x00 0x0fd20200 0x00 0x0fd20200 0x00 0x00000200>, /* JPEGENC0_CORE_MMU */
163-
<0x00 0x20000000 0x00 0x20000000 0x00 0x0a008000>, /* Third peripheral window */
163+
<0x00 0x0fe00000 0x00 0x0fe00000 0x00 0x000f0400>, /* Third peripheral window */
164+
<0x00 0x20000000 0x00 0x20000000 0x00 0x0a008000>, /* Fourth peripheral window */
164165
<0x00 0x30040000 0x00 0x30040000 0x00 0x00080000>, /* PRUSS-M */
165166
<0x00 0x301c0000 0x00 0x301c0000 0x00 0x00001000>, /* DPHY-TX */
166167
<0x00 0x30101000 0x00 0x30101000 0x00 0x00080100>, /* CSI window */

0 commit comments

Comments
 (0)