123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429 |
- /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
- * All rights reserved.
- *
- * This software is supplied "AS IS" without any warranties.
- * RDA assumes no responsibility or liability for the use of the software,
- * conveys no license or title under any patent, copyright, or mask work
- * right to the product. RDA reserves the right to make changes in the
- * software without notification. RDA also make no representation or
- * warranty that such application will be suitable for the specified use
- * without further testing or modification.
- */
- #ifndef _PMIC_BLTC_H_
- #define _PMIC_BLTC_H_
- // Auto generated by dtools(see dtools.txt for its version).
- // Don't edit it manually!
- #define REG_PMIC_BLTC_BASE (0x51108080)
- typedef volatile struct
- {
- uint32_t bltc_ctl; // 0x00000000
- uint32_t bltc_r_prescale; // 0x00000004
- uint32_t bltc_r_duty; // 0x00000008
- uint32_t bltc_r_curve0; // 0x0000000c
- uint32_t bltc_r_curve1; // 0x00000010
- uint32_t bltc_g_prescale; // 0x00000014
- uint32_t bltc_g_duty; // 0x00000018
- uint32_t bltc_g_curve0; // 0x0000001c
- uint32_t bltc_g_curve1; // 0x00000020
- uint32_t bltc_b_prescale; // 0x00000024
- uint32_t bltc_b_duty; // 0x00000028
- uint32_t bltc_b_curve0; // 0x0000002c
- uint32_t bltc_b_curve1; // 0x00000030
- uint32_t bltc_sts; // 0x00000034
- uint32_t bltc_r_isat; // 0x00000038
- uint32_t bltc_g_isat; // 0x0000003c
- uint32_t bltc_b_isat; // 0x00000040
- uint32_t bltc_wled_isat; // 0x00000044
- uint32_t bltc_wled_prescale; // 0x00000048
- uint32_t bltc_wled_duty; // 0x0000004c
- uint32_t bltc_wled_curve0; // 0x00000050
- uint32_t bltc_wled_curve1; // 0x00000054
- uint32_t bltc_pd_ctrl; // 0x00000058
- uint32_t bltc_version; // 0x0000005c
- } HWP_PMIC_BLTC_T;
- #define hwp_pmicBltc ((HWP_PMIC_BLTC_T *)REG_ACCESS_ADDRESS(REG_PMIC_BLTC_BASE))
- // bltc_ctl
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t r_run : 1; // [0]
- uint32_t r_type : 1; // [1]
- uint32_t r_sel : 1; // [2]
- uint32_t r_sw : 1; // [3]
- uint32_t g_run : 1; // [4]
- uint32_t g_type : 1; // [5]
- uint32_t g_sel : 1; // [6]
- uint32_t g_sw : 1; // [7]
- uint32_t b_run : 1; // [8]
- uint32_t b_type : 1; // [9]
- uint32_t b_sel : 1; // [10]
- uint32_t b_sw : 1; // [11]
- uint32_t wled_run : 1; // [12]
- uint32_t wled_type : 1; // [13]
- uint32_t wled_sel : 1; // [14]
- uint32_t wled_sw : 1; // [15]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_CTL_T;
- // bltc_r_prescale
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t prescl : 8; // [7:0]
- uint32_t __31_8 : 24; // [31:8]
- } b;
- } REG_PMIC_BLTC_BLTC_R_PRESCALE_T;
- // bltc_r_duty
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t mode : 8; // [7:0]
- uint32_t duty : 8; // [15:8]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_R_DUTY_T;
- // bltc_r_curve0
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t trise : 6; // [5:0]
- uint32_t __7_6 : 2; // [7:6]
- uint32_t tfall : 6; // [13:8]
- uint32_t __31_14 : 18; // [31:14]
- } b;
- } REG_PMIC_BLTC_BLTC_R_CURVE0_T;
- // bltc_r_curve1
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t thigh : 8; // [7:0]
- uint32_t tlow : 8; // [15:8]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_R_CURVE1_T;
- // bltc_g_prescale
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t prescl : 8; // [7:0]
- uint32_t __31_8 : 24; // [31:8]
- } b;
- } REG_PMIC_BLTC_BLTC_G_PRESCALE_T;
- // bltc_g_duty
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t mode : 8; // [7:0]
- uint32_t duty : 8; // [15:8]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_G_DUTY_T;
- // bltc_g_curve0
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t trise : 6; // [5:0]
- uint32_t __7_6 : 2; // [7:6]
- uint32_t tfall : 6; // [13:8]
- uint32_t __31_14 : 18; // [31:14]
- } b;
- } REG_PMIC_BLTC_BLTC_G_CURVE0_T;
- // bltc_g_curve1
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t thigh : 8; // [7:0]
- uint32_t tlow : 8; // [15:8]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_G_CURVE1_T;
- // bltc_b_prescale
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t prescl : 8; // [7:0]
- uint32_t __31_8 : 24; // [31:8]
- } b;
- } REG_PMIC_BLTC_BLTC_B_PRESCALE_T;
- // bltc_b_duty
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t mode : 8; // [7:0]
- uint32_t duty : 8; // [15:8]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_B_DUTY_T;
- // bltc_b_curve0
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t trise : 6; // [5:0]
- uint32_t __7_6 : 2; // [7:6]
- uint32_t tfall : 6; // [13:8]
- uint32_t __31_14 : 18; // [31:14]
- } b;
- } REG_PMIC_BLTC_BLTC_B_CURVE0_T;
- // bltc_b_curve1
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t thigh : 8; // [7:0]
- uint32_t tlow : 8; // [15:8]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_B_CURVE1_T;
- // bltc_sts
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t bltc_r_busy : 1; // [0], read only
- uint32_t bltc_g_busy : 1; // [1], read only
- uint32_t bltc_b_busy : 1; // [2], read only
- uint32_t bltc_wled_busy : 1; // [3], read only
- uint32_t __31_4 : 28; // [31:4]
- } b;
- } REG_PMIC_BLTC_BLTC_STS_T;
- // bltc_r_isat
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t isat : 6; // [5:0]
- uint32_t __31_6 : 26; // [31:6]
- } b;
- } REG_PMIC_BLTC_BLTC_R_ISAT_T;
- // bltc_g_isat
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t isat : 6; // [5:0]
- uint32_t __31_6 : 26; // [31:6]
- } b;
- } REG_PMIC_BLTC_BLTC_G_ISAT_T;
- // bltc_b_isat
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t isat : 6; // [5:0]
- uint32_t __31_6 : 26; // [31:6]
- } b;
- } REG_PMIC_BLTC_BLTC_B_ISAT_T;
- // bltc_wled_isat
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t isat : 6; // [5:0]
- uint32_t __31_6 : 26; // [31:6]
- } b;
- } REG_PMIC_BLTC_BLTC_WLED_ISAT_T;
- // bltc_wled_prescale
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t prescl : 8; // [7:0]
- uint32_t __31_8 : 24; // [31:8]
- } b;
- } REG_PMIC_BLTC_BLTC_WLED_PRESCALE_T;
- // bltc_wled_duty
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t mode : 8; // [7:0]
- uint32_t duty : 8; // [15:8]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_WLED_DUTY_T;
- // bltc_wled_curve0
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t trise : 6; // [5:0]
- uint32_t __7_6 : 2; // [7:6]
- uint32_t tfall : 6; // [13:8]
- uint32_t __31_14 : 18; // [31:14]
- } b;
- } REG_PMIC_BLTC_BLTC_WLED_CURVE0_T;
- // bltc_wled_curve1
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t thigh : 8; // [7:0]
- uint32_t tlow : 8; // [15:8]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_WLED_CURVE1_T;
- // bltc_pd_ctrl
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t sw_pd : 1; // [0]
- uint32_t hw_pd : 1; // [1]
- uint32_t __31_2 : 30; // [31:2]
- } b;
- } REG_PMIC_BLTC_BLTC_PD_CTRL_T;
- // bltc_version
- typedef union {
- uint32_t v;
- struct
- {
- uint32_t bltc_version : 16; // [15:0]
- uint32_t __31_16 : 16; // [31:16]
- } b;
- } REG_PMIC_BLTC_BLTC_VERSION_T;
- // bltc_ctl
- #define PMIC_BLTC_R_RUN (1 << 0)
- #define PMIC_BLTC_R_TYPE (1 << 1)
- #define PMIC_BLTC_R_SEL (1 << 2)
- #define PMIC_BLTC_R_SW (1 << 3)
- #define PMIC_BLTC_G_RUN (1 << 4)
- #define PMIC_BLTC_G_TYPE (1 << 5)
- #define PMIC_BLTC_G_SEL (1 << 6)
- #define PMIC_BLTC_G_SW (1 << 7)
- #define PMIC_BLTC_B_RUN (1 << 8)
- #define PMIC_BLTC_B_TYPE (1 << 9)
- #define PMIC_BLTC_B_SEL (1 << 10)
- #define PMIC_BLTC_B_SW (1 << 11)
- #define PMIC_BLTC_WLED_RUN (1 << 12)
- #define PMIC_BLTC_WLED_TYPE (1 << 13)
- #define PMIC_BLTC_WLED_SEL (1 << 14)
- #define PMIC_BLTC_WLED_SW (1 << 15)
- // bltc_r_prescale
- #define PMIC_BLTC_PRESCL(n) (((n)&0xff) << 0)
- // bltc_r_duty
- #define PMIC_BLTC_MODE(n) (((n)&0xff) << 0)
- #define PMIC_BLTC_DUTY(n) (((n)&0xff) << 8)
- // bltc_r_curve0
- #define PMIC_BLTC_TRISE(n) (((n)&0x3f) << 0)
- #define PMIC_BLTC_TFALL(n) (((n)&0x3f) << 8)
- // bltc_r_curve1
- #define PMIC_BLTC_THIGH(n) (((n)&0xff) << 0)
- #define PMIC_BLTC_TLOW(n) (((n)&0xff) << 8)
- // bltc_g_prescale
- #define PMIC_BLTC_PRESCL(n) (((n)&0xff) << 0)
- // bltc_g_duty
- #define PMIC_BLTC_MODE(n) (((n)&0xff) << 0)
- #define PMIC_BLTC_DUTY(n) (((n)&0xff) << 8)
- // bltc_g_curve0
- #define PMIC_BLTC_TRISE(n) (((n)&0x3f) << 0)
- #define PMIC_BLTC_TFALL(n) (((n)&0x3f) << 8)
- // bltc_g_curve1
- #define PMIC_BLTC_THIGH(n) (((n)&0xff) << 0)
- #define PMIC_BLTC_TLOW(n) (((n)&0xff) << 8)
- // bltc_b_prescale
- #define PMIC_BLTC_PRESCL(n) (((n)&0xff) << 0)
- // bltc_b_duty
- #define PMIC_BLTC_MODE(n) (((n)&0xff) << 0)
- #define PMIC_BLTC_DUTY(n) (((n)&0xff) << 8)
- // bltc_b_curve0
- #define PMIC_BLTC_TRISE(n) (((n)&0x3f) << 0)
- #define PMIC_BLTC_TFALL(n) (((n)&0x3f) << 8)
- // bltc_b_curve1
- #define PMIC_BLTC_THIGH(n) (((n)&0xff) << 0)
- #define PMIC_BLTC_TLOW(n) (((n)&0xff) << 8)
- // bltc_sts
- #define PMIC_BLTC_BLTC_R_BUSY (1 << 0)
- #define PMIC_BLTC_BLTC_G_BUSY (1 << 1)
- #define PMIC_BLTC_BLTC_B_BUSY (1 << 2)
- #define PMIC_BLTC_BLTC_WLED_BUSY (1 << 3)
- // bltc_r_isat
- #define PMIC_BLTC_ISAT(n) (((n)&0x3f) << 0)
- // bltc_g_isat
- #define PMIC_BLTC_ISAT(n) (((n)&0x3f) << 0)
- // bltc_b_isat
- #define PMIC_BLTC_ISAT(n) (((n)&0x3f) << 0)
- // bltc_wled_isat
- #define PMIC_BLTC_ISAT(n) (((n)&0x3f) << 0)
- // bltc_wled_prescale
- #define PMIC_BLTC_PRESCL(n) (((n)&0xff) << 0)
- // bltc_wled_duty
- #define PMIC_BLTC_MODE(n) (((n)&0xff) << 0)
- #define PMIC_BLTC_DUTY(n) (((n)&0xff) << 8)
- // bltc_wled_curve0
- #define PMIC_BLTC_TRISE(n) (((n)&0x3f) << 0)
- #define PMIC_BLTC_TFALL(n) (((n)&0x3f) << 8)
- // bltc_wled_curve1
- #define PMIC_BLTC_THIGH(n) (((n)&0xff) << 0)
- #define PMIC_BLTC_TLOW(n) (((n)&0xff) << 8)
- // bltc_pd_ctrl
- #define PMIC_BLTC_SW_PD (1 << 0)
- #define PMIC_BLTC_HW_PD (1 << 1)
- // bltc_version
- #define PMIC_BLTC_BLTC_VERSION(n) (((n)&0xffff) << 0)
- #endif // _PMIC_BLTC_H_
|