Other Parts Discussed in Thread: SK-TDA4VM, TDA4VM
Tool/software:
Hi,
I am trying to enable interrupts for GPIO0_15, GPIO0_17, GPIO0_19, and GPIO0_21 on the TDA4AEN.
Referring to this thread, https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1058595/faq-tda4vm-how-to-test-gpio-interrupts, I first created a gpio_test node in k3-j722s-evm.dts:
... vsys_io_1v2: regulator-vsys-io-1v2 { compatible = "regulator-fixed"; regulator-name = "vsys_io_1v2"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-always-on; regulator-boot-on; }; gpio_test: gpio_test { compatible = "ti,gpio_test"; interrupt-parent = <&main_gpio0>; interrupts = <69 IRQ_TYPE_EDGE_FALLING>; }; hdmi0: connector-hdmi { ...
&main_gpio:
&main_gpio0 { pinctrl-names = "default"; pinctrl-0 = <&gpio0_pins_default>; status = "okay"; };
&main_pmx0 { ///delete-property/ interrupts; gpio0_pins_default: gpio0-default-pins { pinctrl-single,pins = < J722S_IOPAD(0x0118, PIN_INPUT, 7) /* (H26) MMC2_CLK.GPIO0_69 | AWR3_RESETn */ >; };
root@j722s-evm:~# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 11: 2987 3399 3207 3010 GICv3 30 Level arch_timer 14: 0 0 0 0 GICv3 130 Level pinctrl 15: 4 0 0 0 GICv3 108 Level mbox-r5-0 16: 4 0 0 0 GICv3 109 Level mbox-mcu-r5-0 19: 0 0 0 0 GICv3 23 Level arm-pmu 20: 1368 0 0 0 GICv3 66 Level 4d000000.mailbox thr_012 26: 0 0 0 0 GICv3 197 Level 2b200000.i2c 27: 52 0 0 0 GICv3 193 Level 20000000.i2c 28: 49 0 0 0 GICv3 194 Level 20010000.i2c 29: 4 0 0 0 GICv3 195 Level 20020000.i2c 30: 1962 0 0 0 MSI-INTA 1713152 Level 485c0100.dma-controller chan0 112: 9 2 0 0 MSI-INTA 1970707 Level 8000000.ethernet-tx0 120: 0 0 0 0 MSI-INTA 1970715 Level 8000000.ethernet-tx1 128: 0 0 0 0 MSI-INTA 1970723 Level 8000000.ethernet-tx2 136: 0 0 2 1 MSI-INTA 1970731 Level 8000000.ethernet-tx3 144: 4 0 0 0 MSI-INTA 1970739 Level 8000000.ethernet-tx4 152: 0 5 0 1 MSI-INTA 1970747 Level 8000000.ethernet-tx5 160: 0 0 2 0 MSI-INTA 1970755 Level 8000000.ethernet-tx6 168: 0 0 0 3 MSI-INTA 1970763 Level 8000000.ethernet-tx7 184: 0 0 0 0 MSI-INTA 1970779 Level 485c0000.dma-controller chan2 202: 11 7 0 0 MSI-INTA 1971731 Level 8000000.ethernet 226: 0 0 0 0 MSI-INTA 1971755 Level 485c0000.dma-controller chan0 227: 0 0 0 0 MSI-INTA 1971756 Level 485c0000.dma-controller chan1 274: 886 0 0 0 GICv3 210 Level 2800000.serial 275: 2 0 0 0 GICv3 171 Level fc40000.spi 277: 0 0 0 0 GICv3 208 Level 4b00000.spi 278: 0 0 0 0 GICv3 209 Level 4b10000.spi 279: 0 0 0 0 GICv3 204 Level 20100000.spi 280: 0 0 0 0 GICv3 206 Level 20120000.spi 281: 0 0 0 0 GICv3 134 Level 8000000.ethernet 292: 694 0 0 0 GICv3 165 Level mmc0 392: 0 0 0 0 GPIO 67 Edge -davinci_gpio 2-0020 490: 0 0 0 0 GICv3 131 Edge j721e-pcie-link-down-irq 491: 0 0 0 0 ITS-MSI 0 Edge PCIe PME, aerdrv 492: 11216 0 0 0 GICv3 115 Level mmc1 493: 0 0 0 0 2-0020 13 Edge 2-003b 497: 0 0 0 0 GICv3 132 Level 2b1f0000.rtc 498: 0 0 0 0 GICv3 257 Level vpu_irq 501: 141 0 0 0 GICv3 258 Level xhci-hcd:usb1 503: 0 0 0 0 GICv3 277 Level 31200000.usb IPI0: 647 1458 1178 1080 Rescheduling interrupts IPI1: 2109 3060 3132 3159 Function call interrupts IPI2: 0 0 0 0 CPU stop interrupts IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts IPI4: 0 0 0 0 Timer broadcast interrupts IPI5: 0 0 0 0 IRQ work interrupts IPI6: 0 0 0 0 CPU wake-up interrupts Err: 0
root@j722s-evm:~# gpioinfo -c gpiochip2 gpiochip2 - 87 lines: line 0: unnamed input line 1: unnamed input line 2: unnamed input line 3: unnamed input line 4: unnamed input line 5: unnamed input line 6: unnamed input line 7: unnamed input line 8: unnamed input line 9: unnamed input line 10: unnamed input line 11: unnamed input line 12: unnamed input line 13: unnamed input line 14: unnamed input line 15: "AWR1_SPI_INT" input line 16: "AWR2_RESETn" input line 17: "AWR2_SPI_INT" input line 18: unnamed input line 19: "AWR3_SPI_INT" input line 20: "AWR4_RESETn" input line 21: "AWR4_SPI_INT" input line 22: unnamed input line 23: unnamed input line 24: unnamed input line 25: unnamed input line 26: unnamed input line 27: unnamed input line 28: unnamed input line 29: unnamed input line 30: unnamed input line 31: "AWR1_RESETn" input line 32: unnamed input line 33: unnamed input line 34: unnamed input line 35: unnamed input line 36: "AWR_SOP0" input line 37: unnamed input line 38: unnamed input line 39: unnamed input line 40: unnamed input line 41: unnamed input line 42: unnamed input line 43: unnamed input line 44: unnamed input line 45: unnamed input line 46: unnamed input line 47: unnamed input line 48: unnamed input line 49: unnamed input line 50: unnamed input line 51: unnamed input line 52: unnamed input line 53: unnamed input line 54: unnamed input line 55: unnamed input line 56: unnamed input line 57: unnamed input line 58: unnamed input line 59: unnamed input line 60: unnamed input line 61: unnamed input line 62: unnamed input line 63: unnamed input line 64: unnamed input line 65: unnamed input line 66: unnamed input line 67: unnamed input line 68: unnamed input line 69: "AWR3_RESETn" input line 70: unnamed output consumer=tlv71033 line 71: unnamed input line 72: unnamed input line 73: unnamed input line 74: unnamed input line 75: unnamed input line 76: unnamed input line 77: unnamed input line 78: unnamed input line 79: unnamed input line 80: unnamed input line 81: unnamed input line 82: unnamed input line 83: unnamed input line 84: unnamed input line 85: unnamed input line 86: unnamed input
k3-j722s-evm.dts:
&main_gpio0 { pinctrl-names = "default"; pinctrl-0 = <&gpio0_pins_default>; gpio-line-names = "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AWR1_SPI_INT", "AWR2_RESETn", "AWR2_SPI_INT", "", "AWR3_SPI_INT", "AWR4_RESETn", "AWR4_SPI_INT", "", "", "", "", "", "", "", "", "", "AWR1_RESETn", "", "", "", "", "AWR_SOP0", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AWR3_RESETn", "", ""; status = "okay"; }; &main_gpio1 { pinctrl-names = "default"; pinctrl-0 = <&gpio1_pins_default>; gpio-line-names = "", "", "", "", "", "", "", "", "", "AWR_SOP2", "AWR_SOP1", "", "AWR_ERROR_OUTn"; status = "okay"; };
&main_pmx0 { ///delete-property/ interrupts; gpio0_pins_default: gpio0-default-pins { pinctrl-single,pins = < J722S_IOPAD(0x007c, PIN_INPUT, 7) /* (T23) GPMC0_CLK.GPIO0_31 | AWR1_RESETn */ J722S_IOPAD(0x003c, PIN_INPUT, 7) /* (R22) GPMC0_AD0.GPIO0_15 | AWR1_SPI_INT */ J722S_IOPAD(0x0040, PIN_INPUT, 7) /* (R23) GPMC0_AD1.GPIO0_16 | AWR2_RESETn */ J722S_IOPAD(0x0044, PIN_INPUT, 7) /* (R26) GPMC0_AD2.GPIO0_17 | AWR2_SPI_INT */ J722S_IOPAD(0x0118, PIN_INPUT, 7) /* (H26) MMC2_CLK.GPIO0_69 | AWR3_RESETn */ J722S_IOPAD(0x004c, PIN_INPUT, 7) /* (T25) GPMC0_AD4.GPIO0_19 | AWR3_SPI_INT */ J722S_IOPAD(0x0050, PIN_INPUT, 7) /* (T24) GPMC0_AD5.GPIO0_20 | AWR4_RESETn */ J722S_IOPAD(0x0054, PIN_INPUT, 7) /* (T21) GPMC0_AD6.GPIO0_21 | AWR4_SPI_INT */ J722S_IOPAD(0x0094, PIN_INPUT, 7) /* (P26) GPMC0_BE1n.GPIO0_36 | AWR_SOP0 */ >; }; gpio1_pins_default: gpio1-default-pins { pinctrl-single,pins = < J722S_IOPAD(0x01a0, PIN_INPUT, 7) /* (F23) MCASP0_AXR0.GPIO1_10 | AWR_SOP1 */ J722S_IOPAD(0x019c, PIN_INPUT, 7) /* (B25) MCASP0_AXR1.GPIO1_9 | AWR_SOP2 */ J722S_IOPAD(0x01a8, PIN_INPUT, 7) /* (C26) MCASP0_AFSX.GPIO1_12 | AWR_ERROR_OUTN */ >; }; ...
main_gpio0: gpio@600000 { compatible = "ti,am64-gpio", "ti,keystone-gpio"; reg = <0x00 0x00600000 0x00 0x100>; gpio-controller; #gpio-cells = <2>; interrupt-parent = <&main_gpio_intr>; interrupts = <190>, <191>, <192>, <193>, <194>, <195>, <15>, <17>, <19>, <21>; interrupt-controller; #interrupt-cells = <2>; ti,ngpio = <92>; ti,davinci-gpio-unbanked = <0>; power-domains = <&k3_pds 77 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 77 0>; clock-names = "gpio"; gpio-ranges = <&main_pmx0 0 0 32>, <&main_pmx0 32 33 38>, <&main_pmx0 70 72 22>; };