From nobody Fri Oct 25 19:33:53 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC321CD5BAE for ; Tue, 19 Sep 2023 12:47:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232288AbjISMrF (ORCPT ); Tue, 19 Sep 2023 08:47:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232267AbjISMq4 (ORCPT ); Tue, 19 Sep 2023 08:46:56 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 277F9181; Tue, 19 Sep 2023 05:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1695127594; x=1726663594; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y2UuY2VJYxhmOhlmg3jLWigE7n2Uq9xmXn3g8xzqfYE=; b=al5IWZu7voMvxmdseXAPtmsj9qwarl4l4ivMbzrjFJLeooRoAi4IWBdb gSWND0XCzRW+ggK89WPLlbPXFxcHKmepuXWiBpUsDwZegsIxvkxp5K+ML Qydaiya6Cvx95dKZzKSCZqUpSnqwEgPZNccZMjZIG9LjgcAZSyaNdqL2L iw3zR5wkWZvsdkGbTVOav3jfaVhiRvOW/ueRVUtY5VQDG9WJ32bxDqp3t WSvmvceODRTbzlTQnEkxCSsluBIasF33EzZzgPbFYFrF0ge6v8SN392Te PJnxGdHWY6fDs2CCKiSunXk3zNKM2aQ4ymDDf2/uKKpOjxNbanHowqaWM w==; X-CSE-ConnectionGUID: hhj4fQFDRIWzql0Mbek80Q== X-CSE-MsgGUID: ZTuyIVPMSoWdrCxwX9Pe6A== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.02,159,1688454000"; d="scan'208";a="235961908" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 19 Sep 2023 05:46:33 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 19 Sep 2023 05:46:25 -0700 Received: from virtualbox.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Tue, 19 Sep 2023 05:46:22 -0700 From: Mihai Sain To: , , , , , , , , , , , CC: , Mihai Sain Subject: [PATCH v4 2/2] ARM: dts: at91: sama5d29_curiosity: Add device tree for sama5d29_curiosity board Date: Tue, 19 Sep 2023 15:46:05 +0300 Message-ID: <20230919124606.26898-3-mihai.sain@microchip.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230919124606.26898-1-mihai.sain@microchip.com> References: <20230919124606.26898-1-mihai.sain@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add initial device tree file for sama5d29_curiosity board. Signed-off-by: Mihai Sain --- arch/arm/boot/dts/microchip/Makefile | 2 + .../dts/microchip/at91-sama5d29_curiosity.dts | 600 ++++++++++++++++++ 2 files changed, 602 insertions(+) create mode 100644 arch/arm/boot/dts/microchip/at91-sama5d29_curiosity.dts diff --git a/arch/arm/boot/dts/microchip/Makefile b/arch/arm/boot/dts/micro= chip/Makefile index 31e03747cdf4..efde9546c8f4 100644 --- a/arch/arm/boot/dts/microchip/Makefile +++ b/arch/arm/boot/dts/microchip/Makefile @@ -4,6 +4,7 @@ DTC_FLAGS_at91-sam9x60_curiosity :=3D -@ DTC_FLAGS_at91-sam9x60ek :=3D -@ DTC_FLAGS_at91-sama5d27_som1_ek :=3D -@ DTC_FLAGS_at91-sama5d27_wlsom1_ek :=3D -@ +DTC_FLAGS_at91-sama5d29_curiosity :=3D -@ DTC_FLAGS_at91-sama5d2_icp :=3D -@ DTC_FLAGS_at91-sama5d2_ptc_ek :=3D -@ DTC_FLAGS_at91-sama5d2_xplained :=3D -@ @@ -64,6 +65,7 @@ dtb-$(CONFIG_SOC_SAM_V7) +=3D \ at91-nattis-2-natte-2.dtb \ at91-sama5d27_som1_ek.dtb \ at91-sama5d27_wlsom1_ek.dtb \ + at91-sama5d29_curiosity.dtb \ at91-sama5d2_icp.dtb \ at91-sama5d2_ptc_ek.dtb \ at91-sama5d2_xplained.dtb \ diff --git a/arch/arm/boot/dts/microchip/at91-sama5d29_curiosity.dts b/arch= /arm/boot/dts/microchip/at91-sama5d29_curiosity.dts new file mode 100644 index 000000000000..6b02b7bcfd49 --- /dev/null +++ b/arch/arm/boot/dts/microchip/at91-sama5d29_curiosity.dts @@ -0,0 +1,600 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * at91-sama5d29_curiosity.dts - Device Tree file for SAMA5D29 Curiosity b= oard + * + * Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries + * + * Author: Mihai Sain + * + */ +/dts-v1/; +#include "sama5d29.dtsi" +#include "sama5d2-pinfunc.h" +#include +#include +#include + +/ { + model =3D "Microchip SAMA5D29 Curiosity"; + compatible =3D "microchip,sama5d29-curiosity", "atmel,sama5d29", "atmel,s= ama5d2", "atmel,sama5"; + + aliases { + serial0 =3D &uart0; // debug + serial1 =3D &uart1; // RPi + serial2 =3D &uart3; // mikro BUS 2 + serial3 =3D &uart4; // mikro BUS 1 + serial4 =3D &uart6; // flx1 Bluetooth + i2c0 =3D &i2c0; + i2c1 =3D &i2c1; + }; + + chosen { + bootargs =3D "console=3DttyS0,115200 root=3D/dev/mmcblk0p2 rw rootwait"; + stdout-path =3D "serial0:115200n8"; + }; + + clocks { + slow_xtal { + clock-frequency =3D <32768>; + }; + + main_xtal { + clock-frequency =3D <24000000>; + }; + }; + + gpio-keys { + compatible =3D "gpio-keys"; + + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_key_gpio_default>; + + button-1 { + label =3D "USER BUTTON"; + gpios =3D <&pioA PIN_PA17 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + }; + + leds { + compatible =3D "gpio-leds"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_led_gpio_default>; + status =3D "okay"; + + led-red { + label =3D "red"; + gpios =3D <&pioA PIN_PA7 GPIO_ACTIVE_HIGH>; + }; + + led-green { + label =3D "green"; + gpios =3D <&pioA PIN_PA8 GPIO_ACTIVE_HIGH>; + }; + + led-blue { + label =3D "blue"; + gpios =3D <&pioA PIN_PA9 GPIO_ACTIVE_HIGH>; + linux,default-trigger =3D "heartbeat"; + }; + }; + + memory@20000000 { + device_type =3D "memory"; + reg =3D <0x20000000 0x20000000>; + }; +}; + +&adc { + vddana-supply =3D <&vdd_3v3>; + vref-supply =3D <&vdd_3v3>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_adc_default &pinctrl_adtrg_default>; + status =3D "okay"; +}; + +&can0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_can0_default>; + status =3D "okay"; +}; + +&can1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_can1_default>; + status =3D "okay"; +}; + +&flx1 { + atmel,flexcom-mode =3D ; + status =3D "okay"; + + uart6: serial@200 { + pinctrl-0 =3D <&pinctrl_flx1_default>; + pinctrl-names =3D "default"; + atmel,use-dma-rx; + atmel,use-dma-tx; + status =3D "okay"; + }; +}; + +&flx4 { + atmel,flexcom-mode =3D ; + status =3D "okay"; + + spi6: spi@400 { + dmas =3D <0>, <0>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_rpi_spi>; + status =3D "okay"; + }; +}; + +&i2c0 { + dmas =3D <0>, <0>; + pinctrl-names =3D "default", "gpio"; + pinctrl-0 =3D <&pinctrl_i2c0_default>; + pinctrl-1 =3D <&pinctrl_i2c0_gpio>; + sda-gpios =3D <&pioA PIN_PB31 GPIO_ACTIVE_HIGH>; + scl-gpios =3D <&pioA PIN_PC0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-sda-hold-time-ns =3D <350>; + status =3D "okay"; + + mcp16502@5b { + compatible =3D "microchip,mcp16502"; + reg =3D <0x5b>; + status =3D "okay"; + lpm-gpios =3D <&pioBU 0 GPIO_ACTIVE_LOW>; + + regulators { + vdd_3v3: VDD_IO { + regulator-name =3D "VDD_IO"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-initial-mode =3D <2>; + regulator-allowed-modes =3D <2>, <4>; + regulator-always-on; + + regulator-state-standby { + regulator-on-in-suspend; + regulator-mode =3D <4>; + }; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-mode =3D <4>; + }; + }; + + vddio_ddr: VDD_DDR { + regulator-name =3D "VDD_DDR"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <1200000>; + regulator-initial-mode =3D <2>; + regulator-allowed-modes =3D <2>, <4>; + regulator-always-on; + + regulator-state-standby { + regulator-on-in-suspend; + regulator-suspend-microvolt =3D <1200000>; + regulator-changeable-in-suspend; + regulator-mode =3D <4>; + }; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt =3D <1200000>; + regulator-changeable-in-suspend; + regulator-mode =3D <4>; + }; + }; + + vdd_core: VDD_CORE { + regulator-name =3D "VDD_CORE"; + regulator-min-microvolt =3D <1250000>; + regulator-max-microvolt =3D <1250000>; + regulator-initial-mode =3D <2>; + regulator-allowed-modes =3D <2>, <4>; + regulator-always-on; + + regulator-state-standby { + regulator-on-in-suspend; + regulator-mode =3D <4>; + }; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-mode =3D <4>; + }; + }; + + vdd_ddr: VDD_OTHER { + regulator-name =3D "VDD_OTHER"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-initial-mode =3D <2>; + regulator-allowed-modes =3D <2>, <4>; + regulator-always-on; + + regulator-state-standby { + regulator-on-in-suspend; + regulator-suspend-microvolt =3D <1800000>; + regulator-changeable-in-suspend; + regulator-mode =3D <4>; + }; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt =3D <1800000>; + regulator-changeable-in-suspend; + regulator-mode =3D <4>; + }; + }; + + LDO1 { + regulator-name =3D "LDO1"; + regulator-min-microvolt =3D <2500000>; + regulator-max-microvolt =3D <2500000>; + regulator-always-on; + + regulator-state-standby { + regulator-on-in-suspend; + }; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO2 { + regulator-name =3D "LDO2"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-always-on; + + regulator-state-standby { + regulator-on-in-suspend; + }; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&i2c1 { + dmas =3D <0>, <0>; + pinctrl-names =3D "default", "gpio"; + pinctrl-0 =3D <&pinctrl_i2c1_default>; + pinctrl-1 =3D <&pinctrl_i2c1_gpio>; + i2c-analog-filter; + i2c-digital-filter; + i2c-digital-filter-width-ns =3D <35>; + sda-gpios =3D <&pioA PIN_PD4 GPIO_ACTIVE_HIGH>; + scl-gpios =3D <&pioA PIN_PD5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + status =3D "okay"; +}; + +&pioA { + pinctrl_adc_default: adc-default { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_adtrg_default: adtrg-default { + pinmux =3D ; + bias-pull-up; + }; + + pinctrl_can0_default: can0-default { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_can1_default: can1-default { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_debug_uart: debug-uart { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_flx1_default: flx1-default { + pinmux =3D , + , + , + ; + bias-disable; + }; + + pinctrl_i2c0_default: i2c0-default { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_i2c0_gpio: i2c0-gpio-default { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_i2c1_default: i2c1-default { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_i2c1_gpio: i2c1-gpio-default { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_key_gpio_default: key-gpio-default { + pinmux =3D ; + bias-pull-up; + }; + + pinctrl_led_gpio_default: led-gpio-default { + pinmux =3D , + , + ; + bias-pull-up; + }; + + pinctrl_mikrobus1_pwm: mikrobus1-pwm { + pinmux =3D ; + bias-disable; + }; + + pinctrl_mikrobus2_pwm: mikrobus2-pwm { + pinmux =3D ; + bias-disable; + }; + + pinctrl_mikrobus1_uart: mikrobus1-uart { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_mikrobus2_uart: mikrobus2-uart { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_qspi1_default: qspi1-default { + pinmux =3D , + , + , + , + , + ; + bias-disable; + }; + + pinctrl_rpi_spi: rpi-spi { + pinmux =3D , + , + , + , + ; + bias-disable; + }; + + pinctrl_rpi_uart: rpi-uart { + pinmux =3D , + ; + bias-disable; + }; + + pinctrl_sdmmc0_default: sdmmc0-default { + pinmux =3D , + , + , + , + , + , + , + ; + bias-disable; + }; + + pinctrl_sdmmc1_default: sdmmc1-default { + pinmux =3D , + , + , + , + , + , + ; + bias-disable; + }; + + pinctrl_spi1_default: spi1-default { + pinmux =3D , + , + , + , + , + , + ; + bias-disable; + }; + + pinctrl_usb_default: usb-default { + pinmux =3D ; + bias-disable; + }; + + pinctrl_usba_vbus: usba-vbus { + pinmux =3D ; + bias-disable; + }; +}; + +&pwm0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_mikrobus1_pwm &pinctrl_mikrobus2_pwm>; + status =3D "okay"; +}; + +&qspi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_qspi1_default>; + status =3D "okay"; + + flash@0 { + #address-cells =3D <1>; + #size-cells =3D <1>; + compatible =3D "jedec,spi-nor"; + reg =3D <0>; + spi-max-frequency =3D <80000000>; + spi-tx-bus-width =3D <4>; + spi-rx-bus-width =3D <4>; + m25p,fast-read; + label =3D "atmel_qspi1"; + status =3D "okay"; + + at91bootstrap@0 { + label =3D "at91bootstrap"; + reg =3D <0x0 0x40000>; + }; + + bootloader@40000 { + label =3D "bootloader"; + reg =3D <0x40000 0xc0000>; + }; + + bootloaderenvred@100000 { + label =3D "bootloader env redundant"; + reg =3D <0x100000 0x40000>; + }; + + bootloaderenv@140000 { + label =3D "bootloader env"; + reg =3D <0x140000 0x40000>; + }; + + dtb@180000 { + label =3D "device tree"; + reg =3D <0x180000 0x80000>; + }; + + kernel@200000 { + label =3D "kernel"; + reg =3D <0x200000 0x600000>; + }; + }; +}; + +&sdmmc0 { + bus-width =3D <4>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_sdmmc0_default>; + disable-wp; + status =3D "okay"; +}; + +&sdmmc1 { + bus-width =3D <4>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_sdmmc1_default>; + disable-wp; + status =3D "okay"; +}; + +&shutdown_controller { + debounce-delay-us =3D <976>; + atmel,wakeup-rtc-timer; + + input@0 { + reg =3D <0>; + }; +}; + +&spi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_spi1_default>; + status =3D "okay"; +}; + +&tcb0 { + timer0: timer@0 { + compatible =3D "atmel,tcb-timer"; + reg =3D <0>; + }; + + timer1: timer@1 { + compatible =3D "atmel,tcb-timer"; + reg =3D <1>; + }; +}; + +&uart0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_debug_uart>; + atmel,use-dma-rx; + atmel,use-dma-tx; + status =3D "okay"; +}; + +&uart1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_rpi_uart>; + atmel,use-dma-rx; + atmel,use-dma-tx; + status =3D "okay"; +}; + +&uart3 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_mikrobus2_uart>; + atmel,use-dma-rx; + atmel,use-dma-tx; + status =3D "okay"; +}; + +&uart4 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_mikrobus1_uart>; + atmel,use-dma-rx; + atmel,use-dma-tx; + status =3D "okay"; +}; + +&usb0 { + atmel,vbus-gpio =3D <&pioA PIN_PB13 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_usba_vbus>; + status =3D "okay"; +}; + +&usb1 { + num-ports =3D <3>; + atmel,vbus-gpio =3D <0 + &pioA PIN_PA6 GPIO_ACTIVE_HIGH + 0>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_usb_default>; + status =3D "okay"; +}; + +&usb2 { + status =3D "okay"; +}; + +&watchdog { + status =3D "okay"; +}; --=20 2.42.0