1// SPDX-License-Identifier: GPL-2.0
2/*
3 * at91-kizboxmini.dts - Device Tree file for Overkiz Kizbox mini board
4 *
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>
10 */
11#include "at91sam9g25.dtsi"
12
13/ {
14	chosen {
15		bootargs = "ubi.mtd=ubi";
16		stdout-path = &dbgu;
17	};
18
19	memory@20000000 {
20		reg = <0x20000000 0x8000000>;
21	};
22
23	clocks {
24		main_xtal {
25			clock-frequency = <12000000>;
26		};
27
28		slow_xtal {
29			clock-frequency = <32768>;
30		};
31
32		adc_op_clk {
33			status = "disabled";
34		};
35	};
36
37	gpio_keys {
38		compatible = "gpio-keys";
39
40		key-prog {
41			label = "PB_PROG";
42			gpios = <&pioC 17 GPIO_ACTIVE_LOW>;
43			linux,code = <0x102>;
44			wakeup-source;
45		};
46
47		key-reset {
48			label = "PB_RST";
49			gpios = <&pioC 16 GPIO_ACTIVE_LOW>;
50			linux,code = <0x100>;
51			wakeup-source;
52		};
53	};
54
55	leds: led-controller-1 {
56		compatible = "pwm-leds";
57
58		led_blue: led-1 {
59			label = "pwm:blue:user";
60			pwms = <&pwm0 2 10000000 0>;
61			max-brightness = <255>;
62			linux,default-trigger = "none";
63			status = "disabled";
64		};
65
66		led_green: led-2 {
67			label = "pwm:green:user";
68			pwms = <&pwm0 0 10000000 0>;
69			max-brightness = <255>;
70			linux,default-trigger = "default-on";
71		};
72
73		led_red: led-3 {
74			label = "pwm:red:user";
75			pwms = <&pwm0 1 10000000 0>;
76			max-brightness = <255>;
77			linux,default-trigger = "default-on";
78		};
79	};
80};
81
82&usart0 {
83	atmel,use-dma-rx;
84	atmel,use-dma-tx;
85	status = "okay";
86};
87
88&macb0 {
89	phy-mode = "rmii";
90	status = "okay";
91};
92
93&pwm0 {
94	pinctrl-names = "default";
95	pinctrl-0 = <&pinctrl_pwm0_pwm0_1
96		     &pinctrl_pwm0_pwm1_1
97		     &pinctrl_pwm0_pwm2_1>;
98	status = "okay";
99};
100
101&dbgu {
102	status = "okay";
103};
104
105&watchdog {
106	status = "okay";
107};
108
109&adc0 {
110	status = "disabled";
111};
112
113&rtc {
114	status = "disabled";
115};
116
117&ebi {
118	pinctrl-0 = <&pinctrl_ebi_addr_nand
119			&pinctrl_ebi_data_0_7>;
120	pinctrl-names = "default";
121	status = "okay";
122};
123
124&nand_controller {
125	status = "okay";
126	pinctrl-0 = <&pinctrl_nand_oe_we
127		     &pinctrl_nand_cs
128		     &pinctrl_nand_rb>;
129	pinctrl-names = "default";
130
131	nand@3 {
132		reg = <0x3 0x0 0x800000>;
133		rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
134		cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
135		nand-bus-width = <8>;
136		nand-ecc-mode = "hw";
137		nand-ecc-strength = <4>;
138		nand-ecc-step-size = <512>;
139		nand-on-flash-bbt;
140		label = "atmel_nand";
141
142		partitions {
143			compatible = "fixed-partitions";
144			#address-cells = <1>;
145			#size-cells = <1>;
146
147			bootstrap@0 {
148				label = "bootstrap";
149				reg = <0x0 0x20000>;
150			};
151
152			ubi@20000 {
153				label = "ubi";
154				reg = <0x20000 0x7fe0000>;
155			};
156		};
157	};
158};
159
160&usb0 {
161	num-ports = <1>;
162	status = "okay";
163};
164
165&usb1 {
166	status = "okay";
167};
168
169