mbox series

[0/2] fix eMMC/SPI flash corruption when audio has been used on RK3399 Puma

Message ID 20240731-puma-emmc-6-v1-0-4e28eadf32d0@cherry.de (mailing list archive)
Headers show
Series fix eMMC/SPI flash corruption when audio has been used on RK3399 Puma | expand

Message

Quentin Schulz July 31, 2024, 11:05 a.m. UTC
In commit 91419ae0420f ("arm64: dts: rockchip: use BCLK to GPIO switch
on rk3399"), an additional pinctrl state was added whose default pinmux
is for 8ch i2s0. However, Puma only has 2ch i2s0. It's been overriding
the pinctrl-0 property but the second property override was missed in
the aforementioned commit.

On Puma, a hardware slider called "BIOS Disable/Normal Boot" can disable
eMMC and SPI to force booting from SD card. Another software-controlled
GPIO is then configured to override this behavior to make eMMC and SPI
available without human intervention. This is currently done in U-Boot
and it was enough until the aforementioned commit.

Indeed, because of this additional not-yet-overridden property, this
software-controlled GPIO is now muxed in a state that does not override
this hardware slider anymore, rendering SPI and eMMC flashes unusable.

Let's override the property with the 2ch pinmux to fix this.

While at it, add a GPIO hog for this software-controlled GPIO to make it
explicit and also make it reserve the pin through the pinctrl subsystem
to make sure nobody can mistakenly request it for something else: better
have a non-working feature than eMMC/SPI being corrupted "randomly"!

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Quentin Schulz (2):
      arm64: dts: rockchip: fix eMMC/SPI corruption when audio has been used on RK3399 Puma
      arm64: dts: rockchip: override BIOS_DISABLE signal via GPIO hog on RK3399 Puma

 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 36 ++++++++++++++++++++++++---
 1 file changed, 33 insertions(+), 3 deletions(-)
---
base-commit: e4fc196f5ba36eb7b9758cf2c73df49a44199895
change-id: 20240731-puma-emmc-6-c141e891220b

Best regards,

Comments

Heiko Stübner July 31, 2024, 11:35 a.m. UTC | #1
On Wed, 31 Jul 2024 13:05:27 +0200, Quentin Schulz wrote:
> In commit 91419ae0420f ("arm64: dts: rockchip: use BCLK to GPIO switch
> on rk3399"), an additional pinctrl state was added whose default pinmux
> is for 8ch i2s0. However, Puma only has 2ch i2s0. It's been overriding
> the pinctrl-0 property but the second property override was missed in
> the aforementioned commit.
> 
> On Puma, a hardware slider called "BIOS Disable/Normal Boot" can disable
> eMMC and SPI to force booting from SD card. Another software-controlled
> GPIO is then configured to override this behavior to make eMMC and SPI
> available without human intervention. This is currently done in U-Boot
> and it was enough until the aforementioned commit.
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: rockchip: fix eMMC/SPI corruption when audio has been used on RK3399 Puma
      commit: bb94a157b37ec23f53906a279320f6ed64300eba
[2/2] arm64: dts: rockchip: override BIOS_DISABLE signal via GPIO hog on RK3399 Puma
      commit: 741f5ba7ccba5d7ae796dd11c320e28045524771

Best regards,