* [PATCH v3 0/2] sdmmc/sdio/emmc improvements for RK3328
@ 2024-07-10 13:28 Diederik de Haas
2024-07-10 13:28 ` [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext " Diederik de Haas
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Diederik de Haas @ 2024-07-10 13:28 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Alex Bee, linux-rockchip, devicetree, linux-arm-kernel,
linux-kernel, Johan Jonker, Chen-Yu Tsai, Diederik de Haas
This is a rebased resend of Alex Bee's prior patches which haven't been
merged even though there doesn't seem to be anything wrong with it.
These patches have been used in LibreELEC for years, which means I've
been using it for years on my Rock64 and I've also added it to my
latest 6.10-rc7 build and that worked fine too.
Link to v2:
https://lore.kernel.org/linux-rockchip/20210623145918.187018-1-knaerzche@gmail.com/
Alex Bee (2):
arm64: dts: rockchip: Add sdmmc_ext for RK3328
arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls for RK3328
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
base-commit: d79d713d602e8b32cf935ddfdf61769cb74ba1dc
--
2.45.2
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext for RK3328 2024-07-10 13:28 [PATCH v3 0/2] sdmmc/sdio/emmc improvements for RK3328 Diederik de Haas @ 2024-07-10 13:28 ` Diederik de Haas 2024-07-13 13:45 ` Dragan Simic 2024-07-10 13:28 ` [PATCH v3 2/2] arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls " Diederik de Haas 2024-07-29 20:21 ` [PATCH v3 0/2] sdmmc/sdio/emmc improvements " Heiko Stuebner 2 siblings, 1 reply; 9+ messages in thread From: Diederik de Haas @ 2024-07-10 13:28 UTC (permalink / raw) To: Heiko Stuebner Cc: Alex Bee, linux-rockchip, devicetree, linux-arm-kernel, linux-kernel, Johan Jonker, Chen-Yu Tsai, Diederik de Haas From: Alex Bee <knaerzche@gmail.com> RK3328 SoC has a fourth mmc controller called SDMMC_EXT. Some boards have sdio wifi connected to it. In order to use it one would have to add the pinctrls from sdmmc0ext group which is done on board level. Signed-off-by: Alex Bee <knaerzche@gmail.com> Signed-off-by: Diederik de Haas <didi.debian@cknow.org> --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index b01efd6d042c..95c3f1303544 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi @@ -1036,6 +1036,20 @@ usb_host0_ohci: usb@ff5d0000 { status = "disabled"; }; + sdmmc_ext: mmc@ff5f0000 { + compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xff5f0000 0x0 0x4000>; + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru HCLK_SDMMC_EXT>, <&cru SCLK_SDMMC_EXT>, + <&cru SCLK_SDMMC_EXT_DRV>, <&cru SCLK_SDMMC_EXT_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + max-frequency = <150000000>; + resets = <&cru SRST_SDMMCEXT>; + reset-names = "reset"; + status = "disabled"; + }; + usbdrd3: usb@ff600000 { compatible = "rockchip,rk3328-dwc3", "snps,dwc3"; reg = <0x0 0xff600000 0x0 0x100000>; -- 2.45.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext for RK3328 2024-07-10 13:28 ` [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext " Diederik de Haas @ 2024-07-13 13:45 ` Dragan Simic 2024-07-13 14:35 ` Diederik de Haas 0 siblings, 1 reply; 9+ messages in thread From: Dragan Simic @ 2024-07-13 13:45 UTC (permalink / raw) To: Diederik de Haas Cc: Heiko Stuebner, Alex Bee, linux-rockchip, devicetree, linux-arm-kernel, linux-kernel, Johan Jonker, Chen-Yu Tsai Hello Diederik, On 2024-07-10 15:28, Diederik de Haas wrote: > From: Alex Bee <knaerzche@gmail.com> > > RK3328 SoC has a fourth mmc controller called SDMMC_EXT. Some > boards have sdio wifi connected to it. In order to use it > one would have to add the pinctrls from sdmmc0ext group which > is done on board level. > > Signed-off-by: Alex Bee <knaerzche@gmail.com> > Signed-off-by: Diederik de Haas <didi.debian@cknow.org> Looking good to me, cross-referencing the RK3328 TRM and the downstream RK3328 SoC dtsi checks out. Though, it will remain inert in our codebase, because no supported boards use it, but that's fine, we're still improving the correctness of the RK3328 SoC dtsi. Reviewed-by: Dragan Simic <dsimic@manjaro.org> > --- > arch/arm64/boot/dts/rockchip/rk3328.dtsi | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi > b/arch/arm64/boot/dts/rockchip/rk3328.dtsi > index b01efd6d042c..95c3f1303544 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi > @@ -1036,6 +1036,20 @@ usb_host0_ohci: usb@ff5d0000 { > status = "disabled"; > }; > > + sdmmc_ext: mmc@ff5f0000 { > + compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc"; > + reg = <0x0 0xff5f0000 0x0 0x4000>; > + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&cru HCLK_SDMMC_EXT>, <&cru SCLK_SDMMC_EXT>, > + <&cru SCLK_SDMMC_EXT_DRV>, <&cru SCLK_SDMMC_EXT_SAMPLE>; > + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; > + fifo-depth = <0x100>; > + max-frequency = <150000000>; > + resets = <&cru SRST_SDMMCEXT>; > + reset-names = "reset"; > + status = "disabled"; > + }; > + > usbdrd3: usb@ff600000 { > compatible = "rockchip,rk3328-dwc3", "snps,dwc3"; > reg = <0x0 0xff600000 0x0 0x100000>; ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext for RK3328 2024-07-13 13:45 ` Dragan Simic @ 2024-07-13 14:35 ` Diederik de Haas 2024-07-13 14:56 ` Alex Bee 0 siblings, 1 reply; 9+ messages in thread From: Diederik de Haas @ 2024-07-13 14:35 UTC (permalink / raw) To: Dragan Simic Cc: Heiko Stuebner, Alex Bee, linux-rockchip, devicetree, linux-arm-kernel, linux-kernel, Johan Jonker, Chen-Yu Tsai [-- Attachment #1: Type: text/plain, Size: 447 bytes --] Hi Dragan, Thanks for the reviews! On Saturday, 13 July 2024 15:45:12 CEST Dragan Simic wrote: > Looking good to me, cross-referencing the RK3328 TRM and the > downstream RK3328 SoC dtsi checks out. Though, it will remain inert > in our codebase, because no supported boards use it, but that's fine, > we're still improving the correctness of the RK3328 SoC dtsi. Indeed. But it's hard to argue with technically correct ;-) Cheers, Diederik [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext for RK3328 2024-07-13 14:35 ` Diederik de Haas @ 2024-07-13 14:56 ` Alex Bee 2024-07-13 14:58 ` Dragan Simic 0 siblings, 1 reply; 9+ messages in thread From: Alex Bee @ 2024-07-13 14:56 UTC (permalink / raw) To: Diederik de Haas, Dragan Simic Cc: Heiko Stuebner, linux-rockchip, devicetree, linux-arm-kernel, linux-kernel, Johan Jonker, Chen-Yu Tsai Am 13.07.24 um 16:35 schrieb Diederik de Haas: > Hi Dragan, > > Thanks for the reviews! > > On Saturday, 13 July 2024 15:45:12 CEST Dragan Simic wrote: >> Looking good to me, cross-referencing the RK3328 TRM and the >> downstream RK3328 SoC dtsi checks out. Though, it will remain inert >> in our codebase, because no supported boards use it, but that's fine, >> we're still improving the correctness of the RK3328 SoC dtsi. > Indeed. But it's hard to argue with technically correct ;-) FWIW: (upstream supported) ROC-RK3328-PC has sdio wifi connected to this controller. Alex > Cheers, > Diederik ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext for RK3328 2024-07-13 14:56 ` Alex Bee @ 2024-07-13 14:58 ` Dragan Simic 0 siblings, 0 replies; 9+ messages in thread From: Dragan Simic @ 2024-07-13 14:58 UTC (permalink / raw) To: Alex Bee Cc: Diederik de Haas, Heiko Stuebner, linux-rockchip, devicetree, linux-arm-kernel, linux-kernel, Johan Jonker, Chen-Yu Tsai Hello Alex, On 2024-07-13 16:56, Alex Bee wrote: > Am 13.07.24 um 16:35 schrieb Diederik de Haas: >> Hi Dragan, >> >> Thanks for the reviews! >> >> On Saturday, 13 July 2024 15:45:12 CEST Dragan Simic wrote: >>> Looking good to me, cross-referencing the RK3328 TRM and the >>> downstream RK3328 SoC dtsi checks out. Though, it will remain inert >>> in our codebase, because no supported boards use it, but that's fine, >>> we're still improving the correctness of the RK3328 SoC dtsi. >> Indeed. But it's hard to argue with technically correct ;-) > > FWIW: (upstream supported) ROC-RK3328-PC has sdio wifi connected to > this > controller. Oh, it does? Good to hear, so the additions to the RK3328 SoC dtsi shouldn't remain inert. :) ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 2/2] arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls for RK3328 2024-07-10 13:28 [PATCH v3 0/2] sdmmc/sdio/emmc improvements for RK3328 Diederik de Haas 2024-07-10 13:28 ` [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext " Diederik de Haas @ 2024-07-10 13:28 ` Diederik de Haas 2024-07-13 13:32 ` Dragan Simic 2024-07-29 20:21 ` [PATCH v3 0/2] sdmmc/sdio/emmc improvements " Heiko Stuebner 2 siblings, 1 reply; 9+ messages in thread From: Diederik de Haas @ 2024-07-10 13:28 UTC (permalink / raw) To: Heiko Stuebner Cc: Alex Bee, linux-rockchip, devicetree, linux-arm-kernel, linux-kernel, Johan Jonker, Chen-Yu Tsai, Diederik de Haas From: Alex Bee <knaerzche@gmail.com> The DW MCI controller driver will use them to reset the IP block before initialisation. Fixes: d717f7352ec6 ("arm64: dts: rockchip: add sdmmc/sdio/emmc nodes for RK3328 SoCs") Signed-off-by: Alex Bee <knaerzche@gmail.com> Signed-off-by: Diederik de Haas <didi.debian@cknow.org> --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index 95c3f1303544..16b4faa22e4f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi @@ -910,6 +910,8 @@ sdmmc: mmc@ff500000 { clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; fifo-depth = <0x100>; max-frequency = <150000000>; + resets = <&cru SRST_MMC0>; + reset-names = "reset"; status = "disabled"; }; @@ -922,6 +924,8 @@ sdio: mmc@ff510000 { clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; fifo-depth = <0x100>; max-frequency = <150000000>; + resets = <&cru SRST_SDIO>; + reset-names = "reset"; status = "disabled"; }; @@ -934,6 +938,8 @@ emmc: mmc@ff520000 { clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; fifo-depth = <0x100>; max-frequency = <150000000>; + resets = <&cru SRST_EMMC>; + reset-names = "reset"; status = "disabled"; }; -- 2.45.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/2] arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls for RK3328 2024-07-10 13:28 ` [PATCH v3 2/2] arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls " Diederik de Haas @ 2024-07-13 13:32 ` Dragan Simic 0 siblings, 0 replies; 9+ messages in thread From: Dragan Simic @ 2024-07-13 13:32 UTC (permalink / raw) To: Diederik de Haas Cc: Heiko Stuebner, Alex Bee, linux-rockchip, devicetree, linux-arm-kernel, linux-kernel, Johan Jonker, Chen-Yu Tsai Hello Diederik, On 2024-07-10 15:28, Diederik de Haas wrote: > From: Alex Bee <knaerzche@gmail.com> > > The DW MCI controller driver will use them to reset the IP block before > initialisation. > > Fixes: d717f7352ec6 ("arm64: dts: rockchip: add sdmmc/sdio/emmc nodes > for RK3328 SoCs") > Signed-off-by: Alex Bee <knaerzche@gmail.com> > Signed-off-by: Diederik de Haas <didi.debian@cknow.org> Looking good to me, cross-referencing the RK3328 TRM checks out. Reviewed-by: Dragan Simic <dsimic@manjaro.org> > --- > arch/arm64/boot/dts/rockchip/rk3328.dtsi | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi > b/arch/arm64/boot/dts/rockchip/rk3328.dtsi > index 95c3f1303544..16b4faa22e4f 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi > @@ -910,6 +910,8 @@ sdmmc: mmc@ff500000 { > clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; > fifo-depth = <0x100>; > max-frequency = <150000000>; > + resets = <&cru SRST_MMC0>; > + reset-names = "reset"; > status = "disabled"; > }; > > @@ -922,6 +924,8 @@ sdio: mmc@ff510000 { > clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; > fifo-depth = <0x100>; > max-frequency = <150000000>; > + resets = <&cru SRST_SDIO>; > + reset-names = "reset"; > status = "disabled"; > }; > > @@ -934,6 +938,8 @@ emmc: mmc@ff520000 { > clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; > fifo-depth = <0x100>; > max-frequency = <150000000>; > + resets = <&cru SRST_EMMC>; > + reset-names = "reset"; > status = "disabled"; > }; ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/2] sdmmc/sdio/emmc improvements for RK3328 2024-07-10 13:28 [PATCH v3 0/2] sdmmc/sdio/emmc improvements for RK3328 Diederik de Haas 2024-07-10 13:28 ` [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext " Diederik de Haas 2024-07-10 13:28 ` [PATCH v3 2/2] arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls " Diederik de Haas @ 2024-07-29 20:21 ` Heiko Stuebner 2 siblings, 0 replies; 9+ messages in thread From: Heiko Stuebner @ 2024-07-29 20:21 UTC (permalink / raw) To: Diederik de Haas Cc: Heiko Stuebner, devicetree, linux-rockchip, linux-arm-kernel, Johan Jonker, linux-kernel, Alex Bee, Chen-Yu Tsai On Wed, 10 Jul 2024 15:28:10 +0200, Diederik de Haas wrote: > This is a rebased resend of Alex Bee's prior patches which haven't been > merged even though there doesn't seem to be anything wrong with it. > These patches have been used in LibreELEC for years, which means I've > been using it for years on my Rock64 and I've also added it to my > latest 6.10-rc7 build and that worked fine too. > > Link to v2: > https://lore.kernel.org/linux-rockchip/20210623145918.187018-1-knaerzche@gmail.com/ > > [...] Applied, thanks! [1/2] arm64: dts: rockchip: Add sdmmc_ext for RK3328 commit: 82e3aaae388199a0aff33e5371db307b3274f77a [2/2] arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls for RK3328 commit: bd6e614356d4fc852480cfb14d705da0561d5777 Best regards, -- Heiko Stuebner <heiko@sntech.de> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-07-29 20:26 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-07-10 13:28 [PATCH v3 0/2] sdmmc/sdio/emmc improvements for RK3328 Diederik de Haas 2024-07-10 13:28 ` [PATCH v3 1/2] arm64: dts: rockchip: Add sdmmc_ext " Diederik de Haas 2024-07-13 13:45 ` Dragan Simic 2024-07-13 14:35 ` Diederik de Haas 2024-07-13 14:56 ` Alex Bee 2024-07-13 14:58 ` Dragan Simic 2024-07-10 13:28 ` [PATCH v3 2/2] arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls " Diederik de Haas 2024-07-13 13:32 ` Dragan Simic 2024-07-29 20:21 ` [PATCH v3 0/2] sdmmc/sdio/emmc improvements " Heiko Stuebner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox