Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp976511imu; Thu, 20 Dec 2018 08:12:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/V6Rb+suhT+VTWfXJdH7jvn2DtqCcXKBz/AI80mI9ryl0UkVpG/LFS9klR+V8y+UFRUmBMb X-Received: by 2002:a63:f552:: with SMTP id e18mr23861963pgk.239.1545322328039; Thu, 20 Dec 2018 08:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545322328; cv=none; d=google.com; s=arc-20160816; b=hrsaPhAFlfzaYZozC6aYg69CllwDFHImEMPXJuwK5FqqPzD/yVXeEymuMEcBWI0uIq XunSWpTE/kthXuQLOTlgA8/0cUcXFYd8w/jxN3YRDoDV3Z2RFHjyKqB+4rX1lR4+T/qU I3xMwA22UU8eodXGVgkTu0i1XRtTUZDkn/6CaJpoX8xHSQTZ4UAwIW+r0XGmCTd6tyAT QOUWzMx4co5bzreyMyerJ+xRTawj7JivdBQLegf4Ile/CB/3y0yq8As+LzaYpuWPXaqW YFr/iWvRTFwPinzxUX/rahaRB1Suqfvq96C3hTwCijSWXORcRRVWRBzmbSYl95W/VyCm 2LfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=BkcCJiV2WQFsrXNuqNgG7d72OprWL334/HS7NT47Vjw=; b=inFDXsHv0QzfAnDnfb9jMIDXONKTjNrGO3xoNdFIoAka46dx4Qz6RpDNc9skjWpF2z TL7niADxl0d+n98YIKxqlJcqW9bs1Yh9kYHhF+j0xVPsM6tzHa4OJROaavmft+iY3fa+ aHjzxTXIhs7VhRGR20KT7UBVFoN6jk3O1GsfaugxGuhXVyK9n72f+VonlEJaMqK/dMF4 Z4HmRxUwj7yjPtClvtjQH3tCZ7uc7AvDFdceNbSDdLAJWKMV1TfMoD5WvgPJYKtPrPIF 3aizRpmnqxMFkRCG5yjgq+Y8v3zRGnau971Pv+S2Gv7w54S52Y5mvmw2jxsheZMyQwuT 2uag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=GVLe5Ofk; 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=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u69si20002567pfj.219.2018.12.20.08.11.49; Thu, 20 Dec 2018 08:12:07 -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=@nxp.com header.s=selector1 header.b=GVLe5Ofk; 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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733273AbeLTNts (ORCPT + 99 others); Thu, 20 Dec 2018 08:49:48 -0500 Received: from mail-eopbgr130045.outbound.protection.outlook.com ([40.107.13.45]:44672 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732133AbeLTNtq (ORCPT ); Thu, 20 Dec 2018 08:49:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BkcCJiV2WQFsrXNuqNgG7d72OprWL334/HS7NT47Vjw=; b=GVLe5OfkxXzJpS4rNfVsRcCpkG+MPnNz1EuKqVd26V2Hciq8GWIbR0plIYL0mtk/SLfRKn+b3ZMhvXCSrnPh5YzvTMXSzD+1qtkVlPy32KD0WpeNttVoZSnjIZ21ZjEBmH16Wp1J8ZiTbveHEgf33VEaS0Lr7TJwSFr5jFN1MtY= Received: from VI1PR04MB5533.eurprd04.prod.outlook.com (20.178.122.159) by VI1PR04MB4208.eurprd04.prod.outlook.com (52.134.30.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.19; Thu, 20 Dec 2018 13:49:39 +0000 Received: from VI1PR04MB5533.eurprd04.prod.outlook.com ([fe80::7d6d:ce34:3439:c184]) by VI1PR04MB5533.eurprd04.prod.outlook.com ([fe80::7d6d:ce34:3439:c184%4]) with mapi id 15.20.1446.020; Thu, 20 Dec 2018 13:49:39 +0000 From: Leonard Crestez To: Trent Piepho , "andrew.smirnov@gmail.com" , "robh@kernel.org" CC: "l.stach@pengutronix.de" , Aisheng Dong , Richard Zhu , "cphealy@gmail.com" , dl-linux-imx , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "lorenzo.pieralisi@arm.com" , Fabio Estevam , "linux-arm-kernel@lists.infradead.org" , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" Subject: Re: [PATCH v3 3/3] PCI: imx6: Add support for i.MX8MQ Thread-Topic: [PATCH v3 3/3] PCI: imx6: Add support for i.MX8MQ Thread-Index: AQHUlocxSxlVauzxZ0epY0uSJZc9vQ== Date: Thu, 20 Dec 2018 13:49:38 +0000 Message-ID: References: <20181218040702.29231-1-andrew.smirnov@gmail.com> <20181218040702.29231-4-andrew.smirnov@gmail.com> <20181218151533.GA2922@bogus> <1545268969.22930.77.camel@impinj.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-originating-ip: [192.88.166.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR04MB4208;6:7IPnIeMhbOu36/3E0MyaxMqnz+ED2KsZbjoL/gfw3WpzWFa9BtuI+9Dxr0U9KtWqH8kLCO0uJGsYz8VlTuQowV7cp7H32xB9OI84eAXhNvkKQYYL36mzGv0bWr0pm5rloBdf0fKuHjni5oJtGbThpqIMSH5vfhUJ/UFH2EvbplTpLQTIKTHHCZh9Np8cS+iljoR7XRmTZ+jsNcTWMXfH9IA+tCE6oHFk+uAwbQccBNNU7SrOqtV0vpvYXv7OFzjvCl901H9RyE/hmpwzdY2L3YEgh2mycWmBlEtXyBO9trGhZ2s/volMi3hDMmrIbJ90vyj/J5KRjfGf1u52csT6uey1dTG/Wq3vGCGCclZKbXGYrsyvK69AcJJGSlZL/P4K+8nxYHNfGICEl29oEjeKiEfedQNiBQ/561LuMyxnrpqZtXP0NvljRtq5YSp0IAhxKH6zZccN4AuiZfAcwAY32Q==;5:u17CXV2TpFw5bCl2Cy44bqQyKh4eK4kR3mawa1WqH0hIfjUBpPHn+mH5mj0DBx93VlL2Rd5xiETbIApwFdC0we0qcWd8JdnNrt6Jx5iI3JlH1IiWYlxF05Oi6ymJObDNn5COBjwLtBNadibIwuUO5npGKgM0MCJgMqB2yOUnBco=;7:FOCE4AUSGqfu+rBSaqLtJgcRLmkY2uMUPwVJ0cmuCoA4VaCs+Pc3lb3MM1VeZRqPJLjS7GZVFgw5VSaldnhJgOcEN5YmVx2ZEWREBmvOy+D2rj3MFkxCWWwQLScS5XOMNu6OJPVfvhNDqJcMneIn1w== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: a0288583-788a-40d2-2dd4-08d66681fc6a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:VI1PR04MB4208; x-ms-traffictypediagnostic: VI1PR04MB4208: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(93006095)(93001095)(3231475)(944501520)(52105112)(3002001)(10201501046)(6055026)(149066)(150057)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:VI1PR04MB4208;BCL:0;PCL:0;RULEID:;SRVR:VI1PR04MB4208; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(376002)(366004)(136003)(39860400002)(396003)(199004)(189003)(7416002)(4001150100001)(6436002)(6116002)(14454004)(68736007)(44832011)(486006)(54906003)(26005)(9686003)(2201001)(476003)(97736004)(5660300001)(305945005)(8936002)(39060400002)(76176011)(74316002)(105586002)(8676002)(6506007)(4326008)(7696005)(53936002)(110136005)(55016002)(478600001)(102836004)(86362001)(66066001)(53546011)(7736002)(33656002)(256004)(2501003)(81166006)(229853002)(2906002)(316002)(99286004)(186003)(71190400001)(106356001)(3846002)(93886005)(25786009)(81156014)(446003)(71200400001)(6246003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB4208;H:VI1PR04MB5533.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: VGEjqDLLpUiukcbASdUyKIvXFcsznDxqNJyJENYiZp4ZwnOYAgiYV6pYQDNBgjPviQLCqcR1MtNeYNt42DhH7Aiox2K/SZUn7Cw4y6tSlVmVMK6Hl7afojz9cK/UXYTmzSmp5LJLRoH3VRcOFgramB9vnfl4HFTgIxeOcCI+YGYRx7TqSlVOBzhXVo3+hb7tkjfdxCWVWGWNWHooLxUTgBEbIYhG6TED4BLVlzJUhbzRpHEV3WRie+sfnSygslar04yCabidrXtb2ZMnlnHXSBDS4iyiTXBTMEVO77HsLxKUAErQsyraL9LYDvJP63/o spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0288583-788a-40d2-2dd4-08d66681fc6a X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2018 13:49:38.9103 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4208 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/20/2018 3:22 AM, Trent Piepho wrote:=0A= > On Wed, 2018-12-19 at 16:47 -0800, Andrey Smirnov wrote:=0A= =0A= >>>> This series initially added explicit offsets but I suggested a single= =0A= >>>> "controller-id" because:=0A= >>>> * There are multiple bit and byte offsets=0A= >>>> * Other imx8 SOCs also have 2x pcie with other bit/byte offsets=0A= >>>>=0A= >>>> Hiding this behind a compatible string and single "controller-id" seem= =0A= >>>> preferable to elaborating register maps in dt bindings. It also makes= =0A= >>>> upgrades simpler: if features are added which use other bits there is = no=0A= >>>> need to describe them in DT and deal with compatibility headaches.=0A= >>>=0A= >>> You already have an id for the controllers: the address. Use that if=0A= >>> you don't want to put the register offsets in DT.=0A= >>=0A= >> Lucas, are you on board with this?=0A= > =0A= > Does address here mean the address from the controller's reg property?=0A= > =0A= > How do you map that address to the controller's index?=0A= =0A= I guess you could have a constant for the address of the first =0A= controller and then substract. But hardcoding any sort of physical =0A= address feels wrong with DT.=0A= > The situation here is that some registers for these controllers are=0A= > interleaved, right? I.e., there's one register somewhere where bit 0=0A= > means enable controller 0 and bit 1 means enable controller 1 and so=0A= > on.=0A= > =0A= > Isn't cell-index already the standard device tree property for this=0A= > kind of setup?=0A= =0A= Look at how this cell-index property is documented in other bindings it =0A= seems to be an excellent fit: just rename controller-id to cell-index.=0A=