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 X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52B9AC4320E for ; Thu, 12 Aug 2021 21:40:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8E8D86023D for ; Thu, 12 Aug 2021 21:40:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8E8D86023D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0D3A982000; Thu, 12 Aug 2021 23:40:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (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="p/fiDmgx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9A28C82D73; Thu, 12 Aug 2021 23:40:44 +0200 (CEST) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (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 4BDBA81FC6 for ; Thu, 12 Aug 2021 23:40:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x733.google.com with SMTP id a19so8473598qkg.2 for ; Thu, 12 Aug 2021 14:40:38 -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:user-agent; bh=+626l9wWUg80WeqI6myWcj3+Qmw/F/zrMzAnMgLikJo=; b=p/fiDmgxDWlN0S2WlYR0CircrsPPCS3ekiY1X8fF7faohLQ3IPDvmoy8EAFjFe78Q5 kps++V78GkLm8uNd0CSz7BH/sUEfya3J6SqssxftEqzn+rD263PhDILPxv+ZNHNf+76F OSozr85eJWAVUHPzNrxfwMlWwLIYS4NfYJ4MA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+626l9wWUg80WeqI6myWcj3+Qmw/F/zrMzAnMgLikJo=; b=fB6YO1UwDPIn0KH3CEIn/nB5mhKTHllQ3x+OZ32k8HsSE0DPAGDnwSSj+n4LKwzorQ 8RN4Bj2LJQpI8MtTDjYR0K4mLiNbrwWLiW2qnNlImyp0n0sKCRUcn1+GnmobmhnUV/CN 65ZwY3r/T4Fe2l5Z5ytxxaXW2E7wi98KnxypjFrgJ4gAJuxGxVLegKF1qc1F0Uyuqqsl tWkwoSEtBPR65rkO9XNn/mQmTTQz0QdqKSWkCMVV7jaj2TjnOE36KzfwFeN+NCgBoGAp tFDjsmHZEGk2QZqaul7M6piDijVaoklqefL2Tujns4ZNzWH/oDb/vPhiiVagZZGwzKca NB/A== X-Gm-Message-State: AOAM533q/jLjjcldJmdjncFixcRyEu6aA1bXPnrnvMEAmsQoyyB5+mXp fjmlHctsbMjZVx0/kARsXtg9lQ== X-Google-Smtp-Source: ABdhPJxZeRbPxW7pAaUSdhJTtJfd5cyAY24S5VWCz3xw4dzsV3f2pl3BbikoDjELSNcXCdYqu/juXw== X-Received: by 2002:a37:4014:: with SMTP id n20mr6846839qka.247.1628804436870; Thu, 12 Aug 2021 14:40:36 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-04e3-07fe-0933-9252.res6.spectrum.com. [2603:6081:7b01:cbda:4e3:7fe:933:9252]) by smtp.gmail.com with ESMTPSA id w185sm2169071qkd.30.2021.08.12.14.40.35 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Aug 2021 14:40:36 -0700 (PDT) Date: Thu, 12 Aug 2021 17:40:34 -0400 From: Tom Rini To: Andre Przywara Cc: u-boot@lists.denx.de, Jagan Teki , Jernej =?utf-8?Q?=C5=A0krabec?= Subject: Re: U-Boot sunxi DM_I2C migration? Message-ID: <20210812214034.GA858@bill-the-cat> References: <20210812174930.GZ858@bill-the-cat> <20210812222207.02126e3c@slackpad.fritz.box> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0ZgrbDZlPgfR0nDk" Content-Disposition: inline In-Reply-To: <20210812222207.02126e3c@slackpad.fritz.box> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean --0ZgrbDZlPgfR0nDk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 12, 2021 at 10:22:07PM +0100, Andre Przywara wrote: > On Thu, 12 Aug 2021 13:49:30 -0400 > Tom Rini wrote: >=20 > Hi Tom, >=20 > > As I try and migrate more CONFIG symbols to be Kconfig only, I see that > > sunxi is still using the legacy I2C drivers. Is there something > > specific holding up migration? Thanks! >=20 > Do you mean a DM_I2C conversion, or just moving those base address > symbols to Kconfig? The latter is rather easy, let me know if I should > give it a shot. >=20 > For DM_I2C, it's the usual sunxi issue: we are using both: DM_I2C and > DT based probing for U-Boot proper, and hardcoded CONFIG_ symbols for > the SPL. *Some* boards need the set up the PMIC early (for increasing > the CPU frequency or setting the proper DRAM voltage), so this needs to > be done in the SPL. I don't know how to fix this "properly", > but introducing DM (and DT) into the SPL is surely not worth the > trouble. Alternatively we could have a separate, cut-down SPL-only > driver, like we have for SPI (arch/arm/mach-sunxi/spl_spi_sunxi.c), > but not sure that's really better. >=20 > If there is something in particular that annoys you about the > situation, we could try to improve this particular issue instead? > Moving the non-DM code into a separate file, maybe? I'm working on the symbols now (since it gets tricky). The first example I pulled out was Hummingbird_A31 which does have legacy I2C and does not set DM_I2C, which is what set me down the more worrying path. If you can confirm that no, really, it's just SPL that's not using DM_I2C that's OK enough for now, we can sort out what the best but probably still unideal solution is long term for SPL. --=20 Tom --0ZgrbDZlPgfR0nDk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEVlU4ACgkQFHw5/5Y0 tywraAv/Sdjth/TjvhsghtDwiOD/+tZGHI1MyLz7NCcL2n249p5UdhG5KNhBxmBh KtvrV77f00X07pFd3vvIs7tWnE0+ZpfQ3wy7ZjoL5VZxG3JGn8l1kK0vxU3s0QHc ZobqcIyZExcdHlsMw1DrznMc2QcrnfmyQA8NZfzFF6uhnnRlrzgR2IWmGYCsycSj BUfJjk7tM0f87ZXb5FDlcueqpBpC4hPqs1B4ZnYZdi4Ce41P8uWmznqCy6XOP33g hM0svnUW5OxVMTQV/qNyISokTIF+66nr1ZlXc8/sxovA8KBdi9KBGX4R6TDUW3sT SplnjGFpy1d7/hAfcNzoP6xJLEJKqt/UTjkdHwVDPZ5TcBQy6Rz0GsEiIq2IYOQD vtHOmjxTiYKX9FbRJ6tMmeg2siihkAmTnUlmMXBZ49kVV4vFJV2aTwb+544SBdg+ y84FJp5VreQPHAF/egzvD4VjULWxB2kr+YPHJdABKocEpjbPb9j4ZC/Buv0KVaRj YN+Y9F70 =C2jD -----END PGP SIGNATURE----- --0ZgrbDZlPgfR0nDk--