mbox series

[v3,0/6] rockchip DWC PCIe improvements

Message ID 20231027145422.40265-1-nks@flawful.org
Headers show
Series rockchip DWC PCIe improvements | expand

Message

Niklas Cassel Oct. 27, 2023, 2:54 p.m. UTC
From: Niklas Cassel <niklas.cassel@wdc.com>

Hello,

This series adds the iATU region to all rockchip DWC PCIe compatibles,
such that the driver can properly runtime detect all inbound iATU and
outbound iATUs. (The actual number of inbound/outbound iATUs differ,
but can be up to 16 inbound iATUs and 16 outbound iATUs.)

It also adds the interrupts for the eDMA on rk3588, such that the embedded
DMA controller is properly detected, and can be used to offload data
transfers.

We also remove unused device tree properties num-ib-windows/num-ob-windows
that are unsed by the code. (Instead the driver depends on the iATU region
being specified in the device tree.)


Changes since v2:
-Added patch to drop unused properties num-{ib,ob}-windows.
-Added patch that adds atu reg also for rk3568.
-Make atu reg mandatory (since both rk3568 and rk3588 defines it).
-Include eDMA region in iATU region, as suggested by snps,dw-pcie.yaml.


Kind regards,
Niklas

Niklas Cassel (6):
  dt-bindings: PCI: dwc: rockchip: Add mandatory atu reg
  dt-bindings: PCI: dwc: rockchip: Add optional dma interrupts
  arm64: dts: rockchip: drop unused properties num-{ib,ob}-windows
  arm64: dts: rockchip: add missing mandatory rk3568 PCIe atu reg
  arm64: dts: rockchip: add missing mandatory rk3588 PCIe atu reg
  arm64: dts: rockchip: add missing rk3588 PCIe eDMA interrupts

 .../bindings/pci/rockchip-dw-pcie.yaml        | 29 +++++++++++++++---
 .../boot/dts/rockchip/rk3568-nanopi-r5s.dts   |  2 --
 arch/arm64/boot/dts/rockchip/rk3568.dtsi      | 18 +++++------
 arch/arm64/boot/dts/rockchip/rk356x.dtsi      |  9 +++---
 arch/arm64/boot/dts/rockchip/rk3588.dtsi      | 30 ++++++++++++-------
 arch/arm64/boot/dts/rockchip/rk3588s.dtsi     | 14 +++++----
 6 files changed, 64 insertions(+), 38 deletions(-)

Comments

Serge Semin Oct. 31, 2023, 1:14 a.m. UTC | #1
On Fri, Oct 27, 2023 at 04:54:15PM +0200, Niklas Cassel wrote:
> From: Niklas Cassel <niklas.cassel@wdc.com>
> 
> The properties num-ib-windows and num-ob-windows have been deprecated for
> a long time, and since commit 281f1f99cf3a ("PCI: dwc: Detect number of
> iATU windows"), these properties are no longer used by the driver.
> 
> The correct number of inbound and outbound iATUs are now detected at
> runtime. Thus, drop these unused properties.
> 
> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>

Reviewed-by: Serge Semin <fancer.lancer@gmail.com>

-Serge(y)

> ---
>  arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 2 --
>  arch/arm64/boot/dts/rockchip/rk3568.dtsi           | 4 ----
>  arch/arm64/boot/dts/rockchip/rk356x.dtsi           | 2 --
>  3 files changed, 8 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
> index b6ad8328c7eb..da4927a35142 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
> @@ -102,8 +102,6 @@ &pcie3x1 {
>  
>  &pcie3x2 {
>  	num-lanes = <1>;
> -	num-ib-windows = <8>;
> -	num-ob-windows = <8>;
>  	reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
>  	vpcie3v3-supply = <&vcc3v3_pcie>;
>  	status = "okay";
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
> index f1be76a54ceb..4487754065b7 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
> @@ -84,8 +84,6 @@ pcie3x1: pcie@fe270000 {
>  				<0 0 0 3 &pcie3x1_intc 2>,
>  				<0 0 0 4 &pcie3x1_intc 3>;
>  		linux,pci-domain = <1>;
> -		num-ib-windows = <6>;
> -		num-ob-windows = <2>;
>  		max-link-speed = <3>;
>  		msi-map = <0x0 &gic 0x1000 0x1000>;
>  		num-lanes = <1>;
> @@ -137,8 +135,6 @@ pcie3x2: pcie@fe280000 {
>  				<0 0 0 3 &pcie3x2_intc 2>,
>  				<0 0 0 4 &pcie3x2_intc 3>;
>  		linux,pci-domain = <2>;
> -		num-ib-windows = <6>;
> -		num-ob-windows = <2>;
>  		max-link-speed = <3>;
>  		msi-map = <0x0 &gic 0x2000 0x1000>;
>  		num-lanes = <2>;
> diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> index abee88911982..e2d99613109b 100644
> --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> @@ -985,8 +985,6 @@ pcie2x1: pcie@fe260000 {
>  				<0 0 0 3 &pcie_intc 2>,
>  				<0 0 0 4 &pcie_intc 3>;
>  		linux,pci-domain = <0>;
> -		num-ib-windows = <6>;
> -		num-ob-windows = <2>;
>  		max-link-speed = <2>;
>  		msi-map = <0x0 &gic 0x0 0x1000>;
>  		num-lanes = <1>;
> -- 
> 2.41.0
>