From patchwork Sun May 6 09:21:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10382689 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 052B96054B for ; Sun, 6 May 2018 09:22:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDA5C28969 for ; Sun, 6 May 2018 09:22:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E238928C63; Sun, 6 May 2018 09:22:13 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham 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 E9EC228969 for ; Sun, 6 May 2018 09:22:12 +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:References: In-Reply-To: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:List-Owner; bh=nOYQOR82CE4y0FrPlOqIAy6l1MR7sZ2Rr31a7/mKZvM=; b=fSpP11IbTJcFWCOeO0gbOSj1Au uTqnoCdpPWIG2PUBqkBxfB7tTetODcth1UIL4zjKDjzczbO16dbdaZfdWP65AsAUptH6VLnsh/BR7 58WAfTRzFD3KFkraOzor2gnLZ26juHyYBPuEl6VbB4j1gMVllPD3h+ImE8DS+tRbfPp3lenNW251O OgpMOHpHkQ/6c8gGw0IczyCX9crnBJZ74xKqKEaPlYqITWhcNrA5Y5P17B4SuqrQCbHdWAuNrHpsB rqdGyRCJvD7ghF9aCkdz4OJrq4lQUHjKoCNcEJ293jsxgGYKMTfPgGzXKA1aE5RcC1c2JqiigT4iE zcRxHufw==; 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 1fFFrt-00034q-2w; Sun, 06 May 2018 09:22:09 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fFFrV-0002pa-HW for linux-amlogic@lists.infradead.org; Sun, 06 May 2018 09:21:47 +0000 Received: by mail-wm0-x242.google.com with SMTP id f8-v6so11266331wmc.4 for ; Sun, 06 May 2018 02:21:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ByT4tn7HU+OcGWM98LD8vbjIXKj//IUS2YuqqwXSeGs=; b=nRwgOLRVB+DPhAasFNsKYKBMSiULYtbXhoNmXG3PNV6s1Byf6Yxq08l1HO5Cqlu9FN y4KjZ/v/cicvsGAIEmLvkiYD0Adc1Qyv4skul+ApruZyqv5dnDzNNu2T/AMGPXNvKYQz GbUdGRWPXSVjpuRrfuAGH8oeJQlmDs6soAfPXdBhX+LIJje0EpqpaOJl7Ud7IfuYP2pj RxaIVfQ3BatWqzIjl8U3NpwY1lD4MS7ASbQWHv0cu09J6qKE1Ayt7HAglMA8MDfR0QQa IBNKl0hgCgcAKC4iM/I4l+YNawV/m/z5AE5yzJxifL1u7ZQoxXJNUeDU0qwuj0L4mMTS GGTA== 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; bh=ByT4tn7HU+OcGWM98LD8vbjIXKj//IUS2YuqqwXSeGs=; b=aRUTJSFC6t78fc9GOk8nJAtPg2i0E8LEUAxaAEExRuaBaNHouChE6YjK0QK+9tubnW lJ7MAvl4of/Ua/wvM7m1Z/ZXTO+EdEjgPLaXRbYFAXYY0tdtbBfKZHPLoWDJ7S9UH/cX eteUof4m66j2lRaW0dp91kX7e4PkIdIuIrowhINlsxdk25yPq0LWP1/UYMy/slPJY35z M+DHsX83Bw2lU10lfT+1ExMLPSe2jbucRNFhMVHJvuSZrWYOEENH0iTcAngRJd3Cpksb sSR8bNwKAzXMiE99vd0LTi3+hGJHOQ4KXGmuvRRYVfEpUQsNutlUizwxszJjOg5tY9CV qUew== X-Gm-Message-State: ALQs6tARm0SvEJ3BhSDg4kPGSeDU1l8GWp1OQGweR1GnIcnXRuy2/4vU d6rGGhtrVBO73PnkKMGLF3E05F8A X-Google-Smtp-Source: AB8JxZrvDbfQSdMDdUH8ZY4yOWy5G/gpkRdO78UJd9oIMZq64zK+SW4xWPofDbUgFxf6rqS9YjQRUQ== X-Received: by 10.28.167.79 with SMTP id q76mr21747744wme.131.1525598494530; Sun, 06 May 2018 02:21:34 -0700 (PDT) Received: from blackbox.darklights.net (p5B0567E9.dip0.t-ipconnect.de. [91.5.103.233]) by smtp.googlemail.com with ESMTPSA id u20-v6sm30347288wru.33.2018.05.06.02.21.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 May 2018 02:21:33 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, khilman@baylibre.com, carlo@caione.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH 6/6] ARM: dts: meson8m2: add support for the Tronsmart MXIII Plus Date: Sun, 6 May 2018 11:21:19 +0200 Message-Id: <20180506092119.467-7-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180506092119.467-1-martin.blumenstingl@googlemail.com> References: <20180506092119.467-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180506_022145_674296_E86EA123 X-CRM114-Status: GOOD ( 16.44 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: balbes-150@yandex.ru, Martin Blumenstingl MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Oleg Ivanov The Tronsmart MXIII Plus is an Android TV box which uses the Amlogic S812 (Meson8m2) SoC. It uses a Realtek RTL8211F RGMII Ethernet PHY as well as a Ricoh RN5T618 system power controller. It also comes with an Ampak AP6330 SDIO wifi/Bluetooth combo chip (support for wifi and Bluetooth is currently not added because the Linux drivers currently only support one MMC controller and that is used for the SD card). Signed-off-by: Oleg Ivanov Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 244 ++++++++++++++++++++++ 2 files changed, 246 insertions(+) create mode 100644 arch/arm/boot/dts/meson8m2-mxiii-plus.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 7e2424957809..b6d4fea16f50 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -320,6 +320,8 @@ dtb-$(CONFIG_ARCH_MMP) += \ dtb-$(CONFIG_MACH_MESON8B) += \ meson8b-mxq.dtb \ meson8b-odroidc1.dtb +dtb-$(CONFIG_MACH_MESON8M2) += \ + meson8m2-mxiii-plus.dtb dtb-$(CONFIG_ARCH_MPS2) += \ mps2-an385.dtb \ mps2-an399.dtb diff --git a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts new file mode 100644 index 000000000000..f5853610b20b --- /dev/null +++ b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts @@ -0,0 +1,244 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2018 Oleg Ivanov + * Copyright (c) 2018 Martin Blumenstingl + */ + +/dts-v1/; + +#include "meson8m2.dtsi" + +#include +#include + +/ { + model = "Tronsmart MXIII Plus"; + compatible = "tronsmart,mxiii-plus", "amlogic,meson8m2"; + + aliases { + ethernet0 = ðmac; + i2c0 = &i2c_AO; + serial0 = &uart_AO; + serial1 = &uart_A; + mmc0 = &sd_card_slot; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory { + reg = <0x40000000 0x80000000>; + }; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1710000>; + + button-function { + label = "Function"; + linux,code = ; + press-threshold-microvolt = <10000>; + }; + }; + + vcc_3v3: regulator-vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "VCC3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&cpu0 { + cpu-supply = <&vcck>; +}; + +ðmac { + status = "okay"; + + pinctrl-0 = <ð_rgmii_pins>; + pinctrl-names = "default"; + + phy-handle = <ð_phy0>; + phy-mode = "rgmii"; + + amlogic,tx-delay-ns = <4>; + + snps,reset-gpio = <&gpio GPIOH_4 0>; + snps,reset-delays-us = <0 10000 1000000>; + snps,reset-active-low; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + eth_phy0: ethernet-phy@0 { + /* Realtek RTL8211F (0x001cc916) */ + reg = <0>; + }; + }; +}; + +&ir_receiver { + status = "okay"; + pinctrl-0 = <&ir_recv_pins>; + pinctrl-names = "default"; +}; + +&i2c_AO { + status = "okay"; + pinctrl-0 = <&i2c_ao_pins>; + pinctrl-names = "default"; + + pmic@32 { + compatible = "ricoh,rn5t618"; + reg = <0x32>; + system-power-controller; + + regulators { + vcck: DCDC1 { + regulator-name = "VCCK"; + regulator-min-microvolt = <825000>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-always-on; + }; + + DCDC2 { + regulator-name = "VDDAO"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-always-on; + }; + + DCDC3 { + regulator-name = "VDD_DDR"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-boot-on; + regulator-always-on; + }; + + LDO1 { + regulator-name = "VDDIO_AO28"; + regulator-min-microvolt = <2900000>; + regulator-max-microvolt = <2900000>; + regulator-boot-on; + regulator-always-on; + }; + + vddio_ao1v8: LDO2 { + regulator-name = "VDDIO_AO18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + LDO3 { + regulator-name = "VCC1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + LDO4 { + regulator-name = "VCC2V8"; + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + regulator-boot-on; + regulator-always-on; + }; + + LDO5 { + regulator-name = "AVDD1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + LDORTC1 { + regulator-name = "VDD_LDO"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + regulator-boot-on; + regulator-always-on; + }; + + LDORTC2 { + regulator-name = "RTC_0V9"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; +}; + +&saradc { + status = "okay"; + vref-supply = <&vddio_ao1v8>; +}; + +&sdio { + status = "okay"; + + pinctrl-0 = <&sd_b_pins>; + pinctrl-names = "default"; + + /* SD card */ + sd_card_slot: slot@1 { + compatible = "mmc-slot"; + reg = <1>; + status = "okay"; + + bus-width = <4>; + no-sdio; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; + cd-inverted; + + vmmc-supply = <&vcc_3v3>; + }; +}; + +/* connected to the Bluetooth module */ +&uart_A { + status = "okay"; + pinctrl-0 = <&uart_a1_pins>, <&uart_a1_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; +}; + +&uart_AO { + status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; +}; + +&usb0 { + status = "okay"; +}; + +&usb1 { + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb1_phy { + status = "okay"; +};