Message ID | 20230625191151.7808-2-linux@fw-web.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7067726vqr; Sun, 25 Jun 2023 12:38:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6NlLXfJG1J6vzH4C60K7fiRsNjikNZjkXmc1JaXiwqmXnpTUbO4Jg5PJ0+pEFLs0Sb27uh X-Received: by 2002:a17:907:94c9:b0:989:3e0d:89fb with SMTP id dn9-20020a17090794c900b009893e0d89fbmr14087531ejc.45.1687721934864; Sun, 25 Jun 2023 12:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687721934; cv=none; d=google.com; s=arc-20160816; b=lBTP7bXxZe5S76kHhxHsuAMFmkclxkNRXIRIh5FMLT9tIZdGW0a8YYHB3w5ngwOZz2 v9IeJhNhI0niiE3VKfDHyerU+0+gLpK/xEzpwKqWZqPQw/n0HVaGXktEFVvnwNR6fIGS WcxETpijj8BdZWw2ro7SxPyLPS4uQFV+QhCjlU859ueznmdR09Xp20V1NPAxPomQjrO8 pbWMdpfEtxi5lGHlzxXKWv4weraX+DjnYgs979vv+XbpV7UDqYECQSDAISFSQFKyqb2V sEWpVzvQe/L6QU8NeV1sVhX5fRA30S3sdseKoO0Ua/jlKtPbZ4FHecxPiQ0Hk2jiwxds v+LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hOhkIMP+kNOLQ9YAs2dWlhnv2oixfRQubnTydB4EaJc=; fh=p58pEyGs9ZVmc0iWCS1JcSbg7GM1EacYwgZCiW6CZHo=; b=SwyNkwFqPzZJeRTzqAey/ukJvjkGW/Wt3RLdy+uYMMGQiSZkkxkvqNDkQs90aJ4Z2g HkYttiERBnpH8TK1Di9i2McpLtrvZya3/eqI1ud/ZahKjyZs9af6uUkcGse1TWCOAQSF H4QSpX4F8A6GRy8ESTCbwy0qq+B62wFF4+4l7NnjqILHPTvD1VzBi3z0e/7aVHGDXLxx 1pI3ZqkIYpbD5DSWkvVaI9K4OVjEhVVTf9X9v9F3iujT8ajix8W8WAAxMT2BPKeEBK0R koutBVSSe79BPpYnSdDu/wc11xjYokHjqW2xmPAxBmrYk6MYm2jn67Tg2KyCSTwtVkd8 ELRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Z3J2zGRj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kd16-20020a17090798d000b0098da8d0ce58si2050912ejc.868.2023.06.25.12.38.30; Sun, 25 Jun 2023 12:38:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Z3J2zGRj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229998AbjFYTML (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Sun, 25 Jun 2023 15:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbjFYTMD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 25 Jun 2023 15:12:03 -0400 Received: from mxout4.routing.net (mxout4.routing.net [134.0.28.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5785DB9; Sun, 25 Jun 2023 12:12:02 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id 7227B100877; Sun, 25 Jun 2023 19:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1687720318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hOhkIMP+kNOLQ9YAs2dWlhnv2oixfRQubnTydB4EaJc=; b=Z3J2zGRjRQFq636jMHZKVXR0v7VK1OT6o//nDMxRKiErjeESe5un7dVgJNFsr2D4R280oJ ux7H1TtvlRrnHvN1bBHEv/RJk7nVAuu07iOZd+c+Dz7FgAMyqZjttI1TJkEwR3EDvm4QlU f3YG1zgMPUz3IQb8AqehVB7EFDDNNZk= Received: from frank-G5.. (fttx-pool-217.61.151.158.bambit.de [217.61.151.158]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id B5DB0360931; Sun, 25 Jun 2023 19:11:57 +0000 (UTC) From: Frank Wunderlich <linux@fw-web.de> To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich <frank-w@public-files.de>, 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: [PATCH v1 1/2] dt-bindings: mmc: mtk-sd: update assigned-clocks/clock-parents for mt7986 Date: Sun, 25 Jun 2023 21:11:50 +0200 Message-Id: <20230625191151.7808-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230625191151.7808-1-linux@fw-web.de> References: <20230625191151.7808-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: 111d6e13-9401-4ca9-bbed-5c71f5bd419c X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769704715973312569?= X-GMAIL-MSGID: =?utf-8?q?1769704715973312569?= |
Series |
Fix emmc hs400 mode on mt7986
|
|
Commit Message
Frank Wunderlich
June 25, 2023, 7:11 p.m. UTC
From: Frank Wunderlich <frank-w@public-files.de> MT7986 has 2 clock-parents so update the binding for it. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> --- Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Comments
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. Anyway, I don't understand why defining it in the first place. Just drop the assigned-clock* from the binding. Best regards, Krzysztof
> 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? 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 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/ > 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 unevaluatedProperties: false tells me that removing the generic one will result in unevaluated propety error. regards Frank > Best regards, > Krzysztof > >
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
Hi > Gesendet: Dienstag, 27. Juni 2023 um 15:37 Uhr > Von: "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org> > 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 but the previous error with too long list wasn't there after the change...so it seems to work...if it right, i don't know, but other properties are overriddedn the same way. > > 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? it is a script i only start ;) and having a logfile (with all messages - stdin+stdout) makes it easier to find something. i had always the problem, that second run does not show the errors again without changing the yaml or dts. as you see below i tried the run against the yaml too, but there are many many unrelated compatibles which seem to be not documented or still in txt bindings. > > 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. the messages are unrelated to current yaml file i passed with the DT_SCHEMA_FILES parameter, e.g. the last messages: From schema: Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb:0:0: /soc/syscon@15020000: failed to match any schema with compatible: ['mediatek,mt8183-imgsys', 'syscon'] arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb:0:0: /soc/syscon@16000000: failed to match any schema with compatible: ['mediatek,mt8183-vdecsys', 'syscon'] arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb:0:0: /soc/syscon@17000000: failed to match any schema with compatible: ['mediatek,mt8183-vencsys', 'syscon'] arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb:0:0: /soc/syscon@19000000: failed to match any schema with compatible: ['mediatek,mt8183-ipu_conn', 'syscon'] arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb:0:0: /soc/syscon@19010000: failed to match any schema with compatible: ['mediatek,mt8183-ipu_adl', 'syscon'] arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb:0:0: /soc/syscon@19180000: failed to match any schema with compatible: ['mediatek,mt8183-ipu_core0', 'syscon'] arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb:0:0: /soc/syscon@19280000: failed to match any schema with compatible: ['mediatek,mt8183-ipu_core1', 'syscon'] arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb:0:0: /soc/syscon@1a000000: failed to match any schema with compatible: ['mediatek,mt8183-camsys', 'syscon'] arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb:0:0: /mt8183-sound: failed to match any schema with compatible: ['mediatek,mt8183_mt6358_ts3a227_max98357'] arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb: bt-sco: '#sound-dai-cells' is a required property > >> 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? mhm, disabled all assigned-clock* properties and do not get any messages about this (don't know why because of "unevaluatedProperties: false", but looks like it works) there are only some syscon-nodes in mt8173-*.dtb where these properties used are reported btw. need binding also be backported to stable? so do i need to add the tag there? regards Frank
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml index 46eefdd19a2c..485516dcc759 100644 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml @@ -247,6 +247,10 @@ allOf: - mediatek,mt7986-mmc then: properties: + assigned-clocks: + maxItems: 2 + assigned-clock-parents: + maxItems: 2 clocks: minItems: 3 items: