From: Nitin Garg <nitin.garg@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 02/11] imx: power: add pmic pfuze300 support
Date: Wed, 15 Jul 2015 19:31:35 -0500 [thread overview]
Message-ID: <55A6FB67.8090703@freescale.com> (raw)
In-Reply-To: <1437000559-3208-2-git-send-email-aalonso@freescale.com>
On 07/15/2015 05:49 PM, Adrian Alonso wrote:
> * Add pmic pfuze300 support for imx7 and iMX6 DL/SL/SX SoC's
> * Implement power_pfuze300_init to be used in power_init_board
> callback function.
>
> Signed-off-by: Adrian Alonso <aalonso@freescale.com>
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> ---
> drivers/power/pmic/Makefile | 1 +
> drivers/power/pmic/pmic_pfuze300.c | 32 ++++++++++++++++
> include/power/pfuze300_pmic.h | 78 ++++++++++++++++++++++++++++++++++++++
> 3 files changed, 111 insertions(+)
> create mode 100644 drivers/power/pmic/pmic_pfuze300.c
> create mode 100644 include/power/pfuze300_pmic.h
>
> diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile
> index ae86f04..43040ff 100644
> --- a/drivers/power/pmic/Makefile
> +++ b/drivers/power/pmic/Makefile
> @@ -14,6 +14,7 @@ obj-$(CONFIG_POWER_MAX8997) += pmic_max8997.o
> obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o
> obj-$(CONFIG_POWER_MAX77686) += pmic_max77686.o
> obj-$(CONFIG_POWER_PFUZE100) += pmic_pfuze100.o
> +obj-$(CONFIG_POWER_PFUZE300) += pmic_pfuze300.o
> obj-$(CONFIG_POWER_TPS65090_I2C) += pmic_tps65090.o
> obj-$(CONFIG_POWER_TPS65090_EC) += pmic_tps65090_ec.o
> obj-$(CONFIG_POWER_TPS65217) += pmic_tps65217.o
> diff --git a/drivers/power/pmic/pmic_pfuze300.c b/drivers/power/pmic/pmic_pfuze300.c
> new file mode 100644
> index 0000000..4304ddd
> --- /dev/null
> +++ b/drivers/power/pmic/pmic_pfuze300.c
> @@ -0,0 +1,32 @@
> +/*
> + * Copyright (C) 2015 Freescale Semiconductor, Inc.
> + * Peng Fan <Peng.Fan@freescale.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include <common.h>
> +#include <errno.h>
> +#include <i2c.h>
> +#include <power/pmic.h>
> +#include <power/pfuze300_pmic.h>
> +
> +int power_pfuze300_init(unsigned char bus)
> +{
> + static const char name[] = "PFUZE300";
> + struct pmic *p = pmic_alloc();
> +
> + if (!p) {
> + printf("%s: POWER allocation error!\n", __func__);
> + return -ENOMEM;
> + }
> +
> + p->name = name;
> + p->interface = PMIC_I2C;
> + p->number_of_regs = PMIC_NUM_OF_REGS;
> + p->hw.i2c.addr = CONFIG_POWER_PFUZE300_I2C_ADDR;
> + p->hw.i2c.tx_num = 1;
> + p->bus = bus;
> +
> + return 0;
> +}
> diff --git a/include/power/pfuze300_pmic.h b/include/power/pfuze300_pmic.h
> new file mode 100644
> index 0000000..c7ec5ce
> --- /dev/null
> +++ b/include/power/pfuze300_pmic.h
> @@ -0,0 +1,78 @@
> +/*
> + * Copyright (C) 2015 Freescale Semiconductor, Inc
> + * Peng Fan <Peng.Fan@freescale.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +#ifndef __PFUZE300_PMIC_H_
> +#define __PFUZE300_PMIC_H_
> +
> +/* PFUZE300 registers */
> +enum {
> + PFUZE300_DEVICEID = 0x00,
> +
> + PFUZE300_REVID = 0x03,
> + PFUZE300_FABID = 0x04,
> + PFUZE300_INTSTAT0 = 0x05,
> + PFUZE300_INTMASK0 = 0x06,
> + PFUZE300_INTSENSE0 = 0x07,
> + PFUZE300_INTSTAT1 = 0x08,
> + PFUZE300_INTMASK1 = 0x09,
> + PFUZE300_INTSENSE1 = 0x0A,
> +
> + PFUZE300_INTSTAT3 = 0x0E,
> + PFUZE300_INTMASK3 = 0x0F,
> + PFUZE300_INTSENSE3 = 0x10,
> + PFUZE300_INTSTAT4 = 0x11,
> + PFUZE300_INTMASK4 = 0x12,
> + PFUZE300_INTSENSE4 = 0x13,
> +
> + PFUZE300_COINCTL = 0x1A,
> + PFUZE300_PWRCTL = 0x1B,
> + PFUZE300_MEMA = 0x1C,
> + PFUZE300_MEMB = 0x1D,
> + PFUZE300_MEMC = 0x1E,
> + PFUZE300_MEMD = 0x1F,
> +
> + PFUZE300_SW1AVOLT = 0x20,
> + PFUZE300_SW1ASTBY = 0x21,
> + PFUZE300_SW1AOFF = 0x22,
> + PFUZE300_SW1AMODE = 0x23,
> + PFUZE300_SW1ACONF = 0x24,
> +
> + PFUZE300_SW1BVOLT = 0x2E,
> + PFUZE300_SW1BSTBY = 0x2F,
> + PFUZE300_SW1BOFF = 0x30,
> + PFUZE300_SW1BMODE = 0x31,
> + PFUZE300_SW1BCONF = 0x32,
> +
> + PFUZE300_SW2VOLT = 0x35,
> + PFUZE300_SW2STBY = 0x36,
> + PFUZE300_SW2OFF = 0x37,
> + PFUZE300_SW2MODE = 0x38,
> + PFUZE300_SW2CONF = 0x39,
> +
> + PFUZE300_SW3VOLT = 0x3C,
> + PFUZE300_SW3STBY = 0x3D,
> + PFUZE300_SW3OFF = 0x3E,
> + PFUZE300_SW3MODE = 0x3F,
> + PFUZE300_SW3CONF = 0x40,
> +
> + PFUZE300_SWBSTCTL = 0x66,
> +
> + PFUZE300_LDOGCTL = 0x69,
> + PFUZE300_VREFDDRCTL = 0x6A,
> + PFUZE300_VSNVSCTL = 0x6B,
> + PFUZE300_VLDO1CTL = 0x6C,
> + PFUZE300_VLDO2CTL = 0x6D,
> + PFUZE300_VCC_SDCTL = 0x6E,
> + PFUZE300_V33CTL = 0x6F,
> + PFUZE300_VLDO3CTL = 0x70,
> + PFUZE300_VLD4CTL = 0x71,
> +
> + PMIC_NUM_OF_REGS = 0x7F,
> +};
> +
> +int power_pfuze300_init(unsigned char bus);
> +
> +#endif
>
I think the PMIC name is pfuze3000 not pfuse300.
Regards,
Nitin
next prev parent reply other threads:[~2015-07-16 0:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 22:49 [U-Boot] [PATCH 01/11][v2] imx: imximage: add new CHECK/CLR BIT command Adrian Alonso
2015-07-15 22:49 ` [U-Boot] [PATCH 02/11] imx: power: add pmic pfuze300 support Adrian Alonso
2015-07-16 0:31 ` Nitin Garg [this message]
2015-07-16 14:18 ` Fabio Estevam
2015-07-15 22:49 ` [U-Boot] [PATCH 03/11] imx: usb: ehci-mx7 add usb driver for i.MX7D Adrian Alonso
2015-07-16 15:32 ` Fabio Estevam
2015-07-15 22:49 ` [U-Boot] [PATCH 05/11] imx: iomux-v3: add imx7d support for iomuxc Adrian Alonso
2015-07-15 22:49 ` [U-Boot] [PATCH 06/11] imx: mxc_gpio: add support for imx7d SoC Adrian Alonso
2015-07-15 22:49 ` [U-Boot] [PATCH 07/11] imx: ocotp: mxc add i.MX7D support Adrian Alonso
2015-07-15 22:49 ` [U-Boot] [PATCH 08/11] imx: mx7 dm thermal driver support Adrian Alonso
2015-07-16 14:14 ` Fabio Estevam
2015-07-17 16:49 ` Alonso Adrian
2015-07-17 17:09 ` Otavio Salvador
2015-07-15 22:49 ` [U-Boot] [PATCH 09/11] imx: system counter driver for imx7d and mx6ul Adrian Alonso
2015-07-20 20:42 ` Nikolay Dimitrov
2015-07-20 22:11 ` Alonso Adrian
2015-07-20 22:59 ` Nikolay Dimitrov
2015-07-15 22:49 ` [U-Boot] [PATCH 10/11] imx: imx7d: initial arch level support Adrian Alonso
2015-07-18 23:52 ` Fabio Estevam
2015-07-15 22:49 ` [U-Boot] [PATCH 11/11] imx: mx7dsabresd: Add support for MX7D SABRESD board Adrian Alonso
2015-07-16 15:30 ` Fabio Estevam
2015-07-20 7:33 ` [U-Boot] [PATCH 01/11][v2] imx: imximage: add new CHECK/CLR BIT command Stefano Babic
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=55A6FB67.8090703@freescale.com \
--to=nitin.garg@freescale.com \
--cc=u-boot@lists.denx.de \
/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