]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: icplus: allow configuring the interrupt function on IP101GR
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sun, 18 Nov 2018 21:23:59 +0000 (22:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Nov 2018 00:16:20 +0000 (16:16 -0800)
commitdd76638595a5b0391202d17e22ceb58a3b29474a
tree333df68449a77286cea4686ce56adda261bbcb92
parentae8e32255fedc621b58e92c0dc6d79e0752b8030
net: phy: icplus: allow configuring the interrupt function on IP101GR

The IP101GR is a 32-pin QFN package variant of the IP101G/IP101GA
Ethernet PHY. Due to it's limited amount of pins the RXER (receive
error) and INTR32 (interrupt) functions share pin 21.
By default the PHY is configured to output the "receive error" status on
pin 21. Depending on the board layout and requirements we may want to
re-configure the PHY to output the interrupt signal there.

The mode of pin 21 can be configured in the "Digital I/O Specific
Control Register" (register 29), bit 2:
- 0 = RXER function
- 1 = INTR(32) function

Depending on the devicetree configuration we will now:
- change the mode to either ther RXER or INTR32 function
- keep the SEL_INTR32 value set by the bootloader (default) if no
  configuration is provided (to ensure that we're not breaking existing
  boards)
- error out if conflicting configuration is given (RXER and INTR32 mode
  are enabled at the same time)

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/icplus.c