xref: /freebsd-src/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-netcp.dtsi (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree Source for K2G Netcp driver
4f126890aSEmmanuel Vadot *
5*01950c46SEmmanuel Vadot * Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
6f126890aSEmmanuel Vadot */
7f126890aSEmmanuel Vadot
8f126890aSEmmanuel Vadotqmss: qmss@4020000 {
9f126890aSEmmanuel Vadot	compatible = "ti,66ak2g-navss-qm";
10f126890aSEmmanuel Vadot	dma-coherent;
11f126890aSEmmanuel Vadot	#address-cells = <1>;
12f126890aSEmmanuel Vadot	#size-cells = <1>;
13f126890aSEmmanuel Vadot	power-domains = <&k2g_pds 0x0018>;
14f126890aSEmmanuel Vadot	clocks = <&k2g_clks 0x0018 0>;
15f126890aSEmmanuel Vadot	clock-names = "nss_vclk";
16f126890aSEmmanuel Vadot	ranges;
17f126890aSEmmanuel Vadot	queue-range = <0 0x80>;
18f126890aSEmmanuel Vadot	linkram0 = <0x4020000 0x7ff>;
19f126890aSEmmanuel Vadot	status = "disabled";
20f126890aSEmmanuel Vadot
21f126890aSEmmanuel Vadot	qmgrs {
22f126890aSEmmanuel Vadot		#address-cells = <1>;
23f126890aSEmmanuel Vadot		#size-cells = <1>;
24f126890aSEmmanuel Vadot		ranges;
25f126890aSEmmanuel Vadot		qmgr0 {
26f126890aSEmmanuel Vadot			managed-queues = <0 0x80>;
27f126890aSEmmanuel Vadot			reg = <0x4100000 0x800>,
28f126890aSEmmanuel Vadot			      <0x4040000 0x100>,
29f126890aSEmmanuel Vadot			      <0x4080000 0x800>,
30f126890aSEmmanuel Vadot			      <0x40c0000 0x800>;
31f126890aSEmmanuel Vadot			reg-names = "peek", "config",
32f126890aSEmmanuel Vadot				    "region", "push";
33f126890aSEmmanuel Vadot		};
34f126890aSEmmanuel Vadot
35f126890aSEmmanuel Vadot	};
36f126890aSEmmanuel Vadot	queue-pools {
37f126890aSEmmanuel Vadot		qpend {
38f126890aSEmmanuel Vadot			qpend-0 {
39f126890aSEmmanuel Vadot				qrange = <77 8>;
40f126890aSEmmanuel Vadot				interrupts = <0 308 0xf04 0 309 0xf04 0 310 0xf04
41f126890aSEmmanuel Vadot					      0 311 0xf04 0 312 0xf04 0 313 0xf04
42f126890aSEmmanuel Vadot					      0 314 0xf04 0 315 0xf04>;
43f126890aSEmmanuel Vadot				qalloc-by-id;
44f126890aSEmmanuel Vadot			};
45f126890aSEmmanuel Vadot		};
46f126890aSEmmanuel Vadot		general-purpose {
47f126890aSEmmanuel Vadot			gp-0 {
48f126890aSEmmanuel Vadot				qrange = <112 8>;
49f126890aSEmmanuel Vadot			};
50f126890aSEmmanuel Vadot			netcp-tx {
51f126890aSEmmanuel Vadot				qrange = <5 8>;
52f126890aSEmmanuel Vadot				qalloc-by-id;
53f126890aSEmmanuel Vadot			};
54f126890aSEmmanuel Vadot		};
55f126890aSEmmanuel Vadot	};
56f126890aSEmmanuel Vadot
57f126890aSEmmanuel Vadot	descriptor-regions {
58f126890aSEmmanuel Vadot		#address-cells = <1>;
59f126890aSEmmanuel Vadot		#size-cells = <1>;
60f126890aSEmmanuel Vadot		ranges;
61f126890aSEmmanuel Vadot		region-12 {
62f126890aSEmmanuel Vadot			id = <12>;
63f126890aSEmmanuel Vadot			region-spec = <1023 128>; /* num_desc desc_size */
64f126890aSEmmanuel Vadot			link-index = <0x400>;
65f126890aSEmmanuel Vadot		};
66f126890aSEmmanuel Vadot	};
67f126890aSEmmanuel Vadot}; /* qmss */
68f126890aSEmmanuel Vadot
69f126890aSEmmanuel Vadotknav_dmas: knav_dmas@0 {
70f126890aSEmmanuel Vadot	compatible = "ti,keystone-navigator-dma";
71f126890aSEmmanuel Vadot	#address-cells = <1>;
72f126890aSEmmanuel Vadot	#size-cells = <1>;
73f126890aSEmmanuel Vadot	status = "disabled";
74f126890aSEmmanuel Vadot	power-domains = <&k2g_pds 0x0018>;
75f126890aSEmmanuel Vadot	clocks = <&k2g_clks 0x0018 0>;
76f126890aSEmmanuel Vadot	clock-names = "nss_vclk";
77f126890aSEmmanuel Vadot	ranges;
78f126890aSEmmanuel Vadot	ti,navigator-cloud-address = <0x40c0000 0x40c0000 0x40c0000 0x40c0000>;
79f126890aSEmmanuel Vadot
80f126890aSEmmanuel Vadot	dma_gbe: dma_gbe@0 {
81f126890aSEmmanuel Vadot		reg = <0x4010000 0x100>,
82f126890aSEmmanuel Vadot		      <0x4011000 0x2a0>, /* 21 Tx channels */
83f126890aSEmmanuel Vadot		      <0x4012000 0x400>, /* 32 Rx channels */
84f126890aSEmmanuel Vadot		      <0x4010100 0x80>,
85f126890aSEmmanuel Vadot		      <0x4013000 0x400>; /* 32 Rx flows */
86f126890aSEmmanuel Vadot		reg-names = "global", "txchan", "rxchan",
87f126890aSEmmanuel Vadot			    "txsched", "rxflow";
88f126890aSEmmanuel Vadot	};
89f126890aSEmmanuel Vadot
90f126890aSEmmanuel Vadot};
91f126890aSEmmanuel Vadot
92f126890aSEmmanuel Vadotnetcp: netcp@4000000 {
93f126890aSEmmanuel Vadot	reg = <0x2620110 0x8>;
94f126890aSEmmanuel Vadot	reg-names = "efuse";
95f126890aSEmmanuel Vadot	compatible = "ti,netcp-1.0";
96f126890aSEmmanuel Vadot	#address-cells = <1>;
97f126890aSEmmanuel Vadot	#size-cells = <1>;
98f126890aSEmmanuel Vadot	status = "disabled";
99f126890aSEmmanuel Vadot	power-domains = <&k2g_pds 0x0018>;
100f126890aSEmmanuel Vadot	clocks = <&k2g_clks 0x0018 3>, <&k2g_clks 0x0018 8>;
101f126890aSEmmanuel Vadot	clock-names = "ethss_clk", "cpts";
102f126890aSEmmanuel Vadot
103f126890aSEmmanuel Vadot	/* NetCP address range */
104f126890aSEmmanuel Vadot	ranges = <0 0x4000000 0x1000000>;
105f126890aSEmmanuel Vadot
106f126890aSEmmanuel Vadot	dma-coherent;
107f126890aSEmmanuel Vadot
108f126890aSEmmanuel Vadot	ti,navigator-dmas = <&dma_gbe 0>, <&dma_gbe 5>;
109f126890aSEmmanuel Vadot	ti,navigator-dma-names = "netrx0", "nettx";
110f126890aSEmmanuel Vadot
111f126890aSEmmanuel Vadot	netcp-devices {
112f126890aSEmmanuel Vadot		#address-cells = <1>;
113f126890aSEmmanuel Vadot		#size-cells = <1>;
114f126890aSEmmanuel Vadot		ranges;
115f126890aSEmmanuel Vadot		gbe: gbe@200000 {
116f126890aSEmmanuel Vadot			label = "netcp-gbe";
117f126890aSEmmanuel Vadot			compatible = "ti,netcp-gbe-2";
118f126890aSEmmanuel Vadot			reg = <0x200000 0x20>, <0x220000 0x20000>;
119f126890aSEmmanuel Vadot			enable-ale;
120f126890aSEmmanuel Vadot			tx-queue = <5>;
121f126890aSEmmanuel Vadot			tx-channel = "nettx";
122f126890aSEmmanuel Vadot			cpts-rftclk-sel = <0>;
123f126890aSEmmanuel Vadot			cpts-ext-ts-inputs = <8>;
124f126890aSEmmanuel Vadot
125f126890aSEmmanuel Vadot			interfaces {
126f126890aSEmmanuel Vadot				gbe0: interface-0 {
127f126890aSEmmanuel Vadot					slave-port = <0>;
128f126890aSEmmanuel Vadot					link-interface = <5>;
129f126890aSEmmanuel Vadot				};
130f126890aSEmmanuel Vadot			};
131f126890aSEmmanuel Vadot		};
132f126890aSEmmanuel Vadot	};
133f126890aSEmmanuel Vadot
134f126890aSEmmanuel Vadot	netcp-interfaces {
135f126890aSEmmanuel Vadot		interface-0 {
136f126890aSEmmanuel Vadot			rx-channel = "netrx0";
137f126890aSEmmanuel Vadot			rx-pool = <512 12>;
138f126890aSEmmanuel Vadot			tx-pool = <511 12>;
139f126890aSEmmanuel Vadot			rx-queue-depth = <128 128 0 0>;
140f126890aSEmmanuel Vadot			rx-buffer-size = <1518 4096 0 0>;
141f126890aSEmmanuel Vadot			rx-queue = <77>;
142f126890aSEmmanuel Vadot			tx-completion-queue = <78>;
143f126890aSEmmanuel Vadot			efuse-mac = <1>;
144f126890aSEmmanuel Vadot			netcp-gbe = <&gbe0>;
145f126890aSEmmanuel Vadot		};
146f126890aSEmmanuel Vadot	};
147f126890aSEmmanuel Vadot};
148