Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Zhengping Zhang <zhengping.zhang@airoha.com>
To: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Cc: <linusw@kernel.org>, <lorenzo@kernel.org>, <robh@kernel.org>,
	<krzk+dt@kernel.org>, <conor+dt@kernel.org>, <brgl@kernel.org>,
	<naseefkm@gmail.com>, <benjamin.larsson@genexis.eu>,
	<linux-gpio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>, <lei.dong@airoha.com>,
	<ansuelsmth@gmail.com>
Subject: Re: [PATCH 04/12] pinctrl: airoha: an7581: fix PHY LED GPIO group assignments
Date: Fri, 20 Nov 2026 15:03:52 +0800	[thread overview]
Message-ID: <av_w2OD7cYYWNYRS@mediatek.com> (raw)
In-Reply-To: <5e681d92-9772-42e3-aae8-47faacf6d850@iopsys.eu>

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
> 


  reply	other threads:[~2026-11-20  7:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  9:43 [PATCH 00/12] pinctrl: airoha: configure GPIO muxes explicitly and fix pad mappings Zhengping Zhang
2026-11-10  9:43 ` [PATCH 01/12] pinctrl: airoha: fix setting of GPIO direction Zhengping Zhang
2026-11-10  9:43 ` [PATCH 02/12] pinctrl: airoha: configure pin muxes on GPIO requests Zhengping Zhang
2026-11-10  9:43 ` [PATCH 03/12] dt-bindings: pinctrl: airoha: describe all EN7581 GPIO mux groups Zhengping Zhang
2026-11-15 14:00   ` Mikhail Kshevetskiy
2026-11-10  9:43 ` [PATCH 04/12] pinctrl: airoha: an7581: fix PHY LED GPIO group assignments Zhengping Zhang
2026-11-15 14:02   ` Mikhail Kshevetskiy
2026-11-20  7:03     ` Zhengping Zhang [this message]
2026-11-10  9:43 ` [PATCH 05/12] pinctrl: airoha: an7581: select force GPIO mode on GPIO requests Zhengping Zhang
2026-11-15 14:21   ` Mikhail Kshevetskiy
2026-11-20  7:19     ` Zhengping Zhang
2026-11-10  9:43 ` [PATCH 06/12] dt-bindings: pinctrl: airoha: describe all AN7583 GPIO mux groups Zhengping Zhang
2026-11-10  9:43 ` [PATCH 07/12] pinctrl: airoha: an7583: fix SPI pin mux config Zhengping Zhang
2026-11-10  9:43 ` [PATCH 08/12] pinctrl: airoha: an7583: fix eMMC " Zhengping Zhang
2026-11-10  9:43 ` [PATCH 09/12] pinctrl: airoha: an7583: use force GPIO mode for GPIO requests Zhengping Zhang
2026-11-15 14:23   ` Mikhail Kshevetskiy
2026-11-10  9:43 ` [PATCH 10/12] dt-bindings: pinctrl: airoha: describe all EN7523 GPIO mux groups Zhengping Zhang
2026-11-10  9:43 ` [PATCH 11/12] pinctrl: airoha: en7523: use force GPIO mode for GPIO requests Zhengping Zhang
2026-11-15 14:24   ` Mikhail Kshevetskiy
2026-11-10  9:43 ` [PATCH 12/12] MAINTAINERS: add myself as Airoha pinctrl co-maintainer Zhengping Zhang
2026-11-15 14:09 ` [PATCH 00/12] pinctrl: airoha: configure GPIO muxes explicitly and fix pad mappings Mikhail Kshevetskiy
2026-11-18 21:15   ` Linus Walleij
2026-11-20  6:39     ` Zhengping Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=av_w2OD7cYYWNYRS@mediatek.com \
    --to=zhengping.zhang@airoha.com \
    --cc=ansuelsmth@gmail.com \
    --cc=benjamin.larsson@genexis.eu \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lei.dong@airoha.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lorenzo@kernel.org \
    --cc=mikhail.kshevetskiy@iopsys.eu \
    --cc=naseefkm@gmail.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox