Skip to content

Commit 93c928f

Browse files
committed
Merge: Enable USB Hub driver
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3759 JIRA: https://issues.redhat.com/browse/RHEL-21064 Signed-off-by: Charles Mirabile <cmirabil@redhat.com> Approved-by: Desnes Nunes <desnesn@redhat.com> Approved-by: Bastien Nocera <bnocera@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents 46ac16e + 70acb91 commit 93c928f

File tree

12 files changed

+472
-54
lines changed

12 files changed

+472
-54
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Cypress HX3 USB 3.0 hub controller family
8+
9+
maintainers:
10+
- Benjamin Bara <benjamin.bara@skidata.com>
11+
12+
allOf:
13+
- $ref: usb-device.yaml#
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- usb4b4,6504
19+
- usb4b4,6506
20+
21+
reg: true
22+
23+
reset-gpios:
24+
items:
25+
- description: GPIO specifier for RESETN pin.
26+
27+
vdd-supply:
28+
description:
29+
1V2 power supply (VDD_EFUSE, AVDD12, DVDD12).
30+
31+
vdd2-supply:
32+
description:
33+
3V3 power supply (AVDD33, VDD_IO).
34+
35+
peer-hub:
36+
$ref: /schemas/types.yaml#/definitions/phandle
37+
description:
38+
phandle to the peer hub on the controller.
39+
40+
required:
41+
- compatible
42+
- reg
43+
- peer-hub
44+
- vdd-supply
45+
- vdd2-supply
46+
47+
additionalProperties: false
48+
49+
examples:
50+
- |
51+
#include <dt-bindings/gpio/gpio.h>
52+
53+
usb {
54+
dr_mode = "host";
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
58+
/* 2.0 hub on port 1 */
59+
hub_2_0: hub@1 {
60+
compatible = "usb4b4,6504";
61+
reg = <1>;
62+
peer-hub = <&hub_3_0>;
63+
reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
64+
vdd-supply = <&reg_1v2_usb>;
65+
vdd2-supply = <&reg_3v3_usb>;
66+
};
67+
68+
/* 3.0 hub on port 2 */
69+
hub_3_0: hub@2 {
70+
compatible = "usb4b4,6506";
71+
reg = <2>;
72+
peer-hub = <&hub_2_0>;
73+
reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
74+
vdd-supply = <&reg_1v2_usb>;
75+
vdd2-supply = <&reg_3v3_usb>;
76+
};
77+
};
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Genesys Logic USB hub controller
8+
9+
maintainers:
10+
- Icenowy Zheng <uwu@icenowy.me>
11+
12+
allOf:
13+
- $ref: usb-device.yaml#
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- usb5e3,608
19+
- usb5e3,610
20+
- usb5e3,620
21+
- usb5e3,626
22+
23+
reg: true
24+
25+
reset-gpios:
26+
description: GPIO controlling the RESET# pin.
27+
28+
vdd-supply:
29+
description:
30+
the regulator that provides 3.3V core power to the hub.
31+
32+
required:
33+
- compatible
34+
- reg
35+
36+
additionalProperties: false
37+
38+
examples:
39+
- |
40+
#include <dt-bindings/gpio/gpio.h>
41+
usb {
42+
dr_mode = "host";
43+
#address-cells = <1>;
44+
#size-cells = <0>;
45+
46+
hub: hub@1 {
47+
compatible = "usb5e3,608";
48+
reg = <1>;
49+
reset-gpios = <&pio 7 2 GPIO_ACTIVE_LOW>;
50+
};
51+
};
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/usb/microchip,usb5744.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Microchip USB5744 4-port Hub Controller
8+
9+
description:
10+
Microchip's USB5744 SmartHubTM IC is a 4 port, SuperSpeed (SS)/Hi-Speed (HS),
11+
low power, low pin count configurable and fully compliant with the USB 3.1
12+
Gen 1 specification. The USB5744 also supports Full Speed (FS) and Low Speed
13+
(LS) USB signaling, offering complete coverage of all defined USB operating
14+
speeds. The new SuperSpeed hubs operate in parallel with the USB 2.0
15+
controller, so 5 Gbps SuperSpeed data transfers are not affected by slower
16+
USB 2.0 traffic.
17+
18+
maintainers:
19+
- Piyush Mehta <piyush.mehta@amd.com>
20+
- Michal Simek <michal.simek@amd.com>
21+
22+
properties:
23+
compatible:
24+
enum:
25+
- usb424,2744
26+
- usb424,5744
27+
- microchip,usb5744
28+
29+
reg:
30+
maxItems: 1
31+
32+
reset-gpios:
33+
maxItems: 1
34+
description:
35+
GPIO controlling the GRST# pin.
36+
37+
vdd-supply:
38+
description:
39+
3V3 power supply to the hub
40+
41+
vdd2-supply:
42+
description:
43+
1V2 power supply to the hub
44+
45+
peer-hub:
46+
$ref: /schemas/types.yaml#/definitions/phandle
47+
description:
48+
phandle to the peer hub on the controller.
49+
50+
i2c-bus:
51+
$ref: /schemas/types.yaml#/definitions/phandle
52+
description:
53+
phandle of an usb hub connected via i2c bus.
54+
55+
required:
56+
- compatible
57+
- reg
58+
59+
allOf:
60+
- if:
61+
properties:
62+
compatible:
63+
contains:
64+
const: microchip,usb5744
65+
then:
66+
properties:
67+
reset-gpios: false
68+
vdd-supply: false
69+
vdd2-supply: false
70+
peer-hub: false
71+
i2c-bus: false
72+
else:
73+
$ref: /schemas/usb/usb-device.yaml
74+
required:
75+
- peer-hub
76+
77+
additionalProperties: false
78+
79+
examples:
80+
- |
81+
#include <dt-bindings/gpio/gpio.h>
82+
i2c: i2c {
83+
#address-cells = <1>;
84+
#size-cells = <0>;
85+
hub: usb-hub@2d {
86+
compatible = "microchip,usb5744";
87+
reg = <0x2d>;
88+
};
89+
};
90+
91+
usb {
92+
#address-cells = <1>;
93+
#size-cells = <0>;
94+
95+
/* 2.0 hub on port 1 */
96+
hub_2_0: hub@1 {
97+
compatible = "usb424,2744";
98+
reg = <1>;
99+
peer-hub = <&hub_3_0>;
100+
i2c-bus = <&hub>;
101+
reset-gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
102+
};
103+
104+
/* 3.0 hub on port 2 */
105+
hub_3_0: hub@2 {
106+
compatible = "usb424,5744";
107+
reg = <2>;
108+
peer-hub = <&hub_2_0>;
109+
i2c-bus = <&hub>;
110+
reset-gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
111+
};
112+
};
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/usb/vialab,vl817.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Via labs VL817 USB 3.1 hub controller
8+
9+
maintainers:
10+
- Anand Moon <linux.amoon@gmail.com>
11+
12+
allOf:
13+
- $ref: usb-device.yaml#
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- usb2109,2817
19+
- usb2109,817
20+
21+
reg: true
22+
23+
reset-gpios:
24+
maxItems: 1
25+
description:
26+
GPIO controlling the RESET# pin.
27+
28+
vdd-supply:
29+
description:
30+
phandle to the regulator that provides power to the hub.
31+
32+
peer-hub:
33+
$ref: /schemas/types.yaml#/definitions/phandle
34+
description:
35+
phandle to the peer hub on the controller.
36+
37+
required:
38+
- compatible
39+
- reg
40+
- reset-gpios
41+
- vdd-supply
42+
- peer-hub
43+
44+
additionalProperties: false
45+
46+
examples:
47+
- |
48+
#include <dt-bindings/gpio/gpio.h>
49+
50+
usb {
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
54+
/* 2.0 hub on port 1 */
55+
hub_2_0: hub@1 {
56+
compatible = "usb2109,2817";
57+
reg = <1>;
58+
vdd-supply = <&vcc_5v>;
59+
peer-hub = <&hub_3_0>;
60+
reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
61+
};
62+
63+
/* 3.1 hub on port 4 */
64+
hub_3_0: hub@2 {
65+
compatible = "usb2109,817";
66+
reg = <2>;
67+
vdd-supply = <&vcc_5v>;
68+
peer-hub = <&hub_2_0>;
69+
reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
70+
};
71+
};

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ patternProperties:
439439
description: GE Fanuc Intelligent Platforms Embedded Systems, Inc.
440440
"^gemei,.*":
441441
description: Gemei Digital Technology Co., Ltd.
442+
"^genesys,.*":
443+
description: Genesys Logic, Inc.
442444
"^geniatech,.*":
443445
description: Geniatech, Inc.
444446
"^giantec,.*":
@@ -1230,6 +1232,8 @@ patternProperties:
12301232
description: Van der Laan b.v.
12311233
"^via,.*":
12321234
description: VIA Technologies, Inc.
1235+
"^vialab,.*":
1236+
description: VIA Labs, Inc.
12331237
"^videostrong,.*":
12341238
description: Videostrong Technology Co., Ltd.
12351239
"^virtio,.*":

arch/arm/boot/dts/meson8b-odroidc1.dts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -281,19 +281,6 @@
281281
"J7 Header Pin 6", "J7 Header Pin 5",
282282
"J7 Header Pin 7", "HDMI_CEC",
283283
"SYS_LED", "", "";
284-
285-
/*
286-
* WARNING: The USB Hub on the Odroid-C1/C1+ needs a reset signal
287-
* to be turned high in order to be detected by the USB Controller.
288-
* This signal should be handled by a USB specific power sequence
289-
* in order to reset the Hub when USB bus is powered down.
290-
*/
291-
usb-hub {
292-
gpio-hog;
293-
gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
294-
output-high;
295-
line-name = "usb-hub-reset";
296-
};
297284
};
298285

299286
&ir_receiver {
@@ -381,5 +368,16 @@
381368
};
382369

383370
&usb1 {
371+
dr_mode = "host";
372+
#address-cells = <1>;
373+
#size-cells = <0>;
384374
status = "okay";
375+
376+
hub@1 {
377+
/* Genesys Logic GL852G usb hub */
378+
compatible = "usb5e3,610";
379+
reg = <1>;
380+
vdd-supply = <&p5v0>;
381+
reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
382+
};
385383
};

0 commit comments

Comments
 (0)