[PATCH] configs: capricorn_cxg3: Enable CMD_WDT

2025-01-13 Thread A. Sverdlin
From: Alexander Sverdlin Capricorn boards have WDT (WDT_SIEMENS_PMIC) and U-Boot is not configured to trigger the WDT. Enable the "wdt" command to be able to stop the WDT from the command line. Signed-off-by: Alexander Sverdlin --- configs/capricorn_cxg3_defconfig | 1 + 1 file changed, 1 inse

[PATCH] net: fec: phy: Don't advertise Gbit on (R)MII

2024-12-12 Thread A. Sverdlin
From: Alexander Sverdlin Currently if a gigabit-capable PHY is connected to FEC via RMII or MII, it will advertise 1000FULL and 1000HALF to a link partner. Different problems may arise here: - usually with (R)MII between MAC and PHY the PHY's connection to magnetics would have only 2 pairs route

[PATCH v2] watchdog: rti: drop hack manipulating WDT clock rate

2024-11-21 Thread A. Sverdlin
From: Alexander Sverdlin The hack itself seems to be copied from Linux rti_wdt.c, but the WDT reset principle is different in U-Boot. While Linux relies on correct frequencies and timers and doesn't check the actual WDT counter value U-Boot driver seems to be more robust: it does compare RTIDWDCN

[PATCH] watchdog: rti: drop hack manipulating WDT clock rate

2024-11-20 Thread A. Sverdlin
From: Alexander Sverdlin The hack itself seems to be copied from Linux rti_wdt.c, but the WDT reset principle is different in U-Boot. While Linux relies on correct frequencies and timers and doesn't check the actual WDT counter value U-Boot driver seems to be more rubust: it does compare RTIDWDCN

[PATCH] watchdog: rti: support SPL (or re-start)

2024-11-08 Thread A. Sverdlin
From: Alexander Sverdlin If the RTI watchdog has been enabled in SPL, enabling it in U-Boot proper fails because it can only be enabled once in HW and never stopped. This however leads to a situation that wdt_cyclic() watchdog trigger is not being started any longer and the WDT fires at some poin

[PATCH] net: remove duplicate eth_env_set_enetaddr_by_index() declaration

2024-07-08 Thread A. Sverdlin
From: Alexander Sverdlin eth_env_set_enetaddr_by_index() declaration is duplicated in eth_internal.h and net.h, but all units including eth_internal.h already include net.h. Remove the superfluous declaration. Signed-off-by: Alexander Sverdlin --- net/eth_internal.h | 16 1 fi

[PATCH] net: tftp: don't call stop callback from UDP handler

2024-05-12 Thread A. Sverdlin
From: Alexander Sverdlin Contrary to doc/develop/driver-model/ethernet.rst contract, eth_ops .free_pkt can be called after .stop, there are several error paths in TFTP, for instance: eth_halt() <= tftp_handler() <= net_process_received_packet() <= eth_rx() ... am65_cpsw_free_pkt() <= eth_rx() W

[PATCH] net: ti: am65-cpsw-nuss: don't touch DMA after stop

2024-05-08 Thread A. Sverdlin
From: Alexander Sverdlin Contrary to doc/develop/driver-model/ethernet.rst contract, eth_ops .free_pkt can be called after .stop, there are several error paths in TFTP, for instance: eth_halt() <= tftp_handler() <= net_process_received_packet() <= eth_rx() ... am65_cpsw_free_pkt() <= eth_rx() W

[PATCH] mmc: sdhci: Correct ADMA_DESC_LEN to 12

2024-05-01 Thread A. Sverdlin
From: Alexander Sverdlin Commit 37cb626da25d0d ("mmc: sdhci: Add Support for ADMA2") introduced ADMA_DESC_LEN == 16 (64 bit case), but it was never used before commit 74755c1fed1b0 ("mmc: sdhci: introduce adma_write_desc() hook to struct sdhci_ops"). "sizeof(struct sdhci_adma_desc)" (== 12 for

[PATCH 6/6] usb: dwc3: gadget: Disable GUSB2PHYCFG.SUSPHY for End Transfer

2024-04-12 Thread A. Sverdlin
From: Thinh Nguyen Upstream Linux commit 3aa07f72894d. If there's a disconnection while operating in eSS, there may be a delay in VBUS drop response from the connector. In that case, the internal link state may drop to operate in usb2 speed while the controller thinks the VBUS is still high. The

[PATCH 5/6] usb: dwc3: gadget: properly check ep cmd

2024-04-12 Thread A. Sverdlin
. Reported-by: Janusz Dziedzic Signed-off-by: Felipe Balbi [A. Sverdlin: cherry-picked only DWC3_DEPCMD_CMD() define] Signed-off-by: Alexander Sverdlin --- drivers/usb/dwc3/core.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index

[PATCH 4/6] usb: dwc3: gadget: Check ENBLSLPM before sending ep command

2024-04-12 Thread A. Sverdlin
From: Thinh Nguyen Upstream Linux commit 87dd96111b0b. When operating in USB 2.0 speeds (HS/FS), if GUSB2PHYCFG.ENBLSLPM or GUSB2PHYCFG.SUSPHY is set, it must be cleared before issuing an endpoint command. Current implementation only save and restore GUSB2PHYCFG.SUSPHY configuration. We must sa

[PATCH 3/6] usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED

2024-04-12 Thread A. Sverdlin
From: Felipe Balbi Upstream Linux commit ab2a92e7a608. As a micro-power optimization, let's only resume the USB2 PHY if we're working on <=HIGHSPEED. If we're gonna work on SUPERSPEED or SUPERSPEED+, there's no point in resuming the USB2 PHY. Fixes: 2b0f11df84bb ("usb: dwc3: gadget: clear SUSPH

[PATCH 2/6] usb: dwc3: gadget: clear SUSPHY bit before ep cmds

2024-04-12 Thread A. Sverdlin
From: Felipe Balbi Upstream Linux commit 2b0f11df84bb. Synopsys Databook 2.60a has a note that if we're sending an endpoint command we _must_ make sure that DWC3_GUSB2PHY(n).SUSPHY bit is cleared. This patch implements that particular detail. Signed-off-by: Felipe Balbi Signed-off-by: Alexand

[PATCH 1/6] usb: dwc3: gadget: combine return points into a single one

2024-04-12 Thread A. Sverdlin
From: Felipe Balbi Upstream Linux commit c0ca324d09a0. dwc3_send_gadget_ep_cmd() had three return points. That becomes a pain to track when we need to debug something or if we need to add more code before returning. Let's combine all three return points into a single one just by introducing a l

[PATCH 0/6] usb: dwc3: gadget: avoid EP command timeout

2024-04-12 Thread A. Sverdlin
From: Alexander Sverdlin While there are happy users who successfully have been using DFU on TI AM62x [1][2], there are also others who were not so lucky up to now [3]. I felt into latter category and was wondering why I observe this: -- U-Boot SPL 2024.04-61876f393762 (Apr 11 2024 - 09:27:15 +

[PATCH v2] net: ti: am65-cpsw-nuss: handle missing PHY in am65_cpsw_phy_init() gracefully

2024-03-27 Thread A. Sverdlin
From: Alexander Sverdlin am65_cpsw_ofdata_parse_phy() tries to handle the case when PHY is not specified in DT gracefully: am65_cpsw_nuss_port ethernet@800port@1: can't parse phy-handle port 1 (-2) am65_cpsw_mdio_init() in turn is prepared for this, checks if priv->has_phy == 0 and bails ou

[PATCH] net: ti: am65-cpsw-nuss: Don't crash in am65_cpsw_phy_init()

2024-03-27 Thread A. Sverdlin
From: Alexander Sverdlin am65_cpsw_ofdata_parse_phy() tries to handle the case when PHY is not specified in DT gracefully: am65_cpsw_nuss_port ethernet@800port@1: can't parse phy-handle port 1 (-2) am65_cpsw_mdio_init() is turn is prepared for this, checks if priv->has_phy == 0 and bails ou