0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003 * at91-kizbox3.dts - Device Tree Include file for Overkiz Kizbox 3
0004 * family SoC boards
0005 *
0006 * Copyright (C) 2018 Overkiz SAS
0007 *
0008 * Authors: Dorian Rocipon <d.rocipon@overkiz.com>
0009 * Kevin Carli <k.carli@overkiz.com>
0010 * Mickael Gardet <m.gardet@overkiz.com>
0011 */
0012 /dts-v1/;
0013 #include "sama5d2.dtsi"
0014 #include "sama5d2-pinfunc.h"
0015 #include <dt-bindings/gpio/gpio.h>
0016 #include <dt-bindings/mfd/atmel-flexcom.h>
0017 #include <dt-bindings/pinctrl/at91.h>
0018 #include <dt-bindings/pwm/pwm.h>
0019
0020 / {
0021 model = "Overkiz Kizbox3";
0022 compatible = "overkiz,kizbox3", "atmel,sama5d2", "atmel,sama5";
0023
0024 aliases {
0025 serial0 = &uart0;
0026 serial1 = &uart1;
0027 serial2 = &uart2;
0028 serial3 = &uart3;
0029 serial4 = &uart4;
0030 serial5 = &uart5;
0031 serial6 = &uart8;
0032 };
0033
0034 chosen {
0035 bootargs = "ubi.mtd=ubi";
0036 stdout-path = "serial1:115200n8";
0037 };
0038
0039 clocks {
0040 slow_xtal {
0041 clock-frequency = <32768>;
0042 };
0043
0044 main_xtal {
0045 clock-frequency = <12000000>;
0046 };
0047 };
0048
0049 vdd_adc_vddana: supply_3v3_ana {
0050 compatible = "regulator-fixed";
0051 regulator-name = "adc-vddana";
0052 regulator-min-microvolt = <3300000>;
0053 regulator-max-microvolt = <3300000>;
0054 regulator-always-on;
0055 };
0056
0057 vdd_adc_vref: supply_3v3_ref {
0058 compatible = "regulator-fixed";
0059 regulator-name = "adc-vref";
0060 regulator-min-microvolt = <3300000>;
0061 regulator-max-microvolt = <3300000>;
0062 regulator-always-on;
0063 };
0064
0065 led-controller-1 {
0066 compatible = "pwm-leds";
0067 pinctrl-names = "default";
0068 pinctrl-0 = <&pinctrl_pwm0_pwm_h0
0069 &pinctrl_pwm0_pwm_h1
0070 &pinctrl_pwm0_pwm_h2
0071 &pinctrl_pwm0_pwm_h3>;
0072 status = "disabled";
0073
0074 led-1 {
0075 label = "pwm:red:user";
0076 pwms = <&pwm0 0 10000000 0>;
0077 max-brightness = <255>;
0078 linux,default-trigger = "default-on";
0079 status = "disabled";
0080 };
0081
0082 led-2 {
0083 label = "pwm:green:user";
0084 pwms = <&pwm0 1 10000000 0>;
0085 max-brightness = <255>;
0086 linux,default-trigger = "default-on";
0087 status = "disabled";
0088 };
0089
0090 led-3 {
0091 label = "pwm:blue:user";
0092 pwms = <&pwm0 2 10000000 0>;
0093 max-brightness = <255>;
0094 status = "disabled";
0095 };
0096
0097 led-4 {
0098 label = "pwm:white:user";
0099 pwms = <&pwm0 3 10000000 0>;
0100 max-brightness = <255>;
0101 status = "disabled";
0102 };
0103 };
0104 };
0105
0106 &ebi {
0107 status = "okay";
0108 };
0109
0110 &nand_controller {
0111 status = "okay";
0112
0113 nand@3 {
0114 pinctrl-0 = <&pinctrl_ebi_nand_addr>;
0115 pinctrl-names = "default";
0116 reg = <0x3 0x0 0x800000>;
0117
0118 atmel,rb = <0>;
0119 nand-bus-width = <8>;
0120 nand-ecc-mode = "hw";
0121 nand-ecc-strength = <4>;
0122 nand-ecc-step-size = <512>;
0123 nand-on-flash-bbt;
0124 label = "atmel_nand";
0125
0126 partitions {
0127 compatible = "fixed-partitions";
0128 #address-cells = <1>;
0129 #size-cells = <1>;
0130
0131 bootstrap@0 {
0132 label = "bootstrap";
0133 reg = <0x0 0x20000>;
0134 };
0135
0136 u-boot@20000 {
0137 label = "u-boot";
0138 reg = <0x20000 0x140000>;
0139 };
0140
0141 u-boot-factory@160000 {
0142 label = "u-boot-factory";
0143 reg = <0x160000 0x140000>;
0144 };
0145
0146 ubi@2A0000 {
0147 label = "ubi";
0148 reg = <0x2A0000 0x7D60000>;
0149 };
0150 };
0151
0152 };
0153 };
0154
0155 &rtc {
0156 status = "okay";
0157 };
0158
0159 &pioA {
0160 pinctrl_ebi_nand_addr: ebi-addr-1 {
0161 pinmux = <PIN_PA0__D0>,
0162 <PIN_PA1__D1>,
0163 <PIN_PA2__D2>,
0164 <PIN_PA3__D3>,
0165 <PIN_PA4__D4>,
0166 <PIN_PA5__D5>,
0167 <PIN_PA6__D6>,
0168 <PIN_PA7__D7>,
0169 <PIN_PA8__NWE_NANDWE>,
0170 <PIN_PA9__NCS3>,
0171 <PIN_PA10__A21_NANDALE>,
0172 <PIN_PA11__A22_NANDCLE>,
0173 <PIN_PA21__NANDRDY>;
0174 bias-disable;
0175 };
0176
0177 pinctrl_usart {
0178 pinctrl_usart_0: usart0-0 {
0179 pinmux = < PIN_PB26__URXD0>, <PIN_PB27__UTXD0>;
0180 bias-disable;
0181 };
0182 pinctrl_usart_1: usart1-0 {
0183 pinmux = < PIN_PD2__URXD1>, <PIN_PD3__UTXD1>;
0184 bias-disable;
0185 };
0186 pinctrl_usart_2: usart2-0 {
0187 pinmux = < PIN_PD4__URXD2>, <PIN_PD5__UTXD2>;
0188 bias-disable;
0189 };
0190 pinctrl_usart_3: usart3-0 {
0191 pinmux = < PIN_PC12__URXD3>, <PIN_PC13__UTXD3>;
0192 bias-disable;
0193 };
0194 pinctrl_usart_4: usart4-0 {
0195 pinmux = < PIN_PB3__URXD4>, <PIN_PB4__UTXD4>;
0196 bias-disable;
0197 };
0198 pinctrl_flx0_default: flx0_usart_default {
0199 pinmux = <PIN_PB28__FLEXCOM0_IO0>, //TX
0200 <PIN_PB29__FLEXCOM0_IO1>; //RX
0201 bias-disable;
0202 };
0203 pinctrl_flx3_default: flx3_usart_default {
0204 pinmux = <PIN_PB22__FLEXCOM3_IO1>, //RX
0205 <PIN_PB23__FLEXCOM3_IO0>; //TX
0206 bias-disable;
0207 };
0208 };
0209
0210 pinctrl_flx4_default: flx4_i2c6_default {
0211 pinmux = <PIN_PD12__FLEXCOM4_IO0>, //DATA
0212 <PIN_PD13__FLEXCOM4_IO1>; //CLK
0213 bias-disable;
0214 drive-open-drain = <1>;
0215 };
0216
0217 pinctrl_pwm0 {
0218 pinctrl_pwm0_pwm_h0: pwm0_pwm_h0 {
0219 pinmux = <PIN_PA30__PWMH0>;
0220 bias-disable;
0221 };
0222 pinctrl_pwm0_pwm_h1: pwm0_pwmh1 {
0223 pinmux = <PIN_PB0__PWMH1>;
0224 bias-disable;
0225 };
0226 pinctrl_pwm0_pwm_h2: pwm0_pwm_h2 {
0227 pinmux = <PIN_PB5__PWMH2>;
0228 bias-disable;
0229 };
0230 pinctrl_pwm0_pwm_h3: pwm0_pwm_h3 {
0231 pinmux = <PIN_PB7__PWMH3>;
0232 bias-disable;
0233 };
0234 };
0235
0236 pinctrl_adc {
0237 pinctrl_adc2: adc2 {
0238 pinmux = <PIN_PD21__GPIO>;
0239 bias-disable;
0240 };
0241 pinctrl_adc3: adc3 {
0242 pinmux = <PIN_PD22__GPIO>;
0243 bias-disable;
0244 };
0245 pinctrl_adc4: adc4 {
0246 pinmux = <PIN_PD23__GPIO>;
0247 bias-disable;
0248 };
0249 pinctrl_adc5: adc5 {
0250 pinmux = <PIN_PD24__GPIO>;
0251 bias-disable;
0252 };
0253 };
0254 };
0255
0256 &uart0 {
0257 pinctrl-names = "default";
0258 pinctrl-0 = <&pinctrl_usart_0>;
0259 atmel,use-dma-rx;
0260 atmel,use-dma-tx;
0261 status = "disabled";
0262 };
0263
0264 /* debug uart */
0265 &uart1 {
0266 pinctrl-names = "default";
0267 pinctrl-0 = <&pinctrl_usart_1>;
0268 atmel,use-dma-rx;
0269 atmel,use-dma-tx;
0270 status = "disabled";
0271 };
0272
0273 &uart2 {
0274 pinctrl-names = "default";
0275 pinctrl-0 = <&pinctrl_usart_2>;
0276 atmel,use-dma-rx;
0277 atmel,use-dma-tx;
0278 status = "disabled";
0279 };
0280
0281 &uart3 {
0282 pinctrl-names = "default";
0283 pinctrl-0 = <&pinctrl_usart_3>;
0284 atmel,use-dma-rx;
0285 atmel,use-dma-tx;
0286 status = "disabled";
0287 };
0288
0289 &uart4 {
0290 pinctrl-names = "default";
0291 pinctrl-0 = <&pinctrl_usart_4>;
0292 atmel,use-dma-rx;
0293 atmel,use-dma-tx;
0294 status = "disabled";
0295 };
0296
0297 &flx0 {
0298 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
0299 status = "disabled";
0300
0301 uart5: serial@200 {
0302 pinctrl-names = "default";
0303 pinctrl-0 = <&pinctrl_flx0_default>;
0304 atmel,use-dma-rx;
0305 atmel,use-dma-tx;
0306 status = "disabled";
0307 };
0308 };
0309
0310 &flx3 {
0311 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
0312 status = "disabled";
0313
0314 uart8: serial@200 {
0315 pinctrl-names = "default";
0316 pinctrl-0 = <&pinctrl_flx3_default>;
0317 atmel,use-dma-rx;
0318 atmel,use-dma-tx;
0319 status = "disabled";
0320 };
0321 };
0322
0323 &flx4 {
0324 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
0325 status = "disabled";
0326
0327 i2c6: i2c@600 {
0328 pinctrl-names = "default";
0329 pinctrl-0 = <&pinctrl_flx4_default>;
0330 status = "disabled";
0331 };
0332 };
0333
0334 &pwm0 {
0335 status = "okay";
0336 };
0337
0338 &shutdown_controller {
0339 debounce-delay-us = <976>;
0340 atmel,wakeup-rtc-timer;
0341
0342 input@0 {
0343 reg = <0>;
0344 };
0345 };
0346
0347 &watchdog {
0348 status = "okay";
0349 };
0350
0351 &adc {
0352 pinctrl-names = "default";
0353 pinctrl-0 = <&pinctrl_adc2
0354 &pinctrl_adc3
0355 &pinctrl_adc4
0356 &pinctrl_adc5>;
0357
0358 vddana-supply = <&vdd_adc_vddana>;
0359 vref-supply = <&vdd_adc_vref>;
0360 status = "disabled";
0361 };
0362
0363 &securam {
0364 export;
0365
0366 /* export overkiz u-boot mode/version and factory */
0367 uboot@1400 {
0368 reg = <0x1400 0x20>;
0369 export;
0370 };
0371 };