Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4573015ybl; Wed, 22 Jan 2020 00:14:43 -0800 (PST) X-Google-Smtp-Source: APXvYqy/LuVpkUpyTgMubnx6N9Zq7uNeqy+x9BDERwX3D7P40CVywimskkVlmB07ZuQykll3ngZB X-Received: by 2002:a05:6808:5d0:: with SMTP id d16mr6001039oij.45.1579680883676; Wed, 22 Jan 2020 00:14:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579680883; cv=none; d=google.com; s=arc-20160816; b=scZmlEnWx+QRfhjB7ZRYAc+sMbld3mroQDlymOIywA1AmaY5kynvDIcPX+jO/aizZT i/jOE1i1PZ9nUPngkS626wTWkzbHqV9giNFDYSTB55CrAoJtro5AJrDj1E9grOPkm+bA RdiYicXPhJcd/KoMvNgzdJSti0n7YEmB/py2fn6OwCJh6czKWsM7xb5Xx9cYb6xg/jyK CZVKVr+s0iBh7NzhPOBEucZ3Y0/VKzyLQQRaBNElDdVD6IR5N+S/sE21MR6C2EDVoiUu anSO2As49cuBz9A6gvQ+60cD7T7KqmArKUEDd70W8KsmCHyKzM8sYhZdYRkksIeE5HSh TnSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=DhZNPVYtbrpKrZkAkg13qDd9TroZfhPQ/2aqImA4XLQ=; b=SvFLjoRo3bZX2rdLGeSOMLC9ZENQRm45lATZDmN7QfNbh/X23lgo7tHpd8EsTixOhl 4yzyNF0w1dELuIKxgdZkMmj73Ewa0Q7lHWexPVovszP2wiimhHuyDTD4DArLNpMBkIBd pnT3eND9PR9cCBsPSp6iE7ZCrqHyeFlb8ODAx6j2H6UEoNY0aKYGqZvwG0seuoDKaIY3 JWHBwgov6S7yZsWknkpdX2OJCreO8eDOeY3LAqdxkVqA+6H586DMT5tNAUe0ZXZHhn0B 1ePThCMhZj22Ls+VAKJNlSqB2U/MTcFDgyBHLeENiqjbAfkt/8sNkqw0l+1rVWbSYzkJ o7lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YyTGJm0C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j17si22634278otl.278.2020.01.22.00.14.31; Wed, 22 Jan 2020 00:14:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YyTGJm0C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726219AbgAVINe (ORCPT + 99 others); Wed, 22 Jan 2020 03:13:34 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:40544 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbgAVINd (ORCPT ); Wed, 22 Jan 2020 03:13:33 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 00M8Cxqb099296; Wed, 22 Jan 2020 02:12:59 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1579680779; bh=DhZNPVYtbrpKrZkAkg13qDd9TroZfhPQ/2aqImA4XLQ=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=YyTGJm0CliogdcFd9gnifEAk8QmkOT+QCVGoH27ocDzrZPB7avzwnza5mzPX+UheB WfIed/40LSUiLyMMRn74ExRwIwhhSSv1UJr7souRbL0Yr2UkTH1rE9itP9it9eg9Og aM+RXxLq2QWw9UixnNzaKOvthN/78MMYypz3cRkI= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 00M8CwGh095984 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 22 Jan 2020 02:12:58 -0600 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Wed, 22 Jan 2020 02:12:58 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Wed, 22 Jan 2020 02:12:58 -0600 Received: from [10.24.69.159] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 00M8Co0Y069651; Wed, 22 Jan 2020 02:12:51 -0600 Subject: Re: [v3 4/6] dt-bindings: PCI: rcar: Add bindings for R-Car PCIe endpoint controller To: "Lad, Prabhakar" , Rob Herring , Bjorn Helgaas , Mark Rutland , Geert Uytterhoeven , Magnus Damm , Marek Vasut , Yoshihiro Shimoda , linux-pci CC: Catalin Marinas , Will Deacon , Lorenzo Pieralisi , Arnd Bergmann , Greg Kroah-Hartman , Andrew Murray , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , LAK , Linux-Renesas , Chris Paterson , Frank Rowand , Gustavo Pimentel , Jingoo Han , Simon Horman , Shawn Lin , Tom Joseph , Heiko Stuebner , "open list:ARM/Rockchip SoC..." , Lad Prabhakar References: <20200108162211.22358-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20200108162211.22358-5-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Kishon Vijay Abraham I Message-ID: <9c65eb7a-539b-1fa3-f988-40c32aa8dfe3@ti.com> Date: Wed, 22 Jan 2020 13:45:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prabhakar, On 21/01/20 11:27 PM, Lad, Prabhakar wrote: > Hi Rob/Kishon, > > On Wed, Jan 8, 2020 at 4:22 PM Lad Prabhakar wrote: >> >> This patch adds the bindings for the R-Car PCIe endpoint driver. >> >> Signed-off-by: Lad Prabhakar >> --- >> .../devicetree/bindings/pci/rcar-pci-ep.yaml | 76 +++++++++++++++++++ >> 1 file changed, 76 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml >> >> diff --git a/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml b/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml >> new file mode 100644 >> index 000000000000..99c2a1174463 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml >> @@ -0,0 +1,76 @@ >> +# SPDX-License-Identifier: GPL-2.0 >> +# Copyright (C) 2020 Renesas Electronics Europe GmbH - https://www.renesas.com/eu/en/ >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/pci/rcar-pcie-ep.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Renesas R-Car PCIe Endpoint >> + >> +maintainers: >> + - Lad Prabhakar >> + >> +properties: >> + compatible: >> + items: >> + - const: renesas,r8a774c0-pcie-ep >> + - const: renesas,rcar-gen3-pcie-ep >> + >> + reg: >> + maxItems: 5 >> + >> + reg-names: >> + items: >> + - const: apb-base >> + - const: memory0 >> + - const: memory1 >> + - const: memory2 >> + - const: memory3 As I had mentioned in the other patch, I'd prefer if we can create standard binding for representing the memory regions. IMHO we should create subnode for memory regions Each sub-node itself may or may not have more than one memory region. In your platform, since there can be only one allocation in a memory region, there should be 4 sub-nodes for each of the memory region and each node should have page_size (or some equivalent property) property to indicate page_size (= region_size). For a platform that doesn't have the restriction, there can be a single sub-node containing all the memory region. Let's wait for Rob's comment though. Thanks Kishon >> + >> + power-domains: >> + maxItems: 1 >> + >> + resets: >> + maxItems: 1 >> + >> + clocks: >> + maxItems: 1 >> + >> + clock-names: >> + items: >> + - const: pcie >> + >> + max-functions: >> + minimum: 1 >> + maximum: 6 >> + >> +required: >> + - compatible >> + - reg >> + - reg-names >> + - resets >> + - power-domains >> + - clocks >> + - clock-names >> + - max-functions >> + > apart from dt_binding_check error are we OK with dt bindings ? > > Cheers, > --Prabhakar > >> +examples: >> + - | >> + #include >> + #include >> + >> + pcie0_ep: pcie-ep@fe000000 { >> + compatible = "renesas,r8a774c0-pcie-ep", >> + "renesas,rcar-gen3-pcie-ep"; >> + reg = <0 0xfe000000 0 0x80000>, >> + <0x0 0xfe100000 0 0x100000>, >> + <0x0 0xfe200000 0 0x200000>, >> + <0x0 0x30000000 0 0x8000000>, >> + <0x0 0x38000000 0 0x8000000>; >> + reg-names = "apb-base", "memory0", "memory1", "memory2", "memory3"; >> + resets = <&cpg 319>; >> + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; >> + clocks = <&cpg CPG_MOD 319>; >> + clock-names = "pcie"; >> + max-functions = /bits/ 8 <1>; >> + }; >> -- >> 2.20.1 >>