From patchwork Mon May 28 09:00:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 921380 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40vW5t6N5zz9s0q for ; Mon, 28 May 2018 19:00:18 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933097AbeE1JAR (ORCPT ); Mon, 28 May 2018 05:00:17 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:44342 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933084AbeE1JAN (ORCPT ); Mon, 28 May 2018 05:00:13 -0400 Received: by mail-wr0-f196.google.com with SMTP id y15-v6so19023680wrg.11; Mon, 28 May 2018 02:00:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=rVTRIUNr8CIlxg5+9PxMSD0RDoSOaeGYt6TzqCSzHwA=; b=UYzWD9IMaPR0Nja4s0rfy1aZsnQp/8R32OgGWsfynrU0RWkEPSKvcIoeGSgZX8F99F v6cozr5il2VVbsPXbQJomPdQYKuL+YZHPyhv4eydP+4x/91uHcc+4djrZ+j5UsM7KBeC 1v+Rl0Wf45+ReAk9usv9lIwVhewS2roK/3hqpsWMudt5f6MMn2ZcIoHzBkCdAM7GHJgz U2opZVKArsMhF5g1q5/Hfgrno3bcNgp7znn2/WAX9wAB1sCeCZRd4yXEhIKnEfCxNUs4 BNeEfUAoivTc6p/v0YMMIkW/c4BvyFECYlGlZr2dwZvF/uC5E4zZR9t8/313uZRdeS5y PuiQ== X-Gm-Message-State: ALKqPwexB8wKwrglJgDjWM49Sv2Rm77f291oMEsUE6ULRn53xNZ1NlFk PeQM7YbCp22/dLaluS8zr5I= X-Google-Smtp-Source: ADUXVKKuFxTfLObR/EsRLfUkryWNPgvDLXgkETZfvcBO7petIzt4WDbY2nopk2/OgNPmj7m7gPofsQ== X-Received: by 2002:a19:188a:: with SMTP id 10-v6mr6554177lfy.26.1527498011859; Mon, 28 May 2018 02:00:11 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.34]) by smtp.gmail.com with ESMTPSA id n17-v6sm5801710ljj.10.2018.05.28.02.00.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 May 2018 02:00:11 -0700 (PDT) Date: Mon, 28 May 2018 12:00:03 +0300 From: Matti Vaittinen To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, mazziesaccount@gmail.com Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com, heikki.haikola@fi.rohmeurope.com Subject: [PATCH v2 0/6] mfd/regulator/clk: bd71837: ROHM BD71837 PMIC driver Message-ID: <20180528090003.GA8778@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Patch series adding support for ROHM BD71837 PMIC. BD71837 is a programmable Power Management IC for powering single-core, dual-core, and quad-core SoC’s such as NXP-i.MX 8M. It is optimized for low BOM cost and compact solution footprint. It integrates 8 buck regulators and 7 LDO’s to provide all the power rails required by the SoC and the commonly used peripherals. The driver aims to not limit the usage of PMIC. Thus the buck and LDO naming is generic and not tied to any specific purposes. However there is following limitations which make it mostly suitable for use cases where the processor where PMIC driver is running is powered by the PMIC: - The PMIC is not re-initialized if it resets. PMIC may reset as a result of voltage monitoring (over/under voltage) or due to reset request. Driver is only initializing PMIC at probe. This is not problem as long as processor controlling PMIC is powered by PMIC. - The PMIC internal state machine is ignored by driver. Driver assumes the PMIC is wired so that it is always in "run" state when controlled by the driver. Changelog v2 Based on feedback from Mark Brown - Squashed code and buildfile changes to same patch - Fixed some styling issues - Changed SPDX comments to CPP style - Error out if voltage is changed when regulator is enabled instead of Disabling the regulator for duration of change - Use devm_regulator_register - Remove compatible usage from regulators - use parent dev for config - Add a note about using regulator-boot-on for BUCK6 and 7 - fixed warnings from kbuild test robot patch 1: MFD driver and definitions bringing interrupt support and enabling clk and regulator subsystems. Patches 2, 3 and 4: device tree binding documents. Patch 5: clock subsystem and support for gated clock. Patch 6: regulator driver supporting 8 bucks and 7 LDOs. This patch series is based on for-mfd-next --- Matti Vaittinen (6): mfd: bd71837: mfd driver for ROHM BD71837 PMIC mfd: bd71837: Devicetree bindings for ROHM BD71837 PMIC regulator: bd71837: Devicetree bindings for BD71837 regulators clk: bd71837: Devicetree bindings for ROHM BD71837 PMIC clk: bd71837: Add driver for BD71837 PMIC clock regulator: bd71837: BD71837 PMIC regulator driver .../bindings/clock/rohm,bd71837-clock.txt | 37 ++ .../devicetree/bindings/mfd/rohm,bd71837-pmic.txt | 52 ++ .../bindings/regulator/rohm,bd71837-regulator.txt | 126 ++++ drivers/clk/Kconfig | 9 + drivers/clk/Makefile | 1 + drivers/clk/clk-bd71837.c | 154 +++++ drivers/mfd/Kconfig | 13 + drivers/mfd/Makefile | 1 + drivers/mfd/bd71837.c | 238 ++++++++ drivers/regulator/Kconfig | 11 + drivers/regulator/Makefile | 1 + drivers/regulator/bd71837-regulator.c | 678 +++++++++++++++++++++ include/linux/mfd/bd71837.h | 316 ++++++++++ 13 files changed, 1637 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/rohm,bd71837-clock.txt create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.txt create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.txt create mode 100644 drivers/clk/clk-bd71837.c create mode 100644 drivers/mfd/bd71837.c create mode 100644 drivers/regulator/bd71837-regulator.c create mode 100644 include/linux/mfd/bd71837.h