From patchwork Tue Mar 19 15:24:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 10859835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F40A117E9 for ; Tue, 19 Mar 2019 15:38:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D92952976E for ; Tue, 19 Mar 2019 15:38:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD4AA29751; Tue, 19 Mar 2019 15:38:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1C27D292F5 for ; Tue, 19 Mar 2019 15:38:16 +0000 (UTC) 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=DeAig1arzUdalAZ44Cn0EbLu9YGhgqwo86JuuSTrmDw=; b=VevZH3dnFTS96d ElJLPeC7MLDlpRvw1nZV4yavQmDvdLareOVKMp5vtFvHqzEeys0RxxGRXhseq/+nJBBagD8AyqOw9 J17h5vyrfGV8oxFcBqby/X3+DE5qpK0JNwOfwfOW7hFKL1AuXIH9RMluRZXun8lUuey6RHRL74mHF tD8oSvSUswJidwFfAjLU3LF+GvbI+eAx3jwntaIk3AuMfHYYZ4+FPB+OEHosq2KAeNim8bnZtJknC UB/o6zmHR/AwRNXiTNLONsdsxP+0c/XQTIj/HD5C2K1d9yqeeG9lH9n+taU8kwzOuDOrGNRdyraWX Zc+QZPuAj3cpKLpM8+vA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6Goi-00011L-6p; Tue, 19 Mar 2019 15:38:16 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6Gbp-0001TN-EE for linux-arm-kernel@lists.infradead.org; Tue, 19 Mar 2019 15:25:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1553009082; bh=iy1HeJKrBaK5knQav7qNjyQVAG7l2LLwYy4SPtwYkZA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=PJ/tDqaqg7vO1Obz1CRycZVjfZrGOTnmw/jstN2JW8+dq337RxC81GvbHhzzGDSHr Ekmd8vSkqZmXGnXpzl7/jg4qacmhbuGFbNA8IGUizEdO+J54Md9/ZjPv81YSjn4Tc7 jompOjGZc5LKgqOBjR6TWd1FnFsr34a6fJRC8aAQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([109.90.232.48]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MWgND-1hUqx83GQ7-00XpmJ; Tue, 19 Mar 2019 16:24:41 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/5] ARM: dts: imx50: Add Kobo Aura DTS Date: Tue, 19 Mar 2019 16:24:17 +0100 Message-Id: <20190319152421.16179-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190319152421.16179-1-j.neuschaefer@gmx.net> References: <20190319152421.16179-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:aRAOxBpX4NqXsUQHHtCHrY9uf58GecUbuCxTzlaAExPLIliXwxH oVm6xtva/K5SqrylhBSs6+aRtNbJtc/IVjIqHUfa56BoMOUggRK6zup7glWsdlTCbap/63d 4e+FmCoMw1FDt/r/3fnrq1Vo0bPRJnAt2JhnbvQMr78KzouusSrLLZ+tWh47tu4WAUT1UzA V/D1vICe4lEATpQx64skg== X-UI-Out-Filterresults: notjunk:1;V03:K0:qgFm2pe7RH0=:LokpW1+CHU0j6DFPqwFfYD ruFOMz5H6lf/KUfuUlysNPCFlj1K684oQIDPLU5YMZahAcF96NghFi5QbMJnxve4gNxxlo3Ij +SGtVcv2TwAPmVr2ycld5n+qNDHrqKo88zrsE0e66KNdkHWVuHytYkwGxmSZwPlvoTMlgkfKX LTFjhgB7IUZVw5cL581RaereuOtHBB4obKjH0zZh1cc0mX3dyd8FUkW8bdyl6VKLFK/IdHjM+ TnBjkbL53Oe4rf0f5galtfaJa3e6Pfiw7GCZABSLg1zesz+PuJ7Dsn+qsgN+QLX5C6Ml7oHUw RMPoPSOSUN5XfnKdOLH//XXlK1JoBZJYaU/rcK/QMQkRwiGzmsKT+7jRVjIiXyXtmM4do0wi0 Lm+W6uaEn2QgFIIaOzZ1gpBHc6S/OXiWMlrgGmo7Igjggl4jtyhBMnnlXiUJCc8iPRydpVagH sbKyoQhks9iGqqkUBcCrrKx1XcJrBxrtWK8HH94G1qSuIPDTuS0xbvPoHFDYERxz3IDwix7cw 4xIK+4oxW9SChUW0ek5sKa7yYctQ5PqAC/Y5cvJbDTU8QMGY1J0mp8mBbqtjSSTPrYmrGIs3i CsEiqd7ADBSkQigT8ti/XNdZe22KJFuzDp9DrGtwuAXBRfukPy5+lc3xyw0/N2Iw/7vNgEExJ O06+iLFyX0RO9/pjqAr52FQbkq7JXbfTZ7wFVMmWyts83Hs2dG6V/3MFlBDL0ve2U92DomPLt +DtqEHXFQ9GQFsfEQ1pVAEE52fY+H7DlPj7HPF4lboq3Gem2oKrjeeQuscyCO4qb8StHHYh5g xApf9c1FZx9Ab1I4Vvw9OBidf5eEzOV+ZVT4cZAhgKjZ8q7B7spvs5aIQxe8vrF3rN0rimCl3 rTAFl2Qa0JYQV4v8AUO5iQaO5xnJ+6WHNPpA5Z/H3PwT8nUcFJysFZapr9lynOvc4EmzAIBlK nYGHaMQwJnA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190319_082458_457488_AA2C5B7C X-CRM114-Status: GOOD ( 15.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Heiko Stuebner , Martin Blumenstingl , Shawn Guo , Sascha Hauer , Johan Hovold , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Manivannan Sadhasivam , =?utf-8?q?Jonatha?= =?utf-8?q?n_Neusch=C3=A4fer?= , Thierry Reding , Fabio Estevam , Kevin Hilman , Jagan Teki 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 Kobo Aura is an e-book reader released in 2013. With the devicetree in its current state, the kernel will boot and run for about ten seconds. To solve this, the embedded controller needs to be told that the system should stay powered on. This will be done in a later patchset. - The IOMUXC mode bits for the SD interfaces were taken from the vendor's U-Boot fork. - The bus width of the eMMC is 4 bits in the vendor kernel, but I achieved better performance with 8 bits. - The SDIO clock frequency for the WiFi chip is 25MHz in the vendor kernel, but the WiFi chip (BCM43362) supports 50MHz, which works reliably on this board and gives slightly better performance. - The I2C pins' IOMUXC settings come from the vendor's U-Boot fork. Signed-off-by: Jonathan Neuschäfer --- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/imx50-kobo-aura.dts | 245 ++++++++++++++++++++++++++ 2 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/imx50-kobo-aura.dts -- 2.20.1 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index f4f5aeaf3298..0c85156c552b 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -363,7 +363,8 @@ dtb-$(CONFIG_SOC_IMX35) += \ imx35-eukrea-mbimxsd35-baseboard.dtb \ imx35-pdk.dtb dtb-$(CONFIG_SOC_IMX50) += \ - imx50-evk.dtb + imx50-evk.dtb \ + imx50-kobo-aura.dtb dtb-$(CONFIG_SOC_IMX51) += \ imx51-apf51.dtb \ imx51-apf51dev.dtb \ diff --git a/arch/arm/boot/dts/imx50-kobo-aura.dts b/arch/arm/boot/dts/imx50-kobo-aura.dts new file mode 100644 index 000000000000..e778a677c752 --- /dev/null +++ b/arch/arm/boot/dts/imx50-kobo-aura.dts @@ -0,0 +1,245 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright 2019 Jonathan Neuschäfer +// +// The Kobo Aura e-book reader, model N514. The mainboard is marked as E606F0B. + +/dts-v1/; +#include "imx50.dtsi" +#include + +/ { + model = "Kobo Aura (N514)"; + compatible = "kobo,aura", "fsl,imx50"; + + chosen { + stdout-path = "serial1:115200n8"; + }; + + memory@70000000 { + device_type = "memory"; + reg = <0x70000000 0x10000000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds>; + + on { + label = "kobo_aura:orange:on"; + gpios = <&gpio6 24 GPIO_ACTIVE_LOW>; + panic-indicator; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpiokeys>; + + power { + label = "Power Button"; + gpios = <&gpio4 10 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + hallsensor { + label = "Hallsensor"; + gpios = <&gpio5 15 GPIO_ACTIVE_LOW>; + linux,code = <0>; + linux,input-type = <5>; + }; + + frontlight { + label = "Frontlight"; + gpios = <&gpio4 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + sd2_pwrseq: pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sd2_reset>; + + reset-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; + }; + + sd2_vmmc: gpio-regulator { + compatible = "regulator-gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sd2_vmmc>; + + regulator-name = "vmmc"; + states = <3300000 0>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-gpio = <&gpio4 12 GPIO_ACTIVE_LOW>; + startup-delay-us = <100000>; + }; +}; + +&iomuxc { + pinctrl_uart2: uart2 { + fsl,pins = < + MX50_PAD_UART2_TXD__UART2_TXD_MUX 0x1e4 + MX50_PAD_UART2_RXD__UART2_RXD_MUX 0x1e4 + >; + }; + + pinctrl_i2c1: i2c1 { + fsl,pins = < + MX50_PAD_I2C1_SCL__I2C1_SCL 0x400001fd + MX50_PAD_I2C1_SDA__I2C1_SDA 0x400001fd + >; + }; + + pinctrl_i2c2: i2c2 { + fsl,pins = < + MX50_PAD_I2C2_SCL__I2C2_SCL 0x400001fd + MX50_PAD_I2C2_SDA__I2C2_SDA 0x400001fd + >; + }; + + pinctrl_i2c3: i2c3 { + fsl,pins = < + MX50_PAD_I2C3_SCL__I2C3_SCL 0x400001fd + MX50_PAD_I2C3_SDA__I2C3_SDA 0x400001fd + >; + }; + + pinctrl_leds: leds { + fsl,pins = < + MX50_PAD_PWM1__GPIO6_24 0x0 + >; + }; + + pinctrl_gpiokeys: gpiokeys { + fsl,pins = < + MX50_PAD_CSPI_MISO__GPIO4_10 0x0 + MX50_PAD_SD2_D7__GPIO5_15 0x0 + MX50_PAD_KEY_ROW0__GPIO4_1 0x0 + >; + }; + + pinctrl_sd1: sd1 { + fsl,pins = < + MX50_PAD_SD1_CMD__ESDHC1_CMD 0x1e4 + MX50_PAD_SD1_CLK__ESDHC1_CLK 0xd4 + MX50_PAD_SD1_D0__ESDHC1_DAT0 0x1d4 + MX50_PAD_SD1_D1__ESDHC1_DAT1 0x1d4 + MX50_PAD_SD1_D2__ESDHC1_DAT2 0x1d4 + MX50_PAD_SD1_D3__ESDHC1_DAT3 0x1d4 + + MX50_PAD_SD2_CD__GPIO5_17 0x0 + >; + }; + + pinctrl_sd2: sd2 { + fsl,pins = < + MX50_PAD_SD2_CMD__ESDHC2_CMD 0x1e4 + MX50_PAD_SD2_CLK__ESDHC2_CLK 0xd4 + MX50_PAD_SD2_D0__ESDHC2_DAT0 0x1d4 + MX50_PAD_SD2_D1__ESDHC2_DAT1 0x1d4 + MX50_PAD_SD2_D2__ESDHC2_DAT2 0x1d4 + MX50_PAD_SD2_D3__ESDHC2_DAT3 0x1d4 + >; + }; + + pinctrl_sd2_reset: sd2-reset { + fsl,pins = < + MX50_PAD_ECSPI2_MOSI__GPIO4_17 0x0 + >; + }; + + pinctrl_sd2_vmmc: sd2-vmmc { + fsl,pins = < + MX50_PAD_ECSPI1_SCLK__GPIO4_12 0x0 + >; + }; + + pinctrl_sd3: sd3 { + fsl,pins = < + MX50_PAD_SD3_CMD__ESDHC3_CMD 0x1e4 + MX50_PAD_SD3_CLK__ESDHC3_CLK 0xd4 + MX50_PAD_SD3_D0__ESDHC3_DAT0 0x1d4 + MX50_PAD_SD3_D1__ESDHC3_DAT1 0x1d4 + MX50_PAD_SD3_D2__ESDHC3_DAT2 0x1d4 + MX50_PAD_SD3_D3__ESDHC3_DAT3 0x1d4 + MX50_PAD_SD3_D4__ESDHC3_DAT4 0x1d4 + MX50_PAD_SD3_D5__ESDHC3_DAT5 0x1d4 + MX50_PAD_SD3_D6__ESDHC3_DAT6 0x1d4 + MX50_PAD_SD3_D7__ESDHC3_DAT7 0x1d4 + >; + }; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2>; + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1>; + status = "okay"; + + /* TODO: ektf2132 touch controller at 0x15 */ +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; + status = "okay"; + + /* TODO: TPS65185 PMIC for E Ink at 0x68 */ +}; + +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3>; + status = "okay"; + + /* TODO: embedded controller at 0x43 */ +}; + +&esdhc1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sd1>; + + max-frequency = <50000000>; + bus-width = <4>; + cd-gpios = <&gpio5 17 GPIO_ACTIVE_LOW>; + disable-wp; + + /* External µSD card */ +}; + +&esdhc2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sd2>; + + bus-width = <4>; + max-frequency = <50000000>; + disable-wp; + mmc-pwrseq = <&sd2_pwrseq>; + vmmc-supply = <&sd2_vmmc>; + + /* CyberTan WC121 SDIO WiFi (BCM43362) */ +}; + +&esdhc3 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sd3>; + + bus-width = <8>; + non-removable; + max-frequency = <50000000>; + disable-wp; + + /* Internal eMMC */ +};