All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/2] Add support for multiport controller
@ 2022-05-19 12:34 Harsh Agarwal
  2022-05-19 12:34 ` [RFC 1/2] dt-bindings: usb: dwc3: Add support for multiport related properties Harsh Agarwal
  2022-05-19 12:34 ` [RFC 2/2] usb: dwc3: Refactor PHY logic to support Multiport Controller Harsh Agarwal
  0 siblings, 2 replies; 16+ messages in thread
From: Harsh Agarwal @ 2022-05-19 12:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Felipe Balbi
  Cc: linux-usb, devicetree, linux-kernel, quic_pkondeti, quic_ppratap,
	Harsh Agarwal

Currently the DWC3 driver supports only single port controller which 
requires at most two PHYs ie HS and SS PHYs. There are SoCs that has
DWC3 controller with multiple ports that can operate in host mode. Some of
the port supports both SS+HS and other port supports only HS mode.

This change refactors the PHY logic to support multiport controller. The 
patches have gone through basic sanity only.

For any multiport controller we would define a new node "multiport" inside
dwc3 and then add subsequent "mport" nodes inside it for individual ports
that it supports. Now each individual "mport" defines the PHYs that it 
supports.

Looking for comments/feedback on the device tree bindings. Once the 
bindings are locked, we can further factor the code.

e.g.
Consider a Dual port controller where each port supports HS+SS 

multiport {
	mp_1: mport@1 {
		usb-phys = <usb2_phy0>, <usb3_phy0>;
	};	
	mp_2: mport@2 {
		usb-phys = <usb2_phy1>, <usb3_phy1>;
	};	
};

Harsh Agarwal (2):
  dt-bindings: usb: dwc3: Add support for multiport related properties
  usb: dwc3: Refactor PHY logic to support Multiport Controller

 .../devicetree/bindings/usb/snps,dwc3.yaml         |  55 +++++
 drivers/usb/dwc3/core.c                            | 259 ++++++++++++++++-----
 drivers/usb/dwc3/core.h                            |   8 +-
 drivers/usb/dwc3/drd.c                             |   8 +-
 drivers/usb/dwc3/gadget.c                          |   4 +-
 5 files changed, 264 insertions(+), 70 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [RFC 2/2] usb: dwc3: Refactor PHY logic to support Multiport Controller
@ 2022-05-22  3:41 kernel test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kernel test robot @ 2022-05-22  3:41 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2024 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <1652963695-10109-3-git-send-email-quic_harshq@quicinc.com>
References: <1652963695-10109-3-git-send-email-quic_harshq@quicinc.com>
TO: Harsh Agarwal <quic_harshq@quicinc.com>

Hi Harsh,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on next-20220520]
[cannot apply to robh/for-next balbi-usb/testing/next v5.18-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Harsh-Agarwal/Add-support-for-multiport-controller/20220519-203742
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: i386-randconfig-c021 (https://download.01.org/0day-ci/archive/20220522/202205221139.tP4hE1f1-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/usb/dwc3/core.c:1386:2-34: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1398.
   drivers/usb/dwc3/core.c:1386:2-34: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1407.
   drivers/usb/dwc3/core.c:1386:2-34: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1416.
   drivers/usb/dwc3/core.c:1386:2-34: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1426.

Please review and possibly fold the followup patch.

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-05-27 11:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 12:34 [RFC 0/2] Add support for multiport controller Harsh Agarwal
2022-05-19 12:34 ` [RFC 1/2] dt-bindings: usb: dwc3: Add support for multiport related properties Harsh Agarwal
2022-05-19 19:23   ` Rob Herring
2022-05-21  3:05   ` Bjorn Andersson
2022-05-23 11:54     ` Harsh Agarwal
2022-05-21  3:28   ` Pavan Kondeti
2022-05-23 12:25   ` Rob Herring
2022-05-27 11:09     ` Harsh Agarwal
2022-05-19 12:34 ` [RFC 2/2] usb: dwc3: Refactor PHY logic to support Multiport Controller Harsh Agarwal
2022-05-21  3:17   ` Bjorn Andersson
2022-05-23 11:53     ` Harsh Agarwal
2022-05-23  2:59   ` Pavan Kondeti
2022-05-23  7:08   ` Pavan Kondeti
2022-05-23 16:10   ` Brian Masney
2022-05-27 10:56     ` Harsh Agarwal
2022-05-22  3:41 kernel test robot

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.