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 84A94C77B73 for ; Tue, 30 May 2023 11:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230392AbjE3Lis (ORCPT ); Tue, 30 May 2023 07:38:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230047AbjE3Lir (ORCPT ); Tue, 30 May 2023 07:38:47 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0482ED9 for ; Tue, 30 May 2023 04:38:46 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5149aafef44so3581070a12.0 for ; Tue, 30 May 2023 04:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685446724; x=1688038724; 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=v8+eL8ZKXRkAsAo/AO9eYLK3Pmksk9SK1NVbVJ9FWj8=; b=Ct1Y7coqPOJBBXKuzsZ8/F7NFQELirSayth2PFsyvR+fgUwyRjyzUsHuTh0uU7gqMI Ihjkzjcwp3DGKvKqD5VulvAdrPiNUXCLF2Bzwq5RerjTtaj94ckWcPHBkZiFniCWqMiI DiC1b4w2s/Ycyi6pFWv/rafKTaPrbrpPEh6/aZGLrfkIhC2mSgk4TIONk15ZOS8Z6zt7 4G+l6HjafNIhCV7R3gspFCZC/4Ic65QCICbuwC1R6YDrTq8ZOre8gVLtnSPJBYLv7JAP fjMix1+jE4o2XVJE2kxSsIeQ/G9x2+DHyyf3alEtX019Aqo6izmlmzLoQh3qai/HfWrz I91A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685446724; x=1688038724; 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=v8+eL8ZKXRkAsAo/AO9eYLK3Pmksk9SK1NVbVJ9FWj8=; b=J0p+615xyYEM5c73lUcVUgCwtBMtXLzMcv383cMxAHxirerDZIz+Ky+psanljiTfJF XdqCk0PUrOhFl/X17c8u9mgSwJq/XUF5Em3TWXC4w9CfVgp1pbiEncAd2OVmRL+JctBq LgCT6saL6Q8tL9lz8HzZPxp6FZpEJ7veW04kf3c22RDZRiFOmZj2eEvpPT7gMm0anv5Y D9DE6yQ3zEuinb/BrLNjxDHukuz7WzjXuHwdTYWQn16nzkd7zUesr3nrWUz9tPzlERsQ 60Ma/gE1E4zq9kiuc1YJ96AN2S2lE58ItNQZcgcKznD7saDjV8WL7qAT9m8Q0DUHq3dl IXRg== X-Gm-Message-State: AC+VfDwSTS66pnCkmbIRh4gSAHCwE0pIoW0SZFlgtbDjBf3wloBcUMot /Aeung+eipjGjd0p2SfMRJAcmQ== X-Google-Smtp-Source: ACHHUZ6IkRlG0eu1J5bKPyObMUekncsWIw3Ks56So9hGD0QfRym5sN39gmF8vANktlB0R3KV1NZHgg== X-Received: by 2002:a17:906:6a27:b0:966:17b2:5b0b with SMTP id qw39-20020a1709066a2700b0096617b25b0bmr2060821ejc.49.1685446724451; Tue, 30 May 2023 04:38:44 -0700 (PDT) Received: from [192.168.1.20] ([178.197.199.204]) by smtp.gmail.com with ESMTPSA id b16-20020a170906151000b0096b15e4ffcesm7201757ejd.85.2023.05.30.04.38.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 May 2023 04:38:44 -0700 (PDT) Message-ID: Date: Tue, 30 May 2023 13:38:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: DT checker RS485 unevaluated property, 8250 OMAP UART Content-Language: en-US To: Francesco Dolcini , Vignesh Raghavendra Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Greg Kroah-Hartman , Lukas Wunner References: <0cb182f8-eb53-45d8-3c8b-fb7d16f88d46@ti.com> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 30/05/2023 12:13, Francesco Dolcini wrote: > On Sat, May 27, 2023 at 11:49:17AM +0530, Vignesh Raghavendra wrote: >> On 19/05/23 9:39 pm, Francesco Dolcini wrote: >>> Hello, >>> while writing a new DT file I stumbled across this warning >>> >>> .../arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dev.dtb: serial@2810000: Unevaluated properties are not allowed ('rs485-rts-active-high' was unexpected) >>> From schema: .../Documentation/devicetree/bindings/serial/8250_omap.yaml >>> >>> The property is currently used in the OMAP serial driver >>> >>> drivers/tty/serial/omap-serial.c >>> 1511: if (of_property_read_bool(np, "rs485-rts-active-high")) { >>> >> >> Would be it possible to update driver to imply rs485-rts-active-high" >> this by lack of rs485-rts-active-low property in DT instead? > > What about backward compatibility? This is what is done in all drivers > apart omap-serial if I'm not wrong. Uh, I removed too much in that commit. We need to keep backwards compatibility because driver used default (missing property) as active low. > >>> I would be inclined to send the following patch, do you agree? >>> >>> diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml >>> index eb3488d8f9ee..e634e98aa994 100644 >>> --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml >>> +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml >>> @@ -70,6 +70,7 @@ properties: >>> dsr-gpios: true >>> rng-gpios: true >>> dcd-gpios: true >>> + rs485-rts-active-low: true >> >> I believe you mean rs485-rts-active-high here > whoops, yes of course. Yes, with a Fixes tag. > >> >>> rts-gpio: true >>> power-domains: true >>> clock-frequency: true >>> >>> [1] https://lore.kernel.org/all/ZBItlBhzo+YETcJO@francesco-nb.int.toradex.com/ >>> >> >> Also, I hope you are using 8250_ompa.c and not omap-serial.c for newer >> designs. omap-serial.c is mostly there to support legacy SoCs and not to >> be used with K3 SoCs. > > Thanks for this head-up. This confused myself, while the issue I > reported here is real, it does affect only omap-serial.c. In my case I > am using 8250_omap.c and I can just omit the property from the DTS as > generally expected! OK. Are you going send a fix for original issue? Best regards, Krzysztof