Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2186834pxa; Mon, 17 Aug 2020 03:23:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1irDL5TZWYgVD77Rh4iAtDeJpNqSeoGzvUm5Zs+95zFCGhf8xX4cQdwJ2hORljTaipaF0 X-Received: by 2002:a05:6402:17f7:: with SMTP id t23mr14373265edy.301.1597659805053; Mon, 17 Aug 2020 03:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597659805; cv=none; d=google.com; s=arc-20160816; b=cczVRocMrsEj01vxWZhEaJj0PcQs6ZH9c2d9oWWV9nxwrps4Lu3KzK2hcvKSRKWxFe dYYxpZcKu/aFUWmLUOElyh2n+TLbu6ACtJwPMQ20kCcQ7QQS+Zcgmd3D0MYFloiKh4L8 JuSta0v4sMky/seObnxDuEGaigTkf7HAe7vNVA3Ct9NA0H5NFzYEGHtq8iA+Dx7N0Tci stugR/l7Z3Vd32WhK9SNFXyculOenrHObNcUTiFIUvRNFBaAR9uP+8b8CO7qC5Fboldg lYn7ob6+uc31xJJzqUUCGYJ9RtIta6Go359/JZUu9pVpcM4L08Us1zSy2hKEa3/K0iuC 4N0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=t1q60538VyubTT6WaUzuyoH6qSYKBi8xJgsr3vMONIA=; b=ilzHdDzjcIm6vcG9syPCAWTpsjo7atmNzzHtE5AQySuitZGQZfpl7Yq5pcttgr5Kpa zIXVmKlyZNVvCfBqh5cSiswUlFcKv3U10it0MOF2ZKyTG8SoFHFnCoHA4/vV1QwbMWAA aOjs3VmZDmRzzJu8qi32gmbs07pfLDi77plIAIwrdAxviJduLYXEh0B1XDbj0u4U1PWX 5OxMNquY5DH3B9f+TIs53ahz5k67Hfl/RIbR8m8lIKYsY4cOa0F8QAgmBJIQP+Am+On8 CTnjRimlL6aR9vmiKzYGe1sar/3ctH/NLFLQjIyf8ekSB0js/gZMEDqub9pV2qbRJCC2 L9lA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k30si14647524edj.513.2020.08.17.03.23.02; Mon, 17 Aug 2020 03:23:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727963AbgHQKVt (ORCPT + 99 others); Mon, 17 Aug 2020 06:21:49 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:60481 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727952AbgHQKVr (ORCPT ); Mon, 17 Aug 2020 06:21:47 -0400 Received: from localhost (sto93-h02-176-184-36-142.dsl.sta.abo.bbox.fr [176.184.36.142]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id E5CC3200002; Mon, 17 Aug 2020 10:21:41 +0000 (UTC) Date: Mon, 17 Aug 2020 12:21:36 +0200 From: Alexandre Belloni To: Reto Schneider Cc: linux-arm-kernel@lists.infradead.org, Reto Schneider , Stefan Roese , Michael Zimmermann , Rob Herring , Nicolas Ferre , Ludovic Desroches , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [PATCH] ARM: at91: Add GARDENA smart Gateway AT91SAM board Message-ID: <20200817102136.GC4500@piout.net> References: <20200810171921.8679-1-code@reto-schneider.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200810171921.8679-1-code@reto-schneider.ch> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Thank you for this submission. On 10/08/2020 19:19:19+0200, Reto Schneider wrote: > From: Reto Schneider > > This patch adds support for the GARDENA smart Gateway, which is based on > the Atmel AT91SAM9G25. It is equipped with 128 MiB of DDR2 RAM and > 256 MiB NAND storage. > > Please note that this gateway is not actually based on a AT91SAM9x5 EK > board, but is close enough to allow its DT to be used. > > Co-developed-by: Stefan Roese > Signed-off-by: Stefan Roese > Co-developed-by: Michael Zimmermann > Signed-off-by: Michael Zimmermann > Signed-off-by: Reto Schneider > --- > arch/arm/boot/dts/Makefile | 1 + > .../dts/at91sam9g25-gardena-smart-gateway.dts | 186 ++++++++++++++++++ > 2 files changed, 187 insertions(+) > create mode 100644 arch/arm/boot/dts/at91sam9g25-gardena-smart-gateway.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 4572db3fa5ae..d38d256f59fa 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -44,6 +44,7 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \ > at91-wb45n.dtb \ > at91sam9g15ek.dtb \ > at91sam9g25ek.dtb \ > + at91sam9g25-gardena-smart-gateway.dtb \ > at91sam9g35ek.dtb \ > at91sam9x25ek.dtb \ > at91sam9x35ek.dtb > diff --git a/arch/arm/boot/dts/at91sam9g25-gardena-smart-gateway.dts b/arch/arm/boot/dts/at91sam9g25-gardena-smart-gateway.dts > new file mode 100644 > index 000000000000..19b0f67a7af6 > --- /dev/null > +++ b/arch/arm/boot/dts/at91sam9g25-gardena-smart-gateway.dts > @@ -0,0 +1,186 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Device Tree file for the GARDENA smart Gateway (AT91SAM) > + * > + * Copyright (C) 2020 GARDENA GmbH > + */ > + > +/dts-v1/; > + > +#include "at91sam9g25.dtsi" > +#include "at91sam9x5ek.dtsi" > +#include > + > +/ { > + model = "GARDENA smart Gateway (AT91SAM)"; > + compatible = "gardena,smart-gateway-at91sam", "atmel,at91sam9g25", "atmel,at91sam9x5", "atmel,at91sam9"; You should document the vendor string. And ideally, gardena,smart-gateway-at91sam should be documented in Documentation/devicetree/bindings/arm/atmel-at91.yaml > + > + aliases { > + serial1 = &usart3; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; This is already in at91sam9x5ek.dtsi > + }; > + > + memory { > + reg = <0x20000000 0x8000000>; This is already in at91sam9x5cm.dtsi, included fromat91sam9x5ek.dtsi > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + > + user_btn1 { > + label = "USER_BTN1"; > + gpios = <&pioA 24 GPIO_ACTIVE_LOW>; > + linux,code = ; > + }; > + }; > + > + 1wire_cm { > + status = "disabled"; > + }; > + > + leds { > + compatible = "gpio-leds"; > + > + power_blue { > + label = "smartgw:power:blue"; > + gpios = <&pioC 21 GPIO_ACTIVE_HIGH>; > + default-state = "off"; > + }; > + > + power_green { > + label = "smartgw:power:green"; > + gpios = <&pioC 20 GPIO_ACTIVE_HIGH>; > + default-state = "on"; > + }; > + > + power_red { > + label = "smartgw:power:red"; > + gpios = <&pioC 19 GPIO_ACTIVE_HIGH>; > + default-state = "off"; > + }; > + > + radio_blue { > + label = "smartgw:radio:blue"; > + gpios = <&pioC 18 GPIO_ACTIVE_HIGH>; > + default-state = "off"; > + }; > + > + radio_green { > + label = "smartgw:radio:green"; > + gpios = <&pioC 17 GPIO_ACTIVE_HIGH>; > + default-state = "off"; > + }; > + > + radio_red { > + label = "smartgw:radio:red"; > + gpios = <&pioC 16 GPIO_ACTIVE_HIGH>; > + default-state = "off"; > + }; > + > + internet_blue { > + label = "smartgw:internet:blue"; > + gpios = <&pioC 15 GPIO_ACTIVE_HIGH>; > + default-state = "off"; > + }; > + > + internet_green { > + label = "smartgw:internet:green"; > + gpios = <&pioC 14 GPIO_ACTIVE_HIGH>; > + default-state = "off"; > + }; > + > + internet_red { > + label = "smartgw:internet:red"; > + gpios = <&pioC 13 GPIO_ACTIVE_HIGH>; > + default-state = "off"; > + }; > + > + heartbeat { > + label = "smartgw:heartbeat"; > + gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; > + linux,default-trigger = "heartbeat"; > + }; > + > + pb18 { > + status = "disabled"; > + }; > + > + pd21 { > + status = "disabled"; > + }; > + }; > +}; > + > +&dbgu { > + status = "okay"; > +}; This is already in at91sam9x5ek.dtsi and is duplicated below > + > +&macb0 { > + phy-mode = "rmii"; > + status = "okay"; > +}; > + > +&nand_controller { > + status = "okay"; This is already in at91sam9x5cm.dtsi > +}; > + > +&usb0 { > + status = "okay"; > + num-ports = <3>; This is already in at91sam9x5ek.dtsi > +}; > + > +&usb1 { > + status = "okay"; This is already in at91sam9x5ek.dtsi > +}; > + > +&usart0 { > + status = "disabled"; > +}; > + > +&usart2 { > + status = "disabled"; > +}; > + > +&dbgu { > + status = "okay"; > +}; > + > +&usart3 { > + status = "okay"; > + > + pinctrl-0 = <&pinctrl_usart3 > + &pinctrl_usart3_rts > + &pinctrl_usart3_cts > + >; > +}; > + > +&watchdog { > + status = "okay"; > +}; > + > +&mmc0 { > + status = "disabled"; > +}; > + > +&mmc1 { > + status = "disabled"; > +}; > + > +&spi0 { > + status = "disabled"; > +}; > + > +&i2c0 { > + status = "disabled"; > +}; > + > +&adc0 { > + status = "disabled"; > +}; > + > +&ssc0 { > + status = "disabled"; > +}; Overall, I'm not convinced it is a good idea to start from at91sam9x5ek.dtsi as it makes you dtb bigger than necessary but if you want it that way, I'm fine with that. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com