public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/14] Add power bus message definitions in twl4030.h
Date: Wed, 25 Jan 2012 19:04:37 +0100	[thread overview]
Message-ID: <201201251904.37831.marek.vasut@gmail.com> (raw)
In-Reply-To: <1327415291-13260-4-git-send-email-pali.rohar@gmail.com>

> * Code copied from linux kernel 3.0.0 from file include/linux/i2c/twl.h

Do you need them?

Also, as in other patches, I noticed you don't CC Tom Rini. Also, Ccing Igor 
Grinberg. Please keep the Cc in next inkarnation of the series!

Guys, can you also help review the rest of the series ?

> 
> Signed-off-by: Pali Roh?r <pali.rohar@gmail.com>
> ---
> Changes since original version:
>    - Fixed commit message
> 
>  include/twl4030.h |   98
> +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 98
> insertions(+), 0 deletions(-)
> 
> diff --git a/include/twl4030.h b/include/twl4030.h
> index 9cd32ab..0c17f59 100644
> --- a/include/twl4030.h
> +++ b/include/twl4030.h
> @@ -151,6 +151,103 @@
>  #define TWL4030_PM_MASTER_SW_EVENTS_DEVSLP		(1 << 1)
>  #define TWL4030_PM_MASTER_SW_EVENTS_DEVOFF		(1 << 0)
> 
> +/* Power bus message definitions */
> +
> +/* The TWL4030/5030 splits its power-management resources (the various
> + * regulators, clock and reset lines) into 3 processor groups - P1, P2 and
> + * P3. These groups can then be configured to transition between sleep,
> wait-on + * and active states by sending messages to the power bus.  See
> Section 5.4.2 + * Power Resources of TWL4030 TRM
> + */
> +
> +/* Processor groups */
> +#define DEV_GRP_NULL		0x0
> +#define DEV_GRP_P1		0x1	/* P1: all OMAP devices */
> +#define DEV_GRP_P2		0x2	/* P2: all Modem devices */
> +#define DEV_GRP_P3		0x4	/* P3: all peripheral devices */
> +
> +/* Resource groups */
> +#define RES_GRP_RES		0x0	/* Reserved */
> +#define RES_GRP_PP		0x1	/* Power providers */
> +#define RES_GRP_RC		0x2	/* Reset and control */
> +#define RES_GRP_PP_RC		0x3
> +#define RES_GRP_PR		0x4	/* Power references */
> +#define RES_GRP_PP_PR		0x5
> +#define RES_GRP_RC_PR		0x6
> +#define RES_GRP_ALL		0x7	/* All resource groups */
> +
> +#define RES_TYPE2_R0		0x0
> +
> +#define RES_TYPE_ALL		0x7
> +
> +/* Resource states */
> +#define RES_STATE_WRST		0xF
> +#define RES_STATE_ACTIVE	0xE
> +#define RES_STATE_SLEEP		0x8
> +#define RES_STATE_OFF		0x0
> +
> +/* Power resources */
> +
> +/* Power providers */
> +#define RES_VAUX1               1
> +#define RES_VAUX2               2
> +#define RES_VAUX3               3
> +#define RES_VAUX4               4
> +#define RES_VMMC1               5
> +#define RES_VMMC2               6
> +#define RES_VPLL1               7
> +#define RES_VPLL2               8
> +#define RES_VSIM                9
> +#define RES_VDAC                10
> +#define RES_VINTANA1            11
> +#define RES_VINTANA2            12
> +#define RES_VINTDIG             13
> +#define RES_VIO                 14
> +#define RES_VDD1                15
> +#define RES_VDD2                16
> +#define RES_VUSB_1V5            17
> +#define RES_VUSB_1V8            18
> +#define RES_VUSB_3V1            19
> +#define RES_VUSBCP              20
> +#define RES_REGEN               21
> +/* Reset and control */
> +#define RES_NRES_PWRON          22
> +#define RES_CLKEN               23
> +#define RES_SYSEN               24
> +#define RES_HFCLKOUT            25
> +#define RES_32KCLKOUT           26
> +#define RES_RESET               27
> +/* Power Reference */
> +#define RES_Main_Ref            28
> +
> +#define TOTAL_RESOURCES		28
> +/*
> + * Power Bus Message Format ... these can be sent individually by Linux,
> + * but are usually part of downloaded scripts that are run when various
> + * power events are triggered.
> + *
> + *  Broadcast Message (16 Bits):
> + *    DEV_GRP[15:13] MT[12]  RES_GRP[11:9]  RES_TYPE2[8:7] RES_TYPE[6:4]
> + *    RES_STATE[3:0]
> + *
> + *  Singular Message (16 Bits):
> + *    DEV_GRP[15:13] MT[12]  RES_ID[11:4]  RES_STATE[3:0]
> + */
> +
> +#define MSG_BROADCAST(devgrp, grp, type, type2, state) \
> +	((devgrp) << 13 | 1 << 12 | (grp) << 9 | (type2) << 7 \
> +	| (type) << 4 | (state))
> +
> +#define MSG_SINGULAR(devgrp, id, state) \
> +	((devgrp) << 13 | 0 << 12 | (id) << 4 | (state))
> +
> +#define MSG_BROADCAST_ALL(devgrp, state) \
> +	((devgrp) << 5 | (state))
> +
> +#define MSG_BROADCAST_REF MSG_BROADCAST_ALL
> +#define MSG_BROADCAST_PROV MSG_BROADCAST_ALL
> +#define MSG_BROADCAST__CLK_RST MSG_BROADCAST_ALL
> +
>  /* Power Managment Receiver */
>  #define TWL4030_PM_RECEIVER_SC_CONFIG			0x5B
>  #define TWL4030_PM_RECEIVER_SC_DETECT1			0x5C
> @@ -311,6 +408,7 @@
>  #define TWL4030_PM_RECEIVER_VDAC_VSEL_18		0x03
>  #define TWL4030_PM_RECEIVER_VMMC1_VSEL_30		0x02
>  #define TWL4030_PM_RECEIVER_VMMC1_VSEL_32		0x03
> +#define TWL4030_PM_RECEIVER_VSIM_VSEL_18		0x03
> 
>  /* Device Selection in PM Receiver Module */
>  #define TWL4030_PM_RECEIVER_DEV_GRP_P1			0x20

  reply	other threads:[~2012-01-25 18:04 UTC|newest]

Thread overview: 220+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24 14:27 [U-Boot] [PATCH 00/14] Nokia RX-51 support Pali Rohár
2012-01-24 14:27 ` [U-Boot] [PATCH 01/14] arm, omap3: Define save_boot_params in lowlevel_init.S for SPL only Pali Rohár
2012-01-25 18:00   ` Marek Vasut
2012-01-25 18:50     ` Tom Rini
2012-01-25 18:47   ` Tom Rini
2012-02-28 16:25   ` Pali Rohár
2012-02-28 16:29     ` Tom Rini
2012-02-29 21:37       ` Marek Vasut
2012-03-05 18:24         ` Tom Rini
2012-03-05 18:49           ` Marek Vasut
2012-01-24 14:27 ` [U-Boot] [PATCH 02/14] arm: Optionally use existing atags in bootm.c Pali Rohár
2012-01-25 18:02   ` Marek Vasut
2012-01-25 19:17     ` Pali Rohár
2012-01-25 20:55       ` Marek Vasut
2012-01-25 21:08         ` Pali Rohár
2012-01-25 21:28           ` Marek Vasut
2012-01-25 21:35             ` Pali Rohár
2012-01-25 21:55               ` Marek Vasut
2012-01-25 22:03                 ` Pali Rohár
2012-01-24 14:28 ` [U-Boot] [PATCH 03/14] Add power bus message definitions in twl4030.h Pali Rohár
2012-01-25 18:04   ` Marek Vasut [this message]
2012-01-25 19:24     ` Pali Rohár
2012-01-26  7:15     ` Igor Grinberg
2012-01-24 14:28 ` [U-Boot] [PATCH 04/14] Fix function readline in main.c Pali Rohár
2012-01-25 18:05   ` Marek Vasut
2012-02-27 20:39     ` Mike Frysinger
2012-01-24 14:28 ` [U-Boot] [PATCH 05/14] cfb_console: Fix function console_scrollup Pali Rohár
2012-01-25 18:06   ` Marek Vasut
2012-01-25 19:59     ` Pali Rohár
2012-03-21  9:45   ` Anatolij Gustschin
2012-03-21 10:20     ` Marek Vasut
2012-03-21 11:32       ` Anatolij Gustschin
2012-03-21 11:39         ` Anatolij Gustschin
2012-03-21 18:50         ` Pali Rohár
2012-03-21 22:58           ` Anatolij Gustschin
2012-03-22  8:58             ` Pali Rohár
2012-03-23  8:47               ` Anatolij Gustschin
2012-04-26 21:45   ` Anatolij Gustschin
2012-04-26 21:50     ` Pali Rohár
2012-04-28 15:11       ` Anatolij Gustschin
2012-04-28 15:58         ` Pali Rohár
2012-01-24 14:28 ` [U-Boot] [PATCH 06/14] cfb_console: Add function console_clear and console_clear_line Pali Rohár
2012-01-25 18:08   ` Marek Vasut
2012-01-25 19:31     ` Pali Rohár
2012-01-25 20:54       ` Marek Vasut
2012-01-24 14:28 ` [U-Boot] [PATCH 07/14] cfb_console: Add functions for moving with cursor Pali Rohár
2012-01-24 14:28 ` [U-Boot] [PATCH 08/14] cfb_console: Add support for some ANSI terminal escape codes Pali Rohár
2012-01-24 14:28 ` [U-Boot] [PATCH 09/14] New command clear: Clear the ANSI terminal Pali Rohár
2012-01-25 18:10   ` Marek Vasut
2012-01-25 19:33     ` Pali Rohár
2012-01-25 20:53       ` Marek Vasut
2012-02-14  7:02         ` Mike Frysinger
2012-01-24 14:28 ` [U-Boot] [PATCH 10/14] New config variable CONFIG_MENUCMD Pali Rohár
2012-01-25 18:12   ` Marek Vasut
2012-01-25 19:39     ` Pali Rohár
2012-01-25 20:53       ` Marek Vasut
2012-01-26 16:43         ` Pali Rohár
2012-02-14  7:09   ` Mike Frysinger
2012-01-24 14:28 ` [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR Pali Rohár
2012-01-25 18:12   ` Marek Vasut
2012-01-25 19:48     ` Pali Rohár
2012-01-25 20:51       ` Marek Vasut
2012-01-25 21:24         ` Pali Rohár
2012-01-25 21:28           ` Marek Vasut
2012-01-25 21:55             ` Pali Rohár
2012-01-25 22:01               ` Marek Vasut
2012-02-14  7:04   ` Mike Frysinger
2012-01-24 14:28 ` [U-Boot] [PATCH 12/14] New board support: Nokia RX-51 aka N900 Pali Rohár
2012-01-24 14:28 ` [U-Boot] [PATCH 13/14] New command bootmenu: ANSI terminal Boot Menu support Pali Rohár
2012-01-25 18:18   ` Marek Vasut
2012-01-25 19:57     ` Pali Rohár
2012-01-27 10:51       ` Sergey Lapin
2012-02-14  7:07       ` Mike Frysinger
2012-01-24 14:28 ` [U-Boot] [PATCH 14/14] RX-51: Add support for bootmenu Pali Rohár
2012-01-24 19:25 ` [U-Boot] [PATCH 00/14] Nokia RX-51 support Graeme Russ
2012-01-25  9:48 ` Sergey Lapin
2012-01-25 11:51   ` Pali Rohár
2012-01-25 18:20     ` Marek Vasut
2012-01-25 19:08       ` Pali Rohár
2012-01-25 20:56         ` Marek Vasut
2012-01-25 21:16           ` Pali Rohár
2012-01-25 21:29             ` Marek Vasut
2012-01-25 21:53               ` Pali Rohár
2012-01-25 22:00                 ` Marek Vasut
2012-01-26 16:25                   ` Sergey Lapin
2012-01-26 16:39                     ` Pali Rohár
2012-01-26 16:48                       ` Marek Vasut
2012-01-27  8:59                       ` Sergey Lapin
2012-01-27 10:27                         ` Pali Rohár
2012-01-26 16:48                     ` Marek Vasut
2012-01-25 17:59 ` Marek Vasut
2012-01-26  8:27   ` Graeme Russ
2012-02-04 12:26 ` Pali Rohár
2012-02-04 15:05   ` Marek Vasut
2012-02-26 20:37 ` Pali Rohár
2012-02-26 22:08   ` Marek Vasut
2012-02-27  4:10     ` Mike Frysinger
2012-02-27 18:41       ` Pali Rohár
2012-02-27 20:55         ` Marek Vasut
2012-03-04 20:21           ` Pali Rohár
2012-03-04 20:57             ` Marek Vasut
2012-03-04 21:35               ` Pali Rohár
2012-03-04 21:50                 ` Marek Vasut
2012-03-05 21:54                   ` Pali Rohár
2012-03-04 22:09                 ` Wolfgang Denk
2012-03-05 21:56                   ` Pali Rohár
2012-03-05  4:26                 ` Mike Frysinger
2012-03-05 21:58                   ` Pali Rohár
2012-03-05 23:09                     ` Mike Frysinger
2012-03-10 13:18               ` Pali Rohár
2012-03-04 21:01             ` Mike Frysinger
2012-04-28 17:26 ` [U-Boot] [PATCH v2 00/11] " Pali Rohár
2012-04-28 17:26   ` [U-Boot] [PATCH v2 01/11] arm: Optionally use existing atags in bootm.c Pali Rohár
2012-04-28 21:20     ` Wolfgang Denk
2012-04-29  7:20       ` Pali Rohár
2012-04-29 12:16         ` Wolfgang Denk
2012-04-28 22:15     ` Marek Vasut
2012-04-29  7:14       ` Pali Rohár
2012-04-29  9:10         ` Marek Vasut
2012-04-29  9:15           ` Pali Rohár
2012-04-29 13:08             ` Marek Vasut
2012-06-01 18:31               ` Pali Rohár
2012-04-28 23:22     ` Mike Frysinger
2012-04-29  7:57       ` Pali Rohár
2012-04-28 17:26   ` [U-Boot] [PATCH v2 02/11] Add power bus message definitions in twl4030.h Pali Rohár
2012-04-28 17:26   ` [U-Boot] [PATCH v2 03/11] cfb_console: Fix function console_back Pali Rohár
2012-04-28 22:15     ` Marek Vasut
2012-04-29  7:24       ` Pali Rohár
2012-04-29 12:17         ` Wolfgang Denk
2012-05-19 19:16     ` Anatolij Gustschin
2012-06-01 18:42       ` Pali Rohár
2012-06-04 20:47         ` Anatolij Gustschin
2012-04-28 17:26   ` [U-Boot] [PATCH v2 04/11] cfb_console: Add function console_clear and console_clear_line Pali Rohár
2012-04-28 22:17     ` Marek Vasut
2012-04-28 17:26   ` [U-Boot] [PATCH v2 05/11] cfb_console: Add functions for moving with cursor Pali Rohár
2012-04-28 22:18     ` Marek Vasut
2012-04-29  7:26       ` Pali Rohár
2012-04-29  9:09         ` Marek Vasut
2012-04-29 12:18         ` Wolfgang Denk
2012-05-20 20:38     ` [U-Boot] [PATCH v3 05/11] cfb_console: Add console_clear_line function Anatolij Gustschin
2012-05-20 20:45       ` Anatolij Gustschin
2012-06-04 20:49       ` Anatolij Gustschin
2012-04-28 17:26   ` [U-Boot] [PATCH v2 06/11] cfb_console: Add support for some ANSI terminal escape codes Pali Rohár
2012-04-28 22:19     ` Marek Vasut
2012-04-29  7:29       ` Pali Rohár
2012-04-29 12:42         ` Wolfgang Denk
2012-04-28 17:26   ` [U-Boot] [PATCH v2 07/11] cfb_console: Ignore bell character Pali Rohár
2012-06-05  7:30     ` Anatolij Gustschin
2012-04-28 17:26   ` [U-Boot] [PATCH v2 08/11] video: cfb_console: flush dcache for frame buffer in DRAM Pali Rohár
2012-04-28 17:26   ` [U-Boot] [PATCH v2 09/11] New command clear: Clear the ANSI terminal Pali Rohár
2012-08-09 21:02     ` Wolfgang Denk
2012-04-28 17:26   ` [U-Boot] [PATCH v2 10/11] New config variable CONFIG_PREMONITOR Pali Rohár
2012-04-28 20:39     ` Wolfgang Denk
2012-04-29  7:37       ` Pali Rohár
2012-04-29 12:44         ` Wolfgang Denk
2012-04-28 17:26   ` [U-Boot] [PATCH v2 11/11] New board support: Nokia RX-51 aka N900 Pali Rohár
2012-04-28 21:32     ` Wolfgang Denk
2012-04-29  7:55       ` Pali Rohár
2012-04-29  9:18         ` Marek Vasut
2012-04-30 23:37           ` Tom Rini
2012-04-30 23:42             ` Marek Vasut
2012-05-01  0:41               ` Tom Rini
2012-06-01 18:39             ` Pali Rohár
2012-06-01 18:48               ` Marek Vasut
2012-06-01 19:03                 ` Pali Rohár
2012-06-01 20:09                   ` Marek Vasut
2012-04-29 12:49         ` Wolfgang Denk
2012-10-13 19:31 ` [U-Boot] [PATCH v3 0/5] Nokia RX-51 support Pali Rohár
2012-10-13 19:31   ` [U-Boot] [PATCH v3 1/5] arm bootm: Allow to pass board specified atags Pali Rohár
2012-10-13 23:43     ` Marek Vasut
2012-10-14  0:02       ` Pali Rohár
2012-10-14  0:18         ` Marek Vasut
2012-10-14  1:12           ` Pali Rohár
2012-10-13 19:31   ` [U-Boot] [PATCH v3 2/5] arm bootm: Do not append zero ATAG_MEM Pali Rohár
2012-10-13 23:45     ` Marek Vasut
2012-10-14  0:08       ` Pali Rohár
2012-10-14  0:17         ` Marek Vasut
2012-10-14  0:23           ` Pali Rohár
2012-10-14  0:27             ` Marek Vasut
2012-10-14  0:35               ` Pali Rohár
2012-10-14  1:08                 ` Marek Vasut
2012-10-16 15:56                   ` Tom Rini
2012-10-13 19:31   ` [U-Boot] [PATCH v3 3/5] Add power bus message definitions in twl4030.h Pali Rohár
2012-10-13 23:46     ` Marek Vasut
2012-10-14  0:14       ` Pali Rohár
2012-10-14  0:16         ` Marek Vasut
2012-10-14  0:51           ` Pali Rohár
2012-10-14  1:08             ` Marek Vasut
2012-10-13 19:31   ` [U-Boot] [PATCH v3 4/5] cfb_console: Add support for some ANSI terminal escape codes Pali Rohár
2012-10-13 23:48     ` Marek Vasut
2012-10-14  0:18       ` Pali Rohár
2012-10-14  0:27         ` Marek Vasut
2012-10-13 19:32   ` [U-Boot] [PATCH v3 5/5] New board support: Nokia RX-51 aka N900 Pali Rohár
2012-10-14  0:06     ` Marek Vasut
2012-10-14  8:31       ` Albert ARIBAUD
2012-10-16 14:43       ` Pali Rohár
2012-10-16 14:55         ` Marek Vasut
2012-10-16 15:46           ` Pali Rohár
2012-10-16 15:57             ` Marek Vasut
2012-10-16 16:15               ` Pali Rohár
2012-10-19 12:00 ` [U-Boot] [PATCH v4 0/5] Nokia RX-51 support Pali Rohár
2012-10-19 12:00   ` [U-Boot] [PATCH v4 1/5] arm bootm: Allow to pass board specified atags Pali Rohár
2012-10-19 12:00   ` [U-Boot] [PATCH v4 2/5] arm bootm: Do not append zero ATAG_MEM Pali Rohár
2012-10-20  9:34     ` Marek Vasut
2012-10-20  9:41       ` Pali Rohár
2012-10-26 17:44         ` Tom Rini
2012-10-26 17:52     ` Tom Rini
2012-10-27 15:29       ` Marek Vasut
2012-10-29 17:37         ` Tom Rini
2012-10-19 12:00   ` [U-Boot] [PATCH v4 3/5] Add power bus message definitions in twl4030.h Pali Rohár
2012-10-19 12:00   ` [U-Boot] [PATCH v4 4/5] cfb_console: Add support for some ANSI terminal escape codes Pali Rohár
2012-10-19 23:30     ` [U-Boot] [PATCH v5 " Anatolij Gustschin
2012-10-23 14:28       ` Pali Rohár
2012-10-19 23:38     ` [U-Boot] [PATCH v4 " Anatolij Gustschin
2012-10-23 14:25       ` Pali Rohár
2012-10-19 12:00   ` [U-Boot] [PATCH v4 5/5] New board support: Nokia RX-51 aka N900 Pali Rohár
2012-10-23  7:20     ` Igor Grinberg
2012-10-29 17:55       ` Pali Rohár
2012-10-29 17:54     ` [U-Boot] [PATCH v5 " Pali Rohár
2012-11-02 17:07       ` Tom Rini

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=201201251904.37831.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.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