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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BB07C433EF for ; Wed, 13 Oct 2021 07:49:39 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5D90A60EDF for ; Wed, 13 Oct 2021 07:49:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5D90A60EDF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 68CB383359; Wed, 13 Oct 2021 09:49:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.b="Du3j7Rkl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6B5EB83378; Wed, 13 Oct 2021 09:49:31 +0200 (CEST) Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) (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 843908321C for ; Wed, 13 Oct 2021 09:49:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 4C10422221; Wed, 13 Oct 2021 09:49:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1634111364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d5bJj9gk68cCw31gMPbQjVN+WhON7znlUwO2OjhvF1Y=; b=Du3j7Rkll4caLURqEPYPk0p3amyNajkNkuzzfLGXFdWtwi0TQ1q2IbPY9TsGxFRlC2SoZe ES8vAJal07hbwHPnbse+0a7ue2ovUhT8eDmbiyCKiVtAQg+ROFUMIxDpntNRrKC8FprEc+ NH2TgNFPPjwUC3OiO7Rwp/EgNJbDqsg= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 13 Oct 2021 09:49:23 +0200 From: Michael Walle To: "Z.Q. Hou" Cc: u-boot@lists.denx.de, Jagan Teki , Priyanka Jain , Vladimir Oltean , Tom Rini , Peter Griffin , Manivannan Sadhasivam Subject: Re: [PATCH v4 23/29] pci: layerscape: add official ls1028a binding support In-Reply-To: References: <20211005083812.1311465-1-michael@walle.cc> <20211005083812.1311465-24-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <418951c7a0d46a635acf2695ce84dfbb@walle.cc> X-Sender: michael@walle.cc X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Hi Zhiqiang, thanks for looking at this patch. Am 2021-10-13 03:46, schrieb Z.Q. Hou: >> -----Original Message----- >> From: Michael Walle >> Sent: 2021年10月5日 16:38 >> To: u-boot@lists.denx.de >> Cc: Jagan Teki ; Priyanka Jain >> ; Vladimir Oltean ; >> Tom Rini ; Peter Griffin >> ; >> Manivannan Sadhasivam ; Michael >> Walle ; Z.Q. Hou >> Subject: [PATCH v4 23/29] pci: layerscape: add official ls1028a >> binding >> support >> >> The official bindind of the PCIe controller of the ls1028a has the >> following >> compatible string: >> compatible = "fsl,ls1028a-pcie"; >> >> Additionally, the resource names and count are different. Update the >> driver >> to support this binding and change the entry in the ls1028a device >> tree. >> >> Cc: Hou Zhiqiang >> Signed-off-by: Michael Walle >> --- >> arch/arm/dts/fsl-ls1028a.dtsi | 20 +++++------ >> drivers/pci/pcie_layerscape_rc.c | 61 >> +++++++++++++++++++++++--------- >> 2 files changed, 53 insertions(+), 28 deletions(-) >> >> diff --git a/arch/arm/dts/fsl-ls1028a.dtsi >> b/arch/arm/dts/fsl-ls1028a.dtsi >> index cc055e65e5..435b965d00 100644 >> --- a/arch/arm/dts/fsl-ls1028a.dtsi >> +++ b/arch/arm/dts/fsl-ls1028a.dtsi >> @@ -344,12 +344,10 @@ >> }; >> >> pcie1: pcie@3400000 { >> - compatible = "fsl,ls-pcie", "fsl,ls1028-pcie", "snps,dw-pcie"; >> - reg = <0x00 0x03400000 0x0 0x80000 >> - 0x00 0x03480000 0x0 0x40000 /* lut registers */ >> - 0x00 0x034c0000 0x0 0x40000 /* pf controls >> registers */ >> - 0x80 0x00000000 0x0 0x20000>; /* configuration >> space */ >> - reg-names = "dbi", "lut", "ctrl", "config"; >> + compatible = "fsl,ls1028a-pcie"; >> + reg = <0x00 0x03400000 0x0 0x00100000>, /* controller >> registers */ >> + <0x80 0x00000000 0x0 0x00002000>; /* configuration >> space */ >> + reg-names = "regs", "config"; >> #address-cells = <3>; >> #size-cells = <2>; >> device_type = "pci"; >> @@ -360,12 +358,10 @@ >> }; >> >> pcie2: pcie@3500000 { >> - compatible = "fsl,ls-pcie", "fsl,ls1028-pcie", "snps,dw-pcie"; >> - reg = <0x00 0x03500000 0x0 0x80000 >> - 0x00 0x03580000 0x0 0x40000 /* lut registers */ >> - 0x00 0x035c0000 0x0 0x40000 /* pf controls >> registers */ >> - 0x88 0x00000000 0x0 0x20000>; /* configuration >> space */ >> - reg-names = "dbi", "lut", "ctrl", "config"; >> + compatible = "fsl,ls1028a-pcie"; >> + reg = <0x00 0x03500000 0x0 0x00100000>, /* controller >> registers */ >> + <0x88 0x00000000 0x0 0x00002000>; /* configuration >> space */ >> + reg-names = "regs", "config"; >> #address-cells = <3>; >> #size-cells = <2>; >> device_type = "pci"; >> diff --git a/drivers/pci/pcie_layerscape_rc.c >> b/drivers/pci/pcie_layerscape_rc.c >> index f50d6ef653..217b420076 100644 >> --- a/drivers/pci/pcie_layerscape_rc.c >> +++ b/drivers/pci/pcie_layerscape_rc.c >> @@ -21,6 +21,12 @@ >> >> DECLARE_GLOBAL_DATA_PTR; >> >> +struct ls_pcie_drvdata { >> + u32 lut_offset; >> + u32 ctrl_offset; >> + bool big_endian; > > The endianness property is better only put in the DT nodes. The whole point of this series is to align the u-boot binding with the (official) found in linux. There is no endianness property in the binding: https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/pci/snps%2Cdw-pcie.yaml https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/pci/layerscape-pci.txt Also from a technical point of view, this property seems redundant with the compatible string which names a specific CPU. -michael > The others looks good for me. > > Thanks, > Zhiqiang