From patchwork Tue Jun 15 03:08:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YuTong Chang X-Patchwork-Id: 1492139 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=SU+Ne1LY; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G45zV16xGz9sT6 for ; Tue, 15 Jun 2021 21:43:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 09CE6828C2; Tue, 15 Jun 2021 13:42:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SU+Ne1LY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EB31D8284C; Tue, 15 Jun 2021 05:09:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C7AB881D48 for ; Tue, 15 Jun 2021 05:09:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mtwget@gmail.com Received: by mail-pf1-x42c.google.com with SMTP id u18so12152173pfk.11 for ; Mon, 14 Jun 2021 20:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m85VaXhDpiWOFKHyw0E7PxQMasc6IPocOD13YweRCwM=; b=SU+Ne1LYnuTwfvZhbJ2LbbL0dJx08Iy1mW6rO4U8/APzupYSygvQt7LsQvlDioltrO cRjkddqExWA0V5Q/XsuWJ64oyVvv3ZXudYlxYB/lvS3KnTBgbaBsvN4BSa5jAXUjQem5 YlnNFcpKD9ijPGB0TdLA/qxPd928tgjQOP0WT8VtrkMKT83SnYzs/scppLeO/zzQNfOL WSHoO5R36C812ogLWvaW6UhOO6jOCV5UnizPLyIpOWFXcPn6iuTTLy/ftMy/Wva3vwoJ sndg+H+r2hC1h1tZE0pm0EerNqMeb+P9iIQlhrj/NZu+EPU00uvgvZAo+Rntvt6uei86 E2kQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=m85VaXhDpiWOFKHyw0E7PxQMasc6IPocOD13YweRCwM=; b=DTxr40Eojs2FmYkEN92snrpA0QTeQ6E6Aljocm6ms4P4G8uCXt7qP8Xsd9DQMc+9M5 xFAvupI9byOTcmgp1QfVeSfAlPgJMhGTgzrwXzhT8BtOUlN1cYdqKLdp1VAjwDX+SPw3 abpwBMwugo3Dx2fUvHDLCOdmENQgSkdV0yIyvJapjbQai+DCDGAge80HkNEY3i8peiJ+ cKhqGiG9ByB/6t248XY54hRzVQab+3gyJXcU//xE88TRUqqG/sBhwZH2xfigCjlpET0D FlNGDXNb2NZ4TZ/mqUvReFHNmhDhyyr3Qw/0X4MTTL8W0kqfjHbkgYLSGzPtuNfJELil FUMA== X-Gm-Message-State: AOAM531XTIoR8i7YbdVng9q4oshQkoZxnSNqcsA/v1OyVjsL+p93SCDD vadDPLnN6AqnvVasp9xKRjc= X-Google-Smtp-Source: ABdhPJw8nxWSaGXhhY4rlcuQGaOcojS3qA5s8f1FwWWEYezEyQL23PVu6As/kIx1+7P6byFFkS6jSQ== X-Received: by 2002:a63:3d82:: with SMTP id k124mr20238019pga.401.1623726542261; Mon, 14 Jun 2021 20:09:02 -0700 (PDT) Received: from ruantu-linux-2.. ([103.71.254.20]) by smtp.gmail.com with ESMTPSA id s22sm13923044pfe.208.2021.06.14.20.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 20:09:01 -0700 (PDT) From: Yu-Tung Chang To: jagan@amarulasolutions.com, andre.przywara@arm.com, hdegoede@redhat.com Cc: kever.yang@rock-cihps.com, patrick.delaunay@foss.st.com, festevam@gmail.com, tharvey@gateworks.com, pbrobinson@gmail.com, hs@denx.de, lokeshvutla@ti.com, u-boot@lists.denx.de, Yu-Tung Chang Subject: [PATCH v1 1/1] sunxi: h3: Add initial ZeroPi support Date: Tue, 15 Jun 2021 11:08:47 +0800 Message-Id: <20210615030847.1333-2-mtwget@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210615030847.1333-1-mtwget@gmail.com> References: <20210615030847.1333-1-mtwget@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 15 Jun 2021 13:42:36 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean ZeroPi is a new board of high performance with low cost designed by FriendlyElec., using the Allwinner H3 SOC. ZeroPi features - Allwinner H3, Quad-core Cortex-A7@1.2GHz - 256MB/512MB DDR3 RAM - microsd slot - 10/100/1000Mbps Ethernet - Debug Serial Port - DC 5V/2A power-supply Signed-off-by: Yu-Tung Chang --- arch/arm/dts/Makefile | 3 +- arch/arm/dts/sun8i-h3-zeropi.dts | 48 ++++++++++++++++++++++++++++++++ board/sunxi/MAINTAINERS | 6 ++++ configs/zeropi_defconfig | 13 +++++++++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/sun8i-h3-zeropi.dts create mode 100644 configs/zeropi_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 096068261d..7c8e253350 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -607,7 +607,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ sun8i-h3-orangepi-plus.dtb \ sun8i-h3-orangepi-plus2e.dtb \ sun8i-h3-orangepi-zero-plus2.dtb \ - sun8i-h3-rervision-dvk.dtb + sun8i-h3-rervision-dvk.dtb \ + sun8i-h3-zeropi.dtb dtb-$(CONFIG_MACH_SUN8I_R40) += \ sun8i-r40-bananapi-m2-ultra.dtb \ sun8i-v40-bananapi-m2-berry.dtb diff --git a/arch/arm/dts/sun8i-h3-zeropi.dts b/arch/arm/dts/sun8i-h3-zeropi.dts new file mode 100644 index 0000000000..e36381f11b --- /dev/null +++ b/arch/arm/dts/sun8i-h3-zeropi.dts @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2021 Yu-Tung Chang + */ + +#include "sun8i-h3-nanopi.dtsi" + +/ { + model = "FriendlyARM ZeroPi"; + compatible = "friendlyarm,zeropi", "allwinner,sun8i-h3"; + + aliases { + ethernet0 = &emac; + }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ + }; +}; + +&external_mdio { + ext_rgmii_phy: ethernet-phy@7 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <7>; + }; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; + phy-mode = "rgmii-id"; + + allwinner,leds-active-low; + status = "okay"; +}; + +&usb_otg { + status = "okay"; + dr_mode = "host"; +}; diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS index 76eba2ad20..4fc26077b2 100644 --- a/board/sunxi/MAINTAINERS +++ b/board/sunxi/MAINTAINERS @@ -529,3 +529,9 @@ YONES TOPTECH BS1078 V2 BOARD M: Peter Korsgaard S: Maintained F: configs/Yones_Toptech_BS1078_V2_defconfig + +ZEROPI BOARD +M: Yu-Tung Chang +S: Maintained +F: configs/zeropi_defconfig +F: arch/arm/dts/sun8i-h3-zeropi.dts diff --git a/configs/zeropi_defconfig b/configs/zeropi_defconfig new file mode 100644 index 0000000000..f921b09892 --- /dev/null +++ b/configs/zeropi_defconfig @@ -0,0 +1,13 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_SPL=y +CONFIG_MACH_SUN8I_H3=y +CONFIG_DRAM_CLK=408 +CONFIG_MACPWR="PD6" +# CONFIG_VIDEO_DE2 is not set +CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-zeropi" +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_CONSOLE_MUX=y +CONFIG_SUN8I_EMAC=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y