From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA717C433EF for ; Mon, 14 Mar 2022 19:34:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7D1C68309E; Mon, 14 Mar 2022 20:34:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="RtwF+Uzd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 37ABD8309E; Mon, 14 Mar 2022 20:34:37 +0100 (CET) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7A75C820DE for ; Mon, 14 Mar 2022 20:34:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72b.google.com with SMTP id b67so13707867qkc.6 for ; Mon, 14 Mar 2022 12:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=u3xF1juF+JuJNjUYDS1Nq0HlVX3/+eZZsgJakj49uXE=; b=RtwF+Uzd7txxdRW+4ugpfFTjKSWtA8Mpf8ha+W/KHJcPl8QqXV81bjBKSTkkzUYWsa ibAsK6XJ2H3h3jer1S+HrP47MK/6hEuFUNJoYaFYV6j+SFMYAXtvfkKPySdL+g6BRXUO db3B26Ax5WPPJbk6rsj/+JoYc/T13+lzEfKt4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=u3xF1juF+JuJNjUYDS1Nq0HlVX3/+eZZsgJakj49uXE=; b=TEqA/4/w2Ku2LD8RZqBRPBqGP34CKUm8rzOwEggFlz/+7dIedyxeZTiw/mdwzwEM7X Zr457mhwFodvoq7s1Uw3YyJdqh9nTcQvShMZrXmrVswGBRT49l/X2yMCtVga9DDsBnqv /J5Z1cBQd61T5dblCFsyv7cAT57g+PyQl31n+AnTSIjO7N/5DBrq4SHfXthnkMP2sMcF ARHNyCUu1X8Lw7tlVQvDu5hmASLb2iCLfsSeOlJMZqgWhPCw3mbDPKjVgi0IxmvnA+y/ MzhpyIrq1i18mRWIT0l2/V6lym+YiEm02ETLLiWgtmL9qz7cqSRUi5llVTPKn0DmQ8Ws lCcw== X-Gm-Message-State: AOAM530Fi/3zio6xmqkjmImwH68G7g/hKVOpQuRxfjO9vDljI6aGw8RL ykKKJNvC/bhjBmDZTFz2POufPw== X-Google-Smtp-Source: ABdhPJx2Mye6yIAfmMgcYHd/NjlyQYEBDXv4xIYaal/TYK3oR7bHSjaTDn8hONs2p5i4C/zPCAcfxw== X-Received: by 2002:a37:a497:0:b0:67d:4926:5c33 with SMTP id n145-20020a37a497000000b0067d49265c33mr15778262qke.566.1647286470195; Mon, 14 Mar 2022 12:34:30 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id o206-20020a37a5d7000000b0067d42fd49c3sm7905425qke.4.2022.03.14.12.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Mar 2022 12:34:29 -0700 (PDT) Date: Mon, 14 Mar 2022 15:34:27 -0400 From: Tom Rini To: Soeren Moch Cc: Simon Glass , Stefano Babic , Fabio Estevam , U-Boot Mailing List Subject: Re: [PATCH 2/2] board: tbs2910: Convert to DM_SERIAL Message-ID: <20220314193427.GN9986@bill-the-cat> References: <20220314082626.96395-1-smoch@web.de> <20220314082626.96395-2-smoch@web.de> <20220314182829.GK9986@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="UEbtx6mvDyyRl/If" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean --UEbtx6mvDyyRl/If Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 14, 2022 at 08:22:10PM +0100, Soeren Moch wrote: >=20 > On 14.03.22 19:28, Tom Rini wrote: > > On Mon, Mar 14, 2022 at 12:24:36PM -0600, Simon Glass wrote: > > > Hi Soeren, > > >=20 > > > On Mon, 14 Mar 2022 at 02:26, Soeren Moch wrote: > > > > ... to get rid of the build warning. > > > > Unfortunately we still need the board specific serial pin init code. > > > > Otherwise the first boot messages over the serial console are lost. > > > >=20 > > > > Signed-off-by: Soeren Moch > > > > --- > > > > Cc: Stefano Babic > > > > Cc: Fabio Estevam > > > > Cc: Tom Rini > > > > Cc: Simon Glass > > > > Cc: u-boot@lists.denx.de > > > >=20 > > > > The whole purpose of DM is somewhat defeated when we still need boa= rd > > > > specific initializations. Any ideas how we can get all boot messages > > > > without board specific inits? 'u-boot,dm-pre-reloc;' in the uart de= vice > > > > tree node did not help. > > > You can put that in your serial driver, perhaps? Or in the initial SoC > > > init code? > Why should I do so? The whole point of DM is initializing devices from > DT. And when I wish to do so pre-relocation, it is advertised in DM to > add 'u-boot,dm-pre-reloc;' for this purpose. I tried, it did not work. > And this is nothing closely related to the serial driver itself, I just > want the pin setup running pre-relocation and not as late as it is > running now under DM_SERIAL. >=20 > I also do not want to run this pin setup twice (first in board or SoC > code and again by DM_SERIAL later). Maybe I miss something obvious, but > duplication of the setup code cannot be a proper solution. > > >=20 > > > Another recent way (in -next) is to use events to monitor the > > > EVT_DM_PRE_PROBE event for the serial driver. > I can monitor the probe event, OK. But how can this solve my problem? > Again, maybe I miss something obvious, please tell me when I do so. > > It's just the same thing every single imx platform is doing. > >=20 > Sorry, I don't understand what you mean here. The reference platform for > my board is mx6sabresd. This is not converted to DM_SERIAL yet. Most (?) > imx boards use SPL, pin setup is different there. > I looked into imx boards with DM_SERIAL. They either removed the > board-specific setup code (which results in missing early boot messages: > u-boot version, board name, DDR size, ...) or they are playing tricks in > SPL (not the clean and easy solution that DM promises). Maybe I missed a > better reference for the DM_SERIAL conversion without SPL. Can you point > me to such board? My point, largely to Simon, sorry, is that this isn't a "tbs2910" specific problem, but rather something that's not solved for any of the imx platforms as they do some form of what you note above. I suspect it's not solved for anything else either and other platforms are doing some number of what you said above (or relying on something else already having done the pinmux). --=20 Tom --UEbtx6mvDyyRl/If Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmIvmLwACgkQFHw5/5Y0 tyyJFQv+Me5srMmQ8VWAijjXx4NoZixLHJr2HKnzzNFkfHmNn13WQqsW9JR2/Wic 16nHLh8Ry+ilLzcB1B9ecr8kBKt6IRr5Cdpt4Z5qk1lq0r3W5gGKpOrGMhxViOQP BqjLmzkLjaOBQGF9U6vyTFseID84XyLdBJ7O5pIzTLuZgjnZx4rdQOOg5BmP1D6V lTFobqn6avBcB/vjOJL08ErThVGf1BdJXzykeReypZY616cBiUl4DXwetXpVQfgm BSgH58bjFnreUtN3Vh5iomU4gRQQUsODk300dI5MjEdxetTo4oPqlldafmQe8Xti qGZqhfOt+fZ430r1PCpAFcJ4eBJoqzk48CYDR3PEH5KWmbrxG9skLOqyiQmAogoh t0WgJfqVRbw71Tv/qg8qzs848RrIYyuWItDnqY2c6B7qDDJ15/UbBOFvN2vJT5wM YZH3iMaMu71n7bc4+ZVPxGQBCk4tlbwqhGJaKZOt6Pjnc2/T40iP0hJcmiHpEjJP EJZXV+iG =2WwT -----END PGP SIGNATURE----- --UEbtx6mvDyyRl/If--