mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Snyders <robin@snyders.xyz>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Casey Connolly <casey.connolly@linaro.org>,
	Sebastian Reichel <sre@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Joel Selvaraj <foss@joelselvaraj.com>,
	linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Robin Snyders <robin@snyders.xyz>
Subject: Re: [PATCH v3 2/2] power: supply: qcom_smbx: add SMB5 support
Date: Sun, 18 Oct 2026 20:44:59 +0200	[thread overview]
Message-ID: <7e5c96b8-e1ae-4819-874f-db818061be58@mail.infomaniak.com> (raw)
In-Reply-To: <hryxv7fl3alrhnekb7bqn5zgexdyv3p6ndug7kp3uqxsiiwmsv@wtvg3za3qspu>

Hi Dmitry,

Sorry for the long delay in getting back to you on this.

On Thu, Aug 13, 2026 at 06:52:24PM +0300, Dmitry Baryshkov wrote:
> I remember that in SMB2 case the TCPM and charger drivers were
> programming the registers from the same block. Is there no such conflict
> on the SMB5 platforms?

On PM8150B the register sets are disjoint. The charger node sits at
0x1000, the dedicated Type-C port at 0x1500 and the PD PHY at 0x1700.
With SMB5, qcom_smbx only writes the charger core (0x1042, 0x1061,
0x1070), DCDC (0x1108, 0x110b), USB input / BC1.2 (0x1340-0x1380) and
the watchdog/AICL timer (0x1651-0x1661) blocks. qcom_pmic_typec writes
are all in 0x1544-0x1560, and the PD PHY stays in its 0x1700 block.

The one name that looks like an overlap is TYPE_C_CFG, but on SMB5
that is offset 0x358, i.e. 0x1358 in the USB input peripheral, and not
the Type-C port register at 0x1544. The driver only clears
APSD_START_ON_CC_BIT there, so that BC1.2 detection is not started
directly from CC state while TCPM owns the port.

By design, the SMB5 path also leaves Type-C power role and VBUS control
to TCPM and the qcom_usb_vbus regulator. It does not touch OTG/VBUS
boost, and it only clears the HVDCP modes so stale firmware settings
cannot raise VBUS.

> Have you tested that this doesn't break the USB-C
> dongles being connected to the device?

Yes. I validated the exact v4 driver on a OnePlus 7T Pro (PM8150B,
6.16-based board tree; the only other change was an
unrelated SLPI debug parameter in qcom_q6v5_pas.c) with TCPM
managing the port, in both plug orientations:

- Powered dock: the phone became data host and power sink (USB PD,
  usb_vbus disabled). The USB 2/3 hubs, an RTL8153 Ethernet adapter
  and a mass storage device enumerated, and a 64 MiB read gave the
  same hash every time. The charger stayed online, health Good.

- The same dock with its external power removed: the phone stayed
  data host and switched to power source, with usb_vbus enabled. The
  hubs, Ethernet adapter and storage re-enumerated and worked, and
  the storage hash matched. The SMB5 charger correctly reported
  offline/discharging.

- Then back to a PC cable without rebooting: device/sink roles
  returned, usb_vbus was disabled, USB gadget networking and SSH
  worked again, and the charger resumed charging at its 500 mA
  limit.

None of these transitions produced an oops, lockdep splat, UVLO, OCP
or OVP event. Ethernet traffic (no cable at hand) and visual
DisplayPort output were not part of that run.

I'll repeat this on the exact v5 tree before sending it, and summarize
the register ownership and these results in the v5 changelog.

Thanks,
Robin

  reply	other threads:[~2026-10-18 18:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 10:45 [PATCH v3 0/2] " Robin Snyders via B4 Relay
2026-08-13 10:45 ` [PATCH v3 1/2] dt-bindings: power: supply: qcom,pmi8998-charger: add SMB5 PMICs Robin Snyders via B4 Relay
2026-08-13 10:45 ` [PATCH v3 2/2] power: supply: qcom_smbx: add SMB5 support Robin Snyders via B4 Relay
2026-08-13 15:52   ` Dmitry Baryshkov
2026-10-18 18:44     ` Robin Snyders [this message]
2026-10-19  0:08       ` Dmitry Baryshkov

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=7e5c96b8-e1ae-4819-874f-db818061be58@mail.infomaniak.com \
    --to=robin@snyders.xyz \
    --cc=casey.connolly@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=foss@joelselvaraj.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sre@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

all inboxes | Powered by JetHome®