public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Krishna Kurapati <quic_kriskura@quicinc.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Wesley Cheng <quic_wcheng@quicinc.com>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Felipe Balbi <balbi@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	quic_ppratap@quicinc.com, quic_jackp@quicinc.com
Subject: Re: [PATCH v16 2/9] usb: dwc3: core: Access XHCI address space temporarily to read port info
Date: Mon, 25 Mar 2024 13:31:13 +0100	[thread overview]
Message-ID: <ZgFukaLXo4DNwfEK@hovoldconsulting.com> (raw)
In-Reply-To: <20240307062052.2319851-3-quic_kriskura@quicinc.com>

On Thu, Mar 07, 2024 at 11:50:45AM +0530, Krishna Kurapati wrote:
> All DWC3 Multi Port controllers that exist today only support host mode.
> Temporarily map XHCI address space for host-only controllers and parse
> XHCI Extended Capabilities registers to read number of usb2 ports and
> usb3 ports present on multiport controller. Each USB Port is at least HS
> capable.
> 
> The port info for usb2 and usb3 phy are identified as num_usb2_ports
> and num_usb3_ports. The intention is as follows:
> 
> Wherever we need to perform phy operations like:
> 
> LOOP_OVER_NUMBER_OF_AVAILABLE_PORTS()
> {
> 	phy_set_mode(dwc->usb2_generic_phy[i], PHY_MODE_USB_HOST);
> 	phy_set_mode(dwc->usb3_generic_phy[i], PHY_MODE_USB_HOST);
> }
> 
> If number of usb2 ports is 3, loop can go from index 0-2 for
> usb2_generic_phy. If number of usb3-ports is 2, we don't know for sure,
> if the first 2 ports are SS capable or some other ports like (2 and 3)
> are SS capable. So instead, num_usb2_ports is used to loop around all
> phy's (both hs and ss) for performing phy operations. If any
> usb3_generic_phy turns out to be NULL, phy operation just bails out.
> num_usb3_ports is used to modify GUSB3PIPECTL registers while setting up
> phy's as we need to know how many SS capable ports are there for this.
> 
> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

  reply	other threads:[~2024-03-25 12:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07  6:20 [PATCH v16 0/9] Add multiport support for DWC3 controllers Krishna Kurapati
2024-03-07  6:20 ` [PATCH v16 1/9] dt-bindings: usb: Add bindings for multiport properties on DWC3 controller Krishna Kurapati
2024-03-25 12:30   ` Johan Hovold
2024-03-07  6:20 ` [PATCH v16 2/9] usb: dwc3: core: Access XHCI address space temporarily to read port info Krishna Kurapati
2024-03-25 12:31   ` Johan Hovold [this message]
2024-03-07  6:20 ` [PATCH v16 3/9] usb: dwc3: core: Skip setting event buffers for host only controllers Krishna Kurapati
2024-03-07  6:20 ` [PATCH v16 4/9] usb: dwc3: core: Refactor PHY logic to support Multiport Controller Krishna Kurapati
2024-03-25 12:33   ` Johan Hovold
2024-03-07  6:20 ` [PATCH v16 5/9] dt-bindings: usb: qcom,dwc3: Add bindings for SC8280 Multiport Krishna Kurapati
2024-03-25 12:34   ` Johan Hovold
2024-03-07  6:20 ` [PATCH v16 6/9] usb: dwc3: qcom: Add helper function to request wakeup interrupts Krishna Kurapati
2024-03-25 12:35   ` Johan Hovold
2024-03-07  6:20 ` [PATCH v16 7/9] usb: dwc3: qcom: Refactor IRQ handling in glue driver Krishna Kurapati
2024-03-25 12:48   ` Johan Hovold
2024-03-25 13:15     ` Krishna Kurapati PSSNV
2024-03-25 13:23       ` Johan Hovold
2024-03-25 17:29         ` Krishna Kurapati PSSNV
2024-03-25 19:45           ` Johan Hovold
2024-03-26  8:11             ` Krishna Kurapati PSSNV
2024-03-26  8:28               ` Johan Hovold
2024-03-26 10:06                 ` Krishna Kurapati PSSNV
2024-03-26 10:14                   ` Johan Hovold
2024-03-07  6:20 ` [PATCH v16 8/9] usb: dwc3: qcom: Enable wakeup for applicable ports of multiport Krishna Kurapati
2024-03-25 12:50   ` Johan Hovold
2024-03-07  6:20 ` [PATCH v16 9/9] usb: dwc3: qcom: Add multiport suspend/resume support for wrapper Krishna Kurapati
2024-03-25 12:52   ` Johan Hovold
2024-03-25 13:15     ` Krishna Kurapati PSSNV

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=ZgFukaLXo4DNwfEK@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=andersson@kernel.org \
    --cc=balbi@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_jackp@quicinc.com \
    --cc=quic_kriskura@quicinc.com \
    --cc=quic_ppratap@quicinc.com \
    --cc=quic_wcheng@quicinc.com \
    --cc=robh+dt@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