From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02C95CA9ECB for ; Fri, 1 Nov 2019 03:01:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AAFB5208CB for ; Fri, 1 Nov 2019 03:01:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pQV46jPV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAFB5208CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csie.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fKoJseb2Af2Qc0nPAvjeSBkV5jxo9FL+4Kff9NMjEEM=; b=pQV46jPVttnEV8 Mj9gxqkjryTYxjIem7DbQpxrn2OgLrO3Und5L6dGqmxfYiNXYrWxFNQJ4Yf8mQdEutiVIf3jzhGWr O5zeio5CX5YvzRTd+Wdw37Yrf19j0Gy9YC4lIlRppsT0fZ8rFkm1zSOt4CDl3C/hGd7IBG7bAHCTV 3slSAT+xSAOAHsaH+yOdcgzokha7wvaJpowln8TPtoutIS5oLiyxJhGm0kiZBnZhneDJkoZWFMvdY I0IIRRspdcKQGQLmaHDE0oAV1yEj2mR7Izdx2Ly3Jcvz2FWeNlmrEaCEsHMgEbfo8/dUQiW1cK54m zCrZFzDVsAknpeptJpGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQNBh-0003hX-46; Fri, 01 Nov 2019 03:01:21 +0000 Received: from mail-ed1-f65.google.com ([209.85.208.65]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQNBc-0003gw-Qb for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2019 03:01:19 +0000 Received: by mail-ed1-f65.google.com with SMTP id a21so6498946edj.8 for ; Thu, 31 Oct 2019 20:01:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ja69r3scSsFa5ExNkwUmGih/B4M0amxDhxiXxuJHmpY=; b=ugERKHTWzmTKmKDSpqUkzxKLWCE0GHxwoPjM5zrRTbHp7WaIZ5+REXzOlsQzvnVQXQ dPRedCxSIMSfYcPuRGh1iGYRYDR9DuKhrQ823u9UGsY+VfzXcGeZNeywLVNQKQzFz2+k wStYzpH0sHEW3GhdVXb1Jr0FQv6YEO7MlgzPKicK0BkBPv0yK31pSa+2aLZnqv3C2bhE HA7VOVUTD4OSlyUt9R7QZyWxRcvcXiCHNxtQdJpBsDGcaBVQQIYMoVCFZZiaa4BeyO1r ublz3wdsyYPKn6Z3prYTU8ex6qx55I3ZmeyITkawaOpDGkzYzsrUBnTfu6LiLrLJvoam kijg== X-Gm-Message-State: APjAAAUBOewDp9DZLpNu5OdnWlPja/y5xLNKGYEmsxegFhqCOwivqvom l2lt7r9rba0aX3BOLmRJ9jojcnMRGE0= X-Google-Smtp-Source: APXvYqxU7pkLtRyNMAMOzpHC68NR514+2YOKdPkwlplMzigxs0/ub2Zi4phLeoNmzQhMx6Inrkh84Q== X-Received: by 2002:a50:cb8a:: with SMTP id k10mr6190747edi.21.1572577273986; Thu, 31 Oct 2019 20:01:13 -0700 (PDT) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com. [209.85.221.48]) by smtp.gmail.com with ESMTPSA id ay16sm152092edb.47.2019.10.31.20.01.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Oct 2019 20:01:13 -0700 (PDT) Received: by mail-wr1-f48.google.com with SMTP id p4so8344043wrm.8 for ; Thu, 31 Oct 2019 20:01:13 -0700 (PDT) X-Received: by 2002:a05:6000:1252:: with SMTP id j18mr8450718wrx.23.1572577273265; Thu, 31 Oct 2019 20:01:13 -0700 (PDT) MIME-Version: 1.0 References: <20191031231216.30903-2-karlp@tweak.net.au> In-Reply-To: <20191031231216.30903-2-karlp@tweak.net.au> From: Chen-Yu Tsai Date: Fri, 1 Nov 2019 11:01:01 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] ARM: dts: sun8i: add FriendlyARM NanoPi Duo2 To: Karl Palsson X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191031_200116_885492_0A8489F0 X-CRM114-Status: GOOD ( 24.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel , Maxime Ripard , linux-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 1, 2019 at 7:12 AM Karl Palsson wrote: > > 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>; Can you add the pin name as a comment after this, like you already have for most of the other gpios entries? > + linux,default-trigger = "heartbeat"; I'm not so found of this. Unless the LED actually says "heartbeat", I don't think we should force a default. > + }; > + > + pwr { > + label = "nanopi:red:pwr"; > + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; Here as well. > + 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 */ This regulator also uses a GPIO line for its enable pin. Please include that. > + enable-active-high; > + gpios-states = <0x1>; > + states = <1100000 0x0 > + 1300000 0x1>; > + }; Please also add the two other regulators, VDD-SYS and VCC-DRAM. > + > + 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"; > +}; Please have the nodes in alphabetic order, not group them by function. > + > +&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... Yes, this is the correct setup. The module is taking the clock from the X32KFOUT on the SoC. This is an external output from the RTC module. > + 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. I'm guessing all these comments are from your development cycle? Please remove them. > + shutdown-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */ > + }; > +}; The board also has SPI flash. Can you add that as well? Thanks ChenYu > -- > 2.20.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel