Message ID | 20231013101450.573-3-praveen.teja.kundanala@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1785205vqb; Fri, 13 Oct 2023 03:16:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKJZ5MHQkDT8ttU79mwnOB3y0nzJUw41xZVPLVmLXEQYz4Hn4F7uxE7FfWjUS/qRa1bc2J X-Received: by 2002:a05:6a20:8f01:b0:163:d382:ba99 with SMTP id b1-20020a056a208f0100b00163d382ba99mr31888428pzk.5.1697192171080; Fri, 13 Oct 2023 03:16:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697192171; cv=pass; d=google.com; s=arc-20160816; b=IRZpZrEkic4XCorzXVvOfwLLQ4NNAuaRiHfeuDM/8II7SDNAMtEIBdg4a1WFdl1MCf WJI2xObhdiOqHrGWGMOq8OOhUAhoUrggVqR5+WSn3pJiMLoiSlCda6Uy4a381R1EdvIG KnZZlrEMrZ5aQqG+QuUGYmAuUg2PYhVddpb2+Mqs2VYqweM8rnT5ZbPHVi/4r/g2LkDv zRMXRjde1GY8P4biBJ7RtiK8TttO5Hub7rcwvyh1dLlraa3Al59liernPb+eDTo63tyF qOsYC9nOedPzw9vWzxH4IhvwVFqK84cSBgAks2maW13f7m1BOPCxHlMDOrIJjJBr64no Weag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=METhKhQvMOTZF6vjMillbwIoUKU267ppH0f9uY07vdc=; fh=IXubkxwkwiJd9WxmQyN+6x4JcuX2UDmHVbBq2cGhPeY=; b=seQY146iCX9W6Hk+Wf5iK99X/FEWBJi4z/3rYLOTAsoQve26s8rFt9hVZTrBeRdDNl 4TwIJMdVEfWY7HSEQb7wwwW2wIy+1H4j1x41IEoeX9FUo/R5MnVTZQzwDsNqjLP7+5jB bIscjqgOquuDpm7xqkHGxiFklcq2tsuTdFUX7OXYSFBn3D8EPaSP0/zimXUWRivHpXk0 ubgOCEbREH3BF3JOXvhQrmRk1Gc+RFc09GjXu8xUkurF2ZNgFNoqBn89Vsh6bvGJ+MPg RXzdJBYwOZfuw6x0qGimmDgiWqnctc8GyFvIvsrGBsMtwFNyONt+CDBuEVJ9TIDByuwf 7KBA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=oVqaZ12L; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id 9-20020a17090a018900b00274274bf0ecsi4339019pjc.61.2023.10.13.03.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 03:16:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=oVqaZ12L; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 923888093491; Fri, 13 Oct 2023 03:16:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230025AbjJMKPe (ORCPT <rfc822;rua109.linux@gmail.com> + 19 others); Fri, 13 Oct 2023 06:15:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbjJMKPb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 13 Oct 2023 06:15:31 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2069.outbound.protection.outlook.com [40.107.243.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0A7BC0; Fri, 13 Oct 2023 03:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jpNwkYR073DgP3ioCPzFYzwZzrCvW2TS+4vTVbRkztyKzRDkxhzOOCm5Jfrj3Y8wsfs7K8/6bB3IxoyzkcX//OXFcgrL54NhNP46uArtuiq+q7ohliaWvR6RAOSblbL4+TKGWRXXCQQFDNYLtxTxf8AcMlmA/7x5tjT6H5miU/na2NZPHh3U2t2UWCD3al65XLx3q1vmNveBWM8CR4J93nkjeVSySwSUTz3ZzJ38JBnojmNnYpPouup2vtJqbc1deT0yWP6+S24xzt2eK5UCHXZJH3IJq6AIKLNnUn5Tt0DBDay6q2erKMXvojXiuu1/19YAP314R+fZqsq/o2mZnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=METhKhQvMOTZF6vjMillbwIoUKU267ppH0f9uY07vdc=; b=iZnJTUE0UchQer3w9LFBBWo/ZETD/R/c6Pi0J2b0NHBcvxg992AEtQGxK1vg/fiSylb0rM7Qy8TLRKBR/0erN7aKRiJph1z1UtHNTB0Z7BfOKPZF5gXmYFf1fYfmRmFaUohl9h0o7Ky1qN2Gnpb6gcUmZdM5CXpRYkXrzYkujPQoN2yQ660Wb0+rF555G/4GGMDuG8j3U5XliF5pcBYC4uETWIj/zMcZo82lxatbNf14RYVUVPoxhbarck6UEVEeocKS8kO0d9eU07hyjdm+Iy6kJtq8cbVREEhDvIk49VlA9GB8U5GRAGyFkxjMy7ao5DLfEwpWoG/GT9W+ELkHnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=METhKhQvMOTZF6vjMillbwIoUKU267ppH0f9uY07vdc=; b=oVqaZ12LtUmqi6sYyKa1OfjoY4fDGbR4i/qi6zLSH0FGSEIc5AtpGc7uoPuGbo9E+htt5irpDwBFf/SZGLZI3cRp6psQ7TAPpb9KDbz0hA19nng2SIEjHA1eOQpjlyQ66wNAw1kxpDILBtY/vKSMHPjaI7sjtAyCVvKMx3AnYuc= Received: from BL0PR02CA0137.namprd02.prod.outlook.com (2603:10b6:208:35::42) by PH7PR12MB9175.namprd12.prod.outlook.com (2603:10b6:510:2e6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.43; Fri, 13 Oct 2023 10:15:19 +0000 Received: from BL02EPF0001A107.namprd05.prod.outlook.com (2603:10b6:208:35:cafe::db) by BL0PR02CA0137.outlook.office365.com (2603:10b6:208:35::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.30 via Frontend Transport; Fri, 13 Oct 2023 10:15:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL02EPF0001A107.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Fri, 13 Oct 2023 10:15:19 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 13 Oct 2023 05:15:18 -0500 Received: from xhdharshah40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Fri, 13 Oct 2023 05:15:16 -0500 From: Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> To: <srinivas.kandagatla@linaro.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>, <michal.simek@amd.com>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> CC: <linux-kernel@vger.kernel.org> Subject: [PATCH 2/5] dt-bindings: nvmem: Convert xlnx,zynqmp-nvmem.txt to yaml Date: Fri, 13 Oct 2023 15:44:47 +0530 Message-ID: <20231013101450.573-3-praveen.teja.kundanala@amd.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20231013101450.573-1-praveen.teja.kundanala@amd.com> References: <20231013101450.573-1-praveen.teja.kundanala@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A107:EE_|PH7PR12MB9175:EE_ X-MS-Office365-Filtering-Correlation-Id: 863e3791-be11-4309-98f6-08dbcbd54d8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZayeKAlUw3bQ6Di/DS6EpvX+3DBNOHHbToi9ryc+qLfy00Lons9VqYeD3vh6xarm9jw4RVZSkyMqAfXbgX5c4OFtFHt7Z2dTqfjknjSwe0v8E/QpOQ3iWhIvZDZSPZ9a9zbFzZFZtVtferUEnBQB8X8WeYAS/cSu4xjJDku61IglKPLnfhrtq/DEAZ1fzw178lhSVbZDyFeypiw4AyMkkvdfOK/0svxCy1rnbHhrpt3mk291witFeTvbKj/XsPAhwbt7boGBql9vY+aM1VsRtRZqW36q0mI5NWugZjeW7T4FChdrxAHmDedO9+dBXbZ3ff+0ki+dNRBYscvG4gPOB87kMz/p0c1Knv9ftEklOdCC/q6eMU/3PWJf6YYGAZFXQep5Ay0psJyyBRE5PzqC2AVNkTbZ628sUJuSvSiVk2Q3qq34KRfR4C6XiOXsWK/LAf/rb3KUM/d1dXbsy+0nX1CV9EFYSkde8pKvUaPOJ777XcZN+jvV0w9OZuXwbqNMjw92aJSfANcTOu7E53ah2sv8VErry+9W6GlHIlSuMxNqViduyVSv6FeqsPPMUt/amWOS8H0U83p6G/ELxZKATdP1KDX/HcoN6f88j8S2mzj5Xy9vMXF/kh0RHufj+hPyFZVyb49XQQPQTFxvINekvEYdo8MXLfm4sVodNZuk4voBBW9BM/nbid9qiy3QwTWbK9o9Vyh9xsQ7ctwt37ACnmutOdZEtwZSbmwV27Gd2N1OXdn7reGSoLx/ijoSbtnL5WU0NHD50nn+lW0f8A3m65vkMGASiVktrkbM1qonf+4= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(346002)(396003)(136003)(39860400002)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(82310400011)(40470700004)(36840700001)(46966006)(336012)(26005)(41300700001)(40480700001)(110136005)(40460700003)(426003)(36860700001)(478600001)(86362001)(36756003)(47076005)(6666004)(1076003)(5660300002)(356005)(70586007)(70206006)(316002)(82740400003)(966005)(103116003)(8676002)(2906002)(4326008)(8936002)(81166007)(2616005)(83380400001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2023 10:15:19.2251 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 863e3791-be11-4309-98f6-08dbcbd54d8e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A107.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9175 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 13 Oct 2023 03:16:03 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779634978133285101 X-GMAIL-MSGID: 1779634978133285101 |
Series |
Add ZynqMP efuse access support
|
|
Commit Message
Praveen Teja Kundanala
Oct. 13, 2023, 10:14 a.m. UTC
Convert the xlnx,zynqmp-nvmem.txt to yaml.
Signed-off-by: Praveen Teja Kundanala <praveen.teja.kundanala@amd.com>
---
.../bindings/nvmem/xlnx,zynqmp-nvmem.txt | 46 ---------------
.../bindings/nvmem/xlnx,zynqmp-nvmem.yaml | 59 +++++++++++++++++++
2 files changed, 59 insertions(+), 46 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt
create mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml
Comments
On 13/10/2023 12:14, Praveen Teja Kundanala wrote: > Convert the xlnx,zynqmp-nvmem.txt to yaml. > > Signed-off-by: Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> > --- > .../bindings/nvmem/xlnx,zynqmp-nvmem.txt | 46 --------------- > .../bindings/nvmem/xlnx,zynqmp-nvmem.yaml | 59 +++++++++++++++++++ > 2 files changed, 59 insertions(+), 46 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt > create mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml > > diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt > deleted file mode 100644 > index 4881561b3a02..000000000000 > --- a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt > +++ /dev/null > @@ -1,46 +0,0 @@ > --------------------------------------------------------------------------- > -= Zynq UltraScale+ MPSoC nvmem firmware driver binding = > --------------------------------------------------------------------------- > -The nvmem_firmware node provides access to the hardware related data > -like soc revision, IDCODE... etc, By using the firmware interface. > - > -Required properties: > -- compatible: should be "xlnx,zynqmp-nvmem-fw" > - > -= Data cells = > -Are child nodes of silicon id, bindings of which as described in > -bindings/nvmem/nvmem.txt > - > -------- > - Example > -------- > -firmware { > - zynqmp_firmware: zynqmp-firmware { > - compatible = "xlnx,zynqmp-firmware"; > - method = "smc"; > - > - nvmem_firmware { > - compatible = "xlnx,zynqmp-nvmem-fw"; > - #address-cells = <1>; > - #size-cells = <1>; > - > - /* Data cells */ > - soc_revision: soc_revision { > - reg = <0x0 0x4>; > - }; > - }; > - }; > -}; > - > -= Data consumers = > -Are device nodes which consume nvmem data cells. > - > -For example: > - pcap { > - ... > - > - nvmem-cells = <&soc_revision>; > - nvmem-cell-names = "soc_revision"; > - > - ... > - }; > diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml > new file mode 100644 > index 000000000000..e03ed8c32537 > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml > @@ -0,0 +1,59 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/nvmem/xlnx,zynqmp-nvmem.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Zynq UltraScale+ MPSoC Non Volatile Memory interface > + > +description: | > + The ZynqMP MPSoC provides access to the hardware related data > + like SOC revision, IDCODE. > + > +maintainers: > + - Kalyani Akula <kalyani.akula@amd.com> > + - Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> > + > +allOf: > + - $ref: "nvmem.yaml#" Drop quotes. > + > +properties: > + compatible: > + const: xlnx,zynqmp-nvmem-fw > + > + '#address-cells': > + const: 1 Drop > + > + '#size-cells': > + const: 1 Drop > + > +required: > + - compatible required: block goes after patternProperties: block > + > +patternProperties: > + "^soc_revision@0$": Why do you define individual memory cells? Is this part of a binding? IOW, OS/Linux requires this? > + type: object > + description: > + This node is used to read SOC version and IDCODE of ZynqMP. Read-only. > + > + properties: > + reg: > + maxItems: 1 > + > + required: > + - reg > + > +additionalProperties: false Instead: unevaluatedProperties: false > + > +examples: > + - | > + nvmem_firmware { Underscores are not allowed in node names. Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification: https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation Look at other files for examples. > + compatible = "xlnx,zynqmp-nvmem-fw"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + /* Data cells */ > + soc_revision: soc_revision@0 { Drop unused label. No underscores in node names. Best regards, Krzysztof
On Fri, 13 Oct 2023 15:44:47 +0530, Praveen Teja Kundanala wrote: > Convert the xlnx,zynqmp-nvmem.txt to yaml. > > Signed-off-by: Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> > --- > .../bindings/nvmem/xlnx,zynqmp-nvmem.txt | 46 --------------- > .../bindings/nvmem/xlnx,zynqmp-nvmem.yaml | 59 +++++++++++++++++++ > 2 files changed, 59 insertions(+), 46 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt > create mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: ./Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml:18:11: [error] string value is redundantly quoted with any quotes (quoted-strings) dtschema/dtc warnings/errors: doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231013101450.573-3-praveen.teja.kundanala@amd.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 10/13/23 12:30, Krzysztof Kozlowski wrote: > On 13/10/2023 12:14, Praveen Teja Kundanala wrote: >> Convert the xlnx,zynqmp-nvmem.txt to yaml. >> >> Signed-off-by: Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> >> --- >> .../bindings/nvmem/xlnx,zynqmp-nvmem.txt | 46 --------------- >> .../bindings/nvmem/xlnx,zynqmp-nvmem.yaml | 59 +++++++++++++++++++ >> 2 files changed, 59 insertions(+), 46 deletions(-) >> delete mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt >> create mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml >> >> diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt >> deleted file mode 100644 >> index 4881561b3a02..000000000000 >> --- a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt >> +++ /dev/null >> @@ -1,46 +0,0 @@ >> --------------------------------------------------------------------------- >> -= Zynq UltraScale+ MPSoC nvmem firmware driver binding = >> --------------------------------------------------------------------------- >> -The nvmem_firmware node provides access to the hardware related data >> -like soc revision, IDCODE... etc, By using the firmware interface. >> - >> -Required properties: >> -- compatible: should be "xlnx,zynqmp-nvmem-fw" >> - >> -= Data cells = >> -Are child nodes of silicon id, bindings of which as described in >> -bindings/nvmem/nvmem.txt >> - >> -------- >> - Example >> -------- >> -firmware { >> - zynqmp_firmware: zynqmp-firmware { >> - compatible = "xlnx,zynqmp-firmware"; >> - method = "smc"; >> - >> - nvmem_firmware { >> - compatible = "xlnx,zynqmp-nvmem-fw"; >> - #address-cells = <1>; >> - #size-cells = <1>; >> - >> - /* Data cells */ >> - soc_revision: soc_revision { >> - reg = <0x0 0x4>; >> - }; >> - }; >> - }; >> -}; >> - >> -= Data consumers = >> -Are device nodes which consume nvmem data cells. >> - >> -For example: >> - pcap { >> - ... >> - >> - nvmem-cells = <&soc_revision>; >> - nvmem-cell-names = "soc_revision"; >> - >> - ... >> - }; >> diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml >> new file mode 100644 >> index 000000000000..e03ed8c32537 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml >> @@ -0,0 +1,59 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/nvmem/xlnx,zynqmp-nvmem.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Zynq UltraScale+ MPSoC Non Volatile Memory interface >> + >> +description: | >> + The ZynqMP MPSoC provides access to the hardware related data >> + like SOC revision, IDCODE. >> + >> +maintainers: >> + - Kalyani Akula <kalyani.akula@amd.com> >> + - Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> >> + >> +allOf: >> + - $ref: "nvmem.yaml#" > > Drop quotes. > >> + >> +properties: >> + compatible: >> + const: xlnx,zynqmp-nvmem-fw >> + >> + '#address-cells': >> + const: 1 > > Drop > >> + >> + '#size-cells': >> + const: 1 > > Drop > >> + >> +required: >> + - compatible > > required: block goes after patternProperties: block > >> + >> +patternProperties: >> + "^soc_revision@0$": > > Why do you define individual memory cells? Is this part of a binding? > IOW, OS/Linux requires this? nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() calls. It means you should be able to describe internal layout that's why names are used. And address in name is there because of reg property is used to describe base offset and size. Thanks, Michal
On 13/10/2023 13:22, Michal Simek wrote: >> >>> + >>> +required: >>> + - compatible >> >> required: block goes after patternProperties: block >> >>> + >>> +patternProperties: >>> + "^soc_revision@0$": >> >> Why do you define individual memory cells? Is this part of a binding? >> IOW, OS/Linux requires this? > > nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() > calls. It means you should be able to describe internal layout that's why names > are used. And address in name is there because of reg property is used to > describe base offset and size. That's not really what I am asking. Why internal layout of memory must be part of the bindings? Best regards, Krzysztof
On 10/13/23 13:46, Krzysztof Kozlowski wrote: > On 13/10/2023 13:22, Michal Simek wrote: >>> >>>> + >>>> +required: >>>> + - compatible >>> >>> required: block goes after patternProperties: block >>> >>>> + >>>> +patternProperties: >>>> + "^soc_revision@0$": >>> >>> Why do you define individual memory cells? Is this part of a binding? >>> IOW, OS/Linux requires this? >> >> nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() >> calls. It means you should be able to describe internal layout that's why names >> are used. And address in name is there because of reg property is used to >> describe base offset and size. > > That's not really what I am asking. Why internal layout of memory must > be part of the bindings? It doesn't need to be but offsets are hardcoded inside the driver itself and they can't be different. On different nvmem locations like MAC location in eeprom this can vary across boards but in this case location has to be only like this. I am fine if they don't need to be actually check but there is no any other way how they can be composed. And also others are not valid that's why not to describe only valid one. Thanks, Michal
On 13/10/2023 13:51, Michal Simek wrote: > > > On 10/13/23 13:46, Krzysztof Kozlowski wrote: >> On 13/10/2023 13:22, Michal Simek wrote: >>>> >>>>> + >>>>> +required: >>>>> + - compatible >>>> >>>> required: block goes after patternProperties: block >>>> >>>>> + >>>>> +patternProperties: >>>>> + "^soc_revision@0$": >>>> >>>> Why do you define individual memory cells? Is this part of a binding? >>>> IOW, OS/Linux requires this? >>> >>> nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() >>> calls. It means you should be able to describe internal layout that's why names >>> are used. And address in name is there because of reg property is used to >>> describe base offset and size. >> >> That's not really what I am asking. Why internal layout of memory must >> be part of the bindings? > > It doesn't need to be but offsets are hardcoded inside the driver itself and > they can't be different. Hm, where? I opened drivers/nvmem/zynqmp_nvmem.c and I do not see any hard-coded offsets. > On different nvmem locations like MAC location in > eeprom this can vary across boards but in this case location has to be only like > this. > I am fine if they don't need to be actually check but there is no any other way > how they can be composed. And also others are not valid that's why not to > describe only valid one. OK, that would be valid (if I find anywhere the offsets) and answers my questions but I wish it was documented somewhere. Because now you are making it a binding, so it cannot change (e.g. for different devices with same hardware but different firmware or manufacturing process, for future hardware sharing this binding). In any case the binding should have only items which are really fixed and OS depends on them. Neither this nor next commit answers this. Best regards, Krzysztof
On 10/13/23 13:58, Krzysztof Kozlowski wrote: > On 13/10/2023 13:51, Michal Simek wrote: >> >> >> On 10/13/23 13:46, Krzysztof Kozlowski wrote: >>> On 13/10/2023 13:22, Michal Simek wrote: >>>>> >>>>>> + >>>>>> +required: >>>>>> + - compatible >>>>> >>>>> required: block goes after patternProperties: block >>>>> >>>>>> + >>>>>> +patternProperties: >>>>>> + "^soc_revision@0$": >>>>> >>>>> Why do you define individual memory cells? Is this part of a binding? >>>>> IOW, OS/Linux requires this? >>>> >>>> nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() >>>> calls. It means you should be able to describe internal layout that's why names >>>> are used. And address in name is there because of reg property is used to >>>> describe base offset and size. >>> >>> That's not really what I am asking. Why internal layout of memory must >>> be part of the bindings? >> >> It doesn't need to be but offsets are hardcoded inside the driver itself and >> they can't be different. > > Hm, where? I opened drivers/nvmem/zynqmp_nvmem.c and I do not see any > hard-coded offsets. Current driver supports only soc revision from offset 0. But if you look at 5/5 you need to define offsets where information is present. +#define SOC_VERSION_OFFSET 0x0 +#define EFUSE_START_OFFSET 0xC +#define EFUSE_END_OFFSET 0xFC +#define EFUSE_PUF_START_OFFSET 0x100 +#define EFUSE_PUF_MID_OFFSET 0x140 +#define EFUSE_PUF_END_OFFSET 0x17F > >> On different nvmem locations like MAC location in >> eeprom this can vary across boards but in this case location has to be only like >> this. >> I am fine if they don't need to be actually check but there is no any other way >> how they can be composed. And also others are not valid that's why not to >> describe only valid one. > > OK, that would be valid (if I find anywhere the offsets) and answers my > questions but I wish it was documented somewhere. Because now you are > making it a binding, so it cannot change (e.g. for different devices > with same hardware but different firmware or manufacturing process, for > future hardware sharing this binding). ZynqMP firmware with xlnx,zynqmp-nvmem-fw compatible string is using this map. If there is different firmware likely xlnx,zynqmp-nvmem-fw compatible string can't be used. > In any case the binding should have only items which are really fixed > and OS depends on them. Neither this nor next commit answers this. Actually 5/5 has this in commit message 0 - SOC version(read only) 0xC - 0xFC -ZynqMP specific purpose efuses 0x100 - 0x17F - Physical Unclonable Function(PUF) efuses repurposed as user efuses Thanks, Michal
On 13/10/2023 14:08, Michal Simek wrote: > > > On 10/13/23 13:58, Krzysztof Kozlowski wrote: >> On 13/10/2023 13:51, Michal Simek wrote: >>> >>> >>> On 10/13/23 13:46, Krzysztof Kozlowski wrote: >>>> On 13/10/2023 13:22, Michal Simek wrote: >>>>>> >>>>>>> + >>>>>>> +required: >>>>>>> + - compatible >>>>>> >>>>>> required: block goes after patternProperties: block >>>>>> >>>>>>> + >>>>>>> +patternProperties: >>>>>>> + "^soc_revision@0$": >>>>>> >>>>>> Why do you define individual memory cells? Is this part of a binding? >>>>>> IOW, OS/Linux requires this? >>>>> >>>>> nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() >>>>> calls. It means you should be able to describe internal layout that's why names >>>>> are used. And address in name is there because of reg property is used to >>>>> describe base offset and size. >>>> >>>> That's not really what I am asking. Why internal layout of memory must >>>> be part of the bindings? >>> >>> It doesn't need to be but offsets are hardcoded inside the driver itself and >>> they can't be different. >> >> Hm, where? I opened drivers/nvmem/zynqmp_nvmem.c and I do not see any >> hard-coded offsets. > > Current driver supports only soc revision from offset 0. > But if you look at 5/5 you need to define offsets where information is present. > +#define SOC_VERSION_OFFSET 0x0 > +#define EFUSE_START_OFFSET 0xC > +#define EFUSE_END_OFFSET 0xFC > +#define EFUSE_PUF_START_OFFSET 0x100 > +#define EFUSE_PUF_MID_OFFSET 0x140 > +#define EFUSE_PUF_END_OFFSET 0x17F There is nothing like this in existing driver, so the argument that "I am adding this to the binding during conversion because driver needs it" is not true. Conversion is only a conversion. Now, if you want to add something new to the binding because of new driver changes, that's separate topic. And since it is new change in the driver I can comment: please don't. Your nvmem driver should not depend on it. nvmem is only the provider. Best regards, Krzysztof
On 10/13/23 14:54, Krzysztof Kozlowski wrote: > On 13/10/2023 14:08, Michal Simek wrote: >> >> >> On 10/13/23 13:58, Krzysztof Kozlowski wrote: >>> On 13/10/2023 13:51, Michal Simek wrote: >>>> >>>> >>>> On 10/13/23 13:46, Krzysztof Kozlowski wrote: >>>>> On 13/10/2023 13:22, Michal Simek wrote: >>>>>>> >>>>>>>> + >>>>>>>> +required: >>>>>>>> + - compatible >>>>>>> >>>>>>> required: block goes after patternProperties: block >>>>>>> >>>>>>>> + >>>>>>>> +patternProperties: >>>>>>>> + "^soc_revision@0$": >>>>>>> >>>>>>> Why do you define individual memory cells? Is this part of a binding? >>>>>>> IOW, OS/Linux requires this? >>>>>> >>>>>> nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() >>>>>> calls. It means you should be able to describe internal layout that's why names >>>>>> are used. And address in name is there because of reg property is used to >>>>>> describe base offset and size. >>>>> >>>>> That's not really what I am asking. Why internal layout of memory must >>>>> be part of the bindings? >>>> >>>> It doesn't need to be but offsets are hardcoded inside the driver itself and >>>> they can't be different. >>> >>> Hm, where? I opened drivers/nvmem/zynqmp_nvmem.c and I do not see any >>> hard-coded offsets. >> >> Current driver supports only soc revision from offset 0. >> But if you look at 5/5 you need to define offsets where information is present. >> +#define SOC_VERSION_OFFSET 0x0 >> +#define EFUSE_START_OFFSET 0xC >> +#define EFUSE_END_OFFSET 0xFC >> +#define EFUSE_PUF_START_OFFSET 0x100 >> +#define EFUSE_PUF_MID_OFFSET 0x140 >> +#define EFUSE_PUF_END_OFFSET 0x17F > > There is nothing like this in existing driver, so the argument that "I > am adding this to the binding during conversion because driver needs it" > is not true. Conversion is only a conversion. Conversion in 2/5 is adding only soc revision which is already there. It is starting from 0 and world size is 1. And 0 is not listed because that's start all the time. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nvmem/zynqmp_nvmem.c?h=v6.6-rc5#n39 And soc revision was also listed in origin binding example. > Now, if you want to add something new to the binding because of new > driver changes, that's separate topic. Functionality in firmware is there for quite a long time but as I said I am fine if map is not going to be inside dt binding spec. > And since it is new change in the driver I can comment: please don't. > Your nvmem driver should not depend on it. nvmem is only the provider. Let's see what Srinivas says about implementation. If driver should be just provider then pretty much current driver should be completely rewritten to different style. I mean to have just transport via SMCs with offset/size and then providing functionality in firmware. Thanks, Michal
On 13/10/2023 15:06, Michal Simek wrote: > > > On 10/13/23 14:54, Krzysztof Kozlowski wrote: >> On 13/10/2023 14:08, Michal Simek wrote: >>> >>> >>> On 10/13/23 13:58, Krzysztof Kozlowski wrote: >>>> On 13/10/2023 13:51, Michal Simek wrote: >>>>> >>>>> >>>>> On 10/13/23 13:46, Krzysztof Kozlowski wrote: >>>>>> On 13/10/2023 13:22, Michal Simek wrote: >>>>>>>> >>>>>>>>> + >>>>>>>>> +required: >>>>>>>>> + - compatible >>>>>>>> >>>>>>>> required: block goes after patternProperties: block >>>>>>>> >>>>>>>>> + >>>>>>>>> +patternProperties: >>>>>>>>> + "^soc_revision@0$": >>>>>>>> >>>>>>>> Why do you define individual memory cells? Is this part of a binding? >>>>>>>> IOW, OS/Linux requires this? >>>>>>> >>>>>>> nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() >>>>>>> calls. It means you should be able to describe internal layout that's why names >>>>>>> are used. And address in name is there because of reg property is used to >>>>>>> describe base offset and size. >>>>>> >>>>>> That's not really what I am asking. Why internal layout of memory must >>>>>> be part of the bindings? >>>>> >>>>> It doesn't need to be but offsets are hardcoded inside the driver itself and >>>>> they can't be different. >>>> >>>> Hm, where? I opened drivers/nvmem/zynqmp_nvmem.c and I do not see any >>>> hard-coded offsets. >>> >>> Current driver supports only soc revision from offset 0. >>> But if you look at 5/5 you need to define offsets where information is present. >>> +#define SOC_VERSION_OFFSET 0x0 >>> +#define EFUSE_START_OFFSET 0xC >>> +#define EFUSE_END_OFFSET 0xFC >>> +#define EFUSE_PUF_START_OFFSET 0x100 >>> +#define EFUSE_PUF_MID_OFFSET 0x140 >>> +#define EFUSE_PUF_END_OFFSET 0x17F >> >> There is nothing like this in existing driver, so the argument that "I >> am adding this to the binding during conversion because driver needs it" >> is not true. Conversion is only a conversion. > > Conversion in 2/5 is adding only soc revision which is already there. It is > starting from 0 and world size is 1. And 0 is not listed because that's start > all the time. > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nvmem/zynqmp_nvmem.c?h=v6.6-rc5#n39 This defines the nvmem config, not what should be where. > > And soc revision was also listed in origin binding example. Example is not a binding. Please drop enforcement of some specific nodes from the binding. > >> Now, if you want to add something new to the binding because of new >> driver changes, that's separate topic. > > Functionality in firmware is there for quite a long time but as I said I am fine > if map is not going to be inside dt binding spec. > >> And since it is new change in the driver I can comment: please don't. >> Your nvmem driver should not depend on it. nvmem is only the provider. > > Let's see what Srinivas says about implementation. If driver should be just > provider then pretty much current driver should be completely rewritten to > different style. I mean to have just transport via SMCs with offset/size and > then providing functionality in firmware. Best regards, Krzysztof
On 10/13/23 15:10, Krzysztof Kozlowski wrote: > On 13/10/2023 15:06, Michal Simek wrote: >> >> >> On 10/13/23 14:54, Krzysztof Kozlowski wrote: >>> On 13/10/2023 14:08, Michal Simek wrote: >>>> >>>> >>>> On 10/13/23 13:58, Krzysztof Kozlowski wrote: >>>>> On 13/10/2023 13:51, Michal Simek wrote: >>>>>> >>>>>> >>>>>> On 10/13/23 13:46, Krzysztof Kozlowski wrote: >>>>>>> On 13/10/2023 13:22, Michal Simek wrote: >>>>>>>>> >>>>>>>>>> + >>>>>>>>>> +required: >>>>>>>>>> + - compatible >>>>>>>>> >>>>>>>>> required: block goes after patternProperties: block >>>>>>>>> >>>>>>>>>> + >>>>>>>>>> +patternProperties: >>>>>>>>>> + "^soc_revision@0$": >>>>>>>>> >>>>>>>>> Why do you define individual memory cells? Is this part of a binding? >>>>>>>>> IOW, OS/Linux requires this? >>>>>>>> >>>>>>>> nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() >>>>>>>> calls. It means you should be able to describe internal layout that's why names >>>>>>>> are used. And address in name is there because of reg property is used to >>>>>>>> describe base offset and size. >>>>>>> >>>>>>> That's not really what I am asking. Why internal layout of memory must >>>>>>> be part of the bindings? >>>>>> >>>>>> It doesn't need to be but offsets are hardcoded inside the driver itself and >>>>>> they can't be different. >>>>> >>>>> Hm, where? I opened drivers/nvmem/zynqmp_nvmem.c and I do not see any >>>>> hard-coded offsets. >>>> >>>> Current driver supports only soc revision from offset 0. >>>> But if you look at 5/5 you need to define offsets where information is present. >>>> +#define SOC_VERSION_OFFSET 0x0 >>>> +#define EFUSE_START_OFFSET 0xC >>>> +#define EFUSE_END_OFFSET 0xFC >>>> +#define EFUSE_PUF_START_OFFSET 0x100 >>>> +#define EFUSE_PUF_MID_OFFSET 0x140 >>>> +#define EFUSE_PUF_END_OFFSET 0x17F >>> >>> There is nothing like this in existing driver, so the argument that "I >>> am adding this to the binding during conversion because driver needs it" >>> is not true. Conversion is only a conversion. >> >> Conversion in 2/5 is adding only soc revision which is already there. It is >> starting from 0 and world size is 1. And 0 is not listed because that's start >> all the time. >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nvmem/zynqmp_nvmem.c?h=v6.6-rc5#n39 > > This defines the nvmem config, not what should be where. If you have only one entry you are also saying where it is. Thanks, Michal
On Fri, Oct 13, 2023 at 03:44:47PM +0530, Praveen Teja Kundanala wrote: > Convert the xlnx,zynqmp-nvmem.txt to yaml. > > Signed-off-by: Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> > --- > .../bindings/nvmem/xlnx,zynqmp-nvmem.txt | 46 --------------- > .../bindings/nvmem/xlnx,zynqmp-nvmem.yaml | 59 +++++++++++++++++++ > 2 files changed, 59 insertions(+), 46 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt > create mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml > > diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt > deleted file mode 100644 > index 4881561b3a02..000000000000 > --- a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt > +++ /dev/null > @@ -1,46 +0,0 @@ > --------------------------------------------------------------------------- > -= Zynq UltraScale+ MPSoC nvmem firmware driver binding = > --------------------------------------------------------------------------- > -The nvmem_firmware node provides access to the hardware related data > -like soc revision, IDCODE... etc, By using the firmware interface. > - > -Required properties: > -- compatible: should be "xlnx,zynqmp-nvmem-fw" > - > -= Data cells = > -Are child nodes of silicon id, bindings of which as described in > -bindings/nvmem/nvmem.txt > - > -------- > - Example > -------- > -firmware { > - zynqmp_firmware: zynqmp-firmware { > - compatible = "xlnx,zynqmp-firmware"; > - method = "smc"; > - > - nvmem_firmware { > - compatible = "xlnx,zynqmp-nvmem-fw"; > - #address-cells = <1>; > - #size-cells = <1>; > - > - /* Data cells */ > - soc_revision: soc_revision { > - reg = <0x0 0x4>; > - }; > - }; > - }; > -}; > - > -= Data consumers = > -Are device nodes which consume nvmem data cells. > - > -For example: > - pcap { > - ... > - > - nvmem-cells = <&soc_revision>; > - nvmem-cell-names = "soc_revision"; > - > - ... > - }; > diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml > new file mode 100644 > index 000000000000..e03ed8c32537 > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml > @@ -0,0 +1,59 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/nvmem/xlnx,zynqmp-nvmem.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Zynq UltraScale+ MPSoC Non Volatile Memory interface > + > +description: | > + The ZynqMP MPSoC provides access to the hardware related data > + like SOC revision, IDCODE. > + > +maintainers: > + - Kalyani Akula <kalyani.akula@amd.com> > + - Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> > + > +allOf: > + - $ref: "nvmem.yaml#" > + > +properties: > + compatible: > + const: xlnx,zynqmp-nvmem-fw > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 1 > + > +required: > + - compatible > + > +patternProperties: > + "^soc_revision@0$": Fixed string, not a pattern. dtschema will now flag this. Thanks for the test case. ;) > + type: object Needs 'additionalProperties' or... > + description: > + This node is used to read SOC version and IDCODE of ZynqMP. Read-only. > + > + properties: > + reg: > + maxItems: 1 > + > + required: > + - reg fixed-cell.yaml (via nvmem.yaml) already says this, so this can all be dropped. Except that this[1] just landed, so you will need to adapt to it. Though there is an issue that fixed-cell.yaml doesn't restrict the allowed properties, so that needs to happen somewhere... Not sure what the fix is. Hopefully fixed-cell.yaml can just be changed to 'additionalProperties: false', but need to see if other properties are in use. Rob [1] https://lore.kernel.org/all/169667333484.74178.7121029453685069845.b4-ty@linaro.org/
On 10/13/23 15:10, Krzysztof Kozlowski wrote: > On 13/10/2023 15:06, Michal Simek wrote: >> >> >> On 10/13/23 14:54, Krzysztof Kozlowski wrote: >>> On 13/10/2023 14:08, Michal Simek wrote: >>>> >>>> >>>> On 10/13/23 13:58, Krzysztof Kozlowski wrote: >>>>> On 13/10/2023 13:51, Michal Simek wrote: >>>>>> >>>>>> >>>>>> On 10/13/23 13:46, Krzysztof Kozlowski wrote: >>>>>>> On 13/10/2023 13:22, Michal Simek wrote: >>>>>>>>> >>>>>>>>>> + >>>>>>>>>> +required: >>>>>>>>>> + - compatible >>>>>>>>> >>>>>>>>> required: block goes after patternProperties: block >>>>>>>>> >>>>>>>>>> + >>>>>>>>>> +patternProperties: >>>>>>>>>> + "^soc_revision@0$": >>>>>>>>> >>>>>>>>> Why do you define individual memory cells? Is this part of a binding? >>>>>>>>> IOW, OS/Linux requires this? >>>>>>>> >>>>>>>> nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() >>>>>>>> calls. It means you should be able to describe internal layout that's why names >>>>>>>> are used. And address in name is there because of reg property is used to >>>>>>>> describe base offset and size. >>>>>>> >>>>>>> That's not really what I am asking. Why internal layout of memory must >>>>>>> be part of the bindings? >>>>>> >>>>>> It doesn't need to be but offsets are hardcoded inside the driver itself and >>>>>> they can't be different. >>>>> >>>>> Hm, where? I opened drivers/nvmem/zynqmp_nvmem.c and I do not see any >>>>> hard-coded offsets. >>>> >>>> Current driver supports only soc revision from offset 0. >>>> But if you look at 5/5 you need to define offsets where information is present. >>>> +#define SOC_VERSION_OFFSET 0x0 >>>> +#define EFUSE_START_OFFSET 0xC >>>> +#define EFUSE_END_OFFSET 0xFC >>>> +#define EFUSE_PUF_START_OFFSET 0x100 >>>> +#define EFUSE_PUF_MID_OFFSET 0x140 >>>> +#define EFUSE_PUF_END_OFFSET 0x17F >>> >>> There is nothing like this in existing driver, so the argument that "I >>> am adding this to the binding during conversion because driver needs it" >>> is not true. Conversion is only a conversion. >> >> Conversion in 2/5 is adding only soc revision which is already there. It is >> starting from 0 and world size is 1. And 0 is not listed because that's start >> all the time. >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nvmem/zynqmp_nvmem.c?h=v6.6-rc5#n39 > > This defines the nvmem config, not what should be where. > >> >> And soc revision was also listed in origin binding example. > > Example is not a binding. Please drop enforcement of some specific nodes > from the binding. ok. Fine. Praveen: Please drop that descriptions about sub nodes. Thanks, Michal
[AMD Official Use Only - General] > -----Original Message----- > From: Simek, Michal <michal.simek@amd.com> > Sent: Monday, October 16, 2023 1:32 PM > To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>; Kundanala, Praveen > Teja <praveen.teja.kundanala@amd.com>; srinivas.kandagatla@linaro.org; > robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org; > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Subject: Re: [PATCH 2/5] dt-bindings: nvmem: Convert xlnx,zynqmp-nvmem.txt > to yaml > > > > On 10/13/23 15:10, Krzysztof Kozlowski wrote: > > On 13/10/2023 15:06, Michal Simek wrote: > >> > >> > >> On 10/13/23 14:54, Krzysztof Kozlowski wrote: > >>> On 13/10/2023 14:08, Michal Simek wrote: > >>>> > >>>> > >>>> On 10/13/23 13:58, Krzysztof Kozlowski wrote: > >>>>> On 13/10/2023 13:51, Michal Simek wrote: > >>>>>> > >>>>>> > >>>>>> On 10/13/23 13:46, Krzysztof Kozlowski wrote: > >>>>>>> On 13/10/2023 13:22, Michal Simek wrote: > >>>>>>>>> > >>>>>>>>>> + > >>>>>>>>>> +required: > >>>>>>>>>> + - compatible > >>>>>>>>> > >>>>>>>>> required: block goes after patternProperties: block > >>>>>>>>> > >>>>>>>>>> + > >>>>>>>>>> +patternProperties: > >>>>>>>>>> + "^soc_revision@0$": > >>>>>>>>> > >>>>>>>>> Why do you define individual memory cells? Is this part of a > binding? > >>>>>>>>> IOW, OS/Linux requires this? > >>>>>>>> > >>>>>>>> nvmem has in kernel interface where you can reference to nodes. > >>>>>>>> nvmem_cell_get() calls. It means you should be able to describe > >>>>>>>> internal layout that's why names are used. And address in name > >>>>>>>> is there because of reg property is used to describe base offset and > size. > >>>>>>> > >>>>>>> That's not really what I am asking. Why internal layout of > >>>>>>> memory must be part of the bindings? > >>>>>> > >>>>>> It doesn't need to be but offsets are hardcoded inside the driver > >>>>>> itself and they can't be different. > >>>>> > >>>>> Hm, where? I opened drivers/nvmem/zynqmp_nvmem.c and I do not > see > >>>>> any hard-coded offsets. > >>>> > >>>> Current driver supports only soc revision from offset 0. > >>>> But if you look at 5/5 you need to define offsets where information is > present. > >>>> +#define SOC_VERSION_OFFSET 0x0 > >>>> +#define EFUSE_START_OFFSET 0xC > >>>> +#define EFUSE_END_OFFSET 0xFC > >>>> +#define EFUSE_PUF_START_OFFSET 0x100 > >>>> +#define EFUSE_PUF_MID_OFFSET 0x140 > >>>> +#define EFUSE_PUF_END_OFFSET 0x17F > >>> > >>> There is nothing like this in existing driver, so the argument that > >>> "I am adding this to the binding during conversion because driver needs it" > >>> is not true. Conversion is only a conversion. > >> > >> Conversion in 2/5 is adding only soc revision which is already there. > >> It is starting from 0 and world size is 1. And 0 is not listed > >> because that's start all the time. > >> > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tr > >> ee/drivers/nvmem/zynqmp_nvmem.c?h=v6.6-rc5#n39 > > > > This defines the nvmem config, not what should be where. > > > >> > >> And soc revision was also listed in origin binding example. > > > > Example is not a binding. Please drop enforcement of some specific > > nodes from the binding. > > ok. Fine. > Praveen: Please drop that descriptions about sub nodes. >[Kundanala, Praveen Teja] Okay. > > Thanks, > Michal
diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt deleted file mode 100644 index 4881561b3a02..000000000000 --- a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt +++ /dev/null @@ -1,46 +0,0 @@ --------------------------------------------------------------------------- -= Zynq UltraScale+ MPSoC nvmem firmware driver binding = --------------------------------------------------------------------------- -The nvmem_firmware node provides access to the hardware related data -like soc revision, IDCODE... etc, By using the firmware interface. - -Required properties: -- compatible: should be "xlnx,zynqmp-nvmem-fw" - -= Data cells = -Are child nodes of silicon id, bindings of which as described in -bindings/nvmem/nvmem.txt - -------- - Example -------- -firmware { - zynqmp_firmware: zynqmp-firmware { - compatible = "xlnx,zynqmp-firmware"; - method = "smc"; - - nvmem_firmware { - compatible = "xlnx,zynqmp-nvmem-fw"; - #address-cells = <1>; - #size-cells = <1>; - - /* Data cells */ - soc_revision: soc_revision { - reg = <0x0 0x4>; - }; - }; - }; -}; - -= Data consumers = -Are device nodes which consume nvmem data cells. - -For example: - pcap { - ... - - nvmem-cells = <&soc_revision>; - nvmem-cell-names = "soc_revision"; - - ... - }; diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml new file mode 100644 index 000000000000..e03ed8c32537 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/xlnx,zynqmp-nvmem.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Zynq UltraScale+ MPSoC Non Volatile Memory interface + +description: | + The ZynqMP MPSoC provides access to the hardware related data + like SOC revision, IDCODE. + +maintainers: + - Kalyani Akula <kalyani.akula@amd.com> + - Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> + +allOf: + - $ref: "nvmem.yaml#" + +properties: + compatible: + const: xlnx,zynqmp-nvmem-fw + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + +required: + - compatible + +patternProperties: + "^soc_revision@0$": + type: object + description: + This node is used to read SOC version and IDCODE of ZynqMP. Read-only. + + properties: + reg: + maxItems: 1 + + required: + - reg + +additionalProperties: false + +examples: + - | + nvmem_firmware { + compatible = "xlnx,zynqmp-nvmem-fw"; + #address-cells = <1>; + #size-cells = <1>; + + /* Data cells */ + soc_revision: soc_revision@0 { + reg = <0x0 0x4>; + }; + };