@@ -28,11 +28,11 @@ the phyCORE-i.MX 8M Mini/Nano.
28
28
29
29
- 4GB - 128GB eMMC
30
30
- 8MB - 128MB SPI NOR Flash
31
- - microSD Interfacce
31
+ - microSD Interface
32
32
- 4kB EEPROM
33
33
- Wireless:
34
34
35
- - WiFi: 802.11 b/g/n (ac) 2, 4 GHz / 5 GHz
35
+ - WiFi: 802.11 b/g/n (ac) 2. 4 GHz / 5 GHz
36
36
- BLE 4.2
37
37
- USB:
38
38
@@ -90,6 +90,10 @@ hardware features:
90
90
| GPIO | on-chip | GPIO output |
91
91
| | | GPIO input |
92
92
+-----------+------------+-------------------------------------+
93
+ | SPI | on-chip | ECSPI |
94
+ +-----------+------------+-------------------------------------+
95
+ | CAN | MCP2518 | MCP2518 via ECSPI |
96
+ +-----------+------------+-------------------------------------+
93
97
94
98
The default configuration can be found in the defconfig file:
95
99
:zephyr_file: `boards/phytec/mimx8mm_phyboard_polis/mimx8mm_phyboard_polis_mimx8mm6_m4_defconfig `.
@@ -130,12 +134,27 @@ problems with the A53-Core because UART4 is only accessible from the M4-Core.
130
134
On Boards with the version number 1532.1 UART4 isn't connected to the Debug
131
135
USB. UART4 connects to pin 10(RX) and 12(TX) on the X8 pinheader.
132
136
137
+ SPI:
138
+ ----
139
+
140
+ ECSPI is disabled by default. On phyBOARD Polis, the SoC's ECSPI3 is not
141
+ usable.
142
+ ECSPI1 is connected to the MCP2518 CAN controller with a chip select.
143
+ Another device can be connected via the expansion header (X8):
144
+ PIN 5, 6, 7, 8 (CS, MOSI, MISO, SCLK).
145
+ ECSPI2 is connected to the TPM module. Currently the TPM module is not
146
+ supported by Zephyr.
147
+
148
+ .. note ::
149
+ Please note, that it is necessary to disable ECSPI1 in the Linux devicetree
150
+ before you can use it on the M4-Core with Zephyr.
151
+ See section "Disabling Interfaces in Linux" for more information.
133
152
134
153
LEDs:
135
154
-----
136
155
137
156
Zephyr has the 3-color status LED configured. The led0 alias (the standard
138
- Zephyr led ) is configured to be the blue led . The LED can also light up in red
157
+ Zephyr LED ) is configured to be the blue LED . The LED can also light up in red
139
158
and green.
140
159
141
160
GPIO:
@@ -144,7 +163,18 @@ GPIO:
144
163
The pinmuxing for the GPIOs is the standard pinmuxing of the mimx8mm devicetree
145
164
created by NXP. You can find it here:
146
165
147
- :zephyr_file: `dts/arm/nxp/nxp_imx8m_m4.dtsi `.
166
+ CAN:
167
+ ----
168
+
169
+ The MCP2518 is connected via ECSPI1. The CAN interface is disabled by default
170
+ to not interfere with Linux on the A53-Core.
171
+ If you want to use the CAN interface you need to disable ECSPI in the Linux
172
+ devicetree.
173
+
174
+ .. warning ::
175
+ There is a bug in the MCP2518 driver that causes the enable pin of the
176
+ transceiver to be not set. This causes a ENETDOWN error when trying to send
177
+ a CAN frame. Receiving CAN frames in `listen-only ` mode is possible.
148
178
149
179
The Pinout of the PhyBOARD Polis can be found here:
150
180
@@ -189,12 +219,7 @@ For more information about memory mapping see the
189
219
At compilation time you have to choose which RAM will be used. This
190
220
configuration is done in
191
221
:zephyr_file: `boards/phytec/mimx8mm_phyboard_polis/mimx8mm_phyboard_polis_mimx8mm6_m4.dts `
192
- with "zephyr,flash" (when CONFIG_XIP=y) and "zephyr,sram" properties.
193
-
194
- You also have to set XIP=n or edit the boards defconfig file, if you don't want
195
- the TCM memory area to be used. You can find the defconf file here:
196
-
197
- :zephyr_file: `boards/phytec/mimx8mm_phyboard_polis/mimx8mm_phyboard_polis_mimx8mm6_m4_defconfig `.
222
+ with "zephyr,flash" and "zephyr,sram" properties.
198
223
199
224
The following configurations are possible for the flash and sram chosen nodes
200
225
to change the used memory area:
@@ -211,6 +236,9 @@ to change the used memory area:
211
236
- &ocram_sys
212
237
- &ocram_s_sys
213
238
239
+ By default Zephyr is configured to use the TCM memory area and CONFIG_XIP is
240
+ disabled. If you want to use the OCRAM memory area you have to enable
241
+ CONFIG_XIP.
214
242
215
243
Starting the M4-Core via U-Boot
216
244
===============================
@@ -296,7 +324,7 @@ To debug efficiently you should use multiple terminals:
296
324
(But its also possible to use ``west debug ``)
297
325
298
326
After connecting everything and building with west use this command while in
299
- the directory of the program you build earlier to start a debug server:
327
+ the directory of the program you built earlier to start a debug server:
300
328
301
329
.. code-block :: console
302
330
@@ -321,6 +349,45 @@ target:
321
349
322
350
The program can be debugged using standard gdb techniques.
323
351
352
+ Disabling Interfaces in Linux
353
+ =============================
354
+
355
+ If Zephyr is used on the M4-Core while Linux runs on the A53-Core, it is
356
+ recommended to disable the Interfaces used by the M4-Core to avoid conflicts.
357
+ More simple interfaces can be enabled on both cores at the same time, for
358
+ example GPIO. If you do that, keep in mind that conflicts can still arise.
359
+
360
+ For more complex interfaces like SPI it is necessary to disable them in the
361
+ Linux devicetree, otherwise Linux will probably crash in a panic, resetting
362
+ the SoC.
363
+ For example: disabling ECSPI1 in Linux to use it on the M4-Core with Zephyr:
364
+
365
+ 1. Create a new file called ``disable_spi.dts `` with the following content:
366
+
367
+ .. code :: dts
368
+
369
+ /dts-v1/;
370
+ /plugin/;
371
+
372
+ / {
373
+ fragment@0 {
374
+ target = <&ecspi1>;
375
+ __overlay__ {
376
+ status = "disabled";
377
+ };
378
+ };
379
+ };
380
+
381
+ 2. Compile the file with the dtc compiler to a devicetree blob:
382
+
383
+ .. code :: console
384
+
385
+ $ dtc -@ -I dts -O dtb -o imx8mm-phyboard-polis-disable-spi.dtbo disable_spi.dts;
386
+
387
+ 3. Copy the compiled file to the boot partition of the target.
388
+ 4. Add the filename to the ``/boot/bootenv.txt `` file at the end of the line.
389
+ 5. Reboot the target, the SPI interface is now disabled in Linux.
390
+
324
391
.. _PHYTEC website :
325
392
https://www.phytec.de/produkte/single-board-computer/phyboard-polis-imx8m-mini/
326
393
0 commit comments