Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boards/arm/frdm_k22f/frdm_k22f.dts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
status = "okay";
};

&i2c0 {
arduino_i2c: &i2c0 {
status = "okay";

fxos8700@1c {
Expand Down
1 change: 1 addition & 0 deletions boards/arm/frdm_k22f/frdm_k22f.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ toolchain:
supported:
- adc
- arduino_gpio
- arduino_i2c
- gpio
- i2c
- nvs
Expand Down
12 changes: 12 additions & 0 deletions boards/arm/frdm_k22f/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ static int frdm_k22f_pinmux_init(const struct device *dev)
| PORT_PCR_ODE_MASK);
#endif

#if CONFIG_SHIELD_FRDM_STBC_AGM01
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the correct way? I mean, adding a CONFIG option for a shield in the board part itself. I remember I had a similar request adding a shield for a microphone but I seem to remember I just added the pinmux part in the shield context itself. But I'm not able to recall it neither to find this out. @erwango, do you remember?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, when possible this should be avoided but this depends if platform has a more generic way to enable pins.
On that part I rely on @MaureenHelm

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed it isn't ideal, but we don't have more generic way to configure pins on this SoC family yet.

/* FXOS8700 INT1 */
pinmux_pin_set(portb, 16, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* FXOS8700 INT2 */
pinmux_pin_set(porta, 4, PORT_PCR_MUX(kPORT_MuxAsGpio));

/* FXAS21002 INT1 */
pinmux_pin_set(portb, 18, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* FXAS21002 INT2 */
pinmux_pin_set(portb, 19, PORT_PCR_MUX(kPORT_MuxAsGpio));
#endif

return 0;
}

Expand Down