Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp483662iog; Wed, 15 Jun 2022 06:22:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vVtoQnRkltQmwYCdhRnjXUW5Mb+GC1PfFBTLZsNEJRstDFOzmh6o7SwjJDtoWzLgaCVb+v X-Received: by 2002:a17:90b:1650:b0:1e4:cff1:5a86 with SMTP id il16-20020a17090b165000b001e4cff15a86mr10238499pjb.30.1655299321343; Wed, 15 Jun 2022 06:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655299321; cv=none; d=google.com; s=arc-20160816; b=uiepnhQr5VPLTIc25hW0ls+AQ1sqxUNT+kG6JZKKNmc3fqt1Osb4t0kbjng0ZmgmdN IXD6b+ZlHIZ39Q46nD2HqhDYl/ST9rc0PWK8cMAaoH0asr1VZC9hnaKVtwOSIVFNEFtU /f6nl9q5b0nz4bMvUSym4Kmu+8lKMR20o9PlWHFMBNKkj3PaaFgxcqfEGr7gS/dahqCb /KMsngBqMfIk3GHQqJUO/pKxzD0mdbV7WJ2pXGulLuTVy2aHoV88kT4Ag2HSm61eqofE 1PvsdWR6XL2eVJ0SaTUEOZv4OAbvfhDmKrvqED1kfggfKiqXI6C3Pjv+MKdIkUuZNefd PHjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8i+vtaNLvafDy+XvSwBXQvm+ojJpl4/jOdUoqAvYxa4=; b=0DcVipcUwOhN/WS/NI4GvSWca3dnriQ8YoZ2nbM5FqHbFECWnoFRqXJymxNhPias1+ 3DWq9EjbUZLmK1wL5A7/t1I7lM2s9tWXhmId/NLSw7FON0q7gwN0mXuUjCqyIdZeVVjh BMTtykddqvUvAurFF/eQWTbmt6dWD2JKrZqIKgcf+iOI62yTzdiY8H+T0ac9XO5EkigZ xLcJC8Ws1Hlkd+O4H/Q3A9FsR4/Dx4i3GBfiu6tyGOU0SJp+MFzOyxuPLS3BHTSPx5Tw wYO5Adx1EVZe8O+lmoy2sQXuD/BK25fAAmP3VryoMpGnsUEnmQO4ofg2D5zP3wJ7eDqg 2f3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=Rbvbx53K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020a63fd47000000b00403af319c1esi17891702pgj.625.2022.06.15.06.21.48; Wed, 15 Jun 2022 06:22:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=Rbvbx53K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349249AbiFOMxs (ORCPT + 99 others); Wed, 15 Jun 2022 08:53:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349111AbiFOMxq (ORCPT ); Wed, 15 Jun 2022 08:53:46 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0C3A2DD5F; Wed, 15 Jun 2022 05:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=8i+vtaNLvafDy+XvSwBXQvm+ojJpl4/jOdUoqAvYxa4=; b=Rbvbx53KggGbeatcidVKM0QKDi 9DX8IoZd3zGrgJ1Ad9U5GLYqgWKVEJxfXf9pebjcctshMXliepR1hGJtsHcgtEpv5tjJcie0Q67X4 smc7Z7iiIT0FjPzo7SCg6kDbTGC5h6rMxQFsc9v1Um33jz3Kpe8JkiBCCGR6i5t3WOQQ=; Received: from p200300daa7110200c95c40f4ac0d06a0.dip0.t-ipconnect.de ([2003:da:a711:200:c95c:40f4:ac0d:6a0] helo=Maecks.lan) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1o1SWg-0000WR-15; Wed, 15 Jun 2022 14:53:38 +0200 From: Felix Fietkau To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH RESEND v10 3/3] ARM: dts: Add PCIe support for Airoha EN7523 Date: Wed, 15 Jun 2022 14:53:35 +0200 Message-Id: <20220615125335.96089-3-nbd@nbd.name> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615125335.96089-1-nbd@nbd.name> References: <20220615125335.96089-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This uses the MediaTek MT7622 PCIe driver, since the PCIe IP block is nearly identical to the one in MT7622 Signed-off-by: Felix Fietkau --- arch/arm/boot/dts/en7523-evb.dts | 8 +++++ arch/arm/boot/dts/en7523.dtsi | 58 ++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/arch/arm/boot/dts/en7523-evb.dts b/arch/arm/boot/dts/en7523-evb.dts index a8d8bb0419a0..f23a25cce119 100644 --- a/arch/arm/boot/dts/en7523-evb.dts +++ b/arch/arm/boot/dts/en7523-evb.dts @@ -33,3 +33,11 @@ &gpio0 { &gpio1 { status = "okay"; }; + +&pcie0 { + status = "okay"; +}; + +&pcie1 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/en7523.dtsi b/arch/arm/boot/dts/en7523.dtsi index 2e705b87b6c1..7f839331a777 100644 --- a/arch/arm/boot/dts/en7523.dtsi +++ b/arch/arm/boot/dts/en7523.dtsi @@ -143,4 +143,62 @@ gpio1: gpio@1fbf0270 { gpio-controller; #gpio-cells = <2>; }; + + pcie0: pcie@1fa91000 { + compatible = "airoha,en7523-pcie", "mediatek,mt7622-pcie"; + device_type = "pci"; + reg = <0x1fa91000 0x1000>; + reg-names = "port0"; + linux,pci-domain = <0>; + #address-cells = <3>; + #size-cells = <2>; + interrupts = ; + interrupt-names = "pcie_irq"; + clocks = <&scu EN7523_CLK_PCIE>; + clock-names = "sys_ck0"; + bus-range = <0x00 0xff>; + ranges = <0x82000000 0 0x20000000 0x20000000 0 0x8000000>; + status = "disabled"; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie_intc0 0>, + <0 0 0 2 &pcie_intc0 1>, + <0 0 0 3 &pcie_intc0 2>, + <0 0 0 4 &pcie_intc0 3>; + pcie_intc0: interrupt-controller { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + }; + }; + + pcie1: pcie@1fa92000 { + compatible = "airoha,en7523-pcie", "mediatek,mt7622-pcie"; + device_type = "pci"; + reg = <0x1fa92000 0x1000>; + reg-names = "port1"; + linux,pci-domain = <1>; + #address-cells = <3>; + #size-cells = <2>; + interrupts = ; + interrupt-names = "pcie_irq"; + clocks = <&scu EN7523_CLK_PCIE>; + clock-names = "sys_ck1"; + bus-range = <0x00 0xff>; + ranges = <0x82000000 0 0x28000000 0x28000000 0 0x8000000>; + status = "disabled"; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie_intc1 0>, + <0 0 0 2 &pcie_intc1 1>, + <0 0 0 3 &pcie_intc1 2>, + <0 0 0 4 &pcie_intc1 3>; + pcie_intc1: interrupt-controller { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + }; + }; }; -- 2.36.1