Re: [PATCH 04/12] pinctrl: airoha: an7581: fix PHY LED GPIO group assignments
From: Zhengping Zhang
Date: Fri Nov 20 2026 - 02:04:10 EST
Hi Mikhail,
Thanks for checking this. Could you please share the version of the
7581 datasheet (sometimes also referred to as the Programming Guide)
you are referring to, and the relevant pin-function table? It appears
to differ from the pinctrl info available to me.
The GPIO lists the eight pads as follows. The key point is the mapping
between the mux bits and the GPIO pins.
GPIO Function IOMUX control signal SCU register
------ ----------------- --------------------- ----------------
GPIO33 LAN0 LED1 RG_GPIO_LAN0_LED1_MODE 0x1fa20214[4]
GPIO34 LAN1 LED1 RG_GPIO_LAN1_LED1_MODE 0x1fa20214[6]
GPIO35 LAN2 LED1 RG_GPIO_LAN2_LED1_MODE 0x1fa20214[8]
GPIO42 LAN3 LED1 RG_GPIO_LAN3_LED1_MODE 0x1fa20214[10]
GPIO43 LAN0 LED0 RG_GPIO_LAN0_LED0_MODE 0x1fa20214[3]
GPIO44 LAN1 LED0 RG_GPIO_LAN1_LED0_MODE 0x1fa20214[5]
GPIO45 LAN2 LED0 RG_GPIO_LAN2_LED0_MODE 0x1fa20214[7]
GPIO46 LAN3 LED0 RG_GPIO_LAN3_LED0_MODE 0x1fa20214[9]
On the AN7581 EVB, I tested the configuration assigning lan0_led0
through lan3_led0 to GPIO 43 to 46, respectively, and observed
working hardware-controlled LAN LEDS. Register readback during testing
showed:
SCU 0x214: 0x000042a8
SCU 0x22c: 0x00000000
SCU 0x27c: 0x00043210
The LED-related bits set in 0x214 are bits 3, 5, 7 and 9, consistent
with the GPIO overview above.
Could this be a naming difference between the documents? the key
relationship is the GPIO pad controlled by each SCU mux bit,
together with its LED mapping register and PHY LED channel. The patch
aims to correct that relationship, rather than rename LED0 and LED1.
I would like to reconcile the documentation before deciding wheter
to retain or drop this patch.
Best Regards,
Zhengping
On Sun, Nov 15, 2026 at 05:02:12PM +0300, Mikhail Kshevetskiy wrote:
> according to an7581 datasheet
> * LED0 uses GPIO33-35 and GPIO42 * LED1 uses GPIO43-46 so patch is not
> needed
>