From patchwork Fri Oct 25 09:25:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kamel BOUHARA X-Patchwork-Id: 11211827 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CC6D1390 for ; Fri, 25 Oct 2019 09:26:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 02C7E2070B for ; Fri, 25 Oct 2019 09:26:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MThnEDtR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="SRPBpsff" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02C7E2070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MAhXqhOqedtaAePnjVX0prjSczj2sGm0IthxHtUEMkk=; b=MThnEDtRMYGhWl s2+B9cDtdkU5xCbp4mKvU5J/FGw+casm1LvAaJL9jTI7FaTmtkSXxXiyiGR1PnjariPXj7QBjV8MK rSJ20ZIMmY96MeAgrHVRHeS5kC4M2ahFyTkbcRD5n809y2oxsd9zNXkJ1wQnpia/WR6HQfBrvsWly dOL3bXVBxzfklD0DjAZTxuclLh5nQNW8pegPtrm5+urBHHfIvGhuSkKw3svmFdZ9s4RsNjFLKojhs vTfM0LHNPN2slH+qwzaeIBdw7eF4DdLxA20BAyp0RfZ6ZppkJUQrjtzZjdC45ErOUVk7flnd6KxA/ iS02OR6tuu+2hen3nqmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNvrk-0001Oe-Sd; Fri, 25 Oct 2019 09:26:40 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNvrj-0001OV-41 for linux-arm-kernel@bombadil.infradead.org; Fri, 25 Oct 2019 09:26:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vA8/j2KNofLCK5hqKhmLeFI9DmKuZoPl/+wv7oFLUFY=; b=SRPBpsffwk0jLruBj9TtQHwf+V TBNVVgPbuYnxE2tPsO54K338TVGTC6DGJTzAvntfGY8XNLW5ZCcy6l8IC0TYdIVpfkmJJCF2o5pcO OQrIBd+VTcUzkVUXIcnKRI71LoGjR1u+zeVRo5+MN5ckVTq7C6rnmD+2KgItvheTshcwrcW4DcZGh 4dlRXu3BLwPBD0HQz/TZqmkhQSHAO1sJIVuLU7sRjZq2nlyjXdKXAOgE9hBAgQ6KDAk5IHcpoHYyl stav0NEycNc4ejHMA9T4A7Sx9sscQGH8TH9NPhuAz1fOHFpP31zrqZ9N0ze+n8Nx4A17b5hQXXkTO E/Foj8yQ==; Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNvs8-0001yM-KL for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2019 09:27:07 +0000 X-Originating-IP: 92.137.17.54 Received: from localhost (alyon-657-1-975-54.w92-137.abo.wanadoo.fr [92.137.17.54]) (Authenticated sender: kamel.bouhara@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 2BE3260002; Fri, 25 Oct 2019 09:25:54 +0000 (UTC) From: Kamel Bouhara To: Rob Herring , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/2] ARM: dts: at91: add smartkiz support and a common kizboxmini dtsi file Date: Fri, 25 Oct 2019 11:25:51 +0200 Message-Id: <20191025092551.25184-2-kamel.bouhara@bootlin.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191025092551.25184-1-kamel.bouhara@bootlin.com> References: <20191025092551.25184-1-kamel.bouhara@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191025_102704_720973_94DE80E3 X-CRM114-Status: GOOD ( 18.15 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.2 on casper.infradead.org summary: Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.195 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.195 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mickael GARDET , devicetree@vger.kernel.org, =?utf-8?q?K=C3=A9vin_RAYMOND?= , Thomas Petazzoni , Kamel Bouhara Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Split the existing Kizbox Mini boards into three board configuration, the base board, the mother board and the RailDIN board. Add a new dts file for the SmartKiz board support. Signed-off-by: Kévin RAYMOND Signed-off-by: Mickael GARDET Signed-off-by: Kamel Bouhara --- Changes in v2 ============= - Renamed kizboxmini to make clear it is a board variant - Merged Smartkiz dts support that actually include the kizboxmini dtsi. arch/arm/boot/dts/Makefile | 5 +- arch/arm/boot/dts/at91-kizboxmini-base.dts | 24 +++ ...oxmini.dts => at91-kizboxmini-common.dtsi} | 163 +++++++++--------- arch/arm/boot/dts/at91-kizboxmini-mb.dts | 26 +++ arch/arm/boot/dts/at91-kizboxmini-rd.dts | 49 ++++++ arch/arm/boot/dts/at91-smartkiz.dts | 109 ++++++++++++ 6 files changed, 293 insertions(+), 83 deletions(-) create mode 100644 arch/arm/boot/dts/at91-kizboxmini-base.dts rename arch/arm/boot/dts/{at91-kizboxmini.dts => at91-kizboxmini-common.dtsi} (51%) create mode 100644 arch/arm/boot/dts/at91-kizboxmini-mb.dts create mode 100644 arch/arm/boot/dts/at91-kizboxmini-rd.dts create mode 100644 arch/arm/boot/dts/at91-smartkiz.dts -- 2.23.0 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index c976b72a4c94..7f34e668ed19 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -37,7 +37,10 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \ at91-ariag25.dtb \ at91-ariettag25.dtb \ at91-cosino_mega2560.dtb \ - at91-kizboxmini.dtb \ + at91-kizboxmini-base.dtb \ + at91-kizboxmini-mb.dtb \ + at91-kizboxmini-rd.dtb \ + at91-smartkiz.dtb \ at91-wb45n.dtb \ at91sam9g15ek.dtb \ at91sam9g25ek.dtb \ diff --git a/arch/arm/boot/dts/at91-kizboxmini-base.dts b/arch/arm/boot/dts/at91-kizboxmini-base.dts new file mode 100644 index 000000000000..81c29ca5cc1b --- /dev/null +++ b/arch/arm/boot/dts/at91-kizboxmini-base.dts @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * at91-kizboxmini-base.dts - Device Tree file for Overkiz Kizbox mini + * base board + * + * Copyright (C) 2015 Overkiz SAS + * Author: Antoine Aubert + * Kévin Raymond + */ +/dts-v1/; +#include "at91-kizboxmini-common.dtsi" + +/ { + model = "Overkiz Kizbox Mini"; + compatible = "overkiz,kizboxmini-base", "atmel,at91sam9g25", + "atmel,at91sam9x5", "atmel,at91sam9"; +}; + +&pinctrl_usart0 { + atmel,pins = + ; +}; diff --git a/arch/arm/boot/dts/at91-kizboxmini.dts b/arch/arm/boot/dts/at91-kizboxmini-common.dtsi similarity index 51% rename from arch/arm/boot/dts/at91-kizboxmini.dts rename to arch/arm/boot/dts/at91-kizboxmini-common.dtsi index cb22f5fb055f..fddf267b2d17 100644 --- a/arch/arm/boot/dts/at91-kizboxmini.dts +++ b/arch/arm/boot/dts/at91-kizboxmini-common.dtsi @@ -1,17 +1,16 @@ -// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-License-Identifier: GPL-2.0 /* * at91-kizboxmini.dts - Device Tree file for Overkiz Kizbox mini board * - * Copyright (C) 2014 Gaël PORTAY + * Copyright (C) 2014-2018 Overkiz SAS + * Author: Antoine Aubert + * Gaël Portay + * Kévin Raymond + * Dorian Rocipon */ -/dts-v1/; #include "at91sam9g25.dtsi" -#include / { - model = "Overkiz Kizbox mini"; - compatible = "overkiz,kizboxmini", "atmel,at91sam9g25", "atmel,at91sam9x5", "atmel,at91sam9"; - chosen { bootargs = "ubi.mtd=ubi"; stdout-path = &dbgu; @@ -22,24 +21,16 @@ }; clocks { - slow_xtal { - clock-frequency = <32768>; - }; - main_xtal { clock-frequency = <12000000>; }; - }; - ahb { - nand0: nand@40000000 { - nand-bus-width = <8>; - nand-ecc-mode = "hw"; - atmel,has-pmecc; - atmel,pmecc-cap = <4>; - atmel,pmecc-sector-size = <512>; - nand-on-flash-bbt; - status = "okay"; + slow_xtal { + clock-frequency = <32768>; + }; + + adc_op_clk { + status = "disabled"; }; }; @@ -63,17 +54,25 @@ }; }; - pwm_leds { + leds: pwm_leds { compatible = "pwm-leds"; - green { + led_blue: pwm_blue { + label = "pwm:blue:user"; + pwms = <&pwm0 2 10000000 0>; + max-brightness = <255>; + linux,default-trigger = "none"; + status = "disabled"; + }; + + led_green: pwm_green { label = "pwm:green:user"; pwms = <&pwm0 0 10000000 0>; max-brightness = <255>; linux,default-trigger = "default-on"; }; - red { + led_red: pwm_red { label = "pwm:red:user"; pwms = <&pwm0 1 10000000 0>; max-brightness = <255>; @@ -82,53 +81,12 @@ }; }; -&dbgu { +&usart0 { + atmel,use-dma-rx; + atmel,use-dma-tx; status = "okay"; }; -&ebi { - pinctrl-0 = <&pinctrl_ebi_addr_nand - &pinctrl_ebi_data_0_7>; - pinctrl-names = "default"; - status = "okay"; - - nand-controller { - pinctrl-0 = <&pinctrl_nand_oe_we - &pinctrl_nand_cs - &pinctrl_nand_rb>; - pinctrl-names = "default"; - 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 = <4>; - nand-ecc-step-size = <512>; - nand-on-flash-bbt; - label = "atmel_nand"; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - bootstrap@0 { - label = "bootstrap"; - reg = <0x0 0x20000>; - }; - - ubi@20000 { - label = "ubi"; - reg = <0x20000 0x7fe0000>; - }; - }; - }; - }; -}; - &macb0 { phy-mode = "rmii"; status = "okay"; @@ -137,26 +95,70 @@ &pwm0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm0_pwm0_1 - &pinctrl_pwm0_pwm1_1>; + &pinctrl_pwm0_pwm1_1 + &pinctrl_pwm0_pwm2_1>; status = "okay"; }; -&tcb0 { - timer@0 { - compatible = "atmel,tcb-timer"; - reg = <0>; - }; +&dbgu { + status = "okay"; +}; - timer@1 { - compatible = "atmel,tcb-timer"; - reg = <1>; - }; +&watchdog { + status = "okay"; }; -&usart0 { +&adc0 { + status = "disabled"; +}; + +&rtc { + status = "disabled"; +}; + +&ebi { + pinctrl-0 = <&pinctrl_ebi_addr_nand + &pinctrl_ebi_data_0_7>; + pinctrl-names = "default"; status = "okay"; }; +&nand_controller { + status = "okay"; + pinctrl-0 = <&pinctrl_nand_oe_we + &pinctrl_nand_cs + &pinctrl_nand_rb>; + pinctrl-names = "default"; + + 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 = <4>; + nand-ecc-step-size = <512>; + nand-on-flash-bbt; + label = "atmel_nand"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + bootstrap@0 { + label = "bootstrap"; + reg = <0x0 0x20000>; + }; + + ubi@20000 { + label = "ubi"; + reg = <0x20000 0x7fe0000>; + }; + }; + }; +}; + &usb0 { num-ports = <1>; status = "okay"; @@ -166,6 +168,3 @@ status = "okay"; }; -&watchdog { - status = "okay"; -}; diff --git a/arch/arm/boot/dts/at91-kizboxmini-mb.dts b/arch/arm/boot/dts/at91-kizboxmini-mb.dts new file mode 100644 index 000000000000..c07d3076a9bc --- /dev/null +++ b/arch/arm/boot/dts/at91-kizboxmini-mb.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2015-2018 Overkiz SAS + * Author: Mickael Gardet + * Kévin Raymond + */ +/dts-v1/; +#include "at91-kizboxmini-common.dtsi" + +/ { + model = "Overkiz Kizbox Mini Mother Board"; + compatible = "overkiz,kizboxmini-mb", "atmel,at91sam9g25", + "atmel,at91sam9x5", "atmel,at91sam9"; +}; + +&usb0 { + num-ports = <2>; +}; + +&rtc { + status = "okay"; +}; + +&led_blue { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/at91-kizboxmini-rd.dts b/arch/arm/boot/dts/at91-kizboxmini-rd.dts new file mode 100644 index 000000000000..ab50f4d22387 --- /dev/null +++ b/arch/arm/boot/dts/at91-kizboxmini-rd.dts @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2015-2018 Overkiz SAS + * Author: Mickael Gardet + * Kévin Raymond + */ +/dts-v1/; +#include "at91-kizboxmini-common.dtsi" + +/ { + model = "Overkiz Kizbox Mini RailDIN"; + compatible = "overkiz,kizboxmini-rd", "atmel,at91sam9g25", + "atmel,at91sam9x5", "atmel,at91sam9"; + + clocks { + adc_op_clk { + status = "okay"; + }; + }; +}; + +&pinctrl { + adc0 { + pinctrl_adc0_ad5: adc0_ad5-0 { + /* pull-up disable */ + atmel,pins = ; + }; + }; +}; + +&usart0 { + status = "disabled"; +}; + +&rtc { + status = "okay"; +}; + +&led_blue { + status = "okay"; +}; + +&adc0 { + atmel,adc-vref = <2500>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_adc0_ad5>; + atmel,adc-channels-used = <0x0020>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/at91-smartkiz.dts b/arch/arm/boot/dts/at91-smartkiz.dts new file mode 100644 index 000000000000..2354385f9685 --- /dev/null +++ b/arch/arm/boot/dts/at91-smartkiz.dts @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2017-2018 Overkiz SAS + * Author: Mickael Gardet + * Kévin Raymond + * Dorian Rocipon + */ +/dts-v1/; +#include "at91-kizboxmini_common.dtsi" + +/ { + model = "Overkiz SmartKiz"; + compatible = "overkiz,smartkiz", "atmel,at91sam9g25", + "atmel,at91sam9x5", "atmel,at91sam9"; + + clocks { + adc_op_clk { + status = "okay"; + }; + }; + + aliases { + serial5 = &uart0; + }; + + pio_keys { + hk_reset { + label = "HK_RESET"; + gpios = <&pioC 13 GPIO_ACTIVE_HIGH>; + }; + + power_rf { + label = "POWER_RF"; + gpios = <&pioA 20 GPIO_ACTIVE_HIGH>; + }; + + power_wifi { + label = "POWER_WIFI"; + gpios = <&pioA 21 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&pinctrl { + i2c1 { + pinctrl_i2c1: i2c1-0 { + atmel,pins = + ; + }; + }; + + adc0 { + pinctrl_adc0_ad0: adc0_ad0-0 { + /* pull-up disable */ + atmel,pins = ; + }; + pinctrl_adc0_ad5: adc0_ad5-0 { + /* pull-up disable */ + atmel,pins = ; + }; + pinctrl_adc0_ad6: adc0_ad6-0 { + /* pull-up disable */ + atmel,pins = ; + }; + pinctrl_adc0_ad11: adc0_ad11-0 { + /* pull-up disable */ + atmel,pins = ; + }; + }; +}; + +&i2c1 { + dmas = <0>, <0>; + pinctrl-0 = <&pinctrl_i2c1>; + status = "disabled"; +}; + +&macb0 { + status = "disabled"; +}; + +&rtc { + status = "okay"; +}; + +&leds { + blue { + status = "okay"; + }; +}; + +&adc0 { + atmel,adc-vref = <2500>; + pinctrl-names = "default"; + pinctrl-0 = < + &pinctrl_adc0_ad0 + &pinctrl_adc0_ad5 + &pinctrl_adc0_ad6 + &pinctrl_adc0_ad11 + >; + atmel,adc-channels-used = <0x0861>; + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; +