From patchwork Tue May 22 13:22:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10418653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C302C600CC for ; Tue, 22 May 2018 13:23:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B057127C2D for ; Tue, 22 May 2018 13:23:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4DA4283CB; Tue, 22 May 2018 13:23:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8B7127C2D for ; Tue, 22 May 2018 13:23:29 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=j1/cFKlIOTudGBqi4oYCmpVmdpVkznQ2OI4M3G5UHqY=; b=rNX DFivJYW0jXw1AgCO1qR6Jufuj5zlkL+qGtH07kKWFkSDW6E1iej2M2O65AXcFh3YOBCsTcOCncX39 6iYaJ4FK0qiTKjI7wBu0d5N3IRJwmMMbyWB7PbY7zyHMW0PpctB/o1ZAYdMYY5QzIyLGy74rwmNOm pCphzbv51rHsEY8yJOFBlIziQaSptw6ygORpuZdUe/AXSiuzGRYSsA44YdYttmzp7rm7Mac92Pzzo yPWn7kbG3ErXx8RnXPv5fQu9YWnRkST2A4JxtafIzRvaFhAHn/eAhExvETwjs/xmnb6sTwnhPcAlB AxaHjJJGll8D2sn+5r80sSNrzjF1rSw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fL7G6-0001PN-0z; Tue, 22 May 2018 13:23:22 +0000 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fL7Fx-0001OI-24 for linux-arm-kernel@lists.infradead.org; Tue, 22 May 2018 13:23:20 +0000 Received: by mail-pl0-x242.google.com with SMTP id c41-v6so10895279plj.10 for ; Tue, 22 May 2018 06:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id; bh=4UI9LymSIhxHeJAWY1UyKKnzOTR655dyApi45puR8BY=; b=ebfFC9hQ9sdMP5cTOzyFsBo77GfzWAjV/HtVLQ+dvp20i2PS8lwxK9VDY89Qrgog/w YU+cmp8iZ4gZu2nbXPn9EFH+E9mlPNMrgnCv7wfMX0Oqyq5aC1t/NI36O/rM8ZLbF92E prQxdX7GHhC+mTNX6ektSYqt32HWSDkrbWPGE= 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=4UI9LymSIhxHeJAWY1UyKKnzOTR655dyApi45puR8BY=; b=nlAEdMPqt2eDmxpAI1s9Ylkis0RpcCEMWRLFHG7DLH7oecYn3bM2QbuCSVX1MsCu2i QGor1spIotLeF4q38wpzD0ILgO6LOqOsuNNm+IC3Q4qgmM88A7tEdVrTYrISbIIsvQfX qABSFn0EXUw17rtbSci4BG/g3wEvHZ6B9QQcAaE2SVCuYQ9I4iC+DerE/P0s7kIBTjSa tXN/Y6lIYGD0+SZvDHhkXWCT1IKZ8pF9NIy+bR7XroomBZqOarEsSlctM0aUrmakMNfg rWZvdOyZYEOwWsnAonSMkuZCUjxVUOCEP0BP6me88GzptKBN3XIWVoVY6CBYTW+AJWfR sG1Q== X-Gm-Message-State: ALKqPweS8l3QRqkmeEJVApAOyR9Kj64PKwURtQlOFIWdHJNBB9hjSKaR ww1ZzftRV/woVpaWKvyrrCaqYvwdHlY= X-Google-Smtp-Source: AB8JxZrNlIq+1okeXHiRSiMDSi/wsoPF6FOnEgclqVG6XEYL7mglaT3cIGu+gpS4QGupH/ZTm/0SWQ== X-Received: by 2002:a17:902:1a8:: with SMTP id b37-v6mr25289771plb.326.1526995382176; Tue, 22 May 2018 06:23:02 -0700 (PDT) Received: from localhost.localdomain ([183.82.226.130]) by smtp.gmail.com with ESMTPSA id v186-v6sm28700047pfb.45.2018.05.22.06.22.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 06:23:01 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Trimarchi , Icenowy Zheng Subject: [PATCH v3] arm64: allwinner: a64: Add Amarula A64-Relic initial support Date: Tue, 22 May 2018 18:52:28 +0530 Message-Id: <20180522132228.6564-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180522_062313_625349_B8CA6D51 X-CRM114-Status: GOOD ( 17.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jagan Teki MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Amarula A64-Relic is Allwinner A64 based IoT device, which support - Allwinner A64 Cortex-A53 - Mali-400MP2 GPU - AXP803 PMIC - 1GB DDR3 RAM - 8GB eMMC - AP6330 Wifi/BLE - MIPI-DSI - CSI: OV5640 sensor - USB OTG - 12V DC power supply Signed-off-by: Jagan Teki --- Changes for v3: - Use sun50i-a64-amarula-relic.dts name - add eldo3 for dvdd-csi - update dldo4 min voltage as 3.3v as per schematics - use dldo3 name as dovdd-csi - update aldo1, aldo2 voltages as per schematics Changes for v2: - Rename dts name to sun50i-a64-relic.dts which is simple to use - Update dldo4 min voltage as 1.8 - Use licence year as 2018 arch/arm64/boot/dts/allwinner/Makefile | 1 + .../dts/allwinner/sun50i-a64-amarula-relic.dts | 188 +++++++++++++++++++++ 2 files changed, 189 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile index c31f90a49481..67ce8c500b2e 100644 --- a/arch/arm64/boot/dts/allwinner/Makefile +++ b/arch/arm64/boot/dts/allwinner/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-amarula-relic.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts new file mode 100644 index 000000000000..6101ea83291c --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts @@ -0,0 +1,188 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2018 Amarula Solutions B.V. + * Author: Jagan Teki + */ + +/dts-v1/; + +#include "sun50i-a64.dtsi" + +#include + +/ { + model = "Amarula A64-Relic"; + compatible = "amarula,a64-relic", "allwinner,sun50i-a64"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&ehci0 { + status = "okay"; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; + vmmc-supply = <®_dcdc1>; + bus-width = <8>; + non-removable; + cap-mmc-hw-reset; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&r_rsb { + status = "okay"; + + axp803: pmic@3a3 { + compatible = "x-powers,axp803"; + reg = <0x3a3>; + interrupt-parent = <&r_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ + }; +}; + +#include "axp803.dtsi" + +®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-name = "avdd-csi"; +}; + +®_aldo2 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-pl"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-pll-avcc"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1040000>; + regulator-max-microvolt = <1300000>; + regulator-name = "vdd-cpux"; +}; + +/* DCDC3 is polyphased with DCDC2 */ + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_dcdc6 { + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-sys"; +}; + +®_dldo1 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-hdmi-dsi-sensor"; +}; + +®_dldo2 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-mipi"; +}; + +®_dldo3 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-name = "dovdd-csi"; +}; + +®_dldo4 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi-io"; +}; + +®_drivevbus { + regulator-name = "usb0-vbus"; + status = "okay"; +}; + +®_eldo1 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "cpvdd"; +}; + +®_eldo3 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "dvdd-csi"; +}; + +®_fldo1 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-name = "vcc-1v2-hsic"; +}; + +/* + * The A64 chip cannot work without this regulator off, although + * it seems to be only driving the AR100 core. + * Maybe we don't still know well about CPUs domain. + */ +®_fldo2 { + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-cpus"; +}; + +®_rtc_ldo { + regulator-name = "vcc-rtc"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + usb0_vbus-supply = <®_drivevbus>; + status = "okay"; +};