From patchwork Fri Jan 12 09:46:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 762286 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 169454317C; Fri, 12 Jan 2024 09:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="ilhhnwa5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705052800; bh=Cpdhb43aC00QlOu8A2culCbQWTW6zeF1QAA1l5ICLYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ilhhnwa54Iq3p/sN7pvE4ktJ6L81gFK4r2CBA6sHwuOMQmOq0o9+crnxqeo38zKR4 6PAzHxO0hFO+vfXZHjhQtIW15c7GSpwT9brStWmvk87b0d1s/08s/ZHZAy17pwFuiP klmxkz6LLCr2Gw0dX9uTXH5Cxo90ZKiCZhTnSbi9rvMciNiPgUqH19Sv9QZSLMxPp1 g9EBBEvq6VTl5hjstLWQFsB7OuUYYoYTryPCi9YmnoitZ8cGeKrvsS7wSIVj58L6U4 AYzwC2LPBSo+y2Zc5+S0LWOj2zMd8I7XiRm+j1UcgzHrON/w7r0s/5LsSUfUh8eQ+a Y5/0W6QpX3uPA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id A3FFB378202D; Fri, 12 Jan 2024 09:46:39 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, hsinyi@chromium.org, nfraprado@collabora.com, macpaul.lin@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 02/15] arm64: dts: mediatek: Introduce the MT8395 Radxa NIO 12L board Date: Fri, 12 Jan 2024 10:46:19 +0100 Message-ID: <20240112094632.66310-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> References: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add an initial devicetree for the Radxa NIO 12L SBC, powered by the MT8395 Genio 1200 SoC. This achieves a console boot. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/Makefile | 1 + .../dts/mediatek/mt8395-radxa-nio-12l.dts | 102 ++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile index 679dddb09966..cf997191d046 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -76,4 +76,5 @@ 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) += mt8395-genio-1200-evk.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8395-radxa-nio-12l.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts new file mode 100644 index 000000000000..2c4d6805b668 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2023 MediaTek Inc. + * Copyright (C) 2024 Collabora Ltd. + * Author: Ben Lok + * Macpaul Lin + * AngeloGioacchino Del Regno + */ + +#include "mt8195.dtsi" +#include + +/ { + model = "Radxa NIO 12L"; + chassis-type = "embedded"; + compatible = "radxa,nio-12l", "mediatek,mt8395", "mediatek,mt8195"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:921600n8"; + }; + + firmware { + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; + + memory@40000000 { + device_type = "memory"; + reg = <0 0x40000000 0x1 0x0>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* + * 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_reserved: optee@43200000 { + reg = <0 0x43200000 0 0xc00000>; + no-map; + }; + + scp_mem: memory@50000000 { + compatible = "shared-dma-pool"; + reg = <0 0x50000000 0 0x2900000>; + no-map; + }; + + vpu_mem: memory@53000000 { + compatible = "shared-dma-pool"; + reg = <0 0x53000000 0 0x1400000>; /* 20 MB */ + }; + + /* 2 MiB reserved for ARM Trusted Firmware (BL31) */ + bl31_secmon_mem: memory@54600000 { + reg = <0 0x54600000 0x0 0x200000>; + no-map; + }; + + afe_mem: memory@60000000 { + compatible = "shared-dma-pool"; + reg = <0 0x60000000 0 0x1100000>; + no-map; + }; + + apu_mem: memory@62000000 { + compatible = "shared-dma-pool"; + reg = <0 0x62000000 0 0x1400000>; /* 20 MB */ + }; + }; +}; + +&pio { + uart0_pins: uart0-pins { + pins-bus { + pinmux = , + ; + }; + }; +}; + +&uart0 { + /* Exposed at 40 pin connector */ + pinctrl-0 = <&uart0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; From patchwork Fri Jan 12 09:46:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 762285 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CD275C917; Fri, 12 Jan 2024 09:46:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="FKWxU0tL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705052802; bh=tcjP/leN4XCKBtnz42PrTROUO/R9BBYO3TR0UYOJr+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FKWxU0tLKPRq7PUUfGwWOYH1GFrkkrHM6458oM5xWZ/GeXhV8ZlYbykzaS0XpRyYc HE7XSNoF4UbofLzNrGwd+nIfXM1JItfGv4hUqCBa3lyF0ZH75DxOfSOZV+RZi140Sa YMEcOUXlIitOvtODF+fMna2y/I+Nuy8rJdNZ00Sm3Bh0MD1MpV8M1f+sOvgPO669/Q uNY7uNR1PCuhXmyPGdQu913U629lv6PuHGBBTw8gKCLUxYZcYnBIr6JHoWH7k2heIS Jais5HX7BxjOZDWGtiN+njkMcoPsT9DocQoVbger90Vg3sJmJ/QD820GvGquEXlU9j O4SagNXw/95bQ== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id BA8FF3782033; Fri, 12 Jan 2024 09:46:41 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, hsinyi@chromium.org, nfraprado@collabora.com, macpaul.lin@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 04/15] arm64: dts: mediatek: radxa-nio-12l: Add external MT6360 PMIC on I2C6 Date: Fri, 12 Jan 2024 10:46:21 +0100 Message-ID: <20240112094632.66310-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> References: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In preparation for adding the power tree for this board, add a node for the MT6360 PMIC, connected to I2C6. Signed-off-by: AngeloGioacchino Del Regno --- .../dts/mediatek/mt8395-radxa-nio-12l.dts | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index 79358e1a3e60..281847b8f022 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -8,6 +8,7 @@ */ #include "mt8195.dtsi" +#include #include / { @@ -109,7 +110,15 @@ &i2c6 { pinctrl-names = "default"; status = "okay"; - /* MT6360 PMIC at 0x34 */ + mt6360: pmic@34 { + compatible = "mediatek,mt6360"; + reg = <0x34>; + interrupts-extended = <&pio 101 IRQ_TYPE_EDGE_FALLING>; + interrupt-names = "IRQB"; + interrupt-controller; + #interrupt-cells = <1>; + pinctrl-0 = <&mt6360_pins>; + }; }; &pio { @@ -140,6 +149,15 @@ pins { }; }; + mt6360_pins: mt6360-pins { + pins-irq { + pinmux = , + ; + input-enable; + bias-pull-up; + }; + }; + uart0_pins: uart0-pins { pins-bus { pinmux = , From patchwork Fri Jan 12 09:46:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 762284 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 509105DF11; Fri, 12 Jan 2024 09:46:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="F/YirnXC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705052804; bh=CzubW/gUVNGGtQYvTmtvySvTUAp6Dgbfxq213s18FKg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F/YirnXCcuauURatL3gA9Ezfh2b4mW5Nf/jA3AZueitmrViIoJ98qQWjFnlL8JPsr 3ig5FHK9trCUpirGTpl6/mTwzv+30lVhfVDYIab/J1N1GecOA9vlsY8rq0AjmFcLfr NeikVvgq74L1e8yWL63zVmrqj+ZaEvq/9YNnXrg9IA/CMT8LOo3VKsnCus1KUIGh4E bhRHgNu6XIFgbEOfjh+By/qhdA/ovqEYS7yXyLpePtaRT1Z+vFqPBpah3w+dY8+Uq/ 3DmFbg7nceqPFO4xcs7hP9LkqiovUtDM+euW2jeE5yjPeDomPUiP1s+7jPz3i+635f E26Bk9AX2Bilw== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id CF5C23781FCF; Fri, 12 Jan 2024 09:46:43 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, hsinyi@chromium.org, nfraprado@collabora.com, macpaul.lin@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 06/15] arm64: dts: mediatek: radxa-nio-12l: Add Ethernet controller and Xceiver Date: Fri, 12 Jan 2024 10:46:23 +0100 Message-ID: <20240112094632.66310-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> References: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Configure and enable the ethernet controller found on the MT8395 SoC, along with the MDIO PHY/Transceiver (RTL8211FD) found on this board, enabling 10/100/1000M Ethernet connectivity. Signed-off-by: AngeloGioacchino Del Regno --- .../dts/mediatek/mt8395-radxa-nio-12l.dts | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index 0daf27410311..221d7062d5ef 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -21,6 +21,7 @@ / { compatible = "radxa,nio-12l", "mediatek,mt8395", "mediatek,mt8195"; aliases { + ethernet0 = ð serial0 = &uart0; }; @@ -132,6 +133,26 @@ apu_mem: memory@62000000 { }; }; +ð { + phy-mode = "rgmii-rxid"; + phy-handle = <&rgmii_phy>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <ð_default_pins>; + pinctrl-1 = <ð_sleep_pins>; + mediatek,tx-delay-ps = <2030>; + mediatek,mac-wol; + snps,reset-gpio = <&pio 93 GPIO_ACTIVE_HIGH>; + snps,reset-delays-us = <0 20000 100000>; + status = "okay"; + + mdio { + rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-id001c.c916"; + reg = <0x1>; + }; + }; +}; + &i2c2 { clock-frequency = <400000>; pinctrl-0 = <&i2c2_pins>; @@ -297,6 +318,77 @@ &mt6359_vsram_others_ldo_reg { }; &pio { + eth_default_pins: eth-default-pins { + pins-cc { + pinmux = , + , + , + ; + drive-strength = <8>; + }; + + pins-mdio { + pinmux = , + ; + input-enable; + }; + + pins-power { + pinmux = , + ; + output-high; + }; + + pins-rst { + pinmux = ; + }; + + pins-rxd { + pinmux = , + , + , + ; + }; + + pins-txd { + pinmux = , + , + , + ; + drive-strength = <8>; + }; + }; + + eth_sleep_pins: eth-sleep-pins { + pins-cc { + pinmux = , + , + , + ; + }; + + pins-mdio { + pinmux = , + ; + bias-disable; + input-disable; + }; + + pins-rxd { + pinmux = , + , + , + ; + }; + + pins-txd { + pinmux = , + , + , + ; + }; + }; + i2c2_pins: i2c2-pins { pins-bus { pinmux = , From patchwork Fri Jan 12 09:46:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 762283 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FFA75EE6E; Fri, 12 Jan 2024 09:46:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="KX1/i9G5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705052806; bh=xzl9gPWaWLVwF43xwbktPogCDQkqXUy+iSHTpf7+QEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KX1/i9G5+CviCWZxLYvfavQ6cB3zo4pP9ZJH7JQKHMHvXHA0Ekb2KEsB9z8sazd2v qu3EZle3ivZ0jkXOmTBdmOiSbAuCxF3yveaKb0t3V6AcTNVigZDoPZdB9mWSYhMkc8 iHOqpGdnvc5CQtm+6wJ4f69ZDKRYG/yT6gZkZWy6ezHQkFj4TOGEl9vfHqVF4nnbh8 ZR7xFu1T+RJerAU3rbvhR70eNHE7JLJ07O8yEIe8xrBMsqnGk+M//JkBE6uxY5xytT 8ZsRr2w7gaPu7wiZNHSU0bDLCFzhrFFdu+dAnYmsjEpIyegJmKcazMFLs2fNKOk24q r0Q6f2kPX5hGA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id D3DA5378202D; Fri, 12 Jan 2024 09:46:45 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, hsinyi@chromium.org, nfraprado@collabora.com, macpaul.lin@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 08/15] arm64: dts: mediatek: radxa-nio-12l: Add support for eMMC and MicroSD Date: Fri, 12 Jan 2024 10:46:25 +0100 Message-ID: <20240112094632.66310-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> References: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Enable and properly configure the MMC0/1 controllers to add support for the eMMC and MicroSD slot (respectively) found on this board. Signed-off-by: AngeloGioacchino Del Regno --- .../dts/mediatek/mt8395-radxa-nio-12l.dts | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index 3b8880db49ff..8492cf52413f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -276,6 +276,44 @@ mt6360_ldo7: ldo7 { }; }; +/* MMC0 Controller: eMMC (HS400). Power lines are shared with UFS! */ +&mmc0 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_default_pins>; + pinctrl-1 = <&mmc0_uhs_pins>; + bus-width = <8>; + max-frequency = <200000000>; + hs400-ds-delay = <0x14c11>; + cap-mmc-highspeed; + cap-mmc-hw-reset; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sdio; + no-sd; + non-removable; + vmmc-supply = <&mt6359_vemc_1_ldo_reg>; + vqmmc-supply = <&mt6359_vufs_ldo_reg>; + status = "okay"; +}; + +/* MMC1 Controller: MicroSD card slot */ +&mmc1 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc1_default_pins>, <&mmc1_pins_detect>; + pinctrl-1 = <&mmc1_default_pins>; + bus-width = <4>; + max-frequency = <200000000>; + cap-sd-highspeed; + cd-gpios = <&pio 129 GPIO_ACTIVE_LOW>; + no-mmc; + no-sdio; + sd-uhs-sdr50; + sd-uhs-sdr104; + vmmc-supply = <&mt6360_ldo5>; + vqmmc-supply = <&mt6360_ldo3>; + status = "okay"; +}; + &mt6359_vaud18_ldo_reg { regulator-always-on; }; @@ -427,6 +465,96 @@ pins { }; }; + mmc0_default_pins: mmc0-default-pins { + pins-clk { + pinmux = ; + bias-pull-down = ; + drive-strength = <6>; + }; + + pins-cmd-dat { + pinmux = , + , + , + , + , + , + , + , + ; + bias-pull-up = ; + drive-strength = <6>; + input-enable; + }; + + pins-rst { + pinmux = ; + bias-pull-up = ; + drive-strength = <6>; + }; + }; + + mmc0_uhs_pins: mmc0-uhs-pins { + pins-clk { + pinmux = ; + bias-pull-down = ; + drive-strength = <8>; + }; + + pins-cmd-dat { + pinmux = , + , + , + , + , + , + , + , + ; + bias-pull-up = ; + drive-strength = <8>; + input-enable; + }; + + pins-ds { + pinmux = ; + bias-pull-down = ; + drive-strength = <8>; + }; + + pins-rst { + pinmux = ; + bias-pull-up = ; + drive-strength = <8>; + }; + }; + + mmc1_default_pins: mmc1-default-pins { + pins-clk { + pinmux = ; + bias-pull-down = ; + drive-strength = <8>; + }; + + pins-cmd-dat { + pinmux = , + , + , + , + ; + bias-pull-up = ; + drive-strength = <8>; + input-enable; + }; + }; + + mmc1_pins_detect: mmc1-detect-pins { + pins-insert { + pinmux = ; + bias-pull-up; + }; + }; + mt6360_pins: mt6360-pins { pins-irq { pinmux = , From patchwork Fri Jan 12 09:46:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 762282 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B6835FEE0; Fri, 12 Jan 2024 09:46:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="D3x/KrQG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705052808; bh=PBInGRQ7u56PJ5kAhJgP+h9Q1n6mnFxfoN7YCdPzwaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D3x/KrQGs5mZR32NTRZBSUZgSKwCRsHUE9HUveVzAwgj70HdsQHEyI9Tqr9PtweLH 4FI4pfF5uIvFCDjABr+efx7uhxfy8H5umrSm2ZLXGAGqkSQRucs8S+KIf5TuF/lZd7 LVRfsZeguGmQ/RKItOhwtFJoivbUVRuutEuOkfPuEzpxrVm6wlJWj8pbmstl5jwPql 3LaVtJeWUUatUFQHxC7/L5BW2trHj81nmUfsqZ6ZhyVg/Tf4bcLgMFqSMyhsBjLvX3 1m9TQSJSoj8EeZqX6Q9w1NA0HRlUJDM3wmIc5E9DSWqymdYYgdxBPAmFv25VZv59CP MPeZ/K1gmfJmQ== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id E61713781FCF; Fri, 12 Jan 2024 09:46:47 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, hsinyi@chromium.org, nfraprado@collabora.com, macpaul.lin@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 10/15] arm64: dts: mediatek: radxa-nio-12l: Enable PCI-Express 0 for USB HUB Date: Fri, 12 Jan 2024 10:46:27 +0100 Message-ID: <20240112094632.66310-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> References: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Enable the PCIe0 controller, providing part of the USB connectivity found on this board through a USB HUB connected over PCI-Express. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8395-radxa-nio-12l.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index 5a9e33013209..dbde2c7b3c64 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -564,6 +564,15 @@ pins-irq { }; }; + pcie0_default_pins: pcie0-default-pins { + pins-bus { + pinmux = , + , + ; + bias-pull-up; + }; + }; + uart0_pins: uart0-pins { pins-bus { pinmux = , @@ -583,6 +592,12 @@ pins-wifi-vreg-en { }; }; +&pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie0_default_pins>; + status = "okay"; +}; + &pmic { interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>; }; From patchwork Fri Jan 12 09:46:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 762281 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B96760B99; Fri, 12 Jan 2024 09:46:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="s7j+MtAA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705052810; bh=ooNGEFPL+gUVRid3mWpdeLiRnX9gOyT+28DJWB37x2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s7j+MtAA2wKznnHtgaCCVdL9MMIzIDL35gK5ovR2oytf+x3+qEOy4Mgor9NnL+EaB 4gE7uzIxbbM3aWcvgFzQRN9+CoYv5rBpj4Ue9ucTLBWhC0aC0F7eT1xKZ+GIC5FtL8 IarcnCOn3wseHA8uxDffMUh6OQqehAcrp+z44pYvMYstRjg0kr2scO25AQn5aW70Cb +0CzMagVdrzhnJZLXJyIxOrTJQ+glhRfdeWnAL16xthFCsgCJZaS1H4aIrLfpNVMpw JeU/XOjmuAxxnMM/66RkoxVS738a/wLmaIh2YUZzG/U2vozP8gNa/83LZs6CWSTf1K x72lkUSq4BRWA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 058EB3782021; Fri, 12 Jan 2024 09:46:49 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, hsinyi@chromium.org, nfraprado@collabora.com, macpaul.lin@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 12/15] arm64: dts: mediatek: radxa-nio-12l: Enable PCI-Express 1 for WiFi Date: Fri, 12 Jan 2024 10:46:29 +0100 Message-ID: <20240112094632.66310-13-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> References: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This board has a MT7921E combo chip connected through USB for Bluetooth and PCI-Express for WiFi. Add the PCIe1 controller to enable WiFi connectivity. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8395-radxa-nio-12l.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index eafce9cb2598..be2094b8fe3c 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -573,6 +573,15 @@ pins-bus { }; }; + pcie1_default_pins: pcie1-default-pins { + pins-bus { + pinmux = , + , + ; + bias-disable; + }; + }; + uart0_pins: uart0-pins { pins-bus { pinmux = , @@ -598,6 +607,12 @@ &pcie0 { status = "okay"; }; +&pcie1 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie1_default_pins>; + status = "okay"; +}; + &pmic { interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>; }; From patchwork Fri Jan 12 09:46:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 762280 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D59360EE9; Fri, 12 Jan 2024 09:46:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="JgameZ7Q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705052812; bh=gL9dBZTGnU9IkMRPqj3ewg2fNvV9dpUlTIdwuTp/HeU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JgameZ7Qfy0yT8alx2+YKNEednVHANfwOvPmh9XyzJpaRvDVfl7mNGFizFGxgZlqr +sljUdc6UkzHSpUgDEgnOoTObIgshFnxILuxih0/Lg8RHIztL+IXyqjJkweN7J0h2A 48neMrJYNXFvRbHlTkRVseZ4/n5wxp3gmyRZvY4c9VQBq+LqhLKy2UZERh53VOlLxk LHMrkGCnd8duiyb9AdrBfQ7/P77NMtWW+i62CZ5217BIvAMFwI72fPCd2CVtcKNx16 4Hjr6PJw6CAaHp5GX8jZBdSLUAqAZUzyD9ypwEF7gghkoNri9Fkdy6tY4NSX3WFNyk lzbW0PqEiO2uA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 0D9443782035; Fri, 12 Jan 2024 09:46:52 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, hsinyi@chromium.org, nfraprado@collabora.com, macpaul.lin@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 14/15] arm64: dts: mediatek: radxa-nio-12l: Enable UART1 for 40pin header Date: Fri, 12 Jan 2024 10:46:31 +0100 Message-ID: <20240112094632.66310-15-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> References: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Enable the secondary UART port, exposed on the 40pins header. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8395-radxa-nio-12l.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index 191c059f5c97..b0d66fa139b5 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -609,6 +609,13 @@ pins-bus { }; }; + uart1_pins: uart1-pins { + pins-bus { + pinmux = , + ; + }; + }; + wifi_vreg_pins: wifi-vreg-pins { pins-wifi-pmu-en { pinmux = ; @@ -707,6 +714,13 @@ &uart0 { status = "okay"; }; +&uart1 { + /* Exposed at 40 pin connector */ + pinctrl-0 = <&uart1_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + &xhci0 { vusb33-supply = <&mt6359_vusb_ldo_reg>; vbus-supply = <&otg_vbus_regulator>;