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 A28A6C77B7E for ; Thu, 25 May 2023 13:27:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F3C4C860B6; Thu, 25 May 2023 15:27:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xff.cz 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; secure) header.d=xff.cz header.i=@xff.cz header.b="VUaoPiQ4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ABF77860B9; Thu, 25 May 2023 15:27:13 +0200 (CEST) Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (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 5D818860A8 for ; Thu, 25 May 2023 15:27:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=megi@xff.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1685021230; bh=ZPNROnNs6G91zmn0o2rO17FzC13nx8rp0Yd47utTQFQ=; h=From:To:Cc:Subject:Date:From; b=VUaoPiQ4kQSPl12han6C2PJYXNlZy8HRe08u2/y/0bjcjnDRArwASfFqCUhDiUVCR Z6v6N+tAWqbdmauzEsmpICFKX5wkKen6mr+p62hh7AB+DOOA3QAxboMr9QIl5a6bHw CdRUQYnLTk2FqHTcXefCEUg7R8NL9qbKlevEhJK8= From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= To: u-boot@lists.denx.de Cc: Ondrej Jirman , Kever Yang Subject: [PATCH] pinephone-pro: Fix I/O port voltage (GPIO3D4A is 1.8V) Date: Thu, 25 May 2023 15:27:08 +0200 Message-Id: <20230525132708.855753-1-megi@xff.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.8 at phobos.denx.de X-Virus-Status: Clean From: Ondrej Jirman This fixes access to camera sensor over I2C during probe time in the kernel. (Kernel will fix I/0 port voltage by itself, but the timing depends on probe order of the drivers, so the fix can come after the camera sensor driver already failed to probe.) Signed-off-by: Ondrej Jirman Cc: Kever Yang --- board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c b/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c index eb639cd0d070..b6ccbb9c1c4b 100644 --- a/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c +++ b/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c @@ -15,7 +15,8 @@ #include #include -#define GRF_IO_VSEL_BT565_SHIFT 0 +#define GRF_IO_VSEL_BT565_GPIO2AB 1 +#define GRF_IO_VSEL_AUDIO_GPIO3D4A 2 #define PMUGRF_CON0_VSEL_SHIFT 8 #ifndef CONFIG_SPL_BUILD @@ -48,7 +49,8 @@ static void setup_iodomain(void) syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); /* BT565 is in 1.8v domain */ - rk_setreg(&grf->io_vsel, 1 << GRF_IO_VSEL_BT565_SHIFT); + rk_setreg(&grf->io_vsel, + GRF_IO_VSEL_BT565_GPIO2AB | GRF_IO_VSEL_AUDIO_GPIO3D4A); /* Set GPIO1 1.8v/3.0v source select to PMU1830_VOL */ rk_setreg(&pmugrf->soc_con0, 1 << PMUGRF_CON0_VSEL_SHIFT); -- 2.40.1