Part Number: AM62A7
Other Parts Discussed in Thread: SYSCONFIG
Hi Experts,
I'm currently using a custom board with AM62A7 SoC. Using the A53 cores running Linux, I'm trying to write a composite driver that read in eCAP latched values and trigger SPI transfer. While the driver seem to compiled file and no complaints about the DTS, I'm unable to get any interrupt triggers. Sure enough, when looking at /proc/interrupts, I see zero counts for interrupts. I'm suspecting I described something wrong with my DTS but unable to pinpoint what.
Purpose of the driver:
- PPS signal to eCAP0 - read latched value, stores it
- IMU trigger signal to eCAP1 - read latched value, stores it, initiate SPI transfer over spi0 with the IMU.
- Userspace reads back PPS ticks, IMU trigger ticks, and IMU data
DTS snippet:
&main_pmx0 {
imu_ecap_pins_default: imu_ecap-default-pins {
pinctrl-single,pins = <
AM62AX_IOPAD(0x019c, PIN_INPUT, 2) /* (B18) MCASP0_AXR1.ECAP1_IN_APWM_OUT */
>;
};
pps_ecap_pins_default: pps_ecap-default-pins {
pinctrl-single,pins = <
AM62AX_IOPAD(0x01f0, PIN_INPUT, 8) /* (B16) EXT_REFCLK1.ECAP0_IN_APWM_OUT */
>;
};
spi_imu_pins_default: spi_imu-default-pins {
pinctrl-single,pins = <
AM62AX_IOPAD(0x01bc, PIN_INPUT, 0) /* (A17) SPI0_CLK */
AM62AX_IOPAD(0x01c0, PIN_OUTPUT, 0) /* (B15) SPI0_D0 */
AM62AX_IOPAD(0x01c4, PIN_INPUT, 0) /* (E15) SPI0_D1 */
AM62AX_IOPAD(0x01b4, PIN_OUTPUT, 0) /* (D16) SPI0_CS0 */
AM62AX_IOPAD(0x01d4, PIN_OUTPUT, 1) /* (C15) UART0_RTSn.SPI0_CS3 */
>;
};
};
/* Enable the hardware blocks so they receive clocks and power */
&ecap0 {
status = "okay";
};
&ecap1 {
status = "okay";
};
&main_spi0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi_imu_pins_default>; /* Pinmux for SPI CLK, D0, D1, CS */
#address-cells = <1>;
#size-cells = <0>;
/* Define our Device as a SPI Slave */
am62ax-pps-imu@0 {
compatible = "ti,am62ax-pps-imu";
reg = <0>; /* Chip Select 0 */
spi-max-frequency = <10000000>;
/* Pass eCAP nodes as references */
ti,ecap-pps = <&ecap0>;
ti,ecap-imu = <&ecap1>;
/* Interrupts */
interrupt-names = "pps_irq", "imu_irq";
interrupts = <GIC_SPI 113 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 114 IRQ_TYPE_EDGE_RISING>;
pinctrl-names = "default";
pinctrl-0 = <&pps_ecap_pins_default &imu_ecap_pins_default>;
};
};
Also, when I checked cat /sys/kernel/debug/clk/clk_summary , I do see "23100000.pwm" and "23110000.pwm" have a rate of 125MHz. So it appears that eCAP0 and eCAP1 are enabled.
Any ideas what I have been doing wrong?
Regards,
Danny