From: <Parthiban.Veerasooran@microchip.com>
To: <Woojung.Huh@microchip.com>
Cc: <netdev@vger.kernel.org>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <steve.glendinning@shawell.net>,
<UNGLinuxDriver@microchip.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>
Subject: Re: [PATCH] net: usb: smsc95xx: configure external LEDs function for EVB-LAN8670-USB
Date: Thu, 23 May 2024 08:51:39 +0000 [thread overview]
Message-ID: <2044fda4-84ee-4e2a-8b33-65c443643d15@microchip.com> (raw)
In-Reply-To: <BL0PR11MB2913394A02B696946324E830E7EB2@BL0PR11MB2913.namprd11.prod.outlook.com>
Hi Woojung,
On 23/05/24 1:22 am, Woojung Huh - C21699 wrote:
> Hi Parthiban,
>
> LED_SEL is configurable option by EEPROM which should be populated on
> EVB-LAN8670-USB. I would suggest changing EEPROM configuration than
> hard-coded in driver code.
Ah OK. Thanks for letting me know. I tried that EEPROM approach but that
is needed a fix to work properly. I will send out another fix patch
separately. Please review it.
Please discard this patch as it is going to be invalid.
Thanks for your understanding.
Best regards,
Parthiban V
>
> Thanks.
> Woojung
>
>> -----Original Message-----
>> From: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
>> Sent: Wednesday, May 22, 2024 10:08 AM
>> To: steve.glendinning@shawell.net; UNGLinuxDriver
>> <UNGLinuxDriver@microchip.com>; davem@davemloft.net; edumazet@google.com;
>> kuba@kernel.org; pabeni@redhat.com
>> Cc: netdev@vger.kernel.org; linux-usb@vger.kernel.org; linux-
>> kernel@vger.kernel.org; Parthiban Veerasooran - I17164
>> <Parthiban.Veerasooran@microchip.com>
>> Subject: [PATCH] net: usb: smsc95xx: configure external LEDs function for
>> EVB-LAN8670-USB
>>
>> By default, LAN9500A configures the external LEDs to the below function.
>> nSPD_LED -> Speed Indicator
>> nLNKA_LED -> Link and Activity Indicator
>> nFDX_LED -> Full Duplex Link Indicator
>>
>> But, EVB-LAN8670-USB uses the below external LEDs function which can be
>> enabled by writing 1 to the LED Select (LED_SEL) bit in the LAN9500A.
>> nSPD_LED -> Speed Indicator
>> nLNKA_LED -> Link Indicator
>> nFDX_LED -> Activity Indicator
>>
>> Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
>> ---
>> drivers/net/usb/smsc95xx.c | 12 ++++++++++++
>> drivers/net/usb/smsc95xx.h | 1 +
>> 2 files changed, 13 insertions(+)
>>
>> diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
>> index cbea24666479..05975461bf10 100644
>> --- a/drivers/net/usb/smsc95xx.c
>> +++ b/drivers/net/usb/smsc95xx.c
>> @@ -1006,6 +1006,18 @@ static int smsc95xx_reset(struct usbnet *dev)
>> /* Configure GPIO pins as LED outputs */
>> write_buf = LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED |
>> LED_GPIO_CFG_FDX_LED;
>> +
>> + /* Set LED Select (LED_SEL) bit for the external LED pins
>> functionality
>> + * in the Microchip's EVB-LAN8670-USB 10BASE-T1S Ethernet device which
>> + * uses the below LED function.
>> + * nSPD_LED -> Speed Indicator
>> + * nLNKA_LED -> Link Indicator
>> + * nFDX_LED -> Activity Indicator
>> + */
>> + if (dev->udev->descriptor.idVendor == 0x184F &&
>> + dev->udev->descriptor.idProduct == 0x0051)
>> + write_buf |= LED_GPIO_CFG_LED_SEL;
>> +
>> ret = smsc95xx_write_reg(dev, LED_GPIO_CFG, write_buf);
>> if (ret < 0)
>> return ret;
>> diff --git a/drivers/net/usb/smsc95xx.h b/drivers/net/usb/smsc95xx.h
>> index 013bf42e27f2..134f3c2fddd9 100644
>> --- a/drivers/net/usb/smsc95xx.h
>> +++ b/drivers/net/usb/smsc95xx.h
>> @@ -114,6 +114,7 @@
>>
>> /* LED General Purpose IO Configuration Register */
>> #define LED_GPIO_CFG (0x24)
>> +#define LED_GPIO_CFG_LED_SEL BIT(31) /* Separate Link/Act LEDs */
>> #define LED_GPIO_CFG_SPD_LED (0x01000000) /* GPIOz as Speed LED */
>> #define LED_GPIO_CFG_LNK_LED (0x00100000) /* GPIOy as Link LED */
>> #define LED_GPIO_CFG_FDX_LED (0x00010000) /* GPIOx as Full Duplex LED
>> */
>>
>> base-commit: 4b377b4868ef17b040065bd468668c707d2477a5
>> --
>> 2.34.1
>
next prev parent reply other threads:[~2024-05-23 8:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 14:08 [PATCH] net: usb: smsc95xx: configure external LEDs function for EVB-LAN8670-USB Parthiban Veerasooran
2024-05-22 16:44 ` Andrew Lunn
2024-05-23 8:51 ` Parthiban.Veerasooran
2024-05-23 12:43 ` Andrew Lunn
2024-05-24 10:48 ` Parthiban.Veerasooran
2024-05-22 18:54 ` Simon Horman
2024-05-23 8:51 ` Parthiban.Veerasooran
2024-05-22 19:52 ` Woojung.Huh
2024-05-23 8:51 ` Parthiban.Veerasooran [this message]
2024-05-23 5:42 ` kernel test robot
2024-05-27 8:28 ` Oliver Neukum
2024-05-27 11:42 ` Parthiban.Veerasooran
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=2044fda4-84ee-4e2a-8b33-65c443643d15@microchip.com \
--to=parthiban.veerasooran@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steve.glendinning@shawell.net \
/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;
as well as URLs for NNTP newsgroup(s).