Hi, I'm using UART3_RXD for the fec0 interrupt on the imx7d and cannot find any specific reference to this pin in the device tree. Googling MX7D_PAD_UART3_RX_DATA__ENET1_1588_EVENT0_IN ( being my pad ) nothing turns up which gives me the impression I'm missing something.
There are a few interrupts defined in the dtsi, but I have no idea how these relate to pads.
interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
Any help would be appreciated, a simple explanation instead of linking a pdf would be appreciated!
Solved! Go to Solution.
1) GIC is Global Interrupt Controller. The 119 is the IRQ number. Please refer to the Table 7-1 in the i.MX7DRM for more details.
2) Normally, we don't handle the interrupt from the phy AR8031. We just reset it then it can be used.
static void fec_phy_reset(void)
{
/* Reset AR8031 PHY */
gpio_request(IMX_GPIO_NR(1, 25), "ENET PHY Reset");
gpio_direction_output(IMX_GPIO_NR(1, 25) , 0);
mdelay(10);
gpio_set_value(IMX_GPIO_NR(1, 25), 1);
udelay(100);
}
ENET1_1588_EVENT0_IN is used for the IEEE 1588. For more details, please read the Chapter 11.1.2.1.3. in i.MX7DRM.
If you just want to handle the interrupt signal, you can set the pin as gpio and use it for interrupt.
Hi, so you are saying that normally in the sabre/6/7 device trees this line's not actually used because nowhere can I find any reference to a gpio interrupt setting in relation to Pad X7D_PAD_UART3_RX_DATA__ENET1_1588_EVENT0_IN ?
What is the pin UART3_RXD are you connected to? If you are connecting this pin to an interrupt signal, I mean you can set this pin as a gpio pin (MX7D_PAD_UART3_RX_DATA__GPIO4_IO4). Then in the device tree, you can set it as gpio interrupt. There are many examples that you can find in the device tree. (https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm/boot/dts/imx7d-sdb.dts?h=imx_4.9.88_2.0.0_ga )
e.g.
tsc2046@0 {
compatible = "ti,tsc2046";
reg = <0>;
spi-max-frequency = <1000000>;
pinctrl-names ="default";
pinctrl-0 = <&pinctrl_tsc2046_pendown>;
interrupt-parent = <&gpio2>;
interrupts = <29 0>;
pendown-gpio = <&gpio2 29 GPIO_ACTIVE_HIGH>;
pinctrl_tsc2046_pendown: tsc2046_pendown {
fsl,pins = < MX7D_PAD_EPDC_BDR1__GPIO2_IO29 0x59 >; };
It used the GPIO pin for interrupt. You can go to the tsc2046 driver to see how to handle the IRQ.
Thanks, understood. Final two questions,
1) GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH , the "119" value in this interrupt definition - how is it defined, what does it represent ( link to reference if possible )?
2) The sabresd6/7 in RGMII modes have no interrupt lines defined in their device trees between the SOC and the AD8031 for example, is this correct? Is all the interrupting handled within the SOC/fec?
1) GIC is Global Interrupt Controller. The 119 is the IRQ number. Please refer to the Table 7-1 in the i.MX7DRM for more details.
2) Normally, we don't handle the interrupt from the phy AR8031. We just reset it then it can be used.
static void fec_phy_reset(void)
{
/* Reset AR8031 PHY */
gpio_request(IMX_GPIO_NR(1, 25), "ENET PHY Reset");
gpio_direction_output(IMX_GPIO_NR(1, 25) , 0);
mdelay(10);
gpio_set_value(IMX_GPIO_NR(1, 25), 1);
udelay(100);
}