Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3901200rwd; Sat, 17 Jun 2023 04:21:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6x+x38+Py9sBfU0IieWv2kkte9TwjiDaqiL0mQF/aPm3WCbfj3Ekqd4nZg3Z5UgEOCbB3C X-Received: by 2002:a17:903:18a:b0:1b0:1095:f4f6 with SMTP id z10-20020a170903018a00b001b01095f4f6mr5887649plg.24.1687000901394; Sat, 17 Jun 2023 04:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687000901; cv=none; d=google.com; s=arc-20160816; b=RNb22nXKvSrX5SWI5bnMIOgkTaKtRSwYubisM05wrfUOb8w9CVDG0R4E08iQfvM1ih XBSngMJyPuq6f8tvoIf2sxncZtt2Ex7I+jgUOlXf1ts0UwRCb2PahXprjeUSxJ8A4iyw tWtCSX/Zy7r0UgenkueljwdlRefYFXsdSMZxBz0uhepBpQydwLYj0yqg3Q1q8XARRQbh MxsqpaUhf6xqPgm7+f9WBKK99VOfSV7NolhJNzjXHX/uz25J/IRJETT3qwx1QYfo/uWg HG7JVvSiRs1e9armY/iCPq1J1rml0lUZhy74YKQU2Z1W9KtIFX2Sg4AAs0jNdAcP/7CM OCpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:in-reply-to:from :content-language:references:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=kSdb/lHB+3ih+VSQlmzyh6XZ/NXli7OIBoYYuu8Cufw=; b=Dp8PK6z7xls7gxu+9TyOQjk+lBi/hHHWQ1aByJBHjbiq0ev3upWdJ3l/BSj1Zgj3aY /wiGocJlpU3+sIWwQLu6aWcPKaAPn8ULDWRX4H94Zfmu/WoI2qDFMroR2B9bNB5y1WLZ esH9GJJAQT2yQ0/idyuDwWs+a3I6ws7lIfRQC/p0gKaM8CzXDy6onHXly2zT6LyFddF+ eBqZq4caIwhWGh5Cd3/IF8QVIzQyDXLMXsEUaHXJvwLb+sFstDc4CZVu+D5YM9SKGVqz q2PZZT7tnyYPp+ZUO2MT7R2jSVFGTRO9y1W2XLt/CkuZv/28E3Iyf/NSe8nKXC1/Twqr fyVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=s1 header.b=bcI0QuLn; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kwiboo.se Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u14-20020a170902e5ce00b001b055bd62f6si962738plf.431.2023.06.17.04.21.25; Sat, 17 Jun 2023 04:21:41 -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=pass header.i=@kwiboo.se header.s=s1 header.b=bcI0QuLn; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kwiboo.se Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229683AbjFQLIh (ORCPT + 99 others); Sat, 17 Jun 2023 07:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234055AbjFQLIg (ORCPT ); Sat, 17 Jun 2023 07:08:36 -0400 Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2E11172A for ; Sat, 17 Jun 2023 04:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=mime-version:subject:references:from:in-reply-to:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=kSdb/lHB+3ih+VSQlmzyh6XZ/NXli7OIBoYYuu8Cufw=; b=bcI0QuLnUJTOtgdZTqzhhLRruVnZqsfg/um4ov/DYhsAy/8cp32tX50BVPPTUAbRnJqF ddIYFxIvMpSHcxqglb0JX0arSLrNuvECS5djPQCr2k6aYZk85mzLdXjMHN5ksfZbefo89o SYEDMOJLBZvUSo4glYurft6Q2N9KnH0Mxm8gyZdXNTTqL4phiKRiz1iSyUp/zthMsScqJO JThmslEur6smyncwjfqPWd0WweLSJ/V33pdLt3S0Np3gGPmszBfNtwgUiuXffYCeI8nL89 7kEObxdqPagK9Pcx4CGInapTnEbAlAMYljrLUK99S9Li8LyekCRBnXt3gXgf/5IQ== Received: by filterdrecv-66949dbc98-2h875 with SMTP id filterdrecv-66949dbc98-2h875-1-648D9430-15 2023-06-17 11:08:32.542967934 +0000 UTC m=+3238133.466406997 Received: from [192.168.1.50] (unknown) by geopod-ismtpd-6 (SG) with ESMTP id 1ayzDbPESH2MEknCWup2WQ Sat, 17 Jun 2023 11:08:32.109 +0000 (UTC) Message-ID: Date: Sat, 17 Jun 2023 11:08:33 +0000 (UTC) MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v1 4/4] arm64: dts: rockchip: rk3588: add PCIe2 support References: <20230616170022.76107-1-sebastian.reichel@collabora.com> <20230616170022.76107-5-sebastian.reichel@collabora.com> Content-Language: en-US From: Jonas Karlman In-Reply-To: <20230616170022.76107-5-sebastian.reichel@collabora.com> X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h51CekI0YDjjeuLZk?= =?us-ascii?Q?1rLxEDrvM81hUy0jITzmLCj93Zvh1XjElbcsZKX?= =?us-ascii?Q?yL=2FEwnLgHvNPAL81M6wPxoQL4XXG3kU=2FpT+UnkP?= =?us-ascii?Q?uAKZBe7vU+UuZp3CfkHeS=2FPsFtlc04uQ8BD5l0q?= =?us-ascii?Q?gJDYlSgTSo+3NzzUg0k=2FrfRmhCWEk8=2FNTqSJ6w?= To: Sebastian Reichel Cc: linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, Jingoo Han , Gustavo Pimentel , Bjorn Helgaas , Lorenzo Pieralisi , Krzysztof =?iso-8859-2?q?Wilczy=F1ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Shawn Lin , Simon Xue , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, Kever Yang X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 Hi Sebastian, On 2023-06-16 19:00, Sebastian Reichel wrote: > Add all three PCIe2 IP blocks to the RK3588 DT. Note, that RK3588 > also has two PCIe3 IP blocks, that will be handled separately. > > Co-developed-by: Kever Yang > Signed-off-by: Kever Yang > Signed-off-by: Sebastian Reichel > --- > arch/arm64/boot/dts/rockchip/rk3588.dtsi | 54 +++++++++++ > arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 108 ++++++++++++++++++++++ > 2 files changed, 162 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588.dtsi b/arch/arm64/boot/dts/rockchip/rk3588.dtsi > index b9508cea34f1..40fee1367b34 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3588.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3588.dtsi > @@ -80,6 +80,60 @@ i2s10_8ch: i2s@fde00000 { > status = "disabled"; > }; > > + pcie2x1l0: pcie@fe170000 { > + compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie"; > + #address-cells = <3>; > + #size-cells = <2>; > + bus-range = <0x20 0x2f>; > + clocks = <&cru ACLK_PCIE_1L0_MSTR>, <&cru ACLK_PCIE_1L0_SLV>, > + <&cru ACLK_PCIE_1L0_DBI>, <&cru PCLK_PCIE_1L0>, > + <&cru CLK_PCIE_AUX2>, <&cru CLK_PCIE1L0_PIPE>; > + clock-names = "aclk_mst", "aclk_slv", > + "aclk_dbi", "pclk", > + "aux", "pipe"; > + device_type = "pci"; > + interrupts = , > + , > + , > + , > + ; > + interrupt-names = "sys", "pmc", "msg", "legacy", "err"; > + #interrupt-cells = <1>; > + interrupt-map-mask = <0 0 0 7>; > + interrupt-map = <0 0 0 1 &pcie2x1l0_intc 0>, > + <0 0 0 2 &pcie2x1l0_intc 1>, > + <0 0 0 3 &pcie2x1l0_intc 2>, > + <0 0 0 4 &pcie2x1l0_intc 3>; > + linux,pci-domain = <2>; > + num-ib-windows = <8>; > + num-ob-windows = <8>; > + num-viewport = <4>; > + max-link-speed = <2>; > + msi-map = <0x2000 &its0 0x2000 0x1000>; > + num-lanes = <1>; > + phys = <&combphy1_ps PHY_TYPE_PCIE>; > + phy-names = "pcie-phy"; > + power-domains = <&power RK3588_PD_PCIE>; > + ranges = <0x01000000 0x0 0xf2100000 0x0 0xf2100000 0x0 0x00100000>, > + <0x02000000 0x0 0xf2200000 0x0 0xf2200000 0x0 0x00e00000>, > + <0x03000000 0x9 0x80000000 0x9 0x80000000 0x0 0x40000000>; For the RK356x [1] and for RK3588 in u-boot [2] the pci_addr range was changed to be in 32-bit address space, start address at 0x40000000, to make the 1 GB region available for 32-bit BARs. Something that possible could/should be done here too? E.g.: <0x03000000 0x0 0x40000000 0x9 0x80000000 0x0 0x40000000> [1] https://lore.kernel.org/all/20230601132516.153934-1-frattaroli.nicolas@gmail.com/ [2] https://lore.kernel.org/u-boot/20230517100102.109855-1-eugen.hristev@collabora.com/ > + reg = <0xa 0x40800000 0x0 0x00400000>, > + <0x0 0xfe170000 0x0 0x00010000>, > + <0x0 0xf2000000 0x0 0x00100000>; > + reg-names = "dbi", "apb", "config"; > + resets = <&cru SRST_PCIE2_POWER_UP>, <&cru SRST_P_PCIE2>; > + reset-names = "pwr", "pipe"; > + status = "disabled"; > + > + pcie2x1l0_intc: legacy-interrupt-controller { > + interrupt-controller; > + #address-cells = <0>; > + #interrupt-cells = <1>; > + interrupt-parent = <&gic>; > + interrupts = ; > + }; > + }; > + > gmac0: ethernet@fe1b0000 { > compatible = "rockchip,rk3588-gmac", "snps,dwmac-4.20a"; > reg = <0x0 0xfe1b0000 0x0 0x10000>; > diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > index a73b17f597af..b5fdc046d8f7 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > @@ -1670,6 +1670,114 @@ qos_vop_m1: qos@fdf82200 { > reg = <0x0 0xfdf82200 0x0 0x20>; > }; > > + pcie2x1l1: pcie@fe180000 { > + compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie"; > + #address-cells = <3>; > + #size-cells = <2>; > + bus-range = <0x30 0x3f>; > + clocks = <&cru ACLK_PCIE_1L1_MSTR>, <&cru ACLK_PCIE_1L1_SLV>, > + <&cru ACLK_PCIE_1L1_DBI>, <&cru PCLK_PCIE_1L1>, > + <&cru CLK_PCIE_AUX3>, <&cru CLK_PCIE1L1_PIPE>; > + clock-names = "aclk_mst", "aclk_slv", > + "aclk_dbi", "pclk", > + "aux", "pipe"; > + device_type = "pci"; > + interrupts = , > + , > + , > + , > + ; > + interrupt-names = "sys", "pmc", "msg", "legacy", "err"; > + #interrupt-cells = <1>; > + interrupt-map-mask = <0 0 0 7>; > + interrupt-map = <0 0 0 1 &pcie2x1l1_intc 0>, > + <0 0 0 2 &pcie2x1l1_intc 1>, > + <0 0 0 3 &pcie2x1l1_intc 2>, > + <0 0 0 4 &pcie2x1l1_intc 3>; > + linux,pci-domain = <3>; > + num-ib-windows = <8>; > + num-ob-windows = <8>; > + num-viewport = <4>; > + max-link-speed = <2>; > + msi-map = <0x3000 &its0 0x3000 0x1000>; > + num-lanes = <1>; > + phys = <&combphy2_psu PHY_TYPE_PCIE>; > + phy-names = "pcie-phy"; > + power-domains = <&power RK3588_PD_PCIE>; > + ranges = <0x01000000 0x0 0xf3100000 0x0 0xf3100000 0x0 0x00100000>, > + <0x02000000 0x0 0xf3200000 0x0 0xf3200000 0x0 0x00e00000>, > + <0x03000000 0x9 0xc0000000 0x9 0xc0000000 0x0 0x40000000>; And: <0x03000000 0x0 0x40000000 0x9 0xc0000000 0x0 0x40000000> > + reg = <0xa 0x40c00000 0x0 0x00400000>, > + <0x0 0xfe180000 0x0 0x00010000>, > + <0x0 0xf3000000 0x0 0x00100000>; > + reg-names = "dbi", "apb", "config"; > + resets = <&cru SRST_PCIE3_POWER_UP>, <&cru SRST_P_PCIE3>; > + reset-names = "pwr", "pipe"; > + status = "disabled"; > + > + pcie2x1l1_intc: legacy-interrupt-controller { > + interrupt-controller; > + #address-cells = <0>; > + #interrupt-cells = <1>; > + interrupt-parent = <&gic>; > + interrupts = ; > + }; > + }; > + > + pcie2x1l2: pcie@fe190000 { > + compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie"; > + #address-cells = <3>; > + #size-cells = <2>; > + bus-range = <0x40 0x4f>; > + clocks = <&cru ACLK_PCIE_1L2_MSTR>, <&cru ACLK_PCIE_1L2_SLV>, > + <&cru ACLK_PCIE_1L2_DBI>, <&cru PCLK_PCIE_1L2>, > + <&cru CLK_PCIE_AUX4>, <&cru CLK_PCIE1L2_PIPE>; > + clock-names = "aclk_mst", "aclk_slv", > + "aclk_dbi", "pclk", > + "aux", "pipe"; > + device_type = "pci"; > + interrupts = , > + , > + , > + , > + ; > + interrupt-names = "sys", "pmc", "msg", "legacy", "err"; > + #interrupt-cells = <1>; > + interrupt-map-mask = <0 0 0 7>; > + interrupt-map = <0 0 0 1 &pcie2x1l2_intc 0>, > + <0 0 0 2 &pcie2x1l2_intc 1>, > + <0 0 0 3 &pcie2x1l2_intc 2>, > + <0 0 0 4 &pcie2x1l2_intc 3>; > + linux,pci-domain = <4>; > + num-ib-windows = <8>; > + num-ob-windows = <8>; > + num-viewport = <4>; > + max-link-speed = <2>; > + msi-map = <0x4000 &its0 0x4000 0x1000>; > + num-lanes = <1>; > + phys = <&combphy0_ps PHY_TYPE_PCIE>; > + phy-names = "pcie-phy"; > + power-domains = <&power RK3588_PD_PCIE>; > + ranges = <0x01000000 0x0 0xf4100000 0x0 0xf4100000 0x0 0x00100000>, > + <0x02000000 0x0 0xf4200000 0x0 0xf4200000 0x0 0x00e00000>, > + <0x03000000 0xa 0x00000000 0xa 0x00000000 0x0 0x40000000>; And: <0x03000000 0x0 0x40000000 0xa 0x00000000 0x0 0x40000000> Regards, Jonas > + reg = <0xa 0x41000000 0x0 0x00400000>, > + <0x0 0xfe190000 0x0 0x00010000>, > + <0x0 0xf4000000 0x0 0x00100000>; > + reg-names = "dbi", "apb", "config"; > + resets = <&cru SRST_PCIE4_POWER_UP>, <&cru SRST_P_PCIE4>; > + reset-names = "pwr", "pipe"; > + status = "disabled"; > + > + pcie2x1l2_intc: legacy-interrupt-controller { > + interrupt-controller; > + #address-cells = <0>; > + #interrupt-cells = <1>; > + interrupt-parent = <&gic>; > + interrupts = ; > + }; > + }; > + > gmac1: ethernet@fe1c0000 { > compatible = "rockchip,rk3588-gmac", "snps,dwmac-4.20a"; > reg = <0x0 0xfe1c0000 0x0 0x10000>;