Fix emmc hs400 mode on mt7986
Subsystems (5)
v2 cover Fix emmc hs400 mode on mt7986
From: Frank Wunderlich <[email protected]>
Eric boots linux directly from ATF without using uboot. In this corner case clocks for emmc hs400 mode are not correctly setup.
Fix this by adding assigned-clocks and assigned.clock-parents to mmc node.
Eric Woudstra (1):
arm64: dts: mt7986: fix emmc hs400 mode without uboot initialization
Frank Wunderlich (1):
dt-bindings: mmc: mtk-sd: drop assigned-clocks/clock-parents
Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 10 ---------- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 4 ++++ 2 files changed, 4 insertions(+), 10 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/2 dt-bindings: mmc: mtk-sd: drop assigned-clocks/clock-parents
From: Frank Wunderlich <[email protected]>
MT7986 has 2 clock-parents and these properties are not needed in driver binding. So drop them completely.
---
v2:
- drop assigned-clock* completely based on discussion with Krzysztof in v1
--- Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 10 ---------- 1 file changed, 10 deletions(-)
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +0 -10
@@ -91,16 +91,6 @@ properties: should switch dat1 pin to GPIO mode. maxItems: 1 - assigned-clocks: - description: - PLL of the source clock. - maxItems: 1 - - assigned-clock-parents: - description: - parent of source clock, used for HS400 mode to get 400Mhz source clock. - maxItems: 1 - hs400-ds-delay: $ref: /schemas/types.yaml#/definitions/uint32 description:
Signature · 1 line
2.34.1
Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: drop assigned-clocks/clock-parents
Quoted 6 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
MT7986 has 2 clock-parents and these properties are not needed in driver binding. So drop them completely.
Signed-off-by Frank Wunderlich <[email protected]>
Cheers,
Conor.
Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: drop assigned-clocks/clock-parents
In reply to Frank WunderlichQuoted 7 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
MT7986 has 2 clock-parents and these properties are not needed in driver binding. So drop them completely.
Signed-off-by Frank Wunderlich <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 31 lines
---
v2:
- drop assigned-clock* completely based on discussion with Krzysztof in v1--- Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 10 ---------- 1 file changed, 10 deletions(-)Documentation/devicetree/bindings/mmc/mtk-sd.yaml +0
-11@@ -91,16 +91,6 @@ properties: should switch dat1 pin to GPIO mode. maxItems: 1 - assigned-clocks: - description: - PLL of the source clock. - maxItems: 1 - - assigned-clock-parents: - description: - parent of source clock, used for HS400 mode to get 400Mhz source clock. - maxItems: 1 - hs400-ds-delay: $ref: /schemas/types.yaml#/definitions/uint32 description: --2.34.1
PATCH v2 2/2 arm64: dts: mt7986: fix emmc hs400 mode without uboot initialization
In reply to Frank WunderlichFrom: Eric Woudstra <[email protected]>
Eric reports errors on emmc with hs400 mode when booting linux on bpi-r3 without uboot [1]. Booting with uboot does not show this because clocks seem to be initialized by uboot.
Fix this by adding assigned-clocks and assigned-clock-parents like it's done in uboot [2].
[1] https://forum.banana-pi.org/t/bpi-r3-kernel-fails-setting-emmc-clock-to-416m-depends-on-u-boot/15170
[2] https://github.com/u-boot/u-boot/blob/master/arch/arm/dts/mt7986.dtsi#L287
--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +4 -0
@@ -374,6 +374,10 @@ mmc0: mmc@11230000 { reg = <0 0x11230000 0 0x1000>, <0 0x11c20000 0 0x1000>; interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; + assigned-clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, + <&topckgen CLK_TOP_EMMC_250M_SEL>; + assigned-clock-parents = <&apmixedsys CLK_APMIXED_MPLL>, + <&topckgen CLK_TOP_NET1PLL_D5_D2>; clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, <&infracfg CLK_INFRA_MSDC_HCK_CK>, <&infracfg CLK_INFRA_MSDC_CK>,
Signature · 1 line
2.34.1
Aw: [PATCH v2 2/2] arm64: dts: mt7986: fix emmc hs400 mode without uboot initialization
Hi,
just a friendly reminder, patch seems not applied to next.
dt-binding part is reported as applied
regards Frank
Quoted 45 lines
Gesendet: Donnerstag, 29. Juni 2023 um 20:43 Uhr
Von: "Frank Wunderlich" <[email protected]>
An: [email protected]
Cc: "Frank Wunderlich" <[email protected]>, "Chaotian Jing" <[email protected]>, "Ulf Hansson" <[email protected]>, "Rob Herring" <[email protected]>, "Krzysztof Kozlowski" <[email protected]>, "Conor Dooley" <[email protected]>, "Matthias Brugger" <[email protected]>, "AngeloGioacchino Del Regno" <[email protected]>, "Wenbin Mei" <[email protected]>, "Sam Shih" <[email protected]>, [email protected], [email protected], [email protected], [email protected], "Eric Woudstra" <[email protected]>, [email protected]
Betreff: [PATCH v2 2/2] arm64: dts: mt7986: fix emmc hs400 mode without uboot initializationFrom: Eric Woudstra <[email protected]>
Eric reports errors on emmc with hs400 mode when booting linux on bpi-r3 without uboot [1]. Booting with uboot does not show this because clocks seem to be initialized by uboot.
Fix this by adding assigned-clocks and assigned-clock-parents like it's done in uboot [2].
[1] https://forum.banana-pi.org/t/bpi-r3-kernel-fails-setting-emmc-clock-to-416m-depends-on-u-boot/15170
[2] https://github.com/u-boot/u-boot/blob/master/arch/arm/dts/mt7986.dtsi#L287Fixes 513b49d19b34 ("arm64: dts: mt7986: add mmc related device nodes")Signed-off-by Eric Woudstra <[email protected]>Signed-off-by Frank Wunderlich <[email protected]>--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/mediatek/mt7986a.dtsi +4
-1@@ -374,6 +374,10 @@ mmc0: mmc@11230000 { reg = <0 0x11230000 0 0x1000>, <0 0x11c20000 0 0x1000>; interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; + assigned-clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, + <&topckgen CLK_TOP_EMMC_250M_SEL>; + assigned-clock-parents = <&apmixedsys CLK_APMIXED_MPLL>, + <&topckgen CLK_TOP_NET1PLL_D5_D2>; clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, <&infracfg CLK_INFRA_MSDC_HCK_CK>, <&infracfg CLK_INFRA_MSDC_CK>, --2.34.1
Re: [PATCH v2 2/2] arm64: dts: mt7986: fix emmc hs400 mode without uboot initialization
In reply to Frank WunderlichIl 29/06/23 20:43, Frank Wunderlich ha scritto:
Quoted 9 lines
From: Eric Woudstra <[email protected]>
Eric reports errors on emmc with hs400 mode when booting linux on bpi-r3 without uboot [1]. Booting with uboot does not show this because clocks seem to be initialized by uboot.
Fix this by adding assigned-clocks and assigned-clock-parents like it's done in uboot [2].
Quoted 7 lines
[1] https://forum.banana-pi.org/t/bpi-r3-kernel-fails-setting-emmc-clock-to-416m-depends-on-u-boot/15170
[2] https://github.com/u-boot/u-boot/blob/master/arch/arm/dts/mt7986.dtsi#L287Fixes 513b49d19b34 ("arm64: dts: mt7986: add mmc related device nodes")Signed-off-by Eric Woudstra <[email protected]>Signed-off-by Frank Wunderlich <[email protected]>