arm-bsp/n1sdp: update SRC_REV to latest validated version
PATCH 1/3 arm-bsp/n1sdp: update SRC_REV to latest validated version
This patch updates the SRC REV for SCP, TFA and edk2-platforms to point to latest versions.
Change-Id Ib6825d51fac89a9514b936ce927e7f5f3e508e26
Signed-off-by Khasim Syed Mohammed <[email protected]>
--- meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc | 2 +- .../recipes-bsp/trusted-firmware-a/trusted-firmware-a-n1sdp.inc | 2 +- meta-arm-bsp/recipes-bsp/uefi/edk2-firmware-n1sdp.inc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc +1 -1
@@ -1,6 +1,6 @@ # N1SDP specific SCP configurations and build instructions -SRCREV = "fd7c83561a7d76c7681d5d017fb23aa3664c028c" +SRCREV = "350be71a2ecef588b8ff5a095a0840de23506e45" SCP_PLATFORM = "n1sdp" SCP_LOG_LEVEL = "INFO"
meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-n1sdp.inc +1 -1
@@ -12,6 +12,6 @@ SRC_URI_append = " \ file://0001-n1sdp-arm-tf-disable-workaround-for-N1-Erratum-13157.patch \ " -SRCREV_tfa = "f0b1864f8e309a41d2eb1c9510f8cd3c7aacbb1d" +SRCREV_tfa = "50eee85e044a77ad59f4903a5dad91b266770a1d" PV = "2.3+git${SRCPV}"
meta-arm-bsp/recipes-bsp/uefi/edk2-firmware-n1sdp.inc +1 -1
@@ -5,7 +5,7 @@ SRC_URI = "\ # TAGS and commit ID as per N1SDP-2020.03.26 release SRCREV_edk2 = "3ff8a6bffabad761279817252014d59b6069d68a" -SRCREV_edk2-platforms = "b6bfc4417ff13168d69c4cbf2338f62c89c82dfd" +SRCREV_edk2-platforms = "d9d32e6c8b7456d21ce365486ac563b6be36c20d" # N1SDP specific EDK2 configurations EDK2_BUILD_RELEASE = "0"
Signature · 1 line
2.17.1
PATCH 2/3 arm-bsp/linux-linaro-arm-5.4: n1sdp: pcie: add quirk support to enable remote chip PCIe
Base address mapping for remote chip Root PCIe ECAM space.
Remote Chip PCIe topology is enumerated in Firmware and current change takes reference of enumerated PCIe hierarchy of Remote chip into the kernel and include in complete PCIe topology for kernel framework.
Change-Id I2bbceb5c89cc8fb4609e646652917cd97d638a27
Signed-off-by Sayanta Pattanayak <[email protected]>
Signed-off-by Khasim Syed Mohammed <[email protected]>
--- ...uirk-support-enabling-remote-chip-PC.patch | 134 ++++++++++++++++++ .../linux/linux-linaro-arm_5.4.bbappend | 1 + 2 files changed, 135 insertions(+) create mode 100644 meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0005-n1sdp-pcie-add-quirk-support-enabling-remote-chip-PC.patch
meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0005-n1sdp-pcie-add-quirk-support-enabling-remote-chip-PC.patch new file +134 -0
@@ -0,0 +1,134 @@ +Upstream-Status: Inappropriate [will not be submitted as its an hack required to fix the hardware issue] + +This patch is picked from the git repository: +https://git.linaro.org/landing-teams/working/arm/n1sdp-pcie-quirk.git/patch/?id=04b7e76d0fe6481a803f58e54e008a1489d713a5 + +Signed-off-by: Khasim Syed Mohammed <[email protected]> + +From 94892f681463908e4a879258dfd6053bbb025447 Mon Sep 17 00:00:00 2001 +From: Sayanta Pattanayak <[email protected]> +Date: Fri, 31 Jul 2020 15:32:24 +0530 +Subject: [PATCH 5/5] n1sdp: pcie: add quirk support enabling remote chip PCIe + +Base address mapping for remote chip Root PCIe ECAM space. + +Remote Chip PCIe topology is enumerated in Firmware and current +change takes referecne of enumerated PCIe hierarchy of Remote chip into the +kernel and include in complete PCIe topology for kernel framework. + +Change-Id: I368e51c535ac66e48bd356bd33da6c49f1a0fb2a +Signed-off-by: Sayanta Pattanayak <[email protected]> +--- + drivers/acpi/pci_mcfg.c | 1 + + drivers/pci/controller/pcie-n1sdp.c | 34 ++++++++++++++++++++++++++--- + include/linux/pci-ecam.h | 1 + + 3 files changed, 33 insertions(+), 3 deletions(-) + +diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c +index 7a2b41b9ab57..53d073ef941f 100644 +--- a/drivers/acpi/pci_mcfg.c ++++ b/drivers/acpi/pci_mcfg.c +@@ -149,6 +149,7 @@ static struct mcfg_fixup mcfg_quirks[] = { + /* N1SDP SoC with v1 PCIe controller */ + N1SDP_ECAM_MCFG(0x20181101, 0, &pci_n1sdp_pcie_ecam_ops), + N1SDP_ECAM_MCFG(0x20181101, 1, &pci_n1sdp_ccix_ecam_ops), ++ N1SDP_ECAM_MCFG(0x20181101, 2, &pci_n1sdp_remote_pcie_ecam_ops), + }; + + static char mcfg_oem_id[ACPI_OEM_ID_SIZE]; +diff --git a/drivers/pci/controller/pcie-n1sdp.c b/drivers/pci/controller/pcie-n1sdp.c +index 04c0de043817..19b573468ac5 100644 +--- a/drivers/pci/controller/pcie-n1sdp.c ++++ b/drivers/pci/controller/pcie-n1sdp.c +@@ -28,8 +28,10 @@ + + /* Platform specific values as hardcoded in the firmware. */ + #define AP_NS_SHARED_MEM_BASE 0x06000000 +-#define MAX_SEGMENTS 2 /* Two PCIe root complexes. */ ++/* Two PCIe root complexes in One Chip + One PCIe RC in Remote Chip*/ ++#define MAX_SEGMENTS 3 + #define BDF_TABLE_SIZE SZ_16K ++#define REMOTE_CHIP_ADDR_OFFSET 0x40000000000 + + /* + * Shared memory layout as written by the SCP upon boot time: +@@ -100,7 +102,10 @@ static int pci_n1sdp_init(struct pci_config_window *cfg, unsigned int segment) + if (segment >= MAX_SEGMENTS) + return -ENODEV; + +- table_base = AP_NS_SHARED_MEM_BASE + segment * BDF_TABLE_SIZE; ++ if (segment > 1) ++ table_base = AP_NS_SHARED_MEM_BASE + REMOTE_CHIP_ADDR_OFFSET; ++ else ++ table_base = AP_NS_SHARED_MEM_BASE + segment * BDF_TABLE_SIZE; + + if (!request_mem_region(table_base, BDF_TABLE_SIZE, + "PCIe valid BDFs")) { +@@ -122,7 +127,13 @@ static int pci_n1sdp_init(struct pci_config_window *cfg, unsigned int segment) + + memcpy_fromio(pcie_discovery_data[segment], shared_data, bdfs_size); + +- rc_remapped_addr[segment] = devm_ioremap_nocache(dev, ++ ++ if (segment > 1) ++ rc_remapped_addr[segment] = devm_ioremap_nocache(dev, ++ shared_data->rc_base_addr + REMOTE_CHIP_ADDR_OFFSET, ++ PCI_CFG_SPACE_EXP_SIZE); ++ else ++ rc_remapped_addr[segment] = devm_ioremap_nocache(dev, + shared_data->rc_base_addr, + PCI_CFG_SPACE_EXP_SIZE); + if (!rc_remapped_addr[segment]) { +@@ -145,6 +156,11 @@ static int pci_n1sdp_ccix_init(struct pci_config_window *cfg) + return pci_n1sdp_init(cfg, 1); + } + ++static int pci_n1sdp_remote_pcie_init(struct pci_config_window *cfg) ++{ ++ return pci_n1sdp_init(cfg, 2); ++} ++ + struct pci_ecam_ops pci_n1sdp_pcie_ecam_ops = { + .bus_shift = 20, + .init = pci_n1sdp_pcie_init, +@@ -165,6 +181,16 @@ struct pci_ecam_ops pci_n1sdp_ccix_ecam_ops = { + } + }; + ++struct pci_ecam_ops pci_n1sdp_remote_pcie_ecam_ops = { ++ .bus_shift = 20, ++ .init = pci_n1sdp_remote_pcie_init, ++ .pci_ops = { ++ .map_bus = pci_n1sdp_map_bus, ++ .read = pci_generic_config_read32, ++ .write = pci_generic_config_write32, ++ } ++}; ++ + static const struct of_device_id n1sdp_pcie_of_match[] = { + { .compatible = "arm,n1sdp-pcie" }, + { }, +@@ -186,6 +212,8 @@ static int n1sdp_pcie_probe(struct platform_device *pdev) + return pci_host_common_probe(pdev, &pci_n1sdp_pcie_ecam_ops); + case 1: + return pci_host_common_probe(pdev, &pci_n1sdp_ccix_ecam_ops); ++ case 2: ++ return pci_host_common_probe(pdev, &pci_n1sdp_remote_pcie_ecam_ops); + } + + dev_err(&pdev->dev, "Invalid segment number, must be smaller than %d\n", +diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h +index 03cdea69f4e8..2270662428e1 100644 +--- a/include/linux/pci-ecam.h ++++ b/include/linux/pci-ecam.h +@@ -59,6 +59,7 @@ extern struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */ + extern struct pci_ecam_ops al_pcie_ops; /* Amazon Annapurna Labs PCIe */ + extern struct pci_ecam_ops pci_n1sdp_pcie_ecam_ops; /* Arm N1SDP PCIe */ + extern struct pci_ecam_ops pci_n1sdp_ccix_ecam_ops; /* Arm N1SDP PCIe */ ++extern struct pci_ecam_ops pci_n1sdp_remote_pcie_ecam_ops; /* Arm N1SDP PCIe */ + #endif + + #ifdef CONFIG_PCI_HOST_COMMON +-- +2.25.0 +
meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_5.4.bbappend +1 -0
@@ -11,6 +11,7 @@ SRC_URI_append_n1sdp = " \ file://0002-pci_quirk-add-acs-override-for-PCI-devices.patch \ file://0003-pcie-Add-quirk-for-the-Arm-Neoverse-N1SDP-platform.patch \ file://0004-n1sdp-update-n1sdp-pci-quirk-for-SR-IOV-support.patch \ + file://0005-n1sdp-pcie-add-quirk-support-enabling-remote-chip-PC.patch \ file://enable-realtek-R8169.cfg \ file://scripts-dtc-remove-redundant-YYLOC.patch \ "
Signature · 1 line
2.17.1
PATCH 3/3 arm-bsp/scp-firmware: set CCIX speed to GEN3 to work with interposer C2C setup
In reply to Khasim MohammedSet CCIX speed to GEN3 to work with interposer C2C setup.
In this usecase set downstream/upstream port transmitter preset value to 4.
Change-Id I9795a46d9a349dc2813a4ed92944a481c0a2498e
Signed-off-by Khasim Syed Mohammed <[email protected]>
--- ...t-CCIX-speed-to-GEN3-to-work-with-in.patch | 85 +++++++++++++++++++ .../scp-firmware/scp-firmware-n1sdp.inc | 6 ++ 2 files changed, 91 insertions(+) create mode 100644 meta-arm-bsp/recipes-bsp/scp-firmware/files/n1sdp/0001-product-n1sdp-set-CCIX-speed-to-GEN3-to-work-with-in.patch
meta-arm-bsp/recipes-bsp/scp-firmware/files/n1sdp/0001-product-n1sdp-set-CCIX-speed-to-GEN3-to-work-with-in.patch new file +85 -0
@@ -0,0 +1,85 @@ +Upstream-Status: Inappropriate [will not be submitted as its only required till hardware gets fixed] + +The patch is picked from git repo: +https://git.linaro.org/landing-teams/working/arm/n1sdp-pcie-quirk.git/tree/scp/0001-product-n1sdp-set-CCIX-speed-to-GEN3-to-work-with-in.patch + +Signed-off-by: Khasim Syed Mohammed <[email protected]> + +From a6d545cf9b6c46f2ea415d64fa81eb4771cfb51c Mon Sep 17 00:00:00 2001 +From: Jagadeesh Ujja <[email protected]> +Date: Thu, 28 May 2020 16:19:12 +0530 +Subject: [PATCH] product/n1sdp: set CCIX speed to GEN3 to work with interposer + C2C setup + +Set CCIX speed to GEN3 to work with interposer C2C setup +In this use case set downstream/upstream port transmitter +preset value to 4. + +Change-Id: I16e72a5eaa105386a64ab4ffe56f67134c670313 +Signed-off-by: Jagadeesh Ujja <[email protected]> +--- + .../module/n1sdp_pcie/src/mod_n1sdp_pcie.c | 33 +++++++++++++++---- + 1 file changed, 26 insertions(+), 7 deletions(-) + +diff --git a/product/n1sdp/module/n1sdp_pcie/src/mod_n1sdp_pcie.c b/product/n1sdp/module/n1sdp_pcie/src/mod_n1sdp_pcie.c +index 19fa5a5..a93e6cc 100644 +--- a/product/n1sdp/module/n1sdp_pcie/src/mod_n1sdp_pcie.c ++++ b/product/n1sdp/module/n1sdp_pcie/src/mod_n1sdp_pcie.c +@@ -206,7 +206,13 @@ static int n1sdp_pcie_phy_init(fwk_id_t id) + if (dev_ctx == NULL) + return FWK_E_PARAM; + +- gen_speed = dev_ctx->config->ccix_capable ? PCIE_GEN_4 : PCIE_GEN_3; ++ if ((n1sdp_get_chipid() != 0x0) || ++ !dev_ctx->config->ccix_capable || ++ pcie_ctx.c2c_api->is_slave_alive()) ++ gen_speed = PCIE_GEN_3; ++ else ++ gen_speed = PCIE_GEN_4; ++ + lane_count = LAN_COUNT_IN_X_16; + + FWK_LOG_INFO("[%s] Initializing PHY...", pcie_type[did]); +@@ -239,7 +245,13 @@ static int n1sdp_pcie_controller_init(fwk_id_t id, bool ep_mode) + if (dev_ctx == NULL) + return FWK_E_PARAM; + +- gen_speed = dev_ctx->config->ccix_capable ? PCIE_GEN_4 : PCIE_GEN_3; ++ if ((n1sdp_get_chipid() != 0x0) || ++ !dev_ctx->config->ccix_capable || ++ pcie_ctx.c2c_api->is_slave_alive()) ++ gen_speed = PCIE_GEN_3; ++ else ++ gen_speed = PCIE_GEN_4; ++ + lane_count = LAN_COUNT_IN_X_16; + + if (ep_mode) { +@@ -282,12 +294,19 @@ static int n1sdp_pcie_link_training(fwk_id_t id, bool ep_mode) + if (dev_ctx == NULL) + return FWK_E_PARAM; + +- gen_speed = dev_ctx->config->ccix_capable ? PCIE_GEN_4 : PCIE_GEN_3; ++ if ((n1sdp_get_chipid() != 0x0) || ++ !dev_ctx->config->ccix_capable || ++ pcie_ctx.c2c_api->is_slave_alive()) { ++ gen_speed = PCIE_GEN_3; ++ down_stream_tx_preset = PCIE_RC_TX_PRESET_VALUE; ++ up_stream_tx_preset = PCIE_RC_TX_PRESET_VALUE; ++ } else { ++ gen_speed = PCIE_GEN_4; ++ down_stream_tx_preset = CCIX_RC_TX_PRESET_VALUE; ++ up_stream_tx_preset = CCIX_RC_TX_PRESET_VALUE; ++ } ++ + lane_count = LAN_COUNT_IN_X_16; +- down_stream_tx_preset = dev_ctx->config->ccix_capable ? +- CCIX_RC_TX_PRESET_VALUE : PCIE_RC_TX_PRESET_VALUE; +- up_stream_tx_preset = dev_ctx->config->ccix_capable ? +- CCIX_RC_TX_PRESET_VALUE : PCIE_RC_TX_PRESET_VALUE; + + if (gen_speed >= PCIE_GEN_3 && !ep_mode) { + FWK_LOG_INFO( +-- +2.25.0 +
meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc +6 -0
@@ -4,6 +4,12 @@ SRCREV = "350be71a2ecef588b8ff5a095a0840de23506e45" SCP_PLATFORM = "n1sdp" SCP_LOG_LEVEL = "INFO" +FILESEXTRAPATHS_prepend := "${THISDIR}/files/:" + +SRC_URI_append = " \ + file://0001-product-n1sdp-set-CCIX-speed-to-GEN3-to-work-with-in.patch \ + " + COMPATIBLE_MACHINE_n1sdp = "n1sdp" PV = "2.6.0+git${SRCPV}"
Signature · 1 line
2.17.1