Skip to content
Permalink
Browse files

boards: rv32m1_vega: enable the onboard I2C busses and FXOS8700 sensor

Enable the onboard I2C busses and the FXO8700 sensor attached to
I2C_3.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
  • Loading branch information...
henrikbrixandersen authored and MaureenHelm committed Apr 3, 2019
1 parent d18ec53 commit 766abcc0ad361b1a82ee77893ac0f5b4710f6eaf
@@ -58,4 +58,14 @@ config UART_RV32M1_LPUART

endif # SERIAL

if I2C

config I2C_0
def_bool y

config I2C_3
def_bool y if RV32M1_INTMUX

endif # I2C

endif # BOARD_RV32M1_VEGA
@@ -85,6 +85,11 @@ the following hardware features:
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| I2C(M) | on-chip | i2c |
+-----------+------------+-------------------------------------+
| SENSOR | off-chip | fxos8700 polling; |
| | | fxos8700 trigger; |
+-----------+------------+-------------------------------------+

Connections and IOs
===================
@@ -45,6 +45,23 @@ static int rv32m1_vega_pinmux_init(struct device *dev)
pinmux_pin_set(portc, 30, PORT_PCR_MUX(kPORT_MuxAlt2));
#endif

#if CONFIG_I2C_0
/* LPI2C0 SCL, SDA - Arduino header */
pinmux_pin_set(portc, 10, PORT_PCR_MUX(kPORT_MuxAlt4));
pinmux_pin_set(portc, 9, PORT_PCR_MUX(kPORT_MuxAlt4));
#endif

#if CONFIG_I2C_3
/* LPI2C3 SCL, SDA - FXOS8700 */
pinmux_pin_set(porte, 30, PORT_PCR_MUX(kPORT_MuxAlt3));
pinmux_pin_set(porte, 29, PORT_PCR_MUX(kPORT_MuxAlt3));
#endif

/* FXOS8700 INT1, INT2, RST */
pinmux_pin_set(porte, 1, PORT_PCR_MUX(kPORT_MuxAsGpio));
pinmux_pin_set(porte, 22, PORT_PCR_MUX(kPORT_MuxAsGpio));
pinmux_pin_set(porte, 27, PORT_PCR_MUX(kPORT_MuxAsGpio));

return 0;
}

@@ -73,3 +73,20 @@
current-speed = <115200>;
status = "ok";
};

arduino_i2c: &i2c0 {
status = "ok";
};

&i2c3 {
status = "ok";

fxos8700@1e {
compatible = "nxp,fxos8700";
reg = <0x1e>;
label = "FXOS8700";
reset-gpios = <&gpioe 27 0>;
int1-gpios = <&gpioe 1 0>;
int2-gpios = <&gpioe 22 0>;
};
};
@@ -5,3 +5,5 @@ arch: riscv32
toolchain:
- cross-compile
- zephyr
supported:
- i2c

0 comments on commit 766abcc

Please sign in to comment.
You can’t perform that action at this time.