Skip to content

Commit bb94a15

Browse files
QSchulzmmind
authored andcommitted
arm64: dts: rockchip: fix eMMC/SPI corruption when audio has been used on RK3399 Puma
In commit 91419ae ("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. Fixes: 91419ae ("arm64: dts: rockchip: use BCLK to GPIO switch on rk3399") Cc: [email protected] Signed-off-by: Quentin Schulz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]>
1 parent c623e9d commit bb94a15

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@
409409

410410
&i2s0 {
411411
pinctrl-0 = <&i2s0_2ch_bus>;
412+
pinctrl-1 = <&i2s0_2ch_bus_bclk_off>;
412413
rockchip,playback-channels = <2>;
413414
rockchip,capture-channels = <2>;
414415
status = "okay";
@@ -417,8 +418,8 @@
417418
/*
418419
* As Q7 does not specify neither a global nor a RX clock for I2S these
419420
* signals are not used. Furthermore I2S0_LRCK_RX is used as GPIO.
420-
* Therefore we have to redefine the i2s0_2ch_bus definition to prevent
421-
* conflicts.
421+
* Therefore we have to redefine the i2s0_2ch_bus and i2s0_2ch_bus_bclk_off
422+
* definitions to prevent conflicts.
422423
*/
423424
&i2s0_2ch_bus {
424425
rockchip,pins =
@@ -428,6 +429,14 @@
428429
<3 RK_PD7 1 &pcfg_pull_none>;
429430
};
430431

432+
&i2s0_2ch_bus_bclk_off {
433+
rockchip,pins =
434+
<3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>,
435+
<3 RK_PD2 1 &pcfg_pull_none>,
436+
<3 RK_PD3 1 &pcfg_pull_none>,
437+
<3 RK_PD7 1 &pcfg_pull_none>;
438+
};
439+
431440
&io_domains {
432441
status = "okay";
433442
bt656-supply = <&vcc_1v8>;

0 commit comments

Comments
 (0)