mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Reto Schneider <code@reto-schneider.ch>
To: linux-arm-kernel@lists.infradead.org, alexandre.belloni@bootlin.com
Cc: Reto Schneider <reto.schneider@husqvarnagroup.com>,
	Stefan Roese <sr@denx.de>,
	Michael Zimmermann <michael.zimmermann@grandcentrix.net>,
	Rob Herring <robh+dt@kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Kamel Bouhara <kamel.bouhara@bootlin.com>,
	Cristian Birsan <cristian.birsan@microchip.com>,
	Codrin Ciubotariu <codrin.ciubotariu@microchip.com>,
	Eugen Hristev <eugen.hristev@microchip.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
	FLATTENED DEVICE TREE BINDINGS),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v3 2/2] ARM: at91: Add GARDENA smart Gateway (Art. 19000) support
Date: Sat, 22 Aug 2020 17:10:21 +0200	[thread overview]
Message-ID: <20200822151023.31629-2-code@reto-schneider.ch> (raw)
In-Reply-To: <20200822151023.31629-1-code@reto-schneider.ch>

From: Reto Schneider <reto.schneider@husqvarnagroup.com>

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 <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Co-developed-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>

---
Changes in v3:
- Fix DT binding schema violation, put it in separate commit
- Fix line length violation
- Sort new dtb entry in Makefile

Changes in v2:
- Remove duplicated DT entries
- Improve model name
- Add device to relevant DT binding schema
---
 arch/arm/boot/dts/Makefile                    |   1 +
 .../dts/at91sam9g25-gardena-smart-gateway.dts | 158 ++++++++++++++++++
 2 files changed, 159 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 e6a1cac0bfc7..6cd1cfcd5316 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -43,6 +43,7 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \
 	at91-smartkiz.dtb \
 	at91-wb45n.dtb \
 	at91sam9g15ek.dtb \
+	at91sam9g25-gardena-smart-gateway.dtb \
 	at91sam9g25ek.dtb \
 	at91sam9g35ek.dtb \
 	at91sam9x25ek.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..7da70aeeb528
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9g25-gardena-smart-gateway.dts
@@ -0,0 +1,158 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Device Tree file for the GARDENA smart Gateway (Article No. 19000)
+ *
+ *  Copyright (C) 2020 GARDENA GmbH
+ */
+
+/dts-v1/;
+
+#include "at91sam9g25.dtsi"
+#include "at91sam9x5ek.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "GARDENA smart Gateway (Article No. 19000)";
+	compatible = "gardena,smart-gateway-at91sam", "atmel,at91sam9g25", "atmel,at91sam9x5",
+		"atmel,at91sam9";
+
+	aliases {
+		serial1 = &usart3;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		user_btn1 {
+			label = "USER_BTN1";
+			gpios = <&pioA 24 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_PROG1>;
+		};
+	};
+
+	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";
+		};
+	};
+};
+
+&macb0 {
+	phy-mode = "rmii";
+	status = "okay";
+};
+
+&usart0 {
+	status = "disabled";
+};
+
+&usart2 {
+	status = "disabled";
+};
+
+&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";
+};
-- 
2.27.0


  reply	other threads:[~2020-08-22 15:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 17:19 [PATCH] ARM: at91: Add GARDENA smart Gateway AT91SAM board Reto Schneider
2020-08-17 10:21 ` Alexandre Belloni
2020-08-19  9:04   ` Reto Schneider
2020-08-19 10:51     ` Alexandre Belloni
2020-08-19 11:25 ` [PATCH v2] ARM: at91: Add GARDENA smart Gateway (Art. 19000) board Reto Schneider
2020-08-19 22:35   ` Rob Herring
2020-08-22 15:10 ` [PATCH v3 1/2] dt-bindings: arm: " Reto Schneider
2020-08-22 15:10   ` Reto Schneider [this message]
2020-08-25 15:53   ` Alexandre Belloni

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=20200822151023.31629-2-code@reto-schneider.ch \
    --to=code@reto-schneider.ch \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=codrin.ciubotariu@microchip.com \
    --cc=cristian.birsan@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eugen.hristev@microchip.com \
    --cc=kamel.bouhara@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=michael.zimmermann@grandcentrix.net \
    --cc=nicolas.ferre@microchip.com \
    --cc=reto.schneider@husqvarnagroup.com \
    --cc=robh+dt@kernel.org \
    --cc=sr@denx.de \
    /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

Powered by JetHome