Skip to content
Permalink
Browse files

soc: nxp: ke1xf: add SPI support

Add SPI support to the NXP Kinetis KE1xF SoC family.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
  • Loading branch information...
henrikbrixandersen authored and MaureenHelm committed May 16, 2019
1 parent 799011c commit 69c144aff2bda46eacaf8802925c05457e1eff40
@@ -16,6 +16,8 @@
uart-2 = &uart2;
i2c-0 = &i2c0;
i2c-1 = &i2c1;
spi-0 = &spi0;
spi-1 = &spi1;
pinmux-a = &pinmux_a;
pinmux-b = &pinmux_b;
pinmux-c = &pinmux_c;
@@ -141,6 +143,28 @@
status = "disabled";
};

spi0: spi@4002c000 {
compatible = "nxp,imx-lpspi";
reg = <0x4002c000 0x1000>;
interrupts = <26 0>;
clocks = <&pcc 0xb0>;
label = "SPI_0";
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};

spi1: spi@4002d000 {
compatible = "nxp,imx-lpspi";
reg = <0x4002d000 0x1000>;
interrupts = <27 0>;
clocks = <&pcc 0xb4>;
label = "SPI_1";
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};

pinmux_a: pinmux@40049000 {
compatible = "nxp,kinetis-pinmux";
reg = <0x40049000 0x1000>;
@@ -77,6 +77,13 @@ config I2C_MCUX_LPI2C

endif # I2C

if SPI

config SPI_MCUX_LPSPI
default y

endif # SPI

source "soc/arm/nxp_kinetis/ke1xf/Kconfig.defconfig.mke*"

endif # SOC_SERIES_KINETIS_KE1XF
@@ -16,6 +16,7 @@ config SOC_SERIES_KINETIS_KE1XF
select HAS_MCUX_CACHE
select HAS_MCUX_FTFX
select HAS_MCUX_LPI2C
select HAS_MCUX_LPSPI
select HAS_MCUX_LPUART
select HAS_MCUX_PCC
select HAS_MCUX_RTC
@@ -208,6 +208,12 @@ static ALWAYS_INLINE void clk_init(void)
#ifdef CONFIG_I2C_1
CLOCK_SetIpSrc(kCLOCK_Lpi2c1, kCLOCK_IpSrcFircAsync);
#endif
#ifdef CONFIG_SPI_0
CLOCK_SetIpSrc(kCLOCK_Lpspi0, kCLOCK_IpSrcFircAsync);
#endif
#ifdef CONFIG_SPI_1
CLOCK_SetIpSrc(kCLOCK_Lpspi1, kCLOCK_IpSrcFircAsync);
#endif
#ifdef DT_NXP_KINETIS_SCG_0_CLKOUT_SOURCE
CLOCK_SetClkOutSel(DT_NXP_KINETIS_SCG_0_CLKOUT_SOURCE);
#endif

0 comments on commit 69c144a

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