From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51A0FC433EF for ; Thu, 2 Jun 2022 11:42:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233544AbiFBLm2 (ORCPT ); Thu, 2 Jun 2022 07:42:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232316AbiFBLm0 (ORCPT ); Thu, 2 Jun 2022 07:42:26 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05EC85FF09 for ; Thu, 2 Jun 2022 04:42:25 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id o10so5905004edi.1 for ; Thu, 02 Jun 2022 04:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=ZpLQeQeQdZ8PTsl6QzkAMoq8cM5CGyVXLb6GbT76BN8=; b=Lmlc5otPHPBiZqkehmSeYYqoo3/95heIBc/+gbh6YpzM/0f5eOv/657FiggDeOdJjA 4J43hf8bVwXMpb0QsHXqeDF3g/VVBtJyp67DlPLL3/uZZSBWsiWC+2WWkPTBZ/80Yx+f TjbXUu4yFkpE02sn2O+JMok11f/baTwo6w/ywXd2N0cUMSWAbMCp/bU6Xn3Y5OxeqX91 dcJQTdK/9cYOgRM5aj2bC0QicxU6EXnhN3cGZozrGWhUiB136eXah1Mfwjtw8tirTvC3 yBAoOIhXkBDAYWdKobyKN9QnwhMgGzkgNhJIkZEPW+9dQtudnM4udrjBFbg0hy409Bki Zuew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=ZpLQeQeQdZ8PTsl6QzkAMoq8cM5CGyVXLb6GbT76BN8=; b=71qN0Q2M9jfMuj0Pm1p0ONsuMuL3MBkeFDFzKZWsF35zjmqnv9Ljn2Huxw2xEENPGt /Sylcd9ZaJHi9Q8rQkFGGAa5Pyvc0jlSpDQHj55qHb5Cj3lnOmvMgzG2zqyCahv1vlUi NYr3MoW8BYngAhSPfDOU1QdDPoqFeo3ZB0wyiRtBt6MiD3xE9HiJgrX+wAwASAccOf3l cFkdCE5GEFcGksSSlbRhHgor+irxtos59gm6Is4YQMy8+UtUiHPcd8icxpQ7nl1vsLiY URzVV4tY5Kw+lk2WqXXiZlz/D2J6KR/M96RRz+8oAebBSMaepNLVxAoAPj2NubcQWWWb 5gXQ== X-Gm-Message-State: AOAM530eS2XlwzpG9Vg0cuwLfRF//3qO/pYd/ROsEgP69j9Ytl9NaxpW R37PkwejIZ75GTJQYDyi+epsQA== X-Google-Smtp-Source: ABdhPJwMBE3w8FcUsIappA+XgJgb3UE5rqzszgUOgdP3LXRDNy7ES7plawOr1PMvjECiQYsVoZm8Zg== X-Received: by 2002:aa7:cb8d:0:b0:42b:e414:8019 with SMTP id r13-20020aa7cb8d000000b0042be4148019mr5000940edt.151.1654170143563; Thu, 02 Jun 2022 04:42:23 -0700 (PDT) Received: from [192.168.0.181] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b0042dd022787esm2325479edb.6.2022.06.02.04.42.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jun 2022 04:42:23 -0700 (PDT) Message-ID: Date: Thu, 2 Jun 2022 13:42:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 1/6] dt-bindings: phy: samsung,ufs-phy: make pmu-syscon as phandle-array Content-Language: en-US To: Chanho Park , 'Kishon Vijay Abraham I' , 'Vinod Koul' , 'Alim Akhtar' , 'Rob Herring' , 'Krzysztof Kozlowski' Cc: devicetree@vger.kernel.org, linux-phy@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20220602053250.62593-1-chanho61.park@samsung.com> <20220602053250.62593-2-chanho61.park@samsung.com> <44fceb66-fd33-4b2d-fe8e-9a1a5837a51a@linaro.org> <035e01d87668$fb2bfcf0$f183f6d0$@samsung.com> From: Krzysztof Kozlowski In-Reply-To: <035e01d87668$fb2bfcf0$f183f6d0$@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 02/06/2022 12:10, Chanho Park wrote: >>>> samsung,pmu-syscon: >>>> - $ref: '/schemas/types.yaml#/definitions/phandle' >>>> - description: phandle for PMU system controller interface, used to >>>> - control pmu registers bits for ufs m-phy >>>> + $ref: '/schemas/types.yaml#/definitions/phandle-array' >>>> + items: >>>> + minItems: 1 >>>> + items: >>>> + - description: phandle for PMU system controller interface, used >> to >>>> + control pmu registers bits for ufs m-phy >>>> + - description: offset of the pmu control register >>> >>> This does not work... Please test your bindings with different cases. >> >> Just to be clear - when I mentioned that minItems should be on second >> items level, I meant it should affect the second items list, not the first. >> Now you can have 1, 2 or 10 phandles. > > I put the minItems to the second level as you mentioned but I got below error from dt_binding_check. > > --- a/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml > +++ b/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml > @@ -42,8 +42,8 @@ properties: > samsung,pmu-syscon: > $ref: '/schemas/types.yaml#/definitions/phandle-array' > items: > - minItems: 1 > items: > + - minItems: 1 Ah, you are right. This above is not good, but your original code was almost good. I think it should be: 43 $ref: '/schemas/types.yaml#/definitions/phandle-array' 44 maxItems: 1 45 items: 46 minItems: 1 47 items: 48 - description: phandle for PMU sysused to 50 - description: offset of the pmu control register Apologies for the confusion. > - description: phandle for PMU system controller interface, used to > control pmu registers bits for ufs m-phy > - description: offset of the pmu control register > > $ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml > ufs-phy@15571800: samsung,pmu-syscon:0: [4294967295, 1828] is too short Best regards, Krzysztof