mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 33/42] mfd: Add Rohm bd71837 header file
Date: Mon, 17 Feb 2020 13:46:14 +0100	[thread overview]
Message-ID: <20200217124623.14520-34-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20200217124623.14520-1-s.hauer@pengutronix.de>

The Rohm bd71837 is a PMIC used on the NXP i.MX8MM EVK eval board. For
now only add the register definitions to be used by the lowlevel code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 include/mfd/bd71837.h | 103 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 include/mfd/bd71837.h

diff --git a/include/mfd/bd71837.h b/include/mfd/bd71837.h
new file mode 100644
index 0000000000..75e07e1de3
--- /dev/null
+++ b/include/mfd/bd71837.h
@@ -0,0 +1,103 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Copyright (C) 2018 ROHM Semiconductors */
+
+#ifndef BD718XX_H_
+#define BD718XX_H_
+
+#define BD718XX_REGULATOR_DRIVER "bd718x7_regulator"
+
+enum {
+	ROHM_CHIP_TYPE_BD71837 = 0,
+	ROHM_CHIP_TYPE_BD71847,
+	ROHM_CHIP_TYPE_BD70528,
+	ROHM_CHIP_TYPE_AMOUNT
+};
+
+enum {
+	BD718XX_REV			= 0x00,
+	BD718XX_SWRESET			= 0x01,
+	BD718XX_I2C_DEV			= 0x02,
+	BD718XX_PWRCTRL0		= 0x03,
+	BD718XX_PWRCTRL1		= 0x04,
+	BD718XX_BUCK1_CTRL		= 0x05,
+	BD718XX_BUCK2_CTRL		= 0x06,
+	BD71837_BUCK3_CTRL		= 0x07,
+	BD71837_BUCK4_CTRL		= 0x08,
+	BD718XX_1ST_NODVS_BUCK_CTRL	= 0x09,
+	BD718XX_2ND_NODVS_BUCK_CTRL	= 0x0a,
+	BD718XX_3RD_NODVS_BUCK_CTRL	= 0x0b,
+	BD718XX_4TH_NODVS_BUCK_CTRL	= 0x0c,
+	BD718XX_BUCK1_VOLT_RUN		= 0x0d,
+	BD718XX_BUCK1_VOLT_IDLE		= 0x0e,
+	BD718XX_BUCK1_VOLT_SUSP		= 0x0f,
+	BD718XX_BUCK2_VOLT_RUN		= 0x10,
+	BD718XX_BUCK2_VOLT_IDLE		= 0x11,
+	BD71837_BUCK3_VOLT_RUN		= 0x12,
+	BD71837_BUCK4_VOLT_RUN		= 0x13,
+	BD718XX_1ST_NODVS_BUCK_VOLT	= 0x14,
+	BD718XX_2ND_NODVS_BUCK_VOLT	= 0x15,
+	BD718XX_3RD_NODVS_BUCK_VOLT	= 0x16,
+	BD718XX_4TH_NODVS_BUCK_VOLT	= 0x17,
+	BD718XX_LDO1_VOLT		= 0x18,
+	BD718XX_LDO2_VOLT		= 0x19,
+	BD718XX_LDO3_VOLT		= 0x1a,
+	BD718XX_LDO4_VOLT		= 0x1b,
+	BD718XX_LDO5_VOLT		= 0x1c,
+	BD718XX_LDO6_VOLT		= 0x1d,
+	BD71837_LDO7_VOLT		= 0x1e,
+	BD718XX_TRANS_COND0		= 0x1f,
+	BD718XX_TRANS_COND1		= 0x20,
+	BD718XX_VRFAULTEN		= 0x21,
+	BD718XX_MVRFLTMASK0		= 0x22,
+	BD718XX_MVRFLTMASK1		= 0x23,
+	BD718XX_MVRFLTMASK2		= 0x24,
+	BD718XX_RCVCFG			= 0x25,
+	BD718XX_RCVNUM			= 0x26,
+	BD718XX_PWRONCONFIG0		= 0x27,
+	BD718XX_PWRONCONFIG1		= 0x28,
+	BD718XX_RESETSRC		= 0x29,
+	BD718XX_MIRQ			= 0x2a,
+	BD718XX_IRQ			= 0x2b,
+	BD718XX_IN_MON			= 0x2c,
+	BD718XX_POW_STATE		= 0x2d,
+	BD718XX_OUT32K			= 0x2e,
+	BD718XX_REGLOCK			= 0x2f,
+	BD718XX_MUXSW_EN		= 0x30,
+	BD718XX_REG_OTPVER		= 0xff,
+	BD718XX_MAX_REGISTER		= 0x100,
+};
+
+#define BD718XX_REGLOCK_PWRSEQ		0x1
+#define BD718XX_REGLOCK_VREG		0x10
+
+#define BD718XX_BUCK_EN			0x01
+#define BD718XX_LDO_EN			0x40
+#define BD718XX_BUCK_SEL		0x02
+#define BD718XX_LDO_SEL			0x80
+
+#define DVS_BUCK_RUN_MASK		0x3f
+#define BD718XX_1ST_NODVS_BUCK_MASK	0x07
+#define BD718XX_3RD_NODVS_BUCK_MASK	0x07
+#define BD718XX_4TH_NODVS_BUCK_MASK	0x3f
+
+#define BD71847_BUCK3_MASK		0x07
+#define BD71847_BUCK3_RANGE_MASK	0xc0
+#define BD71847_BUCK4_MASK		0x03
+#define BD71847_BUCK4_RANGE_MASK	0x40
+
+#define BD71837_BUCK5_RANGE_MASK	0x80
+#define BD71837_BUCK6_MASK		0x03
+
+#define BD718XX_LDO1_MASK		0x03
+#define BD718XX_LDO1_RANGE_MASK		0x20
+#define BD718XX_LDO2_MASK		0x20
+#define BD718XX_LDO3_MASK		0x0f
+#define BD718XX_LDO4_MASK		0x0f
+#define BD718XX_LDO6_MASK		0x0f
+
+#define BD71837_LDO5_MASK		0x0f
+#define BD71847_LDO5_MASK		0x0f
+#define BD71847_LDO5_RANGE_MASK		0x20
+#define BD71837_LDO7_MASK		0x0f
+
+#endif
-- 
2.25.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2020-02-17 12:48 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 12:45 [PATCH 00/42] Add i.MX8M support Sascha Hauer
2020-02-17 12:45 ` [PATCH 01/42] ARM: i.MX8: Move iomux header to make space for i.MX8MM Sascha Hauer
2020-02-17 12:45 ` [PATCH 02/42] ARM: i.MX8M: Add base addresses common to i.MX8M Sascha Hauer
2020-02-17 12:45 ` [PATCH 03/42] ARM: i.MX8M: add and use imx8mq_setup_pad() Sascha Hauer
2020-02-17 12:45 ` [PATCH 04/42] ARM: i.MX: Drop iomux argument from mx7_setup_pad() Sascha Hauer
2020-02-17 12:45 ` [PATCH 05/42] ARM: i.MX8M: Add iomux header for i.MX8MM Sascha Hauer
2020-02-17 12:45 ` [PATCH 06/42] ARM: i.MX8M: Add imx8mm-regs.h Sascha Hauer
2020-02-17 12:45 ` [PATCH 07/42] ARM: i.MX8M: Add ARCH_IMX8M symbol Sascha Hauer
2020-02-17 12:45 ` [PATCH 08/42] ARM: i.MX: esdctl: rename functions to imx8m_* Sascha Hauer
2020-02-17 12:45 ` [PATCH 09/42] ARM: i.MX8M: Use imx8mq.c for other i.MX8M as well Sascha Hauer
2020-02-17 12:45 ` [PATCH 10/42] ARM: i.MX8M: rename imx8_* bootsource functions to imx8mq_* Sascha Hauer
2020-02-17 12:45 ` [PATCH 11/42] ARM: i.MX8M: Detect serial downloader mode correctly Sascha Hauer
2020-02-17 12:45 ` [PATCH 12/42] HAB: i.MX8M: rename imx8_* functions to imx8m_* Sascha Hauer
2020-02-17 12:45 ` [PATCH 13/42] ARM: i.MX8M: rename i.MX8M specific function Sascha Hauer
2020-02-17 12:45 ` [PATCH 14/42] ARM: i.MX8M: rename functions to be i.MX8M specific Sascha Hauer
2020-02-17 12:45 ` [PATCH 15/42] mci: imx-esdhc-pbl: Add instance 2 for i.MX8MM Sascha Hauer
2020-02-17 12:45 ` [PATCH 16/42] USB: gadget: fsl_udc: move register definitions to header file Sascha Hauer
2020-02-17 12:45 ` [PATCH 17/42] usb: gadget: fsl_udc: Add PBL image loading support Sascha Hauer
2020-02-17 12:45 ` [PATCH 18/42] usb: gadget: fsl_udc: Fix warnings on 64bit compilation Sascha Hauer
2020-02-17 12:46 ` [PATCH 19/42] usb: imx: Add i.MX8mm support Sascha Hauer
2020-02-17 12:46 ` [PATCH 20/42] serial: imx: Add imx8mm compatible Sascha Hauer
2020-02-17 12:46 ` [PATCH 21/42] mci: imx-esdhc: Add i.MX8mm support Sascha Hauer
2020-02-17 12:46 ` [PATCH 22/42] I2C: i.MX: Add early i2c support for i.MX8M Sascha Hauer
2020-02-17 12:46 ` [PATCH 23/42] clk: imx: Add pll14xx support Sascha Hauer
2020-02-17 12:46 ` [PATCH 24/42] clk: imx: Add imx8m_clk_composite_critical Sascha Hauer
2020-02-17 12:46 ` [PATCH 25/42] clk: imx: Add imx8mm clk driver Sascha Hauer
2020-02-17 12:46 ` [PATCH 26/42] ARM: i.MX: Add SoC namespace to imx7/8m CCM defines Sascha Hauer
2020-02-17 12:46 ` [PATCH 27/42] Add some CCM defines for i.MX8M Sascha Hauer
2020-02-17 12:46 ` [PATCH 28/42] ARM: i.MX8M: rename imx8-ccm-regs.h to imx8m-ccm-regs.h Sascha Hauer
2020-02-17 12:46 ` [PATCH 29/42] ARM: i.MX8M: Add some lowlevel clock functions Sascha Hauer
2020-02-17 12:46 ` [PATCH 30/42] ARM: i.MX7: Add and use function for early UART clock setup Sascha Hauer
2020-02-17 12:46 ` [PATCH 31/42] ARM: i.MX8M: " Sascha Hauer
2020-02-17 12:46 ` [PATCH 32/42] iomux: Add i.MX8MM support Sascha Hauer
2020-02-17 12:46 ` Sascha Hauer [this message]
2020-02-17 12:46 ` [PATCH 34/42] scripts: imx-usb-loader: Add 2nd stage loading support Sascha Hauer
2020-02-17 12:46 ` [PATCH 35/42] scripts: imx-usb-loader: Add i.MX8MM support Sascha Hauer
2020-02-17 12:46 ` [PATCH 36/42] ARM: i.MX8MQ boards: Add missing includes Sascha Hauer
2020-02-17 12:46 ` [PATCH 37/42] ARM: i.MX8M: Add DDR controller support Sascha Hauer
2020-02-17 12:46 ` [PATCH 38/42] ARM: i.MX8M: Add TF-A loading support for i.MX8MM Sascha Hauer
2020-02-17 12:46 ` [PATCH 39/42] ARM: i.MX8M: Add i.MX8MM support Sascha Hauer
2020-02-17 12:46 ` [PATCH 40/42] scripts: imx-image: " Sascha Hauer
2020-02-17 12:46 ` [PATCH 41/42] ARM: i.MX: Add i.MX8MM EVK board support Sascha Hauer
2020-02-17 12:46 ` [PATCH 42/42] ARM: i.MX: update imx_v8_defconfig for i.MX8MM Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200217124623.14520-34-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox