From patchwork Wed Oct 25 21:03:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13436791 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B632BC25B6B for ; Wed, 25 Oct 2023 21:04:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nQE+nOJQ0nidrCZI9+FBBvw6GQz+BSgQu9pzZUFe7Yo=; b=ihJrlMBOah6t1c scXsOJb8encBmKFUoOLd//41htyFWig7ldoHKEfgUHnRZU0aiF28FHD29JbGRY/tP40BUFdzErYpP PrEEswEedU7zXxhz5nWags4txgeT5i3H9U9iahBD9pnMDbct2s1Km5RopgdAFB84YxskyAaCulixa q6bB4CX+kIJMqURDEOPTzA3eKmb3jVT3ulymfrd/m66ljkizI3VDwv8LcstLS/PKXkSEtnmRHbq/j kfjIgS/yZEtz3ce+tw3SDFYMK6F436iOn9pdpz8QJno/zdqQu8jgHfz23J1lcSLE/aWlR+UEK/UoL reu1V6Z9zA15G5wVhxdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvl2U-00D8U4-1F; Wed, 25 Oct 2023 21:03:42 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvl2Q-00D8Sn-3D; Wed, 25 Oct 2023 21:03:40 +0000 Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DB9C5BEB; Wed, 25 Oct 2023 23:03:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698267805; bh=c901VyStTudJd1nWoCUth7e6LhwpbFhTjIO8xOGrrGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hEJ4dRV/h8VOc0j/TKtqyW88HV78H1Sj9QYmnAOjoLdrNoDWbOTJ5Gx8CE54TUG/f n+n+6+7psi4mdhLbHKZwaK1RMr258BPbwhbSnAS2N1lvtWbYIG16gmWkS13bi7Rvn2 p/+TLNv6n1tukmhxfrJ/2uoZREsNAExC8Ms+Odjo= From: Laurent Pinchart To: linux-mediatek@lists.infradead.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Paul Elder , Fabien Parent , Alexandre Mergnat , Julien Stephan , Suhrid Subramaniam , Ted Larson Subject: [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc. Date: Thu, 26 Oct 2023 00:03:40 +0300 Message-ID: <20231025210342.30995-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231025210342.30995-1-laurent.pinchart@ideasonboard.com> References: <20231025210342.30995-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_140339_179854_CCA06677 X-CRM114-Status: UNSURE ( 9.10 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a DT vendor prefix for OLogic, Inc. OLogic is a hardware and system design company that manufactures, among other things, development boards with MediaTek SoCs. Signed-off-by: Laurent Pinchart Acked-by: Krzysztof Kozlowski Reviewed-by: Alexandre Mergnat --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 573578db9509..247b724bc01f 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -981,6 +981,8 @@ patternProperties: description: Oki Electric Industry Co., Ltd. "^olimex,.*": description: OLIMEX Ltd. + "^ologic,.*": + description: OLogic, Inc. "^olpc,.*": description: One Laptop Per Child "^oneplus,.*": From patchwork Wed Oct 25 21:03:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13436792 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 185F8C25B6B for ; Wed, 25 Oct 2023 21:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tnu7L2v7TbQ/RaR0bZJXRBA9z79nhtm+BMPr0QJFBdI=; b=kwESj8ed4EWSCB AdNj1QHAqef4iokIpQavENOXdrCCFDiqYX9CcVNMNHYAZphPED3Km74mqUQBaHcCeQ1wr5r6TTAB3 J01NFi1a/INEhDdDvk2NeUmOYTo/1BGowBjHrmtCB9BRGjzZDTkhUYvBTiMp8/ijUxe2FrCPB6RHZ ZH7fwzhQUh5HzLc7Z0orGAnPNiHWcITAk9d3MUYvtFMp7aOaDXoLXpw1t8A2/6+jfN+YRAEi5XsGX /cxl4cLIfxiDpNIOppag/SaseK4aPNOq8mgedspj9WZL0k3JIalG6dNoSlJI/q6XAo82FGLhumAPh 11moIqphCzCHWjNlIcsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvl2i-00D8Yy-2z; Wed, 25 Oct 2023 21:03:56 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvl2R-00D8Sp-2y; Wed, 25 Oct 2023 21:03:41 +0000 Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 391051010; Wed, 25 Oct 2023 23:03:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698267806; bh=/b8vjeg16N6sTnaDqZ5QDVr3cUbrSUJbXeISJbDnREI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eDnaHf/iliqhFkq0/qGdpM19hHP+HEOjztzg0VeonUv6ClYUwAdtRwxO72HoBQBhy 2rujEl85xBQN8cEoO8dWH+XJMr8tk3dCrk6MU3WSi257WV+7HIkIzB17R6DbJ/yr8X ePFUWlTLFJq/NpuozuGEhVP67VsAk2YDKJTPqbQs= From: Laurent Pinchart To: linux-mediatek@lists.infradead.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Paul Elder , Fabien Parent , Alexandre Mergnat , Julien Stephan , Suhrid Subramaniam , Ted Larson Subject: [PATCH v2 2/3] dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board Date: Thu, 26 Oct 2023 00:03:41 +0300 Message-ID: <20231025210342.30995-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231025210342.30995-1-laurent.pinchart@ideasonboard.com> References: <20231025210342.30995-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_140340_102470_978D09F9 X-CRM114-Status: UNSURE ( 8.52 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a compatible string for the Pumpkin i350 board, an MT8365-based board developed by OLogic. Signed-off-by: Laurent Pinchart Acked-by: Krzysztof Kozlowski Reviewed-by: Alexandre Mergnat --- Documentation/devicetree/bindings/arm/mediatek.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml index ae12b1cab9fb..dc34e62c6756 100644 --- a/Documentation/devicetree/bindings/arm/mediatek.yaml +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml @@ -247,6 +247,7 @@ properties: - items: - enum: - mediatek,mt8365-evk + - ologic,pumpkin-i350 - const: mediatek,mt8365 - items: - enum: From patchwork Wed Oct 25 21:03:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13436794 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80545C0032E for ; Wed, 25 Oct 2023 21:04:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O7DaQqS9/PtjkUBFxSzHr/hMFZqsscLHAe6HkQaQmJk=; b=yJF8gEO9dujoB9 HENUmvcj3Jb4QV16kpgM0msxWHUC251dtrXd0nw5rEFTWyZTsdV3nXzjdfNsj6TZJGIddyNnFNnPd HS42UqB63aXX4HRSpkpeHHGQJxne8PCqpuRKjxM586fJRDkNtt37wTGBbG8LCkbje308rzJQ9bpNe h42Kn15E6l+ONDLBFCKSK02+4qWs27j04BsDJLU2NqSqmX7BUYJbzakSMn1QNF2QWzyueEk17f+8Q q/Pq0BNy9HQTg+/OVBwGd1Y7Mnv0kk1gxto/roK5bmdv/IRWE6r1VZxJgcGvXrwMn29ZjTFq5IEzA cbWfa0yqA0hJyyMaxebw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvl2j-00D8ZL-1b; Wed, 25 Oct 2023 21:03:57 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvl2T-00D8TP-0w; Wed, 25 Oct 2023 21:03:43 +0000 Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 897D61AB3; Wed, 25 Oct 2023 23:03:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698267807; bh=8pnaRCD1jKk210EMV5aFc+1kNsqOULkkWJTHqi1Y25E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tB21Rqt0NHkDID3x0KarCJ3RsVig06BxOuyiYrQjM4Z8pdYlcztaXwPyxJf1KfXPu 41M6hZ0kEhKpmF8y6PhrQiPMrhuEa8fQuKX9ANmTliK/iLyENqFu+mAN/SjVqGx2H2 PZ5PlLvMfkYTj0HFZRw49ShY33GO/bG9g5QNZGUc= From: Laurent Pinchart To: linux-mediatek@lists.infradead.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Paul Elder , Fabien Parent , Alexandre Mergnat , Julien Stephan , Suhrid Subramaniam , Ted Larson Subject: [PATCH v2 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350 Date: Thu, 26 Oct 2023 00:03:42 +0300 Message-ID: <20231025210342.30995-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231025210342.30995-1-laurent.pinchart@ideasonboard.com> References: <20231025210342.30995-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_140341_624130_30727AC2 X-CRM114-Status: GOOD ( 18.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a minimal device tree for the Genio i350 Pumpkin development board, which is based on a MediaTek MT8365. The device tree is based on an initial version by Fabien Parent Based written against the MediaTek BSP kernel ([1]). It has been cleaned up, some features have been added (GPIO LEDs, ethernet), and some features removed (audio, camera, display and dual-role USB). Those features will be added back once the corresponding DT bindings and/or drivers become available in the upstream kernel. [1] https://gitlab.com/mediatek/aiot/bsp/linux/-/blob/mtk-v5.15-dev/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts Co-developed-by: Fabien Parent Signed-off-by: Fabien Parent Co-developed-by: Paul Elder Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart Tested-by: Julien Masson --- Changes since v1: - Drop mmc2 alias - Reorder properties of i2c, mmc and usb nodes Changes compared to the BSP version: - Add ethernet controller - Add GPIO LEDs - Add reserved memory region for BL31 - Update board model and compatible - Rename enable-sdio-wakeup to wakeup-source - Drop audio support - Drop display support - Drop dual role USB support - Don't use underscores in node names - Normalize pinmux node names - Remove unneeded labels - Drop unneeded always-on - Drop unused pinmux nodes - Drop camera GPIO hog - Update copyright - Fix formatting - Sort alphabetically --- arch/arm64/boot/dts/mediatek/Makefile | 1 + .../boot/dts/mediatek/mt8365-pumpkin.dts | 541 ++++++++++++++++++ 2 files changed, 542 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile index c99c3372a4b5..bbc232bdadc4 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -53,4 +53,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-pumpkin.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts new file mode 100644 index 000000000000..9c75294c9889 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts @@ -0,0 +1,541 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021 BayLibre, SAS. + * Copyright (c) 2023 Ideas on Board Oy + * + * Author: Fabien Parent + */ + +/dts-v1/; + +#include +#include +#include +#include + +#include "mt8365.dtsi" +#include "mt6357.dtsi" + +/ { + model = "OLogic Pumpkin i350 EVK"; + compatible = "ologic,pumpkin-i350", "mediatek,mt8365"; + + aliases { + ethernet0 = ðernet_usb; + mmc0 = &mmc0; + mmc1 = &mmc1; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:921600n8"; + }; + + firmware { + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-red { + gpios = <&gpio_exp 12 GPIO_ACTIVE_HIGH>; + color = ; + function = LED_FUNCTION_HEARTBEAT; + linux,default-trigger = "heartbeat"; + }; + + led-green { + gpios = <&gpio_exp 13 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "off"; + }; + }; + + memory@40000000 { + device_type = "memory"; + reg = <0 0x40000000 0 0x80000000>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* 192 KiB reserved for ARM Trusted Firmware (BL31) */ + secmon@43000000 { + no-map; + reg = <0 0x43000000 0 0x30000>; + }; + + /* + * 12 MiB reserved for OP-TEE (BL32) + * +-----------------------+ 0x43e0_0000 + * | SHMEM 2MiB | + * +-----------------------+ 0x43c0_0000 + * | | TA_RAM 8MiB | + * + TZDRAM +--------------+ 0x4340_0000 + * | | TEE_RAM 2MiB | + * +-----------------------+ 0x4320_0000 + */ + optee@43200000 { + no-map; + reg = <0 0x43200000 0 0x00c00000>; + }; + }; + + usb_otg_vbus: usb-otg-vbus-regulator { + compatible = "regulator-fixed"; + regulator-name = "otg_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&pio 25 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&cpu0 { + proc-supply = <&mt6357_vproc_reg>; + sram-supply = <&mt6357_vsram_proc_reg>; +}; + +&cpu1 { + proc-supply = <&mt6357_vproc_reg>; + sram-supply = <&mt6357_vsram_proc_reg>; +}; + +&cpu2 { + proc-supply = <&mt6357_vproc_reg>; + sram-supply = <&mt6357_vsram_proc_reg>; +}; + +&cpu3 { + proc-supply = <&mt6357_vproc_reg>; + sram-supply = <&mt6357_vsram_proc_reg>; +}; + +&i2c0 { + clock-frequency = <100000>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + + status = "okay"; +}; + +&i2c1 { + clock-frequency = <100000>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + + status = "okay"; + + gpio_exp: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + reset-gpios = <&pio 78 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&tca6416_pins>; + + gpio-controller; + #gpio-cells = <2>; + }; +}; + +&i2c2 { + clock-frequency = <100000>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; + + status = "okay"; +}; + +&i2c3 { + clock-frequency = <100000>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; + + status = "okay"; +}; + +&keypad { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&keypad_pins>; + + keypad,num-rows = <2>; + keypad,num-columns = <1>; + mediatek,debounce-us = <32000>; + mediatek,double-keys; + + linux,keymap = ; +}; + +/* eMMC */ +&mmc0 { + bus-width = <8>; + max-frequency = <200000000>; + + cap-mmc-highspeed; + cap-mmc-hw-reset; + hs400-ds-delay = <0x12012>; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sd; + no-sdio; + non-removable; + + vmmc-supply = <&mt6357_vemc_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; + + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>; + + status = "okay"; +}; + +/* SD card connector */ +&mmc1 { + bus-width = <4>; + max-frequency = <200000000>; + + cap-sd-highspeed; + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>; + sd-uhs-sdr104; + sd-uhs-sdr50; + + vmmc-supply = <&mt6357_vmch_reg>; + vqmmc-supply = <&mt6357_vmc_reg>; + + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc1_pins_default>; + pinctrl-1 = <&mmc1_pins_uhs>; + + status = "okay"; +}; + +/* WiFi module */ +&mmc2 { + bus-width = <4>; + max-frequency = <200000000>; + + cap-sd-highspeed; + cap-sdio-irq; + wakeup-source; + hs400-ds-delay = <0x12012>; + keep-power-in-suspend; + non-removable; + sd-uhs-sdr104; + sd-uhs-sdr25; + sd-uhs-sdr50; + + vmmc-supply = <&mt6357_vemc_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc2_pins_default>; + pinctrl-1 = <&mmc2_pins_uhs>; + + assigned-clocks = <&topckgen CLK_TOP_MSDC50_2_SEL>; + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>; + + status = "okay"; +}; + +&mt6357_pmic { + interrupt-parent = <&pio>; + interrupts = <145 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; +}; + +&pio { + i2c0_pins: i2c0-pins { + pins { + pinmux = , + ; + mediatek,pull-up-adv = <3>; + mediatek,drive-strength-adv = <00>; + bias-pull-up; + }; + }; + + + i2c1_pins: i2c1-pins { + pins { + pinmux = , + ; + mediatek,pull-up-adv = <3>; + mediatek,drive-strength-adv = <00>; + bias-pull-up; + }; + }; + + i2c2_pins: i2c2-pins { + pins { + pinmux = , + ; + mediatek,pull-up-adv = <3>; + mediatek,drive-strength-adv = <00>; + bias-pull-up; + }; + }; + + i2c3_pins: i2c3-pins { + pins { + pinmux = , + ; + mediatek,pull-up-adv = <3>; + mediatek,drive-strength-adv = <00>; + bias-pull-up; + }; + }; + + keypad_pins: keypad-pins { + pins { + pinmux = , + , + ; + }; + }; + + mmc0_pins_default: mmc0-default-pins { + clk-pins { + pinmux = ; + bias-pull-down; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + bias-pull-up; + }; + + rst-pins { + pinmux = ; + bias-pull-up; + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins{ + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + ds-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + rst-pins { + pinmux = ; + drive-strength = ; + bias-pull-up; + }; + }; + + mmc1_pins_default: mmc1-default-pins { + cd-pins { + pinmux = ; + bias-pull-up; + }; + + clk-pins { + pinmux = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + bias-pull-up = ; + }; + }; + + mmc1_pins_uhs: mmc1-uhs-pins { + cd-pins { + pinmux = ; + bias-pull-up; + }; + + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + }; + + mmc2_pins_default: mmc2-default-pins { + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + sysrstb-en-pins { + pinmux = ; + output-low; + }; + }; + + mmc2_pins_uhs: mmc2-uhs-pins { + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + ds-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + sysrstb-en-pins { + pinmux = ; + output-high; + }; + }; + + tca6416_pins: tca6416-pins { + rst-n-pins { + pinmux = ; + output-high; + }; + + int-n-pins { + pinmux = ; + input-enable; + bias-pull-up; + }; + }; + + usb_pins: usb-pins { + hub-rst-pins { + pinmux = ; + output-low; + }; + + id-pins { + pinmux = ; + input-enable; + bias-pull-up; + }; + + vbus-pins { + pinmux = ; + }; + }; +}; + +&ssusb { + /* Host mode only for now, TUSB322 support is missing. */ + dr_mode = "host"; + maximum-speed = "high-speed"; + vusb33-supply = <&mt6357_vusb33_reg>; + + pinctrl-0 = <&usb_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&usb_host { + #address-cells = <1>; + #size-cells = <0>; + + vusb33-supply = <&mt6357_vusb33_reg>; + + status = "okay"; + + hub@2 { + reg = <2>; + + #address-cells = <1>; + #size-cells = <0>; + + ethernet_usb: ethernet@1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + }; +};