Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1595830 > unrolled thread
| Started by | Elaine Zhang <zhangqing@rock-chips.com> |
|---|---|
| First post | 2017-03-09 10:30 +0100 |
| Last post | 2017-03-09 11:10 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v1 0/4] rk808: Add RK805 support Elaine Zhang <zhangqing@rock-chips.com> - 2017-03-09 10:30 +0100
[PATCH v1 2/4] linux: mfd: rk808: add rk805 regs addr and ID Elaine Zhang <zhangqing@rock-chips.com> - 2017-03-09 10:30 +0100
Re: [PATCH v1 0/4] rk808: Add RK805 support Wadim Egorov <w.egorov@phytec.de> - 2017-03-09 11:10 +0100
| From | Elaine Zhang <zhangqing@rock-chips.com> |
|---|---|
| Date | 2017-03-09 10:30 +0100 |
| Subject | [PATCH v1 0/4] rk808: Add RK805 support |
| Message-ID | <tj25s-2Nj-27@gated-at.bofh.it> |
Elaine Zhang (4): mfd: rk808: fix up the chip id get failed linux: mfd: rk808: add rk805 regs addr and ID regulator: rk808: Add regulator driver for RK805 mfd: rk808: Add RK805 support drivers/clk/Kconfig | 4 +- drivers/mfd/Kconfig | 4 +- drivers/mfd/rk808.c | 130 ++++++++++++++++++++++++++++++++++-- drivers/regulator/Kconfig | 4 +- drivers/regulator/rk808-regulator.c | 66 ++++++++++++++++++ drivers/rtc/Kconfig | 4 +- include/linux/mfd/rk808.h | 92 +++++++++++++++++++++++++ 7 files changed, 290 insertions(+), 14 deletions(-) -- 1.9.1
[toc] | [next] | [standalone]
| From | Elaine Zhang <zhangqing@rock-chips.com> |
|---|---|
| Date | 2017-03-09 10:30 +0100 |
| Subject | [PATCH v1 2/4] linux: mfd: rk808: add rk805 regs addr and ID |
| Message-ID | <tj2yv-3cS-29@gated-at.bofh.it> |
| In reply to | #1595830 |
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
include/linux/mfd/rk808.h | 91 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
index 54feb140c210..7f4bab38c1d6 100644
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -206,6 +206,89 @@ enum rk818_reg {
#define RK818_USB_ILMIN_2000MA 0x7
#define RK818_USB_CHG_SD_VSEL_MASK 0x70
+/* RK805 */
+enum rk805_reg {
+ RK805_ID_DCDC1,
+ RK805_ID_DCDC2,
+ RK805_ID_DCDC3,
+ RK805_ID_DCDC4,
+ RK805_ID_LDO1,
+ RK805_ID_LDO2,
+ RK805_ID_LDO3,
+};
+
+/* INTERRUPT REGISTER */
+#define RK805_INT_STS_REG 0x4C
+#define RK805_INT_STS_MSK_REG 0x4D
+#define RK805_GPIO_IO_POL_REG 0x50
+#define RK805_OUT_REG 0x52
+#define RK805_ON_SOURCE_REG 0xAE
+#define RK805_OFF_SOURCE_REG 0xAF
+
+/* POWER CHANNELS ENABLE REGISTER */
+#define RK805_DCDC_EN_REG 0x23
+#define RK805_SLP_DCDC_EN_REG 0x25
+#define RK805_SLP_LDO_EN_REG 0x26
+#define RK805_LDO_EN_REG 0x27
+
+/* CONFIG REGISTER */
+#define RK805_THERMAL_REG 0x22
+
+/* BUCK AND LDO CONFIG REGISTER */
+#define RK805_BUCK_LDO_SLP_LP_EN_REG 0x2A
+#define RK805_BUCK1_CONFIG_REG 0x2E
+#define RK805_BUCK1_ON_VSEL_REG 0x2F
+#define RK805_BUCK1_SLP_VSEL_REG 0x30
+#define RK805_BUCK2_CONFIG_REG 0x32
+#define RK805_BUCK2_ON_VSEL_REG 0x33
+#define RK805_BUCK2_SLP_VSEL_REG 0x34
+#define RK805_BUCK3_CONFIG_REG 0x36
+#define RK805_BUCK4_CONFIG_REG 0x37
+#define RK805_BUCK4_ON_VSEL_REG 0x38
+#define RK805_BUCK4_SLP_VSEL_REG 0x39
+#define RK805_LDO1_ON_VSEL_REG 0x3B
+#define RK805_LDO1_SLP_VSEL_REG 0x3C
+#define RK805_LDO2_ON_VSEL_REG 0x3D
+#define RK805_LDO2_SLP_VSEL_REG 0x3E
+#define RK805_LDO3_ON_VSEL_REG 0x3F
+#define RK805_LDO3_SLP_VSEL_REG 0x40
+#define RK805_OUT_REG 0x52
+#define RK805_ON_SOURCE_REG 0xAE
+#define RK805_OFF_SOURCE_REG 0xAF
+
+#define RK805_NUM_REGULATORS 7
+
+#define RK805_PWRON_FALL_RISE_INT_EN 0x0
+#define RK805_PWRON_FALL_RISE_INT_MSK 0x81
+
+/* RK805 IRQ Definitions */
+#define RK805_IRQ_PWRON_RISE 0
+#define RK805_IRQ_VB_LOW 1
+#define RK805_IRQ_PWRON 2
+#define RK805_IRQ_PWRON_LP 3
+#define RK805_IRQ_HOTDIE 4
+#define RK805_IRQ_RTC_ALARM 5
+#define RK805_IRQ_RTC_PERIOD 6
+#define RK805_IRQ_PWRON_FALL 7
+
+#define RK805_IRQ_PWRON_RISE_MSK BIT(0)
+#define RK805_IRQ_VB_LOW_MSK BIT(1)
+#define RK805_IRQ_PWRON_MSK BIT(2)
+#define RK805_IRQ_PWRON_LP_MSK BIT(3)
+#define RK805_IRQ_HOTDIE_MSK BIT(4)
+#define RK805_IRQ_RTC_ALARM_MSK BIT(5)
+#define RK805_IRQ_RTC_PERIOD_MSK BIT(6)
+#define RK805_IRQ_PWRON_FALL_MSK BIT(7)
+
+#define RK805_PWR_RISE_INT_STATUS BIT(0)
+#define RK805_VB_LOW_INT_STATUS BIT(1)
+#define RK805_PWRON_INT_STATUS BIT(2)
+#define RK805_PWRON_LP_INT_STATUS BIT(3)
+#define RK805_HOTDIE_INT_STATUS BIT(4)
+#define RK805_ALARM_INT_STATUS BIT(5)
+#define RK805_PERIOD_INT_STATUS BIT(6)
+#define RK805_PWR_FALL_INT_STATUS BIT(7)
+
/* RK808 IRQ Definitions */
#define RK808_IRQ_VOUT_LO 0
#define RK808_IRQ_VB_LO 1
@@ -298,7 +381,14 @@ enum rk818_reg {
#define VOUT_LO_INT BIT(0)
#define CLK32KOUT2_EN BIT(0)
+#define TEMP115C 0x0c
+#define TEMP_HOTDIE_MSK 0x0c
+#define SLP_SD_MSK (0x3 << 2)
+#define SHUTDOWN_FUN (0x2 << 2)
+#define SLEEP_FUN (0x1 << 2)
#define RK8XX_ID_MSK 0xfff0
+#define FPWM_MODE BIT(7)
+
enum {
BUCK_ILMIN_50MA,
BUCK_ILMIN_100MA,
@@ -322,6 +412,7 @@ enum {
};
enum {
+ RK805_ID = 0x8050,
RK808_ID = 0x0000,
RK818_ID = 0x8181,
};
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Wadim Egorov <w.egorov@phytec.de> |
|---|---|
| Date | 2017-03-09 11:10 +0100 |
| Message-ID | <tj3bc-3I3-27@gated-at.bofh.it> |
| In reply to | #1595830 |
Hi Elaine, you should also add the RK805 to the device tree bindings documentation in Documentation/devicetree/bindings/mfd/rk808.txt Regards, Wadim Am 09.03.2017 um 09:49 schrieb Elaine Zhang: > Elaine Zhang (4): > mfd: rk808: fix up the chip id get failed > linux: mfd: rk808: add rk805 regs addr and ID > regulator: rk808: Add regulator driver for RK805 > mfd: rk808: Add RK805 support > > drivers/clk/Kconfig | 4 +- > drivers/mfd/Kconfig | 4 +- > drivers/mfd/rk808.c | 130 ++++++++++++++++++++++++++++++++++-- > drivers/regulator/Kconfig | 4 +- > drivers/regulator/rk808-regulator.c | 66 ++++++++++++++++++ > drivers/rtc/Kconfig | 4 +- > include/linux/mfd/rk808.h | 92 +++++++++++++++++++++++++ > 7 files changed, 290 insertions(+), 14 deletions(-) >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web