From patchwork Thu May 24 04:38:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 136698 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1719221lji; Wed, 23 May 2018 21:40:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo7I40IpgnmRNCDfwlj4xnJ1jIv0LxL9YO0fYImNGp0/R+594rEw3eLEU1zJ6WpCi3jDBuL X-Received: by 2002:a50:b4e1:: with SMTP id x30-v6mr9951472edd.155.1527136840521; Wed, 23 May 2018 21:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527136840; cv=none; d=google.com; s=arc-20160816; b=emKPv9+Z7CGZHXxy6vUYwrSJHyshOwmNgZ+wuHhx41ZsQcZhOJ/h4wTtRowqlBp3D3 e0BQmOeZ1UdWLdTK3CFt/Dg7qydWrEZ6w0tYIY4tf0PF0HyT34fnX7PG9JwjqtJmUCUy Uco7tCmoPTNIZbkBpEJh8NAqw93nkQXe6ihCdLX7RqZLYvRKc9gy52Ge/0R1iBYKMvBP niMqf7ZAZyj35Wrv9ndft++ZShGCbWqOMy6eaaYmXFjxMrJ4l3QZBRuKn42o3m/As67M rikR6NDzFF4F8e9yquRKpxy8Rva1kBCL0hOmvYgAnynSb/9uE2FieA/qksHdampaO0E3 P1VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=CqAsRHviF9zX0IzrOxeGNwdSzgZeVhii2gp8OwqgDqE=; b=KJH/E2GoE+ILI36Bj0viB3GyWcqLcY68AoOO4Gail+4aDSztONuTONxbdM3NJaLUu/ pv/yQPkjVAI8GXz6TudNcltbeDpB42p81gSw4P9xHyG4tBG8zJn+sT17uAnmHsIoX2/2 MroNO08D/zKwTkJ/H3P4PvJbbG8xXsGr369OcHZMkhbnu3V692mTLIwNiBWTx4U+sdrh q47Spbp5TiJzkG8TPc2rumLpAaUWG3UQs9z4lf6H0qKJOAwciSf65yilJPyh1pHxAFeb JUBijVyJnmKIvxtcqTbluU8LzD9Lp2FaAOFtpibjeL6oycx84LOXVroufJhsbhZazF67 Xlhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=U3dEmoGA; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id b15-v6si1295600edh.432.2018.05.23.21.40.40; Wed, 23 May 2018 21:40:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=U3dEmoGA; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id D1CBAC21E08; Thu, 24 May 2018 04:40:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DAD8BC21C29; Thu, 24 May 2018 04:40:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BFC0BC21C29; Thu, 24 May 2018 04:40:31 +0000 (UTC) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by lists.denx.de (Postfix) with ESMTPS id D6A74C21BE5 for ; Thu, 24 May 2018 04:40:30 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id j20-v6so195830pff.10 for ; Wed, 23 May 2018 21:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=KT+HHalyZwa4WpFm0cCJYPtpshnxotp7UUqBMTC2IEc=; b=U3dEmoGASFYMixB8JnSORa2NVpLZM4Wh9QyAUXiR7bFvtcJ5qvoJB0JdJpQrxLG+qu im9fcrpJ5gZh+AmmtN4H4PEZA2QKC92RghcH4JCJpsTqtW9b++aOI9Kj1pK9B88IM07M kWQ0R+lwAiQ+HWpi7MaC38RLZFOdv11XZk0F8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KT+HHalyZwa4WpFm0cCJYPtpshnxotp7UUqBMTC2IEc=; b=FBEY42Mjc4eMSNf+LWWKFkzA2k3kOv0HhTy79sHDYbQvwYnppXi72pLybBcVc0QKST MRQhW4OcJIUm7fJh1votzFFFWZoopKSR9fburg4cdfxD9Z5JiWN7B52AmX41FtmVIfW+ CIR6mOfKhjDtF8lVNUTVRaIpn3Lz7aMYrRHBdDlkAWIcV0qenK28PS4FNIp+ANyx5aIF nBpqCSfHl8gaRb/NrGZpi8POFfOnV11MADFyKmUd4MsabManjLVE2VWyzezmH1jO7DnS xMUPXxgBjyNKEeZjFBJJtGCMUPfzrt0rNO2ZmtxqJhaVxMWes4afW6PoVk2ytqkSoAWV obtQ== X-Gm-Message-State: ALKqPwdK5X8A+dy0/tNxXjghJuK+epunSxqRuclykN7CBTfCfIWIkRYm siThgpn/KHmt0zJG/Use9OcKgA== X-Received: by 2002:a63:79ca:: with SMTP id u193-v6mr4602845pgc.112.1527136829288; Wed, 23 May 2018 21:40:29 -0700 (PDT) Received: from localhost.localdomain (li1170-132.members.linode.com. [45.79.71.132]) by smtp.gmail.com with ESMTPSA id z83-v6sm38778482pfd.103.2018.05.23.21.40.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 May 2018 21:40:28 -0700 (PDT) From: Jun Nie To: jagannadh.teki@gmail.com, icenowy@aosc.xyz, wens@csie.org Date: Thu, 24 May 2018 12:38:19 +0800 Message-Id: <1527136699-19238-1-git-send-email-jun.nie@linaro.org> X-Mailer: git-send-email 2.7.4 Cc: u-boot@lists.denx.de, Icenowy Zheng Subject: [U-Boot] [PATCH v2] sunxi: add support for Banana Pi M2 Zero board X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Banana Pi M2 Zero is a board by Sinovoip with Allwinner H2+ SoC, 16-bit 512MiB DDR3 memory, a MicroSD slot, two MicroUSB ports (one OTG and one powering-only) and a miniHDMI port. DTS file is from Linux kernel with removing some nodes that are not needed in u-boot or not merged into u-boot yet. Signed-off-by: Icenowy Zheng Signed-off-by: Jun Nie --- arch/arm/dts/Makefile | 1 + arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 68 +++++++++++++++++++++++++ board/sunxi/MAINTAINERS | 5 ++ configs/bananapi_m2_zero_defconfig | 15 ++++++ 4 files changed, 89 insertions(+) create mode 100644 arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts create mode 100644 configs/bananapi_m2_zero_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 20a4c37..8d6fab2 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -338,6 +338,7 @@ dtb-$(CONFIG_MACH_SUN8I_A83T) += \ sun8i-a83t-cubietruck-plus.dtb \ sun8i-a83t-tbs-a711.dts dtb-$(CONFIG_MACH_SUN8I_H3) += \ + sun8i-h2-plus-bananapi-m2-zero.dtb \ sun8i-h2-plus-orangepi-zero.dtb \ sun8i-h3-bananapi-m2-plus.dtb \ sun8i-h3-libretech-all-h3-cc.dtb \ diff --git a/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts new file mode 100644 index 0000000..92e8cf4 --- /dev/null +++ b/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2017 Icenowy Zheng + * + * Based on sun8i-h3-bananapi-m2-plus.dts, which is: + * Copyright (C) 2016 Chen-Yu Tsai + */ + +/dts-v1/; +#include "sun8i-h3.dtsi" +#include "sunxi-common-regulators.dtsi" + +#include +#include + +/ { + model = "Banana Pi BPI-M2-Zero"; + compatible = "sinovoip,bpi-m2-zero", "allwinner,sun8i-h2-plus"; + + aliases { + serial0 = &uart0; + serial1 = &uart1; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + pwr_led { + label = "bananapi-m2-zero:red:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ + default-state = "on"; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + + sw4 { + label = "power"; + linux,code = ; + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + /* + * On the production batch of this board the card detect GPIO is + * high active (card inserted), although on the early samples it's + * low active. + */ + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS index 5eb8bbe..0d904d9 100644 --- a/board/sunxi/MAINTAINERS +++ b/board/sunxi/MAINTAINERS @@ -363,6 +363,11 @@ M: Icenowy Zheng S: Maintained F: configs/Sinovoip_BPI_M2_Plus_defconfig +SINOVOIP BPI M2 ZERO BOARD +M: Icenowy Zheng +S: Maintained +F: configs/Sinovoip_BPI_M2_Zero_defconfig + SINOVOIP BPI M3 A83T BOARD M: VishnuPatekar S: Maintained diff --git a/configs/bananapi_m2_zero_defconfig b/configs/bananapi_m2_zero_defconfig new file mode 100644 index 0000000..b919d8b --- /dev/null +++ b/configs/bananapi_m2_zero_defconfig @@ -0,0 +1,15 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_SYS_TEXT_BASE=0x4a000000 +CONFIG_MACH_SUN8I_H3=y +CONFIG_DRAM_CLK=408 +CONFIG_DRAM_ZQ=3881979 +CONFIG_DRAM_ODT_EN=y +CONFIG_MMC0_CD_PIN="" +CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-bananapi-m2-zero" +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SPL=y +# CONFIG_CMD_FLASH is not set +# CONFIG_SPL_DOS_PARTITION is not set +# CONFIG_SPL_ISO_PARTITION is not set +# CONFIG_SPL_EFI_PARTITION is not set