Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp516640pja; Thu, 7 Nov 2019 00:46:24 -0800 (PST) X-Google-Smtp-Source: APXvYqwGdDlF5weafVt2oYyF5JT06mb/NE3OKLfVkruKeD8nZhA37dQ1Tyn/uVW5Yk5qUpZstev7 X-Received: by 2002:aa7:c4c8:: with SMTP id p8mr2225951edr.121.1573116384298; Thu, 07 Nov 2019 00:46:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573116384; cv=none; d=google.com; s=arc-20160816; b=D/GBzINo7z+2Q/PqfiMH2exwtyVDR0HISgifSlvbJ+lLacCdYRAuGeiKmx9tWSpR1k PGNU+HLsok+HZxqCtt6K8g76p32xpvZyQ3sOl3oWB0tfbxrGB9/rfSbKRU0RaxgyoCZU XU7FEvOTDHywOsGqGhmr3yTVYhZGlM5sFWNuvJAAjBb51+7x/3yQypNRhdo2Rq8pZZm4 5AP3Ax/QCKFO2WT6gN5+WCcwjiioOAPpToSX5BGe9ioKzxgWmbR30SC0Qd8vkekr3f3u HTN4d9sHfYw8MzG+Cgq9M0CYOMiPk3+wUe2hWQauNK6HZpFIPRh7GAmYXx6bgwkibzpZ 0+8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=41NEiPopACB8w8/wi96XPwORusZtZyFOe+6fXdB5oWI=; b=PbyJBbAyzn+bsVM6jrrf+G5HXHKqNGcIUYY+hl++JESWPq4vfuQOkbBOkBriG2HLEY p/SZ97ub2Pbfq1fxWVmuszBqjuwShcvBVN4of+vlI8nBLVsL/dI+gOv89ROGffsV7sFj 86HkrSVnD1bhf63EE5PcpcJREq7WBXbA9jfxtjpkPLIybVclTVFwvfG6TJGKwAjKL0Al i4KYV6UDW6n0nI5wcJ8Fh26SnF6QIlLyLsb+/HBG16sP72vv5M8dpW86ENUvSPbIkSa7 h8cFr1pbILZ9H6FCGh4ClFuJgHekwLb8kdrYJyTWbyUzL9Wr/ui+0oepcjL4U+kgyPBF ZQDA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t30si966414edt.330.2019.11.07.00.46.01; Thu, 07 Nov 2019 00:46:24 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733286AbfKGIop (ORCPT + 99 others); Thu, 7 Nov 2019 03:44:45 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:43333 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727120AbfKGIoo (ORCPT ); Thu, 7 Nov 2019 03:44:44 -0500 Received: by mail-ot1-f67.google.com with SMTP id l14so1307207oti.10; Thu, 07 Nov 2019 00:44:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=41NEiPopACB8w8/wi96XPwORusZtZyFOe+6fXdB5oWI=; b=NI65yWNHYzw3WUfYaSgg+0OwZsjJvaeLUXBcd1dVigp1vSRsHHiLLEihivro1QXy4j R9h0q5sfZFZniTzaTnfjF8lsPd52y7jPSA9jytSWou1mnDJVqCnpu77gb8zNI+qhomC1 PZNVy8tOjSImByW2DAIHV+xCLFHeAyi2cg+D4/uV4QOhY8SwPsh+JWzqlX7z1HTj/ttF HNpmoV8geq5XlcmR5SZCNgGrhp0rPvlXvkJBfnaFYMJ/i1EEDx0dyT/bDrCC7BeUBp3U Oc2Os/EPiYAk+3VmFFkHKT8YzJPGzWRbwbeHVLzxH22NmRgFRaIcR4mMBnO6nLVprC1W p4hg== X-Gm-Message-State: APjAAAWjy/fyBi5YNXpt8OmswGXfVzBFwssrW8MLuc9JavkMuPqKW4n/ cFOukMWg49eHwIGwnZtlh1PnewQq8s+CfIQiTHk= X-Received: by 2002:a05:6830:2363:: with SMTP id r3mr2078530oth.39.1573116282410; Thu, 07 Nov 2019 00:44:42 -0800 (PST) MIME-Version: 1.0 References: <20191106193609.19645-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20191106193609.19645-4-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: <20191106193609.19645-4-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Geert Uytterhoeven Date: Thu, 7 Nov 2019 09:44:31 +0100 Message-ID: Subject: Re: [PATCH 3/5] PCI: rcar: Add R-Car PCIe endpoint device tree bindings To: Lad Prabhakar Cc: Bjorn Helgaas , Rob Herring , Mark Rutland , Geert Uytterhoeven , Magnus Damm , Kishon Vijay Abraham I , Marek Vasut , Yoshihiro Shimoda , linux-pci , Catalin Marinas , Will Deacon , Lorenzo Pieralisi , Arnd Bergmann , Greg Kroah-Hartman , Andrew Murray , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Linux ARM , Linux-Renesas , Chris Paterson , "Lad, Prabhakar" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prabhakar, On Wed, Nov 6, 2019 at 8:36 PM Lad Prabhakar wrote: > From: "Lad, Prabhakar" > > This patch adds the bindings for the R-Car PCIe endpoint driver. > > Signed-off-by: Lad, Prabhakar Thanks for your patch! > --- /dev/null > +++ b/Documentation/devicetree/bindings/pci/rcar-pci-ep.txt > @@ -0,0 +1,43 @@ > +* Renesas R-Car PCIe Endpoint Controller DT description > + > +Required properties: > + "renesas,pcie-ep-r8a774c0" for the R8A774C0 SoC; > + "renesas,pcie-ep-rcar-gen3" for a generic R-Car Gen3 or > + RZ/G2 compatible device. Unless I'm missing something, this is for the exact same hardware block as Documentation/devicetree/bindings/pci/rcar-pci.txt? So shouldn't you amend those bindings, instead of adding new compatible values? Please remember that DT describes hardware, not software policy. So IMHO choosing between host and endpoint is purely a configuration issue, and could be indicated by the presence or lack of some DT properties. E.g. host mode requires both "bus-range" and "device_type" properties, so their absence could indicate endpoint mode. > +- reg: Five register ranges as listed in the reg-names property > +- reg-names: Must include the following names > + - "apb-base" > + - "memory0" > + - "memory1" > + - "memory2" > + - "memory3" What is the purpose of the last 4 regions? Can they be chosen by the driver, at runtime? > +- resets: Must contain phandles to PCIe-related reset lines exposed by IP block > +- clocks: from common clock binding: clock specifiers for the PCIe controller > + clock. > +- clock-names: from common clock binding: should be "pcie". > + > +Optional Property: > +- max-functions: Maximum number of functions that can be configured (default 1). > + > +Example: > + > +SoC-specific DT Entry: > + > + pcie_ep: pcie_ep@fe000000 { > + compatible = "renesas,pcie-r8a7791", "renesas,pcie-rcar-gen2"; These compatible values do not match with the ones above (but they match with what I'd like to see ;-) > + 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"; > + clocks = <&cpg CPG_MOD 319>; > + clock-names = "pcie"; > + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; > + resets = <&cpg 319>; > + }; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds