From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: Frank Wunderlich <linux@fw-web.de>,
linux-mediatek@lists.infradead.org,
Chaotian Jing <chaotian.jing@mediatek.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Wenbin Mei <wenbin.mei@mediatek.com>,
Sam Shih <sam.shih@mediatek.com>,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: Aw: Re: [PATCH v1 1/2] dt-bindings: mmc: mtk-sd: update assigned-clocks/clock-parents for mt7986
Date: Tue, 27 Jun 2023 15:37:09 +0200 [thread overview]
Message-ID: <b6ef76a8-95fc-aa76-d811-ed25ccb8ad8e@linaro.org> (raw)
In-Reply-To: <trinity-28cad1dc-f8e0-4f65-874f-a2392c2e878e-1687867773444@3c-app-gmx-bs07>
On 27/06/2023 14:09, Frank Wunderlich wrote:
>> Gesendet: Dienstag, 27. Juni 2023 um 12:44 Uhr
>> Von: "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>
>> Betreff: Re: [PATCH v1 1/2] dt-bindings: mmc: mtk-sd: update assigned-clocks/clock-parents for mt7986
>>
>> On 25/06/2023 21:11, Frank Wunderlich wrote:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> MT7986 has 2 clock-parents so update the binding for it.
>>
>> You didn't test it, I think. If you do, then you will see errors from
>> other trees.
>
> Hi,
>
> i tested it of course...which errors do you see?
The top-level said it can be maximum 1, so raising it in allOf:if:then:
should not be enough
> 11
> this is basicly how i tested it (in case anything has changed):
>
> logfile=dtbs_arm64.log
> exec 3> >(tee $logfile)
> ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make DT_CHECKER_FLAGS=-m dt_binding_check 2>&3
> if [[ $? -ne 0 ]];then echo "arm64 binding check failed!";cat $logfile;exit 1;fi
> ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make defconfig #dtbs_check need kernel-config
> ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j8 DT_CHECKER_FLAGS=-m dtbs_check 2>&3
> if [[ $? -ne 0 ]];then echo "arm64 dtbs_check failed!";cat $logfile;exit 1;fi
A bit over-complicated... why not running dtbs_check against the schema
you changed?
>
> and looked into the resulting logfile for keywords like mmc like mtk-sd
>
> i tried running dtbs_check with passing the yaml-file, but of course all compatibles not matching this file were reported.
>
> ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j6 DT_CHECKER_FLAGS=-m dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>
> but this spits out many errors "failed to match any schema with compatible" because i defined only the changed one...
>
> maybe there is another way to check only one yaml file against all dtbs without these unrelated errors.
>
> pipeline in dt-bindings-patchwork is clean too
> https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230625191151.7808-2-linux@fw-web.de/
Maybe that binding just fails to apply to DTS because of missing or not
correct compatibles.
>
>> Anyway, I don't understand why defining it in the first place. Just drop
>> the assigned-clock* from the binding.
>
> as it was defined (not looked where it was used) i only used the soc-specific branch to update the MaxItems...just to not break anything. After that the message i got before was fixed
>
> arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: mmc@11230000: assigned-clocks: [[4, 35], [4, 34]] is too long
> arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: mmc@11230000: assigned-clock-parents: [[5, 6], [4, 18]] is too long
>
> but if the right way is to drop the MaxItems from generic (or the property itself - where is it taken from then?). The only
> include i see is Documentation/devicetree/bindings/mmc/mmc-controller.yaml and there the assigned-clock* is not defined. And the
The way is to entirely drop assigned-clocks. I don't think there are
much benefits of having them in the bindings. Maybe if specific rates
are required, then yes - device cannot work with other rates and you can
verify it with dtbs_check. But otherwise it is like adding values of
'reg' or 'interrupts'. Plus some board might require third item and then
what?
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-06-27 13:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-25 19:11 [PATCH v1 0/2] Fix emmc hs400 mode on mt7986 Frank Wunderlich
2023-06-25 19:11 ` [PATCH v1 1/2] dt-bindings: mmc: mtk-sd: update assigned-clocks/clock-parents for mt7986 Frank Wunderlich
2023-06-27 10:44 ` Krzysztof Kozlowski
2023-06-27 12:09 ` Aw: " Frank Wunderlich
2023-06-27 13:37 ` Krzysztof Kozlowski [this message]
2023-06-27 14:10 ` Aw: " Frank Wunderlich
2023-06-25 19:11 ` [PATCH v1 2/2] arm64: dts: mt7986: fix emmc hs400 mode without uboot initialization Frank Wunderlich
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=b6ef76a8-95fc-aa76-d811-ed25ccb8ad8e@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chaotian.jing@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frank-w@public-files.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux@fw-web.de \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sam.shih@mediatek.com \
--cc=ulf.hansson@linaro.org \
--cc=wenbin.mei@mediatek.com \
/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;
as well as URLs for NNTP newsgroup(s).