From patchwork Thu Aug 11 18:57:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 1665686 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M3bdp0JDHz9sFs for ; Fri, 12 Aug 2022 04:57:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2D6ED84904; Thu, 11 Aug 2022 20:57:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 1441284971; Thu, 11 Aug 2022 20:57:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from finn.localdomain (finn.gateworks.com [108.161.129.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3673884832 for ; Thu, 11 Aug 2022 20:57:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: from 068-189-091-139.biz.spectrum.com ([68.189.91.139] helo=tharvey.pdc.gateworks.com) by finn.localdomain with esmtp (Exim 4.93) (envelope-from ) id 1oMDMg-00Fom0-J8; Thu, 11 Aug 2022 18:57:06 +0000 From: Tim Harvey To: Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" , u-boot@lists.denx.de Cc: Tim Harvey , Fabio Estevam , Jaehoon Chung Subject: [PATCH v3] board: gateworks: venice: add GW7903 PMIC Date: Thu, 11 Aug 2022 11:57:04 -0700 Message-Id: <20220811185704.3992368-1-tharvey@gateworks.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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.6 at phobos.denx.de X-Virus-Status: Clean The GW7903 has a BD71847 PMIC on I2C1. Adjust the model compare strings to add it. Signed-off-by: Tim Harvey Reviewed-by: Fabio Estevam Reviewed-by: Jaehoon Chung --- v3: add Jaehoon's Reviewed-By tag v2: fixed typo in commit log and added Fabio's rb tag --- board/gateworks/venice/spl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c index 4c0feb4381c9..914a56a96f52 100644 --- a/board/gateworks/venice/spl.c +++ b/board/gateworks/venice/spl.c @@ -173,11 +173,12 @@ static int power_init_board(void) } else if ((!strncmp(model, "GW7901", 6)) || - (!strncmp(model, "GW7902", 6))) { - if (!strncmp(model, "GW7901", 6)) - ret = uclass_get_device_by_seq(UCLASS_I2C, 1, &bus); - else + (!strncmp(model, "GW7902", 6)) || + (!strncmp(model, "GW7903", 6))) { + if (!strncmp(model, "GW7902", 6)) ret = uclass_get_device_by_seq(UCLASS_I2C, 0, &bus); + else + ret = uclass_get_device_by_seq(UCLASS_I2C, 1, &bus); if (ret) { printf("PMIC : failed I2C2 probe: %d\n", ret); return ret;