diff mbox

[U-Boot] sunxi: Fix wrong serial console setup in Forfun Q88DB tablet

Message ID 20150908180851.57550683@i7
State Accepted
Delegated to: Hans de Goede
Headers show

Commit Message

Siarhei Siamashka Sept. 8, 2015, 3:08 p.m. UTC
On Tue,  8 Sep 2015 17:49:08 +0300
Siarhei Siamashka <siarhei.siamashka@gmail.com> wrote:

> The Forfun Q88DB tablet was unbootable since commit
> b6006baf9c2553543e3384983d23d95efbf24fa6 ("sunxi: Move all
> boards to the driver-model"). Appears that this is caused
> by the wrong serial console setup in the SPL. The serial
> console should use PG3/PG4 pins according to the FEX file.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> ---
>  configs/forfun_q88db_defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> While this should be a correct fix, the reason why the tablet failed
> to boot is a bit unclear. Without the correct CONS_INDEX setup, we
> should just get the serial console routed to the nonexisting pins
> B19/B20, and this is expected to be harmless. Maybe the DM code
> in the main U-Boot binary can't initialize serial console properly
> if we have a mismatch between the settings in the dts file and the
> CONS_INDEX settings in the SPL?

Yes, as an experiment, pretending that the tablet has an A10S SoC (the
same die as A13, but with more pins routed to the outside, including
B19/B20) also "fixes" the boot issue:

index 24de86c..9254a42 100644

Is something broken in the sunxi DM serial code, so that it
partially relies on the SPL configuring the UART pins properly?
diff mbox

Patch

--- a/arch/arm/dts/sun5i-a13-forfun-q88db.dts
+++ b/arch/arm/dts/sun5i-a13-forfun-q88db.dts
@@ -7,14 +7,14 @@ 
  */
 
 /dts-v1/;
-#include "sun5i-a13.dtsi"
+#include "sun5i-a10s.dtsi"
 
 / {
        model = "Forfun Q88db";
        compatible = "forfun,q88db", "allwinner,sun5i-a13";
 
        aliases {
-               serial0 = &uart1;
+               serial0 = &uart0;
        };
 
        chosen {
@@ -22,8 +22,8 @@ 
        };
 };
 
-&uart1 {
+&uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart1_pins_b>;
+       pinctrl-0 = <&uart0_pins_a>;
        status = "okay";
 };