patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>
Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev,
	devicetree@vger.kernel.org,
	Douglas Anderson <dianders@chromium.org>,
	Pin-yen Lin <treapking@chromium.org>,
	Herve Codina <herve.codina@bootlin.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Roy Luo <royluo@google.com>, Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-usb@vger.kernel.org, maciek swiech <drmasquatch@google.com>,
	Matthias Kaehlcke <mka@chromium.org>
Subject: [PATCH v2 0/2] usb: Set connect_type of hub ports based on DT
Date: Thu, 22 Feb 2024 16:58:19 -0800	[thread overview]
Message-ID: <20240223005823.3074029-1-swboyd@chromium.org> (raw)

This is split off of a larger series[1] that describes the USB and DP
topology of ARM chromebooks such as Trogdor (sc7180-trogdor.dtsi). These
patches can land at any time, so I'm sending them split out to hopefully
focus review and land them earlier.

The first patch updates the realtek binding to describe the downstream
facing ports (it has 4 ports). Child devices can also be hard-wired to
the hub, in which case the binding allows those devices to only have reg
properties with the valid port numbers (1 through 4).

The second patch sets the connect_type member of the usb port to reflect
what the DT binding indicates. More details are in the patch, but the
general goal is to set the connect_type based on DT so that it can be
queried by userspace in sysfs. ChromeOS wants to know if a usb device is
hard-wired or not so it can apply more or less security to the device.

Changes from v1 (https://lore.kernel.org/r/20240210070934.2549994-4-swboyd@chromium.org):
 * Moved the code to of.c to keep it tidy
 * Updated the check for child nodes to only be for usb devices or graph
   binding in case of things like HSIC where a child node 'ulpi' could
   exist
 * Fixed the binding to have #size-cells and #address-cells

Stephen Boyd (2):
  dt-bindings: usb: Add downstream facing ports to realtek binding
  usb: core: Set connect_type of ports based on DT node

 .../bindings/usb/realtek,rts5411.yaml         | 55 ++++++++++++++
 drivers/usb/core/of.c                         | 71 +++++++++++++++++++
 drivers/usb/core/port.c                       |  2 +
 include/linux/usb/of.h                        |  7 ++
 4 files changed, 135 insertions(+)

Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: <linux-usb@vger.kernel.org>
Cc: maciek swiech <drmasquatch@google.com>
Cc: Matthias Kaehlcke <mka@chromium.org>

[1] https://lore.kernel.org/r/20240210070934.2549994-1-swboyd@chromium.org

base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
-- 
https://chromeos.dev


             reply	other threads:[~2024-02-23  0:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23  0:58 Stephen Boyd [this message]
2024-02-23  0:58 ` [PATCH v2 1/2] dt-bindings: usb: Add downstream facing ports to realtek binding Stephen Boyd
2024-03-01 17:56   ` Rob Herring
2024-02-23  0:58 ` [PATCH v2 2/2] usb: core: Set connect_type of ports based on DT node Stephen Boyd

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=20240223005823.3074029-1-swboyd@chromium.org \
    --to=swboyd@chromium.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=drmasquatch@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=herve.codina@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=patches@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=royluo@google.com \
    --cc=stern@rowland.harvard.edu \
    --cc=treapking@chromium.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).