Skip to content

Commit ba1f8af

Browse files
superna9999Lorenzo Pieralisi
authored andcommitted
arm64: dts: khadas-vim3: add commented support for PCIe
The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between an USB3.0 Type A connector and a M.2 Key M slot. The PHY driving these differential lines is shared between the USB3.0 controller and the PCIe Controller, thus only a single controller can use it. The needed DT configuration when the MCU is configured to mux the PCIe/USB3.0 differential lines to the M.2 Key M slot is added commented and may be uncommented to disable USB3.0 from the USB Complex and enable the PCIe controller. The End User is not expected to uncomment the following except for testing purposes, but instead rely on the firmware/bootloader to update these nodes accordingly if PCIe mode is selected by the MCU. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Andrew Murray <[email protected]>
1 parent 934de34 commit ba1f8af

File tree

4 files changed

+79
-0
lines changed

4 files changed

+79
-0
lines changed

arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,28 @@
1414
/ {
1515
compatible = "khadas,vim3", "amlogic,a311d", "amlogic,g12b";
1616
};
17+
18+
/*
19+
* The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential
20+
* lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between
21+
* an USB3.0 Type A connector and a M.2 Key M slot.
22+
* The PHY driving these differential lines is shared between
23+
* the USB3.0 controller and the PCIe Controller, thus only
24+
* a single controller can use it.
25+
* If the MCU is configured to mux the PCIe/USB3.0 differential lines
26+
* to the M.2 Key M slot, uncomment the following block to disable
27+
* USB3.0 from the USB Complex and enable the PCIe controller.
28+
* The End User is not expected to uncomment the following except for
29+
* testing purposes, but instead rely on the firmware/bootloader to
30+
* update these nodes accordingly if PCIe mode is selected by the MCU.
31+
*/
32+
/*
33+
&pcie {
34+
status = "okay";
35+
};
36+
37+
&usb {
38+
phys = <&usb2_phy0>, <&usb2_phy1>;
39+
phy-names = "usb2-phy0", "usb2-phy1";
40+
};
41+
*/

arch/arm64/boot/dts/amlogic/meson-g12b-s922x-khadas-vim3.dts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,28 @@
1414
/ {
1515
compatible = "khadas,vim3", "amlogic,s922x", "amlogic,g12b";
1616
};
17+
18+
/*
19+
* The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential
20+
* lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between
21+
* an USB3.0 Type A connector and a M.2 Key M slot.
22+
* The PHY driving these differential lines is shared between
23+
* the USB3.0 controller and the PCIe Controller, thus only
24+
* a single controller can use it.
25+
* If the MCU is configured to mux the PCIe/USB3.0 differential lines
26+
* to the M.2 Key M slot, uncomment the following block to disable
27+
* USB3.0 from the USB Complex and enable the PCIe controller.
28+
* The End User is not expected to uncomment the following except for
29+
* testing purposes, but instead rely on the firmware/bootloader to
30+
* update these nodes accordingly if PCIe mode is selected by the MCU.
31+
*/
32+
/*
33+
&pcie {
34+
status = "okay";
35+
};
36+
37+
&usb {
38+
phys = <&usb2_phy0>, <&usb2_phy1>;
39+
phy-names = "usb2-phy0", "usb2-phy1";
40+
};
41+
*/

arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@
246246
linux,rc-map-name = "rc-khadas";
247247
};
248248

249+
&pcie {
250+
reset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;
251+
};
252+
249253
&pwm_ef {
250254
status = "okay";
251255
pinctrl-0 = <&pwm_e_pins>;

arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,28 @@
6868
clock-names = "clkin1";
6969
status = "okay";
7070
};
71+
72+
/*
73+
* The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential
74+
* lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between
75+
* an USB3.0 Type A connector and a M.2 Key M slot.
76+
* The PHY driving these differential lines is shared between
77+
* the USB3.0 controller and the PCIe Controller, thus only
78+
* a single controller can use it.
79+
* If the MCU is configured to mux the PCIe/USB3.0 differential lines
80+
* to the M.2 Key M slot, uncomment the following block to disable
81+
* USB3.0 from the USB Complex and enable the PCIe controller.
82+
* The End User is not expected to uncomment the following except for
83+
* testing purposes, but instead rely on the firmware/bootloader to
84+
* update these nodes accordingly if PCIe mode is selected by the MCU.
85+
*/
86+
/*
87+
&pcie {
88+
status = "okay";
89+
};
90+
91+
&usb {
92+
phys = <&usb2_phy0>, <&usb2_phy1>;
93+
phy-names = "usb2-phy0", "usb2-phy1";
94+
};
95+
*/

0 commit comments

Comments
 (0)