NXP MIMXRT1010-EVK

Overview

This is a set of Bridle’s extension to the original Zephyr upstream board MIMXRT1010-EVK with some adaptions and improvement on Kconfig and Devicetree level.

List of extensions

Kconfig

  • activate self powered USB explicitly and set the maximum of electrical current consumption to 0㎃:

    NXP MIMXRT1010-EVK

    Kconfig.defconfig
    config CDC_ACM_SERIAL_SELF_POWERED
    	default y
    	depends on USB_DEVICE_STACK_NEXT && USBD_CDC_ACM_CLASS
    
    config CDC_ACM_SERIAL_MAX_POWER
    	default 0 if BOARD_MIMXRT1010_EVK	# 0mA (self powered)
    	depends on USB_DEVICE_STACK_NEXT && USBD_CDC_ACM_CLASS
    
  • change log level only in case of use the native USB device port nxp,ehci with CDC-ACM UART zephyr,cdc-acm-uart as Zephyr console:

    NXP MIMXRT1010-EVK

    Kconfig.defconfig
    # Workaround for not being able to have commas in macro arguments
    DT_CHOSEN_Z_CONSOLE := zephyr,console
    DT_COMPAT_Z_CDC_ACM_UART := zephyr,cdc-acm-uart
    DT_COMPAT_NXP_USB := nxp,ehci
    
    # Macros to shorten Kconfig expressions
    DT_CHOSEN_CONSOLE_NODE := $(dt_chosen_path,$(DT_CHOSEN_Z_CONSOLE))
    DT_CHOSEN_CONSOLE_PARENT := $(dt_node_parent,$(DT_CHOSEN_CONSOLE_NODE))
    
    if BOARD_MIMXRT1010_EVK && \
    	$(dt_chosen_enabled,$(DT_CHOSEN_Z_CONSOLE)) && \
    	$(dt_compat_on_bus,$(DT_COMPAT_Z_CDC_ACM_UART),usb) && \
    	$(dt_node_has_compat,$(DT_CHOSEN_CONSOLE_PARENT),$(DT_COMPAT_NXP_USB))
    
    # Logger cannot use itself to log
    choice USBD_CDC_ACM_LOG_LEVEL_CHOICE
    	default USBD_CDC_ACM_LOG_LEVEL_OFF
    	depends on LOG && USB_DEVICE_STACK_NEXT && USBD_CDC_ACM_CLASS
    endchoice
    
    # Set USB log level to error only
    choice USBD_LOG_LEVEL_CHOICE
    	default USBD_LOG_LEVEL_ERR
    	depends on LOG && USB_DEVICE_STACK_NEXT && USBD_CDC_ACM_CLASS
    endchoice
    
    # Set UDC driver log level to error only
    choice UDC_DRIVER_LOG_LEVEL_CHOICE
    	default UDC_DRIVER_LOG_LEVEL_ERR
    	depends on LOG && USB_DEVICE_STACK_NEXT && USBD_CDC_ACM_CLASS
    endchoice
    
    endif # zephyr,cdc-acm-uart
    

Devicetree

  • set default entries for model and compatible of the boards:

    NXP MIMXRT1010-EVK

    mimxrt1010_evk.overlay
    / {
    	model = "NXP MIMXRT1010-EVK board @ UART Concole";
    	compatible = "nxp,mimxrt1010", "nxp,mimxrt1010-uartcons";
    };
    
  • overwrite the Arduino UNO R3 specific edge connecor binding &arduino_header {...}; with additional closed connections:

    NXP MIMXRT1010-EVK

    arduino_r3_connector.dtsi
    &arduino_header {
    	gpio-map = <0 0 &gpio1 21 0>,	/* A0 */
    		   <1 0 &gpio1 23 0>,	/* A1 */
    		   <2 0 &gpio1 24 0>,	/* A2 */
    		   <3 0 &gpio1 28 0>,	/* A3 */
    		   <4 0 &gpio1 15 0>,	/* A4 (shared with D6) */
    		   <5 0 &gpio1 16 0>,	/* A5 (shared with D7) */
    		   <6 0 &gpio1 9 0>,	/* D0 */
    		   <7 0 &gpio1 10 0>,	/* D1 */
    		   <8 0 &gpio1 19 0>,	/* D2 (shared with D10) */
    		   <9 0 &gpio1 20 0>,	/* D3 (shared with D13) */
    		   <10 0 &gpio1 8 0>,	/* D4 (R800 populated) */
    		   <11 0 &gpio1 1 0>,	/* D5 (R793, shared with D14) */
    		   <12 0 &gpio1 15 0>,	/* D6 (shared with A4) */
    		   <13 0 &gpio1 16 0>,	/* D7 (shared with A5) */
    		   <14 0 &gpio2 2 0>,	/* D8 */
    		   <15 0 &gpio1 3 0>,	/* D9 (R795 populated) */
    		   <16 0 &gpio1 19 0>,	/* D10 (shared with D2) */
    		   <17 0 &gpio1 18 0>,	/* D11 */
    		   <18 0 &gpio1 17 0>,	/* D12 */
    		   <19 0 &gpio1 20 0>,	/* D13 (shared with D3) */
    		   <20 0 &gpio1 1 0>,	/* D14 (shared with D5)*/
    		   <21 0 &gpio1 2 0>;	/* D15 */
    };
    

    Note

    On MIMXRT1010-EVK pin D4 (GPIO), D5 (GPIO/PWM), and D9 (GPIO/PWM) are disconnected in default and can be closed optionally. With this GPIO map overwrites the resistors R793, R795 and R800 must be fitted for proper use. But keep in mind that the signals are already connected to other on-board header for the NXP special motor driver add-on board.

  • change active polarity of the green user LED LD1 from low to high:

    NXP MIMXRT1010-EVK

    mimxrt1010_evk.overlay
    &green_led {
    	gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
    };
    
  • add a zephyr,flash-disk node linked to the partition = <&storage_partition>; with the hard defined mass storage disk name disk-name = "NAND";:

    NXP MIMXRT1010-EVK

    mimxrt1010_evk.overlay
    / {
    	msc_disk0 {
    		compatible = "zephyr,flash-disk";
    		partition = <&storage_partition>;
    		disk-name = "NAND";
    		cache-size = <4096>;
    	};
    };