Re: [PATCH] wlcore/wl18xx: Add invert-irq OF property for physically inverted IRQ
From: Kalle Valo
Date: Mon Jun 10 2019 - 03:05:37 EST
Eugeniu Rosca <erosca@xxxxxxxxxxxxxx> writes:
> The wl1837mod datasheet  says about the WL_IRQ pin:
> SDIO available, interrupt out. Active high. [..]
> Set to rising edge (active high) on powerup.
> That's the reason of seeing the interrupt configured as:
> - IRQ_TYPE_EDGE_RISING on HiKey 960/970
> - IRQ_TYPE_LEVEL_HIGH on a number of i.MX6 platforms
> We assert that all those platforms have the WL_IRQ pin connected
> to the SoC _directly_ (confirmed on HiKey 970 ).
> That's not the case for R-Car Kingfisher extension target, which carries
> a WL1837MODGIMOCT IC. There is an SN74LV1T04DBVR inverter present
> between the WLAN_IRQ pin of the WL18* chip and the SoC, effectively
> reversing the requirement quoted from . IOW, in Kingfisher DTS
> configuration we would need to use IRQ_TYPE_EDGE_FALLING or
> Unfortunately, v4.2-rc1 commit bd763482c82ea2 ("wl18xx: wlan_irq:
> support platform dependent interrupt types") made a special case out
> of these interrupt types. After this commit, it is impossible to provide
> an IRQ configuration via DTS which would describe an inverter present
> between the WL18* chip and the SoC, generating the need for workarounds
> like .
> Create a boolean OF property, called "invert-irq" to specify that
> the WLAN_IRQ pin of WL18* is connected to the SoC via an inverter.
> This solution has been successfully tested on R-Car H3ULCB-KF-M06 using
> the DTS configuration  combined with the "invert-irq" property.
>  http://www.ti.com/lit/ds/symlink/wl1837mod.pdf
>  https://www.96boards.org/documentation/consumer/hikey/hikey970/hardware-docs/
>  https://github.com/CogentEmbedded/meta-rcar/blob/289fbd4f8354/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0024-wl18xx-do-not-invert-IRQ-on-WLxxxx-side.patch
>  https://patchwork.kernel.org/patch/10895879/
> ("arm64: dts: ulcb-kf: Add support for TI WL1837")
> Signed-off-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>
Tony&Eyal, do you agree with this?