Lines Matching +full:0 +full:xfe100000
48 #define AFI_AXI_BAR0_SZ 0x00
49 #define AFI_AXI_BAR1_SZ 0x04
50 #define AFI_AXI_BAR2_SZ 0x08
51 #define AFI_AXI_BAR3_SZ 0x0c
52 #define AFI_AXI_BAR4_SZ 0x10
53 #define AFI_AXI_BAR5_SZ 0x14
55 #define AFI_AXI_BAR0_START 0x18
56 #define AFI_AXI_BAR1_START 0x1c
57 #define AFI_AXI_BAR2_START 0x20
58 #define AFI_AXI_BAR3_START 0x24
59 #define AFI_AXI_BAR4_START 0x28
60 #define AFI_AXI_BAR5_START 0x2c
62 #define AFI_FPCI_BAR0 0x30
63 #define AFI_FPCI_BAR1 0x34
64 #define AFI_FPCI_BAR2 0x38
65 #define AFI_FPCI_BAR3 0x3c
66 #define AFI_FPCI_BAR4 0x40
67 #define AFI_FPCI_BAR5 0x44
69 #define AFI_CACHE_BAR0_SZ 0x48
70 #define AFI_CACHE_BAR0_ST 0x4c
71 #define AFI_CACHE_BAR1_SZ 0x50
72 #define AFI_CACHE_BAR1_ST 0x54
74 #define AFI_MSI_BAR_SZ 0x60
75 #define AFI_MSI_FPCI_BAR_ST 0x64
76 #define AFI_MSI_AXI_BAR_ST 0x68
78 #define AFI_CONFIGURATION 0xac
79 #define AFI_CONFIGURATION_EN_FPCI (1 << 0)
81 #define AFI_FPCI_ERROR_MASKS 0xb0
83 #define AFI_INTR_MASK 0xb4
84 #define AFI_INTR_MASK_INT_MASK (1 << 0)
87 #define AFI_SM_INTR_ENABLE 0xc4
88 #define AFI_SM_INTR_INTA_ASSERT (1 << 0)
97 #define AFI_AFI_INTR_ENABLE 0xc8
98 #define AFI_INTR_EN_INI_SLVERR (1 << 0)
108 #define AFI_PCIE_CONFIG 0x0f8
110 #define AFI_PCIE_CONFIG_PCIE_DISABLE_ALL 0xe
111 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_MASK (0xf << 20)
112 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_SINGLE (0x0 << 20)
113 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_420 (0x0 << 20)
114 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_X2_X1 (0x0 << 20)
115 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_DUAL (0x1 << 20)
116 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_222 (0x1 << 20)
117 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_X4_X1 (0x1 << 20)
118 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_411 (0x2 << 20)
119 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_T186_401 (0x0 << 20)
120 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_T186_211 (0x1 << 20)
121 #define AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_T186_111 (0x2 << 20)
123 #define AFI_FUSE 0x104
126 #define AFI_PEX0_CTRL 0x110
127 #define AFI_PEX1_CTRL 0x118
128 #define AFI_PEX2_CTRL 0x128
129 #define AFI_PEX2_CTRL_T186 0x19c
130 #define AFI_PEX_CTRL_RST (1 << 0)
135 #define AFI_PLLE_CONTROL 0x160
139 #define AFI_PEXBIAS_CTRL_0 0x168
141 #define PADS_CTL_SEL 0x0000009C
143 #define PADS_CTL 0x000000A0
144 #define PADS_CTL_IDDQ_1L (1 << 0)
148 #define PADS_PLL_CTL_TEGRA20 0x000000B8
149 #define PADS_PLL_CTL_TEGRA30 0x000000B4
150 #define PADS_PLL_CTL_RST_B4SM (0x1 << 1)
151 #define PADS_PLL_CTL_LOCKDET (0x1 << 8)
152 #define PADS_PLL_CTL_REFCLK_MASK (0x3 << 16)
153 #define PADS_PLL_CTL_REFCLK_INTERNAL_CML (0x0 << 16)
154 #define PADS_PLL_CTL_REFCLK_INTERNAL_CMOS (0x1 << 16)
155 #define PADS_PLL_CTL_REFCLK_EXTERNAL (0x2 << 16)
156 #define PADS_PLL_CTL_TXCLKREF_MASK (0x1 << 20)
157 #define PADS_PLL_CTL_TXCLKREF_DIV10 (0x0 << 20)
158 #define PADS_PLL_CTL_TXCLKREF_DIV5 (0x1 << 20)
159 #define PADS_PLL_CTL_TXCLKREF_BUF_EN (0x1 << 22)
161 #define PADS_REFCLK_CFG0 0x000000C8
162 #define PADS_REFCLK_CFG1 0x000000CC
174 #define RP_VEND_XP 0x00000F00
177 #define RP_VEND_CTL2 0x00000FA8
180 #define RP_PRIV_MISC 0x00000FE0
181 #define RP_PRIV_MISC_PRSNT_MAP_EP_PRSNT (0xE << 0)
182 #define RP_PRIV_MISC_PRSNT_MAP_EP_ABSNT (0xF << 0)
184 #define RP_LINK_CONTROL_STATUS 0x00000090
185 #define RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE 0x20000000
186 #define RP_LINK_CONTROL_STATUS_LINKSTAT_MASK 0x3fff0000
282 return ((where & 0xf00) << 16) | (PCI_BUS(bdf) << 16) | in tegra_pcie_conf_offset()
284 (where & 0xfc); in tegra_pcie_conf_offset()
292 if (bus == 0) { in tegra_pcie_conf_address()
299 return 0; in tegra_pcie_conf_address()
306 if (dev != 0) in tegra_pcie_conf_address()
311 return 0; in tegra_pcie_conf_address()
324 if (err < 0) { in pci_tegra_read_config()
325 value = 0xffffffff; in pci_tegra_read_config()
333 if (PCI_BUS(bdf) == 0) { in pci_tegra_read_config()
335 value &= ~0x00ff0000; in pci_tegra_read_config()
344 return 0; in pci_tegra_read_config()
357 if (err < 0) in pci_tegra_write_config()
358 return 0; in pci_tegra_write_config()
364 return 0; in pci_tegra_write_config()
381 return 0; in tegra_pcie_port_parse_dt()
390 case 0x00000004: in tegra_pcie_get_xbar_config()
393 return 0; in tegra_pcie_get_xbar_config()
395 case 0x00000202: in tegra_pcie_get_xbar_config()
398 return 0; in tegra_pcie_get_xbar_config()
403 case 0x00000204: in tegra_pcie_get_xbar_config()
406 return 0; in tegra_pcie_get_xbar_config()
408 case 0x00020202: in tegra_pcie_get_xbar_config()
411 return 0; in tegra_pcie_get_xbar_config()
413 case 0x00010104: in tegra_pcie_get_xbar_config()
416 return 0; in tegra_pcie_get_xbar_config()
422 case 0x0000104: in tegra_pcie_get_xbar_config()
425 return 0; in tegra_pcie_get_xbar_config()
427 case 0x0000102: in tegra_pcie_get_xbar_config()
430 return 0; in tegra_pcie_get_xbar_config()
435 case 0x0010004: in tegra_pcie_get_xbar_config()
438 return 0; in tegra_pcie_get_xbar_config()
440 case 0x0010102: in tegra_pcie_get_xbar_config()
443 return 0; in tegra_pcie_get_xbar_config()
445 case 0x0010101: in tegra_pcie_get_xbar_config()
448 return 0; in tegra_pcie_get_xbar_config()
464 if (err < 0) { in tegra_pcie_parse_port_info()
471 err = ofnode_read_pci_addr(node, 0, "reg", &addr); in tegra_pcie_parse_port_info()
472 if (err < 0) { in tegra_pcie_parse_port_info()
479 return 0; in tegra_pcie_parse_port_info()
484 return 0; in tegra_pcie_board_init()
491 u32 lanes = 0; in tegra_pcie_parse_dt()
494 err = dev_read_resource(dev, 0, &pcie->pads); in tegra_pcie_parse_dt()
495 if (err < 0) { in tegra_pcie_parse_dt()
501 if (err < 0) { in tegra_pcie_parse_dt()
507 if (err < 0) { in tegra_pcie_parse_dt()
513 if (err < 0) { in tegra_pcie_parse_dt()
522 if (err < 0) { in tegra_pcie_parse_dt()
530 unsigned int index = 0, num_lanes = 0; in tegra_pcie_parse_dt()
534 if (err < 0) { in tegra_pcie_parse_dt()
548 memset(port, 0, sizeof(*port)); in tegra_pcie_parse_dt()
553 if (err < 0) { in tegra_pcie_parse_dt()
564 if (err < 0) { in tegra_pcie_parse_dt()
569 return 0; in tegra_pcie_parse_dt()
607 return 0; in tegra_pcie_power_on()
622 if (err < 0) { in tegra_pcie_power_on()
629 if (err < 0) { in tegra_pcie_power_on()
635 reset_set_enable(PERIPH_ID_AFI, 0); in tegra_pcie_power_on()
642 value = readl(NV_PA_CLK_RST_BASE + 0x48c); in tegra_pcie_power_on()
643 value |= (1 << 0); in tegra_pcie_power_on()
645 writel(value, NV_PA_CLK_RST_BASE + 0x48c); in tegra_pcie_power_on()
649 if (err < 0) { in tegra_pcie_power_on()
654 return 0; in tegra_pcie_power_on()
660 unsigned long start = get_timer(0); in tegra_pcie_pll_wait()
666 return 0; in tegra_pcie_pll_wait()
679 pads_writel(pcie, 0, PADS_CTL_SEL); in tegra_pcie_phy_enable()
709 if (err < 0) { in tegra_pcie_phy_enable()
724 return 0; in tegra_pcie_phy_enable()
747 afi_writel(pcie, 0, AFI_PEXBIAS_CTRL_0);
773 if (err < 0) {
787 reset_set_enable(PERIPH_ID_PCIEXCLK, 0);
796 afi_writel(pcie, 0, AFI_AFI_INTR_ENABLE);
797 afi_writel(pcie, 0, AFI_SM_INTR_ENABLE);
798 afi_writel(pcie, 0, AFI_INTR_MASK);
799 afi_writel(pcie, 0, AFI_FPCI_ERROR_MASKS);
801 return 0;
811 /* BAR 0: type 1 extended configuration space */
812 fpci = 0xfe100000;
825 fpci = 0xfdfc0000;
834 fpci = (((pref->phys_start >> 12) & 0x0fffffff) << 4) | 0x1;
843 fpci = (((mem->phys_start >> 12) & 0x0fffffff) << 4) | 0x1;
852 afi_writel(pcie, 0, AFI_AXI_BAR4_START);
853 afi_writel(pcie, 0, AFI_AXI_BAR4_SZ);
854 afi_writel(pcie, 0, AFI_FPCI_BAR4);
856 afi_writel(pcie, 0, AFI_AXI_BAR5_START);
857 afi_writel(pcie, 0, AFI_AXI_BAR5_SZ);
858 afi_writel(pcie, 0, AFI_FPCI_BAR5);
862 afi_writel(pcie, 0, AFI_CACHE_BAR0_SZ);
863 afi_writel(pcie, 0, AFI_CACHE_BAR1_ST);
864 afi_writel(pcie, 0, AFI_CACHE_BAR1_SZ);
867 afi_writel(pcie, 0, AFI_MSI_FPCI_BAR_ST);
868 afi_writel(pcie, 0, AFI_MSI_BAR_SZ);
869 afi_writel(pcie, 0, AFI_MSI_AXI_BAR_ST);
870 afi_writel(pcie, 0, AFI_MSI_BAR_SZ);
872 return 0;
877 unsigned long ret = 0;
880 case 0:
1029 return 0;
1037 .pads_refclk_cfg0 = 0xfa5cfa5c,
1048 .pads_refclk_cfg0 = 0xfa5cfa5c,
1049 .pads_refclk_cfg1 = 0xfa5cfa5c,
1059 .pads_refclk_cfg0 = 0x44ac44ac,
1069 .pads_refclk_cfg0 = 0x90b890b8,
1079 .pads_refclk_cfg0 = 0x80b880b8,
1080 .pads_refclk_cfg1 = 0x000480b8,
1100 return 0;
1147 if (err < 0) {
1153 if (err < 0) {
1159 if (err < 0) {
1165 if (err < 0) {
1170 return 0;