linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Hari Prasath <Hari.PrasathGE@microchip.com>,
	nicolas.ferre@microchip.com, claudiu.beznea@microchip.com,
	davem@davemloft.net, krzysztof.kozlowski+dt@linaro.org,
	alexandre.belloni@bootlin.com, arnd@arndb.de, olof@lixom.net,
	soc@kernel.org, manikandan.m@microchip.com, michael@walle.cc,
	horatiu.vultur@microchip.com, kavyasree.kotagiri@microchip.com,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, durai.manickamkr@microchip.com
Subject: Re: [linux][PATCH 6/6] ARM: dts: at91: sam9x60_curiosity: Add device tree for sam9x60_curiosity board
Date: Thu, 8 Sep 2022 13:04:18 +0200	[thread overview]
Message-ID: <6fb37c95-1bb3-aef0-eca8-3f6e3b868e3e@linaro.org> (raw)
In-Reply-To: <20220907092054.29915-7-Hari.PrasathGE@microchip.com>

On 07/09/2022 11:20, Hari Prasath wrote:
> From: Manikandan M <manikandan.m@microchip.com>
> 
> Add device tree file for sam9x60_curiosity board.
> 
> Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
> Signed-off-by: Manikandan M <manikandan.m@microchip.com>
> Signed-off-by: Hari Prasath <Hari.PrasathGE@microchip.com>
> ---
>  .../devicetree/bindings/arm/atmel-at91.yaml   |   6 +

Bindings are separate patches.

>  arch/arm/boot/dts/Makefile                    |   1 +
>  arch/arm/boot/dts/at91-sam9x60_curiosity.dts  | 532 ++++++++++++++++++
>  3 files changed, 539 insertions(+)
>  create mode 100644 arch/arm/boot/dts/at91-sam9x60_curiosity.dts
> 
> diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.yaml b/Documentation/devicetree/bindings/arm/atmel-at91.yaml
> index 2b7848bb7769..fae3a3090fbd 100644
> --- a/Documentation/devicetree/bindings/arm/atmel-at91.yaml
> +++ b/Documentation/devicetree/bindings/arm/atmel-at91.yaml
> @@ -97,6 +97,12 @@ properties:
>            - const: microchip,sam9x60
>            - const: atmel,at91sam9
>  
> +      - description: SAM9X60 Curiosity board
> +        items:
> +          - const: microchip,sam9x60-curiosity
> +          - const: microchip,sam9x60
> +          - const: atmel,at91sam9

This should be rather together with previous entry as an enum.

> +
>        - description: Nattis v2 board with Natte v2 power board
>          items:
>            - const: axentia,nattis-2
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 595e870750cd..cd60cda5d187 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -51,6 +51,7 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \
>  	at91sam9x25ek.dtb \
>  	at91sam9x35ek.dtb
>  dtb-$(CONFIG_SOC_SAM9X60) += \
> +	at91-sam9x60_curiosity.dtb \
>  	at91-sam9x60ek.dtb
>  dtb-$(CONFIG_SOC_SAM_V7) += \
>  	at91-kizbox2-2.dtb \
> diff --git a/arch/arm/boot/dts/at91-sam9x60_curiosity.dts b/arch/arm/boot/dts/at91-sam9x60_curiosity.dts
> new file mode 100644
> index 000000000000..75e6727b5e3a
> --- /dev/null
> +++ b/arch/arm/boot/dts/at91-sam9x60_curiosity.dts
> @@ -0,0 +1,532 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * at91-sam9x60_curiosity.dts - Device Tree file for Microchip SAM9X60 CURIOSITY board
> + *
> + * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries
> + *
> + * Author: Manikandan M <manikandan.m@microchip.com>
> + */
> +/dts-v1/;
> +#include "sam9x60.dtsi"
> +#include <dt-bindings/input/input.h>
> +
> +/ {
> +	model = "Microchip SAM9X60 CURIOSITY";
> +	compatible = "microchip,sam9x60-curiosity", "microchip,sam9x60", "atmel,at91sam9";
> +
> +	aliases {
> +		i2c0 = &i2c0;
> +		i2c1 = &i2c6;
> +		serial2 = &uart7;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory@20000000 {
> +		reg = <0x20000000 0x8000000>;
> +	};
> +
> +	clocks {
> +		slow_xtal {

No underscores in node names... If you override nodes, do it via label.

> +			clock-frequency = <32768>;
> +		};
> +
> +		main_xtal {
> +			clock-frequency = <24000000>;
> +		};
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_key_gpio_default>;
> +		status = "okay";

Okay is by default.

> +
> +		button-user {
> +			label = "PB_USER";
> +			gpios = <&pioA 29 GPIO_ACTIVE_LOW>;
> +			linux,code = <KEY_PROG1>;
> +			wakeup-source;
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_gpio_leds>;
> +		status = "okay";

Ditto

> +
> +		red {

Does not look like you tested the DTS against bindings. Please run `make
dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst
for instructions).

You need to fix all warnings in your DTS.
> +			label = "red";
> +			gpios = <&pioD 17 GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		green {
> +			label = "green";
> +			gpios = <&pioD 19 GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		blue {
> +			label = "blue";
> +			gpios = <&pioD 21 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "heartbeat";
> +		};
> +	};
> +
> +	regulators: regulators {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		vdd_1v8: fixed-regulator-vdd_1v8@0 {


No underscores in node names. No prefix "fixed-". This is just a  regulator.

> +			compatible = "regulator-fixed";
> +			regulator-name = "VDD_1V8";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +			regulator-always-on;
> +			status = "okay";

Really?

> +		};
> +
> +		vdd_1v15: fixed-regulator-vdd_1v15@1 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "VDD_1V15";
> +			regulator-min-microvolt = <1150000>;
> +			regulator-max-microvolt = <1150000>;
> +			regulator-always-on;
> +			status = "okay";
> +		};
> +
> +		vdd1_3v3: fixed-regulator-vdd1_3v3@2 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "VDD1_3V3";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-always-on;
> +			status = "okay";
> +		};
> +	};
> +};
> +
> +&adc {
> +	vddana-supply = <&vdd1_3v3>;
> +	vref-supply = <&vdd1_3v3>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
> +	status = "okay";
> +};
> +
> +&can0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_can0_rx_tx>;
> +	status = "disabled"; /* Conflict with dbgu. */
> +};
> +
> +&can1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_can1_rx_tx>;
> +	status = "okay";
> +};
> +
> +&dbgu {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_dbgu>;
> +	status = "okay"; /* Conflict with can0. */
> +};
> +
> +&ebi {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_ebi_addr_nand &pinctrl_ebi_data_0_7>;
> +	status = "okay";
> +
> +	nand_controller: nand-controller {
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_nand_oe_we &pinctrl_nand_cs &pinctrl_nand_rb>;
> +		status = "okay";
> +
> +		nand@3 {
> +			reg = <0x3 0x0 0x800000>;
> +			rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
> +			cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
> +			nand-bus-width = <8>;
> +			nand-ecc-mode = "hw";
> +			nand-ecc-strength = <8>;
> +			nand-ecc-step-size = <512>;
> +			nand-on-flash-bbt;
> +			label = "atmel_nand";
> +
> +			partitions {
> +				compatible = "fixed-partitions";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +
> +				at91bootstrap@0 {
> +					label = "at91bootstrap";
> +					reg = <0x0 0x40000>;
> +				};
> +
> +				uboot@40000 {
> +					label = "u-boot";
> +					reg = <0x40000 0xc0000>;
> +				};
> +
> +				ubootenvred@100000 {
> +					label = "U-Boot Env Redundant";
> +					reg = <0x100000 0x40000>;
> +				};
> +
> +				ubootenv@140000 {
> +					label = "U-Boot Env";
> +					reg = <0x140000 0x40000>;
> +				};
> +
> +				dtb@180000 {
> +					label = "device tree";
> +					reg = <0x180000 0x80000>;
> +				};
> +
> +				kernel@200000 {
> +					label = "kernel";
> +					reg = <0x200000 0x600000>;
> +				};
> +
> +				rootfs@800000 {
> +					label = "rootfs";
> +					reg = <0x800000 0x1f800000>;
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&flx0 {
> +	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
> +	status = "okay";
> +
> +	i2c0: i2c@600 {
> +		dmas = <0>, <0>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_flx0_default>;
> +		i2c-analog-filter;
> +		i2c-digital-filter;
> +		i2c-digital-filter-width-ns = <35>;
> +		status = "okay";

??

> +
> +		eeprom@53 {
> +			compatible = "atmel,24c02";
> +			reg = <0x53>;
> +			pagesize = <16>;
> +			status = "okay";
> +		};
> +	};
> +};
> +
> +&flx6 {
> +	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
> +	status = "okay";
> +
> +	i2c6: i2c@600 {
> +		dmas = <0>, <0>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_flx6_default>;
> +		i2c-analog-filter;
> +		i2c-digital-filter;
> +		i2c-digital-filter-width-ns = <35>;
> +		status = "disabled";
> +	};
> +};
> +
> +&flx7 {
> +	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
> +	status = "okay";
> +
> +	uart7: serial@200 {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_flx7_default>;
> +		status = "okay";
> +	};
> +};
> +
> +&macb0 {
> +	phy-mode = "rmii";
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_macb0_rmii>;
> +	status = "okay";
> +
> +	ethernet-phy@0 {
> +		reg = <0x0>;
> +	};
> +};
> +
> +&pinctrl {
> +	adc {
> +		pinctrl_adc_default: adc_default {

No underscores in node names.



Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2022-09-08 11:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  9:20 [linux][PATCH 0/6] Add support for sam9x60 curiosity board Hari Prasath
2022-09-07  9:20 ` [linux][PATCH 1/6] ARM: dts: at91: sam9x60: Fix the label numbering for the flexcom functions Hari Prasath
2022-09-07  9:20 ` [linux][PATCH 2/6] ARM: dts: at91: sam9x60: Move flexcom definitions to the SoC dtsi Hari Prasath
2022-09-08  7:59   ` Claudiu.Beznea
2022-09-07  9:20 ` [linux][PATCH 3/6] ARM: dts: at91: sam9x60: Specify the FIFO size for the Flexcom UART Hari Prasath
2022-09-07  9:20 ` [linux][PATCH 4/6] ARM: dts: at91: sam9x60: Add DMA bindigs for the flexcom nodes Hari Prasath
2022-09-08  7:58   ` Claudiu.Beznea
2022-09-07  9:20 ` [linux][PATCH 5/6] ARM: dts: at91: sam9x60: Add missing flexcom definitions Hari Prasath
2022-09-08  7:58   ` Claudiu.Beznea
2022-09-07  9:20 ` [linux][PATCH 6/6] ARM: dts: at91: sam9x60_curiosity: Add device tree for sam9x60_curiosity board Hari Prasath
2022-09-08  7:58   ` Claudiu.Beznea
2022-09-08 11:04   ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6fb37c95-1bb3-aef0-eca8-3f6e3b868e3e@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=Hari.PrasathGE@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=claudiu.beznea@microchip.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=durai.manickamkr@microchip.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kavyasree.kotagiri@microchip.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manikandan.m@microchip.com \
    --cc=michael@walle.cc \
    --cc=nicolas.ferre@microchip.com \
    --cc=olof@lixom.net \
    --cc=soc@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).