From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9466FC5DF61 for ; Thu, 7 Nov 2019 08:44:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5896921D79 for ; Thu, 7 Nov 2019 08:44:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733296AbfKGIop (ORCPT ); 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-Google-Smtp-Source: APXvYqyLd+e060V3vapvpupJ//7p928pbjWfrqP8a74RfAwxyKf0nla2NjyjPYziuD+6o8scdy87CzLXM7S3IlcXjQw= 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED045FC6198 for ; Thu, 7 Nov 2019 08:44:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C379721D79 for ; Thu, 7 Nov 2019 08:44:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sR4ckAXJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C379721D79 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hbmnbLjSubXDO2LDZyLdtF5wxaqS8+J99xpd2SZVM+0=; b=sR4ckAXJwWhGKJ n0VjvogaP4JrSoaY2xjD6+fAj/Lis1Dzee5ovmA+xhoq18gd9xPsi7A4ZXnYoNVXbWuyBaJQQUlBY U6GfAhvzTZQbySZBVpZHSc+UjiN3XqgJNJngHVPH+olHFl5figDYBqkAEtrl2sItisjncXLw+sZj4 SlCtv0lLi/nsA/9aK11RMHe2B0nmpFVzOUdVijbG73VccR/WgFFpW8pqNJxuYppL+PU6wobOxjphl VOK5lw1bjkVySxxJYFjAOGSv9GrLQqIebzRuzQOZRIwDOf5WAZcuvf0c5VJOHLYoAimk58sKyFXgb GsvX0mYyDeiNSdIWsEog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSdPK-0000Ws-FR; Thu, 07 Nov 2019 08:44:46 +0000 Received: from mail-ot1-f67.google.com ([209.85.210.67]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSdPH-0000WP-F7 for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2019 08:44:44 +0000 Received: by mail-ot1-f67.google.com with SMTP id m15so1323082otq.7 for ; Thu, 07 Nov 2019 00:44:43 -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=WrxuKPjTi9Ah4xkIi37bZhK6+jIu4oxw8EcLICyLYa92Dr+WSL0UhAFzYJhfRpVh2k unztRj9nCX/e9XlueVwvsLYrPK2jJU5b1qlee9hSfdyocBqKNjK3X8guKovZhGv4RC7r z7ALU0jSMwsUjq9kWv5iTzZTeI7kaJsWqKkG9okWXOPD+DVrwjb2g4ul3iSXUUMw8nwn l10TgEASMOQEmGC1LBgYQZQ5r3kRsgkn+rQorawxJrgQR2AxKd37IxQ5IFDKq/WOBdXf xVjiRZUzYNAnFFNr3140W8P9GfW9X9lHtX76lHkeJb/hzU/Z0AjWI0TtrrCFU96fePMN 2G0Q== X-Gm-Message-State: APjAAAUynrGdgD/cexoaxPz3uenTk7CHeU7RYcUyWtc3sfhsRO5f5ETJ HUxj/tXRcMcZA+py4ZEj3ZJyUcF53BZQ+S2Od+8= X-Google-Smtp-Source: APXvYqyLd+e060V3vapvpupJ//7p928pbjWfrqP8a74RfAwxyKf0nla2NjyjPYziuD+6o8scdy87CzLXM7S3IlcXjQw= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191107_004443_504412_9EB487CB X-CRM114-Status: GOOD ( 19.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Chris Paterson , Lorenzo Pieralisi , "Lad, Prabhakar" , Arnd Bergmann , Geert Uytterhoeven , Greg Kroah-Hartman , linux-pci , Yoshihiro Shimoda , Magnus Damm , Linux Kernel Mailing List , Kishon Vijay Abraham I , Linux-Renesas , Rob Herring , Catalin Marinas , Bjorn Helgaas , Andrew Murray , Will Deacon , Linux ARM , Marek Vasut Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel