From patchwork Thu Oct 1 12:34:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 11811415 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D1966CA for ; Thu, 1 Oct 2020 12:35:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 679F7208B6 for ; Thu, 1 Oct 2020 12:35:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Yos2pfNj"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mysnt.onmicrosoft.com header.i=@mysnt.onmicrosoft.com header.b="n7knwmD7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 679F7208B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kontron.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=uAX40W25zcUM3WBkTdVXdXIDiThl0LcgS/OCSjSlcSQ=; b=Yos2pfNjSVbJn/YMTiQLMH9akC n5IMLH22E0YDaVbSOBtAZrKJfsILsSOJ/GgwgHkwJnUMguPF9VmiISx8VA2PxeKgrGfkEttXOmx3p 2oBnWGq4gqSOvI2uYKYfcvOPOYdjqS9tfyvaP27DZK+/ks/CouZH4YS+G1hsvuiSGAQiATivNMzar JwPILEClaFWiG6W+iYWDYd+LzFBwjt7WEvwi2lh2Q3WLrr4vThZo2KBTSFWh6GOVBwjUrNcSEpFcB r2K0SPjRE9E8+po6dq9nfit82TcG8Dl3fb+k4QJcoHDp4DmyA9EtsRNj9ECH811qc0ObL8XdQii+u o6wHomNg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNxnq-0004E9-Gs; Thu, 01 Oct 2020 12:35:18 +0000 Received: from mail-eopbgr150127.outbound.protection.outlook.com ([40.107.15.127] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNxnn-0004DS-DV for linux-arm-kernel@lists.infradead.org; Thu, 01 Oct 2020 12:35:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i2DfCL/fIRoXMQeoUm6q8tKqjjWK+K9FQcDUDYxCKfIWG7303Wuv83Oq6QWdQU8U5RPVpci1vdPnrcF9ugikjTvYQnM4H1trY1IGENDWMrhHfWjKw4vARL4YIq/F5VjeI/Ayb2UV9/jwIm/2tvY2sG/VIf+GTjf/+bSL5+fRVHXLsTXATcK53H1eUcqE3cYlmPjsmcv9ZH3ZvqsRvdscnAVWpjzSKco9LegM4FieSLFYLtaxXvKk6lHHIs20d8cQ1aVxStBxtmPXWK/1CDFzeD0W9YzkfYeSAhSorkS+pGDs1hsEeULvkg/VSpJvcnWg62oGprvSGgG4WNRYBL4QzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z+y5ChoAOR2C4HfBoMc5WIJOfWlVfHUYy34gOsImJU4=; b=j0qWxocZrS6vKQ8R6VoezUbDR0RAShzNVe9N5oYAhwAkoEw4L66o8xiHf3Swm3vd+NNPhqcHu1ZTm5+mt7VPRH6175SSZbB72CXogtTI/rjwggWPqJZxgt1wwl23tRyydhJVSTUS99CoAoWZOeyz0edoPvVKlf43jw2eNnUv2hzBzUUG9lv+cdrOdFAxF/Fz59I8tRPBXf7ys6gFhaCr31PP8zDHzuBqxZtrUFrxIu/nvtyNB4+G5Z42K2oeoQTphBgU/yW/rgSoK6Q9BslXLAIrnRLohoEQMQj4r6m7QWo9arDv/0AtmAj4uT6jesHlA3bENu8cYYleZRvMGZ3nBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kontron.de; dmarc=pass action=none header.from=kontron.de; dkim=pass header.d=kontron.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mysnt.onmicrosoft.com; s=selector2-mysnt-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z+y5ChoAOR2C4HfBoMc5WIJOfWlVfHUYy34gOsImJU4=; b=n7knwmD7U+sUYOiNA5vKtth8QYASOvyx5J9ugDtyOBJfmfTc9TBUBTMVXif8uJFjPZOURROaNDc2m3ilD1uCDiWsqx88VGPdpVAk2dkqzdccJMCk51jVlPSKHVLhWpFbkQw3uF7GguiN5NZY+ZZvwDEa9yF+8/WpVQATZpRC3QY= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=kontron.de; Received: from AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:157::14) by AM0PR10MB3252.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:17f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35; Thu, 1 Oct 2020 12:35:13 +0000 Received: from AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM ([fe80::852:b8d:8b04:d2f5]) by AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM ([fe80::852:b8d:8b04:d2f5%6]) with mapi id 15.20.3433.032; Thu, 1 Oct 2020 12:35:13 +0000 From: Schrempf Frieder To: Robin Gong , Fabio Estevam , Frieder Schrempf , Liam Girdwood , Mark Brown , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo Subject: [PATCH 1/2] regulator: pca9450: Add SD_VSEL GPIO for LDO5 Date: Thu, 1 Oct 2020 14:34:31 +0200 Message-Id: <20201001123447.1610-1-frieder.schrempf@kontron.de> X-Mailer: git-send-email 2.17.1 X-Originating-IP: [89.247.42.197] X-ClientProxiedBy: AM5P194CA0018.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::28) To AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:157::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fs-work.localdomain (89.247.42.197) by AM5P194CA0018.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Thu, 1 Oct 2020 12:35:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 19f4b365-3c22-48d0-c9cb-08d86606713d X-MS-TrafficTypeDiagnostic: AM0PR10MB3252: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IqKOQH8kIiCdNNzUVR2wORUCF8ekArVKc2TFRkdJ3Ievx2BWnZluj8icwBn37rJozT2nLuV/MA4qY8lzAIhRwEvH1ySptq4eOdQTrbtXJ5NK5QdNk9GatFs7nqHVZItAFFRgsZnKHmUoB6zpmpTLfk+CAMJOMNHc1hKHUtN72q2T2lIenXKLyfwD+3GU8K4Ce5hsF0SbgVVmD6Uh6YJKuLLcu6Crqti1b9otu8PFFb2liY9UvSxHHZRoUX2O8wvBt/B+O6XhdcHLMYKFWEgJXjway+oW+V5TWVKiphSCkwzynjIgC46dG1D140Nwy10HQPMbi+XYTYQV2AvD5N9zew== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(376002)(39850400004)(366004)(396003)(346002)(136003)(66476007)(66556008)(6512007)(8676002)(186003)(110136005)(16526019)(478600001)(52116002)(1076003)(4326008)(86362001)(316002)(2906002)(8936002)(36756003)(956004)(6506007)(2616005)(7416002)(6666004)(5660300002)(6486002)(26005)(66946007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: QPK2FMe8+GoQsZ/UAl9owNF/vrxmHWujmE/wdKPs6XIZolhDnsyxx58m5f1q/HUOtjwKztovs4nLRcb4GEdRieOePI9usm84VndHQNVRgXDXsIvCKt1NautDlocchRKJPsu0E8HtZyZeXAzF5CtqaIL7Xwzq/W7jxspayrp/eEfvAjpaFY983DGJ/VXt4a2VsuL7a/wo13dcWVJhF93Pf/kWPd1NtC+Z1wE+cet7j8tL91L/lhUP2t64TmrjSPMbkIFJW1hZ+Vtg7Iu6mVCxZL8aC4g3wmJlnRuYs7JhwzS9Cvfxk6tGM1K2Nz/1yfbScFPKStYGJSiAXF8bPzMU+8ITKre+hjau07UdJWT1jfhAlr+pEIf2TFUZF5bz7Gw82UJCTqau6sWQb+KD3ZC2YA3K49RVDHwlHXC4Qz73vOhb/4qz5Q0YisSzljDM0Q4cnRB8jCK1jDMtS91UvEM3/TFaIsn0PColoZf7yiVN2LIsu0Id/gRK574IErl+aZ0nKY+rEGirSjQ8W+xvlsIBMW+i1u+1Rv+jN9PGI+mHmWXFmz0ljn5cLoEQ+930GXsYm4swTAYoIcJG5lawe3yQZE0pEKm8moKfUVCm5aJnUexHc5QsNE8o25pj8cKlQa/X01atiE8iU3uKV3uljtuQSQ== X-OriginatorOrg: kontron.de X-MS-Exchange-CrossTenant-Network-Message-Id: 19f4b365-3c22-48d0-c9cb-08d86606713d X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2020 12:35:13.0385 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8c9d3c97-3fd9-41c8-a2b1-646f3942daf1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wKBj/jaQD++fL0Yi90+yu6BHEXNAEj6N0zsxiO/ogoxZ/7LNXy9cUdayZGAgF5rO/hX62IWWuEV4ablJUTmIFetWk19Ayf+KRmniN/N0BvE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR10MB3252 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201001_083515_462004_0091E699 X-CRM114-Status: GOOD ( 19.24 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.15.127 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.15.127 listed in wl.mailspike.net] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Frieder Schrempf LDO5 has two separate control registers. LDO5CTRL_L is used if the input signal SD_VSEL is low and LDO5CTRL_H if it is high. The current driver implementation only uses LDO5CTRL_H. To make this work on boards that have SD_VSEL connected to a GPIO, we add support for specifying an optional GPIO and setting it to high at probe time. In the future we might also want to add support for boards that have SD_VSEL set to a fixed low level. In this case we need to change the driver to be able to use the LDO5CTRL_L register. Signed-off-by: Frieder Schrempf --- drivers/regulator/pca9450-regulator.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c index eb5822bf53e0..fec7acc606f4 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -32,6 +33,7 @@ struct pca9450_regulator_desc { struct pca9450 { struct device *dev; struct regmap *regmap; + struct gpio_desc *sd_vsel_gpio; enum pca9450_chip_type type; unsigned int rcnt; int irq; @@ -795,6 +797,18 @@ static int pca9450_i2c_probe(struct i2c_client *i2c, return ret; } + /* + * The driver uses the LDO5CTRL_H register to control the LDO5 regulator. + * This is only valid if the SD_VSEL input of the PMIC is high. Let's + * check if the pin is available as GPIO and set it to high. + */ + pca9450->sd_vsel_gpio = gpiod_get_optional(pca9450->dev, "sd-vsel", GPIOD_OUT_HIGH); + + if (IS_ERR(pca9450->sd_vsel_gpio)) { + dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n"); + return ret; + } + dev_info(&i2c->dev, "%s probed.\n", type == PCA9450_TYPE_PCA9450A ? "pca9450a" : "pca9450bc"); From patchwork Thu Oct 1 12:34:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 11811417 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C280C112C for ; Thu, 1 Oct 2020 12:35:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9209C208B6 for ; Thu, 1 Oct 2020 12:35:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tcBQM7hL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mysnt.onmicrosoft.com header.i=@mysnt.onmicrosoft.com header.b="L6wOUxwm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9209C208B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kontron.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5fFZal7PYhdFCW1WRQ7C51sQxA8D/P8+6U6aB2N3mu8=; b=tcBQM7hLLQLukW91s71E4HVu3 ksAY2eQqWTOMrzTyM7D3Y+s8IMZDonhEaQoHaAr4evwhQBDKvEUnInYvx7iYOir5Se1jj0GDonRqm p0Azx9yRfTaS3eNNVpSBw2OUuYjcsjGrgv5VIsGf1rvR01e7Fx+CeMD8O6fuXLk38xwgxJVYAxMW2 1vHuXQA18L/sWlejVsQ31oRUQIxXdlH+e9W91W763/bgR7ZSsS9ByU/1nePjXqrbYxdEcWxE1+piW UuQgtmN/j9nctEYwkuhbTk/pkyf/WUvpHlzcBo2ZS3qtN+sx/w80mqRTmuJ/s/ZeZkrUbCWrrNMtS H2SaIJphA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNxo5-0004GX-F5; Thu, 01 Oct 2020 12:35:33 +0000 Received: from mail-eopbgr40090.outbound.protection.outlook.com ([40.107.4.90] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNxo2-0004Fq-KU for linux-arm-kernel@lists.infradead.org; Thu, 01 Oct 2020 12:35:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1XjsLIpV16+CtU63cZeezT5G7j/ASlH0GEXmdTQOVpQKm8i3nLyBFsjTK6/lTQLs7HCXOT7hoX/eaNskLYirbJxHqZzQjLAjcdUS0+wr93LWOkdT145ftHJ5RGLSI7BK3Y8NDZn4cS8oHJZnH6jkgCNlNAlhkKiwVxudHvcid2lyWx/a1j65vl8DdrO2eXr0FecPz7+201PpClEg0AbBSeouKVwPbElsE2jggkzYFnwrOboY+BC+nvUMlhgoAWe6wU8gmxgjT0b5AAkfECvg5OGodgw+ebz/mZdVndrUoE3YBUgvOVfvbROlwKYddsNqirbSrRnjwhknuQKHfDgIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K8H0nsuVC5lXYgYk1R4oJ+4SBOUI4YRWtcO5cUaodd0=; b=SA1D+i+XZCWXdFNQhtIig30mb51phEVhYfKR0dh7E2VJ7JqSH2A14PccxU/VvdwOAs5kOLPaH952O6pKi2mrQheXxAEtiBh3J93XnyJIT3O30xgJ7OMtN52ynZDIWKJaXhpCMbxXe0HX5cnf+dLzI8mAGo7JcE4dtTkyelQvIqYLtsRsYDlAvp5e3cB037ga48EtyqiSGoqAzZlo48y0FFPIC55qMl6Q3VI57sKZUVK7ULWE/zetylJTVXalJKdNw7OB/JYnOhhX3cn+N7MdsrmJUfGMJmWQNNw4oVaRf5Mnhvb2vqCPRdRQP6138SClolfi6rAJlLKKjweIsJrxLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kontron.de; dmarc=pass action=none header.from=kontron.de; dkim=pass header.d=kontron.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mysnt.onmicrosoft.com; s=selector2-mysnt-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K8H0nsuVC5lXYgYk1R4oJ+4SBOUI4YRWtcO5cUaodd0=; b=L6wOUxwmcYIEh6yg48wvllkNPD8XVggd4dc3mCQ9a1QZqica93lJ2P3/PVkeX4J8Ksr33+6v7VF3vqo47DiHrA3OMbPF6PezqsQK7+8gr5oKdYixfHSoA+RkP3ITmyLICwUAB2VUr4eMyeVmn8Sk35YMvsDUNChfCGln9kWVkrk= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=kontron.de; Received: from AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:157::14) by AM0PR10MB3252.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:17f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35; Thu, 1 Oct 2020 12:35:27 +0000 Received: from AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM ([fe80::852:b8d:8b04:d2f5]) by AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM ([fe80::852:b8d:8b04:d2f5%6]) with mapi id 15.20.3433.032; Thu, 1 Oct 2020 12:35:27 +0000 From: Schrempf Frieder To: Robin Gong , Fabio Estevam , Frieder Schrempf , Liam Girdwood , Mark Brown , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo Subject: [PATCH 2/2] arm64: dts: imx8mm-kontron: Add support for ultra high speed modes on SD card Date: Thu, 1 Oct 2020 14:34:32 +0200 Message-Id: <20201001123447.1610-2-frieder.schrempf@kontron.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001123447.1610-1-frieder.schrempf@kontron.de> References: <20201001123447.1610-1-frieder.schrempf@kontron.de> X-Originating-IP: [89.247.42.197] X-ClientProxiedBy: AM5P194CA0018.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::28) To AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:157::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fs-work.localdomain (89.247.42.197) by AM5P194CA0018.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Thu, 1 Oct 2020 12:35:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 13949782-2a40-4b66-c58e-08d866067a07 X-MS-TrafficTypeDiagnostic: AM0PR10MB3252: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wnjiXUuvVVlsIkV6DDT8aTI9QXUt/DEzQ9qjzwrD4OXCv8vqHVWh2LkfLiGC7VJB3pBYoW3hXYZbNdsxmP4TaDOpu31w1aP03+mSMtfqGnzb/rlFnqtxy7FMa8SXS2DDRxASsn77yzDM7w+gULYW/6WUdKmPZ3LmtwuR90F82qRFdhsQcSzak4Yn5s8bJ4yAfkNs2NN84JtAlPyetPWoiAUmcOen3dSSn8oMRR0eIVtnIUr+KSbawRXHapJyrgz2v0y11VDR+KbYX91IgqsHaQmMIDFZMnG0wqIvtS9FUA9D0/EhqBy1OOwDxt+wfGCwO2B/nTL059GCAjTTynGbwqhktJowTiMuhSyZwfm1U70FBHbuyiTor5xMxYCpo4cX X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(396003)(346002)(39860400002)(136003)(66476007)(66556008)(6512007)(8676002)(186003)(110136005)(16526019)(478600001)(52116002)(1076003)(4326008)(86362001)(316002)(2906002)(8936002)(36756003)(956004)(6506007)(2616005)(83380400001)(7416002)(6666004)(5660300002)(6486002)(26005)(66946007)(32563001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: vvy74Ctw9dbuCrvvBVCME1qHifK8uYBJZipdDi8Nu7b+FVqiNTAxE+7ICfOn3ManfI0fYAYr2VYvLKlaLXWXI5UoFA9AWTuyoJvsgH83u/dcuBD9ancygyOfE7+eOItxOujWhcH4jJsWh1TAuF1FmW90gBKh67kkwWI+SuQdKQgOHWAEAYIHIrZ1lwkNEmP0NliKDbWivXuBvoFMmHqkX/Kfg6GRgQgUeZDGuSCYF+fF+VeCuY8WhSYYTuHlKKvdhVIFp9XZBLDkdN/VNibBHS2d+pUVhnEZMkGeiUkvpg1wRu5hGnMkH1aeknaRmeOUpbpwarLlA01xG6RUmAYCHF4QPICC1qzsjy2RNsnMJldaTcZGfx3NavdASh9ztixWonrBGsmFnzD/JOHhKb0mh1zuWH78n+aYR9N15zhvX0qGlGKn8V5Gj4cC9jwixlP76tBWinv4yEKykuGE7qhXEfDMXwwoSplDnFnQFxOUe4H9DS6t5YJrW5/+Z34HLVuZrgzHCLHroOC1BvhgACPO0NaTcTgrePlbCB/i0NDl5dKFzGWlLBjepSCGIrKefVKY8SPgomm8OmAiAsBqJthJCX5oKsTZSepGgbAT3/HD1f3TiSz8crZwAD7oAiAfZl/A8Nwz39HACwBOXvZafZuCZQ== X-OriginatorOrg: kontron.de X-MS-Exchange-CrossTenant-Network-Message-Id: 13949782-2a40-4b66-c58e-08d866067a07 X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB2963.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2020 12:35:27.7640 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8c9d3c97-3fd9-41c8-a2b1-646f3942daf1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CixBiwKkwhjjdDXwYJIXn0UCfa3dFD3sO1fTskXQh4xdRHsvXVW9Dlq5w/vYPWY6/i/mZ4XOHj+0oPBuDWbDNBdbZElzVOhaM8l+zWCG8W0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR10MB3252 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201001_083530_706497_2464973B X-CRM114-Status: GOOD ( 13.05 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.4.90 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.4.90 listed in wl.mailspike.net] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Frieder Schrempf In order to use ultra high speed modes (UHS) on the SD card slot, we add matching pinctrls and fix the voltage switching for LDO5 of the PMIC, by providing the SD_VSEL pin as GPIO to the PMIC driver. Signed-off-by: Frieder Schrempf --- .../dts/freescale/imx8mm-kontron-n801x-s.dts | 27 +++++++++++++++++++ .../freescale/imx8mm-kontron-n801x-som.dtsi | 2 ++ 2 files changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts index 389e735b2880..6913aefa56aa 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts @@ -190,8 +190,11 @@ }; &usdhc2 { + pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usdhc2>; + pinctrl-1 = <&pinctrl_usdhc2_100mhz>; + pinctrl-2 = <&pinctrl_usdhc2_200mhz>; vmmc-supply = <®_vdd_3v3>; vqmmc-supply = <®_nvcc_sd>; cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; @@ -320,4 +323,28 @@ MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 >; }; + + pinctrl_usdhc2_100mhz: usdhc2grp100mhz { + fsl,pins = < + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194 + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4 + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4 + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4 + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4 + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4 + MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 + >; + }; + + pinctrl_usdhc2_200mhz: usdhc2grp200mhz { + fsl,pins = < + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196 + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6 + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6 + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6 + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6 + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6 + MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 + >; + }; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi index 5c6a660f4395..282a56fb3949 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi @@ -85,6 +85,7 @@ pinctrl-0 = <&pinctrl_pmic>; interrupt-parent = <&gpio1>; interrupts = <0 GPIO_ACTIVE_LOW>; + sd-vsel-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; regulators { reg_vdd_soc: BUCK1 { @@ -224,6 +225,7 @@ pinctrl_pmic: pmicgrp { fsl,pins = < MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x41 + MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4 0x41 >; };