Skip to content

Commit 97ee3e8

Browse files
everederokartben
authored andcommitted
dts: atmel: add spi node for arduino due
Add SPI0 node and associated pincontrols in Arduino Due device tree. Signed-off-by: Eve Redero <eve.redero@gmail.com>
1 parent 6f33793 commit 97ee3e8

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

boards/arduino/due/arduino_due-pinctrl.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
};
5454
};
5555

56+
spi0_default: spi0_default {
57+
group1 {
58+
pinmux = <PA25A_SPI0_MISO>,
59+
<PA26A_SPI0_MOSI>,
60+
<PA27A_SPI0_SPCK>;
61+
};
62+
};
63+
5664
pwm0_default: pwm0_default {
5765
group1 {
5866
pinmux = <PC4B_PWM_PWML1>,

boards/arduino/due/arduino_due.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@
5858
pinctrl-names = "default";
5959
};
6060

61+
&spi0 {
62+
status = "okay";
63+
pinctrl-0 = <&spi0_default>;
64+
pinctrl-names = "default";
65+
cs-gpios = <&pioa 28 GPIO_ACTIVE_LOW>;
66+
};
67+
6168
&uart {
6269
status = "okay";
6370
current-speed = <115200>;

dts/arm/atmel/sam3x.dtsi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,26 @@
5050
reg = <0x20070000 0x18000>;
5151
};
5252

53+
spi0: spi@40008000 {
54+
compatible = "atmel,sam-spi";
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
reg = <0x40008000 0x4000>;
58+
interrupts = <24 0>;
59+
clocks = <&pmc PMC_TYPE_PERIPHERAL 24>;
60+
status = "disabled";
61+
};
62+
63+
spi1: spi@4000c000 {
64+
compatible = "atmel,sam-spi";
65+
#address-cells = <1>;
66+
#size-cells = <0>;
67+
reg = <0x4000c000 0x4000>;
68+
interrupts = <25 0>;
69+
clocks = <&pmc PMC_TYPE_PERIPHERAL 25>;
70+
status = "disabled";
71+
};
72+
5373
/* Only used for HWINFO device ID */
5474
eefc: flash-controller@400e0a00 {
5575
compatible = "atmel,sam-flash-controller";

0 commit comments

Comments
 (0)