Commit d2465dc6 authored by Daniel DeGrasse's avatar Daniel DeGrasse Committed by David Leach
Browse files

boards: arm: mixmrt1040_evk: enable RT1040 EVK I2C support

Enable support for RT1040 EVK. This support was verified using the I2C
target test.

Signed-off-by: default avatarDaniel DeGrasse <daniel.degrasse@nxp.com>
parent cc3ca993
Loading
Loading
Loading
Loading
+8 −0
Changes for boards/arm/mimxrt1040_evk/doc/index.rst: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -99,6 +99,8 @@ already supported, which can also be re-used on this mimxrt1040_evk board:
+-----------+------------+-------------------------------------+
| DMA       | on-chip    | dma                                 |
+-----------+------------+-------------------------------------+
| I2C       | on-chip    | i2c                                 |
+-----------+------------+-------------------------------------+

The default configuration can be found in the defconfig file:

@@ -134,6 +136,12 @@ The MIMXRT1040 SoC has five pairs of pinmux/gpio controllers.
+---------------+-----------------+---------------------------+
| GPIO_SD_B0_00 | LPSPI1_SCK      | SPI Clock                 |
+---------------+-----------------+---------------------------+
| GPIO_SD_B0_00 | LPSPI1_SCK      | SPI Clock                 |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_00 | LPI2C1_SCL      | I2C Clock                 |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_01 | LPI2C1_SDA      | I2C Data                  |
+---------------+-----------------+---------------------------+

.. note::
        In order to use the SPI peripheral on this board, resistors R350, R346,
+25 −0
Changes for boards/arm/mimxrt1040_evk/mimxrt1040_evk-pinctrl.dtsi: 25 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -30,6 +30,31 @@
		};
	};

	/* LPI2C1 SDA: J17 pin 9, LPI2C1 SCL: J17 pin 10 */
	pinmux_lpi2c1: pinmux_lpi2c1 {
		group0 {
			pinmux = <&iomuxc_gpio_ad_b1_00_lpi2c1_scl>,
				<&iomuxc_gpio_ad_b1_01_lpi2c1_sda>;
			drive-strength = "r0-6";
			drive-open-drain;
			slew-rate = "slow";
			nxp,speed = "100-mhz";
			input-enable;
		};
	};

	/* Conflicts with lpspi1 pin routing. SDA: J17 pin 3, SCL: J17 pin 6 */
	pinmux_lpi2c3: pinmux_lpi2c3 {
		group0 {
			pinmux = <&iomuxc_gpio_sd_b0_00_lpi2c3_scl>,
				<&iomuxc_gpio_sd_b0_01_lpi2c3_sda>;
			drive-strength = "r0-6";
			slew-rate = "slow";
			nxp,speed = "100-mhz";
			input-enable;
		};
	};

	/* Note that R350, R346, and R360 must be populated to use SPI */
	pinmux_lpspi1: pinmux_lpspi1 {
		group0 {
+12 −0
Changes for boards/arm/mimxrt1040_evk/mimxrt1040_evk.dts: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -129,6 +129,18 @@
	status = "okay";
};

&lpi2c1 {
	status = "okay";
	pinctrl-0 = <&pinmux_lpi2c1>;
	pinctrl-names = "default";
};

/* Leave LPI2C3 disabled by default, since it conflicts with LPSPI1 pins */
&lpi2c3 {
	pinctrl-0 = <&pinmux_lpi2c3>;
	pinctrl-names = "default";
};

/* GPT and Systick are enabled. If power management is enabled, the GPT
 * timer will be used instead of systick, as allows the core clock to
 * be gated.
+1 −0
Changes for boards/arm/mimxrt1040_evk/mimxrt1040_evk.yaml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -20,3 +20,4 @@ supported:
  - pwm
  - adc
  - spi
  - i2c
+1 −0
Changes for tests/drivers/i2c/i2c_target_api/boards/mimxrt1040_evk.conf: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
CONFIG_I2C_VIRTUAL=n
Loading