2024-02-14 08:04:42

by Mihai Sain

[permalink] [raw]
Subject: [PATCH v2 0/3] Add initial support for Microchip SAMA7G54 Curiosity board

This patch series adds initial support for Microchip SAMA7G54 Curiosity board.

Changes in v2:
--------------

* Remove bootargs.
* Use phandle style for clock nodes.
* Use color and function for gpio-leds.
* Remove status okay from leds, nand, eeprom, pmic, flash.
* Use generic name like pmic for mcp16502 regulator.

Mihai Sain (3):
dt-bindings: ARM: at91: Document Microchip SAMA7G54 Curiosity
ARM: dts: microchip: sama7g5: Add flexcom 10 node
ARM: dts: microchip: sama7g54_curiosity: Add initial device tree of the board

.../devicetree/bindings/arm/atmel-at91.yaml | 6 +
arch/arm/boot/dts/microchip/Makefile | 4 +-
.../dts/microchip/at91-sama7g54_curiosity.dts | 487 ++++++++++++++++++
arch/arm/boot/dts/microchip/sama7g5.dtsi | 26 +
4 files changed, 522 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts

--
2.43.0



2024-02-14 08:05:29

by Mihai Sain

[permalink] [raw]
Subject: [PATCH v2 3/3] ARM: dts: microchip: sama7g54_curiosity: Add initial device tree of the board

Add initial device tree of the SAMA7G54 Curiosity board.

Signed-off-by: Mihai Sain <[email protected]>
---
arch/arm/boot/dts/microchip/Makefile | 4 +-
.../dts/microchip/at91-sama7g54_curiosity.dts | 487 ++++++++++++++++++
2 files changed, 490 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts

diff --git a/arch/arm/boot/dts/microchip/Makefile b/arch/arm/boot/dts/microchip/Makefile
index efde9546c8f4..29b2a788748f 100644
--- a/arch/arm/boot/dts/microchip/Makefile
+++ b/arch/arm/boot/dts/microchip/Makefile
@@ -12,6 +12,7 @@ DTC_FLAGS_at91-sama5d3_eds := -@
DTC_FLAGS_at91-sama5d3_xplained := -@
DTC_FLAGS_at91-sama5d4_xplained := -@
DTC_FLAGS_at91-sama7g5ek := -@
+DTC_FLAGS_at91-sama7g54_curiosity := -@
dtb-$(CONFIG_SOC_AT91RM9200) += \
at91rm9200ek.dtb \
mpa1600.dtb
@@ -87,7 +88,8 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
at91-sama5d4ek.dtb \
at91-vinco.dtb
dtb-$(CONFIG_SOC_SAMA7G5) += \
- at91-sama7g5ek.dtb
+ at91-sama7g5ek.dtb \
+ at91-sama7g54_curiosity.dtb

dtb-$(CONFIG_SOC_LAN966) += \
lan966x-kontron-kswitch-d10-mmt-6g-2gs.dtb \
diff --git a/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts
new file mode 100644
index 000000000000..a6504c3781f4
--- /dev/null
+++ b/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts
@@ -0,0 +1,487 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * at91-sama7g54_curiosity.dts - Device Tree file for SAMA7G54 Curiosity Board
+ *
+ * Copyright (C) 2024 Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Mihai Sain <[email protected]>
+ *
+ */
+/dts-v1/;
+#include "sama7g5-pinfunc.h"
+#include "sama7g5.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/mfd/atmel-flexcom.h>
+#include <dt-bindings/pinctrl/at91.h>
+
+/ {
+ model = "Microchip SAMA7G54 Curiosity";
+ compatible = "microchip,sama7g54-curiosity", "microchip,sama7g5", "microchip,sama7";
+
+ aliases {
+ serial0 = &uart3;
+ i2c0 = &i2c10;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_key_gpio_default>;
+
+ button-user {
+ label = "user-button";
+ gpios = <&pioA PIN_PD19 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_PROG1>;
+ wakeup-source;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_led_gpio_default>;
+
+ led-red {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_POWER;
+ gpios = <&pioA PIN_PD13 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ led-green {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_BOOT;
+ gpios = <&pioA PIN_PD14 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ led-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_CPU;
+ gpios = <&pioA PIN_PB15 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ memory@60000000 {
+ device_type = "memory";
+ reg = <0x60000000 0x10000000>; // 256 MiB DDR3L-1066 16-bit
+ };
+};
+
+&adc {
+ vddana-supply = <&vddout25>;
+ vref-supply = <&vddout25>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mikrobus1_an_default &pinctrl_mikrobus2_an_default>;
+ status = "okay";
+};
+
+&cpu0 {
+ cpu-supply = <&vddcpu>;
+};
+
+&dma0 {
+ status = "okay";
+};
+
+&dma1 {
+ status = "okay";
+};
+
+&dma2 {
+ status = "okay";
+};
+
+&ebi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_nand_default>;
+ status = "okay";
+
+ nand_controller: nand-controller {
+ status = "okay";
+
+ nand@3 {
+ reg = <0x3 0x0 0x800000>;
+ atmel,rb = <0>;
+ nand-bus-width = <8>;
+ nand-ecc-mode = "hw";
+ nand-ecc-strength = <8>;
+ nand-ecc-step-size = <512>;
+ nand-on-flash-bbt;
+ label = "nand";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ at91bootstrap@0 {
+ label = "nand: at91bootstrap";
+ reg = <0x0 0x40000>;
+ };
+
+ bootloader@40000 {
+ label = "nand: u-boot";
+ reg = <0x40000 0x100000>;
+ };
+
+ bootloaderenv@140000 {
+ label = "nand: u-boot env";
+ reg = <0x140000 0x40000>;
+ };
+
+ dtb@180000 {
+ label = "nand: device tree";
+ reg = <0x180000 0x80000>;
+ };
+
+ kernel@200000 {
+ label = "nand: kernel";
+ reg = <0x200000 0x600000>;
+ };
+
+ rootfs@800000 {
+ label = "nand: rootfs";
+ reg = <0x800000 0x1f800000>;
+ };
+ };
+ };
+ };
+};
+
+&flx3 {
+ atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
+ status = "okay";
+
+ uart3: serial@200 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flx3_default>;
+ status = "okay";
+ };
+};
+
+&flx10 {
+ atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
+ status = "okay";
+
+ i2c10: i2c@600 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flx10_default>;
+ i2c-analog-filter;
+ i2c-digital-filter;
+ i2c-digital-filter-width-ns = <35>;
+ status = "okay";
+
+ adc@1f {
+ compatible = "microchip,pac1934";
+ reg = <0x1f>;
+ };
+
+ eeprom@51 {
+ compatible = "atmel,24c02";
+ reg = <0x51>;
+ pagesize = <16>;
+ size = <256>;
+ vcc-supply = <&vdd_3v3>;
+ };
+
+ pmic@5b {
+ compatible = "microchip,mcp16502";
+ reg = <0x5b>;
+
+ regulators {
+ vdd_3v3: VDD_IO {
+ regulator-name = "VDD_IO";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <2>;
+ regulator-allowed-modes = <2>, <4>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ regulator-mode = <4>;
+ };
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-mode = <4>;
+ };
+ };
+
+ vddioddr: VDD_DDR {
+ regulator-name = "VDD_DDR";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-initial-mode = <2>;
+ regulator-allowed-modes = <2>, <4>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1350000>;
+ regulator-mode = <4>;
+ };
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1350000>;
+ regulator-mode = <4>;
+ };
+ };
+
+ vddcore: VDD_CORE {
+ regulator-name = "VDD_CORE";
+ regulator-min-microvolt = <1150000>;
+ regulator-max-microvolt = <1150000>;
+ regulator-initial-mode = <2>;
+ regulator-allowed-modes = <2>, <4>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ regulator-suspend-voltage = <1150000>;
+ regulator-mode = <4>;
+ };
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-mode = <4>;
+ };
+ };
+
+ vddcpu: VDD_OTHER {
+ regulator-name = "VDD_OTHER";
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-initial-mode = <2>;
+ regulator-allowed-modes = <2>, <4>;
+ regulator-ramp-delay = <3125>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ regulator-suspend-voltage = <1050000>;
+ regulator-mode = <4>;
+ };
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-mode = <4>;
+ };
+ };
+
+ vldo1: LDO1 {
+ regulator-name = "LDO1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-suspend-voltage = <1800000>;
+ regulator-on-in-suspend;
+ };
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vldo2: LDO2 {
+ regulator-name = "LDO2";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-suspend-voltage = <3300000>;
+ regulator-on-in-suspend;
+ };
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+ };
+};
+
+&main_xtal {
+ clock-frequency = <24000000>;
+};
+
+&qspi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_qspi1_default>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0x0>;
+ spi-max-frequency = <100000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ m25p,fast-read;
+ };
+};
+
+&pioA {
+ pinctrl_flx3_default: flx3-default {
+ pinmux = <PIN_PD16__FLEXCOM3_IO0>,
+ <PIN_PD17__FLEXCOM3_IO1>;
+ bias-pull-up;
+ };
+
+ pinctrl_flx10_default: flx10-default {
+ pinmux = <PIN_PC30__FLEXCOM10_IO0>,
+ <PIN_PC31__FLEXCOM10_IO1>;
+ bias-pull-up;
+ };
+
+ pinctrl_key_gpio_default: key-gpio-default {
+ pinmux = <PIN_PD19__GPIO>;
+ bias-pull-up;
+ };
+
+ pinctrl_led_gpio_default: led-gpio-default {
+ pinmux = <PIN_PD13__GPIO>,
+ <PIN_PD14__GPIO>,
+ <PIN_PB15__GPIO>;
+ bias-pull-up;
+ };
+
+ pinctrl_mikrobus1_an_default: mikrobus1-an-default {
+ pinmux = <PIN_PC15__GPIO>;
+ bias-disable;
+ };
+
+ pinctrl_mikrobus2_an_default: mikrobus2-an-default {
+ pinmux = <PIN_PC13__GPIO>;
+ bias-disable;
+ };
+
+ pinctrl_nand_default: nand-default {
+ pinmux = <PIN_PD9__D0>,
+ <PIN_PD10__D1>,
+ <PIN_PD11__D2>,
+ <PIN_PC21__D3>,
+ <PIN_PC22__D4>,
+ <PIN_PC23__D5>,
+ <PIN_PC24__D6>,
+ <PIN_PD2__D7>,
+ <PIN_PD3__NANDRDY>,
+ <PIN_PD4__NCS3_NANDCS>,
+ <PIN_PD5__NWE_NWR0_NANDWE>,
+ <PIN_PD6__NRD_NANDOE>,
+ <PIN_PD7__A21_NANDALE>,
+ <PIN_PD8__A22_NANDCLE>;
+ bias-disable;
+ slew-rate = <0>;
+ };
+
+ pinctrl_qspi1_default: qspi1-default {
+ pinmux = <PIN_PB22__QSPI1_IO3>,
+ <PIN_PB23__QSPI1_IO2>,
+ <PIN_PB24__QSPI1_IO1>,
+ <PIN_PB25__QSPI1_IO0>,
+ <PIN_PB26__QSPI1_CS>,
+ <PIN_PB27__QSPI1_SCK>;
+ bias-pull-up;
+ slew-rate = <0>;
+ };
+
+ pinctrl_sdmmc0_default: sdmmc0-default {
+ pinmux = <PIN_PA0__SDMMC0_CK>,
+ <PIN_PA1__SDMMC0_CMD>,
+ <PIN_PA2__SDMMC0_RSTN>,
+ <PIN_PA3__SDMMC0_DAT0>,
+ <PIN_PA4__SDMMC0_DAT1>,
+ <PIN_PA5__SDMMC0_DAT2>,
+ <PIN_PA6__SDMMC0_DAT3>;
+ bias-pull-up;
+ slew-rate = <0>;
+ };
+
+ pinctrl_sdmmc1_default: sdmmc1-default {
+ pinmux = <PIN_PB29__SDMMC1_CMD>,
+ <PIN_PB30__SDMMC1_CK>,
+ <PIN_PB31__SDMMC1_DAT0>,
+ <PIN_PC0__SDMMC1_DAT1>,
+ <PIN_PC1__SDMMC1_DAT2>,
+ <PIN_PC2__SDMMC1_DAT3>,
+ <PIN_PC4__SDMMC1_CD>;
+ bias-pull-up;
+ slew-rate = <0>;
+ };
+};
+
+&rtt {
+ atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+};
+
+// M.2 slot for wireless card
+&sdmmc0 {
+ bus-width = <4>;
+ cd-gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ sdhci-caps-mask = <0x0 0x00200000>;
+ vmmc-supply = <&vdd_3v3>;
+ vqmmc-supply = <&vdd_3v3>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sdmmc0_default>;
+ status = "okay";
+};
+
+// micro SD socket
+&sdmmc1 {
+ bus-width = <4>;
+ disable-wp;
+ sdhci-caps-mask = <0x0 0x00200000>;
+ vmmc-supply = <&vdd_3v3>;
+ vqmmc-supply = <&vdd_3v3>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sdmmc1_default>;
+ status = "okay";
+};
+
+&slow_xtal {
+ clock-frequency = <32768>;
+};
+
+&shdwc {
+ debounce-delay-us = <976>;
+ status = "okay";
+
+ input@0 {
+ reg = <0>;
+ };
+};
+
+&tcb0 {
+ timer0: timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer1: timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+};
+
+&trng {
+ status = "okay";
+};
+
+&vddout25 {
+ vin-supply = <&vdd_3v3>;
+ status = "okay";
+};
--
2.43.0


2024-02-14 08:07:48

by Mihai Sain

[permalink] [raw]
Subject: [PATCH v2 1/3] dt-bindings: ARM: at91: Document Microchip SAMA7G54 Curiosity

Document device tree binding of the Microchip SAMA7G54 Curiosity board.

Signed-off-by: Mihai Sain <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
---
Documentation/devicetree/bindings/arm/atmel-at91.yaml | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.yaml b/Documentation/devicetree/bindings/arm/atmel-at91.yaml
index 89d75fbb1de4..82f37328cc69 100644
--- a/Documentation/devicetree/bindings/arm/atmel-at91.yaml
+++ b/Documentation/devicetree/bindings/arm/atmel-at91.yaml
@@ -179,6 +179,12 @@ properties:
- const: microchip,sama7g5
- const: microchip,sama7

+ - description: Microchip SAMA7G54 Curiosity Board
+ items:
+ - const: microchip,sama7g54-curiosity
+ - const: microchip,sama7g5
+ - const: microchip,sama7
+
- description: Microchip LAN9662 Evaluation Boards.
items:
- enum:
--
2.43.0


2024-02-14 08:08:10

by Mihai Sain

[permalink] [raw]
Subject: [PATCH v2 2/3] ARM: dts: microchip: sama7g5: Add flexcom 10 node

Add flexcom 10 node for usage on the SAMA7G54 Curiosity board.

Signed-off-by: Mihai Sain <[email protected]>
---
arch/arm/boot/dts/microchip/sama7g5.dtsi | 26 ++++++++++++++++++++++++
1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
index 269e0a3ca269..c90e404e8ed9 100644
--- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
+++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
@@ -958,6 +958,32 @@ i2c9: i2c@600 {
};
};

+ flx10: flexcom@e2820000 {
+ compatible = "atmel,sama5d2-flexcom";
+ reg = <0xe2820000 0x200>;
+ clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0xe2820000 0x800>;
+ status = "disabled";
+
+ i2c10: i2c@600 {
+ compatible = "microchip,sama7g5-i2c", "microchip,sam9x60-i2c";
+ reg = <0x600 0x200>;
+ interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
+ atmel,fifo-size = <32>;
+ dmas = <&dma0 AT91_XDMAC_DT_PERID(25)>,
+ <&dma0 AT91_XDMAC_DT_PERID(26)>;
+ dma-names = "rx", "tx";
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+ };
+
flx11: flexcom@e2824000 {
compatible = "atmel,sama5d2-flexcom";
reg = <0xe2824000 0x200>;
--
2.43.0


2024-02-14 17:54:41

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] ARM: dts: microchip: sama7g5: Add flexcom 10 node

On Wed, Feb 14, 2024 at 10:03:47AM +0200, Mihai Sain wrote:
> Add flexcom 10 node for usage on the SAMA7G54 Curiosity board.
>
> Signed-off-by: Mihai Sain <[email protected]>
> ---
> arch/arm/boot/dts/microchip/sama7g5.dtsi | 26 ++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> index 269e0a3ca269..c90e404e8ed9 100644
> --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
> +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> @@ -958,6 +958,32 @@ i2c9: i2c@600 {
> };
> };
>
> + flx10: flexcom@e2820000 {
> + compatible = "atmel,sama5d2-flexcom";
> + reg = <0xe2820000 0x200>;

This is a sama7g5, how come this flexcom is using a sama5d2 compatible?

Cheers,
Conor.

> + clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges = <0x0 0xe2820000 0x800>;
> + status = "disabled";
> +
> + i2c10: i2c@600 {
> + compatible = "microchip,sama7g5-i2c", "microchip,sam9x60-i2c";
> + reg = <0x600 0x200>;
> + interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
> + atmel,fifo-size = <32>;
> + dmas = <&dma0 AT91_XDMAC_DT_PERID(25)>,
> + <&dma0 AT91_XDMAC_DT_PERID(26)>;
> + dma-names = "rx", "tx";
> + atmel,use-dma-rx;
> + atmel,use-dma-tx;
> + status = "disabled";
> + };
> + };
> +
> flx11: flexcom@e2824000 {
> compatible = "atmel,sama5d2-flexcom";
> reg = <0xe2824000 0x200>;
> --
> 2.43.0
>


Attachments:
(No filename) (1.63 kB)
signature.asc (235.00 B)
Download all attachments

2024-02-15 07:19:31

by claudiu beznea

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] ARM: dts: microchip: sama7g5: Add flexcom 10 node

Hi, Mihai,

On 14.02.2024 10:03, Mihai Sain wrote:
> Add flexcom 10 node for usage on the SAMA7G54 Curiosity board.
>
> Signed-off-by: Mihai Sain <[email protected]>
> ---
> arch/arm/boot/dts/microchip/sama7g5.dtsi | 26 ++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> index 269e0a3ca269..c90e404e8ed9 100644
> --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
> +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> @@ -958,6 +958,32 @@ i2c9: i2c@600 {
> };
> };
>
> + flx10: flexcom@e2820000 {
> + compatible = "atmel,sama5d2-flexcom";
> + reg = <0xe2820000 0x200>;
> + clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges = <0x0 0xe2820000 0x800>;
> + status = "disabled";
> +
> + i2c10: i2c@600 {
> + compatible = "microchip,sama7g5-i2c", "microchip,sam9x60-i2c";
> + reg = <0x600 0x200>;
> + interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
> + atmel,fifo-size = <32>;
> + dmas = <&dma0 AT91_XDMAC_DT_PERID(25)>,
> + <&dma0 AT91_XDMAC_DT_PERID(26)>;
> + dma-names = "rx", "tx";

Please use the same pattern used by the rest of the i2c flexcom nodes, meaning:
dma-names = "tx", "rx";

and, with this, reverse the order of dmas, too.

> + atmel,use-dma-rx;
> + atmel,use-dma-tx;

These are uart properties.

> + status = "disabled";
> + };
> + };
> +
> flx11: flexcom@e2824000 {
> compatible = "atmel,sama5d2-flexcom";
> reg = <0xe2824000 0x200>;

2024-02-15 07:25:56

by claudiu beznea

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] ARM: dts: microchip: sama7g54_curiosity: Add initial device tree of the board



On 14.02.2024 10:03, Mihai Sain wrote:
> Add initial device tree of the SAMA7G54 Curiosity board.
>
> Signed-off-by: Mihai Sain <[email protected]>
> ---
> arch/arm/boot/dts/microchip/Makefile | 4 +-
> .../dts/microchip/at91-sama7g54_curiosity.dts | 487 ++++++++++++++++++
> 2 files changed, 490 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts
>
> diff --git a/arch/arm/boot/dts/microchip/Makefile b/arch/arm/boot/dts/microchip/Makefile
> index efde9546c8f4..29b2a788748f 100644
> --- a/arch/arm/boot/dts/microchip/Makefile
> +++ b/arch/arm/boot/dts/microchip/Makefile
> @@ -12,6 +12,7 @@ DTC_FLAGS_at91-sama5d3_eds := -@
> DTC_FLAGS_at91-sama5d3_xplained := -@
> DTC_FLAGS_at91-sama5d4_xplained := -@
> DTC_FLAGS_at91-sama7g5ek := -@
> +DTC_FLAGS_at91-sama7g54_curiosity := -@

Alphanumerical sort, thus DTC_FLAGS_at91-sama7g54_curiosity comes before
DTC_FLAGS_at91-sama7g5ek

> dtb-$(CONFIG_SOC_AT91RM9200) += \
> at91rm9200ek.dtb \
> mpa1600.dtb
> @@ -87,7 +88,8 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
> at91-sama5d4ek.dtb \
> at91-vinco.dtb
> dtb-$(CONFIG_SOC_SAMA7G5) += \
> - at91-sama7g5ek.dtb
> + at91-sama7g5ek.dtb \
> + at91-sama7g54_curiosity.dtb

Same here.

>
> dtb-$(CONFIG_SOC_LAN966) += \
> lan966x-kontron-kswitch-d10-mmt-6g-2gs.dtb \
> diff --git a/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts
> new file mode 100644
> index 000000000000..a6504c3781f4
> --- /dev/null
> +++ b/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts
> @@ -0,0 +1,487 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * at91-sama7g54_curiosity.dts - Device Tree file for SAMA7G54 Curiosity Board
> + *
> + * Copyright (C) 2024 Microchip Technology Inc. and its subsidiaries
> + *
> + * Author: Mihai Sain <[email protected]>
> + *
> + */
> +/dts-v1/;
> +#include "sama7g5-pinfunc.h"
> +#include "sama7g5.dtsi"
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/mfd/atmel-flexcom.h>
> +#include <dt-bindings/pinctrl/at91.h>
> +
> +/ {
> + model = "Microchip SAMA7G54 Curiosity";
> + compatible = "microchip,sama7g54-curiosity", "microchip,sama7g5", "microchip,sama7";
> +
> + aliases {
> + serial0 = &uart3;
> + i2c0 = &i2c10;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + gpio-keys {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_key_gpio_default>;
> +
> + button-user {
> + label = "user-button";
> + gpios = <&pioA PIN_PD19 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_PROG1>;
> + wakeup-source;
> + };
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_led_gpio_default>;
> +
> + led-red {
> + color = <LED_COLOR_ID_RED>;
> + function = LED_FUNCTION_POWER;
> + gpios = <&pioA PIN_PD13 GPIO_ACTIVE_HIGH>;
> + default-state = "off";
> + };
> +
> + led-green {
> + color = <LED_COLOR_ID_GREEN>;
> + function = LED_FUNCTION_BOOT;
> + gpios = <&pioA PIN_PD14 GPIO_ACTIVE_HIGH>;
> + default-state = "off";
> + };
> +
> + led-blue {
> + color = <LED_COLOR_ID_BLUE>;
> + function = LED_FUNCTION_CPU;
> + gpios = <&pioA PIN_PB15 GPIO_ACTIVE_HIGH>;
> + linux,default-trigger = "heartbeat";
> + };
> + };
> +
> + memory@60000000 {
> + device_type = "memory";
> + reg = <0x60000000 0x10000000>; // 256 MiB DDR3L-1066 16-bit
> + };
> +};
> +
> +&adc {
> + vddana-supply = <&vddout25>;
> + vref-supply = <&vddout25>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_mikrobus1_an_default &pinctrl_mikrobus2_an_default>;
> + status = "okay";
> +};
> +
> +&cpu0 {
> + cpu-supply = <&vddcpu>;
> +};
> +
> +&dma0 {
> + status = "okay";
> +};
> +
> +&dma1 {
> + status = "okay";
> +};
> +
> +&dma2 {
> + status = "okay";
> +};
> +
> +&ebi {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_nand_default>;
> + status = "okay";
> +
> + nand_controller: nand-controller {
> + status = "okay";
> +
> + nand@3 {
> + reg = <0x3 0x0 0x800000>;
> + atmel,rb = <0>;
> + nand-bus-width = <8>;
> + nand-ecc-mode = "hw";
> + nand-ecc-strength = <8>;
> + nand-ecc-step-size = <512>;
> + nand-on-flash-bbt;
> + label = "nand";
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + at91bootstrap@0 {
> + label = "nand: at91bootstrap";
> + reg = <0x0 0x40000>;
> + };
> +
> + bootloader@40000 {
> + label = "nand: u-boot";
> + reg = <0x40000 0x100000>;
> + };
> +
> + bootloaderenv@140000 {
> + label = "nand: u-boot env";
> + reg = <0x140000 0x40000>;
> + };
> +
> + dtb@180000 {
> + label = "nand: device tree";
> + reg = <0x180000 0x80000>;
> + };
> +
> + kernel@200000 {
> + label = "nand: kernel";
> + reg = <0x200000 0x600000>;
> + };
> +
> + rootfs@800000 {
> + label = "nand: rootfs";
> + reg = <0x800000 0x1f800000>;
> + };
> + };
> + };
> + };
> +};
> +
> +&flx3 {
> + atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
> + status = "okay";
> +
> + uart3: serial@200 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_flx3_default>;
> + status = "okay";
> + };
> +};
> +
> +&flx10 {
> + atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
> + status = "okay";
> +
> + i2c10: i2c@600 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_flx10_default>;
> + i2c-analog-filter;
> + i2c-digital-filter;
> + i2c-digital-filter-width-ns = <35>;
> + status = "okay";
> +
> + adc@1f {
> + compatible = "microchip,pac1934";

There is no driver for this one in the upstream Linux and the compatible is
not documented. I would remove the node until the driver lands in mainline
Linux.

> + reg = <0x1f>;
> + };
> +
> + eeprom@51 {
> + compatible = "atmel,24c02";
> + reg = <0x51>;
> + pagesize = <16>;
> + size = <256>;
> + vcc-supply = <&vdd_3v3>;
> + };
> +
> + pmic@5b {
> + compatible = "microchip,mcp16502";
> + reg = <0x5b>;
> +
> + regulators {
> + vdd_3v3: VDD_IO {
> + regulator-name = "VDD_IO";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-initial-mode = <2>;
> + regulator-allowed-modes = <2>, <4>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = <3300000>;
> + regulator-mode = <4>;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + regulator-mode = <4>;
> + };
> + };
> +
> + vddioddr: VDD_DDR {
> + regulator-name = "VDD_DDR";
> + regulator-min-microvolt = <1350000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-initial-mode = <2>;
> + regulator-allowed-modes = <2>, <4>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = <1350000>;
> + regulator-mode = <4>;
> + };
> +
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = <1350000>;
> + regulator-mode = <4>;
> + };
> + };
> +
> + vddcore: VDD_CORE {
> + regulator-name = "VDD_CORE";
> + regulator-min-microvolt = <1150000>;
> + regulator-max-microvolt = <1150000>;
> + regulator-initial-mode = <2>;
> + regulator-allowed-modes = <2>, <4>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-on-in-suspend;
> + regulator-suspend-voltage = <1150000>;
> + regulator-mode = <4>;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + regulator-mode = <4>;
> + };
> + };
> +
> + vddcpu: VDD_OTHER {
> + regulator-name = "VDD_OTHER";
> + regulator-min-microvolt = <1050000>;
> + regulator-max-microvolt = <1250000>;
> + regulator-initial-mode = <2>;
> + regulator-allowed-modes = <2>, <4>;
> + regulator-ramp-delay = <3125>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-on-in-suspend;
> + regulator-suspend-voltage = <1050000>;
> + regulator-mode = <4>;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + regulator-mode = <4>;
> + };
> + };
> +
> + vldo1: LDO1 {
> + regulator-name = "LDO1";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-suspend-voltage = <1800000>;
> + regulator-on-in-suspend;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vldo2: LDO2 {
> + regulator-name = "LDO2";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-suspend-voltage = <3300000>;
> + regulator-on-in-suspend;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> + };
> + };
> + };
> +};
> +
> +&main_xtal {
> + clock-frequency = <24000000>;
> +};
> +
> +&qspi1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_qspi1_default>;
> + status = "okay";
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0x0>;
> + spi-max-frequency = <100000000>;
> + spi-tx-bus-width = <4>;
> + spi-rx-bus-width = <4>;
> + m25p,fast-read;
> + };
> +};
> +
> +&pioA {
> + pinctrl_flx3_default: flx3-default {
> + pinmux = <PIN_PD16__FLEXCOM3_IO0>,
> + <PIN_PD17__FLEXCOM3_IO1>;
> + bias-pull-up;
> + };
> +
> + pinctrl_flx10_default: flx10-default {
> + pinmux = <PIN_PC30__FLEXCOM10_IO0>,
> + <PIN_PC31__FLEXCOM10_IO1>;
> + bias-pull-up;
> + };
> +
> + pinctrl_key_gpio_default: key-gpio-default {
> + pinmux = <PIN_PD19__GPIO>;
> + bias-pull-up;
> + };
> +
> + pinctrl_led_gpio_default: led-gpio-default {
> + pinmux = <PIN_PD13__GPIO>,
> + <PIN_PD14__GPIO>,
> + <PIN_PB15__GPIO>;
> + bias-pull-up;
> + };
> +
> + pinctrl_mikrobus1_an_default: mikrobus1-an-default {
> + pinmux = <PIN_PC15__GPIO>;
> + bias-disable;
> + };
> +
> + pinctrl_mikrobus2_an_default: mikrobus2-an-default {
> + pinmux = <PIN_PC13__GPIO>;
> + bias-disable;
> + };
> +
> + pinctrl_nand_default: nand-default {
> + pinmux = <PIN_PD9__D0>,
> + <PIN_PD10__D1>,
> + <PIN_PD11__D2>,
> + <PIN_PC21__D3>,
> + <PIN_PC22__D4>,
> + <PIN_PC23__D5>,
> + <PIN_PC24__D6>,
> + <PIN_PD2__D7>,
> + <PIN_PD3__NANDRDY>,
> + <PIN_PD4__NCS3_NANDCS>,
> + <PIN_PD5__NWE_NWR0_NANDWE>,
> + <PIN_PD6__NRD_NANDOE>,
> + <PIN_PD7__A21_NANDALE>,
> + <PIN_PD8__A22_NANDCLE>;
> + bias-disable;
> + slew-rate = <0>;
> + };
> +
> + pinctrl_qspi1_default: qspi1-default {
> + pinmux = <PIN_PB22__QSPI1_IO3>,
> + <PIN_PB23__QSPI1_IO2>,
> + <PIN_PB24__QSPI1_IO1>,
> + <PIN_PB25__QSPI1_IO0>,
> + <PIN_PB26__QSPI1_CS>,
> + <PIN_PB27__QSPI1_SCK>;
> + bias-pull-up;
> + slew-rate = <0>;
> + };
> +
> + pinctrl_sdmmc0_default: sdmmc0-default {
> + pinmux = <PIN_PA0__SDMMC0_CK>,
> + <PIN_PA1__SDMMC0_CMD>,
> + <PIN_PA2__SDMMC0_RSTN>,
> + <PIN_PA3__SDMMC0_DAT0>,
> + <PIN_PA4__SDMMC0_DAT1>,
> + <PIN_PA5__SDMMC0_DAT2>,
> + <PIN_PA6__SDMMC0_DAT3>;
> + bias-pull-up;
> + slew-rate = <0>;
> + };
> +
> + pinctrl_sdmmc1_default: sdmmc1-default {
> + pinmux = <PIN_PB29__SDMMC1_CMD>,
> + <PIN_PB30__SDMMC1_CK>,
> + <PIN_PB31__SDMMC1_DAT0>,
> + <PIN_PC0__SDMMC1_DAT1>,
> + <PIN_PC1__SDMMC1_DAT2>,
> + <PIN_PC2__SDMMC1_DAT3>,
> + <PIN_PC4__SDMMC1_CD>;
> + bias-pull-up;
> + slew-rate = <0>;
> + };
> +};
> +
> +&rtt {
> + atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> +};
> +
> +// M.2 slot for wireless card

Use C style comment instead /* */

> +&sdmmc0 {
> + bus-width = <4>;
> + cd-gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
> + disable-wp;
> + sdhci-caps-mask = <0x0 0x00200000>;
> + vmmc-supply = <&vdd_3v3>;
> + vqmmc-supply = <&vdd_3v3>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sdmmc0_default>;
> + status = "okay";
> +};
> +
> +// micro SD socket
> +&sdmmc1 {
> + bus-width = <4>;
> + disable-wp;
> + sdhci-caps-mask = <0x0 0x00200000>;
> + vmmc-supply = <&vdd_3v3>;
> + vqmmc-supply = <&vdd_3v3>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sdmmc1_default>;
> + status = "okay";
> +};
> +
> +&slow_xtal {
> + clock-frequency = <32768>;
> +};
> +
> +&shdwc {
> + debounce-delay-us = <976>;
> + status = "okay";
> +
> + input@0 {
> + reg = <0>;
> + };
> +};
> +
> +&tcb0 {
> + timer0: timer@0 {
> + compatible = "atmel,tcb-timer";
> + reg = <0>;
> + };
> +
> + timer1: timer@1 {
> + compatible = "atmel,tcb-timer";
> + reg = <1>;
> + };
> +};
> +
> +&trng {
> + status = "okay";
> +};
> +
> +&vddout25 {
> + vin-supply = <&vdd_3v3>;
> + status = "okay";
> +};

2024-02-15 07:55:14

by claudiu beznea

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] ARM: dts: microchip: sama7g54_curiosity: Add initial device tree of the board



On 14.02.2024 10:03, Mihai Sain wrote:
> Add initial device tree of the SAMA7G54 Curiosity board.
>
> Signed-off-by: Mihai Sain <[email protected]>
> ---
> arch/arm/boot/dts/microchip/Makefile | 4 +-
> .../dts/microchip/at91-sama7g54_curiosity.dts | 487 ++++++++++++++++++
> 2 files changed, 490 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts
>
> diff --git a/arch/arm/boot/dts/microchip/Makefile b/arch/arm/boot/dts/microchip/Makefile
> index efde9546c8f4..29b2a788748f 100644
> --- a/arch/arm/boot/dts/microchip/Makefile
> +++ b/arch/arm/boot/dts/microchip/Makefile
> @@ -12,6 +12,7 @@ DTC_FLAGS_at91-sama5d3_eds := -@
> DTC_FLAGS_at91-sama5d3_xplained := -@
> DTC_FLAGS_at91-sama5d4_xplained := -@
> DTC_FLAGS_at91-sama7g5ek := -@
> +DTC_FLAGS_at91-sama7g54_curiosity := -@

Alphanumerical sort, thus DTC_FLAGS_at91-sama7g54_curiosity comes before
DTC_FLAGS_at91-sama7g5ek

> dtb-$(CONFIG_SOC_AT91RM9200) += \
> at91rm9200ek.dtb \
> mpa1600.dtb
> @@ -87,7 +88,8 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
> at91-sama5d4ek.dtb \
> at91-vinco.dtb
> dtb-$(CONFIG_SOC_SAMA7G5) += \
> - at91-sama7g5ek.dtb
> + at91-sama7g5ek.dtb \
> + at91-sama7g54_curiosity.dtb

Same here.

>
> dtb-$(CONFIG_SOC_LAN966) += \
> lan966x-kontron-kswitch-d10-mmt-6g-2gs.dtb \
> diff --git a/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts
> new file mode 100644
> index 000000000000..a6504c3781f4
> --- /dev/null
> +++ b/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts
> @@ -0,0 +1,487 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * at91-sama7g54_curiosity.dts - Device Tree file for SAMA7G54 Curiosity Board
> + *
> + * Copyright (C) 2024 Microchip Technology Inc. and its subsidiaries
> + *
> + * Author: Mihai Sain <[email protected]>
> + *
> + */
> +/dts-v1/;
> +#include "sama7g5-pinfunc.h"
> +#include "sama7g5.dtsi"
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/mfd/atmel-flexcom.h>
> +#include <dt-bindings/pinctrl/at91.h>
> +
> +/ {
> + model = "Microchip SAMA7G54 Curiosity";
> + compatible = "microchip,sama7g54-curiosity", "microchip,sama7g5", "microchip,sama7";
> +
> + aliases {
> + serial0 = &uart3;
> + i2c0 = &i2c10;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + gpio-keys {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_key_gpio_default>;
> +
> + button-user {
> + label = "user-button";
> + gpios = <&pioA PIN_PD19 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_PROG1>;
> + wakeup-source;
> + };
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_led_gpio_default>;
> +
> + led-red {
> + color = <LED_COLOR_ID_RED>;
> + function = LED_FUNCTION_POWER;
> + gpios = <&pioA PIN_PD13 GPIO_ACTIVE_HIGH>;
> + default-state = "off";
> + };
> +
> + led-green {
> + color = <LED_COLOR_ID_GREEN>;
> + function = LED_FUNCTION_BOOT;
> + gpios = <&pioA PIN_PD14 GPIO_ACTIVE_HIGH>;
> + default-state = "off";
> + };
> +
> + led-blue {
> + color = <LED_COLOR_ID_BLUE>;
> + function = LED_FUNCTION_CPU;
> + gpios = <&pioA PIN_PB15 GPIO_ACTIVE_HIGH>;
> + linux,default-trigger = "heartbeat";
> + };
> + };
> +
> + memory@60000000 {
> + device_type = "memory";
> + reg = <0x60000000 0x10000000>; // 256 MiB DDR3L-1066 16-bit
> + };
> +};
> +
> +&adc {
> + vddana-supply = <&vddout25>;
> + vref-supply = <&vddout25>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_mikrobus1_an_default &pinctrl_mikrobus2_an_default>;
> + status = "okay";
> +};
> +
> +&cpu0 {
> + cpu-supply = <&vddcpu>;
> +};
> +
> +&dma0 {
> + status = "okay";
> +};
> +
> +&dma1 {
> + status = "okay";
> +};
> +
> +&dma2 {
> + status = "okay";
> +};
> +
> +&ebi {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_nand_default>;
> + status = "okay";
> +
> + nand_controller: nand-controller {
> + status = "okay";
> +
> + nand@3 {
> + reg = <0x3 0x0 0x800000>;
> + atmel,rb = <0>;
> + nand-bus-width = <8>;
> + nand-ecc-mode = "hw";
> + nand-ecc-strength = <8>;
> + nand-ecc-step-size = <512>;
> + nand-on-flash-bbt;
> + label = "nand";
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + at91bootstrap@0 {
> + label = "nand: at91bootstrap";
> + reg = <0x0 0x40000>;
> + };
> +
> + bootloader@40000 {
> + label = "nand: u-boot";
> + reg = <0x40000 0x100000>;
> + };
> +
> + bootloaderenv@140000 {
> + label = "nand: u-boot env";
> + reg = <0x140000 0x40000>;
> + };
> +
> + dtb@180000 {
> + label = "nand: device tree";
> + reg = <0x180000 0x80000>;
> + };
> +
> + kernel@200000 {
> + label = "nand: kernel";
> + reg = <0x200000 0x600000>;
> + };
> +
> + rootfs@800000 {
> + label = "nand: rootfs";
> + reg = <0x800000 0x1f800000>;
> + };
> + };
> + };
> + };
> +};
> +
> +&flx3 {
> + atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
> + status = "okay";
> +
> + uart3: serial@200 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_flx3_default>;
> + status = "okay";
> + };
> +};
> +
> +&flx10 {
> + atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
> + status = "okay";
> +
> + i2c10: i2c@600 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_flx10_default>;
> + i2c-analog-filter;
> + i2c-digital-filter;
> + i2c-digital-filter-width-ns = <35>;
> + status = "okay";
> +
> + adc@1f {
> + compatible = "microchip,pac1934";

There is no driver for this one in the upstream Linux and the compatible is
not documented. I would remove the node until the driver lands in mainline
Linux.

> + reg = <0x1f>;
> + };
> +
> + eeprom@51 {
> + compatible = "atmel,24c02";
> + reg = <0x51>;
> + pagesize = <16>;
> + size = <256>;
> + vcc-supply = <&vdd_3v3>;
> + };
> +
> + pmic@5b {
> + compatible = "microchip,mcp16502";
> + reg = <0x5b>;
> +
> + regulators {
> + vdd_3v3: VDD_IO {
> + regulator-name = "VDD_IO";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-initial-mode = <2>;
> + regulator-allowed-modes = <2>, <4>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = <3300000>;
> + regulator-mode = <4>;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + regulator-mode = <4>;
> + };
> + };
> +
> + vddioddr: VDD_DDR {
> + regulator-name = "VDD_DDR";
> + regulator-min-microvolt = <1350000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-initial-mode = <2>;
> + regulator-allowed-modes = <2>, <4>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = <1350000>;
> + regulator-mode = <4>;
> + };
> +
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = <1350000>;
> + regulator-mode = <4>;
> + };
> + };
> +
> + vddcore: VDD_CORE {
> + regulator-name = "VDD_CORE";
> + regulator-min-microvolt = <1150000>;
> + regulator-max-microvolt = <1150000>;
> + regulator-initial-mode = <2>;
> + regulator-allowed-modes = <2>, <4>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-on-in-suspend;
> + regulator-suspend-voltage = <1150000>;
> + regulator-mode = <4>;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + regulator-mode = <4>;
> + };
> + };
> +
> + vddcpu: VDD_OTHER {
> + regulator-name = "VDD_OTHER";
> + regulator-min-microvolt = <1050000>;
> + regulator-max-microvolt = <1250000>;
> + regulator-initial-mode = <2>;
> + regulator-allowed-modes = <2>, <4>;
> + regulator-ramp-delay = <3125>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-on-in-suspend;
> + regulator-suspend-voltage = <1050000>;
> + regulator-mode = <4>;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + regulator-mode = <4>;
> + };
> + };
> +
> + vldo1: LDO1 {
> + regulator-name = "LDO1";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-suspend-voltage = <1800000>;
> + regulator-on-in-suspend;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vldo2: LDO2 {
> + regulator-name = "LDO2";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-always-on;
> +
> + regulator-state-standby {
> + regulator-suspend-voltage = <3300000>;
> + regulator-on-in-suspend;
> + };
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> + };
> + };
> + };
> +};
> +
> +&main_xtal {
> + clock-frequency = <24000000>;
> +};
> +
> +&qspi1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_qspi1_default>;
> + status = "okay";
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0x0>;
> + spi-max-frequency = <100000000>;
> + spi-tx-bus-width = <4>;
> + spi-rx-bus-width = <4>;
> + m25p,fast-read;
> + };
> +};
> +
> +&pioA {
> + pinctrl_flx3_default: flx3-default {
> + pinmux = <PIN_PD16__FLEXCOM3_IO0>,
> + <PIN_PD17__FLEXCOM3_IO1>;
> + bias-pull-up;
> + };
> +
> + pinctrl_flx10_default: flx10-default {
> + pinmux = <PIN_PC30__FLEXCOM10_IO0>,
> + <PIN_PC31__FLEXCOM10_IO1>;
> + bias-pull-up;
> + };
> +
> + pinctrl_key_gpio_default: key-gpio-default {
> + pinmux = <PIN_PD19__GPIO>;
> + bias-pull-up;
> + };
> +
> + pinctrl_led_gpio_default: led-gpio-default {
> + pinmux = <PIN_PD13__GPIO>,
> + <PIN_PD14__GPIO>,
> + <PIN_PB15__GPIO>;
> + bias-pull-up;
> + };
> +
> + pinctrl_mikrobus1_an_default: mikrobus1-an-default {
> + pinmux = <PIN_PC15__GPIO>;
> + bias-disable;
> + };
> +
> + pinctrl_mikrobus2_an_default: mikrobus2-an-default {
> + pinmux = <PIN_PC13__GPIO>;
> + bias-disable;
> + };
> +
> + pinctrl_nand_default: nand-default {
> + pinmux = <PIN_PD9__D0>,
> + <PIN_PD10__D1>,
> + <PIN_PD11__D2>,
> + <PIN_PC21__D3>,
> + <PIN_PC22__D4>,
> + <PIN_PC23__D5>,
> + <PIN_PC24__D6>,
> + <PIN_PD2__D7>,
> + <PIN_PD3__NANDRDY>,
> + <PIN_PD4__NCS3_NANDCS>,
> + <PIN_PD5__NWE_NWR0_NANDWE>,
> + <PIN_PD6__NRD_NANDOE>,
> + <PIN_PD7__A21_NANDALE>,
> + <PIN_PD8__A22_NANDCLE>;
> + bias-disable;
> + slew-rate = <0>;
> + };
> +
> + pinctrl_qspi1_default: qspi1-default {
> + pinmux = <PIN_PB22__QSPI1_IO3>,
> + <PIN_PB23__QSPI1_IO2>,
> + <PIN_PB24__QSPI1_IO1>,
> + <PIN_PB25__QSPI1_IO0>,
> + <PIN_PB26__QSPI1_CS>,
> + <PIN_PB27__QSPI1_SCK>;
> + bias-pull-up;
> + slew-rate = <0>;
> + };
> +
> + pinctrl_sdmmc0_default: sdmmc0-default {
> + pinmux = <PIN_PA0__SDMMC0_CK>,
> + <PIN_PA1__SDMMC0_CMD>,
> + <PIN_PA2__SDMMC0_RSTN>,
> + <PIN_PA3__SDMMC0_DAT0>,
> + <PIN_PA4__SDMMC0_DAT1>,
> + <PIN_PA5__SDMMC0_DAT2>,
> + <PIN_PA6__SDMMC0_DAT3>;
> + bias-pull-up;
> + slew-rate = <0>;
> + };
> +
> + pinctrl_sdmmc1_default: sdmmc1-default {
> + pinmux = <PIN_PB29__SDMMC1_CMD>,
> + <PIN_PB30__SDMMC1_CK>,
> + <PIN_PB31__SDMMC1_DAT0>,
> + <PIN_PC0__SDMMC1_DAT1>,
> + <PIN_PC1__SDMMC1_DAT2>,
> + <PIN_PC2__SDMMC1_DAT3>,
> + <PIN_PC4__SDMMC1_CD>;
> + bias-pull-up;
> + slew-rate = <0>;
> + };
> +};
> +
> +&rtt {
> + atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> +};
> +
> +// M.2 slot for wireless card

Use C style comment instead /* */

> +&sdmmc0 {
> + bus-width = <4>;
> + cd-gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
> + disable-wp;
> + sdhci-caps-mask = <0x0 0x00200000>;
> + vmmc-supply = <&vdd_3v3>;
> + vqmmc-supply = <&vdd_3v3>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sdmmc0_default>;
> + status = "okay";
> +};
> +
> +// micro SD socket
> +&sdmmc1 {
> + bus-width = <4>;
> + disable-wp;
> + sdhci-caps-mask = <0x0 0x00200000>;
> + vmmc-supply = <&vdd_3v3>;
> + vqmmc-supply = <&vdd_3v3>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sdmmc1_default>;
> + status = "okay";
> +};
> +
> +&slow_xtal {
> + clock-frequency = <32768>;
> +};
> +
> +&shdwc {
> + debounce-delay-us = <976>;
> + status = "okay";
> +
> + input@0 {
> + reg = <0>;
> + };
> +};
> +
> +&tcb0 {
> + timer0: timer@0 {
> + compatible = "atmel,tcb-timer";
> + reg = <0>;
> + };
> +
> + timer1: timer@1 {
> + compatible = "atmel,tcb-timer";
> + reg = <1>;
> + };
> +};
> +
> +&trng {
> + status = "okay";
> +};
> +
> +&vddout25 {
> + vin-supply = <&vdd_3v3>;
> + status = "okay";
> +};