am243x_evm/am2434/r5f0_0: add SPI support
Add OMAP multi-channel SPI node to the device tree and add overlay for the SPI loopback test. Signed-off-by: Amneesh Singh <a-singh7@ti.com>
This commit is contained in:
parent
b6d261b989
commit
c49ec80948
@ -24,6 +24,22 @@
|
||||
i2c0_sda: i2c0_sda_default {
|
||||
pinmux = <K3_PINMUX(0x264, PIN_INPUT_PULLUP, MUX_MODE_0)>;
|
||||
};
|
||||
|
||||
spi0_cs0: spi0_cs0_default {
|
||||
pinmux = <K3_PINMUX(0x208, PIN_OUTPUT, MUX_MODE_0)>;
|
||||
};
|
||||
|
||||
spi0_clk: spi0_clk_default {
|
||||
pinmux = <K3_PINMUX(0x210, PIN_OUTPUT, MUX_MODE_0)>;
|
||||
};
|
||||
|
||||
spi0_d0: spi0_d0_default {
|
||||
pinmux = <K3_PINMUX(0x214, PIN_INPUT, MUX_MODE_0)>;
|
||||
};
|
||||
|
||||
spi0_d1: spi0_d1_default {
|
||||
pinmux = <K3_PINMUX(0x218, PIN_OUTPUT, MUX_MODE_0)>;
|
||||
};
|
||||
};
|
||||
|
||||
&mcu_pinctrl {
|
||||
|
||||
@ -89,6 +89,12 @@
|
||||
power-domains = <&i2c0_pd>;
|
||||
};
|
||||
|
||||
&mcspi0 {
|
||||
pinctrl-0 = <&spi0_clk &spi0_cs0 &spi0_d0 &spi0_d1>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
ti,vrefp = <1800>;
|
||||
ti,fifo = <0>;
|
||||
|
||||
@ -10,4 +10,6 @@ ram: 256
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
supported:
|
||||
- spi
|
||||
vendor: ti
|
||||
|
||||
@ -215,6 +215,16 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mcspi0: spi@20100000 {
|
||||
compatible = "ti,omap-mcspi";
|
||||
reg = <0x20100000 0x400>;
|
||||
clock-frequency = <DT_FREQ_M(50)>;
|
||||
ti,spi-num-cs = <4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
adc0: adc@28001000 {
|
||||
compatible = "ti,am335x-adc";
|
||||
reg = <0x28001000 DT_SIZE_K(1)>;
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
# Copyright (c) 2025 Texas Instruments
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_SPI_LOOPBACK_MODE_LOOP=y
|
||||
CONFIG_SPI_IDEAL_TRANSFER_DURATION_SCALING=25
|
||||
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Texas Instruments
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <freq.h>
|
||||
|
||||
&mcspi0 {
|
||||
slow@0 {
|
||||
compatible = "test-spi-loopback-slow";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <DT_FREQ_K(500)>;
|
||||
};
|
||||
|
||||
fast@0 {
|
||||
compatible = "test-spi-loopback-fast";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <DT_FREQ_M(50)>;
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user