Skip to content

Commit 30c50d3

Browse files
committed
Merge branch 'remotes/lorenzo/pci/meson'
- Fix meson PERST# GPIO polarity problem (Remi Pommarel) - Add DT bindings for Amlogic Meson G12A (Neil Armstrong) - Fix meson clock names to match DT bindings (Neil Armstrong) - Add meson support for Amlogic G12A SoC with separate shared PHY (Neil Armstrong) - Add meson extended PCIe PHY functions for Amlogic G12A USB3+PCIe combo PHY (Neil Armstrong) - Add arm64 DT for Amlogic G12A PCIe controller node (Neil Armstrong) - Add commented-out description of VIM3 USB3/PCIe mux in arm64 DT (Neil Armstrong) * remotes/lorenzo/pci/meson: arm64: dts: khadas-vim3: add commented support for PCIe arm64: dts: meson-g12a: Add PCIe node phy: meson-g12a-usb3-pcie: Add support for PCIe mode PCI: amlogic: meson: Add support for G12A PCI: amlogic: Fix probed clock names dt-bindings: pci: amlogic, meson-pcie: Add G12A bindings PCI: amlogic: Fix reset assertion via gpio descriptor
2 parents e63758e + ba1f8af commit 30c50d3

File tree

9 files changed

+294
-40
lines changed

9 files changed

+294
-40
lines changed

Documentation/devicetree/bindings/pci/amlogic,meson-pcie.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,30 @@ Additional properties are described here:
99

1010
Required properties:
1111
- compatible:
12-
should contain "amlogic,axg-pcie" to identify the core.
12+
should contain :
13+
- "amlogic,axg-pcie" for AXG SoC Family
14+
- "amlogic,g12a-pcie" for G12A SoC Family
15+
to identify the core.
1316
- reg:
1417
should contain the configuration address space.
1518
- reg-names: Must be
1619
- "elbi" External local bus interface registers
1720
- "cfg" Meson specific registers
18-
- "phy" Meson PCIE PHY registers
21+
- "phy" Meson PCIE PHY registers for AXG SoC Family
1922
- "config" PCIe configuration space
2023
- reset-gpios: The GPIO to generate PCIe PERST# assert and deassert signal.
2124
- clocks: Must contain an entry for each entry in clock-names.
2225
- clock-names: Must include the following entries:
2326
- "pclk" PCIe GEN 100M PLL clock
2427
- "port" PCIe_x(A or B) RC clock gate
2528
- "general" PCIe Phy clock
26-
- "mipi" PCIe_x(A or B) 100M ref clock gate
29+
- "mipi" PCIe_x(A or B) 100M ref clock gate for AXG SoC Family
2730
- resets: phandle to the reset lines.
2831
- reset-names: must contain "phy" "port" and "apb"
29-
- "phy" Share PHY reset
32+
- "phy" Share PHY reset for AXG SoC Family
3033
- "port" Port A or B reset
3134
- "apb" Share APB reset
35+
- phys: should contain a phandle to the shared phy for G12A SoC Family
3236
- device_type:
3337
should be "pci". As specified in designware-pcie.txt
3438

arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,39 @@
9595
#size-cells = <2>;
9696
ranges;
9797

98+
pcie: pcie@fc000000 {
99+
compatible = "amlogic,g12a-pcie", "snps,dw-pcie";
100+
reg = <0x0 0xfc000000 0x0 0x400000
101+
0x0 0xff648000 0x0 0x2000
102+
0x0 0xfc400000 0x0 0x200000>;
103+
reg-names = "elbi", "cfg", "config";
104+
interrupts = <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>;
105+
#interrupt-cells = <1>;
106+
interrupt-map-mask = <0 0 0 0>;
107+
interrupt-map = <0 0 0 0 &gic GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
108+
bus-range = <0x0 0xff>;
109+
#address-cells = <3>;
110+
#size-cells = <2>;
111+
device_type = "pci";
112+
ranges = <0x81000000 0 0 0x0 0xfc600000 0 0x00100000
113+
0x82000000 0 0xfc700000 0x0 0xfc700000 0 0x1900000>;
114+
115+
clocks = <&clkc CLKID_PCIE_PHY
116+
&clkc CLKID_PCIE_COMB
117+
&clkc CLKID_PCIE_PLL>;
118+
clock-names = "general",
119+
"pclk",
120+
"port";
121+
resets = <&reset RESET_PCIE_CTRL_A>,
122+
<&reset RESET_PCIE_APB>;
123+
reset-names = "port",
124+
"apb";
125+
num-lanes = <1>;
126+
phys = <&usb3_pcie_phy PHY_TYPE_PCIE>;
127+
phy-names = "pcie";
128+
status = "disabled";
129+
};
130+
98131
ethmac: ethernet@ff3f0000 {
99132
compatible = "amlogic,meson-axg-dwmac",
100133
"snps,dwmac-3.70a",

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+
*/

arch/arm64/boot/dts/amlogic/meson-sm1.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@
134134
power-domains = <&pwrc PWRC_SM1_ETH_ID>;
135135
};
136136

137+
&pcie {
138+
power-domains = <&pwrc PWRC_SM1_PCIE_ID>;
139+
};
140+
137141
&pwrc {
138142
compatible = "amlogic,meson-sm1-pwrc";
139143
};

0 commit comments

Comments
 (0)