mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Andersson <andersson@kernel.org>
To: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	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
Subject: Re: [PATCH] dt-bindings: qcom: geni-se: Fix '#address-cells' & '#size-cells' related dt-binding error
Date: Wed, 18 Jan 2023 21:23:32 -0600	[thread overview]
Message-ID: <20230119032332.w5in5zmoyavi2s45@builder.lan> (raw)
In-Reply-To: <CAH=2Nty2gUL3DufowzHavhUNdeht2dcX4EU7ooM+xzax2vP7uQ@mail.gmail.com>

On Mon, Jan 16, 2023 at 09:13:12PM +0530, Bhupesh Sharma wrote:
> On Mon, 16 Jan 2023 at 13:23, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
> >
> > On 15/01/2023 22:33, Bhupesh Sharma wrote:
> > > On Sun, 15 Jan 2023 at 20:57, Krzysztof Kozlowski
> > > <krzysztof.kozlowski@linaro.org> 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.

Regards,
Bjorn

> > > So, ideally we shouldn't set the  "#address-cells" and  "#size-cells":
> > > as const: 2 in the bindings.
> > >
> > > See as an example:
> > > https://www.kernel.org/doc/Documentation/devicetree/bindings/usb/usb-device.yaml
> >
> >
> > How USB device - so entirely different device, not MMIO! - is related here?
> >
> > Best regards,
> > Krzysztof
> >

  parent reply	other threads:[~2023-01-20  4:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 20:10 Bhupesh Sharma
2023-01-15 15:27 ` Krzysztof Kozlowski
2023-01-15 21:33   ` Bhupesh Sharma
2023-01-16  7:53     ` Krzysztof Kozlowski
2023-01-16 15:43       ` Bhupesh Sharma
2023-01-16 15:54         ` Konrad Dybcio
2023-01-16 16:02           ` Bhupesh Sharma
2023-01-16 16:05             ` Konrad Dybcio
2023-01-16 16:18               ` bhupesh.sharma
2023-01-16 16:29                 ` Konrad Dybcio
2023-01-16 19:10         ` Krzysztof Kozlowski
2023-01-17 19:47           ` Rob Herring
2023-01-19  3:23         ` Bjorn Andersson [this message]
2023-01-19  5:58           ` Bhupesh Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230119032332.w5in5zmoyavi2s45@builder.lan \
    --to=andersson@kernel.org \
    --cc=agross@kernel.org \
    --cc=bhupesh.linux@gmail.com \
    --cc=bhupesh.sharma@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®