From patchwork Wed Nov 20 15:41:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Orson Zhai X-Patchwork-Id: 1198285 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=unisoc.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47J6Vy1n15z9sRp for ; Thu, 21 Nov 2019 02:46:34 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732464AbfKTPqc convert rfc822-to-8bit (ORCPT ); Wed, 20 Nov 2019 10:46:32 -0500 Received: from mx1.unisoc.com ([222.66.158.135]:21657 "EHLO SHSQR01.spreadtrum.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732410AbfKTPph (ORCPT ); Wed, 20 Nov 2019 10:45:37 -0500 Received: from ig2.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by SHSQR01.spreadtrum.com with ESMTPS id xAKFheDl093128 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Wed, 20 Nov 2019 23:43:40 +0800 (CST) (envelope-from Orson.Zhai@unisoc.com) Received: from localhost (10.0.74.112) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Wed, 20 Nov 2019 23:43:47 +0800 From: Orson Zhai To: Lee Jones , Rob Herring , Mark Rutland , Arnd Bergmann CC: , , , , , Orson Zhai Subject: [PATCH V2 1/2] dt-bindings: syscon: Add syscon-names to refer to syscon easily Date: Wed, 20 Nov 2019 23:41:47 +0800 Message-ID: <20191120154148.22067-2-orson.zhai@unisoc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191120154148.22067-1-orson.zhai@unisoc.com> References: <20191120154148.22067-1-orson.zhai@unisoc.com> MIME-Version: 1.0 X-Originating-IP: [10.0.74.112] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL: SHSQR01.spreadtrum.com xAKFheDl093128 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Make life easier when syscon consumer want to access multiple syscon nodes with dozens of items. Add syscon-names and relative properties to help to manage different cases when accessing more than one syscon node even with arguments. Signed-off-by: Orson Zhai --- .../devicetree/bindings/mfd/syscon.txt | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) -- 2.18.0 diff --git a/Documentation/devicetree/bindings/mfd/syscon.txt b/Documentation/devicetree/bindings/mfd/syscon.txt index 25d9e9c2fd53..4c7bdb74bb0a 100644 --- a/Documentation/devicetree/bindings/mfd/syscon.txt +++ b/Documentation/devicetree/bindings/mfd/syscon.txt @@ -30,3 +30,46 @@ hwlock1: hwspinlock@40500000 { reg = <0x40500000 0x1000>; #hwlock-cells = <1>; }; + + + +==Syscon Name== + +Syscon name is a helper to be used in consumer nodes who refer to system +controller node. It provides a way to refer to syscon node by names with +phandle args in syscon consumer node. It will help people who have a lot +of syscon references to be managed. It is not a must feature and has no +effect to syscon node itself at all. + +Required properties: +- syscons: List of phandles and any number of arguments if needed. Arguments + is specific to differnet vendors and its usage should be described at each + vendor's bindings. For example: In Unisoc SoCs, the 1st arg will be treated + as register address offset and the 2nd is bit mask. + +- syscon-names: List of syscon node name strings sorted in the same order as + what it represents in property syscons. + +Optional property: +- #.*-cells: Represents the number of arguments in single phandle in syscons + list. ".*" is vendor specific. If this property is not set, default value + will be 0. + +Examples: + +apb_regs: syscon@20008000 { + compatible = "sprd,apb-glb", "syscon"; + reg = <0x20008000 0x100>; +}; + +aon_regs: syscon@40008000 { + compatible = "sprd,aon-glb", "syscon"; + reg = <0x40008000 0x100>; +}; + +display@40500000 { + ... + #syscon-disp-cells = <2>; + syscons = <&ap_apb_regs 0x4 0xf00>, <&aon_regs 0x8 0x7>; + syscon-names = "enable", "power"; +};