Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing arduino definitions to nRF5340 Audio DK board #69794

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ toolchain:
ram: 448
flash: 1024
supported:
- arduino_adc
- arduino_i2c
- arduino_serial
- arduino_spi
- gpio
- i2s
- spi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
};
};

arduino_adc: analog-connector {
compatible = "arduino,uno-adc";
#io-channel-cells = <1>;
io-channel-map = <0 &adc 1>, /* A0 = P0.4 = AIN1 */
<1 &adc 2>, /* A1 = P0.5 = AIN2 */
<2 &adc 4>, /* A2 = P0.6 = AIN4 */
<3 &adc 5>, /* A3 = P0.7 = AIN5 */
<4 &adc 6>, /* A4 = P0.25 = AIN6 */
<5 &adc 7>; /* A5 = P0.26 = AIN7 */
};

pmic {
compatible = "nordic,npm1100";
nordic,iset-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
Expand Down Expand Up @@ -120,7 +131,7 @@ arduino_serial: &uart1 {
pinctrl-names = "default", "sleep";
};

&i2c1 {
arduino_i2c: &i2c1 {
compatible = "nordic,nrf-twim";
status = "okay";
pinctrl-0 = <&i2c1_default>;
Expand Down Expand Up @@ -172,14 +183,15 @@ arduino_serial: &uart1 {
};
};

&spi4 {
arduino_spi: &spi4 {
compatible = "nordic,nrf-spim";
status = "okay";
cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>, <&gpio0 17 GPIO_ACTIVE_LOW>;
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>,
<&gpio0 11 GPIO_ACTIVE_LOW>, <&gpio0 17 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&spi4_default>;
pinctrl-1 = <&spi4_sleep>;
pinctrl-names = "default", "sleep";
sdhc0: sdhc@0 {
sdhc0: sdhc@1 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why was this changed to 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was suggested by anangl above that shield users will probably use CS0, hence sdhc and cs47l63 should be incremented by 1.

compatible = "zephyr,sdhc-spi-slot";
reg = <0>;
status = "okay";
Expand All @@ -191,7 +203,7 @@ arduino_serial: &uart1 {
spi-max-frequency = <8000000>;
};

cs47l63: cs47l63@1 {
cs47l63: cs47l63@2 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why was this changed to 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was suggested by anangl above that shield users will probably use CS0, hence sdhc and cs47l63 should be incremented by 1.

compatible = "cirrus,cs47l63";
reg = <1>;
spi-max-frequency = <8000000>;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023 Benjamin Björnsson <benjamin.bjornsson@gmail.com>
*/

#include "nordic,nrf-saadc-common.dtsi"
Loading