Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4367991imu; Tue, 18 Dec 2018 13:36:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/XDK43ZEhUFOvPISP2PPOI/yGfhrKcn9r+F0CkJzVPUcm1WchJ6OEVTZO7rpFqliWlvJ1As X-Received: by 2002:a62:5c1:: with SMTP id 184mr17972728pff.165.1545168988349; Tue, 18 Dec 2018 13:36:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545168988; cv=none; d=google.com; s=arc-20160816; b=hVUMEPqaGgbov26R/C3DGpCC9gPTEC9dnLT1GRy8VG9wrPklqn3ZKbTVPBjDiVbsOZ 3a8RW6BhU/1dPdTp1np9tdPZ0a9yqc7/YdN/oRLiaEhQCjIZlOeC5QE2SIMvWB4Jxaok yE215bOF6GsMSOVVjC117SPxcuH+nziONO97NNwzGXiEu8GetdxByF17W2IMCon20A/d TOxymdc0BQxBO17K8KbK8IJtTNwTb8h8VkDWwjVSuQB/S0ZjgZtUbIsHhXbjwONf7YCC AwVnKSP4OQdwR8wFcwfe8mQYahEMiVSyjhO/AwbzT6VwQsHx9CsSw4+3pAvG1eqBpMQO XdmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=AsoQWV7VN+s0zdx8g3UD/Rc590IXtqIbrbZt/DQHomY=; b=vsSA8agXWzJfEA8C8BfM0ZZqMZ5gjDn99G5juhQvyHHSdAWgSmStRCFI6Tz0m67S7z EnJcb2lgUyV33Num2fNgkkfbeUp+VmKqe8Rq5X9IhdavvhlZgYrYjlE1vZUpoH2qysbV 5p3Dk+EgMQ5h6idJKK3l7A3V29Z+il+KkV70WKKimAAFx/F1DaIRSC7y0QG3Ew76VeGy orHYEy88gzM6Z9Axnm6CWMsh8Q2JdRa8OVDKL2EPvyiKntSgAE4xRqYv/KsyhiKu6X6I kSX7Si3sX5SXcQlEBrdXpDzW12PQjktpm1JpERcjoTkYH8Wh/tbJcZA9pMfvxpLKCAs5 Vvbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15si13991199plq.24.2018.12.18.13.36.12; Tue, 18 Dec 2018 13:36:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727294AbeLRVfL (ORCPT + 99 others); Tue, 18 Dec 2018 16:35:11 -0500 Received: from palmtree.beeroclock.net ([178.79.160.154]:55372 "EHLO palmtree.beeroclock.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbeLRVfI (ORCPT ); Tue, 18 Dec 2018 16:35:08 -0500 Received: from beros.lan (89-160-129-47.du.xdsl.is [89.160.129.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: karlp) by palmtree.beeroclock.net (Postfix) with ESMTPSA id 0BBAC10284; Tue, 18 Dec 2018 21:27:00 +0000 (UTC) From: Karl Palsson To: robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Karl Palsson Subject: [PATCH 2/3] ARM: dts: sun8i: add FriendlyARM NanoPi Duo2 Date: Tue, 18 Dec 2018 21:24:56 +0000 Message-Id: <20181218212457.30382-2-karlp@tweak.net.au> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20181218212457.30382-1-karlp@tweak.net.au> References: <20181218212457.30382-1-karlp@tweak.net.au> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an Allwinner H3 based board, with 512MB ram, a USB OTG port, microsd slot, an onboard AP6212A wifi/bluetooth module, and a CSI connector. Full details and schematic available from vendor: http://wiki.friendlyarm.com/wiki/index.php/NanoPi_Duo2 Signed-off-by: Karl Palsson --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 148 +++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 78551c4375d5..7f296bfea94a 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1063,6 +1063,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-h3-beelink-x2.dtb \ sun8i-h3-libretech-all-h3-cc.dtb \ sun8i-h3-mapleboard-mp130.dtb \ + sun8i-h3-nanopi-duo2.dtb \ sun8i-h3-nanopi-m1.dtb \ sun8i-h3-nanopi-m1-plus.dtb \ sun8i-h3-nanopi-neo.dtb \ diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts new file mode 100644 index 000000000000..07d2f1bebd56 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2018 Karl Palsson + */ + +/dts-v1/; +#include "sun8i-h3.dtsi" +#include "sunxi-common-regulators.dtsi" + +#include +#include + +/ { + model = "FriendlyARM NanoPi Duo2"; + compatible = "friendlyarm,nanopi-duo2", "allwinner,sun8i-h3"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + status { + label = "nanopi:green:status"; + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + + pwr { + label = "nanopi:red:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + }; + + r_gpio_keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&sw_r_npi>; + + k1 { + label = "k1"; + linux,code = ; + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; + }; + }; + + reg_vdd_cpux: vdd-cpux-regulator { + compatible = "regulator-gpio"; + regulator-name = "vdd-cpux"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <50>; /* 4ms */ + + gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ + enable-active-high; + gpios-states = <0x1>; + states = <1100000 0x0 + 1300000 0x1>; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ + }; + +}; + +&cpu0 { + cpu-supply = <®_vdd_cpux>; +}; + +&usb_otg { + status = "okay"; + dr_mode = "otg"; +}; + +&ehci0 { + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +®_usb0_vbus { + gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ + status = "okay"; +}; + +&r_pio { + sw_r_npi: key_pins { + pins = "PL3"; + function = "gpio_in"; + }; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ + usb0_vbus-supply = <®_usb0_vbus>; + status = "okay"; +}; + +&mmc0 { + bus-width = <4>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; + status = "okay"; + vmmc-supply = <®_vcc3v3>; +}; + +&mmc1 { + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + sdio_wifi: sdio_wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&pio>; + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ + interrupt-names = "host-wake"; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>, <&uart2_rts_cts_pins>; + uart-has-rtscts; + status = "okay"; + + /* bluetooth goes here */ +}; -- 2.14.5