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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4CCD0C7EE22 for ; Mon, 15 May 2023 08:19:08 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 174C085C5E; Mon, 15 May 2023 10:19:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="CZEfDzdo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A61BF82790; Mon, 15 May 2023 10:19:03 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9218085BFB for ; Mon, 15 May 2023 10:19:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=eugen.hristev@collabora.com Received: from [192.168.18.121] (unknown [46.8.172.197]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ehristev) by madras.collabora.co.uk (Postfix) with ESMTPSA id C984E66031D7; Mon, 15 May 2023 09:18:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1684138740; bh=fUAOMhXzlYCQZjMmjcHFKx312Af8zuR7F/jFSfHnsG4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CZEfDzdo5C2C8W2fWmw/A5NojMIPwmtYgTCsDsZYoInBCqGisUl/G92WoCSftl3s4 9E+mLYy32NdA/r6Hik5fH/sswa4t1aIH1hR6PWT7nz6y9P62QYE48yTpMO9M0oP/40 XVjWiodlWWwkgTTxdEdJHq8KtwIGrG5+6aw0M4bTCq/YUEDMgwW2MDoFHQ3OXF89oE 0qEUXUiYW8yvTDsqie52YnFwKCRQru9cw6pgu5IrbTv9RljNsqoj3/CcBDQQxLXH8M rTzkCTbptbgAm+QozQZ6jHRXbbf5BRw/76/a+PzBDSUe3JB0KLinNmI4rBBjT6xvB0 t/qHB6uNoeL/g== Message-ID: <833e1484-090d-de3e-6311-718ff3374eb6@collabora.com> Date: Mon, 15 May 2023 11:18:57 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v3 5/7] ARM: dts: rockchip: rk3588s-u-boot: add pcie2x1l2 with PHY To: Jagan Teki Cc: u-boot@lists.denx.de, jonas@kwiboo.se, kever.yang@rock-chips.com, Joseph Chen References: <20230427073538.158855-1-eugen.hristev@collabora.com> <20230427073538.158855-5-eugen.hristev@collabora.com> Content-Language: en-US From: Eugen Hristev In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 5/6/23 21:11, Jagan Teki wrote: > On Thu, 27 Apr 2023 at 13:05, Eugen Hristev wrote: >> >> From: Joseph Chen >> >> Add the node for PCIe 2x1l 2 device together with the corresponding >> combphy. >> >> Signed-off-by: Joseph Chen >> [eugen.hristev@collabora.com: moved to -u-boot.dtsi, minor >> adaptations] >> Signed-off-by: Eugen Hristev >> [jonas@kwiboo.se: adapt to kernel node] >> Signed-off-by: Jonas Karlman >> --- >> Changes in v3: >> - s/pciE/PCIe/ >> Changes in v2: >> - add compliance with linux by Jonas >> >> arch/arm/dts/rk3588s-u-boot.dtsi | 77 ++++++++++++++++++++++++++++++++ >> 1 file changed, 77 insertions(+) >> >> diff --git a/arch/arm/dts/rk3588s-u-boot.dtsi b/arch/arm/dts/rk3588s-u-boot.dtsi >> index ad652c02e58e..6385da1471a5 100644 >> --- a/arch/arm/dts/rk3588s-u-boot.dtsi >> +++ b/arch/arm/dts/rk3588s-u-boot.dtsi >> @@ -4,6 +4,7 @@ >> */ >> >> #include "rockchip-u-boot.dtsi" >> +#include >> >> / { >> dmc { >> @@ -58,6 +59,11 @@ >> reg = <0x0 0xfd58a000 0x0 0x2000>; >> }; >> >> + pipe_phy0_grf: syscon@fd5bc000 { >> + compatible = "rockchip,pipe-phy-grf", "syscon"; >> + reg = <0x0 0xfd5bc000 0x0 0x100>; >> + }; >> + >> usb2phy2_grf: syscon@fd5d8000 { >> compatible = "rockchip,rk3588-usb2phy-grf", "syscon", >> "simple-mfd"; >> @@ -104,6 +110,61 @@ >> }; >> }; >> >> + pcie2x1l2: pcie@fe190000 { >> + compatible = "rockchip,rk3588-pcie", "snps,dw-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 &gic 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 0x0 0x40000000 0xa 0x00000000 0x0 0x40000000>; >> + 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 = "pcie", "periph"; >> + rockchip,pipe-grf = <&php_grf>; >> + status = "disabled"; >> + >> + pcie2x1l2_intc: legacy-interrupt-controller { >> + interrupt-controller; >> + #address-cells = <0>; >> + #interrupt-cells = <1>; >> + interrupt-parent = <&gic>; >> + interrupts = ; >> + }; >> + }; > > Look like we are growing non-linux dt in -u-boot.dtsi. This might not > be a good choice in the long run. I understand the importance of this > SoC but code maintenance must be in a generic way. Hi Jagan, In particular the pci express is already on its way to upstream Linux, at which moment the nodes here will be removed. And in general, we cannot really hold U-boot development because Linux is a little behind. Things will settle once there will be more things taken into Linux. In the long run, there will be nothing in the non-linux dt. Eugen > > Thanks, > Jagan.