Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 965AEC47089 for ; Tue, 6 Dec 2022 00:53:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 512C883A08; Tue, 6 Dec 2022 01:53:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id F1380852C2; Tue, 6 Dec 2022 01:53:55 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 0D87D85430 for ; Tue, 6 Dec 2022 01:47:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2CBA823A; Mon, 5 Dec 2022 16:47:55 -0800 (PST) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 713CB3F73B; Mon, 5 Dec 2022 16:47:47 -0800 (PST) From: Andre Przywara To: Samuel Holland , Jagan Teki Cc: u-boot@lists.denx.de, Icenowy Zheng , Jernej Skrabec Subject: [RFC PATCH 17/17] sunxi: add preliminary MangoPi MQ-R board support Date: Tue, 6 Dec 2022 00:45:49 +0000 Message-Id: <20221206004549.29015-18-andre.przywara@arm.com> X-Mailer: git-send-email 2.35.5 In-Reply-To: <20221206004549.29015-1-andre.przywara@arm.com> References: <20221206004549.29015-1-andre.przywara@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean This includes a preliminary basic DT and a defconfig to get the board booted. Although there is some DRAM code based on some disassembly, it is not ready yet, so the SPL doesn't really work, and needs some help from awboot. Signed-off-by: Andre Przywara --- arch/arm/dts/Makefile | 2 + arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts | 54 +++++++++++++++++++++++ configs/mangopi_mq_r_defconfig | 12 +++++ 3 files changed, 68 insertions(+) create mode 100644 arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts create mode 100644 configs/mangopi_mq_r_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 43951a7731e..602349b88ab 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -694,6 +694,8 @@ dtb-$(CONFIG_MACH_SUN8I_V3S) += \ sun8i-s3-pinecube.dtb \ sun8i-v3-sl631-imx179.dtb \ sun8i-v3s-licheepi-zero.dtb +dtb-$(CONFIG_MACH_SUN8I_R528) += \ + sun8i-t113s-mangopi-mq-r.dtb dtb-$(CONFIG_MACH_SUN50I_H5) += \ sun50i-h5-bananapi-m2-plus.dtb \ sun50i-h5-emlid-neutis-n5-devboard.dtb \ diff --git a/arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts b/arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts new file mode 100644 index 00000000000..1fa0c46b7dc --- /dev/null +++ b/arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: (GPL-2.0+ or MIT) +// Copyright (C) 2022 Arm Ltd. + +/dts-v1/; + +#include "sun8i-t113s.dtsi" +#include + +/ { + model = "Mangopi MQ-R"; + compatible = "mangopi,mq-r", "allwinner,sun8i-t113s"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + reg_3v3: regulator-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&dcxo { + clock-frequency = <24000000>; +}; + +&mmc0 { + pinctrl-0 = <&mmc0_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_3v3>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; + disable-wp; + bus-width = <4>; + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pe_pins>; + status = "okay"; +}; + +&pio { + uart0_pe_pins: uart0-pe-pins { + pins = "PE2", "PE3"; + function = "uart0"; + }; +}; diff --git a/configs/mangopi_mq_r_defconfig b/configs/mangopi_mq_r_defconfig new file mode 100644 index 00000000000..32b1449dc92 --- /dev/null +++ b/configs/mangopi_mq_r_defconfig @@ -0,0 +1,12 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_DEFAULT_DEVICE_TREE="sun8i-t113s-mangopi-mq-r" +CONFIG_SUNXI_MINIMUM_DRAM_MB=128 +CONFIG_SPL=y +CONFIG_MACH_SUN8I_R528=y +CONFIG_MMC0_CD_PIN="PF6" +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SYS_MONITOR_LEN=786432 +# dummy values +CONFIG_DRAM_CLK=600 +CONFIG_DRAM_ZQ=0 -- 2.35.5