summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/freescale/imx8-ss-hsio.dtsi
blob: b9e0e353e431c962e4ab246d9d5d7c681ffb2b03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright 2018 NXP
 *	Richard Zhu <hongxing.zhu@nxp.com>
 */
#include <dt-bindings/soc/imx8_hsio.h>

hsio_subsys: bus@5f000000 {
	compatible = "simple-bus";
	#address-cells = <1>;
	#size-cells = <1>;
	/* Only supports up to 32bits DMA, map all possible DDR as inbound ranges */
	dma-ranges = <0x80000000 0 0x80000000 0x80000000>;
	ranges = <0x5f000000 0x0 0x5f000000 0x21000000>;

	xtal100m: clock-xtal100m {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <100000000>;
		clock-output-names = "xtal_100MHz";
	};

	hsio_refa_clk: clock-hsio-refa {
		compatible = "gpio-gate-clock";
		clocks = <&xtal100m>;
		#clock-cells = <0>;
		enable-gpios = <&lsio_gpio4 27 GPIO_ACTIVE_LOW>;
	};

	hsio_refb_clk: clock-hsio-refb {
		compatible = "gpio-gate-clock";
		clocks = <&xtal100m>;
		#clock-cells = <0>;
		enable-gpios = <&lsio_gpio4 1 GPIO_ACTIVE_LOW>;
	};

	hsio_axi_clk: clock-hsio-axi {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <400000000>;
		clock-output-names = "hsio_axi_clk";
	};

	hsio_per_clk: clock-hsio-per {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <133333333>;
		clock-output-names = "hsio_per_clk";
	};

	pcieb_lpcg: clock-controller@5f060000 {
		compatible = "fsl,imx8qxp-lpcg";
		reg = <0x5f060000 0x10000>;
		#clock-cells = <1>;
		clocks = <&hsio_axi_clk>, <&hsio_axi_clk>, <&hsio_axi_clk>;
		bit-offset = <16 20 24>;
		clock-output-names = "hsio_pcieb_mstr_axi_clk",
				     "hsio_pcieb_slv_axi_clk",
				     "hsio_pcieb_dbi_axi_clk";
		power-domains = <&pd IMX_SC_R_PCIE_B>;
	};

	phyx1_crr1_lpcg: clock-controller@5f0b0000 {
		compatible = "fsl,imx8qxp-lpcg";
		reg = <0x5f0b0000 0x10000>;
		#clock-cells = <1>;
		clocks = <&hsio_per_clk>;
		bit-offset = <16>;
		clock-output-names = "hsio_phyx1_per_clk";
		power-domains = <&pd IMX_SC_R_SERDES_1>;
	};

	pcieb_crr3_lpcg: clock-controller@5f0d0000 {
		compatible = "fsl,imx8qxp-lpcg";
		reg = <0x5f0d0000 0x10000>;
		#clock-cells = <1>;
		clocks = <&hsio_per_clk>;
		bit-offset = <16>;
		clock-output-names = "hsio_pcieb_per_clk";
		power-domains = <&pd IMX_SC_R_PCIE_B>;
	};

	misc_crr5_lpcg: clock-controller@5f0f0000 {
		compatible = "fsl,imx8qxp-lpcg";
		reg = <0x5f0f0000 0x10000>;
		#clock-cells = <1>;
		clocks = <&hsio_per_clk>;
		bit-offset = <16>;
		clock-output-names = "hsio_misc_per_clk";
		power-domains = <&pd IMX_SC_R_HSIO_GPIO>;
	};

	pcieb: pcie@0x5f010000 {
		compatible = "fsl,imx8qm-pcie","snps,dw-pcie";
		reg = <0x5f010000 0x10000>, /* Controller reg */
		      <0x7ff00000 0x80000>, /* PCI cfg space */
		      <0x5f110000 0x60000>; /* lpcg, csr, msic, gpio */
		reg-names = "dbi", "config", "hsio";
		#address-cells = <3>;
		#size-cells = <2>;
		device_type = "pci";
		bus-range = <0x00 0xff>;
		ranges = <0x81000000 0 0x00000000 0x7ff80000 0 0x00010000 /* downstream I/O */
			  0x82000000 0 0x70000000 0x70000000 0 0x0ff00000>; /* non-prefetchable memory */
		num-lanes = <1>;
		num-viewport = <4>;
		interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
				<GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; /* eDMA */
		interrupt-names = "msi", "dma";
		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 0x7>;
		interrupt-map =  <0 0 0 1 &gic 0 105 4>,
				 <0 0 0 2 &gic 0 106 4>,
				 <0 0 0 3 &gic 0 107 4>,
				 <0 0 0 4 &gic 0 108 4>;
		/*
		 * Set the clks/pds for imx8qxp in default, clks/pds should be
		 * refined for exact hw design of imx8 pcie.
		 For example, when hsio-cfg = <PCIEAX1PCIEBX1SATA>,
		 set clks below.
			clocks = <&hsio_lpcg IMX8QM_HSIO_PCIE_B_MSTR_AXI_CLK>,
				<&hsio_lpcg IMX8QM_HSIO_PCIE_B_SLV_AXI_CLK>,
				<&hsio_lpcg IMX8QM_HSIO_PHY_X2_PCLK_1>,
				<&hsio_lpcg IMX8QM_HSIO_PCIE_X1_PER_CLK>,
				<&hsio_lpcg IMX8QM_HSIO_PCIE_B_DBI_AXI_CLK>;
		 */
		clocks = <&pcieb_lpcg 0>,
			 <&pcieb_lpcg 1>,
			 <&pcieb_lpcg 2>,
			 <&phyx1_lpcg 0>,
			 <&phyx1_crr1_lpcg 0>,
			 <&pcieb_crr3_lpcg 0>,
			 <&misc_crr5_lpcg 0>;
		clock-names = "pcie", "pcie_bus", "pcie_inbound_axi",
			      "pcie_phy", "phy_per","pcie_per", "misc_per";
		power-domains = <&pd IMX_SC_R_PCIE_B>,
				<&pd IMX_SC_R_SERDES_1>,
				<&pd IMX_SC_R_HSIO_GPIO>;
		power-domain-names = "pcie", "pcie_phy", "hsio_gpio";
		fsl,max-link-speed = <3>;
		hsio-cfg = <PCIEAX2PCIEBX1>;
		local-addr = <0x80000000>;
		status = "disabled";
	};
};