From patchwork Mon Mar 26 21:28:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 10308787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4813C60353 for ; Mon, 26 Mar 2018 21:29:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E90E298BC for ; Mon, 26 Mar 2018 21:29:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32FB1298BF; Mon, 26 Mar 2018 21:29:41 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 783F8298BC for ; Mon, 26 Mar 2018 21:29:40 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=XUe+YNKfmfPthMX1mdwEDrDlP31fzyEuLuvDy3qMEec=; b=Xs5lMDBmNmb4rDbSARqCpgJVRp g2kTPKJ4xVupOElTOM3Lwb+xlcN8Y94Xnwvr6YipKqFXyfncxmZuByLQvHicteHl9gQojx4Hxj1Fy TV7erbpnJbjfsW24zUR+ljYirSx58vduKpHNPRZCFppJvydQlXWkq+FtORCN1rqHXv6ZMEUcwoTpI ohqurD+gsyv4OA8j9KJQ14E9gD9HrYbUdBcBPBsv/pFFvKHEz7xUn9kBM0llKD6sJmjnECkmJZTK4 /iK8G4ncs6b4oRQ/fjlar10lu33aC4MnC9YdKoBZkpHJdw8+SZ/5t2kPzHUPQUClcEJnPAy8MVwor T+MNzRTw==; 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 1f0ZgN-0001Du-43; Mon, 26 Mar 2018 21:29:35 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0ZfZ-0000e4-3V for linux-arm-kernel@lists.infradead.org; Mon, 26 Mar 2018 21:28:48 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 579C520884; Mon, 26 Mar 2018 23:28:33 +0200 (CEST) Received: from xps13.event.rightround.com (unknown [91.224.148.103]) by mail.bootlin.com (Postfix) with ESMTPSA id A409D20893; Mon, 26 Mar 2018 23:28:22 +0200 (CEST) From: Miquel Raynal To: Maxime Ripard , Chen-Yu Tsai Subject: [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support Date: Mon, 26 Mar 2018 23:28:20 +0200 Message-Id: <20180326212820.20637-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180326212820.20637-1-miquel.raynal@bootlin.com> References: <20180326212820.20637-1-miquel.raynal@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180326_142845_459084_B50935AD X-CRM114-Status: GOOD ( 15.90 ) 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: Boris Brezillon , linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , Miquel Raynal MIME-Version: 1.0 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 Nintendo NES/SuperNES features an R16 already well supported in mainline. The console over UART0 may be wired on two ports of the R16, both available on the NES Classic PCB. Signed-off-by: Miquel Raynal --- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 + .../boot/dts/sun8i-r16-nintendo-nes-classic.dts | 62 ++++++++++++++++++++++ .../dts/sun8i-r16-nintendo-supernes-classic.dts | 17 ++++++ 4 files changed, 83 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index ade7a38543dc..cfdb48bd1a1d 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -990,6 +990,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-h3-orangepi-plus.dtb \ sun8i-h3-orangepi-plus2e.dtb \ sun8i-r16-bananapi-m2m.dtb \ + sun8i-r16-nintendo-nes-classic.dtb \ + sun8i-r16-nintendo-supernes-classic.dtb \ sun8i-r16-parrot.dtb \ sun8i-r40-bananapi-m2-ultra.dtb \ sun8i-v3s-licheepi-zero.dtb \ diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi index 0308e8b21ea5..c83919ab8542 100644 --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi @@ -198,6 +198,8 @@ clock-names = "ahb", "mod"; resets = <&ccu RST_BUS_NAND>; reset-names = "ahb"; + pinctrl-names = "default"; + pinctrl-0 = <&nand_pins &nand_pins_cs0 &nand_pins_rb0>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts new file mode 100644 index 000000000000..bc067befd2eb --- /dev/null +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: GPL-2.0 OR X11 +/* Copyright (c) 2016 FUKAUMI Naoki */ + +/dts-v1/; +#include "sun8i-a33.dtsi" +#include "sunxi-common-regulators.dtsi" + +/ { + model = "Nintendo NES Classic Edition"; + compatible = "nintendo,nes-classic", "allwinner,sun8i-a33"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&uart0 { + /* + * UART0 is available on two ports: PB and PF, both are accessible. + * PF can also be used for the SD card so PB is preferred. + */ + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&nfc { + status = "okay"; + + /* 2Gb Macronix MX30LF2G18AC (3V) */ + nand@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + allwinner,rb = <0>; + nand-ecc-mode = "hw"; + nand-ecc-strength = <16>; + nand-ecc-step-size = <1024>; + }; +}; + +&usb_otg { + status = "okay"; +}; + +&usbphy { + /* VBUS is always on because it is wired to the power supply */ + usb1_vbus-supply = <®_vcc5v0>; + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts new file mode 100644 index 000000000000..928f82dbe440 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0 OR X11 + +/dts-v1/; +#include "sun8i-r16-nintendo-nes-classic.dts" + +/ { + model = "Nintendo SuperNES Classic Edition"; + compatible = "nintendo,supernes-classic", "allwinner,sun8i-a33"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +};