Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp87641ybx; Thu, 31 Oct 2019 16:25:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8eORFBInkWVPa50nHw1zr72LL3/lV+2udZ+UELY72Q0Yk/IQ7CP4/AqDwluPWym/RVe7Y X-Received: by 2002:a17:906:1c97:: with SMTP id g23mr6937920ejh.66.1572564335663; Thu, 31 Oct 2019 16:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572564335; cv=none; d=google.com; s=arc-20160816; b=rw8B05/I1QrWGJG+VSVAWBoYubZYZeqv1flSCJ3avbPX8SUn35TiDNtB1BG1k9ddK3 /9HW7oeBi0oBFuR8tOYh2N+C7jmZV88hiUfvh6W/gD7BLru0OVHw3WKsjLDQGrZk1Vvq AUa8JeF83F9Pl0ibm6lqoDgdH4rORzw4EJu98jufev3qEWmDvb0f0X69GmM+GYIRquGT BKW7sC0xvHN14a11ukZhCuFetiv7aI0360hj4quLGTNVopKhZkqCDnjgpq48d6YNnSey UGWNLBBcnXZxO0LypcCyuE6kv+OajDOITth7/DRgad3Z9hCxdG5oLrcQrBAtDfJSf+KH 46LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6cHmy9FTusi+i4zZcAKJuCvwvQ4lwP2BxZIOlaaxhNs=; b=hSxjxirJwjaKDe7FoFnWEPpJTKFDoUneUxoynS+h0aOR4aDpjlHfx7ZDiBmtUNsbPt GhadbplLlFp8PNiXmoAEczq7Gy99gSCjBfx9WSi5NcMIUnXkz/QGe8CfvDCsAhg4KAvE bbladgY9zNsoCt9+5gIP0uSw6YujiPhF0vdw6pt0P3hH4Qh6bHoJgmQqLV1YH9wesaRA CYPiYfasdI/ypGgiDYjxo4W7g0pa6/EQv415whADgq/uCPG3ogvR4pUvEcpjWZ37Mk2G SFdj0XvseDifzE3NKkqBdTYmTQnhkHmL8TP1Si+PBFvkniRST17bqfPLdkkTRV+ZGWdC QRiQ== 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 q25si4713051ejb.340.2019.10.31.16.25.02; Thu, 31 Oct 2019 16:25:35 -0700 (PDT) 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 S1728884AbfJaXQg (ORCPT + 99 others); Thu, 31 Oct 2019 19:16:36 -0400 Received: from palmtree.beeroclock.net ([178.79.160.154]:43068 "EHLO palmtree.beeroclock.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726803AbfJaXQf (ORCPT ); Thu, 31 Oct 2019 19:16:35 -0400 Received: from beros.lan (89-160-129-47.du.xdsl.is [89.160.129.47]) by palmtree.beeroclock.net (Postfix) with ESMTPSA id 93A401F749; Thu, 31 Oct 2019 23:12:28 +0000 (UTC) From: Karl Palsson To: mripard@kernel.org, wens@csie.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Karl Palsson Subject: [PATCH 2/3] ARM: dts: sun8i: add FriendlyARM NanoPi Duo2 Date: Thu, 31 Oct 2019 23:12:15 +0000 Message-Id: <20191031231216.30903-2-karlp@tweak.net.au> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 | 161 +++++++++++++++++++++ 2 files changed, 162 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 9159fa2cea90..d8bf02abcda1 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1096,6 +1096,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..ecfaaa0ec73e --- /dev/null +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts @@ -0,0 +1,161 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2019 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"; + + 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 */ + clocks = <&rtc 1>; + clock-names = "ext_clock"; + }; + +}; + +&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"; +}; + +&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_pa_pins>; + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>, <&uart2_rts_cts_pins>; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + //clocks = <&osc32k 1>; + clocks = <&rtc 1>; // this is what bananapi-m2-zero does, and it has same schematic... + clock-names = "lpo"; + + // these are both fine.. + vbat-supply = <®_vcc3v3>; + vddio-supply = <®_vcc3v3>; + // on opi-win, device-wakup is pl6 is AP-WAKE-BT is module pin 6, bt-wake. + // YES; PA8 is correct. + device-wakeup-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ + + // on opi-win, hostwakeup (pl5) is bt-wake-ap is module pin 7, bt-host-wake + // YES; PA7 is correct + host-wakeup-gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */ + + // on opi-win, shutdown is pl4, is BT-RST-N is moduel pin 34 + // YES; PG13 is correct. + shutdown-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */ + }; +}; -- 2.20.1