From patchwork Sat Feb 21 00:53:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 5858911 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4840C9F269 for ; Sat, 21 Feb 2015 00:54:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76E8520465 for ; Sat, 21 Feb 2015 00:54:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E1A72045B for ; Sat, 21 Feb 2015 00:54:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YOyKl-0007Gr-Vf; Sat, 21 Feb 2015 00:54:15 +0000 Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YOyKj-0006jY-6t for linux-rockchip@lists.infradead.org; Sat, 21 Feb 2015 00:54:14 +0000 Received: by iecvy18 with SMTP id vy18so11925418iec.6 for ; Fri, 20 Feb 2015 16:53:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=7r/Mm7NnyYiVv2iVkt6WZtmrxnUWI5GKpbWxO3kNMLs=; b=J2QCRdztYN8W+8oC9Ou2WKEGRmy4xTWMMqKj/8++So+mUvsmyV5jo6N0yjQNMwYYet H1twsf777AhbOv3Kf0F4S9MDGYz61gX38MPcHocAKpYX3eaPcGQJvUshUdU4u8ZuoOrR K2rp7NH6ERTlA3AMsewM1U6K1ocDS6lAusSss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7r/Mm7NnyYiVv2iVkt6WZtmrxnUWI5GKpbWxO3kNMLs=; b=dFPWBeQhSRDKvJNAeLmjS1PHV2Bm51gsrGgVa+C5d3n436Rra1FFaR6uVVGpGUasYc PSzDFm2+RfyZ9t24p8oX4qW8sgFWpOpggcq5G5i6CncZ4K6Bkf9vODWOKYYEHhfEACT8 pHpnvD0sTO1hrVqWHUTUeR2joxW0XS0hd05dcLZBRJXOgbuoummZlAxoJdYI3ZQkU74Q srHQFW9tieE/auB3doeIFqZmFoVAeV2FPXwiECFfzXV37WHWDfot0vZq2+gZN968Mn1Z EPuWeQvZRha+A9yP9UYHnChSjL8xMSNJSs2fEBoIlmNVskGWwEfWBc9i7lKSOvt6yUs6 168w== X-Gm-Message-State: ALoCoQm+2qxZ/KfLWukmbIupJpbTnzlT9P4qW7qsSIrMaJaY7uA0hcd8KCFCzncK381H5d8nbADR X-Received: by 10.50.43.169 with SMTP id x9mr158897igl.28.1424480031014; Fri, 20 Feb 2015 16:53:51 -0800 (PST) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by mx.google.com with ESMTPSA id qd2sm1931544igc.22.2015.02.20.16.53.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Feb 2015 16:53:50 -0800 (PST) From: Doug Anderson To: Mark Brown Subject: [PATCH] regulator: rk808: Set the enable time for LDOs Date: Fri, 20 Feb 2015 16:53:38 -0800 Message-Id: <1424480018-29298-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150220_165413_345260_884FBCD6 X-CRM114-Status: UNSURE ( 7.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Addy Ke , Alexandru Stan , linux-kernel@vger.kernel.org, Dmitry Torokhov , Doug Anderson , lgirdwood@gmail.com, linux-rockchip@lists.infradead.org, Chris Zhong , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The LDOs are documented in the rk808 datasheet to have a soft start time of 400us. Add that to the driver. If this time takes longer on a certain board the device tree should be able to override with "regulator-enable-ramp-delay". This fixes some dw_mmc probing problems (together with other patches posted to the mmc maiing lists) on rk3288. Signed-off-by: Doug Anderson --- drivers/regulator/rk808-regulator.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index 1f93b75..3fd4435 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -235,6 +235,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(0), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG2", @@ -249,6 +250,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(1), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG3", @@ -263,6 +265,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_BUCK4_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(2), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG4", @@ -277,6 +280,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(3), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG5", @@ -291,6 +295,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(4), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG6", @@ -305,6 +310,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(5), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG7", @@ -319,6 +325,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(6), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG8", @@ -333,6 +340,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(7), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "SWITCH_REG1",