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=-18.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 84417C4338F for ; Sun, 22 Aug 2021 08:40:13 +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 56A7F61284 for ; Sun, 22 Aug 2021 08:40:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 56A7F61284 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 9CD0A82E15; Sun, 22 Aug 2021 10:40:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1629621610; bh=9vcEy5C/+tC1ZTlG18ezvMHAdYQVhwLdZ2CAJJTKtr4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=Yd166Pkp8cLT/f7c9F5woTdZ/KnmrBqr1vEDWQLhHA1Gc8Bpb8Z1EEuntIrvEpcEa 9TU3vJ4UDlWfi8v6noSc10wvjWs+2Xg6HAl50u1hWQFi2n5J2CK8OZ1vdyhehMB/SC i2XW6Fb4Fezndhb7179I7y+23sn1NG7iuaKc6qG4mvDKx+ST7gXvqYuJtYm0qOj1N+ i28S6DvsMJ7GKUu0Ii8CbFi8NUB0gLMIDO0m2AAJbpGlBy1UaNNQxi1xwSb6W9leQ5 7/8lQQt1FUArFbTXbbpL2Fzvt/1XJyi8bSa3LioMCOdt/zhI+wKf8SVMLW0LsGDqN1 vMYXMKt9Zasag== Received: from [192.168.1.107] (82-131-153-206.pool.digikabel.hu [82.131.153.206]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: hs@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B87E982C7F; Sun, 22 Aug 2021 10:40:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1629621609; bh=9vcEy5C/+tC1ZTlG18ezvMHAdYQVhwLdZ2CAJJTKtr4=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=TuFHhkJqvV3Uuh2XTYE42y5Z60vL4Kcroj9kFCMmNiJZYP8DLTTyKxwBp3UCAN2Bc +h8+mDq+QrUmady1vaCssRTbw+1yCKgNiVOPa9dSa76WCJGA1ubFSGur+VDlQxkYvS nOtG/J2es7u/C9NY6GheX1hXXs7d5NsuIsgB+ydlYscIEtkgk63xTRXPefOC5w8ZAz 2iINmuu+9tNDknSJ4UUNJWJJHqoJio1l6Mt5i5SiCWiBta+Fo6QJ4aJwTCy0KFBeVJ q2Xds//3BlugqorHxrF5atztymB2FLZ3aoxSDACbh1tod70JF8Fx8q8WSyeIoPYaLx 56JcSGfhv8AyQ== Subject: Re: [PATCH 02/11] i2c: Add a DM_I2C wrapper for the sun8i_rsb controller To: Samuel Holland , u-boot@lists.denx.de, Jagan Teki , Andre Przywara Cc: Jaehoon Chung , Anatolij Gustschin , Arnaud Ferraris , Bharat Gooty , Igor Opaniuk , Jernej Skrabec , Minkyu Kang , Rayagonda Kokatanur , Simon Glass , Stephan Gerhold , Tim Harvey , Tom Rini References: <20210821230520.10051-1-samuel@sholland.org> <20210821230520.10051-3-samuel@sholland.org> From: Heiko Schocher Message-ID: Date: Sun, 22 Aug 2021 10:40:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210821230520.10051-3-samuel@sholland.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Reply-To: hs@denx.de 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 Hello Samuel, On 22.08.21 01:05, Samuel Holland wrote: > This bus controller is used to communicate with an X-Powers AXP PMIC. > Currently, various drivers access PMIC registers through a platform- > specific non-DM "pmic_bus" interface, which depends on the legacy I2C > framework. In order to convert those drivers to use DM_PMIC, this bus > needs a DM_I2C driver. > > Since the non-DM bus controller driver is still needed in SPL, the quick > solution is to implement the DM_I2C ops using the existing functions. > > The register for switching between I2C/P2WI/RSB mode is the same across > all PMIC variants, so move that to the common header. > > There are only a couple of pairs of hardware/runtime addresses used > across all PMIC variants. So far the code expected only the "primary" > pair, but some PMICs like the AXP305 and AXP805 use the secondary pair, > so add support for that to the DM driver as well. > > Signed-off-by: Samuel Holland > --- > > arch/arm/mach-sunxi/Kconfig | 8 ---- > arch/arm/mach-sunxi/pmic_bus.c | 11 ++--- > drivers/i2c/Kconfig | 8 ++++ > drivers/i2c/Makefile | 1 + > drivers/i2c/sun8i_rsb.c | 86 ++++++++++++++++++++++++++++++++++ > include/axp_pmic.h | 6 +++ > 6 files changed, 105 insertions(+), 15 deletions(-) > create mode 100644 drivers/i2c/sun8i_rsb.c Same comments as for path 1 of this series, beside of this: Reviewed-by: Heiko Schocher bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de