env: ENV_WRITEABLE_LIST with ".flags" variable

2024-10-30 Thread Zixun LI
Hello, I read the code about environment variable protection and an old discussion: https://lists.denx.de/pipermail/u-boot/2021-April/446247.html but I still have a question. In env_flags_init() we have: if (first_call) { #ifdef CONFIG_ENV_WRITEABLE_LIST flags_list = ENV_FLAGS_LIST_ST

[PATCH] dm: gpio: Return error when pull up/down is requested but set_flags ops is not implmentated

2024-10-21 Thread Zixun LI
Currently in _dm_gpio_set_flags() when set_flags ops is not implemented direction_output()/_input() is used, but pull up/down is not supported by these ops. Signed-off-by: Zixun LI --- We have updated our AT91 BSP to use DM, on field testing few boards went into a failed state due to gpio pullup

[PATCH v2 3/3] gpio: at91: Implement ops get_flags

2024-10-18 Thread Zixun LI
Add ops get_dir_flags() to read status from GPIO registers. Signed-off-by: Zixun LI --- Changes in v2: - Fix pullup read polarity --- drivers/gpio/at91_gpio.c | 45 1 file changed, 45 insertions(+) diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio

[PATCH 1/3] gpio: at91: Implement GPIOF_FUNC in get_function()

2024-10-18 Thread Zixun LI
This patch adds support for determining whether a gpio pin is mapped as peripheral function. Signed-off-by: Zixun LI --- drivers/gpio/at91_gpio.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index

[PATCH 3/3] gpio: at91: Implement ops get_flags

2024-10-18 Thread Zixun LI
Add ops get_dir_flags() to read status from GPIO registers. Signed-off-by: Zixun LI --- drivers/gpio/at91_gpio.c | 45 1 file changed, 45 insertions(+) diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 7828f9b447..c986007716 100644

[PATCH 2/3] gpio: at91: Implement ops set_flags

2024-10-18 Thread Zixun LI
Support GPIO configuration with following flags: - in, out, out_active - open_drain, pull_up Signed-off-by: Zixun LI --- drivers/gpio/at91_gpio.c | 41 1 file changed, 41 insertions(+) diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c

Re: [PATCH v2] mtd: nand: raw: atmel: Use ONFI ECC params if available

2024-10-09 Thread Zixun LI
Hi, sorry to bother, it seems like the patch is not picked up yet ? Zixun

Re: [PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-26 Thread Zixun LI
On Sun, Aug 25, 2024 at 2:13 AM Marek Vasut wrote: > > > > > I am looking at the usb_add_gadget_udc_release() and > > usb_gadget_probe_driver() and I am thinking, sigh, all that code is > > ready to be replaced by something cleaner which does not use this > > special struct usb_udc and udc_list, b

Re: [PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-23 Thread Zixun LI
On Fri, Aug 23, 2024 at 4:54 AM Marek Vasut wrote: > > I think udc_bind_to_driver() should not call usb_gadget_connect() , that > connect should likely be called by at some later point. Yes it's more logical, to keep it in disconnected state you prefer modify controllers drivers init (I can do us

Re: [PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-22 Thread Zixun LI
On Thu, Aug 22, 2024 at 5:24 PM Marek Vasut wrote: > > Can you change the g_dnl_register() prototype and pass he structure in ? > I suspect it should be available in the commands which register g_dnl ? > There are many places where g_dnl_register() is called, like fastboot, dfu, ums, etc, need to

Re: [PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-22 Thread Zixun LI
Hi, On Thu, Aug 22, 2024 at 1:26 AM Marek Vasut wrote: > > Would it be possible to fix up the g_dnl ? g_dnl's interface is pretty different from usb_ether, I can't find a way to access usb_gadget struct in g_dnl_register(). Meanwhile it can be fixed in udc core, by doing gadget_driver bind afte

Re: [PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-21 Thread Zixun LI
Hi Marek, On Wed, Aug 21, 2024 at 11:43 PM Marek Vasut wrote: > > Wouldn't it be better if usb_gadget_register_driver() started in > disconnected state right away ? That's what I did initially. But since g_dnl doesn't do connection after register (I explained in cover letter) doing so will keep

[PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-21 Thread Zixun LI
-110 usb usb1-port1: attempt power cycle Disable USB pullup to prevent unwanted enumeration attempt. Signed-off-by: Zixun LI --- drivers/usb/gadget/ether.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c ind

Re: [PATCH] usb: gadget: udc: Fix duplicate uclass name

2024-08-13 Thread Zixun LI
Hi Mattijs, On Tue, Aug 13, 2024 at 10:28 AM Mattijs Korpershoek wrote: > > Thank you for giving some board examples. I am still a bit unclear on > the meaning of: > > """ > This breaks the capacity of using "usb" as DT alias sequence numbering > which needs a fix afterwards. > """ > > I have add

Re: [PATCH] usb: gadget: udc: Fix duplicate uclass name

2024-08-07 Thread Zixun LI
Hi Mattijs, On Wed, Aug 7, 2024 at 9:07 AM Mattijs Korpershoek wrote: > > > Have you identified boards which use the DT alias that will break > with this patch? > > Maybe we can detail the required fix in the commit message a bit as well? > Or, if you know of a board that uses "usb" as DT alias s

Re: [PATCH] usb: gadget: ether: Handle gadget driver registration in start and stop

2024-08-07 Thread Zixun LI
Hi Mattijs, On Tue, Aug 6, 2024 at 4:00 PM Mattijs Korpershoek wrote: > > I'd like to test this on my end as well. Could you please give some > details on how this has been tested? > > A sequence of U-Boot commands would be helpful, for example. My tests are done on a custom ATMEL SAM9G25 board

[PATCH] cmd: bind: Use device sequence instead for driver bind/unbind

2024-08-02 Thread Zixun LI
Currently uclass index is used for bind/unbind which ignores alias sequence numbering. Use device sequence number instead as it's the number explicitly set in the DT. Also update documentation to use sequence number. Signed-off-by: Zixun LI --- cmd/bind.c

[PATCH] dm: core: Show device sequence instead in dm_dump_tree()

2024-08-02 Thread Zixun LI
Currently uclass index is shown in DM tree dump which ignores alias sequence numbering. The result could be confusing since these 2 numbers could be different. Show device sequence number instead as it's more meaningful. Also update documentation to use sequence number. Signed-off-by: Zix

[PATCH] usb: gadget: udc: Fix duplicate uclass name

2024-08-02 Thread Zixun LI
ng "usb" as DT alias sequence numbering which needs a fix afterwards. Signed-off-by: Zixun LI --- drivers/usb/gadget/udc/udc-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/udc-uclass.c b/drivers/usb/gadget/udc/udc-uclass.c index fbe62

Re: [RFC PATCH 0/4] dm: Duplicate uclass name fix and alias improvements

2024-08-01 Thread Zixun LI
nse to show the seq instead of the index, but > please update the header for the table to say 'Seq' Will do. > I assume no tests need updating, but please do add a note to > doc/usage/cmd/bind.rst Will do. Regards, Zixun LI

[RFC PATCH 4/4] usb: gadget: udc: Fix duplicate uclass name

2024-07-31 Thread Zixun LI
Currently both USB host uclass and USB gadget uclass are using the same name "usb" which break uclass functions like uclass_get_by_name(). Rename the uclass to "usb_gadget" while using "usb" as sequence alias naming to keep the alias function working. Signed-off-

[RFC PATCH 3/4] cmd: bind: Use device sequence instead for driver bind/unbind

2024-07-31 Thread Zixun LI
Currently uclass index is used for bind/unbind which ignores alias sequence numbering. Use device sequence number instead as it's the number explicitly set in the DT. Signed-off-by: Zixun LI --- cmd/bind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/bind.c

[RFC PATCH 2/4] dm: core: Show device sequence instead in dm_dump_tree()

2024-07-31 Thread Zixun LI
Currently uclass index is shown in DM tree dump which ignores alias sequence numbering. The result could be confusing since these 2 numbers could be different. Show device sequence number instead. Signed-off-by: Zixun LI --- drivers/core/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[RFC PATCH 0/4] dm: Duplicate uclass name fix and alias improvements

2024-07-31 Thread Zixun LI
which is not convered by this patch set, for example in drivers/net/sandbox.c, uclass_get_device() is used which is based on uclass index, while in the comments it says "index - The alias index (also DM seq number)" Zixun LI (4): dm: core: Add a way to specify an alt name for alias sequen

[RFC PATCH 1/4] dm: core: Add a way to specify an alt name for alias sequence numbering

2024-07-31 Thread Zixun LI
patch it's now possible to rename these classes without break the existing alias function. Signed-off-by: Zixun LI --- drivers/core/device.c | 3 ++- drivers/core/read.c | 7 ++- drivers/core/uclass.c | 11 +-- include/dm/read.h | 9 - include/dm/uclass.h | 2 ++ 5

cmd: bind/unbind by class index doesn't work with usb gadget

2024-07-26 Thread Zixun LI
Bind/unbind a gadget function driver to a USB gadget device doesn't work with class index, while using node path is ok. For example: U-Boot> dm tree Class Index Probed DriverName --- root 0 [ + ] root_driv

[PATCH] usb: gadget: ether: Handle gadget driver registration in start and stop

2024-07-26 Thread Zixun LI
, so the host won't see an unresponsive device. Signed-off-by: Zixun LI --- drivers/usb/gadget/ether.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index b7b7bacb00..ed55f12662 100644 --- a/

Re: [PATCH v4 0/7] usb: gadget: atmel: Code refactor and DM_USB_GADGET support

2024-07-25 Thread Zixun LI
On Thu, Jul 25, 2024 at 8:24 PM Marek Vasut wrote: > > On 7/25/24 5:31 PM, Zixun LI wrote: > > Changes in v4: > > - Release clocks if probe failed > > - Add missing endpoint data free > > - Addressed comments > > Please collect any AB/RB/TB tags that were pr

[PATCH v4 7/7] usb: gadget: atmel: Add DM_USB_GADGET support

2024-07-25 Thread Zixun LI
e included (sorted as Linux driver) Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 144 drivers/usb/gadget/atmel_usba_udc.h | 3 + include/linux/usb/atmel_usba_udc.h | 2 + 3 files changed, 149 insertions(+) diff --git a/drivers/usb/gadget/atmel_usb

[PATCH v4 6/7] usb: gadget: atmel: Add attach/detach support

2024-07-25 Thread Zixun LI
Add controller attach/detach support by using usb_gadget_ops.pullup() function. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c

[PATCH v4 5/7] usb: gadget: atmel: Rename atmel_usba_start()/_stop() to usba_udc_enable()/_disable()

2024-07-25 Thread Zixun LI
Rename atmel_usba_start() / atmel_usba_stop() to usba_udc_enable() / usba_udc_disable(), remove atmel_ prefix to be inline with other functions. Also avoid confusion with DM start() / stop() functions. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 8 1 file changed

[PATCH v4 4/7] usb: gadget: atmel: Move usba_udc_pdata() with other static functions

2024-07-25 Thread Zixun LI
To make all static functions in the top, no functional change. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 80 ++--- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget

[PATCH v4 3/7] usb: gadget: atmel: Fix typo in usb gadget driver register and unregister

2024-07-25 Thread Zixun LI
Replace "paramter" by "parameter". Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 4641638412..2e3d8f36a2

[PATCH v4 2/7] usb: gadget: atmel: Replace printf() and pr_err() by log_err()

2024-07-25 Thread Zixun LI
To have a uniform printing function, also drop linux/printk.h as no longer used. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget

[PATCH v4 1/7] usb: gadget: atmel: Sort includes

2024-07-25 Thread Zixun LI
Sort includes in alphabetical order. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index f99553df8d..5f78251fdb 100644 --- a

[PATCH v4 0/7] usb: gadget: atmel: Code refactor and DM_USB_GADGET support

2024-07-25 Thread Zixun LI
unbinding - Separate code refactor into 2 parts - Remove dead code Changes in v1: - Based on [PATCH RFC] usb: gadget: atmel: Add DM_USB_GADGET support: https://lists.denx.de/pipermail/u-boot/2024-July/559503.html - Addressed comments, moved the refactoring to a preparatory patch. Zixun LI (7

RE: usb gadget driver initialization issue

2024-07-23 Thread Zixun Li
> -Original Message- > From: Zixun Li > Sent: Monday, July 22, 2024 17:53 > To: 'Marek Vasut' ; Lukasz Majewski ; > open list ; Mattijs Korpershoek > > Subject: RE: usb gadget driver initialization issue > > Hi, this issue only affects usb_ether,

[PATCH v3 7/7] usb: gadget: atmel: Add DM_USB_GADGET support

2024-07-23 Thread Zixun LI
e included (sorted as Linux driver) Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 138 drivers/usb/gadget/atmel_usba_udc.h | 3 + include/linux/usb/atmel_usba_udc.h | 2 + 3 files changed, 143 insertions(+) diff --git a/drivers/usb/gadget/atmel_usb

[PATCH v3 6/7] usb: gadget: atmel: Add attach/detach support

2024-07-23 Thread Zixun LI
Add controller attach/detach support by using usb_gadget_ops.pullup() method. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index

[PATCH v3 5/7] usb: gadget: atmel: Rename atmel_usba_start()/_stop() to usba_udc_enable()/_disable()

2024-07-23 Thread Zixun LI
Rename atmel_usba_start() / atmel_usba_stop() to usba_udc_enable() / usba_udc_disable(), remove atmel_ prefix to be inline with other functions. Also avoid confusion with DM start() / stop() functions. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 8 1 file changed

[PATCH v3 4/7] usb: gadget: atmel: Move usba_udc_pdata() with other static functions

2024-07-23 Thread Zixun LI
To make all static functions in the top, no functional change. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 80 ++--- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget

[PATCH v3 2/7] usb: gadget: atmel: Replace printf() and pr_err() by log_err()

2024-07-23 Thread Zixun LI
To have a uniform printing function, also drop linux/printk.h as no longer used. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget

[PATCH v3 3/7] usb: gadget: atmel: Fix typo in usb_gadget_register_driver()

2024-07-23 Thread Zixun LI
Replace "paramter" by "parameter". Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 83fdc36870..2e3d8f36a2 1006

[PATCH v3 1/7] usb: gadget: atmel: Sort includes

2024-07-23 Thread Zixun LI
Sort includes in alphabetical order. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index f99553df8d..5f78251fdb 100644 --- a

[PATCH v3 0/7] usb: gadget: atmel: Code refactor and DM_USB_GADGET support

2024-07-23 Thread Zixun LI
] usb: gadget: atmel: Add DM_USB_GADGET support: https://lists.denx.de/pipermail/u-boot/2024-July/559503.html - Addressed comments, moved the refactoring to a preparatory patch. Zixun LI (7): usb: gadget: atmel: Sort includes usb: gadget: atmel: Replace printf() and pr_err() by log_err() usb

[PATCH v2 4/4] usb: gadget: atmel: Add DM_USB_GADGET support

2024-07-23 Thread Zixun LI
when DM_USB_GADGET is enabled. Disable legacy usba_udc_probe() to avoid conflict with DM when it's enabled. Compared to Linux driver only supported devices' DT bindings are included (sorted as Linux driver) Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_u

[PATCH v2 2/4] usb: gadget: atmel: Code refactor part 2

2024-07-23 Thread Zixun LI
- Rename atmel_usba_start() / atmel_usba_stop() to usba_udc_enable() / usba_udc_disable(), remove atmel_ prefix to be inline with other functions. Also avoid confusion with DM start() / stop() functions. - Replace printf() by log_err() - Spelling paramter -> parameter Signed-off-by: Zixun

[PATCH v2 1/4] usb: gadget: atmel: Code refactor part 1

2024-07-23 Thread Zixun LI
- Sort includes - Forward declare controller structures Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 59 +++-- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c

[PATCH v2 3/4] usb: gadget: atmel: Add attach/detach support

2024-07-23 Thread Zixun LI
Add controller attach/detach support by using usb_gadget_ops.pullup() method. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index

[PATCH v2 0/4] usb: gadget: atmel: Code refactor and DM_USB_GADGET support

2024-07-23 Thread Zixun LI
the refactoring to a preparatory patch. Zixun LI (4): usb: gadget: atmel: Code refactor part 1 usb: gadget: atmel: Code refactor part 2 usb: gadget: atmel: Add attach/detach support usb: gadget: atmel: Add DM_USB_GADGET support drivers/usb/gadget/atmel_usba_udc.c | 214

RE: usb gadget driver initialization issue

2024-07-22 Thread Zixun Li
> -Original Message- > From: Marek Vasut > Sent: Saturday, July 20, 2024 22:12 > > Can you please send an RFC patch ? > > > I see recently there are many DM related reworking, please forgive me > > if it's already on the Todo list. > > It is not on the ToDo list, no. > > +CC Mattijs H

[PATCH v2] mtd: nand: raw: atmel: Use ONFI ECC params if available

2024-07-22 Thread Zixun LI
ds and chip->ecc_step_ds became nanddev_get_ecc_requirements(). U-Boot didn't follow the refactor and always use these 2 fields. v2: Fix formatting, add upstream commit hash. Signed-off-by: Zixun LI --- drivers/mtd/nand/raw/atmel/nand-controller.c | 4 1 file changed, 4 insertions(+) diff

usb gadget driver initialization issue

2024-07-20 Thread Zixun Li
usb1-port1: attempt power cycle I think it's better to leave the device in disconnected state while probing and connect it once a gadget function is invoked. I see recently there are many DM related reworking, please forgive me if it's already on the Todo list. -- Zixun LI

[PATCH RFC] usb: gadget: atmel: Add DM_USB_GADGET support

2024-07-19 Thread Zixun Li
included as they are not supported by the driver yet. Signed-off-by: Zixun LI --- drivers/usb/gadget/atmel_usba_udc.c | 196 1 file changed, 169 insertions(+), 27 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index

RE: [PATCH] mtd: nand: raw: atmel: Use ONFI ECC params if available

2024-07-18 Thread Zixun Li
for the format issue. Is there any comment from maintainers ? I'll push a v2 if this patch is considered. -- Zixun LI

[PATCH] mtd: nand: raw: atmel: Use ONFI ECC params if available

2024-07-09 Thread Zixun Li
When ECC parameters are not specified in DT, first try ONFI ECC parameters before fallback to maximum strength. To be inline with kernel driver behavior. Signed-off-by: Zixun LI --- drivers/mtd/nand/raw/atmel/nand-controller.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/mtd

[PATCH v2] atmel_sdhci: Force card-detect if MMC_CAP_NONREMOVABLE.

2023-05-17 Thread Zixun LI
If the device attached to the MMC bus is not removable, set force card-detect bit to bypass card detection procedure, so card detection pin can be used for other purposes. It's also a workaround for SAMA5D2 who doesn't drive CMD if using GPIO for card detection. Signed-off-by

[PATCH v2] atmel_sdhci: Force card-detect if MMC_CAP_NONREMOVABLE.

2023-05-15 Thread Zixun LI
Signed-off-by: Zixun LI --- drivers/mmc/atmel_sdhci.c | 40 +-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c index 37b0beeed4..ae56266f57 100644 --- a/drivers/mmc/atmel_sdhci.c +++ b

RE: atmel_sdhci: SDMMC_CD pin still needed for card detection despite EMMC set to non-removable

2023-05-04 Thread Zixun Li
IO line. https://github.com/linux4sam/linux-at91/blob/068eaa6b4b087b3a86fc4624d0f4083844e93f1c/drivers/mmc/host/sdhci-of-at91.c#L551 I've refactored the code, setting FCD bit after sdhci_probe() with a separate function to make the purpose more clear. From 90177e7af8226b88dfbfc08639f768881562a

RE: atmel_sdhci: SDMMC_CD pin still needed for card detection despite EMMC set to non-removable

2023-05-01 Thread Zixun Li
Hi, > Can you find some place to set this bit in the atmel sdhci driver, and not in > the core? > The MC1R register is specific to at91 device. I've overridden get_cd of the driver, below is the patch: From e186af71297e9ae6ce241a85bff64683949f0e1b Mon Sep 17 00:00:00 2001 From:

atmel_sdhci: SDMMC_CD pin still needed for card detection despite EMMC set to non-removable

2023-04-27 Thread Zixun Li
Hardware: SAMA5D27 customized board, EMMC connected to SDMMC0. SDMMC0_CD pin pulled-down for BootROM card detection, once booted it used as LED output. Software: u-boot-at91 76f7f55 Issue: U-Boot can't detect EMMC despite it set to non-removable in DT, unless SDMMC0_CD pin is used (so this pin