From patchwork Fri Jul 3 16:19:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11641083 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 2E512913 for ; Fri, 3 Jul 2020 08:06:40 +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 06524206A1 for ; Fri, 3 Jul 2020 08:06:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PJi1cDQQ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="qYGm9IIY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06524206A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com 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=+ECcgOVX0FzFqA95J5DjbvCFk+LVI81pgTnpSW3X/NA=; b=PJi1cDQQkbaAjuBKYogSDWGV72 3qL/XKqGSnp8PWDESjxDO12qXkni7n8RA+vngWf+Pvl0njKitToiiTPn9XVaN6L6lmpJTqyZO5Ebn x07Te4m9zjJ8SCyFlpLwtVmIT+QvNnjnP6aETsE1lpAro7o/iBEUVAlhvXna7LCRmYvdspSrgWgnx aJaxiGnhJ7QrbKh5l6co3lNsmBefhErV+WvPcmX7sjk3WjMXpZrCgsrU7EhMfNWRFYqr2Zsi2qrmy S1GOVEX22C6GR2+RLVsnukif0hLzWdD4i55SZ4TL2GTR/kOhLLSBAfEkEok4zQV3IoHJPzdsY9BpW RiNCZOTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrGh8-0001R9-ST; Fri, 03 Jul 2020 08:05:14 +0000 Received: from mail-eopbgr70057.outbound.protection.outlook.com ([40.107.7.57] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrGh6-0001QZ-4n for linux-arm-kernel@lists.infradead.org; Fri, 03 Jul 2020 08:05:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gXL1Xlm1RCCUTayErmyu4PixQlHz+Ldm7Q6KIBqX8q28Gunlp8LXCcPhOC69thHAzexpp3IPZvz25hLC1VC0kVT4YUbMkvSuRK07DAOAa1R0Tmb4ravCbT8Oo+IxRvLK+NFJpNc9VlzmLkCPp5ks7WivimSYl6xAfzyamjqRN/012nT6/zt8cU+ex11twZ0w94ne7SrhhbWOsFUchgtTk7gnTTEhV4e451Y5KUm0zjP3hsZ5MyqvzOTB3IXD7G9gVC+YWl73yGZebmbJ3so28sggrw3PJzjQjfnVg9oXCgnMTFKkShP8lquN9xdBfhv7lf//b2bgJvCXw22xTR89ew== 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=5hKDHVdEFh+XLT+WfauAQN6QP95BbRDFSK/AOpxxLEI=; b=kLYgZdEkReUo/GYB2WVJpkaB/Ad2zLOmECqp0htXee59VblVlgIiPxN98LarCK4CXhV2iUZ+ea2X0rw3a3CnZBzo2RN9AAm71Wx8P3WraBnqB8t4KzOJHrKVadtOD2BV4bWxmhSQvbjBdpQ42MHX4n6wNDLuh1K6UuOl9hhV2NnHxEWnUVlP/yZeTJ5OFdDiF0YK3r6oSGvsxbdbvw1ZVYVuLCYwJ7fIoJJmTNtWAa6CrR6ECdK2VOUMZIBKhUdOAqhSQdV+ehkCnwKSmIZ94ShnJDCK7Obvh3oc/anMG4uD47Olta8tk0Db138s8nuz5Sd6H9bonZkAGcZklCQ1zA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5hKDHVdEFh+XLT+WfauAQN6QP95BbRDFSK/AOpxxLEI=; b=qYGm9IIYcPi/N+p9crsq0pkmHTHEz3zmemN8HK7HB2J5UFDwTfUsUNSEell5svlPIoLErT2G8K5fO3q/iNx1t5M4AD/T5uhbCDzaf1KnXZIb5Wpa2YIl9pyibwdQf8yTfHrZAA7EdIQZcYkAp+FOhCrRAUocIdY0irSKV5EikOk= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VI1PR0401MB2302.eurprd04.prod.outlook.com (2603:10a6:800:2b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Fri, 3 Jul 2020 08:05:07 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::5cc4:23a5:ca17:da7d]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::5cc4:23a5:ca17:da7d%6]) with mapi id 15.20.3153.028; Fri, 3 Jul 2020 08:05:07 +0000 From: Robin Gong To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, frieder.schrempf@kontron.de, catalin.marinas@arm.com, will@kernel.org, shawnguo@kernel.org, anson.huang@nxp.com, festevam@gmail.com, s.hauer@pengutronix.de, john.lee@nxp.com Subject: [PATCH v2 0/4] Add pca9450 driver Date: Sat, 4 Jul 2020 00:19:34 +0800 Message-Id: <1593793178-9737-1-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 X-ClientProxiedBy: SG2PR01CA0160.apcprd01.prod.exchangelabs.com (2603:1096:4:28::16) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2PR01CA0160.apcprd01.prod.exchangelabs.com (2603:1096:4:28::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3153.21 via Frontend Transport; Fri, 3 Jul 2020 08:04:58 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 60f9c235-1c5c-443d-73f5-08d81f27cc7e X-MS-TrafficTypeDiagnostic: VI1PR0401MB2302: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 045315E1EE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KG1IOjRfIny4x482PXg7vGl46dKKjXSVR/4+1275OCE/l3JZ1XBShkzPUieprxvoeaPC0nveNBdWI6bg40Tq4ekAuToiJJAryWIMLKRa/OowczZfpk1o3tHRCdi1k3k3Il8ofz9OLk6hzu+uUa0vofVEKdCheAtZKp5sxD9iVwVX9mBj/1Skks1HKACbZnrWheG+ojAGG8B2PBMp07du+Gu+HRiILigoTgn6Mych/DpgRmV94SasjznNLZmy/dSZKofmgDuCO3ntDhfZrmWx64c6dqsBfOL24BS4uVQk9YiUwLynYC0vqYm8PSh8ELCSVmPb8cXSTOLXMtQMK/NaQcl7bFz1Shh5MkHLCMLzzCzKsX4dc0mCDeSJj8Klaam1YD5RArQmQ3loptc9hfEcDtx6hYrs3w6GOuTnjdTHiU3xRIHkqzUPTMcoIdCmJFMNTWfh6rAe4RF4Yi4FP38dvw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6638.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(136003)(346002)(376002)(39860400002)(366004)(7416002)(6512007)(8676002)(6636002)(6666004)(8936002)(86362001)(52116002)(478600001)(5660300002)(16526019)(316002)(6506007)(2906002)(966005)(4326008)(2616005)(66556008)(26005)(186003)(66946007)(36756003)(956004)(6486002)(66476007)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: fRbal0zoQICB+Jc/AN1YZ7dtVtnjsTMgSNEZQuDkm1goqROH1k6xXQRYAqqMp14dT+kkQAz2Ti9BOGQsmRpY+EcPpEQ0CCcJMQsYw55g1IKbixBnfpHyjQzACPt8/ik9jap3Qth6UZGpdq205T4+9ReTeplOi80hly0IQ+GV0SRSmuLMJOdHjQmFcTwu32YCYNznLrexGnBVkzKbCF/Z7sJaLwPQBuh+M6hlV3OyoMdiQzuCpN9AcYZrUSYhrSWTJinoCmvHHxodQup1t8znVSLgQZVpr75xx17pKykNcOeq8JfbXd4JG++W/zLcPaxAg3HRYtj6muRbvw5Q2Knn3MbKdGEpGe2Sm3mvUaTSF5zQwFSNrZzOIUqCX+G4ZY0FxAbqt9JuRZP6Om75gATt3gevfpt+3/aH/H6oE3l18ufSvArvtX9+Hzb8vP/gmA6wkznZZyyTTBAv+Xsh8J60PL3Ccr5nx2U1XfR9JeJWvPk= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60f9c235-1c5c-443d-73f5-08d81f27cc7e X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6638.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2020 08:05:07.1777 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +rDuiCVVVUxFoz+hBOrMGP8QzSYpDPYlWdB0Xy1aNw1jcz67e9WJMOKPpEJ8jXf09vP/fuVfX6HE+9v3GWVQMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2302 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200703_040512_201349_8D1A303D X-CRM114-Status: GOOD ( 10.82 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.7.57 listed in list.dnswl.org] 0.0 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.7.57 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add pca9450 driver for i.mx8mn-evk board. PCA9450A/B/C supported now. Please refer to below link for PCA9450 datasheet: https://www.nxp.com/docs/en/data-sheet/PCA9450DS.pdf v2: 1. rebase with the latest code to use linear_ranges helper instead. 2. address Frieder's comments, such as dulipcated buck4 description, debug info added etc. Robin Gong (4): regulator: pca9450: add pca9450 pmic driver dt-bindings: regulator: add pca9450 regulator yaml arm64: dts: imx8mn-evk: add pca9450 for i.mx8mn-evk board arm64: configs: add pca9450 pmic driver .../bindings/regulator/nxp,pca9450-regulator.yaml | 190 +++++ arch/arm64/boot/dts/freescale/imx8mn-evk.dts | 96 +++ arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 6 + arch/arm64/configs/defconfig | 1 + drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/pca9450-regulator.c | 859 +++++++++++++++++++++ include/linux/regulator/pca9450.h | 219 ++++++ 8 files changed, 1380 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml create mode 100644 drivers/regulator/pca9450-regulator.c create mode 100644 include/linux/regulator/pca9450.h