From patchwork Wed Dec 16 18:55:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 7865681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6751ABEEE1 for ; Wed, 16 Dec 2015 18:58:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 540F32038E for ; Wed, 16 Dec 2015 18:58:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 289E5202C8 for ; Wed, 16 Dec 2015 18:58:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9HF6-0007w7-QR; Wed, 16 Dec 2015 18:56:04 +0000 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9HF2-0007se-SJ for linux-arm-kernel@lists.infradead.org; Wed, 16 Dec 2015 18:56:02 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 0BCAD382; Wed, 16 Dec 2015 19:55:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (81-67-231-93.rev.numericable.fr [81.67.231.93]) by mail.free-electrons.com (Postfix) with ESMTPSA id C7D8B36B; Wed, 16 Dec 2015 19:55:38 +0100 (CET) From: Gregory CLEMENT To: Nicolas Ferre , Alexandre Belloni , Jean-Christophe Plagniol-Villard , linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: at91/dt: Add Support for the L+G VInCo platform Date: Wed, 16 Dec 2015 19:55:34 +0100 Message-Id: <1450292134-1640-1-git-send-email-gregory.clement@free-electrons.com> X-Mailer: git-send-email 2.5.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151216_105601_281236_84DEE826 X-CRM114-Status: GOOD ( 17.76 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Gregory CLEMENT MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Versatile Industrial Communication platform is a community oriented board from Landis + Gyr. It comes with: - an RS-485 port - 2 Ethernet ports - a wireless M-BUS - a 4G modem - a 4MB SPI flash - a 4GB eMMC Signed-off-by: Gregory CLEMENT --- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/at91-vinco.dts | 266 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 268 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/at91-vinco.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 30bbc37..75562ab 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -49,7 +49,8 @@ dtb-$(CONFIG_SOC_SAM_V7) += \ sama5d35ek.dtb \ sama5d36ek.dtb \ at91-sama5d4_xplained.dtb \ - at91-sama5d4ek.dtb + at91-sama5d4ek.dtb \ + at91-vinco.dtb dtb-$(CONFIG_ARCH_ATLAS6) += \ atlas6-evb.dtb dtb-$(CONFIG_ARCH_ATLAS7) += \ diff --git a/arch/arm/boot/dts/at91-vinco.dts b/arch/arm/boot/dts/at91-vinco.dts new file mode 100644 index 0000000..993bf8f --- /dev/null +++ b/arch/arm/boot/dts/at91-vinco.dts @@ -0,0 +1,266 @@ +/* + * Device Tree file for VInCo platform + * + * Copyright (C) 2014 Atmel, + * 2014 Nicolas Ferre + * 2015 Gregory CLEMENT + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +/dts-v1/; +#include "sama5d4.dtsi" + +/ { + model = "L+G VInCo platform"; + compatible = "l+g,vinco", "atmel,sama5d4", "atmel,sama5"; + + chosen { + bootargs = "ignore_loglevel earlyprintk"; + stdout-path = "serial0:115200n8"; + }; + + memory { + reg = <0x20000000 0x4000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <12000000>; + }; + + slow_xtal { + clock-frequency = <32768>; + }; + + main_xtal { + clock-frequency = <12000000>; + }; + }; + + ahb { + apb { + + adc0: adc@fc034000 { + status = "okay"; /* Enable ADC IIO support */ + }; + + mmc0: mmc@f8000000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 + &pinctrl_mmc0_dat1_3 + &pinctrl_mmc0_dat4_7>; + vqmmc-supply = <&vcc_3v3_reg>; + vmmc-supply = <&vcc_3v3_reg>; + no-1-8-v; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <8>; + non-removable; + broken-cd; + status = "okay"; + }; + }; + + spi0: spi@f8010000 { + cs-gpios = <&pioC 3 0>, <0>, <0>, <0>; + status = "okay"; + m25p80@0 { + compatible = "n25q32b", "jedec,spi-nor"; + spi-max-frequency = <50000000>; + reg = <0>; + }; + }; + + i2c0: i2c@f8014000 { + status = "okay"; + }; + + i2c1: i2c@f8018000 { + status = "okay"; + /* kerkey security module */ + }; + + macb0: ethernet@f8020000 { + phy-mode = "rmii"; + status = "okay"; + + ethernet-phy@1 { + reg = <0x1>; + reset-gpios = <&pioE 8 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&pioB>; + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; + }; + + }; + + i2c2: i2c@f8024000 { + status = "okay"; + + rtc1: rtc@64 { + compatible = "rx8900"; + reg = <0x32>; + }; + }; + + usart2: serial@fc008000 { + /* MBUS */ + status = "okay"; + }; + + usart3: serial@fc00c000 { + /* debug */ + status = "okay"; + }; + + usart4: serial@fc010000 { + /* LMN */ + pinctrl-0 = <&pinctrl_usart4 &pinctrl_usart4_rts>; + linux,rs485-enabled-at-boot-time; + status = "okay"; + }; + + macb1: ethernet@fc028000 { + phy-mode = "rmii"; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ethernet-phy@1 { + reg = <0x1>; + interrupt-parent = <&pioB>; + interrupts = <31 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&pioE 6 GPIO_ACTIVE_HIGH>; + }; + }; + + watchdog@fc068640 { + status = "okay"; + }; + + pinctrl@fc06a000 { + board { + pinctrl_usba_vbus: usba_vbus { + atmel,pins = + ; + }; + }; + }; + }; + + usb0: gadget@00400000 { + atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usba_vbus>; + status = "disable"; + }; + + usb1: ohci@00500000 { + num-ports = <3>; + atmel,vbus-gpio = <0 + &pioE 11 GPIO_ACTIVE_LOW + &pioE 12 GPIO_ACTIVE_LOW + >; + status = "disable"; + }; + + usb2: ehci@00600000 { + /* 4G Modem */ + status = "okay"; + }; + + }; + + leds { + compatible = "gpio-leds"; + status = "okay"; + + led_err { + label = "err"; + gpios = <&pioA 7 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led_rssi { + label = "rssi"; + gpios = <&pioA 9 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led_tls { + label = "tls"; + gpios = <&pioA 24 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led_lmc { + label = "lmc"; + gpios = <&pioA 25 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led_wmt { + label = "wmt"; + gpios = <&pioA 29 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led_pwr { + label = "pwr"; + gpios = <&pioA 26 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + }; + + vcc_3v3_reg: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "VCC 3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; +};