From patchwork Tue Feb 27 13:44:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Sain X-Patchwork-Id: 1905087 X-Patchwork-Delegate: eugen.hristev@microchip.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=SEAickLw; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tkdxy5BJRz23cb for ; Wed, 28 Feb 2024 00:44:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A775587F17; Tue, 27 Feb 2024 14:44:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="SEAickLw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 29D2987FAA; Tue, 27 Feb 2024 14:44:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 902B687EEE for ; Tue, 27 Feb 2024 14:44:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Mihai.Sain@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1709041453; x=1740577453; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UbIwXvhQpfvFz197xVxjGPr9qtNKW5QwfiYR8M21I+0=; b=SEAickLw3QrqEx06Ubil9RoW4MGre5QnERJEz3SuyU279n1z6GWChn3p IKAaqfX8KArt+4fFCX+HuvkkmZck1ZigeLdsytmOI3AGAGMWyXaFPCt1a MlB3xAW9UWkvRlYMBGtG96W+MEt+vM2PxwpdwmUsVd178vJDTMi40uTk/ DDgQ324bgZys3pORxE65RIO89t/OsETh3R3ypROFr9x7MMUR9Kb5YyT6c gKSoVOLlybKKl4xfpTPlnECpSM3QagC9d1XaLnf4X6iV1QUnua8qwWCVI EVORgL35XjdLGTX8K8WzeXNcBQwwDjwKVa/MH4q2LKBnETl9FUYPpMqH6 A==; X-CSE-ConnectionGUID: 6tAf7EvWSfmfwdRag0jHrQ== X-CSE-MsgGUID: /UQX/LJWQuqqRuxZkLvj8A== X-IronPort-AV: E=Sophos;i="6.06,187,1705388400"; d="scan'208";a="184160783" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Feb 2024 06:44:11 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 27 Feb 2024 06:44:10 -0700 Received: from archlinux.microchip.com (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 27 Feb 2024 06:44:09 -0700 From: Mihai Sain To: , CC: , Mihai Sain Subject: [PATCH v2 2/4] ARM: dts: at91: sama7g54_curiosity: Add initial device tree of the board Date: Tue, 27 Feb 2024 15:44:01 +0200 Message-ID: <20240227134403.10686-3-mihai.sain@microchip.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240227134403.10686-1-mihai.sain@microchip.com> References: <20240227134403.10686-1-mihai.sain@microchip.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add initial device tree of the SAMA7G54 Curiosity board. Signed-off-by: Mihai Sain --- arch/arm/dts/Makefile | 3 + .../dts/at91-sama7g54_curiosity-u-boot.dtsi | 59 +++++ arch/arm/dts/at91-sama7g54_curiosity.dts | 242 ++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 arch/arm/dts/at91-sama7g54_curiosity-u-boot.dtsi create mode 100644 arch/arm/dts/at91-sama7g54_curiosity.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index d9725030d5..45069047ad 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1266,6 +1266,9 @@ dtb-$(CONFIG_TARGET_OMAP4_SDP4430) += \ dtb-$(CONFIG_TARGET_SAMA7G5EK) += \ at91-sama7g5ek.dtb +dtb-$(CONFIG_TARGET_SAMA7G54_CURIOSITY) += \ + at91-sama7g54_curiosity.dtb + dtb-$(CONFIG_TARGET_SAMA5D2_PTC_EK) += \ at91-sama5d2_ptc_ek.dtb diff --git a/arch/arm/dts/at91-sama7g54_curiosity-u-boot.dtsi b/arch/arm/dts/at91-sama7g54_curiosity-u-boot.dtsi new file mode 100644 index 0000000000..04d7d9e522 --- /dev/null +++ b/arch/arm/dts/at91-sama7g54_curiosity-u-boot.dtsi @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * at91-sama7g54_curiosity-u-boot.dtsi - Device Tree file for SAMA7G5 SoC u-boot properties. + * + * Copyright (C) 2024 Microchip Technology Inc. and its subsidiaries + * + * Author: Mihai Sain + * + */ + +/ { + chosen { + bootph-all; + }; +}; + +&main_rc { + bootph-all; +}; + +&main_xtal { + bootph-all; +}; + +&pioA { + bootph-all; +}; + +&pinctrl_flx3_default { + bootph-all; +}; + +&pinctrl_sdmmc1_default { + bootph-all; +}; + +&pit64b0 { + bootph-all; +}; + +&pmc { + bootph-all; +}; + +&sdmmc1 { + bootph-all; +}; + +&slow_rc_osc { + bootph-all; +}; + +&slow_xtal { + bootph-all; +}; + +&uart3 { + bootph-all; +}; diff --git a/arch/arm/dts/at91-sama7g54_curiosity.dts b/arch/arm/dts/at91-sama7g54_curiosity.dts new file mode 100644 index 0000000000..93c230be0a --- /dev/null +++ b/arch/arm/dts/at91-sama7g54_curiosity.dts @@ -0,0 +1,242 @@ +// 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 + * + */ +/dts-v1/; +#include "sama7g5-pinfunc.h" +#include "sama7g5.dtsi" +#include +#include +#include + +/ { + model = "Microchip SAMA7G54 Curiosity"; + compatible = "microchip,sama7g54-curiosity", "microchip,sama7g5", "microchip,sama7"; + + aliases { + serial0 = &uart3; + i2c0 = &i2c10; + }; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/mmcblk1p2 rw rootwait"; + stdout-path = "serial0:115200n8"; + }; + + clocks { + slow_xtal { + clock-frequency = <32768>; + }; + + main_xtal { + clock-frequency = <24000000>; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_led_gpio_default>; + + led-red { + label = "red"; + gpios = <&pioA PIN_PD13 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led-green { + label = "green"; + gpios = <&pioA PIN_PD14 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led-blue { + label = "blue"; + gpios = <&pioA PIN_PB15 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + }; + + memory { + device_type = "memory"; + reg = <0x60000000 0x10000000>; // 256 MiB DDR3L-1066 16-bit + }; +}; + +&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; + }; + }; +}; + +&flx3 { + atmel,flexcom-mode = ; + status = "okay"; + + uart3: serial@200 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flx3_default>; + status = "okay"; + }; +}; + +&flx10 { + atmel,flexcom-mode = ; + 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>; + }; + + pmic@5b { + compatible = "microchip,mcp16502"; + reg = <0x5b>; + }; + }; +}; + +&pioA { + pinctrl_flx3_default: flx3-default { + pinmux = , + ; + bias-pull-up; + }; + + pinctrl_flx10_default: flx10-default { + pinmux = , + ; + bias-pull-up; + }; + + pinctrl_led_gpio_default: led-gpio-default { + pinmux = , + , + ; + bias-pull-up; + }; + + pinctrl_nand_default: nand-default { + pinmux = , + , + , + , + , + , + , + , + , + , + , + , + , + ; + bias-disable; + slew-rate = <0>; + }; + + pinctrl_qspi1_default: qspi1-default { + pinmux = , + , + , + , + , + ; + bias-pull-up; + slew-rate = <0>; + }; + + pinctrl_sdmmc0_default: sdmmc0-default { + pinmux = , + , + , + , + , + , + ; + bias-pull-up; + slew-rate = <0>; + }; + + pinctrl_sdmmc1_default: sdmmc1-default { + pinmux = , + , + , + , + , + , + ; + bias-pull-up; + slew-rate = <0>; + }; +}; + +&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; + }; +}; + +// M.2 slot for wireless card +&sdmmc0 { + bus-width = <4>; + cd-gpios = <&pioA 31 GPIO_ACTIVE_LOW>; + disable-wp; + max-frequency = <50000000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sdmmc0_default>; + status = "okay"; +}; + +// micro SD socket +&sdmmc1 { + bus-width = <4>; + disable-wp; + max-frequency = <50000000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sdmmc1_default>; + status = "okay"; +};