From patchwork Sat Nov 7 08:14:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11888773 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 8FDD6697 for ; Sat, 7 Nov 2020 08:16:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 4DA6E205F4 for ; Sat, 7 Nov 2020 08:16:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bIcA6Ci9"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="V7ZtBhHf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DA6E205F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=b+oxxhlN0fDcqLAwbxANRui38IDogsUcSuIjZ3jq19M=; b=bIcA6Ci97oO/pMWxXfRbqQmcj 04C3/oP01D5ribmJ4KVmxwv1P3kZvS5OCcju+dFgpN8L0CxIhXU8x0//Jexo/sGSFJwHWvCDsRGYr nJER8iypa0lgSWMyPC3EwkQxk7pYfpeBc2+2StfKLCBrEVCMwkU5u9IYjwuoR04+kjWj2wfoYrfFh o9SxzUzpu5EQq620IYhEuwy2L9HQgo6cFPWn/2eIBX70sYt9QlFh4bBLyRUzb4LPZU23dFSrBIs8c 9pWU4SWvkW+wsYI+btqyCiSaJQ9y6GHcnQaY/jVdU9WhJTk1q11dAMJRKmcFbLQ4kxbHvQoTrtX7b F2q4ONcBA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbJO8-0001KV-8k; Sat, 07 Nov 2020 08:15:56 +0000 Received: from esa1.hgst.iphmx.com ([68.232.141.245]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbJNv-00019G-MN for linux-riscv@lists.infradead.org; Sat, 07 Nov 2020 08:15:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1604736943; x=1636272943; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mpZe81LRQ3UMdKf0/NVqeXymuUe5qfQYIBE6oymulrY=; b=V7ZtBhHfeYAHXnWb4lMNt+FiBuU3qnQ5pnXjiUwip1G5oCZ81xhp/tVq C1IsymXTFxjX57C+XrPpzqKwI2UBbcJWpu1R4cKooszca531jdXVIA/I7 43P0DJ1w+GxDulanGj1l582Wx2TSzp68gXjiPBsGSVIEOElLqwoAd3t+3 aXyjtmiKPn+zrXlI0EoNZQLxZtJM9zXn0e8TSJiNBFEKDpzEyroq+wLZA 42ysRvUeW2Vzhiigu7/WfiI0KU0Z3hy5sXuz1kMVY5zsqX2nrFMVe7Hkt PL2AoQv0bkekyNGXy31b+t3FLnXmsMV8oiNi/8+/l2VVqt+RmvA7o/tmn Q==; IronPort-SDR: fnVuriJt1MWtX+fYBKzCtaPeZCR+LSKHmxxd7NN87V+PXOkw2S4v1oz8NOu5L89iQ4B2Jn22Gs Byycg7RgcR/mUeQ4USAleaXlPXYIyAb66gW4m7fupziJ6WJqHr3jAON2jysxfNbqs5/TYPO+f3 0nhYq0k2hSTqwO33V5Y4R3HFpc54FahnbXufb8zOcVDUpIkYFs5JXDK7qnHcpxJIDOaP7iRgtq UUJeSf/StmxgX5eFKGvoEcqN4oavVt7SQ+1y5V+Hrfl99ycikKqKV20DtfEPOcrGP9MGTiTPdD d48= X-IronPort-AV: E=Sophos;i="5.77,459,1596470400"; d="scan'208";a="262079365" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 07 Nov 2020 16:15:43 +0800 IronPort-SDR: EWznIax22rQ9xcp7cHzmg/qRaxOBTgHFjDngo2Uu7bUTRyIuds40/X4Tsj347G8U+UEPwTMZIT Kvg80F46Yumohz/f6xUhOP/GCrMmPkdBvK+2pKkGRDuC+pQVSQ7hAB/Ga/TBxXcz29e7GnB7/Q GF3i+2H6oXMWSL3iSAHtygJD/gTU3nOTBvh9NmGCSvwZ3b7iW5zqOH6usGPcSCmhr7fUOzwIlH Q5IZq/XpgR2bNLZuml72SvbzWsyfGxRRybY2xcYdcd3CivVn8+iEsaI9OiH4rSzWj8ReAyOXd9 1BLHPTnBVvdt5peRhIY2AWwj Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2020 00:01:47 -0800 IronPort-SDR: 8bVSfo5HMd0qf0dwK5d4k2No6GNG/G+0XTossZQ1bZ2/g/jb4AIdK+c4/aNgFEpBv85e4HpS0v yMigZybGad6iqKmgtWPdYk+ygK7UPOD7ezWTLZOV/XewloNu+dWFl2lzzDbqP09lQC/Howd4Fy yrBCKAf5MgwwaDhwX2AhmtoTdz3TXHcsMHb3XOn0HWx+SnAh4oGTNRH+88eWpeXbq3D5isSADc cJKYh4FsNSi+UaBFfMwmlEGNEX/OL0kaZtZXsdwxcmulAfDOK9hFD0Rc6NyY/c+QSG6oUBpceD qh4= WDCIronportException: Internal Received: from hdrdzf2.ad.shared (HELO twashi.fujisawa.hgst.com) ([10.84.71.85]) by uls-op-cesaip01.wdc.com with ESMTP; 07 Nov 2020 00:15:41 -0800 From: Damien Le Moal To: Palmer Dabbelt , linux-riscv@lists.infradead.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Serge Semin , Mark Brown , linux-spi@vger.kernel.org, Stephen Boyd , linux-clk@vger.kernel.org, Linus Walleij , linux-gpio@vger.kernel.org, Philipp Zabel Subject: [PATCH 30/32] riscv: Add SiPeed MAIXDUINO board device tree Date: Sat, 7 Nov 2020 17:14:18 +0900 Message-Id: <20201107081420.60325-31-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201107081420.60325-1-damien.lemoal@wdc.com> References: <20201107081420.60325-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201107_031544_038035_0648A0D8 X-CRM114-Status: GOOD ( 14.69 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [68.232.141.245 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Anderson Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org Add a device tree for the SiPeed MAIXDUINO board. This device tree enables LEDs and spi/mmc SD card device. Additionally, gpios and i2c are also enabled and mapped to the board header pins as indicated on the board itself. Signed-off-by: Damien Le Moal Reviewed-by: Sean Anderson --- .../boot/dts/kendryte/k210_maixduino.dts | 203 ++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 arch/riscv/boot/dts/kendryte/k210_maixduino.dts diff --git a/arch/riscv/boot/dts/kendryte/k210_maixduino.dts b/arch/riscv/boot/dts/kendryte/k210_maixduino.dts new file mode 100644 index 000000000000..78a37cf9df97 --- /dev/null +++ b/arch/riscv/boot/dts/kendryte/k210_maixduino.dts @@ -0,0 +1,203 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019-20 Sean Anderson + * Copyright (C) 2020 Western Digital Corporation or its affiliates. + */ + +/dts-v1/; + +#include "k210.dtsi" + +#include +#include + +/ { + model = "SiPeed MAIXDUINO"; + compatible = "sipeed,maixduino", "kendryte,k210"; + + chosen { + bootargs = "earlycon console=ttySIF0"; + stdout-path = "serial0:115200n8"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + boot { + label = "BOOT"; + linux,code = ; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + }; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + status = "disabled"; + + simple-audio-card,cpu { + sound-dai = <&i2s0 0>; + }; + + simple-audio-card,codec { + sound-dai = <&mic>; + }; + }; + + mic: mic { + #sound-dai-cells = <0>; + compatible = "memsensing,msm261s4030h0"; + status = "disabled"; + }; +}; + +&fpioa { + status = "okay"; + + fpioa_uarths: uarths { + pinmux = , /* Header "0" */ + ; /* Header "1" */ + }; + + fpioa_gpio: gpio { + pinmux = , + ; + }; + + fpioa_gpiohs: gpiohs { + pinmux = , /* BOOT */ + , + , /* Header "2" */ + , /* Header "3" */ + , /* Header "4" */ + , /* Header "5" */ + , /* Header "6" */ + , /* Header "7" */ + , /* Header "8" */ + , /* Header "9" */ + , /* Header "10" */ + , /* Header "11" */ + , /* Header "12" */ + , /* Header "13" */ + ; + }; + + fpioa_i2s0: i2s0 { + pinmux = , + , + ; + }; + + fpioa_spi1: spi1 { + pinmux = , + , + , + ; /* cs */ + }; + + fpioa_i2c1: i2c1 { + pinmux = , /* Header "scl" */ + ; /* Header "sda" */ + }; + + fpioa_i2s1: i2s1 { + pinmux = , + , + ; + }; + + fpioa_spi0: spi0 { + pinmux = , /* cs */ + , /* rst */ + , /* dc */ + ; /* wr */ + }; + + fpioa_dvp: dvp { + pinmux = , + , + , + , + , + , + , + ; + }; +}; + +&uarths0 { + pinctrl-0 = <&fpioa_uarths>; + pinctrl-names = "default"; + status = "okay"; +}; + +&gpio0 { + pinctrl-0 = <&fpioa_gpiohs>; + pinctrl-names = "default"; + status = "okay"; +}; + +&gpio1 { + pinctrl-0 = <&fpioa_gpio>; + pinctrl-names = "default"; + status = "okay"; +}; + +&i2s0 { + #sound-dai-cells = <1>; + pinctrl-0 = <&fpioa_i2s0>; + pinctrl-names = "default"; +}; + +&i2c1 { + pinctrl-0 = <&fpioa_i2c1>; + pinctrl-names = "default"; + clock-frequency = <400000>; + status = "okay"; +}; + +&dvp0 { + pinctrl-0 = <&fpioa_dvp>; + pinctrl-names = "default"; +}; + +&spi0 { + pinctrl-0 = <&fpioa_spi0>; + pinctrl-names = "default"; + num-cs = <1>; + cs-gpios = <&gpio0 20 0>; + + panel@0 { + compatible = "sitronix,st7789v"; + reg = <0>; + reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; + dc-gpios = <&gpio0 22 0>; + spi-max-frequency = <15000000>; + }; +}; + +&spi1 { + pinctrl-0 = <&fpioa_spi1>; + pinctrl-names = "default"; + num-cs = <1>; + polling; + status = "okay"; + + slot@0 { + compatible = "mmc-spi-slot"; + reg = <0>; + voltage-ranges = <3300 3300>; + spi-max-frequency = <4000000>; + broken-cd; + }; +}; + +&spi3 { + spi-flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + broken-flash-reset; + }; +};