| /* |
| * Copyright (c) 2017 Piotr Mienkowski |
| * Copyright (c) 2017 Justin Watson |
| * Copyright (c) 2020 Stephanos Ioannidis <root@stephanos.io> |
| * Copyright (c) 2020 Gerson Fernando Budke <nandojve@gmail.com> |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| #include "sam_e70_xplained-pinctrl.dtsi" |
| #include <zephyr/dt-bindings/input/input-event-codes.h> |
| |
| / { |
| aliases { |
| i2c-0 = &twihs0; |
| i2c-1 = &twihs2; |
| led0 = &green_led; |
| sw0 = &sw0_user_button; |
| watchdog0 = &wdt; |
| }; |
| |
| chosen { |
| zephyr,console = &usart1; |
| zephyr,shell-uart = &usart1; |
| zephyr,sram = &sram0; |
| zephyr,flash = &flash0; |
| zephyr,code-partition = &slot0_partition; |
| zephyr,canbus = &can0; |
| }; |
| |
| leds { |
| compatible = "gpio-leds"; |
| green_led: led_0 { |
| gpios = <&pioc 8 GPIO_ACTIVE_LOW>; |
| label = "User LED"; |
| }; |
| }; |
| |
| gpio_keys { |
| compatible = "gpio-keys"; |
| |
| /* The switch is labeled SW300 in the schematic, and labeled |
| * SW0 on the board, and labeld SW1 User Button on docs |
| */ |
| sw0_user_button: button_1 { |
| label = "User Button"; |
| gpios = <&pioa 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; |
| zephyr,code = <INPUT_KEY_0>; |
| }; |
| }; |
| }; |
| |
| &cpu0 { |
| clock-frequency = <300000000>; |
| }; |
| |
| &afec0 { |
| status = "okay"; |
| |
| pinctrl-0 = <&afec0_default>; |
| pinctrl-names = "default"; |
| }; |
| |
| &afec1 { |
| status = "okay"; |
| |
| pinctrl-0 = <&afec1_default>; |
| pinctrl-names = "default"; |
| }; |
| |
| &dacc { |
| status = "okay"; |
| }; |
| |
| &twihs0 { |
| status = "okay"; |
| |
| pinctrl-0 = <&twihs0_default>; |
| pinctrl-names = "default"; |
| |
| eeprom: eeprom@5f { |
| compatible = "atmel,24mac402"; |
| reg = <0x5f>; |
| }; |
| }; |
| |
| &twihs2 { |
| status = "okay"; |
| |
| pinctrl-0 = <&twihs2_default>; |
| pinctrl-names = "default"; |
| }; |
| |
| &spi0 { |
| status = "okay"; |
| |
| pinctrl-0 = <&spi0_default>; |
| pinctrl-names = "default"; |
| |
| cs-gpios = <&piod 25 GPIO_ACTIVE_LOW>, |
| <&piod 27 GPIO_ACTIVE_LOW>; |
| |
| dmas = <&xdmac 1 DMA_PERID_SPI0_TX>, <&xdmac 2 DMA_PERID_SPI0_RX>; |
| dma-names = "tx", "rx"; |
| }; |
| |
| &usart1 { |
| status = "okay"; |
| current-speed = <115200>; |
| |
| pinctrl-0 = <&usart1_default>; |
| pinctrl-names = "default"; |
| }; |
| |
| &wdt { |
| status = "okay"; |
| }; |
| |
| zephyr_udc0: &usbhs { |
| status = "okay"; |
| }; |
| |
| &gmac { |
| status = "okay"; |
| |
| pinctrl-0 = <&gmac_rmii>; |
| pinctrl-names = "default"; |
| |
| mac-eeprom = <&eeprom>; |
| phy-handle = <&phy>; |
| }; |
| |
| &mdio { |
| status = "okay"; |
| |
| pinctrl-0 = <&mdio_default>; |
| pinctrl-names = "default"; |
| |
| phy: ethernet-phy@0 { |
| compatible = "ethernet-phy"; |
| status = "okay"; |
| reg = <0>; |
| }; |
| }; |
| |
| &pwm0 { |
| status = "okay"; |
| |
| pinctrl-0 = <&pwm_default>; |
| pinctrl-names = "default"; |
| }; |
| |
| &flash0 { |
| partitions { |
| compatible = "fixed-partitions"; |
| #address-cells = <1>; |
| #size-cells = <1>; |
| |
| /* |
| * The first half of sector 0 (64 kbytes) |
| * is reserved for the bootloader |
| */ |
| boot_partition: partition@0 { |
| label = "mcuboot"; |
| reg = <0x0 0x00010000>; |
| read-only; |
| }; |
| |
| /* From sector 1 to sector 7 (included): slot0 (896 kbytes) */ |
| slot0_partition: partition@20000 { |
| label = "image-0"; |
| reg = <0x00020000 0x000e0000>; |
| }; |
| |
| /* From sector 8 to sector 14 (included): slot1 (896 kbytes) */ |
| slot1_partition: partition@100000 { |
| label = "image-1"; |
| reg = <0x00100000 0x000e0000>; |
| }; |
| |
| /* Sector 15: scratch (128 kbytes) */ |
| scratch_partition: partition@1e0000 { |
| label = "image-scratch"; |
| reg = <0x001e0000 0x00020000>; |
| }; |
| }; |
| }; |
| |
| &ssc { |
| status = "okay"; |
| |
| pinctrl-0 = <&ssc_default>; |
| pinctrl-names = "default"; |
| |
| dma-names = "rx", "tx"; |
| dmas = <&xdmac 22 DMA_PERID_SSC_RX>, <&xdmac 23 DMA_PERID_SSC_TX>; |
| }; |
| |
| &xdmac { |
| status = "okay"; |
| }; |
| |
| &can0 { |
| status = "okay"; |
| |
| pinctrl-0 = <&can0_default>; |
| pinctrl-names = "default"; |
| |
| bus-speed = <125000>; |
| bus-speed-data = <1000000>; |
| |
| can-transceiver { |
| max-bitrate = <5000000>; |
| }; |
| }; |