Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6044682rwp; Mon, 17 Jul 2023 13:59:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlF6zcC7AVNPEwmXnvdlQFZivufXUEMtPCSjPc11A15gg9ohp0EOmMJG+dWccdhUv9k/bLoq X-Received: by 2002:a05:6a20:406:b0:132:a85f:b2e7 with SMTP id a6-20020a056a20040600b00132a85fb2e7mr12845080pza.53.1689627557398; Mon, 17 Jul 2023 13:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689627557; cv=none; d=google.com; s=arc-20160816; b=yZxdufOzA9rXiys4inFOLVy4nYZXyvW0RQBZMWX2Ez2CzxDWsGg3m+xTaVHm1K95TY ioJDcCtmjakpjLXHjeVRCHWZGNfG5gqdVChyM51UJewmnmLjyijbrzVH/xtfaNBzgUdY mt1S9/z9HWicmIpo9uDfYMqQa4caIN0GSZRRgVmj1QEjuP0tRMGxf6P2o0nWTJ9FHdgX k0NHnaonacSlm5BNmt/+fyPSH9Kjw5OPjmBuCcLnM1cs6uGymeaZIGrb045QDyjOBrvo 5rGPiUOr/vMCPWEeSZfXoNyCE58qZ9pP1AT/pyUpcflFupxfIk4NEjfCGrv+mLyKBG3T HqIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=0o8ckZBUZuUaMhooSth+n6+S+US/RZWlBGdRuFJcW8E=; fh=R4kUA00BBvADTQpXIwKrVnuXmzADYCOtvfDr8Z4RZsE=; b=sqt4Tmqe73N2U4wbrOCq/ZH9n7dZ4gepfEJQ1kTprntiD98ERleud5xnZYHo917JaA r1va566LlFCPYHg/sOG+NxRkBqMEPAtl/noJcaEbQR3GcZsr+1gTNO3vf3TcfLR77TPR JHLUfbmsVYbhHA0P1pKmc7b/9erNs/Mpustgb6Dk8UyvAKFf0us52oO8YgIgMB89Vej0 XgNn8kWykqHJ4OVM+di5tTDgjDVwGWwhH2+k141KWLc5Z1sXGBK3MI+oKWVG+nK92ECf 88UtrYPzh36+z0ROCQPKAK3XHkd82Q2F28xUiDHN30q3VeXyAQ1hAI2XoBMI2r++AB9S Kokw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oVHLqHD6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a631a0b000000b005307d9f387esi334419pga.536.2023.07.17.13.59.04; Mon, 17 Jul 2023 13:59:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oVHLqHD6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230397AbjGQUsC (ORCPT + 99 others); Mon, 17 Jul 2023 16:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbjGQUr7 (ORCPT ); Mon, 17 Jul 2023 16:47:59 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F8E31A6 for ; Mon, 17 Jul 2023 13:47:58 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4fdb856482fso3044650e87.1 for ; Mon, 17 Jul 2023 13:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689626876; x=1692218876; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0o8ckZBUZuUaMhooSth+n6+S+US/RZWlBGdRuFJcW8E=; b=oVHLqHD6B9siyR8qNsDpRZJsNGZyeh9TN2wzGKfYdl10D55MvOWqT9Qjw22KFxtFy3 olT26wyF5wwSEe/e1pDasBKFm4rSgfNYZ7P2Jjv2U/ubLhzk+ExSLGr8/zcbCrZH+sBg F/XaFTUJyhCbjYM9A6ZbS+QzV59AmZbXjPkl6URO6mrowW7xdgMeLmtdxQ6iMH2H4Mtu Hhu0+FOLekw9qsk+9erbLaTqi+YhfdvaTgA1q72G4mKqAER0oa1aALlAaUMO32KfdE0H CD7IilKyhVIybp5ei3f2gruo/s0qZu6vmN+PBIS96eqgsyZXPsxYteSYuFRakS9ICW0c VwmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689626876; x=1692218876; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0o8ckZBUZuUaMhooSth+n6+S+US/RZWlBGdRuFJcW8E=; b=DIAxGjwLfoLKY091ppAfLmIlEwwd/d9WGN48vwf+3y4BYFljw56GKt8mNZmSLsXqYs w3aiuf5UiS3veXKDaGWy61Z5EHIOZMuuLCeEn8Wo3J8i9lOl7urMhKR/4LSrcRnU7i3n ejGpuF4lDmF3aLL+N5ZzfziG5ShTtUAc4PBs7iqNUVw57Kd9Ld6b52Jcdp9dy05p4PWa 78+sbgP0VS1LbJEciGnFzURyhtd1ccPkKo+Ao2ststmotlcAwH/99X3RxtiYZXGh4loe jvu4k39AzSP3LVLr+NE3FZco1QORg11EeJS/upEZh4sks2xhG8e3UqQQYl6BrnP6kd8O KEGQ== X-Gm-Message-State: ABy/qLZz4wxy6YbsI9ExyQZsZN8JVjGXCo3XQmhMGbTpG88rTnQ+aB5J wrrDitQwE6UDO3FcShjUw9Fnew== X-Received: by 2002:a05:6512:23a7:b0:4fd:c771:ed76 with SMTP id c39-20020a05651223a700b004fdc771ed76mr1595068lfv.38.1689626876309; Mon, 17 Jul 2023 13:47:56 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.104]) by smtp.gmail.com with ESMTPSA id i19-20020aa7dd13000000b0051de3c6c5e5sm107992edv.94.2023.07.17.13.47.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jul 2023 13:47:55 -0700 (PDT) Message-ID: Date: Mon, 17 Jul 2023 22:47:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 1/2] dt-bindings: reset: Updated binding for Versal-NET reset driver Content-Language: en-US To: Conor Dooley , Piyush Mehta Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, michal.simek@amd.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, git@amd.com References: <20230717112348.1381367-1-piyush.mehta@amd.com> <20230717112348.1381367-2-piyush.mehta@amd.com> <20230717-explode-caucus-82c12e340e39@spud> From: Krzysztof Kozlowski In-Reply-To: <20230717-explode-caucus-82c12e340e39@spud> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/07/2023 20:40, Conor Dooley wrote: > On Mon, Jul 17, 2023 at 04:53:47PM +0530, Piyush Mehta wrote: >> Added documentation and Versal-NET reset indices to describe about >> Versal-Net reset driver bindings. >> >> In Versal-NET all reset indices includes Class, SubClass, Type, Index >> information whereas class refers to clock, reset, power etc., >> Underlying firmware in Versal have such classification and expects >> the ID to be this way. >> [13:0] - Index bits >> [19:14] - Type bits >> [25:20] - SubClass bits >> [31:26] - Class bits. > > Riight.. I'm not sure that describing these as "indices" is really all > that valid, given only 13:0 are actually the index. > I'd be inclined to say that the type/class/subclass stuff should not be > part of the dt-bindings, and instead looked up inside the driver > depending on the index. > > Hopefully Rob or Krzysztof can comment further. This confuses me as well. I don't understand why do you need it in the bindings. Nothing uses these values, so storing them as bindings seems pointless. > > Thanks, > Conor. > >> >> Signed-off-by: Piyush Mehta >> --- >> .../bindings/reset/xlnx,zynqmp-reset.yaml | 4 + >> .../reset/xlnx-versal-net-resets.h | 127 ++++++++++++++++++ >> 2 files changed, 131 insertions(+) >> create mode 100644 include/dt-bindings/reset/xlnx-versal-net-resets.h >> >> diff --git a/Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml b/Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml >> index 0d50f6a54af3..b996fc1d4e53 100644 >> --- a/Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml >> +++ b/Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml >> @@ -27,11 +27,15 @@ description: | >> For list of all valid reset indices for Versal >> >> >> + For list of all valid reset indices for Versal-NET >> + >> + >> properties: >> compatible: >> enum: >> - xlnx,zynqmp-reset >> - xlnx,versal-reset >> + - xlnx,versal-net-reset >> >> "#reset-cells": >> const: 1 >> diff --git a/include/dt-bindings/reset/xlnx-versal-net-resets.h b/include/dt-bindings/reset/xlnx-versal-net-resets.h >> new file mode 100644 >> index 000000000000..b3e7d5e4c33e >> --- /dev/null >> +++ b/include/dt-bindings/reset/xlnx-versal-net-resets.h >> @@ -0,0 +1,127 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> +/* >> + * Copyright (C) 2023 Advanced Micro Devices, Inc. All Rights Reserved. >> + */ >> + >> +#ifndef _DT_BINDINGS_VERSAL_NET_RESETS_H >> +#define _DT_BINDINGS_VERSAL_NET_RESETS_H >> + >> +#define PM_RST_PMC_POR (0xc30c001U) IDs start from 0 and are incremented by 1. Best regards, Krzysztof