All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Felipe Balbi <balbi@kernel.org>,
	Wesley Cheng <quic_wcheng@quicinc.com>,
	Saravana Kannan <saravanak@google.com>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Frank Li <Frank.li@nxp.com>,
	linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 00/12] usb: dwc3: qcom: Flatten dwc3 structure
Date: Thu, 23 Jan 2025 15:22:59 -0600	[thread overview]
Message-ID: <20250123212259.GA381176-robh@kernel.org> (raw)
In-Reply-To: <3kuydb3b3ky4gczh5dyjjdcka2xlzgcv3ged4d432fgrprx7hr@byi7eg5fdvop>

On Wed, Jan 22, 2025 at 09:07:43PM -0600, Bjorn Andersson wrote:
> On Wed, Jan 15, 2025 at 12:51:42PM -0600, Rob Herring wrote:
> > On Tue, Jan 14, 2025 at 5:04 PM Bjorn Andersson <andersson@kernel.org> wrote:
> > >
> > > On Tue, Jan 14, 2025 at 11:44:52AM -0600, Rob Herring wrote:
> > > > On Mon, Jan 13, 2025 at 09:11:33PM -0800, Bjorn Andersson wrote:
> > > > > The USB IP-block found in most Qualcomm platforms is modelled in the
> > > > > Linux kernel as 3 different independent device drivers, but as shown by
> > > > > the already existing layering violations in the Qualcomm glue driver
> > > > > they can not be operated independently.
> > > > >
> > > > > With the current implementation, the glue driver registers the core and
> > > > > has no way to know when this is done. As a result, e.g. the suspend
> > > > > callbacks needs to guard against NULL pointer dereferences when trying
> > > > > to peek into the struct dwc3 found in the drvdata of the child.
> > > > >
> > > > > Missing from the upstream Qualcomm USB support is proper handling of
> > > > > role switching, in which the glue needs to be notified upon DRD mode
> > > > > changes. Several attempts has been made through the years to register
> > > > > callbacks etc, but they always fall short when it comes to handling of
> > > > > the core's probe deferral on resources etc.
> > > > >
> > > > > Furhtermore, the DeviceTree binding is a direct representation of the
> > > > > Linux driver model, and doesn't necessarily describe "the USB IP-block".
> > > > >
> > > > > This series therefor attempts to flatten the driver split, and operate
> > > > > the glue and core out of the same platform_device instance. And in order
> > > > > to do this, the DeviceTree representation of the IP block is flattened.
> > > > >
> > > > > To avoid littering the dwc3-qcom driver with the migration code - which
> > > > > we should be able to drop again in a LTS or two - this is now placed in
> > > > > drivers/of/overlays.
> > > > >
> > > > > A patch to convert a single platform - sc8280xp - is included in the
> > > > > series. The broader conversion will be submitted in a follow up series.
> > > >
> > > > Is it not possible to use the same overlays also fixup the .dts files at
> > > > build time?
> > > >
> > >
> > > I presume so. What would the benefit of that be, over fixing up the
> > > source asap?
> > 
> > The overlays would live with all the other dts files (I think kbuild
> > can add built-in dtbs from arch/*/boot/dts/). We can test at build
> > time they actually apply, and ensure the new dtb matches what the
> > fixup overlay creates.
> > 
> 
> That does sounds tempting, in particular since it sounds like it would
> provide  us with dt-validation of the end result.
> 
> But, the build-time overlaid dtb files wouldn't be complete, as I
> programmatically transition some of the properties - to "fix" that I'd
> have to provide an overlay per board.
> 
> Second, it was my intention to transition all the boards to the new
> binding as soon as possible, to avoid adding more overlays when new
> boards are added. So any support-system we build up for this, would be
> immediately obsoleted.

Ok, fair enough.

I would still prefer the overlays live in arch/*/boot/dts/qcom/ even if 
we don't do the rest.

Rob

  reply	other threads:[~2025-01-23 21:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14  5:11 [PATCH v3 00/12] usb: dwc3: qcom: Flatten dwc3 structure Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 01/12] dt-bindings: usb: snps,dwc3: Split core description Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 02/12] dt-bindings: usb: Introduce qcom,snps-dwc3 Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 03/12] of: dynamic: Add of_changeset_add_prop_copy() Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 04/12] of: overlays: Introduce dwc3 flattening overlay Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 05/12] of: overlays: dwc3-flattening: Add Qualcomm Arm32 overlays Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 06/12] of: overlays: dwc3-flattening: Add Qualcomm Arm64 board overlays Bjorn Andersson
2025-01-14 17:42   ` Rob Herring
2025-01-14 22:46     ` Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 07/12] of: overlays: dwc3-flattening: Provide overlay symbols Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 08/12] usb: dwc3: core: Expose core driver as library Bjorn Andersson
2025-01-14 19:43   ` Frank Li
2025-01-14 22:55     ` Bjorn Andersson
2025-01-15  1:56       ` Thinh Nguyen
2025-01-15  2:59         ` Thinh Nguyen
2025-01-14  5:11 ` [PATCH v3 09/12] usb: dwc3: core: Don't touch resets and clocks Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 10/12] usb: dwc3: qcom: Don't rely on drvdata during probe Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 11/12] usb: dwc3: qcom: Transition to flattened model Bjorn Andersson
2025-01-14  5:11 ` [PATCH v3 12/12] arm64: dts: qcom: sc8280x: Flatten the USB nodes Bjorn Andersson
2025-01-14 17:44 ` [PATCH v3 00/12] usb: dwc3: qcom: Flatten dwc3 structure Rob Herring
2025-01-14 23:04   ` Bjorn Andersson
2025-01-15 18:51     ` Rob Herring
2025-01-23  3:07       ` Bjorn Andersson
2025-01-23 21:22         ` Rob Herring [this message]
2025-01-27 17:57 ` Stephan Gerhold
2025-01-27 22:40   ` Bjorn Andersson
2025-01-28 10:42     ` Konrad Dybcio

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=20250123212259.GA381176-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Frank.li@nxp.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=andersson@kernel.org \
    --cc=balbi@kernel.org \
    --cc=bjorn.andersson@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_wcheng@quicinc.com \
    --cc=saravanak@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.