From patchwork Sat Nov 7 08:14:19 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: 11888767 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 7C51D921 for ; Sat, 7 Nov 2020 08:16:00 +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 4B4DC20704 for ; Sat, 7 Nov 2020 08:16:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RA9EXxmj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="lRW40JLk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B4DC20704 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=G5uzTiZMUNOtiYwDma6VT+SAk4+v78DW5w7tZ7vq7yU=; b=RA9EXxmjnvBDcC7aqXTossq88 6LFpo0vsZHF9pA+KiZOKPYGlxXsY5CdUchQWAagASEzMtH4VRE02X1d+Kg1KckduJ0qlZtfceRKNe iC7LSaDes5iJdarI1IDQLfJ4/EUefXhxnTPAGJP1PNRZ6iTTQBfl9UF6/PhCAXdUL9b+jrOYvDbZr x2c+L8un6SUEvrimG4ptUgfN0vykYRBMz+dIJK4bO9+gfIcUWZzybnCOWyL1djDh83onlEdgdXl2y 9jpj/pFyQTdg0deO6dQMWBWVY7Wt3igVNgdrI1xmh0CQLSDspBRfGqkKJhzUMBc2LVTU0tk5TOwt2 0v3TS6CLA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbJOA-0001Lq-3h; Sat, 07 Nov 2020 08:15:58 +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 1kbJNy-0001Cy-IY for linux-riscv@lists.infradead.org; Sat, 07 Nov 2020 08:15:47 +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=1604736946; x=1636272946; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GmhwMX9pbWxmfz+QRdKTLzObv1YycYb4GELhGYcECjA=; b=lRW40JLkI37mqEU499+W7WfO7RFgbotHLVWl5NADOhPgwRzC4oUVBJIS LQ0W9tuz/fr0vEB5EVzur7dtHxgMgiJFRfOz+wh8c7YwIgM/pP/Ovsn+X AIM9YJm0R63/gMMlVVYVDq5jxCZAMUaBiO6aFXHiacPsVtaZWJpnymCyD NbVnE/C2+FMZR6txRLVdYdXkiRj/eDASqkKRjgJEmoovSSrxzsTCb1YYU 9+nQcDa/YimgJLa/0SfD/xNtLuHVxeqr6ZhfFou2paqsvCNb58WzT1Dmm YMWetq/SilL/Jr/UcJ7PhScbtUXgCVGWHXYwNEGA8/Et4B0RZroX+Dx3B g==; IronPort-SDR: HGavTlFB4+Oum9vNaNU5tIxvw+4dO3JhcQ7ntoDrkeJqmWxJcxZSzx7Xd3ZCyg6Ksvk03Zo3Gx pcd5Uxgwso4cIEAvA8jKEN53RQlaYDYXB+6x6m99bMw8D+xC6lK8HSSBtaGWmaHt/g/hIMs/ZB IZUZBEcUQylK4qFNaydXe4KML4Jw6uMbPXPfIzPQ2YseW5j/MwSWbUzM5zssQPPEQIaTx4YV27 zZz29OUa9USIi8QHV2Ns6Fjg9vCM0cJrTjwz1nCwFrJriaWbkC4TXtqoGCWq0BAJ9RZAxT0ki+ 3c0= X-IronPort-AV: E=Sophos;i="5.77,459,1596470400"; d="scan'208";a="262079368" 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:45 +0800 IronPort-SDR: Nlq/G0WerE8TW96Wv6X6Xt4VOcK7qhQAUBUvouF4XEQR+GSXzPu3iCIm4Q9itw8UhyYJJj+w1B hjAAzHoF8onW7MGPHPGMqumnY8Xd+r0GvC+rhmRhKaZvpMZVAkb5vWtGkxuYZOkrshP0fAf6gA fCu0urnV5QpWGB0JEVFEW30fffQWwi5eg6OUslX+e+MaZOp5+NWZSwKndX6akrmWIHkuWPWjLJ 8sfj7ot7BI+z3oeEeScFVw8UbQzrnMWZXsK0LHihRnGAtGlssTSPM8UkymnEg3OtHIf2IcWvNQ q7cecJmytqCBNwnELPst1P3G 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:50 -0800 IronPort-SDR: xCg9hHScmcPMA7NrAzIOkRS1P0z5qRbJmWI70ya+rahrx3zb4jN2f3iPZh5CfHQF/8DP8yHJLL d46dF2QbfVTcuFr+1osT9UEquiqjtVzaPTWRssWDn8R1i5h8Sl1gGaijKF4zPIgh6ZooP5VwAU v2G7Ka+DHfnDDZzn/8q1RrY98li5TRVgLfWWBBFWXaboiLozCGil5d8zJRvPvma88LytSa4MR8 rjxx32RTlLd/LBco2Kjdleg8CZPaTR9MW75R5KAZG5xyYBhQmITQsGtO0gH5yUzim/8iuAUvNS 2Jk= 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:43 -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 31/32] riscv: Add Kendryte KD233 board device tree Date: Sat, 7 Nov 2020 17:14:19 +0900 Message-Id: <20201107081420.60325-32-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_031546_814998_2A8D8C0D X-CRM114-Status: GOOD ( 14.17 ) 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 Kendryte KD233 board (K210 test board). This device tree enables LEDs, some gpios and spi/mmc SD card device. The WS2812B RGB LED and the 10 position rotary dip switch present on the board are left undefined. Signed-off-by: Damien Le Moal --- arch/riscv/boot/dts/kendryte/k210_kd233.dts | 177 ++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 arch/riscv/boot/dts/kendryte/k210_kd233.dts diff --git a/arch/riscv/boot/dts/kendryte/k210_kd233.dts b/arch/riscv/boot/dts/kendryte/k210_kd233.dts new file mode 100644 index 000000000000..b4e721a31000 --- /dev/null +++ b/arch/riscv/boot/dts/kendryte/k210_kd233.dts @@ -0,0 +1,177 @@ +// 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 = "Kendryte KD233"; + compatible = "kendryte,kd233", "kendryte,k210"; + + chosen { + bootargs = "earlycon console=ttySIF0"; + stdout-path = "serial0:115200n8"; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led0 { + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + }; + + led1 { + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + key0 { + label = "KEY0"; + linux,code = ; + gpios = <&gpio0 10 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 { + pinctrl-0 = <&fpioa_jtag>; + pinctrl-names = "default"; + status = "okay"; + + fpioa_jtag: jtag { + pinmux = , + , + , + ; + }; + + fpioa_uarths: uarths { + pinmux = , + ; + }; + + fpioa_spi0: spi0 { + pinmux = , /* cs */ + , /* wr */ + ; /* dc */ + }; + + fpioa_dvp: dvp { + pinmux = , + , + , + , + , + , + , + ; + }; + + fpioa_gpiohs: gpiohs { + pinmux = , + , /* Rot. dip sw line 8 */ + , /* Rot. dip sw line 4 */ + , /* Rot. dip sw line 2 */ + , /* Rot. dip sw line 1 */ + , + , + ; + }; + + fpioa_spi1: spi1 { + pinmux = , + , + , + ; /* cs */ + }; + + fpioa_i2s0: i2s0 { + pinmux = , + , + ; + }; +}; + +&uarths0 { + pinctrl-0 = <&fpioa_uarths>; + pinctrl-names = "default"; + status = "okay"; +}; + +&gpio0 { + pinctrl-0 = <&fpioa_gpiohs>; + pinctrl-names = "default"; + status = "okay"; +}; + +&i2s0 { + #sound-dai-cells = <1>; + pinctrl-0 = <&fpioa_i2s0>; + pinctrl-names = "default"; +}; + +&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 = "ilitek,ili9341"; + reg = <0>; + dc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; + spi-max-frequency = <15000000>; + status = "disabled"; + }; +}; + +&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; + }; +};