Difference between revisions of "Spi device tree source code"
Jump to navigation
Jump to search
m |
m (wiki table formatting corrections.) |
||
| Line 10: | Line 10: | ||
{| | {| | ||
|- | |- | ||
| − | |style="background:#ffffff; valign:top; padding:10px;"| | + | | style="background:#ffffff; valign:top; padding:10px;" | |
<pre> | <pre> | ||
| Line 16: | Line 16: | ||
</pre> | </pre> | ||
| − | || | + | | style="background:#ffffff; valign:top; padding:10px;" | |
<pre> | <pre> | ||
| Line 42: | Line 42: | ||
</pre> | </pre> | ||
| − | | | + | | style="background:#ffffff; valign:top; padding:10px;" | |
| − | + | a | |
| − | | | + | | style="background:#ffffff; valign:top; padding:10px;" |
| − | + | b | |
|} | |} | ||
Revision as of 22:37, 11 August 2022
2022-08-11 Thursday
Notes on SPI device tree source, with goal to add SPI device to modified RPi Pico DTS files, which build firmware to run on Sparkfun DEV-18288 board.
In Zephyr RTOS' supported board dts files we find SPI peripherals defined for several boards. Here are excerpts
zephyr/boards/arm/sparkfun_thing_plus_nrf9160/sparkfun_thing_plus_nrf9160_common.dts
1 |
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
cs-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
w25q32jv: w25q32jv@0 {
compatible = "jedec,spi-nor";
label = "W25Q32JV";
reg = <0>;
spi-max-frequency = <40000000>;
wp-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
hold-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
size = <0x2000000>;
has-dpd;
t-enter-dpd = <3000>;
t-exit-dpd = <30000>;
jedec-id = [ ef 40 16 ];
};
};
|
a |
style="background:#ffffff; valign:top; padding:10px;"
b |
^ YAML device bindings files
To support a typical development kit or custom board with multiple peripherals we need a device bindings file comparable to this ... bindings file:
- ~/projects-sandbox/workspace-for-rpi/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.yaml
identifier: nrf9160dk_nrf9160 name: nRF9160-DK-NRF9160 type: mcu arch: arm toolchain: - gnuarmemb - xtools - zephyr ram: 88 flash: 256 supported: - arduino_gpio - arduino_i2c - gpio - i2c - pwm - spi - watchdog - counter