boards: frdm_k82f: Add pinctrl groups for frdm_k82f

Add pinctrl groups for frdm_k82f

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-02-28 15:46:34 -06:00 committed by David Leach
commit dd94da5bc1
4 changed files with 93 additions and 31 deletions

View file

@ -0,0 +1,83 @@
/*
* NOTE: Autogenerated file by kinetis_signal2dts.py
* for MK82FN256VLL15/signal_configuration.xml
*
* Copyright (c) 2022, NXP
* SPDX-License-Identifier: Apache-2.0
*/
#include <nxp/kinetis/MK82FN256VLL15-pinctrl.h>
&pinctrl {
adc0_default: adc0_default {
group0 {
pinmux = <ADC0_SE15_PTC1>;
drive-strength = "low";
slew-rate = "fast";
};
};
ftm3_default: ftm3_default {
group0 {
pinmux = <FTM3_CH4_PTC8>,
<FTM3_CH5_PTC9>,
<FTM3_CH6_PTC10>;
drive-strength = "low";
slew-rate = "fast";
};
};
i2c0_default: i2c0_default {
group0 {
pinmux = <I2C0_SCL_PTB2>,
<I2C0_SDA_PTB3>;
drive-strength = "low";
drive-open-drain;
slew-rate = "fast";
};
};
i2c3_default: i2c3_default {
group0 {
pinmux = <I2C3_SCL_PTA2>,
<I2C3_SDA_PTA1>;
drive-strength = "low";
drive-open-drain;
bias-pull-up;
slew-rate = "fast";
};
};
lpuart4_default: lpuart4_default {
group0 {
pinmux = <LPUART4_RX_PTC14>,
<LPUART4_TX_PTC15>;
drive-strength = "low";
slew-rate = "fast";
};
};
spi0_default: spi0_default {
group0 {
pinmux = <SPI0_SCK_PTD1>,
<SPI0_SOUT_PTD2>,
<SPI0_SIN_PTD3>,
<SPI0_PCS1_PTD4>;
drive-strength = "low";
slew-rate = "fast";
};
};
spi1_default: spi1_default {
group0 {
pinmux = <SPI1_SCK_PTE1>,
<SPI1_SOUT_PTE2>,
<SPI1_SIN_PTE4>,
<SPI1_PCS0_PTE5>;
drive-strength = "low";
slew-rate = "fast";
};
};
};

View file

@ -7,8 +7,9 @@
/dts-v1/;
#include <mem.h>
#include <nxp/MK82FN256VLL15.dtsi>
#include <nxp/nxp_k82fn256vxx15.dtsi>
#include <dt-bindings/pwm/pwm.h>
#include "frdm_k82f-pinctrl.dtsi"
/ {
model = "NXP Kinetis K82 Freedom Board";
@ -113,7 +114,7 @@
&adc0 {
status = "okay";
pinctrl-0 = <&ADC0_SE15_PTC1>;
pinctrl-0 = <&adc0_default>;
pinctrl-names = "default";
};
@ -169,7 +170,7 @@
&i2c3 {
status = "okay";
pinctrl-0 = <&I2C3_SDA_PTA1 &I2C3_SCL_PTA2>;
pinctrl-0 = <&i2c3_default>;
pinctrl-names = "default";
fxos8700@1c {
@ -180,17 +181,9 @@
};
};
&I2C3_SDA_PTA1 {
drive-open-drain;
};
&I2C3_SCL_PTA2 {
drive-open-drain;
};
&lpuart4 {
status = "okay";
pinctrl-0 = <&LPUART4_RX_PTC14 &LPUART4_TX_PTC15>;
pinctrl-0 = <&lpuart4_default>;
pinctrl-names = "default";
current-speed = <115200>;
};
@ -199,15 +192,14 @@
status = "okay";
compatible = "nxp,kinetis-ftm-pwm";
#pwm-cells = <3>;
pinctrl-0 = <&FTM3_CH4_PTC8 &FTM3_CH5_PTC9 &FTM3_CH6_PTC10>;
pinctrl-0 = <&ftm3_default>;
pinctrl-names = "default";
};
&spi1 {
status = "okay";
pinctrl-0 = <&SPI1_SCK_PTE1 &SPI1_SOUT_PTE2
&SPI1_SIN_PTE4 &SPI1_PCS0_PTE5>;
pinctrl-0 = <&spi1_default>;
pinctrl-names = "default";
mx25u32: mx25u3235f@0 {
@ -240,20 +232,12 @@ zephyr_udc0: &usbotg {
arduino_i2c: &i2c0 {
status = "okay";
pinctrl-0 = <&I2C0_SDA_PTB3 &I2C0_SCL_PTB2>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
};
&I2C0_SDA_PTB3 {
drive-open-drain;
};
&I2C0_SCL_PTB2 {
drive-open-drain;
};
arduino_spi: &spi0 {
status = "okay";
pinctrl-0 = <&SPI0_SCK_PTD1 &SPI0_SOUT_PTD2 &SPI0_SIN_PTD3 &SPI0_PCS1_PTD4>;
pinctrl-0 = <&spi0_default>;
pinctrl-names = "default";
};

View file

@ -8,6 +8,7 @@ CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_PINMUX=y
CONFIG_PINCTRL=y
CONFIG_GPIO=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000
CONFIG_OSC_LOW_POWER=y

View file

@ -77,12 +77,6 @@ static int frdm_k82f_pinmux_init(const struct device *dev)
pinmux_pin_set(portd, 4, PORT_PCR_MUX(kPORT_MuxAlt2));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart4), okay) && CONFIG_SERIAL
/* LPUART4 RX, TX */
pinmux_pin_set(portc, 14, PORT_PCR_MUX(kPORT_MuxAlt3));
pinmux_pin_set(portc, 15, PORT_PCR_MUX(kPORT_MuxAlt3));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc0), okay) && CONFIG_ADC
/* ADC0_SE15 */
pinmux_pin_set(portc, 1, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog));