From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48ADDC433FE for ; Sun, 6 Nov 2022 08:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229777AbiKFIur (ORCPT ); Sun, 6 Nov 2022 03:50:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbiKFIun (ORCPT ); Sun, 6 Nov 2022 03:50:43 -0500 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36B91A1B2; Sun, 6 Nov 2022 01:50:42 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout3.routing.net (Postfix) with ESMTP id 6FF40604C6; Sun, 6 Nov 2022 08:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZKbPVnyr8O2+t+13Wepki/7PMD1kuq2RmBNc/cbSHGc=; b=IJbg5xEgCzrab16iug8pqByeH3gZJT8cwZXG0eBpoix3n5poiDja0n/TO/Liz9etyHM4UM 0CVtVzzaHxRiDHc2NDp4ZYxyqFG8TXFVZ9FL4IVT+3a3pEFTGrZggPZMhxPl/f7ZSzhTc6 DwuvF6dQAXdo65l4PJujrT4BuaYSTkc= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id B096736054A; Sun, 6 Nov 2022 08:50:39 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Shih , AngeloGioacchino Del Regno Subject: [RFC v3 01/11] arm64: dts: mt7986: harmonize device node order Date: Sun, 6 Nov 2022 09:50:24 +0100 Message-Id: <20221106085034.12582-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 3acff14d-38c2-423d-ac39-9364fb9b5d36 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This arrange device tree nodes in alphabetical order. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- i modified sams patch https://patchwork.kernel.org/project/linux-mediatek/patch/20220427124741.18= 245-2-sam.shih@mediatek.com/ by moving pio-node up instead of moving uarts down to ensure alphabetical order for switch-/wifi-node. And moved uart0 and wifi in mt7986b-rfb too. --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 94 ++++++++++---------- arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 22 ++--- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index afe37b702eef..6189436fe31d 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -54,6 +54,53 @@ switch: switch@0 { }; }; =20 +&pio { + uart1_pins: uart1-pins { + mux { + function =3D "uart"; + groups =3D "uart1"; + }; + }; + + uart2_pins: uart2-pins { + mux { + function =3D "uart"; + groups =3D "uart2"; + }; + }; + + wf_2g_5g_pins: wf-2g-5g-pins { + mux { + function =3D "wifi"; + groups =3D "wf_2g", "wf_5g"; + }; + conf { + pins =3D "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength =3D <4>; + }; + }; + + wf_dbdc_pins: wf-dbdc-pins { + mux { + function =3D "wifi"; + groups =3D "wf_dbdc"; + }; + conf { + pins =3D "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA"; + drive-strength =3D <4>; + }; + }; +}; + &switch { ports { #address-cells =3D <1>; @@ -121,50 +168,3 @@ &wifi { pinctrl-0 =3D <&wf_2g_5g_pins>; pinctrl-1 =3D <&wf_dbdc_pins>; }; - -&pio { - uart1_pins: uart1-pins { - mux { - function =3D "uart"; - groups =3D "uart1"; - }; - }; - - uart2_pins: uart2-pins { - mux { - function =3D "uart"; - groups =3D "uart2"; - }; - }; - - wf_2g_5g_pins: wf-2g-5g-pins { - mux { - function =3D "wifi"; - groups =3D "wf_2g", "wf_5g"; - }; - conf { - pins =3D "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", - "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", - "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", - "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", - "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", - "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", - "WF1_TOP_CLK", "WF1_TOP_DATA"; - drive-strength =3D <4>; - }; - }; - - wf_dbdc_pins: wf-dbdc-pins { - mux { - function =3D "wifi"; - groups =3D "wf_dbdc"; - }; - conf { - pins =3D "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", - "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", - "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", - "WF0_TOP_CLK", "WF0_TOP_DATA"; - drive-strength =3D <4>; - }; - }; -}; diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986b-rfb.dts index 3443013b5971..7459ddb6b6f0 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -25,10 +25,6 @@ memory@40000000 { }; }; =20 -&uart0 { - status =3D "okay"; -}; - ð { status =3D "okay"; =20 @@ -99,13 +95,6 @@ fixed-link { }; }; =20 -&wifi { - status =3D "okay"; - pinctrl-names =3D "default", "dbdc"; - pinctrl-0 =3D <&wf_2g_5g_pins>; - pinctrl-1 =3D <&wf_dbdc_pins>; -}; - &pio { wf_2g_5g_pins: wf-2g-5g-pins { mux { @@ -138,3 +127,14 @@ conf { }; }; }; + +&uart0 { + status =3D "okay"; +}; + +&wifi { + status =3D "okay"; + pinctrl-names =3D "default", "dbdc"; + pinctrl-0 =3D <&wf_2g_5g_pins>; + pinctrl-1 =3D <&wf_dbdc_pins>; +}; --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D08CC43217 for ; Sun, 6 Nov 2022 08:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229806AbiKFIus (ORCPT ); Sun, 6 Nov 2022 03:50:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbiKFIuo (ORCPT ); Sun, 6 Nov 2022 03:50:44 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 155331DE; Sun, 6 Nov 2022 01:50:43 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout2.routing.net (Postfix) with ESMTP id 1E0FC5FC9C; Sun, 6 Nov 2022 08:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GYNcRZnMPdoGHbaAS4t9PS2B+ZTfta3AIIoWlDFqlTw=; b=To0GmVD1oJ7wRU5IxtM2W/I9sU6/10P6cKksfxP/8orHs1FjpBpUMdXaLRui9/l8KQ9T66 pqqA976yB3FTC7g92741hb6gtI7VUzohQbhljhBmQQ8wshdjk/4LFRY3C/BUE/4VZCgcdk rqvZx8jX2j48AKDat9aeu9aAX9BqWR4= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 6E700360707; Sun, 6 Nov 2022 08:50:40 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Shih Subject: [RFC v3 02/11] arm64: dts: mt7986: add spi related device nodes Date: Sun, 6 Nov 2022 09:50:25 +0100 Message-Id: <20221106085034.12582-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: bbcea1ed-018e-4fdf-8a18-fe66a1ecf973 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds spi support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 35 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 28 ++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 35 ++++++++++++++++++++ 3 files changed, 98 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index 6189436fe31d..58f7e6b169bf 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -55,6 +55,20 @@ switch: switch@0 { }; =20 &pio { + spi_flash_pins: spi-flash-pins { + mux { + function =3D "spi"; + groups =3D "spi0", "spi0_wp_hold"; + }; + }; + + spic_pins: spic-pins { + mux { + function =3D "spi"; + groups =3D "spi1_2"; + }; + }; + uart1_pins: uart1-pins { mux { function =3D "uart"; @@ -101,6 +115,27 @@ conf { }; }; =20 +&spi0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi_flash_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; + spi_nand: spi_nand@0 { + compatible =3D "spi-nand"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + spi-tx-buswidth =3D <4>; + spi-rx-buswidth =3D <4>; + }; +}; + +&spi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spic_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; +}; + &switch { ports { #address-cells =3D <1>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 226648f48df2..6d881095d933 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -112,6 +112,34 @@ infracfg: infracfg@10001000 { #clock-cells =3D <1>; }; =20 + spi0: spi@1100a000 { + compatible =3D "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm"; + #address-cells =3D <1>; + #size-cells =3D <0>; + reg =3D <0 0x1100a000 0 0x100>; + interrupts =3D ; + clocks =3D <&topckgen CLK_TOP_MPLL_D2>, + <&topckgen CLK_TOP_SPI_SEL>, + <&infracfg CLK_INFRA_SPI0_CK>, + <&infracfg CLK_INFRA_SPI0_HCK_CK>; + clock-names =3D "parent-clk", "sel-clk", "spi-clk", "hclk"; + status =3D "disabled"; + }; + + spi1: spi@1100b000 { + compatible =3D "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm"; + #address-cells =3D <1>; + #size-cells =3D <0>; + reg =3D <0 0x1100b000 0 0x100>; + interrupts =3D ; + clocks =3D <&topckgen CLK_TOP_MPLL_D2>, + <&topckgen CLK_TOP_SPIM_MST_SEL>, + <&infracfg CLK_INFRA_SPI1_CK>, + <&infracfg CLK_INFRA_SPI1_HCK_CK>; + clock-names =3D "parent-clk", "sel-clk", "spi-clk", "hclk"; + status =3D "disabled"; + }; + topckgen: topckgen@1001b000 { compatible =3D "mediatek,mt7986-topckgen", "syscon"; reg =3D <0 0x1001B000 0 0x1000>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986b-rfb.dts index 7459ddb6b6f0..7673aa3fa6ae 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -96,6 +96,20 @@ fixed-link { }; =20 &pio { + spi_flash_pins: spi-flash-pins { + mux { + function =3D "spi"; + groups =3D "spi0", "spi0_wp_hold"; + }; + }; + + spic_pins: spic-pins { + mux { + function =3D "spi"; + groups =3D "spi1_2"; + }; + }; + wf_2g_5g_pins: wf-2g-5g-pins { mux { function =3D "wifi"; @@ -128,6 +142,27 @@ conf { }; }; =20 +&spi0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi_flash_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; + spi_nand: spi_nand@0 { + compatible =3D "spi-nand"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + spi-tx-buswidth =3D <4>; + spi-rx-buswidth =3D <4>; + }; +}; + +&spi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spic_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; +}; + &uart0 { status =3D "okay"; }; --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2245EC4332F for ; Sun, 6 Nov 2022 08:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229700AbiKFIuv (ORCPT ); Sun, 6 Nov 2022 03:50:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbiKFIup (ORCPT ); Sun, 6 Nov 2022 03:50:45 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F232495B5; Sun, 6 Nov 2022 01:50:43 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id DA952100789; Sun, 6 Nov 2022 08:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G03vcOdgjh4F0jzuXNPNgwCIh0TlY0vXWFSWrckQleQ=; b=GC229auPiPNjmbc0gd5b2XcmOqXP04RZEhzX1Y7fw/CnNWGqNLRb0+US9mxMPSdasmjsWT GOrGTEMpIaF9Dwmjz7lJy5UPYB3AHvPqUlO4h4L/PKaQ0sRJjFL1l0z/Q+WRCM/WSPqa25 C/Q00bjJvwJHN67L4ajUABWajAFdZts= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 1BA9F36054A; Sun, 6 Nov 2022 08:50:41 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Shih Subject: [RFC v3 03/11] arm64: dts: mt7986: add usb related device nodes Date: Sun, 6 Nov 2022 09:50:26 +0100 Message-Id: <20221106085034.12582-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 2604d3a5-6f37-477f-9c36-8f64f7bb0889 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds USB support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- changes compared to sams original version: - reorder xhci-clocks based on yaml binding --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 28 ++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 55 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 28 ++++++++++ 3 files changed, 111 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index 58f7e6b169bf..de5d771e5251 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -23,6 +23,24 @@ memory@40000000 { device_type =3D "memory"; reg =3D <0 0x40000000 0 0x40000000>; }; + + reg_3p3v: regulator-3p3v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-3.3V"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_5v: regulator-5v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-5V"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + regulator-boot-on; + regulator-always-on; + }; }; =20 ð { @@ -136,6 +154,12 @@ &spi1 { status =3D "okay"; }; =20 +&ssusb { + vusb33-supply =3D <®_3p3v>; + vbus-supply =3D <®_5v>; + status =3D "okay"; +}; + &switch { ports { #address-cells =3D <1>; @@ -197,6 +221,10 @@ &uart2 { status =3D "okay"; }; =20 +&usb_phy { + status =3D "okay"; +}; + &wifi { status =3D "okay"; pinctrl-names =3D "default", "dbdc"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 6d881095d933..58bbecfbab98 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -246,6 +246,61 @@ uart2: serial@11004000 { status =3D "disabled"; }; =20 + ssusb: usb@11200000 { + compatible =3D "mediatek,mt7986-xhci", + "mediatek,mtk-xhci"; + reg =3D <0 0x11200000 0 0x2e00>, + <0 0x11203e00 0 0x0100>; + reg-names =3D "mac", "ippc"; + interrupts =3D ; + clocks =3D <&infracfg CLK_INFRA_IUSB_SYS_CK>, + <&infracfg CLK_INFRA_IUSB_CK>, + <&infracfg CLK_INFRA_IUSB_133_CK>, + <&infracfg CLK_INFRA_IUSB_66M_CK>, + <&topckgen CLK_TOP_U2U3_XHCI_SEL>; + clock-names =3D "sys_ck", + "ref_ck", + "mcu_ck", + "dma_ck", + "xhci_ck"; + phys =3D <&u2port0 PHY_TYPE_USB2>, + <&u3port0 PHY_TYPE_USB3>, + <&u2port1 PHY_TYPE_USB2>; + status =3D "disabled"; + }; + + usb_phy: t-phy@11e10000 { + compatible =3D "mediatek,mt7986-tphy", + "mediatek,generic-tphy-v2"; + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + status =3D "disabled"; + + u2port0: usb-phy@11e10000 { + reg =3D <0 0x11e10000 0 0x700>; + clocks =3D <&topckgen CLK_TOP_DA_U2_REFSEL>, + <&topckgen CLK_TOP_DA_U2_CK_1P_SEL>; + clock-names =3D "ref", "da_ref"; + #phy-cells =3D <1>; + }; + + u3port0: usb-phy@11e10700 { + reg =3D <0 0x11e10700 0 0x900>; + clocks =3D <&topckgen CLK_TOP_USB3_PHY_SEL>; + clock-names =3D "ref"; + #phy-cells =3D <1>; + }; + + u2port1: usb-phy@11e11000 { + reg =3D <0 0x11e11000 0 0x700>; + clocks =3D <&topckgen CLK_TOP_DA_U2_REFSEL>, + <&topckgen CLK_TOP_DA_U2_CK_1P_SEL>; + clock-names =3D "ref", "da_ref"; + #phy-cells =3D <1>; + }; + }; + ethsys: syscon@15000000 { #address-cells =3D <1>; #size-cells =3D <1>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986b-rfb.dts index 7673aa3fa6ae..cd1763fa7f19 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -23,6 +23,24 @@ memory@40000000 { device_type =3D "memory"; reg =3D <0 0x40000000 0 0x40000000>; }; + + reg_3p3v: regulator-3p3v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-3.3V"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_5v: regulator-5v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-5V"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + regulator-boot-on; + regulator-always-on; + }; }; =20 ð { @@ -163,10 +181,20 @@ &spi1 { status =3D "okay"; }; =20 +&ssusb { + vusb33-supply =3D <®_3p3v>; + vbus-supply =3D <®_5v>; + status =3D "okay"; +}; + &uart0 { status =3D "okay"; }; =20 +&usb_phy { + status =3D "okay"; +}; + &wifi { status =3D "okay"; pinctrl-names =3D "default", "dbdc"; --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81604C4332F for ; Sun, 6 Nov 2022 08:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229831AbiKFIuy (ORCPT ); Sun, 6 Nov 2022 03:50:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbiKFIuq (ORCPT ); Sun, 6 Nov 2022 03:50:46 -0500 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C2682BC2; Sun, 6 Nov 2022 01:50:44 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout3.routing.net (Postfix) with ESMTP id 8F167604D1; Sun, 6 Nov 2022 08:50:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qPaMmZqaVOBbVqc55wuqKdkhRgNoXT7scgWLMFxVc9s=; b=Eh30pVi/5l1Zf4aEFcAxNLGboew1N1jSuPf4cbV8NhOkuguW+F8DGn2EhxHLLPzytjr9lu nGkkBj4oxbTfRwh7gE5Y5XqH+N+NDw0NhFGssv/4VQKC44VurpbNLIlaoU+ExYwhzi2/jV 9F+MyzRd+fnoJW+7+3SKm/62RVtaZVg= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id D4AEE360707; Sun, 6 Nov 2022 08:50:41 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Shih , Vic Wu Subject: [RFC v3 04/11] arm64: dts: mt7986: add crypto related device nodes Date: Sun, 6 Nov 2022 09:50:27 +0100 Message-Id: <20221106085034.12582-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: d7ac33d4-4e76-4322-8a82-3ff1893e0786 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds crypto engine support for MT7986. Signed-off-by: Vic Wu Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 4 ++++ 3 files changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index de5d771e5251..2b5d7ea31b4d 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -43,6 +43,10 @@ reg_5v: regulator-5v { }; }; =20 +&crypto { + status =3D "okay"; +}; + ð { status =3D "okay"; =20 diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 58bbecfbab98..1c7a973c28ca 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -205,6 +205,21 @@ trng: rng@1020f000 { status =3D "disabled"; }; =20 + crypto: crypto@10320000 { + compatible =3D "inside-secure,safexcel-eip97"; + reg =3D <0 0x10320000 0 0x40000>; + interrupts =3D , + , + , + ; + interrupt-names =3D "ring0", "ring1", "ring2", "ring3"; + clocks =3D <&infracfg CLK_INFRA_EIP97_CK>; + clock-names =3D "infra_eip97_ck"; + assigned-clocks =3D <&topckgen CLK_TOP_EIP_B_SEL>; + assigned-clock-parents =3D <&apmixedsys CLK_APMIXED_NET2PLL>; + status =3D "disabled"; + }; + uart0: serial@11002000 { compatible =3D "mediatek,mt7986-uart", "mediatek,mt6577-uart"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986b-rfb.dts index cd1763fa7f19..a98025112b5a 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -43,6 +43,10 @@ reg_5v: regulator-5v { }; }; =20 +&crypto { + status =3D "okay"; +}; + ð { status =3D "okay"; =20 --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86474C433FE for ; Sun, 6 Nov 2022 08:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbiKFIu7 (ORCPT ); Sun, 6 Nov 2022 03:50:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbiKFIur (ORCPT ); Sun, 6 Nov 2022 03:50:47 -0500 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6358EEE1B; Sun, 6 Nov 2022 01:50:45 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout1.routing.net (Postfix) with ESMTP id 4C6693FF80; Sun, 6 Nov 2022 08:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I8pt2+KmqRWBiHp3P2XuLLNWs+iO8ZecH+1EyBWArlU=; b=r/k7pfO0LxpxO2HYL9nmgH66BQmhBFgTP7mwqdG+/v2s+UpY5uS2YnNcP+JltFrepeRgtn pnlGMgPUjsH7onTquyff4lTuybZ0ZrJxadlTKFHXk64/HglgpXSBoz3j2GNYm/Dxzn1jQa cu63YlJTFp/mUxZvV9QeEp5MDcr+Iu0= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 886BD36054A; Sun, 6 Nov 2022 08:50:42 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Shih Subject: [RFC v3 05/11] arm64: dts: mt7986: add mmc related device nodes Date: Sun, 6 Nov 2022 09:50:28 +0100 Message-Id: <20221106085034.12582-6-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 107ad7f6-3751-41d1-8083-e99b67535d1e Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds mmc support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- v3: - fix pullups/pulldowns for mt7986a-rfb to have generic bias-pull-* v2: - update mmc-node because clocks changed --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 87 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 15 ++++ 2 files changed, 102 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index 2b5d7ea31b4d..e1a0331aaa5f 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -5,6 +5,8 @@ */ =20 /dts-v1/; +#include + #include "mt7986a.dtsi" =20 / { @@ -24,6 +26,15 @@ memory@40000000 { reg =3D <0 0x40000000 0 0x40000000>; }; =20 + reg_1p8v: regulator-1p8v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-1.8V"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-boot-on; + regulator-always-on; + }; + reg_3p3v: regulator-3p3v { compatible =3D "regulator-fixed"; regulator-name =3D "fixed-3.3V"; @@ -76,7 +87,83 @@ switch: switch@0 { }; }; =20 +&mmc0 { + pinctrl-names =3D "default", "state_uhs"; + pinctrl-0 =3D <&mmc0_pins_default>; + pinctrl-1 =3D <&mmc0_pins_uhs>; + bus-width =3D <8>; + max-frequency =3D <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + hs400-ds-delay =3D <0x14014>; + vmmc-supply =3D <®_3p3v>; + vqmmc-supply =3D <®_1p8v>; + non-removable; + no-sd; + no-sdio; + status =3D "okay"; +}; + &pio { + mmc0_pins_default: mmc0-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + spi_flash_pins: spi-flash-pins { mux { function =3D "spi"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 1c7a973c28ca..32c26b239ae6 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -284,6 +284,21 @@ ssusb: usb@11200000 { status =3D "disabled"; }; =20 + mmc0: mmc@11230000 { + compatible =3D "mediatek,mt7986-mmc"; + reg =3D <0 0x11230000 0 0x1000>, + <0 0x11c20000 0 0x1000>; + interrupts =3D ; + clocks =3D <&topckgen CLK_TOP_EMMC_416M_SEL>, + <&infracfg CLK_INFRA_MSDC_HCK_CK>, + <&infracfg CLK_INFRA_MSDC_CK>, + <&infracfg CLK_INFRA_MSDC_133M_CK>, + <&infracfg CLK_INFRA_MSDC_66M_CK>; + clock-names =3D "source", "hclk", "source_cg", "bus_clk", + "sys_cg"; + status =3D "disabled"; + }; + usb_phy: t-phy@11e10000 { compatible =3D "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86C9DC433FE for ; Sun, 6 Nov 2022 08:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229842AbiKFIu5 (ORCPT ); Sun, 6 Nov 2022 03:50:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229779AbiKFIur (ORCPT ); Sun, 6 Nov 2022 03:50:47 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E982EE21; Sun, 6 Nov 2022 01:50:45 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout2.routing.net (Postfix) with ESMTP id 1EDDD5FDE8; Sun, 6 Nov 2022 08:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8iyCtYf/S4Xy39ojyQ6Mk9mNXir36Uajzk5LIv0/AQQ=; b=dYv65eJwqY6uRrSaPOfN5QWvdG/NrMFLXSyhFXAGGcyXpmomNN2jphTZlOVcqg0AyB5rAT GXi4pcYNyZLWtVl3SsWY1oUWX+2P5ADoENJ9jRJva293UnvpqH5yzf2hxTrgZl0V+Gv7cI VmbIIekzEk+dq39MR5s9QRm1sagM7TU= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 45BED360707; Sun, 6 Nov 2022 08:50:43 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC v3 06/11] arm64: dts: mt7986: add i2c node Date: Sun, 6 Nov 2022 09:50:29 +0100 Message-Id: <20221106085034.12582-7-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: a0a1a384-5582-43d5-9121-0ae405ecdabb Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add i2c Node to mt7986 devicetree. Signed-off-by: Frank Wunderlich --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 32c26b239ae6..a1a788db113a 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -261,6 +261,20 @@ uart2: serial@11004000 { status =3D "disabled"; }; =20 + i2c0: i2c@11008000 { + compatible =3D "mediatek,mt7986-i2c"; + reg =3D <0 0x11008000 0 0x90>, + <0 0x10217080 0 0x80>; + interrupts =3D ; + clock-div =3D <5>; + clocks =3D <&infracfg CLK_INFRA_I2C0_CK>, + <&infracfg CLK_INFRA_AP_DMA_CK>; + clock-names =3D "main", "dma"; + #address-cells =3D <1>; + #size-cells =3D <0>; + status =3D "disabled"; + }; + ssusb: usb@11200000 { compatible =3D "mediatek,mt7986-xhci", "mediatek,mtk-xhci"; --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F664C433FE for ; Sun, 6 Nov 2022 08:51:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbiKFIvD (ORCPT ); Sun, 6 Nov 2022 03:51:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbiKFIus (ORCPT ); Sun, 6 Nov 2022 03:50:48 -0500 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 095C5E0D1; Sun, 6 Nov 2022 01:50:46 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout1.routing.net (Postfix) with ESMTP id BEC0B40408; Sun, 6 Nov 2022 08:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rJ3IqB4e94p/UqzhZv1jkPQ38OMRpHHjnAFsokFJqKg=; b=vmvRsF0H++ooVCuI4QhQIl0w3C5i1LsWVxzYPgP4Nn6T3ZW7Gz3KMFp+KOwd/RXbBMbd2W r6U/B5CPpzfhcLW7ff62Zi/8jm8+wIzdpwBmQD9QgFdO+SOzjJ/yi6tkGaWmu2DBKVDOzS Qxbfg0zR/QpcWww8m9ScUBs3VHqHLWU= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 1921A3608D6; Sun, 6 Nov 2022 08:50:44 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Shih , Jieyy Yang Subject: [RFC v3 07/11] arm64: dts: mt7986: add pcie related device nodes Date: Sun, 6 Nov 2022 09:50:30 +0100 Message-Id: <20221106085034.12582-8-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 3c55aecf-50e0-46c2-a0eb-79f1fdfe2ed3 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds PCIe support for MT7986. Signed-off-by: Jieyy Yang Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- changes compared to sams original version: - add clock-names to pcie node - update clocks to new binding --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 16 ++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 52 ++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index e1a0331aaa5f..01fa08c57c39 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -102,6 +102,15 @@ &mmc0 { non-removable; no-sd; no-sdio; +}; + +&pcie { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pcie_pins>; + status =3D "okay"; +}; + +&pcie_phy { status =3D "okay"; }; =20 @@ -164,6 +173,13 @@ conf-rst { }; }; =20 + pcie_pins: pcie-pins { + mux { + function =3D "pcie"; + groups =3D "pcie_clk", "pcie_wake", "pcie_pereset"; + }; + }; + spi_flash_pins: spi-flash-pins { mux { function =3D "spi"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index a1a788db113a..eb9023857a05 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include =20 / { interrupt-parent =3D <&gic>; @@ -313,6 +314,57 @@ mmc0: mmc@11230000 { status =3D "disabled"; }; =20 + pcie: pcie@11280000 { + compatible =3D "mediatek,mt7986-pcie", + "mediatek,mt8192-pcie"; + device_type =3D "pci"; + #address-cells =3D <3>; + #size-cells =3D <2>; + reg =3D <0x00 0x11280000 0x00 0x4000>; + reg-names =3D "pcie-mac"; + interrupts =3D ; + bus-range =3D <0x00 0xff>; + ranges =3D <0x82000000 0x00 0x20000000 0x00 + 0x20000000 0x00 0x10000000>; + clocks =3D <&infracfg CLK_INFRA_IPCIE_PIPE_CK>, + <&infracfg CLK_INFRA_IPCIE_CK>, + <&infracfg CLK_INFRA_IPCIER_CK>, + <&infracfg CLK_INFRA_IPCIEB_CK>; + clock-names =3D "pl_250m", "tl_26m", "peri_26m", "top_133m"; + status =3D "disabled"; + + phys =3D <&pcie_port PHY_TYPE_PCIE>; + phy-names =3D "pcie-phy"; + + #interrupt-cells =3D <1>; + interrupt-map-mask =3D <0 0 0 0x7>; + interrupt-map =3D <0 0 0 1 &pcie_intc 0>, + <0 0 0 2 &pcie_intc 1>, + <0 0 0 3 &pcie_intc 2>, + <0 0 0 4 &pcie_intc 3>; + pcie_intc: interrupt-controller { + #address-cells =3D <0>; + #interrupt-cells =3D <1>; + interrupt-controller; + }; + }; + + pcie_phy: t-phy@11c00000 { + compatible =3D "mediatek,mt7986-tphy", + "mediatek,generic-tphy-v2"; + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + status =3D "disabled"; + + pcie_port: pcie-phy@11c00000 { + reg =3D <0 0x11c00000 0 0x20000>; + clocks =3D <&clk40m>; + clock-names =3D "ref"; + #phy-cells =3D <1>; + }; + }; + usb_phy: t-phy@11e10000 { compatible =3D "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD77BC433FE for ; Sun, 6 Nov 2022 08:51:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229882AbiKFIvG (ORCPT ); Sun, 6 Nov 2022 03:51:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229805AbiKFIus (ORCPT ); Sun, 6 Nov 2022 03:50:48 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A361A1B2; Sun, 6 Nov 2022 01:50:46 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id 6322D10078B; Sun, 6 Nov 2022 08:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uZ8mFIVx6mijmNh29uWlZjKXwjB8cckQ5XfP/ZRP6SU=; b=s90nOqLME8sbBBMAdVI5RCFi9ks9089R3pgKe2lXKCzGAWTQtITd+I3WiVJhrij4GjpJSn UyyGJjMYgQmzAsMJ0CuoZmLasiv512tFBn+m50f/+oHiVQYpsh4drJcC5u/Nnx2NMVFk7Y fdEPgm3phORcnyJzf14r/5V56DfBHcc= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id B9FDC36054A; Sun, 6 Nov 2022 08:50:44 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski Subject: [RFC v3 08/11] dt-bindings: arm64: dts: mediatek: add compatible for bananapi r3 Date: Sun, 6 Nov 2022 09:50:31 +0100 Message-Id: <20221106085034.12582-9-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: c18c1903-24ee-4cf1-9ef9-e337a5f0395e Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add compatible for mt7986 based BananaPi R3 SBC. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/arm/mediatek.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Document= ation/devicetree/bindings/arm/mediatek.yaml index d76ce4c3819d..7642f9350d2c 100644 --- a/Documentation/devicetree/bindings/arm/mediatek.yaml +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml @@ -83,6 +83,7 @@ properties: - const: mediatek,mt7629 - items: - enum: + - bananapi,bpi-r3 - mediatek,mt7986a-rfb - const: mediatek,mt7986a - items: --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C402C43217 for ; Sun, 6 Nov 2022 08:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbiKFIvL (ORCPT ); Sun, 6 Nov 2022 03:51:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbiKFIuu (ORCPT ); Sun, 6 Nov 2022 03:50:50 -0500 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FA30EE07; Sun, 6 Nov 2022 01:50:47 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout3.routing.net (Postfix) with ESMTP id ED841604D6; Sun, 6 Nov 2022 08:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1ihSCUf56KgWuUu5beIrixSMxMrcZLDmp+MrxlgwDTI=; b=E6wZQINl09TBvz2SmJHtaOe433SwKCpsBlOMLTcqDmKVPi/JAocs9rwvig1o2krPZ45CXS 5K32JLCxN29nd3rCdPg1x3jvZXMITvsWjtzhU6Y6ZKSNBYvLEbwmQuKB3CWsrA4qae1J2s xuBcOncne8hUKHzK4XNsgv8whWKsMvI= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 6642C360707; Sun, 6 Nov 2022 08:50:45 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC v3 09/11] arm64: dts: mt7986: add Bananapi R3 Date: Sun, 6 Nov 2022 09:50:32 +0100 Message-Id: <20221106085034.12582-10-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: f8b65ebf-df8e-4a7b-a06e-ffa77a1ae7ea Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add support for Bananapi R3 SBC. - SD/eMMC support (switching first 4 bits of data-bus with sw6/D) - all rj45 ports and both SFP working (eth1/lan4) - all USB-Ports + SIM-Slot tested - i2c and all uarts tested - wifi tested (with eeprom calibration data) Signed-off-by: Frank Wunderlich --- SPI-NAND/NOR switched (CS by sw5/C) not yet included this is done with DT-Overlays in my tree, don't know how to do it in upstream the right way...added dts files for dtbo and added them with dtbo extension to Makefile works. changes: v3: - rename factory-key to reset-key - add dcin regulator and add it as input for 3v3 (with renaming) - remove memory-node - dropped wifi eeprom (calibration) data - move mmc0 pinctrl to common dtsi and drop sdcard comment - change mmc pull-up/down to have generic bias-pull* v2: - remove pcie to be added later (discussion about clocks) - some fixes based on suggestions on ML - add key suffix like it's done in mt7622-bpi-r64 devicetree - add dash in sfp node names - use reg as unit for switch-node - drop "-3-4" suffix from i2c-pins node name - fix order in Makefile --- arch/arm64/boot/dts/mediatek/Makefile | 2 + .../mediatek/mt7986a-bananapi-bpi-r3-emmc.dts | 31 ++ .../mediatek/mt7986a-bananapi-bpi-r3-sd.dts | 25 + .../dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi | 441 ++++++++++++++++++ 4 files changed, 499 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-em= mc.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd= .dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dt= si diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/me= diatek/Makefile index 0ec90cb3ef28..e8902f2cc58f 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -7,6 +7,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt6797-evb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt6797-x20-dev.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-rfb1.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-bananapi-bpi-r64.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-emmc.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-sd.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986b-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8167-pumpkin.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts = b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts new file mode 100644 index 000000000000..a0ca35b5977e --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Author: Sam.Shih + */ + +/dts-v1/; +#include +#include + +#include "mt7986a-bananapi-bpi-r3.dtsi" + +/ { + model =3D "Bananapi BPI-R3 (emmc)"; +}; + +&mmc0 { + bus-width =3D <8>; + max-frequency =3D <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + hs400-ds-delay =3D <0x14014>; + vmmc-supply =3D <®_3p3v>; + vqmmc-supply =3D <®_1p8v>; + non-removable; + no-sd; + no-sdio; + status =3D "okay"; +}; + diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts b/= arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts new file mode 100644 index 000000000000..06e4691cb815 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Author: Sam.Shih + */ + +/dts-v1/; +#include +#include + +#include "mt7986a-bananapi-bpi-r3.dtsi" + +/ { + model =3D "Bananapi BPI-R3 (sdmmc)"; +}; + +&mmc0 { + bus-width =3D <4>; + max-frequency =3D <52000000>; + cap-sd-highspeed; + vmmc-supply =3D <®_3p3v>; + vqmmc-supply =3D <®_1p8v>; + status =3D "okay"; +}; + diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi b/ar= ch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi new file mode 100644 index 000000000000..93ac67641351 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi @@ -0,0 +1,441 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Authors: Sam.Shih + * Frank Wunderlich + * Daniel Golle + */ + +/dts-v1/; +#include +#include +#include +#include + +#include "mt7986a.dtsi" + +/ { + model =3D "Bananapi BPI-R3"; + compatible =3D "bananapi,bpi-r3", "mediatek,mt7986a"; + + aliases { + serial0 =3D &uart0; + ethernet0 =3D &gmac0; + ethernet1 =3D &gmac1; + }; + + chosen { + stdout-path =3D "serial0:115200n8"; + }; + + dcin: regulator-12vd { + compatible =3D "regulator-fixed"; + regulator-name =3D "12vd"; + regulator-min-microvolt =3D <12000000>; + regulator-max-microvolt =3D <12000000>; + regulator-boot-on; + regulator-always-on; + }; + + gpio-keys { + compatible =3D "gpio-keys"; + + reset-key { + label =3D "reset"; + linux,code =3D ; + gpios =3D <&pio 9 GPIO_ACTIVE_LOW>; + }; + + wps-key { + label =3D "wps"; + linux,code =3D ; + gpios =3D <&pio 10 GPIO_ACTIVE_LOW>; + }; + }; + + /* i2c of the left SFP cage (wan) */ + i2c_sfp1: i2c-gpio-0 { + compatible =3D "i2c-gpio"; + sda-gpios =3D <&pio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios =3D <&pio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us =3D <2>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + /* i2c of the right SFP cage (lan) */ + i2c_sfp2: i2c-gpio-1 { + compatible =3D "i2c-gpio"; + sda-gpios =3D <&pio 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios =3D <&pio 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us =3D <2>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + leds { + compatible =3D "gpio-leds"; + + green_led: led-0 { + color =3D ; + function =3D LED_FUNCTION_POWER; + gpios =3D <&pio 69 GPIO_ACTIVE_HIGH>; + default-state =3D "on"; + }; + + blue_led: led-1 { + color =3D ; + function =3D LED_FUNCTION_STATUS; + gpios =3D <&pio 86 GPIO_ACTIVE_HIGH>; + default-state =3D "off"; + }; + }; + + reg_1p8v: regulator-1p8v { + compatible =3D "regulator-fixed"; + regulator-name =3D "1.8vd"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-boot-on; + regulator-always-on; + vin-supply =3D <&dcin>; + }; + + reg_3p3v: regulator-3p3v { + compatible =3D "regulator-fixed"; + regulator-name =3D "3.3vd"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + vin-supply =3D <&dcin>; + }; + + reg_5v: regulator-5v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-5p1"; + regulator-min-microvolt =3D <5100000>; + regulator-max-microvolt =3D <5100000>; + regulator-boot-on; + regulator-always-on; + vin-supply =3D <&dcin>; + }; + + /* left SFP cage (wan) */ + sfp1: sfp-1 { + compatible =3D "sff,sfp"; + i2c-bus =3D <&i2c_sfp1>; + los-gpio =3D <&pio 46 GPIO_ACTIVE_HIGH>; + moddef0-gpio =3D <&pio 49 GPIO_ACTIVE_LOW>; + tx-disable-gpio =3D <&pio 20 GPIO_ACTIVE_HIGH>; + tx-fault-gpio =3D <&pio 7 GPIO_ACTIVE_HIGH>; + }; + + /* right SFP cage (lan) */ + sfp2: sfp-2 { + compatible =3D "sff,sfp"; + i2c-bus =3D <&i2c_sfp2>; + los-gpios =3D <&pio 31 GPIO_ACTIVE_HIGH>; + mod-def0-gpios =3D <&pio 47 GPIO_ACTIVE_LOW>; + tx-disable-gpios =3D <&pio 15 GPIO_ACTIVE_HIGH>; + tx-fault-gpios =3D <&pio 48 GPIO_ACTIVE_HIGH>; + }; +}; + +&crypto { + status =3D "okay"; +}; + +ð { + status =3D "okay"; + + gmac0: mac@0 { + compatible =3D "mediatek,eth-mac"; + reg =3D <0>; + phy-mode =3D "2500base-x"; + + fixed-link { + speed =3D <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible =3D "mediatek,eth-mac"; + reg =3D <1>; + phy-mode =3D "2500base-x"; + sfp =3D <&sfp1>; + managed =3D "in-band-status"; + }; + + mdio: mdio-bus { + #address-cells =3D <1>; + #size-cells =3D <0>; + }; +}; + +&mdio { + switch: switch@31 { + compatible =3D "mediatek,mt7531"; + reg =3D <31>; + reset-gpios =3D <&pio 5 GPIO_ACTIVE_HIGH>; + }; +}; + +&mmc0 { + pinctrl-names =3D "default", "state_uhs"; + pinctrl-0 =3D <&mmc0_pins_default>; + pinctrl-1 =3D <&mmc0_pins_uhs>; +}; + +&i2c0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2c_pins>; + status =3D "okay"; +}; + +&pio { + i2c_pins: i2c-pins { + mux { + function =3D "i2c"; + groups =3D "i2c"; + }; + }; + + mmc0_pins_default: mmc0-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + + spi_flash_pins: spi-flash-pins { + mux { + function =3D "spi"; + groups =3D "spi0", "spi0_wp_hold"; + }; + }; + + spic_pins: spic-pins { + mux { + function =3D "spi"; + groups =3D "spi1_0"; + }; + }; + + uart1_pins: uart1-pins { + mux { + function =3D "uart"; + groups =3D "uart1_rx_tx"; + }; + }; + + uart2_pins: uart2-pins { + mux { + function =3D "uart"; + groups =3D "uart2_0_rx_tx"; + }; + }; + + wf_2g_5g_pins: wf-2g-5g-pins { + mux { + function =3D "wifi"; + groups =3D "wf_2g", "wf_5g"; + }; + conf { + pins =3D "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength =3D <4>; + }; + }; + + wf_dbdc_pins: wf-dbdc-pins { + mux { + function =3D "wifi"; + groups =3D "wf_dbdc"; + }; + conf { + pins =3D "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength =3D <4>; + }; + }; + + wf_led_pins: wf-led-pins { + mux { + function =3D "led"; + groups =3D "wifi_led"; + }; + }; +}; + +&spi0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi_flash_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; +}; + +&spi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spic_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; +}; + +&ssusb { + vusb33-supply =3D <®_3p3v>; + vbus-supply =3D <®_5v>; + status =3D "okay"; +}; + +&switch { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + label =3D "wan"; + }; + + port@1 { + reg =3D <1>; + label =3D "lan0"; + }; + + port@2 { + reg =3D <2>; + label =3D "lan1"; + }; + + port@3 { + reg =3D <3>; + label =3D "lan2"; + }; + + port@4 { + reg =3D <4>; + label =3D "lan3"; + }; + + port5: port@5 { + reg =3D <5>; + label =3D "lan4"; + phy-mode =3D "2500base-x"; + sfp =3D <&sfp2>; + managed =3D "in-band-status"; + }; + + port@6 { + reg =3D <6>; + label =3D "cpu"; + ethernet =3D <&gmac0>; + phy-mode =3D "2500base-x"; + + fixed-link { + speed =3D <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&trng { + status =3D "okay"; +}; + +&uart0 { + status =3D "okay"; +}; + +&uart1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&uart1_pins>; + status =3D "okay"; +}; + +&uart2 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&uart2_pins>; + status =3D "okay"; +}; + +&usb_phy { + status =3D "okay"; +}; + +&watchdog { + status =3D "okay"; +}; + +&wifi { + status =3D "okay"; + pinctrl-names =3D "default", "dbdc"; + pinctrl-0 =3D <&wf_2g_5g_pins>, <&wf_led_pins>; + pinctrl-1 =3D <&wf_dbdc_pins>, <&wf_led_pins>; +}; + --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 204DAC433FE for ; Sun, 6 Nov 2022 08:51:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229805AbiKFIvP (ORCPT ); Sun, 6 Nov 2022 03:51:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbiKFIuu (ORCPT ); Sun, 6 Nov 2022 03:50:50 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF2AADF60; Sun, 6 Nov 2022 01:50:47 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout2.routing.net (Postfix) with ESMTP id 7C7365FF40; Sun, 6 Nov 2022 08:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xWv16uoFOb6bItdqVi9OeYNnzGyV0xjUXLKdhVz8KGs=; b=hpZ5+Tn7KBcpoPDAZ/XeZBAhLzcJUC8XYQOxJRCzxkLPH05hQlnAzQMPebnHEkI9sNrnLz OU+srMGfTWpM5w2qxBzQpaDuRpvDcadWiwV2sBfbvO5BO2XCWV2R9EzXruvmAOZ0BgkSDZ 0g40hdrFnZxquINAlSmFtxwveMwnQV4= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id ED25936054A; Sun, 6 Nov 2022 08:50:45 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC v3 10/11] arm64: dts: mt7986: add PCIe nodes to BananaPi-R3 Date: Sun, 6 Nov 2022 09:50:33 +0100 Message-Id: <20221106085034.12582-11-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 3b59d6be-ad3e-472f-8b86-c55df8f8e314 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add PCIe nodes to Banana Pi R3 SBC which is used on M.2 slot. Signed-off-by: Frank Wunderlich --- .../dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi b/ar= ch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi index 93ac67641351..01f92db3336a 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi @@ -195,6 +195,16 @@ &i2c0 { status =3D "okay"; }; =20 +&pcie { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pcie_pins>; + status =3D "okay"; +}; + +&pcie_phy { + status =3D "okay"; +}; + &pio { i2c_pins: i2c-pins { mux { @@ -261,6 +271,13 @@ conf-rst { }; }; =20 + pcie_pins: pcie-pins { + mux { + function =3D "pcie"; + groups =3D "pcie_clk", "pcie_pereset"; + }; + }; + spi_flash_pins: spi-flash-pins { mux { function =3D "spi"; --=20 2.34.1 From nobody Thu Nov 14 07:30:57 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F154C4332F for ; Sun, 6 Nov 2022 08:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbiKFIvT (ORCPT ); Sun, 6 Nov 2022 03:51:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbiKFIu4 (ORCPT ); Sun, 6 Nov 2022 03:50:56 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A859FEE1B; Sun, 6 Nov 2022 01:50:48 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id 15F041007FA; Sun, 6 Nov 2022 08:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kvVMLiuM+XeZ0ADmdp7nYgDyGhyaL6XbW/9kpCQCWGs=; b=KoKDbAsFd0Q7TrVi1k6jLVIkUPdeGEuPyy0MaUNB0crwRGb1k6RQl49+uVB6mdL+VsRyp6 pLAXBv2iZCH9vx33nKcK9m6jbR8Rxx/eWLdBEi6tUQXR9EXrR9pJClSVP+h0fcyxqYHBur agxBoH+/axY77lP4t/nJhDIq5pUyn6c= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 81F3E360707; Sun, 6 Nov 2022 08:50:46 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC v3 11/11] arm64: dts: mt7986: add BPI-R3 nand/nor overlays Date: Sun, 6 Nov 2022 09:50:34 +0100 Message-Id: <20221106085034.12582-12-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 7abe5213-43d3-49b9-acfc-560d931496e8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add devicetree overlays for using nand and nor on BPI-R3. Signed-off-by: Frank Wunderlich --- arch/arm64/boot/dts/mediatek/Makefile | 2 + .../mediatek/mt7986a-bananapi-bpi-r3-nand.dts | 53 +++++++++++++++ .../mediatek/mt7986a-bananapi-bpi-r3-nor.dts | 67 +++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-na= nd.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-no= r.dts diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/me= diatek/Makefile index e8902f2cc58f..d42208c4090d 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -8,6 +8,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt6797-x20-dev.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-rfb1.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-bananapi-bpi-r64.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-emmc.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-nand.dtbo +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-nor.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-sd.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986b-rfb.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts = b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts new file mode 100644 index 000000000000..e12ff825bb50 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ + +/dts-v1/; +/plugin/; + +//dtc -O dtb -o bpi-r3-nand.dtbo mt7986a-bananapi-bpi-r3-nand.dts + +/ { + compatible =3D "bananapi,bpi-r3", "mediatek,mt7986a"; + + fragment@0 { + target-path =3D "/soc/spi@1100a000"; + __overlay__ { + #address-cells =3D <1>; + #size-cells =3D <0>; + spi_nand: spi_nand@0 { + compatible =3D "spi-nand"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + spi-tx-buswidth =3D <4>; + spi-rx-buswidth =3D <4>; + + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + partition@0 { + label =3D "bl2"; + reg =3D <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label =3D "reserved"; + reg =3D <0x80000 0x300000>; + }; + + partition@380000 { + label =3D "fip"; + reg =3D <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label =3D "ubi"; + reg =3D <0x580000 0x7a80000>; + }; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts b= /arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts new file mode 100644 index 000000000000..f11ffd9c4bce --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts @@ -0,0 +1,67 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ + +/dts-v1/; +/plugin/; + +//dtc -O dtb -o bpi-r3-nor.dtbo mt7986a-bananapi-bpi-r3-nor.dts + +/ { + compatible =3D "bananapi,bpi-r3", "mediatek,mt7986a"; + + fragment@0 { + target-path =3D "/soc/spi@1100a000"; + __overlay__ { + #address-cells =3D <1>; + #size-cells =3D <0>; + flash@0 { + compatible =3D "jedec,spi-nor"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + partition@0 { + label =3D "bl2"; + reg =3D <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label =3D "reserved"; + reg =3D <0x20000 0x20000>; + }; + + partition@40000 { + label =3D "u-boot-env"; + reg =3D <0x40000 0x40000>; + }; + + partition@80000 { + label =3D "reserved2"; + reg =3D <0x80000 0x80000>; + }; + + partition@100000 { + label =3D "fip"; + reg =3D <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + label =3D "recovery"; + reg =3D <0x180000 0xa80000>; + }; + + partition@c00000 { + label =3D "fit"; + reg =3D <0xc00000 0x1400000>; + compatible =3D "denx,fit"; + }; + }; + }; + }; + }; +}; --=20 2.34.1