From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.thorsis.com (mail.thorsis.com [217.92.40.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AFB92CA2; Fri, 20 Sep 2024 06:07:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.92.40.78 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726812462; cv=none; b=Qhgn8d5O/hPlOhJp9ppmBl2m0K/38ipOMLgGdqSk40tCVvmvGAYemvt/nRJJ7UVx4oiWmgEMGuFP9N7vwVtWy2AaT7DyGswjmdiKNpG7NbbWPYst3qF/T7iUOceBUVml5+RR8AAqVDRCOsBV1vlanxmHehX7FdJ7bssv/CFKb3Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726812462; c=relaxed/simple; bh=oXTPimYX8Gdez+/+pjv11RuNN7snvos5DyD3PaS4v9g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TxJA8P8eWXML9+ICpMDuP/MT59hUbKZu/JdOVqcvM2KPZxI08SDZdTZWkQBXQv8Zp0CJ9YYRgzvNABydMYFmRRb/1uAg8c81GKrUYJHXNm4fHK1GJ1d7ae49jWLUKpfMCb1I2g4uCHGfWY08PvyZe1WUkSXua+pdDUxUwCDEpms= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=thorsis.com; spf=pass smtp.mailfrom=thorsis.com; dkim=pass (2048-bit key) header.d=thorsis.com header.i=@thorsis.com header.b=NGmVz4ry; arc=none smtp.client-ip=217.92.40.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=thorsis.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thorsis.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=thorsis.com header.i=@thorsis.com header.b="NGmVz4ry" Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A7B0C1480600; Fri, 20 Sep 2024 08:07:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1726812457; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=85K2BQJpCVOCfU+gA4w4Ipq2kelzLknvkc+pUv5MI2A=; b=NGmVz4ryeTZAFOBfSYqb9MmdcMqBU05+AIOJrqwo6JjW7Hr2RdG9RM1SBVq0wSRZFJNZkQ 4Hw7+K8JtM93bqCcbkvQtmfCnlO64vBNDLwQneXB6+Yy5ydeOZUv0INbrXf0QdiUlNkxJm JskUBCQUi6rVkVLCpknEdp9KzElnTZHDWszBv80zZ5FKW0J14QpuWAWcMkeFCfmbaNx3hz iNWd+kDiEk/85BlOa2+k/79+ONjOvIQGAGPdvNR1urT0WffLuH0zT8cdBN9ER8+RzMSvkh 6qfKgkSwt94Y0VTHFRBDiSg05q4YS2VX7ChjnY7NSuyJCKKRBl2YXzm/lW47Ag== Date: Fri, 20 Sep 2024 08:07:35 +0200 From: Alexander Dahl To: Varshini Rajendran Cc: nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 12/12] ARM: dts: microchip: sam9x75_curiosity: add sam9x75 curiosity board Message-ID: <20240920-frisbee-create-c4988e6e3e9e@thorsis.com> Mail-Followup-To: Varshini Rajendran , nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240903063913.48307-1-varshini.rajendran@microchip.com> <20240903064438.49975-1-varshini.rajendran@microchip.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240903064438.49975-1-varshini.rajendran@microchip.com> User-Agent: Mutt/2.2.12 (2023-09-09) X-Last-TLS-Session-Version: TLSv1.3 Hello, forgot another comment, sorry for the second mail. See below. Am Tue, Sep 03, 2024 at 12:14:38PM +0530 schrieb Varshini Rajendran: > Add device tree file for sam9x75 curiosity board. > > Signed-off-by: Varshini Rajendran > --- > Changes in v7: > > - Added child nodes to the tcb node. > - Moved poweroff node to maintain alphabetic order. > --- > arch/arm/boot/dts/microchip/Makefile | 3 + > .../dts/microchip/at91-sam9x75_curiosity.dts | 324 ++++++++++++++++++ > 2 files changed, 327 insertions(+) > create mode 100644 arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts > > diff --git a/arch/arm/boot/dts/microchip/Makefile b/arch/arm/boot/dts/microchip/Makefile > index 0c45c8d17468..470fe46433a9 100644 > --- a/arch/arm/boot/dts/microchip/Makefile > +++ b/arch/arm/boot/dts/microchip/Makefile > @@ -2,6 +2,7 @@ > # Enables support for device-tree overlays > DTC_FLAGS_at91-sam9x60_curiosity := -@ > DTC_FLAGS_at91-sam9x60ek := -@ > +DTC_FLAGS_at91-sam9x75_curiosity := -@ > DTC_FLAGS_at91-sama5d27_som1_ek := -@ > DTC_FLAGS_at91-sama5d27_wlsom1_ek := -@ > DTC_FLAGS_at91-sama5d29_curiosity := -@ > @@ -60,6 +61,8 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \ > dtb-$(CONFIG_SOC_SAM9X60) += \ > at91-sam9x60_curiosity.dtb \ > at91-sam9x60ek.dtb > +dtb-$(CONFIG_SOC_SAM9X7) += \ > + at91-sam9x75_curiosity.dtb > dtb-$(CONFIG_SOC_SAM_V7) += \ > at91-kizbox2-2.dtb \ > at91-kizbox3-hs.dtb \ > diff --git a/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts > new file mode 100644 > index 000000000000..1119f5d60d89 > --- /dev/null > +++ b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts > @@ -0,0 +1,324 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * at91-sam9x75_curiosity.dts - Device Tree file for Microchip SAM9X75 Curiosity board > + * > + * Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries > + * > + * Author: Varshini Rajendran > + */ > +/dts-v1/; > +#include "sam9x7.dtsi" > +#include > + > +/ { > + model = "Microchip SAM9X75 Curiosity"; > + compatible = "microchip,sam9x75-curiosity", "microchip,sam9x7", "atmel,at91sam9"; > + > + aliases { > + i2c0 = &i2c6; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_key_gpio_default>; > + > + button-user { > + label = "USER"; > + gpios = <&pioC 9 GPIO_ACTIVE_LOW>; > + linux,code = ; > + wakeup-source; > + }; > + }; > + > + leds { > + compatible = "gpio-leds"; > + > + led_red: led-red { > + label = "red"; > + gpios = <&pioC 14 GPIO_ACTIVE_HIGH>; > + pinctrl-0 = <&pinctrl_red_led_gpio_default>; > + }; > + > + led_green: led-green { > + label = "green"; > + gpios = <&pioC 21 GPIO_ACTIVE_HIGH>; > + pinctrl-0 = <&pinctrl_green_led_gpio_default>; > + }; > + > + led_blue: led-blue { > + label = "blue"; > + gpios = <&pioC 20 GPIO_ACTIVE_HIGH>; > + pinctrl-0 = <&pinctrl_blue_led_gpio_default>; > + linux,default-trigger = "heartbeat"; > + }; > + }; Why a seperate pinctrl for each led? You can add it to a single group, attached to the led controller (gpio-leds in this case). > + > + memory@20000000 { > + reg = <0x20000000 0x10000000>; > + device_type = "memory"; > + }; > +}; > + > +&classd { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_classd_default>; > + atmel,pwm-type = "diff"; > + atmel,non-overlap-time = <10>; > + status = "okay"; > +}; > + > +&dbgu { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_dbgu_default>; > + status = "okay"; > +}; > + > +&dma0 { > + status = "okay"; > +}; > + > +&flx6 { > + atmel,flexcom-mode = ; > + status = "okay"; > +}; > + > +&i2c6 { > + #address-cells = <1>; > + #size-cells = <0>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_flx6_default>; > + i2c-analog-filter; > + i2c-digital-filter; > + i2c-digital-filter-width-ns = <35>; > + status = "okay"; > + > + 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-mode = <4>; > + }; > + > + regulator-state-mem { > + 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-mode = <4>; > + }; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + 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-mode = <4>; > + }; > + > + regulator-state-mem { > + regulator-mode = <4>; > + }; > + }; > + > + dcdc4: VDD_OTHER { > + regulator-name = "VDD_OTHER"; > + regulator-min-microvolt = <1150000>; > + regulator-max-microvolt = <1150000>; > + regulator-initial-mode = <2>; > + regulator-allowed-modes = <2>, <4>; > + regulator-ramp-delay = <3125>; > + regulator-always-on; > + > + regulator-state-standby { > + regulator-on-in-suspend; > + regulator-mode = <4>; > + }; > + > + regulator-state-mem { > + regulator-mode = <4>; > + }; > + }; > + > + vldo1: LDO1 { > + regulator-name = "LDO1"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + > + regulator-state-standby { > + regulator-on-in-suspend; > + }; > + }; > + > + vldo2: LDO2 { > + regulator-name = "LDO2"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + > + regulator-state-standby { > + regulator-on-in-suspend; > + }; > + }; > + }; > + }; > +}; > + > +&i2s { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_i2s_default>; > + #sound-dai-cells = <0>; > + status = "okay"; > +}; > + > +&main_xtal { > + clock-frequency = <24000000>; > +}; > + > +&pinctrl { > + classd { > + pinctrl_classd_default: classd-default { > + atmel,pins = > + , > + ; > + }; > + }; > + > + dbgu { > + pinctrl_dbgu_default: dbgu-default { > + atmel,pins = , > + ; > + }; > + }; > + > + flexcom { > + pinctrl_flx6_default: flx6-default { > + atmel,pins = > + , > + ; > + }; > + }; > + > + gpio-keys { > + pinctrl_key_gpio_default: key-gpio-default { > + atmel,pins = ; > + }; > + }; > + > + i2s { > + pinctrl_i2s_default: i2s-default { > + atmel,pins = > + , /* I2SCK */ > + , /* I2SWS */ > + , /* I2SDIN */ > + , /* I2SDOUT */ > + ; /* I2SMCK */ > + }; > + }; > + > + leds { > + pinctrl_red_led_gpio_default: red-led-gpio-default { > + atmel,pins = ; > + }; > + pinctrl_green_led_gpio_default: green-led-gpio-default { > + atmel,pins = ; > + }; > + pinctrl_blue_led_gpio_default: blue-led-gpio-default { > + atmel,pins = ; > + }; > + }; Related to above. These three can be configured together in one group. See other microchip board dts files for reference. Greets Alex > + > + sdmmc0 { > + pinctrl_sdmmc0_default: sdmmc0-default { > + atmel,pins = > + , /* PA2 CK periph A with pullup */ > + , /* PA1 CMD periph A with pullup */ > + , /* PA0 DAT0 periph A */ > + , /* PA3 DAT1 periph A with pullup */ > + , /* PA4 DAT2 periph A with pullup */ > + ; /* PA5 DAT3 periph A with pullup */ > + }; > + }; > +}; /* pinctrl */ > + > +&poweroff { > + debounce-delay-us = <976>; > + status = "okay"; > + > + input@0 { > + reg = <0>; > + }; > +}; > + > +&rtt { > + atmel,rtt-rtc-time-reg = <&gpbr 0x0>; > +}; > + > +&sdmmc0 { > + bus-width = <4>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_sdmmc0_default>; > + cd-gpios = <&pioA 23 GPIO_ACTIVE_LOW>; > + disable-wp; > + status = "okay"; > +}; > + > +&slow_xtal { > + clock-frequency = <32768>; > +}; > + > +&tcb { > + timer0: timer@0 { > + compatible = "atmel,tcb-timer"; > + reg = <0>; > + }; > + > + timer1: timer@1 { > + compatible = "atmel,tcb-timer"; > + reg = <1>; > + }; > +}; > + > +&trng { > + status = "okay"; > +}; > + > +&watchdog { > + status = "okay"; > +}; > -- > 2.25.1 > >