Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp104139pxb; Wed, 11 Nov 2020 21:42:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxk889d1gZ7luu1/PFvX/X+7lyRPEyiLfOq3BUTyzq0XbeU9dXEsqGhZYDBUNaHOcooTiIm X-Received: by 2002:a50:bb66:: with SMTP id y93mr3395215ede.244.1605159770606; Wed, 11 Nov 2020 21:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605159770; cv=none; d=google.com; s=arc-20160816; b=k6wFK5+DsBgnfWZH25G9Tsb8GaQ9I29uM7az1afBhJjbRy0jaiSJSurAUtd45Jv1RS aQFIAgu71S9r7SGZkKpZCQkAW6YR+kjX54ApOg977cH16885GwdqBS5zw3EWHRqLsE+8 M3toZQt+ieY0cPjR78V/CVBO/JGw2yhqxpzTSGW61/x/dbzOgKOGtoVXOlK4gOlWfjLP dR4dstHlI5mWBg0CsdVdsnWKWlVkQbFhffV0QHQlwZa6CEowSF0WxZHeav7hja29bmzO CcnsFlU+U5HP20WhMt+lqlqlYAzV/y4JxklIEOQ1Gcl6PnL83+KszfxGcPq6OoNN8Fed w7Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=8h0Eaw5ISlxz1or35jD3guodViMLx1TX2NvCzewzZUk=; b=kuDwTTf++MdLJlLQXmFD7GjJoj93tChQCvtpp5aJmftZDUtx6g7vz/Fwn4lNEW7M25 oC/v6vsD9zSgIP7XrAVUyN0Dt1+4DhasbukmEgVRoTD+UdbEdMh6cCl4cul+fM6eKc75 8FXo+6oyzEwmDYPH9o6S399ZzV/KAfx5uasDEgs2JhakAGvaa2Krlcl3egYZwhiiRDno 4gRPhDoc64wh5OS4La5yDZd7cZkYycOyyMzLjoemSXOrNASzDEyOa319eHdxUT3wj1RB TTNO4YKXxgCQjLYiAo7XaNjWglGrdno3/ezpDiPf/RGRE0EOU1oYs2ucvU4DxPSHr22e qcLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qfe8moNL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id o6si4114087edi.560.2020.11.11.21.42.27; Wed, 11 Nov 2020 21:42:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qfe8moNL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729559AbgKLFi7 (ORCPT + 99 others); Thu, 12 Nov 2020 00:38:59 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:32838 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbgKLFZi (ORCPT ); Thu, 12 Nov 2020 00:25:38 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0AC5PNjX043588; Wed, 11 Nov 2020 23:25:23 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1605158723; bh=8h0Eaw5ISlxz1or35jD3guodViMLx1TX2NvCzewzZUk=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=qfe8moNLRxwm38idlzoRFrysOAQ4PIhBPN1ZV0FugsLJwuSHILkZjnIaV3NO39knH uCwgi9vMDVQqmvzmDfN2p3DElZ+o+fyJ/zLMpHaBJy7iZe87AK/q4kbrIrC2o5wQlM 25lk5n81XdrWyRG3JKJazQexHtyzetKbqo4KoSuQ= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0AC5PNVo031826 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Nov 2020 23:25:23 -0600 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 11 Nov 2020 23:25:23 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 11 Nov 2020 23:25:23 -0600 Received: from [10.250.235.36] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0AC5PIDm029306; Wed, 11 Nov 2020 23:25:19 -0600 Subject: Re: [PATCH v2 1/7] dt-bindings: mfd: ti,j721e-system-controller.yaml: Document "syscon" To: Rob Herring CC: Tero Kristo , Nishanth Menon , Roger Quadros , Lee Jones , , , Bjorn Helgaas , , References: <20201109170409.4498-1-kishon@ti.com> <20201109170409.4498-2-kishon@ti.com> <20201111212857.GA2059063@bogus> From: Kishon Vijay Abraham I Message-ID: Date: Thu, 12 Nov 2020 10:55:17 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201111212857.GA2059063@bogus> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 12/11/20 2:58 am, Rob Herring wrote: > On Mon, Nov 09, 2020 at 10:34:03PM +0530, Kishon Vijay Abraham I wrote: >> Add binding documentation for "syscon" which should be a subnode of >> the system controller (scm-conf). >> >> Signed-off-by: Kishon Vijay Abraham I >> --- >> .../mfd/ti,j721e-system-controller.yaml | 40 +++++++++++++++++++ >> 1 file changed, 40 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml >> index 19fcf59fd2fe..0b115b707ab2 100644 >> --- a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml >> +++ b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml >> @@ -50,6 +50,38 @@ patternProperties: >> specified in >> Documentation/devicetree/bindings/mux/reg-mux.txt >> >> + "^syscon@[0-9a-f]+$": >> + type: object >> + description: | > > Don't need '|' if there's no formatting. Okay, will fix this. > >> + This is the system controller configuration required to configure PCIe >> + mode, lane width and speed. >> + >> + properties: >> + compatible: >> + items: >> + - enum: >> + - ti,j721e-system-controller >> + - const: syscon >> + - const: simple-mfd > > Humm, then what are this node's sub-nodes? And the same compatible as > the parent? > This node doesn't have sub-nodes. So one is the parent syscon node which has the entire system control region and then sub-nodes for each of the modules. In this case the PCIe in system control has only one 4 byte register that has to be configured. Both the parent node and sub-node are syscon, so given the same compatible for both. >> + >> + reg: >> + maxItems: 1 >> + >> + "#address-cells": >> + const: 1 >> + >> + "#size-cells": >> + const: 1 >> + >> + ranges: true >> + >> + required: >> + - compatible >> + - reg >> + - "#address-cells" >> + - "#size-cells" >> + - ranges >> + >> required: >> - compatible >> - reg >> @@ -72,5 +104,13 @@ examples: >> compatible = "mmio-mux"; >> reg = <0x00004080 0x50>; >> }; >> + >> + pcie1_ctrl: syscon@4074 { >> + compatible = "ti,j721e-system-controller", "syscon", "simple-mfd"; >> + reg = <0x00004074 0x4>; >> + #address-cells = <1>; >> + #size-cells = <1>; >> + ranges = <0x4074 0x4074 0x4>; > > Must be packing a bunch of functions into 4 byte region! For the PCIe case, it only has a 4 byte register to be configured. The other option would be to get phandle to the parent syscon node and then hard-code the offset in the driver. Thank You, Kishon