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 75E3BC4338F for ; Tue, 17 Aug 2021 19:24:08 +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 A6DD761008 for ; Tue, 17 Aug 2021 19:24:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A6DD761008 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 390F682054; Tue, 17 Aug 2021 21:24:04 +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="GjGymgjb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9B6FD829E7; Tue, 17 Aug 2021 21:24:02 +0200 (CEST) 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 1F09E8020E for ; Tue, 17 Aug 2021 21:23:58 +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-x72b.google.com with SMTP id t3so24351963qkg.11 for ; Tue, 17 Aug 2021 12:23:58 -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=SmarU3404a3ji7dSxsl7pXDJjhQjxOSFdk41KxUMrgg=; b=GjGymgjbeYYMxEZBE0vCpOgkT5JFRzw8mlHVzSwr1G9qHQwE6sV0CeYYVrtg+EDdTd +k0/gCsj0gS1+CAlh7XwXWmqt/JGwl7z8HJOWkKuu8AZph3JJLpprRyVQrnJn52T2YhE FJlrnI5VDt5sk5Q2bl/McpZmWIKs0I1DgRlac= 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=SmarU3404a3ji7dSxsl7pXDJjhQjxOSFdk41KxUMrgg=; b=HtTE7mHgDjgr80zcFPy5teLX0BLdaYFVG8jYYRAaGkNBOvfZq4mYktL1CyJvznw0kl 18etDtFewxTuhchslaGlEyEE8ahM1cmQ59r06uAy0xZvBRU/1BcjzTBYk4yNIwkZIegT vcbhG4HdzGVsSPYJTCog6gC9KpXpW0VgL6f5bKwZHT8hT8eXnxqejX971ARYAUikr383 OoNbnVrNF3GgH2M7pmcV0p0hW5ONVU0yR+UrhDSv0x78oCIlkTQtiqCQxRJRdffpE4kC 1gps6sHSJc7mpP6OZgUwENFRrL/EKDTTGImqv5n7FQui3UDdjTecJoottf0pLLgNCPW0 Db4w== X-Gm-Message-State: AOAM530f5QIsuzmBrXSgjKI/wSy4ZixDxZarxL+uwmn3qdB5/ICvdhFC tZeJSSppzQS9viw80zG7Ua0GNw== X-Google-Smtp-Source: ABdhPJymiD/jmHRk/+8tuOZe0lg1yx+tWSLJOZTbBihqXkhEAbEg4ZOarqQSXUOtEJlyu8QsssleKg== X-Received: by 2002:a37:2f85:: with SMTP id v127mr5514354qkh.474.1629228236802; Tue, 17 Aug 2021 12:23:56 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-f93a-0b29-d1e6-92fc.res6.spectrum.com. [2603:6081:7b01:cbda:f93a:b29:d1e6:92fc]) by smtp.gmail.com with ESMTPSA id x13sm1985356qki.97.2021.08.17.12.23.55 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Aug 2021 12:23:55 -0700 (PDT) Date: Tue, 17 Aug 2021 15:23:53 -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: <20210817192353.GN858@bill-the-cat> References: <20210812174930.GZ858@bill-the-cat> <20210812222207.02126e3c@slackpad.fritz.box> <20210812214034.GA858@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="G2OYmj9cSczDaGGa" Content-Disposition: inline In-Reply-To: <20210812214034.GA858@bill-the-cat> 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 --G2OYmj9cSczDaGGa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 12, 2021 at 05:40:34PM -0400, Tom Rini wrote: > 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 th= at > > > 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? >=20 > 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. As I'm converting the symbols to Kconfig now (and adding SPL_SYS_I2C_LEGACY), what I'm seeing on sunxi is a whole lot of platform enabling the legacy driver in full U-Boot and not DM_I2C. Now it's entirely possible the follow up solution really is just to switch to DM_I2C (and continue SPL_SYS_I2C_LEGACY) and it would be a fairly trivial switch. But I'm not in a good position to make that change and test it, so I'm asking you to please, once I've posted this series to add SPL_SYS_I2C_LEGACY --=20 Tom --G2OYmj9cSczDaGGa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEcDL8ACgkQFHw5/5Y0 tyxzPAv/YT2po+l9bwd2pewVt6zOMg5gvW20Q7+2ozrcUYYOaE+qxlsfAyYq4AJP IDGEo7UmiioK91+fhnQTGqHaDROJTNqsj7WVRqo0rANtoLuHeXfyEjBSjk6gYz4j xT24pq64xGiFNmZ9ArGcjFUHBW+UcI+vTbY4UPejlM96YkawLAkW2xoEpU/z2hD0 STgmQpdIkW3IX6l7wzvDuTBjxHX3i91IjokGt4RmIpjfkpWd/juCck9wy0mZTqtb d7gePj66hwY8qdeA95Phs33YKYDJpPEognbE4asO5ko9bQYdlW+ATEUyoWeeaqUK HF7qii/Okd2pgClSiS0au9mKoUnJjKuRx4Ypy09ihhAdqu4qTSi4DZ2u5gEjaEeh nRFsFoVf744meHnr+DrvtjLL71dcxOeH1ww6xOwo856iVJo1bXpFwt/9vyqlJLBe mwufcTxYKpSy0ghAbr0JyhUi+hp9aq8JoECtKcIdt79QTM4/hm9ij9ahjtKr3Sgg NyUzGXvI =6z09 -----END PGP SIGNATURE----- --G2OYmj9cSczDaGGa--