boards: lpcxpresso55s69: Enable i2c instance 4
Enables i2c instance 4 on the lpcxpresso55s69 board. Configures pinmuxes and clocks, and updates board documentation accordingly. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
ecd31dfd47
commit
ab949b023b
7 changed files with 65 additions and 0 deletions
|
@ -33,8 +33,16 @@ config GPIO_MCUX_LPC_PORT1
|
||||||
|
|
||||||
endif # GPIO_MCUX_LPC
|
endif # GPIO_MCUX_LPC
|
||||||
|
|
||||||
|
config I2C_4
|
||||||
|
default y
|
||||||
|
depends on I2C
|
||||||
|
|
||||||
config SPI_8
|
config SPI_8
|
||||||
default y
|
default y
|
||||||
depends on SPI
|
depends on SPI
|
||||||
|
|
||||||
|
config FXOS8700_DRDY_INT1
|
||||||
|
default y
|
||||||
|
depends on FXOS8700_TRIGGER
|
||||||
|
|
||||||
endif # BOARD_LPCXPRESSO55S69_CPU0 || BOARD_LPCXPRESSO55S69_CPU1
|
endif # BOARD_LPCXPRESSO55S69_CPU0 || BOARD_LPCXPRESSO55S69_CPU1
|
||||||
|
|
|
@ -62,6 +62,8 @@ features:
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
| GPIO | on-chip | gpio |
|
| GPIO | on-chip | gpio |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
|
| I2C | on-chip | i2c |
|
||||||
|
+-----------+------------+-------------------------------------+
|
||||||
| SPI | on-chip | spi |
|
| SPI | on-chip | spi |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
| USART | on-chip | serial port-polling |
|
| USART | on-chip | serial port-polling |
|
||||||
|
@ -108,6 +110,10 @@ functionality of a pin.
|
||||||
+---------+-----------------+----------------------------+
|
+---------+-----------------+----------------------------+
|
||||||
| PIO1_7 | GPIO | GREEN LED |
|
| PIO1_7 | GPIO | GREEN LED |
|
||||||
+---------+-----------------+----------------------------+
|
+---------+-----------------+----------------------------+
|
||||||
|
| PIO1_20 | I2C | I2C SCL |
|
||||||
|
+---------+-----------------+----------------------------+
|
||||||
|
| PIO1_21 | I2C | I2C SDA |
|
||||||
|
+---------+-----------------+----------------------------+
|
||||||
|
|
||||||
System Clock
|
System Clock
|
||||||
============
|
============
|
||||||
|
|
|
@ -31,4 +31,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
arduino_i2c: &i2c4 {
|
||||||
|
mma8652fc@1d {
|
||||||
|
compatible = "nxp,fxos8700","nxp,mma8652fc";
|
||||||
|
reg = <0x1d>;
|
||||||
|
label = "MMA8652FC";
|
||||||
|
int1-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
arduino_spi: &spi8 {};
|
arduino_spi: &spi8 {};
|
||||||
|
|
|
@ -69,6 +69,10 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&i2c4 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&spi8 {
|
&spi8 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,8 @@ toolchain:
|
||||||
- gnuarmemb
|
- gnuarmemb
|
||||||
- xtools
|
- xtools
|
||||||
supported:
|
supported:
|
||||||
|
- arduino_i2c
|
||||||
- arduino_spi
|
- arduino_spi
|
||||||
- gpio
|
- gpio
|
||||||
|
- i2c
|
||||||
- spi
|
- spi
|
||||||
|
|
|
@ -87,6 +87,34 @@ static int lpcxpresso_55s69_pinmux_init(struct device *dev)
|
||||||
pinmux_pin_set(port1, DT_ALIAS_SW2_GPIOS_PIN, sw2_config);
|
pinmux_pin_set(port1, DT_ALIAS_SW2_GPIOS_PIN, sw2_config);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_I2C_4
|
||||||
|
/* PORT1 PIN20 is configured as FC4_TXD_SCL_MISO_WS */
|
||||||
|
pinmux_pin_set(port1, 20, IOCON_PIO_FUNC5 |
|
||||||
|
IOCON_PIO_MODE_INACT |
|
||||||
|
IOCON_PIO_SLEW_STANDARD |
|
||||||
|
IOCON_PIO_INV_DI |
|
||||||
|
IOCON_PIO_DIGITAL_EN |
|
||||||
|
IOCON_PIO_OPENDRAIN_DI);
|
||||||
|
|
||||||
|
/* PORT1 PIN21 is configured as FC4_RXD_SDA_MOSI_DATA */
|
||||||
|
pinmux_pin_set(port1, 21, IOCON_PIO_FUNC5 |
|
||||||
|
IOCON_PIO_MODE_INACT |
|
||||||
|
IOCON_PIO_SLEW_STANDARD |
|
||||||
|
IOCON_PIO_INV_DI |
|
||||||
|
IOCON_PIO_DIGITAL_EN |
|
||||||
|
IOCON_PIO_OPENDRAIN_DI);
|
||||||
|
#endif /* CONFIG_I2C_4 */
|
||||||
|
|
||||||
|
#ifdef CONFIG_FXOS8700_TRIGGER
|
||||||
|
pinmux_pin_set(port1, 19, IOCON_PIO_FUNC0 |
|
||||||
|
IOCON_PIO_MODE_PULLUP |
|
||||||
|
IOCON_PIO_INV_DI |
|
||||||
|
IOCON_PIO_DIGITAL_EN |
|
||||||
|
IOCON_PIO_INPFILT_OFF |
|
||||||
|
IOCON_PIO_SLEW_STANDARD |
|
||||||
|
IOCON_PIO_OPENDRAIN_DI);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SPI_8
|
#ifdef CONFIG_SPI_8
|
||||||
/* PORT0 PIN26 is configured as HS_SPI_MOSI */
|
/* PORT0 PIN26 is configured as HS_SPI_MOSI */
|
||||||
pinmux_pin_set(port0, 26, IOCON_PIO_FUNC9 |
|
pinmux_pin_set(port0, 26, IOCON_PIO_FUNC9 |
|
||||||
|
|
|
@ -61,6 +61,14 @@ static ALWAYS_INLINE void clock_init(void)
|
||||||
/* Enables the clock for the I/O controller.: Enable Clock. */
|
/* Enables the clock for the I/O controller.: Enable Clock. */
|
||||||
CLOCK_EnableClock(kCLOCK_Iocon);
|
CLOCK_EnableClock(kCLOCK_Iocon);
|
||||||
|
|
||||||
|
#ifdef CONFIG_I2C_4
|
||||||
|
/* attach 12 MHz clock to FLEXCOMM4 */
|
||||||
|
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4);
|
||||||
|
|
||||||
|
/* reset FLEXCOMM for I2C */
|
||||||
|
RESET_PeripheralReset(kFC4_RST_SHIFT_RSTn);
|
||||||
|
#endif /* CONFIG_I2C_4 */
|
||||||
|
|
||||||
#ifdef CONFIG_SPI_8
|
#ifdef CONFIG_SPI_8
|
||||||
/* Attach 12 MHz clock to FLEXCOMM8 */
|
/* Attach 12 MHz clock to FLEXCOMM8 */
|
||||||
CLOCK_AttachClk(kFRO12M_to_HSLSPI);
|
CLOCK_AttachClk(kFRO12M_to_HSLSPI);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue