mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 17:22:22 +02:00
pci: tegra: add/enable support for Tegra210
This needs a separate compatible value from Tegra124 since the new HW version has bugs that would prevent a driver for previous HW versions from operating at all. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:
committed by
Tom Warren
parent
a02e263548
commit
d9eda6c441
@@ -387,6 +387,7 @@ static int tegra_pcie_get_xbar_config(const void *fdt, int node, u32 lanes,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case COMPAT_NVIDIA_TEGRA124_PCIE:
|
case COMPAT_NVIDIA_TEGRA124_PCIE:
|
||||||
|
case COMPAT_NVIDIA_TEGRA210_PCIE:
|
||||||
switch (lanes) {
|
switch (lanes) {
|
||||||
case 0x0000104:
|
case 0x0000104:
|
||||||
debug("4x1, 1x1 configuration\n");
|
debug("4x1, 1x1 configuration\n");
|
||||||
@@ -1033,6 +1034,17 @@ static const struct tegra_pcie_soc tegra124_pcie_soc = {
|
|||||||
.force_pca_enable = false,
|
.force_pca_enable = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct tegra_pcie_soc tegra210_pcie_soc = {
|
||||||
|
.num_ports = 2,
|
||||||
|
.pads_pll_ctl = PADS_PLL_CTL_TEGRA30,
|
||||||
|
.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_BUF_EN,
|
||||||
|
.has_pex_clkreq_en = true,
|
||||||
|
.has_pex_bias_ctrl = true,
|
||||||
|
.has_cml_clk = true,
|
||||||
|
.has_gen2 = true,
|
||||||
|
.force_pca_enable = true,
|
||||||
|
};
|
||||||
|
|
||||||
static int process_nodes(const void *fdt, int nodes[], unsigned int count)
|
static int process_nodes(const void *fdt, int nodes[], unsigned int count)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
@@ -1068,6 +1080,10 @@ static int process_nodes(const void *fdt, int nodes[], unsigned int count)
|
|||||||
soc = &tegra124_pcie_soc;
|
soc = &tegra124_pcie_soc;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case COMPAT_NVIDIA_TEGRA210_PCIE:
|
||||||
|
soc = &tegra210_pcie_soc;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
error("unsupported compatible: %s",
|
error("unsupported compatible: %s",
|
||||||
fdtdec_get_compatible(id));
|
fdtdec_get_compatible(id));
|
||||||
@@ -1164,6 +1180,12 @@ void pci_init_board(void)
|
|||||||
|
|
||||||
tegra_pcie_board_init();
|
tegra_pcie_board_init();
|
||||||
|
|
||||||
|
count = fdtdec_find_aliases_for_id(fdt, "pcie-controller",
|
||||||
|
COMPAT_NVIDIA_TEGRA210_PCIE,
|
||||||
|
nodes, ARRAY_SIZE(nodes));
|
||||||
|
if (process_nodes(fdt, nodes, count))
|
||||||
|
return;
|
||||||
|
|
||||||
count = fdtdec_find_aliases_for_id(fdt, "pcie-controller",
|
count = fdtdec_find_aliases_for_id(fdt, "pcie-controller",
|
||||||
COMPAT_NVIDIA_TEGRA124_PCIE,
|
COMPAT_NVIDIA_TEGRA124_PCIE,
|
||||||
nodes, ARRAY_SIZE(nodes));
|
nodes, ARRAY_SIZE(nodes));
|
||||||
|
@@ -130,6 +130,7 @@ enum fdt_compat_id {
|
|||||||
COMPAT_NVIDIA_TEGRA30_SDMMC, /* Tegra30 SDMMC controller */
|
COMPAT_NVIDIA_TEGRA30_SDMMC, /* Tegra30 SDMMC controller */
|
||||||
COMPAT_NVIDIA_TEGRA20_SDMMC, /* Tegra20 SDMMC controller */
|
COMPAT_NVIDIA_TEGRA20_SDMMC, /* Tegra20 SDMMC controller */
|
||||||
COMPAT_NVIDIA_TEGRA124_PCIE, /* Tegra 124 PCIe controller */
|
COMPAT_NVIDIA_TEGRA124_PCIE, /* Tegra 124 PCIe controller */
|
||||||
|
COMPAT_NVIDIA_TEGRA210_PCIE, /* Tegra 210 PCIe controller */
|
||||||
COMPAT_NVIDIA_TEGRA30_PCIE, /* Tegra 30 PCIe controller */
|
COMPAT_NVIDIA_TEGRA30_PCIE, /* Tegra 30 PCIe controller */
|
||||||
COMPAT_NVIDIA_TEGRA20_PCIE, /* Tegra 20 PCIe controller */
|
COMPAT_NVIDIA_TEGRA20_PCIE, /* Tegra 20 PCIe controller */
|
||||||
COMPAT_NVIDIA_TEGRA124_XUSB_PADCTL,
|
COMPAT_NVIDIA_TEGRA124_XUSB_PADCTL,
|
||||||
|
@@ -36,6 +36,7 @@ static const char * const compat_names[COMPAT_COUNT] = {
|
|||||||
COMPAT(NVIDIA_TEGRA30_SDMMC, "nvidia,tegra30-sdhci"),
|
COMPAT(NVIDIA_TEGRA30_SDMMC, "nvidia,tegra30-sdhci"),
|
||||||
COMPAT(NVIDIA_TEGRA20_SDMMC, "nvidia,tegra20-sdhci"),
|
COMPAT(NVIDIA_TEGRA20_SDMMC, "nvidia,tegra20-sdhci"),
|
||||||
COMPAT(NVIDIA_TEGRA124_PCIE, "nvidia,tegra124-pcie"),
|
COMPAT(NVIDIA_TEGRA124_PCIE, "nvidia,tegra124-pcie"),
|
||||||
|
COMPAT(NVIDIA_TEGRA210_PCIE, "nvidia,tegra210-pcie"),
|
||||||
COMPAT(NVIDIA_TEGRA30_PCIE, "nvidia,tegra30-pcie"),
|
COMPAT(NVIDIA_TEGRA30_PCIE, "nvidia,tegra30-pcie"),
|
||||||
COMPAT(NVIDIA_TEGRA20_PCIE, "nvidia,tegra20-pcie"),
|
COMPAT(NVIDIA_TEGRA20_PCIE, "nvidia,tegra20-pcie"),
|
||||||
COMPAT(NVIDIA_TEGRA124_XUSB_PADCTL, "nvidia,tegra124-xusb-padctl"),
|
COMPAT(NVIDIA_TEGRA124_XUSB_PADCTL, "nvidia,tegra124-xusb-padctl"),
|
||||||
|
Reference in New Issue
Block a user