From patchwork Mon Jun 11 08:08:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 927521 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=caione.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EDh0bgjL"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 4145JN6zwZz9rxs for ; Mon, 11 Jun 2018 18:09:08 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9233AC21C57; Mon, 11 Jun 2018 08:08:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A6FD9C21CB6; Mon, 11 Jun 2018 08:08:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CDA16C21BE5; Mon, 11 Jun 2018 08:08:23 +0000 (UTC) Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by lists.denx.de (Postfix) with ESMTPS id 265ECC21C27 for ; Mon, 11 Jun 2018 08:08:23 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id x4-v6so11171023wro.11 for ; Mon, 11 Jun 2018 01:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=jFKvO2QS66fHmVXCyYy9/7XLylpCg5ImEYjSebps+C0=; b=EDh0bgjLEnDMWMqobozqbEVapZLx95moJO4OX7vkV96DheiRYrjklHKNa1YO+kMzB9 CjIUH+R9KT4zbkBhsQyJNJSC1DdKUViYzDeF5Pe+hultN5KnkI4OYiJGz8Ck6cC3WW0o X69yj+Dw1WY5lcTdHUoow1Wym7p3fNe4RRd3ul1/DFyWFZqquef+3roZXWiEOhiBNpSg IlwTionQe7p9rHqd0KxBXqjE/30EhbqJSCtYQ2viaMcqrEfIuO6szhxDX216u1ZsjDrO eCPKQtGrjhengwi+00UyY6DmYCI0wS/WKj5EiAdEeuzQu1mmlfqZnuLIWJdw4BSa6dld W0gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=jFKvO2QS66fHmVXCyYy9/7XLylpCg5ImEYjSebps+C0=; b=VYbYqbSKdCynv5ULEwTUSVPYFg4aDZ1+hohOgnh9rvK9SfvDA6v+jKysGQWSKF6tsP SDpLZIybKVcKi08AdXyHoiAJF27OekIEEGKM3Yokc9EEKqYDY2YTkr+3EIbYmcR4rbwp 4CttdRtEh/S46p0rYv3AciVMdVuoW+X6w69ZxAskDbN4l7XpPcvwNJpdLUrk42HDK2/y bgSye+G5Hjl4rkuJmi5aK2GMrr3kWl9BNPWb6GpWdNvNIj6pCVsMuDVMd39G51SPQmzk 4o+ODneOtukI5SmMCKx5cSC7+tECTI/iFiIEkeCuus/CVbK0W3agvHIkFOkPQJnCgBGi +T/g== X-Gm-Message-State: APt69E2aDDt1VGnfpBETmUiopgMhJe8LZbl7Kzot0StDsMmS9oh9akVD oHisO2WhKfBg2JW3fP9oKYg= X-Google-Smtp-Source: ADUXVKKr/VVZxSc1hXRuDwV8lZKZIItqcLpqBisgxyXkYPIii11W2eKy92qWMGKBO7cg91cheEnhiA== X-Received: by 2002:adf:b297:: with SMTP id g23-v6mr11655848wrd.218.1528704502814; Mon, 11 Jun 2018 01:08:22 -0700 (PDT) Received: from localhost.localdomain ([185.49.42.196]) by smtp.gmail.com with ESMTPSA id j13-v6sm63336802wre.38.2018.06.11.01.08.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 01:08:21 -0700 (PDT) From: Carlo Caione To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, albert.u.boot@aribaud.net, u-boot@lists.denx.de, linux@endlessm.com Date: Mon, 11 Jun 2018 09:08:10 +0100 Message-Id: <20180611080812.16786-2-carlo@caione.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180611080812.16786-1-carlo@caione.org> References: <20180611080812.16786-1-carlo@caione.org> Cc: Carlo Caione Subject: [U-Boot] [PATCH v2 1/3] rk3288: veyron: Init boot-on regulators X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Carlo Caione Use regulators_enable_boot_on() to init all the regulators with regulator-boot-on property. Signed-off-by: Carlo Caione Reviewed-by: Simon Glass Reviewed-by: Philipp Tomsich Acked-by: Philipp Tomsich --- arch/arm/mach-rockchip/rk3288-board.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index 8c128d4f94..0365793009 100644 --- a/arch/arm/mach-rockchip/rk3288-board.c +++ b/arch/arm/mach-rockchip/rk3288-board.c @@ -122,6 +122,12 @@ static int veyron_init(void) if (IS_ERR_VALUE(ret)) return ret; + ret = regulators_enable_boot_on(false); + if (ret) { + debug("%s: Cannot enable boot on regulators\n", __func__); + return ret; + } + return 0; } #endif From patchwork Mon Jun 11 08:08:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 927522 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=caione.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fOvExhl6"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 4145Js1KsSz9rxs for ; Mon, 11 Jun 2018 18:09:33 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D833DC21DA1; Mon, 11 Jun 2018 08:09:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5A031C21DD9; Mon, 11 Jun 2018 08:08:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BF877C21D56; Mon, 11 Jun 2018 08:08:25 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 96A72C21C27 for ; Mon, 11 Jun 2018 08:08:24 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id v131-v6so14574739wma.1 for ; Mon, 11 Jun 2018 01:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=g7BWMKpfJIj2RxckHtFtbiURf9/aY+eiTkbeT89ho/Q=; b=fOvExhl6ZUo7pCZysqfkBx/Ii5q3PQx6rSj4X2cQvJCoEgQdhIDOeuGRZO5RHfQqRA /ln8Yu6NIwOdrAr6OVZWAiXOw1pojGFlez0FcqlBqTI0dRZgBkVwxio6TNEnLSbOVV3E 8xf9P49ZyAywKNuTahFfdO+etvQMQTYJl/97pyWSbDOiB5qctKcVSPSKomcx87HCfO15 8yf49Fb++tzr78pjOelrM+nbq4Bo3J3hS5qEHhK0HHC5XtaGPWqUDZA0VMmb4DxUiQGP GD4PoWuEZlqd8CMakv2rbBy+KoUDi0eqCjWTRWbVOdMIdB26EXBXO+4pwGnIlJ+uDdbb Gq4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=g7BWMKpfJIj2RxckHtFtbiURf9/aY+eiTkbeT89ho/Q=; b=rycWFvGAGy/vlbpPo4FNMf+AZQ+6XgV2eYyD84UYuI2NkDhyT8/aCy44ROF0bWehlH SoC2QLsv7lIOOyc8y7q7G7KtuPRgnGyy1RsM2ZDd3hz8tIDDhe+4zkkWgMIo1WNt2x4x IU+zQOJa5SkGVZEKoQMXj2egZSD4kBX20Rpg/5T3zFPgntvlR8Iei6sjL9C2yUBSwZ5C JXtWyNrR1NYGqJJLjMR8jpY3H+BvMuV1LuJDjHWGm1InexOyqXH//Pk/g/IIYvPRXk61 7qj6pEYUDvUcX4cJzkMMsc7vTqn0nYVRtG3leBQyWoG0INKP1S4JSq+kGomyRCidlD95 1Pmg== X-Gm-Message-State: APt69E2NPJXnTm+3damtT4ELhHD0B1oqHmn0mogqKFkOGhsxFUe1iv20 musRRFxJDfLwbPUBFKd4pkk= X-Google-Smtp-Source: ADUXVKLRE8LcMssC3V8jGR3J+v/EBdc+V5u61vq3cY6B7ljYeW2maEB30HNpYEhsBo4dZNqWmzqhvg== X-Received: by 2002:a1c:1d10:: with SMTP id d16-v6mr7454368wmd.78.1528704504287; Mon, 11 Jun 2018 01:08:24 -0700 (PDT) Received: from localhost.localdomain ([185.49.42.196]) by smtp.gmail.com with ESMTPSA id j13-v6sm63336802wre.38.2018.06.11.01.08.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 01:08:23 -0700 (PDT) From: Carlo Caione To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, albert.u.boot@aribaud.net, u-boot@lists.denx.de, linux@endlessm.com Date: Mon, 11 Jun 2018 09:08:11 +0100 Message-Id: <20180611080812.16786-3-carlo@caione.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180611080812.16786-1-carlo@caione.org> References: <20180611080812.16786-1-carlo@caione.org> Cc: Carlo Caione Subject: [U-Boot] [PATCH v2 2/3] rk3288: Disable JTAG function from sdmmc0 IO X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Carlo Caione The GRF_SOC_CON0.grf_force_jtag bit is automatically set at boot and it is preventing the SDMMC to work correctly. Disable the JTAG function on the assumption that a working SD has higher priority over JTAG. Signed-off-by: Carlo Caione Reviewed-by: Simon Glass Reviewed-by: Philipp Tomsich Acked-by: Philipp Tomsich --- arch/arm/mach-rockchip/rk3288-board.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index 0365793009..bf24d8e074 100644 --- a/arch/arm/mach-rockchip/rk3288-board.c +++ b/arch/arm/mach-rockchip/rk3288-board.c @@ -307,6 +307,7 @@ U_BOOT_CMD( "" ); +#define GRF_SOC_CON0 0xff770244 #define GRF_SOC_CON2 0xff77024c int board_early_init_f(void) @@ -339,5 +340,11 @@ int board_early_init_f(void) } rk_setreg(GRF_SOC_CON2, 1 << 0); + /* + * Disable JTAG on sdmmc0 IO. The SDMMC won't work until this bit is + * cleared + */ + rk_clrreg(GRF_SOC_CON0, 1 << 12); + return 0; } From patchwork Mon Jun 11 08:08:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 927523 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=caione.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Y/l1qFS7"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 4145KD5Rsdz9s2t for ; Mon, 11 Jun 2018 18:09:52 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 73450C21DA1; Mon, 11 Jun 2018 08:09:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3435DC21E15; Mon, 11 Jun 2018 08:08:39 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 17C7EC21DC1; Mon, 11 Jun 2018 08:08:31 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id CC55AC21C27 for ; Mon, 11 Jun 2018 08:08:25 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id d2-v6so19296685wrm.10 for ; Mon, 11 Jun 2018 01:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=M6x2HiBOScP43XZjzcufDqjb/M40nln4XUePd7oCNi4=; b=Y/l1qFS7Dukkz6k5tHgRsptMz5WOdLvxemkl1JLqw4GKOC5yROUJS5cNRISnE3t4Ul AJAdKaHyB6JLmcGaAf800gEqAbhcKN7bHz6eYxA17Yi9QpLSUUKvrGnpL1x6P5JjVYn5 8Pq1qEC0QXUL7ec5N0r0o6Mja8zsdDAkM3DUU5so681GCOZ6xDxjZcKieHjagzQ9NcxY tUHDXVBUq4BQDmglzh/WFXsR+JtL9V9VMMuvoYweq4y6+cooPJs5OV2zVi/4vi2Pijr1 aREyrAEtdZh5GDbE1fOsKaauY430Q26nEuFmDa3u/RdA98G2IrPy+gMDP1aW0iTSJG8M AsAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=M6x2HiBOScP43XZjzcufDqjb/M40nln4XUePd7oCNi4=; b=itpaeU1qP1CdKqctXmx3zlQXMFXbfws2EBihKou/UArwkWy4Cv2EZbBGid5Eyee1Qi X2JVG3wpMXPspvWdIFMQJD080QvpPTsJfB9UcLsr3DTeV+9T49ZZwIQ0vzWObX6uDo27 AC5+k/yuE87vn71BX7g5+d6tkytOPjQqEHmb/1XmmLpfjE03Or3JQ+Va5EOwzllY1tjH Po41Ws2/rMfU0hMSbbGxSjMctWWTcNkBNd6WyJxb+tBxm+IdAiCp32RcPSa293EBiHLr iXgxbdj/sxxbPSViFmV0g7pF2plOrXe5v3UW6Ec/99S5ngiAwU87YB2/GMPWmbN9mbai 7VUA== X-Gm-Message-State: APt69E3BJ2iO/xY4mZT/ZZrD6SNONZqXFKK28/+TFNgryOFP7qWC9Au+ 4iW8kzI9hmpsCy7XB3w6c3MOWHod X-Google-Smtp-Source: ADUXVKLWIlFBwFDcYfJFocmLkZrbs/afYBS0czWCxHKpy/erLG89hGZv5sUD9I8KM2zqNx/gxNOF4Q== X-Received: by 2002:a5d:4a4d:: with SMTP id v13-v6mr8749631wrs.91.1528704505503; Mon, 11 Jun 2018 01:08:25 -0700 (PDT) Received: from localhost.localdomain ([185.49.42.196]) by smtp.gmail.com with ESMTPSA id j13-v6sm63336802wre.38.2018.06.11.01.08.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 01:08:24 -0700 (PDT) From: Carlo Caione To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, albert.u.boot@aribaud.net, u-boot@lists.denx.de, linux@endlessm.com Date: Mon, 11 Jun 2018 09:08:12 +0100 Message-Id: <20180611080812.16786-4-carlo@caione.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180611080812.16786-1-carlo@caione.org> References: <20180611080812.16786-1-carlo@caione.org> Cc: Carlo Caione Subject: [U-Boot] [PATCH v2 3/3] rockchip: veyron: Set vcc33_sd regulator value X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Carlo Caione On the veyron board the vcc33_sd regulator is used as vmmc-supply for the SD card. This regulator is powered in the MMC core during power on but its value is never actually set. In the veyron platform the reset value for the LDO output is 1.8V while the standard (min and max) value for this regulator defined in the DTS is 3.3V. When the MMC core enable the regulator without setting its value, the output is automatically set to 1.8V instead of 3.3V. With this patch we preemptively set the value to 3.3V. Signed-off-by: Carlo Caione Reviewed-by: Simon Glass Reviewed-by: Philipp Tomsich Acked-by: Philipp Tomsich --- arch/arm/mach-rockchip/rk3288-board.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index bf24d8e074..0e83c0a947 100644 --- a/arch/arm/mach-rockchip/rk3288-board.c +++ b/arch/arm/mach-rockchip/rk3288-board.c @@ -122,6 +122,16 @@ static int veyron_init(void) if (IS_ERR_VALUE(ret)) return ret; + ret = regulator_get_by_platname("vcc33_sd", &dev); + if (ret) { + debug("Cannot get regulator name\n"); + return ret; + } + + ret = regulator_set_value(dev, 3300000); + if (ret) + return ret; + ret = regulators_enable_boot_on(false); if (ret) { debug("%s: Cannot enable boot on regulators\n", __func__);