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 6A0C1C00A5A for ; Thu, 19 Jan 2023 05:58:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230022AbjASF6U (ORCPT ); Thu, 19 Jan 2023 00:58:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230041AbjASF6N (ORCPT ); Thu, 19 Jan 2023 00:58:13 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49E9A1BED for ; Wed, 18 Jan 2023 21:58:10 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id d9so1342474pll.9 for ; Wed, 18 Jan 2023 21:58:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=NqoJEjKcl3UOYqd7SPQRjzEP7ckIMaJAKD1OzGpEQKw=; b=hzqrmcOWUVXCz5l2YZEAhL2A7qelvCmWkLTe/GpehR2IISgGvRw4CcXkt11epZaZjM HafMdnpe3P6+JZK+Tzp/817fzzFvgFEEvEdmIw4vSnO5zwAnSqCIsvOK9uAevfnYRn2r vW+RX6F1mHr4dvllfGArzC4Pta6oOf6A0XIRQjAdu+cFbs0b5Uts0JWckJhu+f0xeO1H 3GnES/v2G6SEtPgoMIjxqZxxzYjUIhCICb66I+eoK3Trwe9pD6UOyxC+8d8pxylk0QcZ iE2kXCkKWx1YdhLxwiOY2EWVP5qMLthknpVSe1tRj2Rn/akGdxc6rJs7nOIRJZFEAISj Xv9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NqoJEjKcl3UOYqd7SPQRjzEP7ckIMaJAKD1OzGpEQKw=; b=XTufbSKO7QS42XVZV6JpYnEXgGx4qnvlcnacr4UV0fcEtSRxTO6HDMnRmPgb2zQbIu d+PFPaWj54YfJDMDHy6Y9SFV3tR+m7uhDgSp0bvE+nQ43Q1pvRdwM3Laz4STVsI4UIOI rHhc+7fJriuqbxCLhew4h/3uFmqxxmQ6VWZ/kNPvv9tr4DreJYdMW2eC/SItunLUtFio G8bzc9lKwHFMaItoJI3HsvOgM+lzI9uoFPnd5TiQoubZT5DmlNuNcm+ub42Sac6efaSQ MOquKFsoRuG96/fsNe4n6Yryyw8+60WZITA36Ax0/ZfXSXCLaLzupBad4akz3yeTekyZ EUAg== X-Gm-Message-State: AFqh2koFWfU7oK6hHPZmTNcuggopMojJhnp+mGPnRV/cadPpxARrQhKH W/94mtv3TXMUo/+tcrddLWTKcw== X-Google-Smtp-Source: AMrXdXssNyzCzGULvihUFdc0LouhxBz/1PBL4DSn/DIblNtvXTi0WFwPkCvDNqLvH1BSIbWe7wlrGw== X-Received: by 2002:a17:902:a514:b0:194:476b:1af0 with SMTP id s20-20020a170902a51400b00194476b1af0mr9729302plq.65.1674107889637; Wed, 18 Jan 2023 21:58:09 -0800 (PST) Received: from ?IPV6:2401:4900:1c60:63d3:2d69:9f71:187e:f085? ([2401:4900:1c60:63d3:2d69:9f71:187e:f085]) by smtp.gmail.com with ESMTPSA id k6-20020a170902c40600b0017f8094a52asm7109120plk.29.2023.01.18.21.58.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Jan 2023 21:58:08 -0800 (PST) Message-ID: Date: Thu, 19 Jan 2023 11:28:04 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] dt-bindings: qcom: geni-se: Fix '#address-cells' & '#size-cells' related dt-binding error To: Bjorn Andersson Cc: Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, agross@kernel.org, konrad.dybcio@linaro.org, linux-kernel@vger.kernel.org, bhupesh.linux@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org References: <20230113201038.267449-1-bhupesh.sharma@linaro.org> <20230119032332.w5in5zmoyavi2s45@builder.lan> Content-Language: en-US From: Bhupesh Sharma In-Reply-To: <20230119032332.w5in5zmoyavi2s45@builder.lan> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Bjorn, On 1/19/23 8:53 AM, Bjorn Andersson wrote: > On Mon, Jan 16, 2023 at 09:13:12PM +0530, Bhupesh Sharma wrote: >> On Mon, 16 Jan 2023 at 13:23, Krzysztof Kozlowski >> wrote: >>> >>> On 15/01/2023 22:33, Bhupesh Sharma wrote: >>>> On Sun, 15 Jan 2023 at 20:57, Krzysztof Kozlowski >>>> wrote: >>>>> >>>>> On 13/01/2023 21:10, Bhupesh Sharma wrote: >>>>>> Fix the following '#address-cells' & '#size-cells' related >>>>>> dt-binding error: >>>>>> >>>>>> $ make dtbs_check >>>>>> >>>>>> From schema: Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml >>>>>> arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dtb: geniqup@4ac0000: >>>>>> #address-cells:0:0: 2 was expected >>>>>> From schema: Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml >>>>> >>>>> Don't we want rather to unify the soc address range? >>>> >>>> Well, the assumption in the original dt-bindings was that every reg >>>> variable is 4 * u32 wide (as most new qcom SoCs set #address- and >>>> #size-cells to <2>). However, that is not the case for all of the >>>> SoCs. >>> >>> Hm, which device of that SoC cannot be used with address/size cells 2? >> >> As noted in the git log already the geniqup on sm6115 / sm4250 cannot >> be used with address/size cells 2 (See: >> https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sm6115.dtsi#L795) >> > > I'm not able to find the reasoning you're referring to. We do have cells > of 2 for these nodes on all other platforms. If there is a specific > problem, that can be documented and you can probably use ranges to > reduce keep the cells of 1 in the geni wrappers. > > > The reason why we have cells = 2 on most platforms is because the SMMU > reports that it's capable of more address bits than the buses will > handle. So without cells = 2, we can't describe dma-ranges appropriately > and you get page faults due to truncated addresses on the bus when the > iommu iova has been picking addresses for you. Consolidating the replies to your, Krzysztof's and Rob's observations / suggestions here.. Yes, the original background to the problem was that I observed that for the sm6115 based Qualcomm board with me, if I was using 36-bit DMA configuration with a few IP blocks (like SDHC), I was seeing some issues. But, Konrad observed in [1] that it works fine for me on the sm6115 based Lenovo tab, so I agree to his suggestions and may be he can help send the '2-cell-ification' patch he has working, in which case I think we can drop this patch. @Konrad, please feel free to share the patch you were mentioning and I can help test it as well. [1]. https://lore.kernel.org/linux-arm-msm/09fe3e93-328b-13a3-540b-4ca47224b176@linaro.org/ Thanks, Bhupesh