Skip to content

Commit 800d313

Browse files
kamel-bouharaCodrin Ciubotariu
authored andcommitted
ARM: dts: at91: add smartkiz support and a common kizboxmini dtsi file
Split the existing Kizbox Mini boards into three board configuration, the base board, the mother board and the RailDIN board. Add a new dts file for the SmartKiz board support. Signed-off-by: Kévin RAYMOND <k.raymond@overkiz.com> Signed-off-by: Mickael GARDET <m.gardet@overkiz.com> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com> Link: https://lore.kernel.org/r/20191220103835.160154-2-kamel.bouhara@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 625ddd8 commit 800d313

6 files changed

Lines changed: 293 additions & 83 deletions

File tree

arch/arm/boot/dts/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \
3737
at91-ariag25.dtb \
3838
at91-ariettag25.dtb \
3939
at91-cosino_mega2560.dtb \
40-
at91-kizboxmini.dtb \
40+
at91-kizboxmini-base.dtb \
41+
at91-kizboxmini-mb.dtb \
42+
at91-kizboxmini-rd.dtb \
43+
at91-smartkiz.dtb \
4144
at91-wb45n.dtb \
4245
at91sam9g15ek.dtb \
4346
at91sam9g25ek.dtb \
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
/*
3+
* at91-kizboxmini-base.dts - Device Tree file for Overkiz Kizbox mini
4+
* base board
5+
*
6+
* Copyright (C) 2015 Overkiz SAS
7+
* Author: Antoine Aubert <a.aubert@overkiz.com>
8+
* Kévin Raymond <k.raymond@overkiz.com>
9+
*/
10+
/dts-v1/;
11+
#include "at91-kizboxmini-common.dtsi"
12+
13+
/ {
14+
model = "Overkiz Kizbox Mini";
15+
compatible = "overkiz,kizboxmini-base", "atmel,at91sam9g25",
16+
"atmel,at91sam9x5", "atmel,at91sam9";
17+
};
18+
19+
&pinctrl_usart0 {
20+
atmel,pins =
21+
<AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
22+
AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE
23+
AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
24+
};
Lines changed: 81 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
// SPDX-License-Identifier: GPL-2.0-or-later
1+
// SPDX-License-Identifier: GPL-2.0
22
/*
33
* at91-kizboxmini.dts - Device Tree file for Overkiz Kizbox mini board
44
*
5-
* Copyright (C) 2014 Gaël PORTAY <g.portay@overkiz.com>
5+
* Copyright (C) 2014-2018 Overkiz SAS
6+
* Author: Antoine Aubert <a.aubert@overkiz.com>
7+
* Gaël Portay <g.portay@overkiz.com>
8+
* Kévin Raymond <k.raymond@overkiz.com>
9+
* Dorian Rocipon <d.rocipon@overkiz.com>
610
*/
7-
/dts-v1/;
811
#include "at91sam9g25.dtsi"
9-
#include <dt-bindings/pwm/pwm.h>
1012

1113
/ {
12-
model = "Overkiz Kizbox mini";
13-
compatible = "overkiz,kizboxmini", "atmel,at91sam9g25", "atmel,at91sam9x5", "atmel,at91sam9";
14-
1514
chosen {
1615
bootargs = "ubi.mtd=ubi";
1716
stdout-path = &dbgu;
@@ -22,24 +21,16 @@
2221
};
2322

2423
clocks {
25-
slow_xtal {
26-
clock-frequency = <32768>;
27-
};
28-
2924
main_xtal {
3025
clock-frequency = <12000000>;
3126
};
32-
};
3327

34-
ahb {
35-
nand0: nand@40000000 {
36-
nand-bus-width = <8>;
37-
nand-ecc-mode = "hw";
38-
atmel,has-pmecc;
39-
atmel,pmecc-cap = <4>;
40-
atmel,pmecc-sector-size = <512>;
41-
nand-on-flash-bbt;
42-
status = "okay";
28+
slow_xtal {
29+
clock-frequency = <32768>;
30+
};
31+
32+
adc_op_clk {
33+
status = "disabled";
4334
};
4435
};
4536

@@ -63,17 +54,25 @@
6354
};
6455
};
6556

66-
pwm_leds {
57+
leds: pwm_leds {
6758
compatible = "pwm-leds";
6859

69-
green {
60+
led_blue: pwm_blue {
61+
label = "pwm:blue:user";
62+
pwms = <&pwm0 2 10000000 0>;
63+
max-brightness = <255>;
64+
linux,default-trigger = "none";
65+
status = "disabled";
66+
};
67+
68+
led_green: pwm_green {
7069
label = "pwm:green:user";
7170
pwms = <&pwm0 0 10000000 0>;
7271
max-brightness = <255>;
7372
linux,default-trigger = "default-on";
7473
};
7574

76-
red {
75+
led_red: pwm_red {
7776
label = "pwm:red:user";
7877
pwms = <&pwm0 1 10000000 0>;
7978
max-brightness = <255>;
@@ -82,53 +81,12 @@
8281
};
8382
};
8483

85-
&dbgu {
84+
&usart0 {
85+
atmel,use-dma-rx;
86+
atmel,use-dma-tx;
8687
status = "okay";
8788
};
8889

89-
&ebi {
90-
pinctrl-0 = <&pinctrl_ebi_addr_nand
91-
&pinctrl_ebi_data_0_7>;
92-
pinctrl-names = "default";
93-
status = "okay";
94-
95-
nand-controller {
96-
pinctrl-0 = <&pinctrl_nand_oe_we
97-
&pinctrl_nand_cs
98-
&pinctrl_nand_rb>;
99-
pinctrl-names = "default";
100-
status = "okay";
101-
102-
nand@3 {
103-
reg = <0x3 0x0 0x800000>;
104-
rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
105-
cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
106-
nand-bus-width = <8>;
107-
nand-ecc-mode = "hw";
108-
nand-ecc-strength = <4>;
109-
nand-ecc-step-size = <512>;
110-
nand-on-flash-bbt;
111-
label = "atmel_nand";
112-
113-
partitions {
114-
compatible = "fixed-partitions";
115-
#address-cells = <1>;
116-
#size-cells = <1>;
117-
118-
bootstrap@0 {
119-
label = "bootstrap";
120-
reg = <0x0 0x20000>;
121-
};
122-
123-
ubi@20000 {
124-
label = "ubi";
125-
reg = <0x20000 0x7fe0000>;
126-
};
127-
};
128-
};
129-
};
130-
};
131-
13290
&macb0 {
13391
phy-mode = "rmii";
13492
status = "okay";
@@ -137,26 +95,70 @@
13795
&pwm0 {
13896
pinctrl-names = "default";
13997
pinctrl-0 = <&pinctrl_pwm0_pwm0_1
140-
&pinctrl_pwm0_pwm1_1>;
98+
&pinctrl_pwm0_pwm1_1
99+
&pinctrl_pwm0_pwm2_1>;
141100
status = "okay";
142101
};
143102

144-
&tcb0 {
145-
timer@0 {
146-
compatible = "atmel,tcb-timer";
147-
reg = <0>;
148-
};
103+
&dbgu {
104+
status = "okay";
105+
};
149106

150-
timer@1 {
151-
compatible = "atmel,tcb-timer";
152-
reg = <1>;
153-
};
107+
&watchdog {
108+
status = "okay";
154109
};
155110

156-
&usart0 {
111+
&adc0 {
112+
status = "disabled";
113+
};
114+
115+
&rtc {
116+
status = "disabled";
117+
};
118+
119+
&ebi {
120+
pinctrl-0 = <&pinctrl_ebi_addr_nand
121+
&pinctrl_ebi_data_0_7>;
122+
pinctrl-names = "default";
157123
status = "okay";
158124
};
159125

126+
&nand_controller {
127+
status = "okay";
128+
pinctrl-0 = <&pinctrl_nand_oe_we
129+
&pinctrl_nand_cs
130+
&pinctrl_nand_rb>;
131+
pinctrl-names = "default";
132+
133+
nand@3 {
134+
reg = <0x3 0x0 0x800000>;
135+
rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
136+
cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
137+
nand-bus-width = <8>;
138+
nand-ecc-mode = "hw";
139+
nand-ecc-strength = <4>;
140+
nand-ecc-step-size = <512>;
141+
nand-on-flash-bbt;
142+
label = "atmel_nand";
143+
144+
partitions {
145+
compatible = "fixed-partitions";
146+
#address-cells = <1>;
147+
#size-cells = <1>;
148+
149+
bootstrap@0 {
150+
label = "bootstrap";
151+
reg = <0x0 0x20000>;
152+
};
153+
154+
ubi@20000 {
155+
label = "ubi";
156+
reg = <0x20000 0x7fe0000>;
157+
};
158+
};
159+
};
160+
};
161+
160162
&usb0 {
161163
num-ports = <1>;
162164
status = "okay";
@@ -166,6 +168,3 @@
166168
status = "okay";
167169
};
168170

169-
&watchdog {
170-
status = "okay";
171-
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Copyright (C) 2015-2018 Overkiz SAS
4+
* Author: Mickael Gardet <m.gardet@overkiz.com>
5+
* Kévin Raymond <k.raymond@overkiz.com>
6+
*/
7+
/dts-v1/;
8+
#include "at91-kizboxmini-common.dtsi"
9+
10+
/ {
11+
model = "Overkiz Kizbox Mini Mother Board";
12+
compatible = "overkiz,kizboxmini-mb", "atmel,at91sam9g25",
13+
"atmel,at91sam9x5", "atmel,at91sam9";
14+
};
15+
16+
&usb0 {
17+
num-ports = <2>;
18+
};
19+
20+
&rtc {
21+
status = "okay";
22+
};
23+
24+
&led_blue {
25+
status = "okay";
26+
};
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Copyright (C) 2015-2018 Overkiz SAS
4+
* Author: Mickael Gardet <m.gardet@overkiz.com>
5+
* Kévin Raymond <k.raymond@overkiz.com>
6+
*/
7+
/dts-v1/;
8+
#include "at91-kizboxmini-common.dtsi"
9+
10+
/ {
11+
model = "Overkiz Kizbox Mini RailDIN";
12+
compatible = "overkiz,kizboxmini-rd", "atmel,at91sam9g25",
13+
"atmel,at91sam9x5", "atmel,at91sam9";
14+
15+
clocks {
16+
adc_op_clk {
17+
status = "okay";
18+
};
19+
};
20+
};
21+
22+
&pinctrl {
23+
adc0 {
24+
pinctrl_adc0_ad5: adc0_ad5-0 {
25+
/* pull-up disable */
26+
atmel,pins = <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
27+
};
28+
};
29+
};
30+
31+
&usart0 {
32+
status = "disabled";
33+
};
34+
35+
&rtc {
36+
status = "okay";
37+
};
38+
39+
&led_blue {
40+
status = "okay";
41+
};
42+
43+
&adc0 {
44+
atmel,adc-vref = <2500>;
45+
pinctrl-names = "default";
46+
pinctrl-0 = <&pinctrl_adc0_ad5>;
47+
atmel,adc-channels-used = <0x0020>;
48+
status = "okay";
49+
};

0 commit comments

Comments
 (0)