From patchwork Wed Nov 4 22:14:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 7555101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7EABA9F2F7 for ; Wed, 4 Nov 2015 22:18:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A8DA206B7 for ; Wed, 4 Nov 2015 22:18:03 +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 C4B4D20691 for ; Wed, 4 Nov 2015 22:18:01 +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 1Zu6L3-0004zN-QB; Wed, 04 Nov 2015 22:15:29 +0000 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zu6Kk-0003kh-E0 for linux-arm-kernel@lists.infradead.org; Wed, 04 Nov 2015 22:15:13 +0000 Received: from mail.nefkom.net (unknown [192.168.8.184]) by mail-out.m-online.net (Postfix) with ESMTP id 3nrj2b6RHRz3hlR2; Wed, 4 Nov 2015 23:14:47 +0100 (CET) X-Auth-Info: FqV8eYntACEDZzL28eh0/taFAPl0m+yOlWEaQTVnQLY= Received: from chi.lan (unknown [195.140.253.167]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3nrj2b46T8zvhTg; Wed, 4 Nov 2015 23:14:47 +0100 (CET) From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 3/3] ARM: at91/dt: sama5d4: Add support for DENX MA5D4 SoM and EVK Date: Wed, 4 Nov 2015 23:14:24 +0100 Message-Id: <1446675264-5514-3-git-send-email-marex@denx.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1446675264-5514-1-git-send-email-marex@denx.de> References: <1446675264-5514-1-git-send-email-marex@denx.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151104_141511_006328_CB89A24D X-CRM114-Status: GOOD ( 17.34 ) X-Spam-Score: -1.9 (-) 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: Marek Vasut , Josh Wu , Alexandre Belloni , Nicolas Ferre MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for the DENX MA5D4 SoM and MA5D4EVK board. The system consists of a SoM with eMMC, SPI NOR for booting, 2x SPI CAN chip and an EVK with microSD slot, 2x UART, 2x CAN port, 3x USB port, LEDs and expansion headers. Signed-off-by: Marek Vasut Cc: Alexandre Belloni Cc: Josh Wu Cc: Nicolas Ferre --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 127 +++++++++++++++++++++ arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts | 170 ++++++++++++++++++++++++++++ 3 files changed, 298 insertions(+) create mode 100644 arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi create mode 100644 arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts V2: - Zap bogus bootargs, zap clock@0 and clk20m . - Zap bogus address-cells / size-cells / ranges in the clocks node. - Drop duplicated /clocks/slow_xtal and /clocks/main_xtal, which is already present in sama5d4.dtsi - Sort nodes by address in ascending order diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index bb8fa02..67130bb 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -48,6 +48,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \ sama5d34ek.dtb \ sama5d35ek.dtb \ sama5d36ek.dtb \ + at91-sama5d4_ma5d4evk.dtb \ at91-sama5d4_xplained.dtb \ at91-sama5d4ek.dtb dtb-$(CONFIG_ARCH_ATLAS6) += \ diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi new file mode 100644 index 0000000..e7b2109 --- /dev/null +++ b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2015 Marek Vasut + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include "sama5d4.dtsi" + +/ { + model = "DENX MA5D4"; + compatible = "denx,ma5d4", "atmel,sama5d4", "atmel,sama5"; + + memory { + reg = <0x20000000 0x10000000>; + }; + + clocks { + main_clock: main_clock { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <12000000>; + }; + + clk20m: clk20m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <20000000>; + clock-output-names = "clk20m"; + }; + }; + + ahb { + apb { + mmc0: mmc@f8000000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7>; + vmmc-supply = <&vcc_mmc0_reg>; + vqmmc-supply = <&vcc_3v3_reg>; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <8>; + broken-cd; + }; + }; + + spi0: spi@f8010000 { + cs-gpios = <&pioC 3 0>, <0>, <0>, <0>; + status = "okay"; + + m25p80@0 { + compatible = "atmel,at25df321a"; + spi-max-frequency = <50000000>; + reg = <0>; + }; + }; + + i2c0: i2c@f8014000 { + status = "okay"; + }; + + spi1: spi@fc018000 { + cs-gpios = <&pioB 22 0>, <&pioB 23 0>, <0>, <0>; + status = "okay"; + + can0: can@0 { + compatible = "microchip,mcp2515"; + reg = <0>; + clocks = <&clk20m>; + interrupt-parent = <&pioE>; + interrupts = <6 GPIO_ACTIVE_LOW>; + spi-max-frequency = <10000000>; + }; + + can1: can@1 { + compatible = "microchip,mcp2515"; + reg = <1>; + clocks = <&clk20m>; + interrupt-parent = <&pioE>; + interrupts = <7 GPIO_ACTIVE_LOW>; + spi-max-frequency = <10000000>; + }; + }; + + adc0: adc@fc034000 { + pinctrl-names = "default"; + pinctrl-0 = < + /* external trigger conflicts with USBA_VBUS */ + &pinctrl_adc0_ad0 + &pinctrl_adc0_ad1 + &pinctrl_adc0_ad2 + &pinctrl_adc0_ad3 + &pinctrl_adc0_ad4 + >; + atmel,adc-vref = <3300>; + status = "okay"; + }; + + watchdog@fc068640 { + status = "okay"; + }; + }; + }; + + 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; + }; + + vcc_mmc0_reg: fixedregulator@1 { + compatible = "regulator-fixed"; + gpio = <&pioE 15 GPIO_ACTIVE_HIGH>; + regulator-name = "RST_n MCI0"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3_reg>; + regulator-boot-on; + }; +}; diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts b/arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts new file mode 100644 index 0000000..abaaba5 --- /dev/null +++ b/arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2015 Marek Vasut + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +#include "at91-sama5d4_ma5d4.dtsi" + +/ { + model = "DENX MA5D4EVK"; + compatible = "denx,ma5d4evk", "atmel,sama5d4", "atmel,sama5"; + + chosen { + stdout-path = "serial3:115200n8"; + }; + + ahb { + usb0: gadget@00400000 { + atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usba_vbus>; + status = "okay"; + }; + + usb1: ohci@00500000 { + num-ports = <3>; + atmel,vbus-gpio = <0 + &pioE 11 GPIO_ACTIVE_LOW + &pioE 14 GPIO_ACTIVE_LOW + >; + status = "okay"; + }; + + usb2: ehci@00600000 { + status = "okay"; + }; + + apb { + hlcdc: hlcdc@f0000000 { + status = "okay"; + + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + + }; + + macb0: ethernet@f8020000 { + phy-mode = "rmii"; + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; + + usart0: serial@f802c000 { + status = "okay"; + }; + + usart1: serial@f8030000 { + status = "okay"; + }; + + mmc1: mmc@fc000000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>; + vmmc-supply = <&vcc_mmc1_reg>; + vqmmc-supply = <&vcc_3v3_reg>; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <4>; + cd-gpios = <&pioE 5 0>; + }; + }; + + adc0: adc@fc034000 { + atmel,adc-ts-wires = <4>; + atmel,adc-ts-pressure-threshold = <10000>; + }; + + + pinctrl@fc06a000 { + board { + pinctrl_mmc1_cd: mmc1_cd { + atmel,pins = ; + }; + pinctrl_usba_vbus: usba_vbus { + atmel,pins = + ; + }; + }; + }; + }; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + status = "okay"; + }; + + leds { + compatible = "gpio-leds"; + status = "okay"; + + user1 { + label = "user1"; + gpios = <&pioD 28 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + + user2 { + label = "user2"; + gpios = <&pioD 29 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + + user3 { + label = "user3"; + gpios = <&pioD 30 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + }; + + panel: panel { + /* Actually Ampire 800480R2 */ + compatible = "foxlink,fl500wvr00-a0t", "simple-panel"; + backlight = <&backlight>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + + panel_input: endpoint@0 { + reg = <0>; + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + vcc_mmc1_reg: fixedregulator@2 { + compatible = "regulator-fixed"; + gpio = <&pioE 17 GPIO_ACTIVE_LOW>; + regulator-name = "VDD MCI1"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3_reg>; + }; +};