Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3113970pxy; Mon, 3 May 2021 15:43:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0iu8pl0MjY9mPWmWXOdJQDfxg5tzmUpehWcWjpjCVlOjoKOZJ1nHrElmEyn2rjALIx42T X-Received: by 2002:a17:902:8bcb:b029:ec:a192:21cf with SMTP id r11-20020a1709028bcbb02900eca19221cfmr23047863plo.71.1620081802197; Mon, 03 May 2021 15:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620081802; cv=none; d=google.com; s=arc-20160816; b=qp2fW6AP/taPcEqselq/qOepcpQmLyjMj71f2eaBmD2WbnhnUV0SZaKXOsQkXNPr4z ayPsGIv4kr7TedbgyMlITWMrtzNsOEbNb4SARdZn0XX9denOHTAPufnZ0mDgSyAYANJp 9o+U+WKtJZy4Rbhw/gxlJ/kaiL8q/devw1/RkzGQ1K0heeO/VxsuNaxQOjV0UtB2nVb1 OGws+MvBkn2V2ltWCClCUjmxhUmmo7S3j53amiqi2XiyB0Vx/Mtg79p8QPYh7W7hTbMk qGQywmezZHhg765c770dVmqY9LBHDLoU3vrQ22V5kFE0xux/N43txQpbgjteR0M62hJz /xIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+FNJulhcXHR06uzoM7aGL9FTgE5UXKoFDdUbDg5KidU=; b=yKiTu/N3yRHM1rvO1msa+3VWTUW6tfYCRBPf+LP5i8w+5G3N5LoGksmP7QX+XVi/BC k26HRKz+sHki0SCJ44+wxH58rdqgo3GANyySPcEI63leTyrMeuoTjyCY4OLrNX1hJida Ce8M9Vp7WLxoRAAa22B1CD/Bi1dgyUSTEEHm3IDCmx6VX5RoqcvWby2wB6kFvbkvF8hG 0uCirw/ceW3OxVDfwKbdmdk16bwyjRdC5IeTRAsvCYnR7CE+pRcNLyCpz6GUsuh7K4zX QaIs3jMr9d+vuSNvnY9Nu6+Cd3XZpEz515+Rigng/Ys0Eayciqrs55dA3AhDS+G6cqXG MMJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fMOxt4XT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si1164620plp.428.2021.05.03.15.43.09; Mon, 03 May 2021 15:43:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fMOxt4XT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229680AbhECWl4 (ORCPT + 99 others); Mon, 3 May 2021 18:41:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:40602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbhECWlz (ORCPT ); Mon, 3 May 2021 18:41:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 61CC461177; Mon, 3 May 2021 22:41:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620081661; bh=LdKcAT7K/DkFCaR8C88qu25r0RUNHy4L1uLPd9vMTLI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fMOxt4XTJq8QaONd21MjjLpWV5DQlfdSxxAV2eXl8FbyHRkeJvO56XumU3XpRXF52 HCr7aVusik/ed/f22iZeKCNMOge1hSJ1T575aWlK43zXUfWcXxieF6EMwaANifIFF3 MOy8nRIh7V0YNi14Q6o2QnJUMnt1qCU2l9fIn0mL6oxaxjJ0V82WvAgqlsCVnBsW4t Vtph0NE+/Hh/ZgQn+qMteKZA8RpusiMn8Ad8w4s/qMvZkjfbO5m4pUCP9CdniQNJHG 9DkBQCdF9DwlrcLoI/1K3nJKh6vF+PrPB8h77x8YBQhwPRYTHm0vaGhc7jTslAyzWo BxzDfLtMt4A5w== Received: by mail-ed1-f53.google.com with SMTP id g14so8226030edy.6; Mon, 03 May 2021 15:41:01 -0700 (PDT) X-Gm-Message-State: AOAM532dxrh92hkkNBPj1NdRQ3Ryk08EEHatzWOSYbZ1CARXlkKzTWuf ATeVNU/wNdnO4RtpjfoHjyFtsdIX3/sds5wuKg== X-Received: by 2002:a05:6402:234b:: with SMTP id r11mr22579121eda.137.1620081659993; Mon, 03 May 2021 15:40:59 -0700 (PDT) MIME-Version: 1.0 References: <20210430072138.6537-1-jbx6244@gmail.com> In-Reply-To: <20210430072138.6537-1-jbx6244@gmail.com> From: Rob Herring Date: Mon, 3 May 2021 17:40:48 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v1] dt-bindings: mmc: snps,dwcmshc-sdhci: fix rockchip,txclk-tapnum To: Johan Jonker Cc: heiko@sntech.de, shawn.lin@rock-chips.com, ulf.hansson@linaro.org, Jisheng.Zhang@synaptics.com, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 30, 2021 at 2:21 AM Johan Jonker wrote: > > A test with the command below gives this error: > mmc@fe310000: rockchip,txclk-tapnum: missing size tag in [[8]] > > With this added to a dts file: > rockchip,txclk-tapnum = <0x8>; > > A look at the driver shows that: > DLL_TXCLK_TAPNUM_DEFAULT 0x8 > > Adding the default value to the dts files is not needed. > Every clock is divided into 32 taps equally and > the max value is 31. > > Fix rockchip,txclk-tapnum property in snps,dwcmshc-sdhci.yaml by > adding a minimum, maximum and default. > > In the driver the function of_property_read_u8() is used, > but with dtbs_check the notifications only disappear in YAML > by changing uint8 to uint32. Did you check what value the driver sees when you put 8 in the dts. I expect it will be 0 because you are reading the 1st byte in big endian. > The driver has no limit check for rockchip,txclk-tapnum. > > make ARCH=arm64 dtbs_check > > Signed-off-by: Johan Jonker > --- > Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml > index e6c9a2f77..f43d8d829 100644 > --- a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml > +++ b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml > @@ -48,7 +48,10 @@ properties: > > rockchip,txclk-tapnum: > description: Specify the number of delay for tx sampling. > - $ref: /schemas/types.yaml#/definitions/uint8 > + $ref: /schemas/types.yaml#/definitions/uint32 > + minimum: 0 > + maximum: 31 > + default: 8 > > > required: > -- > 2.11.0 >