public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sunxi: Fix wrong serial console setup in Forfun Q88DB tablet
Date: Tue, 8 Sep 2015 18:08:51 +0300	[thread overview]
Message-ID: <20150908180851.57550683@i7> (raw)
In-Reply-To: <1441723748-26540-1-git-send-email-siarhei.siamashka@gmail.com>

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
--- 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";
 };

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

-- 
Best regards,
Siarhei Siamashka

  reply	other threads:[~2015-09-08 15:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08 14:49 [U-Boot] [PATCH] sunxi: Fix wrong serial console setup in Forfun Q88DB tablet Siarhei Siamashka
2015-09-08 15:08 ` Siarhei Siamashka [this message]
2015-09-10 18:18 ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150908180851.57550683@i7 \
    --to=siarhei.siamashka@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox