Skip to content

Cros-usbpd-charger error -71 in journal #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 tasks
andreaippo opened this issue Nov 6, 2024 · 6 comments
Open
2 tasks

Cros-usbpd-charger error -71 in journal #2

andreaippo opened this issue Nov 6, 2024 · 6 comments
Labels
bug Something isn't working EC EC related Issue Laptop 13 - AMD Ryzen 7040 Framework Laptop 13 (AMD Ryzen™ 7040 Series) Laptop 13 - Intel Ultra Series 1 Framework Laptop 13 (Intel® Core™ Ultra Series 1) Laptop 16 AMD Ryzen 7040 Framework Laptop 16 (AMD Ryzen™ 7040 Series)

Comments

@andreaippo
Copy link

Device Information

System Model or SKU

Please select one of the following

  • Framework Laptop 13 (AMD Ryzen™ 7040 Series)

BIOS VERSION

03.05

DIY Edition information

If you are experiencing an issue on a DIY system, Please also fill out the memory and storage devices you are using.

Memory: Manufacture and SKU
Crucial DDR5-5600 CT16G56C46S5.M8G1 (https://www.amazon.it/Crucial-5600MHz-5200MHz-Portatile-CT16G56C46S5/dp/B0BLTDRRLF?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dib=eyJ2IjoiMSJ9.UCVENdfzRFgchPDy2Umg6UgjMdbodZ0myHJ2sYl3iW_GjHj071QN20LucGBJIEps.L3stUHcSAdXgi6Am_DrgDlfB7wl1qKTtllpubnJqHXU&dib_tag=se&keywords=CT16G56C46S5&qid=1730880495&sr=8-1&th=1)

Storage: Manufacture and SKU
Lexar NM790 1TB

Port/Peripheral information

I'm using a USB-C 7 (or 8)-in-1 dongle by ANKER. It's plugged into one of the USB-C adapters at the back of my FW 13 and acts as a charging bypass as well as expansion hub allowing me to plug an HDMI external monitor and two USB-A radio receivers (for wireless mouse and keyboard).

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 32ac:0002 Framework HDMI Expansion Card
Bus 001 Device 003: ID 27c6:609c Shenzhen Goodix Technology Co.,Ltd. Goodix Fingerprint USB Device
Bus 001 Device 004: ID 0e8d:e616 MediaTek Inc. Wireless_Device
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0bda:5634 Realtek Semiconductor Corp. Laptop Camera
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 002: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub             
Bus 007 Device 003: ID 2109:2817 VIA Labs, Inc. USB2.0 Hub             
Bus 007 Device 004: ID 248a:8327 Maxxter Wireless Receiver
Bus 007 Device 005: ID 062a:4102 MosArt Semiconductor Corp. Wireless Mouse
Bus 007 Device 006: ID 291a:8383 Anker                   Anker USB-C HUB Device 
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 002: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub             
Bus 008 Device 003: ID 2109:0817 VIA Labs, Inc. USB3.0 Hub             
Bus 008 Device 004: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 008 Device 005: ID 2537:1081 Norelsys NS1081

Standalone Operation

Are you running your mainboard as a standalone device. Is standalone mode enabled in the BIOS?

  • No

Describe the bug

A clear and concise description of what the bug is.

Steps To Reproduce

  • Boot device on Linux (opensuse Tumbleweed 20241104 or any other recent snapshot)
  • check journalctl -b -k logs and look for cros-
  • notice errors related to cros modules:
Oct 31 08:16:53 andromeda kernel: cros-charge-control cros-charge-control.4.auto: Framework charge control detected, preventing load
Oct 31 08:16:53 andromeda kernel: cros-usbpd-charger cros-usbpd-charger.5.auto: No USB PD charging ports found
Oct 31 08:16:53 andromeda kernel: cros-usbpd-charger cros-usbpd-charger.5.auto: Unexpected number of charge port count
Oct 31 08:16:53 andromeda kernel: cros-usbpd-charger cros-usbpd-charger.5.auto: Failing probe (err:0xffffffb9)
Oct 31 08:16:53 andromeda kernel: cros-usbpd-charger cros-usbpd-charger.5.auto: probe with driver cros-usbpd-charger failed with error -71

Expected behavior

No errors in the logs

Screenshots

N/A

Operating System (please complete the following information):

  • OS/Distribution: opensuse tumbleweed snapshot 20241104
  • Linux Kernel Version: 6.11.5-2-default (opensuse tumbleweed's)

Additional context

@andreaippo
Copy link
Author

Logs:
cros-usbpd-charger-error--71.txt

@DHowett DHowett added bug Something isn't working Laptop 13 - AMD Ryzen 7040 Framework Laptop 13 (AMD Ryzen™ 7040 Series) Laptop 13 - Intel Ultra Series 1 Framework Laptop 13 (Intel® Core™ Ultra Series 1) Laptop 16 AMD Ryzen 7040 Framework Laptop 16 (AMD Ryzen™ 7040 Series) EC EC related Issue 3.05 and removed 3.05 labels Nov 6, 2024
@DHowett
Copy link
Collaborator

DHowett commented Nov 6, 2024

Relevant discussion on LKML

Additional information snipped from e-mails:


EC_FEATURE_USB_PD should not be enabled by CHARGE_MANAGER, rather,
it should be enabled by USB_POWER_DELIVERY. That seems an oversight on
the part of the upstream ec maintainers.

diff --git a/common/ec_features.c b/common/ec_features.c
index b7e16ec6ba..781094a884 100644
--- a/common/ec_features.c
+++ b/common/ec_features.c
@@ -82,7 +82,7 @@ uint32_t get_feature_flags0(void)
 #ifdef CONFIG_HOSTCMD_PD
                          | EC_FEATURE_MASK_0(EC_FEATURE_SUB_MCU)
 #endif
-#ifdef CONFIG_CHARGE_MANAGER
+#ifdef CONFIG_USB_POWER_DELIVERY
                          | EC_FEATURE_MASK_0(EC_FEATURE_USB_PD)
 #endif
 #ifdef CONFIG_ACCEL_FIFO

@sdmcclain
Copy link

I am seeing the same error in the journalctl logs of my Framework 16. What is the impact of this issue on the operation of the laptop?

@DHowett
Copy link
Collaborator

DHowett commented Dec 2, 2024

This does not impact the functioning of the laptop.

JohnAZoidberg added a commit to FrameworkComputer/EmbeddedController that referenced this issue Mar 3, 2025
The linux kernel driver cros-usbpd-charger uses host commands and events
commands from both configurations.

Currently it fails on all our platforms with the dmesg log:
[   24.706760] cros-usbpd-charger cros-usbpd-charger.7.auto: No USB PD charging ports found

See Linux kernel sources:
- drivers/power/supply/cros_usbpd-charger.c
  - EC_CMD_CHARGE_PORT_COUNT
  - EC_CMD_USB_PD_PORTS
  - EC_CMD_USB_PD_DISCOVERY
  - EC_CMD_USB_PD_POWER_INFO
  - EC_CMD_EXTERNAL_POWER_LIMIT
- drivers/platform/chrome/cros_usbpd_notify.c
  - EC_CMD_PD_HOST_EVENT_STATUS
- drivers/mfd/cros_ec_dev.c
  - EC_FEATURE_USB_PD

EC_FEATURE_USB_PD is bit 22.

```
ec:~> feat
0-31: 0x0247e6ae
32-63: 0x00000207

ec:~> feat
0-31: 0x0207e6ae
32-63: 0x00000207
```

BUG=FrameworkComputer/SoftwareFirmwareIssueTracker#2
BRANCH=fwk-main
TEST=Check feat command on EC console to check bit 22 is 0. And check dmesg on Linux for cros-usbpd-charger error message

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@quinchou77
Copy link

The code has been merged. Will be released in the future release.

kiram9 pushed a commit to FrameworkComputer/EmbeddedController that referenced this issue Apr 15, 2025
The linux kernel driver cros-usbpd-charger uses host commands and events
commands from both configurations.

Currently it fails on all our platforms with the dmesg log:
[   24.706760] cros-usbpd-charger cros-usbpd-charger.7.auto: No USB PD charging ports found

See Linux kernel sources:
- drivers/power/supply/cros_usbpd-charger.c
  - EC_CMD_CHARGE_PORT_COUNT
  - EC_CMD_USB_PD_PORTS
  - EC_CMD_USB_PD_DISCOVERY
  - EC_CMD_USB_PD_POWER_INFO
  - EC_CMD_EXTERNAL_POWER_LIMIT
- drivers/platform/chrome/cros_usbpd_notify.c
  - EC_CMD_PD_HOST_EVENT_STATUS
- drivers/mfd/cros_ec_dev.c
  - EC_FEATURE_USB_PD

EC_FEATURE_USB_PD is bit 22.

```
ec:~> feat
0-31: 0x0247e6ae
32-63: 0x00000207

ec:~> feat
0-31: 0x0207e6ae
32-63: 0x00000207
```

BUG=FrameworkComputer/SoftwareFirmwareIssueTracker#2
BRANCH=fwk-main
TEST=Check feat command on EC console to check bit 22 is 0. And check dmesg on Linux for cros-usbpd-charger error message

Signed-off-by: Daniel Schaefer <dhs@frame.work>
(cherry picked from commit e444bed03ed90106577207fd1837a8a07aa6ba67)
kiram9 pushed a commit to FrameworkComputer/EmbeddedController that referenced this issue Apr 15, 2025
The linux kernel driver cros-usbpd-charger uses host commands and events
commands from both configurations.

Currently it fails on all our platforms with the dmesg log:
[   24.706760] cros-usbpd-charger cros-usbpd-charger.7.auto: No USB PD charging ports found

See Linux kernel sources:
- drivers/power/supply/cros_usbpd-charger.c
  - EC_CMD_CHARGE_PORT_COUNT
  - EC_CMD_USB_PD_PORTS
  - EC_CMD_USB_PD_DISCOVERY
  - EC_CMD_USB_PD_POWER_INFO
  - EC_CMD_EXTERNAL_POWER_LIMIT
- drivers/platform/chrome/cros_usbpd_notify.c
  - EC_CMD_PD_HOST_EVENT_STATUS
- drivers/mfd/cros_ec_dev.c
  - EC_FEATURE_USB_PD

EC_FEATURE_USB_PD is bit 22.

```
ec:~> feat
0-31: 0x0247e6ae
32-63: 0x00000207

ec:~> feat
0-31: 0x0207e6ae
32-63: 0x00000207
```

BUG=FrameworkComputer/SoftwareFirmwareIssueTracker#2
BRANCH=fwk-main
TEST=Check feat command on EC console to check bit 22 is 0. And check dmesg on Linux for cros-usbpd-charger error message

Signed-off-by: Daniel Schaefer <dhs@frame.work>
(cherry picked from commit e444bed03ed90106577207fd1837a8a07aa6ba67)
@JohnAZoidberg
Copy link
Member

JohnAZoidberg commented Apr 22, 2025

Public commits:

All new platforms in 2025 will ship with this change already included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working EC EC related Issue Laptop 13 - AMD Ryzen 7040 Framework Laptop 13 (AMD Ryzen™ 7040 Series) Laptop 13 - Intel Ultra Series 1 Framework Laptop 13 (Intel® Core™ Ultra Series 1) Laptop 16 AMD Ryzen 7040 Framework Laptop 16 (AMD Ryzen™ 7040 Series)
Projects
None yet
Development

No branches or pull requests

6 participants
@DHowett @andreaippo @JohnAZoidberg @sdmcclain @quinchou77 and others