Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp40725lqs; Thu, 13 Jun 2024 03:14:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVe7okjNEk3SOESwfm02cmVjkFfIIN5TZd9uR/LKvZCJr4BjMxgfTy84s9KMTIqYkM400VciNyfiHB1V2Vt75xNuLkiRBBkr80vRQ/xog== X-Google-Smtp-Source: AGHT+IEnZhJzKGIPv6RaHv1B8bkT1q79V8yv76tgsmpM5xIAs3lLO7miVRLh7/Gb6tLDX2Pe2pnN X-Received: by 2002:a05:6359:4593:b0:19f:4c4e:d3d6 with SMTP id e5c5f4694b2df-19f69d84ad4mr477000955d.29.1718273694158; Thu, 13 Jun 2024 03:14:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718273694; cv=pass; d=google.com; s=arc-20160816; b=lK1HxjiyYdDSdY1lAdQAIlOsqisj8g2jWbl4zhB9lyit1eXfFzg6jhBb4KOYdHkuKR +oAW1bvt9otIQRZD544iftOoWRrW3H1qOO/nApf3jQ5eJZfOZ3aIG2UkyZ8tB8F3xhpp IKxL4ziEGaBJxfVQ22si3LJQMjek1ylflpqSj4PTb/xcHUPF+ue3814dLG5vIRO9Gof0 DninurpM2ht0u8ziJojYVz8yJLOiwrPOm9TnuYwg3nitq2cVTAhEj86DsA0YtKGqTRDm ZEUtii3D6ovTS8pys6IiwDhb/87e1adCoa4bmcBgo8UXlilXltQtVFRqtWuaWNOQRPG0 xkPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=rXDnmJ5ZQOUO+9FQYV87xXfZpc46R3cPAarAmqFfOiA=; fh=11k+TeXON0L9WdSArLMrxB9kP/mIRfHRhYFOk77vZl0=; b=TcOiqrpPh2buIWEMztwTTrm9+1+WcVfeY6zkQDqQlWSdbFYv7X1abzyxtqWRkHG+Kz 6O+0P7e63gIrUb+D2FHsZoQZ3CIBpmo4CpTOQ9COD9icblzo+623GmM0d1XQ5M6u8Bv5 nFNSZOCwcEzHx0tIYSI4JLvPJ1Akn8LvgEMzOvNAc5j4hDDZ4FHAcHnXbp612WouR6G/ cVu2VgPq35o90/9KMy4sWo8CdKXowCgYcZ1XINuS/bX4Buv1PzYCeGiMywmf9fiIAYRj HirhGboQQHCcHud6lLeerskLsamy+Cxm0GceggSfo8622mwhpXREpJkyi2k0w9MxVyLx 5JmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@yandex.com header.s=mail header.b=Lz7ebCIu; arc=pass (i=1 spf=pass spfdomain=yandex.com dkim=pass dkdomain=yandex.com dmarc=pass fromdomain=yandex.com); spf=pass (google.com: domain of linux-kernel+bounces-212980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee61fa85asi1050260a12.781.2024.06.13.03.14.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 03:14:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@yandex.com header.s=mail header.b=Lz7ebCIu; arc=pass (i=1 spf=pass spfdomain=yandex.com dkim=pass dkdomain=yandex.com dmarc=pass fromdomain=yandex.com); spf=pass (google.com: domain of linux-kernel+bounces-212980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C1FA2B240C6 for ; Thu, 13 Jun 2024 09:50:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EDB313F451; Thu, 13 Jun 2024 09:50:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=yandex.com header.i=@yandex.com header.b="Lz7ebCIu" Received: from forward501b.mail.yandex.net (forward501b.mail.yandex.net [178.154.239.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73B0713E024; Thu, 13 Jun 2024 09:50:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718272223; cv=none; b=Kt5bMobxVPTcwNvU8/HEI0LuMrzEKtq6/oGjp67bCDs5yYwYH08cvqUtbwcgxpiN9ddwJ3V3yOURQwAjKfh/wLii5MPfAibJINNai2RnodeMqOyBPNfJyvf6/pzdtPhCO3d2yGa8bjU/4rg/SwEJiUs2TholFDyRzCTg+9nedlk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718272223; c=relaxed/simple; bh=CiS/vwgvhI96k1n3BHULEcR1iEwkD4iIpW9CfsgBXrc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tL0kU7foUjd1EkYK0Hdj7AuqeExguI2nElb5jpRmk4G5uLH8cJji3cz0R6lbRfdCL+QZHpFf4MjsHIbqIbZ0tmbahzLXqqfdMHh8Qgxls8LtVxGxf1iSaHwfrpPkDiB4EcG2G0TnMZV1a5w4CgVGtwufRdM1L3Mjn2hyR0dvODw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.com; spf=pass smtp.mailfrom=yandex.com; dkim=pass (1024-bit key) header.d=yandex.com header.i=@yandex.com header.b=Lz7ebCIu; arc=none smtp.client-ip=178.154.239.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yandex.com Received: from mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:298c:0:640:7729:0]) by forward501b.mail.yandex.net (Yandex) with ESMTPS id 326E861317; Thu, 13 Jun 2024 12:44:35 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id Vicprp1Oca60-NKeaeh3H; Thu, 13 Jun 2024 12:44:33 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1718271874; bh=rXDnmJ5ZQOUO+9FQYV87xXfZpc46R3cPAarAmqFfOiA=; h=From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID; b=Lz7ebCIu5oUOLBGf+eWcXQ5AFXnNvRxLl6ZQnVz9AUfKAP28kEEi1tE1S0i5AaWFc m5ri4Y5j79nsndV76J15Y4Gs6PE76abROtAXGJ222vO+PVUzo3htJ30mH7XXqPVxRe Z9JQvUcYgzr5EQ1sfY95eHQX5PhyroLRur5AFFQo= Authentication-Results: mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.com Message-ID: Date: Thu, 13 Jun 2024 11:44:30 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] dt-bindings: phy: rockchip-emmc-phy: Convert to dtschema To: Shresth Prasad , vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, sebastian.reichel@collabora.com, s.hauer@pengutronix.de, cristian.ciocaltea@collabora.com, andy.yan@rock-chips.com Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com References: <20240613085812.4020-2-shresthprasad7@gmail.com> Content-Language: en-US From: Johan Jonker In-Reply-To: <20240613085812.4020-2-shresthprasad7@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/13/24 10:58, Shresth Prasad wrote: > Convert txt bindings of Rockchip EMMC PHY to dtschema to allow > for validation. > > Signed-off-by: Shresth Prasad > --- Add ack request from phy maintainer here. > Changes in v3: > - fix `reg` in example being too long > > Tested against `rockchip/rk3399-firefly.dtb`, `rockchip/rk3399-orangepi.dtb` > and `rockchip/rk3399-pinebook-pro.dtb`. > > .../bindings/phy/rockchip,emmc-phy.yaml | 79 +++++++++++++++++++ > .../bindings/phy/rockchip-emmc-phy.txt | 43 ---------- > .../devicetree/bindings/soc/rockchip/grf.yaml | 2 +- > 3 files changed, 80 insertions(+), 44 deletions(-) > create mode 100644 Documentation/devicetree/bindings/phy/rockchip,emmc-phy.yaml > delete mode 100644 Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt > > diff --git a/Documentation/devicetree/bindings/phy/rockchip,emmc-phy.yaml b/Documentation/devicetree/bindings/phy/rockchip,emmc-phy.yaml > new file mode 100644 > index 000000000000..85d74b343991 > --- /dev/null > +++ b/Documentation/devicetree/bindings/phy/rockchip,emmc-phy.yaml > @@ -0,0 +1,79 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) You are converting an existing document, so GPL 2 only. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/phy/rockchip,emmc-phy.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Rockchip EMMC PHY > + > +maintainers: > + - Shresth Prasad Prefer to add someone that can immediately respond if Rob H. wants to delete something. Use the Rockchip DT maintainer here: - Heiko Stuebner > + > +properties: > + "#phy-cells": > + const: 0 Move this to the bottom of this list. > + > + compatible: > + const: rockchip,rk3399-emmc-phy > + > + reg: > + description: > + PHY register address offset and length in "general register files" remove > + maxItems: 1 > + > + clock-names: > + description: | > + Although this is not a required property (because most boards can get > + basic functionality without having access to it), it is strongly > + suggested. remove No need for descriptions if there's just 1 clock. > + const: emmcclk > + > + clocks: > + description: > + Should have a phandle to the card clock exported by the SDHCI driver. remove > + maxItems: 1 > + > + drive-impedance-ohm: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + Specifies the drive impedance in Ohm. > + enum: [33, 40, 50, 66, 100] > + default: 50 > + > + rockchip,enable-strobe-pulldown: > + type: boolean > + description: | > + Enable internal pull-down for the strobe > + line. If not set, pull-down is not used. > + > + rockchip,output-tapdelay-select: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + Specifies the phyctrl_otapdlysec register. > + default: 0x4 > + maximum: 0xf > + > +required: > + - "#phy-cells" Move at the bottom of this list. > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + grf: syscon@ff770000 { > + compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd"; > + reg = <0xff770000 0x10000>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + emmcphy: phy@f780 { > + #phy-cells = <0>; Move at the bottom of this list. Order of Properties in Device Node: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/dts-coding-style.rst#n112 > + compatible = "rockchip,rk3399-emmc-phy"; > + reg = <0xf780 0x20>; > + clocks = <&sdhci>; > + clock-names = "emmcclk"; > + drive-impedance-ohm = <50>; > + }; > + }; > diff --git a/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt b/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt > deleted file mode 100644 > index 57d28c0d5696..000000000000 > --- a/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt > +++ /dev/null > @@ -1,43 +0,0 @@ > -Rockchip EMMC PHY > ------------------------ > - > -Required properties: > - - compatible: rockchip,rk3399-emmc-phy > - - #phy-cells: must be 0 > - - reg: PHY register address offset and length in "general > - register files" > - > -Optional properties: > - - clock-names: Should contain "emmcclk". Although this is listed as optional > - (because most boards can get basic functionality without having > - access to it), it is strongly suggested. > - See ../clock/clock-bindings.txt for details. > - - clocks: Should have a phandle to the card clock exported by the SDHCI driver. > - - drive-impedance-ohm: Specifies the drive impedance in Ohm. > - Possible values are 33, 40, 50, 66 and 100. > - If not set, the default value of 50 will be applied. > - - rockchip,enable-strobe-pulldown: Enable internal pull-down for the strobe > - line. If not set, pull-down is not used. > - - rockchip,output-tapdelay-select: Specifies the phyctrl_otapdlysec register. > - If not set, the register defaults to 0x4. > - Maximum value 0xf. > - > -Example: > - > - > -grf: syscon@ff770000 { > - compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd"; > - #address-cells = <1>; > - #size-cells = <1>; > - > -... > - > - emmcphy: phy@f780 { > - compatible = "rockchip,rk3399-emmc-phy"; > - reg = <0xf780 0x20>; > - clocks = <&sdhci>; > - clock-names = "emmcclk"; > - drive-impedance-ohm = <50>; > - #phy-cells = <0>; > - }; > -}; > diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml > index 79798c747476..1f88416657cc 100644 > --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml > +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml grf.yaml can be busy at times. Let Heiko take care of the merge order. Ask for an ack from the phy maintainers in your commit message below a "---" > @@ -178,7 +178,7 @@ allOf: > patternProperties: > "phy@[0-9a-f]+$": > description: > - Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt > + Documentation/devicetree/bindings/phy/rockchip,emmc-phy.yaml Integrate rockchip,emmc-phy.yaml with grf.yaml with $ref. Remove above, use/test below: $ref: /schemas/phy/rockchip,emmc-phy.yaml# unevaluatedProperties: false > > - if: > properties: