Skip to contentSkip to conversation

ARM: dts: dra7: Enable x2 lane mode support

PATCH In review Kishon Vijay Abraham I 3 participants 11 messages Dec 19, 2017 – Mar 7, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ARM: dts: dra7: Enable x2 lane mode support

Add properties to enable PCIe x2 lane mode since all dra7 based SoCs support x2 lane mode.

However only dra76-evm has a slot which can support x2 lane cards. Hence only enable x2 lane mode in dra76-evm. (am571x-idk can support x2 lane mode but that makes usb port not functional so not including the patch to enable x2 mode in am571x-idk)

Also included in this series is patch to enable PCIe configs (both host and device) in omap2plus_defconfig and multi_v7_defconfig

In order to get x2 mode working [1] is required.

However by keeping the older compatible, this series won't break functionality if this series is merged before [1]

[1] -> https://lkml.org/lkml/2017/12/19/175

Kishon Vijay Abraham I (7):
ARM: dts: dra7: Add properties to enable PCIe x2 lane mode
ARM: dts: DRA74x: Use PCIe compatible specific to dra74
ARM: dts: DRA72x: Use PCIe compatible specific to dra72
ARM: dts: dra76-evm: Enable x2 PCIe lanes
ARM: dts: dra7: Remove deprecated PCI compatible string
ARM: omap2plus_defconfig: Enable CONFIG_PCI_DRA7XX (Host & Device
modes)
ARM: multi_v7_defconfig: Enable CONFIG_PCI_DRA7XX (Host & Device
modes)

 arch/arm/boot/dts/dra7.dtsi          |  9 +++++----
 arch/arm/boot/dts/dra72x.dtsi        | 12 ++++++++++++
 arch/arm/boot/dts/dra74x.dtsi        | 12 ++++++++++++
 arch/arm/boot/dts/dra76-evm.dts      | 16 ++++++++++++++++
 arch/arm/configs/multi_v7_defconfig  |  6 ++++++
 arch/arm/configs/omap2plus_defconfig |  8 ++++++++
 6 files changed, 59 insertions(+), 4 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/7 ARM: dts: dra7: Add properties to enable PCIe x2 lane mode

ti,syscon-lane-sel and ti,syscon-lane-conf properties specific to enable PCIe x2 lane mode are added here.

---
 arch/arm/boot/dts/dra7.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/dra7.dtsi +4 -0
index ac9216293b7c..9966d82dbd7c 100644
@@ -309,6 +309,8 @@
 				ti,hwmods = "pcie1";
 				phys = <&pcie1_phy>;
 				phy-names = "pcie-phy0";
+				ti,syscon-lane-conf = <&scm_conf 0x558>;
+				ti,syscon-lane-sel = <&scm_conf_pcie 0x18>;
 				interrupt-map-mask = <0 0 0 7>;
 				interrupt-map = <0 0 0 1 &pcie1_intc 1>,
 						<0 0 0 2 &pcie1_intc 2>,
@@ -334,6 +336,8 @@
 				phys = <&pcie1_phy>;
 				phy-names = "pcie-phy0";
 				ti,syscon-unaligned-access = <&scm_conf1 0x14 2>;
+				ti,syscon-lane-conf = <&scm_conf 0x558>;
+				ti,syscon-lane-sel = <&scm_conf_pcie 0x18>;
 				status = "disabled";
 			};
 		};
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/7 ARM: dts: DRA74x: Use PCIe compatible specific to dra74

In reply to Kishon Vijay Abraham I

Use dra74 specific compatible string for PCIe while preserving the older compatible. While at that add a new label for the 2nd instance of pcie.

---
 arch/arm/boot/dts/dra7.dtsi   |  2 +-
 arch/arm/boot/dts/dra74x.dtsi | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
arch/arm/boot/dts/dra7.dtsi +1 -1
index 9966d82dbd7c..333f6a634ff9 100644
@@ -349,7 +349,7 @@
 			ranges = <0x51800000 0x51800000 0x3000
 				  0x0	     0x30000000 0x10000000>;
 			status = "disabled";
-			pcie at 51800000 {
+			pcie2_rc: pcie at 51800000 {
 				compatible = "ti,dra7-pcie";
 				reg = <0x51800000 0x2000>, <0x51802000 0x14c>, <0x1000 0x2000>;
 				reg-names = "rc_dbics", "ti_conf", "config";
arch/arm/boot/dts/dra74x.dtsi +12 -0
index 24e6746c5b26..a001eecf3b14 100644
@@ -124,3 +124,15 @@
 		status = "disabled";
 	};
 };
+
+&pcie1_rc {
+	compatible = "ti,dra746-pcie-rc", "ti,dra7-pcie";
+};
+
+&pcie1_ep {
+	compatible = "ti,dra746-pcie-ep", "ti,dra7-pcie-ep";
+};
+
+&pcie2_rc {
+	compatible = "ti,dra746-pcie-rc", "ti,dra7-pcie";
+};
Signature · 1 line
2.11.0
#3 lore raw

PATCH 3/7 ARM: dts: DRA72x: Use PCIe compatible specific to dra72

In reply to Kishon Vijay Abraham I

Use dra72 specific compatible string for PCIe while preserving the older compatible.

---
 arch/arm/boot/dts/dra72x.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/dra72x.dtsi +12 -0
index 67107605fb4c..2dafad834d3d 100644
@@ -50,3 +50,15 @@
 		status = "disabled";
 	};
 };
+
+&pcie1_rc {
+	compatible = "ti,dra726-pcie-rc", "ti,dra7-pcie";
+};
+
+&pcie1_ep {
+	compatible = "ti,dra726-pcie-ep", "ti,dra7-pcie-ep";
+};
+
+&pcie2_rc {
+	compatible = "ti,dra726-pcie-rc", "ti,dra7-pcie";
+};
Signature · 1 line
2.11.0
#4 lore raw

PATCH 4/7 ARM: dts: dra76-evm: Enable x2 PCIe lanes

In reply to Kishon Vijay Abraham I

DRA76 EVM has a 4-lane PCIe connector and DRA76 can support x2 lanes. Enable both the PCIe lanes here.

---
 arch/arm/boot/dts/dra76-evm.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/dra76-evm.dts +16 -0
index b024a65c6e27..244e553f2247 100644
@@ -421,3 +421,19 @@
 		spi-max-frequency = <96000000>;
 	};
 };
+
+&pcie2_phy {
+	status = "okay";
+};
+
+&pcie1_rc {
+	num-lanes = <2>;
+	phys = <&pcie1_phy>, <&pcie2_phy>;
+	phy-names = "pcie-phy0", "pcie-phy1";
+};
+
+&pcie1_ep {
+	num-lanes = <2>;
+	phys = <&pcie1_phy>, <&pcie2_phy>;
+	phy-names = "pcie-phy0", "pcie-phy1";
+};
Signature · 1 line
2.11.0
#5 lore raw

PATCH 5/7 ARM: dts: dra7: Remove deprecated PCI compatible string

In reply to Kishon Vijay Abraham I

Since SoC specific compatible strings are used for PCIe in dra74x.dtsi and dra72x.dtsi, remove the compatible property from dra7.dtsi which uses the deprecated compatible string.

---
 arch/arm/boot/dts/dra7.dtsi | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/boot/dts/dra7.dtsi +0 -3
index 333f6a634ff9..1efa908c7bce 100644
@@ -293,7 +293,6 @@
 			 * node and enable pcie1_ep mode.
 			 */
 			pcie1_rc: pcie at 51000000 {
-				compatible = "ti,dra7-pcie";
 				reg = <0x51000000 0x2000>, <0x51002000 0x14c>, <0x1000 0x2000>;
 				reg-names = "rc_dbics", "ti_conf", "config";
 				interrupts = <0 232 0x4>, <0 233 0x4>;
@@ -325,7 +324,6 @@
 			};
 
 			pcie1_ep: pcie_ep at 51000000 {
-				compatible = "ti,dra7-pcie-ep";
 				reg = <0x51000000 0x28>, <0x51002000 0x14c>, <0x51001000 0x28>, <0x1000 0x10000000>;
 				reg-names = "ep_dbics", "ti_conf", "ep_dbics2", "addr_space";
 				interrupts = <0 232 0x4>;
@@ -350,7 +348,6 @@
 				  0x0	     0x30000000 0x10000000>;
 			status = "disabled";
 			pcie2_rc: pcie at 51800000 {
-				compatible = "ti,dra7-pcie";
 				reg = <0x51800000 0x2000>, <0x51802000 0x14c>, <0x1000 0x2000>;
 				reg-names = "rc_dbics", "ti_conf", "config";
 				interrupts = <0 355 0x4>, <0 356 0x4>;
Signature · 1 line
2.11.0
#6 lore raw

PATCH 6/7 ARM: omap2plus_defconfig: Enable CONFIG_PCI_DRA7XX (Host & Device modes)

In reply to Kishon Vijay Abraham I

Enable CONFIG_PCI_DRA7XX in order to be able to configure PCIe controller present in dra7 SoCs in both host mode and device mode.

---
 arch/arm/configs/omap2plus_defconfig | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/configs/omap2plus_defconfig +8 -0
index 7b97200c1d64..a01871d5aa73 100644
@@ -48,6 +48,13 @@ CONFIG_SOC_AM43XX=y
 CONFIG_SOC_DRA7XX=y
 CONFIG_ARM_THUMBEE=y
 CONFIG_ARM_ERRATA_411920=y
+CONFIG_PCI=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_DRA7XX=y
+CONFIG_PCI_DRA7XX_EP=y
+CONFIG_PCI_ENDPOINT=y
+CONFIG_PCI_ENDPOINT_CONFIGFS=y
+CONFIG_PCI_EPF_TEST=m
 CONFIG_SMP=y
 CONFIG_NR_CPUS=2
 CONFIG_CMA=y
@@ -137,6 +144,7 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=16384
 CONFIG_SENSORS_TSL2550=m
 CONFIG_SRAM=y
+CONFIG_PCI_ENDPOINT_TEST=m
 CONFIG_EEPROM_AT24=m
 CONFIG_BLK_DEV_SD=y
 CONFIG_SCSI_SCAN_ASYNC=y
Signature · 1 line
2.11.0
#7 lore raw

PATCH 7/7 ARM: multi_v7_defconfig: Enable CONFIG_PCI_DRA7XX (Host & Device modes)

In reply to Kishon Vijay Abraham I

Enable CONFIG_PCI_DRA7XX in order to be able to configure PCIe controller present in dra7 SoCs in both host mode and device mode.

---
 arch/arm/configs/multi_v7_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/configs/multi_v7_defconfig +6 -0
index 61509c4b769f..6faecd55ccbd 100644
@@ -116,6 +116,8 @@ CONFIG_ARCH_ZYNQ=y
 CONFIG_TRUSTED_FOUNDATIONS=y
 CONFIG_PCI=y
 CONFIG_PCI_HOST_GENERIC=y
+CONFIG_PCI_DRA7XX=y
+CONFIG_PCI_DRA7XX_EP=y
 CONFIG_PCI_KEYSTONE=y
 CONFIG_PCI_MSI=y
 CONFIG_PCI_MVEBU=y
@@ -123,6 +125,9 @@ CONFIG_PCI_TEGRA=y
 CONFIG_PCI_RCAR_GEN2=y
 CONFIG_PCIE_RCAR=y
 CONFIG_PCIEPORTBUS=y
+CONFIG_PCI_ENDPOINT=y
+CONFIG_PCI_ENDPOINT_CONFIGFS=y
+CONFIG_PCI_EPF_TEST=m
 CONFIG_SMP=y
 CONFIG_NR_CPUS=16
 CONFIG_HIGHPTE=y
@@ -222,6 +227,7 @@ CONFIG_ATMEL_SSC=m
 CONFIG_QCOM_COINCELL=m
 CONFIG_APDS9802ALS=y
 CONFIG_ISL29003=y
+CONFIG_PCI_ENDPOINT_TEST=m
 CONFIG_EEPROM_AT24=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_DEV_SR=y
Signature · 1 line
2.11.0
maintainer
#8 lore raw
In reply to Kishon Vijay Abraham I
Quoted 9 lines · Kishon Vijay Abraham I

Add properties to enable PCIe x2 lane mode since all dra7 based SoCs support x2 lane mode.

However only dra76-evm has a slot which can support x2 lane cards. Hence only enable x2 lane mode in dra76-evm. (am571x-idk can support x2 lane mode but that makes usb port not functional so not including the patch to enable x2 mode in am571x-idk)

Quoted 8 lines

Also included in this series is patch to enable PCIe configs (both host and device) in omap2plus_defconfig and multi_v7_defconfig

In order to get x2 mode working [1] is required.

However by keeping the older compatible, this series won't break functionality if this series is merged before [1]

OK applying into omap-for-v4.16/dt and omap-for-v4.16/defconfig.

Thanks,

Tony

#9 lore raw
In reply to Kishon Vijay Abraham I
Quoted 31 lines · Kishon Vijay Abraham I

Add properties to enable PCIe x2 lane mode since all dra7 based SoCs support x2 lane mode.

However only dra76-evm has a slot which can support x2 lane cards. Hence only enable x2 lane mode in dra76-evm. (am571x-idk can support x2 lane mode but that makes usb port not functional so not including the patch to enable x2 mode in am571x-idk)

Also included in this series is patch to enable PCIe configs (both host and device) in omap2plus_defconfig and multi_v7_defconfig

In order to get x2 mode working [1] is required.

However by keeping the older compatible, this series won't break functionality if this series is merged before [1]

[1] -> https://lkml.org/lkml/2017/12/19/175

Kishon Vijay Abraham I (7):
ARM: dts: dra7: Add properties to enable PCIe x2 lane mode
ARM: dts: DRA74x: Use PCIe compatible specific to dra74
ARM: dts: DRA72x: Use PCIe compatible specific to dra72
ARM: dts: dra76-evm: Enable x2 PCIe lanes
ARM: dts: dra7: Remove deprecated PCI compatible string
ARM: omap2plus_defconfig: Enable CONFIG_PCI_DRA7XX (Host & Device
modes)
ARM: multi_v7_defconfig: Enable CONFIG_PCI_DRA7XX (Host & Device
modes)

Quoted 7 lines
 arch/arm/boot/dts/dra7.dtsi          |  9 +++++----
 arch/arm/boot/dts/dra72x.dtsi        | 12 ++++++++++++
 arch/arm/boot/dts/dra74x.dtsi        | 12 ++++++++++++
 arch/arm/boot/dts/dra76-evm.dts      | 16 ++++++++++++++++
 arch/arm/configs/multi_v7_defconfig  |  6 ++++++
 arch/arm/configs/omap2plus_defconfig |  8 ++++++++
 6 files changed, 59 insertions(+), 4 deletions(-)

Hi Kishon,

I would like to ask you please what are your expectations with this series, which tree these changes are going to be queued through ?

Please let me know, thanks.

Lorenzo

#10 lore raw

Hi Lorenzo,

Quoted 40 lines · Lorenzo Pieralisi
Quoted 31 lines · Kishon Vijay Abraham I

Add properties to enable PCIe x2 lane mode since all dra7 based SoCs support x2 lane mode.

However only dra76-evm has a slot which can support x2 lane cards. Hence only enable x2 lane mode in dra76-evm. (am571x-idk can support x2 lane mode but that makes usb port not functional so not including the patch to enable x2 mode in am571x-idk)

Also included in this series is patch to enable PCIe configs (both host and device) in omap2plus_defconfig and multi_v7_defconfig

In order to get x2 mode working [1] is required.

However by keeping the older compatible, this series won't break functionality if this series is merged before [1]

[1] -> https://lkml.org/lkml/2017/12/19/175

Kishon Vijay Abraham I (7):
ARM: dts: dra7: Add properties to enable PCIe x2 lane mode
ARM: dts: DRA74x: Use PCIe compatible specific to dra74
ARM: dts: DRA72x: Use PCIe compatible specific to dra72
ARM: dts: dra76-evm: Enable x2 PCIe lanes
ARM: dts: dra7: Remove deprecated PCI compatible string
ARM: omap2plus_defconfig: Enable CONFIG_PCI_DRA7XX (Host & Device
modes)
ARM: multi_v7_defconfig: Enable CONFIG_PCI_DRA7XX (Host & Device
modes)

Quoted 7 lines
 arch/arm/boot/dts/dra7.dtsi          |  9 +++++----
 arch/arm/boot/dts/dra72x.dtsi        | 12 ++++++++++++
 arch/arm/boot/dts/dra74x.dtsi        | 12 ++++++++++++
 arch/arm/boot/dts/dra76-evm.dts      | 16 ++++++++++++++++
 arch/arm/configs/multi_v7_defconfig  |  6 ++++++
 arch/arm/configs/omap2plus_defconfig |  8 ++++++++
 6 files changed, 59 insertions(+), 4 deletions(-)
Quoted 6 lines

Hi Kishon,

I would like to ask you please what are your expectations with this series, which tree these changes are going to be queued through ?

Please let me know, thanks.

Rob has given some comments on the dt [1]. I'll post the driver changes and once that gets accepted I'll post the dts changes. dts changes are generally merged via linux-omap tree maintained by Tony.

Thanks
Kishon

https://lkml.org/lkml/2017/12/20/625

Quoted 3 lines

Lorenzo