All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support
@ 2017-02-25 23:52 Icenowy Zheng
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 2/6] sunxi: support RSB on A64 Icenowy Zheng
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Icenowy Zheng @ 2017-02-25 23:52 UTC (permalink / raw)
  To: u-boot

The Makefile of mach-sunxi used to build PRCM and RSB according to the
SoC's MACH_SUNxI macro, which makes it needed to add lines for new SoC
generation.

Change this behavior to invisible options in sunxi Kconfig, so that new
lines are not needed for new SoC. Also it allows more accurate control
of the build of the related sources, for example, V3s (sun8iw8) and R40
(sun8iw11) do not have PRCM at all, and H3 (sun8iw7) do not have RSB,
but these functions are built with the old code.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
 arch/arm/mach-sunxi/Makefile |  7 ++-----
 board/sunxi/Kconfig          | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile
index 7daba1169c..a8bf3a6c64 100644
--- a/arch/arm/mach-sunxi/Makefile
+++ b/arch/arm/mach-sunxi/Makefile
@@ -16,12 +16,9 @@ obj-y	+= pinmux.o
 ifndef CONFIG_MACH_SUN9I
 obj-y	+= usb_phy.o
 endif
-obj-$(CONFIG_MACH_SUN6I)	+= prcm.o
-obj-$(CONFIG_MACH_SUN8I)	+= prcm.o
-obj-$(CONFIG_MACH_SUN9I)	+= prcm.o
+obj-$(CONFIG_SUNXI_HAS_PRCM)	+= prcm.o
 obj-$(CONFIG_MACH_SUN6I)	+= p2wi.o
-obj-$(CONFIG_MACH_SUN8I)	+= rsb.o
-obj-$(CONFIG_MACH_SUN9I)	+= rsb.o
+obj-$(CONFIG_SUNXI_HAS_RSB)	+= rsb.o
 obj-$(CONFIG_MACH_SUN4I)	+= clock_sun4i.o
 obj-$(CONFIG_MACH_SUN5I)	+= clock_sun4i.o
 obj-$(CONFIG_MACH_SUN6I)	+= clock_sun6i.o
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 37b42521a4..acd2bebcdb 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -42,6 +42,18 @@ config SUNXI_GEN_SUN6I
 	separate ahb reset control registers, custom pmic bus, new style
 	watchdog, etc.
 
+config SUNXI_HAS_PRCM
+	bool
+	---help---
+	Select this for sunxi SoCs which have PRCM part, which is
+	sometimes also called "CPUs" part.
+
+config SUNXI_HAS_RSB
+	bool
+	depends on SUNXI_HAS_PRCM
+	---help---
+	Select this for sunxi SoCs which have RSB (Reduced Serial Bus)
+	support.
 
 choice
 	prompt "Sunxi SoC Variant"
@@ -67,6 +79,7 @@ config MACH_SUN6I
 	select ARCH_SUPPORT_PSCI
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
 	select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
 
 config MACH_SUN7I
@@ -87,6 +100,8 @@ config MACH_SUN8I_A23
 	select ARCH_SUPPORT_PSCI
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
+	select SUNXI_HAS_RSB
 	select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
 
 config MACH_SUN8I_A33
@@ -97,6 +112,8 @@ config MACH_SUN8I_A33
 	select ARCH_SUPPORT_PSCI
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
+	select SUNXI_HAS_RSB
 	select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
 
 config MACH_SUN8I_A83T
@@ -104,6 +121,8 @@ config MACH_SUN8I_A83T
 	select CPU_V7
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
+	select SUNXI_HAS_RSB
 
 config MACH_SUN8I_H3
 	bool "sun8i (Allwinner H3)"
@@ -113,6 +132,7 @@ config MACH_SUN8I_H3
 	select ARCH_SUPPORT_PSCI
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
 	select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
 
 config MACH_SUN9I
@@ -120,6 +140,8 @@ config MACH_SUN9I
 	select CPU_V7
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
+	select SUNXI_HAS_RSB
 
 config MACH_SUN50I
 	bool "sun50i (Allwinner A64)"
-- 
2.11.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 2/6] sunxi: support RSB on A64
  2017-02-25 23:52 [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Icenowy Zheng
@ 2017-02-25 23:52 ` Icenowy Zheng
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 3/6] sunxi: add AXP_PMIC_BUS invisible options for AXP PMICs access Icenowy Zheng
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Icenowy Zheng @ 2017-02-25 23:52 UTC (permalink / raw)
  To: u-boot

Allwinner A64 features a RSB controller with pin muxed at PL0/1.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
 arch/arm/mach-sunxi/rsb.c | 2 +-
 board/sunxi/Kconfig       | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-sunxi/rsb.c b/arch/arm/mach-sunxi/rsb.c
index 6fd11f1529..0c7e40acc8 100644
--- a/arch/arm/mach-sunxi/rsb.c
+++ b/arch/arm/mach-sunxi/rsb.c
@@ -20,7 +20,7 @@ static int rsb_set_device_mode(void);
 
 static void rsb_cfg_io(void)
 {
-#ifdef CONFIG_MACH_SUN8I
+#if defined(CONFIG_MACH_SUN8I) || defined(CONFIG_MACH_SUN50I)
 	sunxi_gpio_set_cfgpin(SUNXI_GPL(0), SUN8I_GPL_R_RSB);
 	sunxi_gpio_set_cfgpin(SUNXI_GPL(1), SUN8I_GPL_R_RSB);
 	sunxi_gpio_set_pull(SUNXI_GPL(0), 1);
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index acd2bebcdb..250e2a22f5 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -148,6 +148,8 @@ config MACH_SUN50I
 	select ARM64
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
+	select SUNXI_HAS_RSB
 
 endchoice
 
-- 
2.11.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 3/6] sunxi: add AXP_PMIC_BUS invisible options for AXP PMICs access
  2017-02-25 23:52 [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Icenowy Zheng
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 2/6] sunxi: support RSB on A64 Icenowy Zheng
@ 2017-02-25 23:52 ` Icenowy Zheng
  2017-03-01 10:36   ` Jagan Teki
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 4/6] sunxi: fix an error when setting DLDO on AXP818 Icenowy Zheng
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Icenowy Zheng @ 2017-02-25 23:52 UTC (permalink / raw)
  To: u-boot

For AXP PMICs' drivers some functions are needed to provide I/O access
for the PMIC.

The source file used to be controlled by different AXPxxx_POWER config
option.

Control the file's compliation via a generic AXP_PMIC_BUS option, and
make all AXPxxx_POWER select this option, to prevent furtherly more and
more AXP PMIC names are added to the Makefile of mach-sunxi.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
 arch/arm/mach-sunxi/Makefile |  6 +-----
 drivers/power/Kconfig        | 10 ++++++++++
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile
index a8bf3a6c64..5767f7643f 100644
--- a/arch/arm/mach-sunxi/Makefile
+++ b/arch/arm/mach-sunxi/Makefile
@@ -31,11 +31,7 @@ obj-$(CONFIG_MACH_SUN8I)	+= clock_sun6i.o
 endif
 obj-$(CONFIG_MACH_SUN9I)	+= clock_sun9i.o gtbus_sun9i.o
 
-obj-$(CONFIG_AXP152_POWER)	+= pmic_bus.o
-obj-$(CONFIG_AXP209_POWER)	+= pmic_bus.o
-obj-$(CONFIG_AXP221_POWER)	+= pmic_bus.o
-obj-$(CONFIG_AXP809_POWER)	+= pmic_bus.o
-obj-$(CONFIG_AXP818_POWER)	+= pmic_bus.o
+obj-$(CONFIG_AXP_PMIC_BUS)	+= pmic_bus.o
 
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_MACH_SUN4I)	+= dram_sun4i.o
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index f2c5629be2..442e33ea30 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -6,6 +6,11 @@ source "drivers/power/pmic/Kconfig"
 
 source "drivers/power/regulator/Kconfig"
 
+config AXP_PMIC_BUS
+	bool
+	---help---
+	Select this for code providing PMIC access code for AXP PMICs.
+
 choice
 	prompt "Select Sunxi PMIC Variant"
 	depends on ARCH_SUNXI
@@ -23,6 +28,7 @@ config AXP152_POWER
 	bool "axp152 pmic support"
 	depends on MACH_SUN5I
 	select CMD_POWEROFF
+	select AXP_PMIC_BUS
 	---help---
 	Select this to enable support for the axp152 pmic found on most
 	A10s boards.
@@ -31,6 +37,7 @@ config AXP209_POWER
 	bool "axp209 pmic support"
 	depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
 	select CMD_POWEROFF
+	select AXP_PMIC_BUS
 	---help---
 	Select this to enable support for the axp209 pmic found on most
 	A10, A13 and A20 boards.
@@ -39,6 +46,7 @@ config AXP221_POWER
 	bool "axp221 / axp223 pmic support"
 	depends on MACH_SUN6I || MACH_SUN8I_A23 || MACH_SUN8I_A33
 	select CMD_POWEROFF
+	select AXP_PMIC_BUS
 	---help---
 	Select this to enable support for the axp221/axp223 pmic found on most
 	A23 and A31 boards.
@@ -47,6 +55,7 @@ config AXP809_POWER
 	bool "axp809 pmic support"
 	depends on MACH_SUN9I
 	select CMD_POWEROFF
+	select AXP_PMIC_BUS
 	---help---
 	Say y here to enable support for the axp809 pmic found on A80 boards.
 
@@ -54,6 +63,7 @@ config AXP818_POWER
 	bool "axp818 pmic support"
 	depends on MACH_SUN8I_A83T
 	select CMD_POWEROFF
+	select AXP_PMIC_BUS
 	---help---
 	Say y here to enable support for the axp818 pmic found on
 	A83T dev board.
-- 
2.11.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 4/6] sunxi: fix an error when setting DLDO on AXP818
  2017-02-25 23:52 [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Icenowy Zheng
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 2/6] sunxi: support RSB on A64 Icenowy Zheng
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 3/6] sunxi: add AXP_PMIC_BUS invisible options for AXP PMICs access Icenowy Zheng
@ 2017-02-25 23:52 ` Icenowy Zheng
  2017-02-27  3:40   ` [U-Boot] [linux-sunxi] " Chen-Yu Tsai
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 5/6] sunxi: add AXP803 support based on AXP818 code Icenowy Zheng
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Icenowy Zheng @ 2017-02-25 23:52 UTC (permalink / raw)
  To: u-boot

The driver of AXP818 PMIC have a serious bug when setting DLDOs' voltage
-- the register offset of ELDO is wrongly used instead of DLDO.

Fix this problem.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
 drivers/power/axp818.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c
index af4d7a6903..ad0c330ca5 100644
--- a/drivers/power/axp818.c
+++ b/drivers/power/axp818.c
@@ -162,7 +162,7 @@ int axp_set_dldo(int dldo_num, unsigned int mvolt)
 	cfg = axp818_mvolt_to_cfg(mvolt, 700, 3300, 100);
 	if (dldo_num == 2 && mvolt > 3300)
 		cfg += 1 + axp818_mvolt_to_cfg(mvolt, 3400, 4200, 200);
-	ret = pmic_bus_write(AXP818_ELDO1_CTRL + (dldo_num - 1), cfg);
+	ret = pmic_bus_write(AXP818_DLDO1_CTRL + (dldo_num - 1), cfg);
 	if (ret)
 		return ret;
 
-- 
2.11.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 5/6] sunxi: add AXP803 support based on AXP818 code
  2017-02-25 23:52 [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Icenowy Zheng
                   ` (2 preceding siblings ...)
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 4/6] sunxi: fix an error when setting DLDO on AXP818 Icenowy Zheng
@ 2017-02-25 23:52 ` Icenowy Zheng
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 6/6] sunxi: enable DC1SW in Pine64+ defconfig Icenowy Zheng
  2017-03-01 10:30 ` [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Jagan Teki
  5 siblings, 0 replies; 9+ messages in thread
From: Icenowy Zheng @ 2017-02-25 23:52 UTC (permalink / raw)
  To: u-boot

AXP803 is a PMIC by X-Powers just like AXP818, but with FLDO3 and audio
codec part (not supported by U-Boot) missing.

Add support for it.

The polyphase support for DCDC2/3 is also added, as it's used by the
standard design of A64 boards.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
 arch/arm/mach-sunxi/pmic_bus.c |   9 ++--
 board/sunxi/board.c            |  20 ++++---
 drivers/power/Kconfig          | 116 +++++++++++++++++++++++++++++------------
 drivers/power/Makefile         |   2 +
 drivers/power/axp818.c         |  11 ++++
 include/axp818.h               |   3 ++
 include/axp_pmic.h             |   2 +-
 7 files changed, 117 insertions(+), 46 deletions(-)

diff --git a/arch/arm/mach-sunxi/pmic_bus.c b/arch/arm/mach-sunxi/pmic_bus.c
index 7c57f02792..47551812a2 100644
--- a/arch/arm/mach-sunxi/pmic_bus.c
+++ b/arch/arm/mach-sunxi/pmic_bus.c
@@ -36,7 +36,8 @@ int pmic_bus_init(void)
 	if (!needs_init)
 		return 0;
 
-#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
+#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP803_POWER || \
+	defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
 # ifdef CONFIG_MACH_SUN6I
 	p2wi_init();
 	ret = p2wi_change_to_p2wi_mode(AXP221_CHIP_ADDR, AXP221_CTRL_ADDR,
@@ -62,7 +63,8 @@ int pmic_bus_read(u8 reg, u8 *data)
 	return i2c_read(AXP152_I2C_ADDR, reg, 1, data, 1);
 #elif defined CONFIG_AXP209_POWER
 	return i2c_read(AXP209_I2C_ADDR, reg, 1, data, 1);
-#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
+#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP803_POWER || \
+	defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
 # ifdef CONFIG_MACH_SUN6I
 	return p2wi_read(reg, data);
 # else
@@ -77,7 +79,8 @@ int pmic_bus_write(u8 reg, u8 data)
 	return i2c_write(AXP152_I2C_ADDR, reg, 1, &data, 1);
 #elif defined CONFIG_AXP209_POWER
 	return i2c_write(AXP209_I2C_ADDR, reg, 1, &data, 1);
-#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
+#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP803_POWER || \
+	defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
 # ifdef CONFIG_MACH_SUN6I
 	return p2wi_write(reg, data);
 # else
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 53656383d5..e591c14e32 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -488,25 +488,26 @@ void sunxi_board_init(void)
 
 #if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \
 	defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \
-	defined CONFIG_AXP818_POWER
+	defined CONFIG_AXP803_POWER || defined CONFIG_AXP818_POWER
 	power_failed = axp_init();
 
 #if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \
-	defined CONFIG_AXP818_POWER
+	defined CONFIG_AXP803_POWER || defined CONFIG_AXP818_POWER
 	power_failed |= axp_set_dcdc1(CONFIG_AXP_DCDC1_VOLT);
 #endif
 	power_failed |= axp_set_dcdc2(CONFIG_AXP_DCDC2_VOLT);
 	power_failed |= axp_set_dcdc3(CONFIG_AXP_DCDC3_VOLT);
-#if !defined(CONFIG_AXP209_POWER) && !defined(CONFIG_AXP818_POWER)
+#if !defined(CONFIG_AXP209_POWER) && !defined(CONFIG_AXP818_POWER) && \
+	!defined(CONFIG_AXP803_POWER)
 	power_failed |= axp_set_dcdc4(CONFIG_AXP_DCDC4_VOLT);
 #endif
 #if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \
-	defined CONFIG_AXP818_POWER
+	defined CONFIG_AXP803_POWER || defined CONFIG_AXP818_POWER
 	power_failed |= axp_set_dcdc5(CONFIG_AXP_DCDC5_VOLT);
 #endif
 
 #if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \
-	defined CONFIG_AXP818_POWER
+	defined CONFIG_AXP803_POWER || defined CONFIG_AXP818_POWER
 	power_failed |= axp_set_aldo1(CONFIG_AXP_ALDO1_VOLT);
 #endif
 	power_failed |= axp_set_aldo2(CONFIG_AXP_ALDO2_VOLT);
@@ -518,7 +519,7 @@ void sunxi_board_init(void)
 #endif
 
 #if defined(CONFIG_AXP221_POWER) || defined(CONFIG_AXP809_POWER) || \
-	defined(CONFIG_AXP818_POWER)
+	defined(CONFIG_AXP803_POWER) || defined(CONFIG_AXP818_POWER)
 	power_failed |= axp_set_dldo(1, CONFIG_AXP_DLDO1_VOLT);
 	power_failed |= axp_set_dldo(2, CONFIG_AXP_DLDO2_VOLT);
 #if !defined CONFIG_AXP809_POWER
@@ -530,13 +531,16 @@ void sunxi_board_init(void)
 	power_failed |= axp_set_eldo(3, CONFIG_AXP_ELDO3_VOLT);
 #endif
 
-#ifdef CONFIG_AXP818_POWER
+#if defined CONFIG_AXP803_POWER || defined CONFIG_AXP818_POWER
 	power_failed |= axp_set_fldo(1, CONFIG_AXP_FLDO1_VOLT);
 	power_failed |= axp_set_fldo(2, CONFIG_AXP_FLDO2_VOLT);
+#endif
+#if defined CONFIG_AXP818_POWER
 	power_failed |= axp_set_fldo(3, CONFIG_AXP_FLDO3_VOLT);
 #endif
 
-#if defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
+#if defined CONFIG_AXP803_POWER || defined CONFIG_AXP809_POWER || \
+	defined CONFIG_AXP818_POWER
 	power_failed |= axp_set_sw(IS_ENABLED(CONFIG_AXP_SW_ON));
 #endif
 #endif
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 442e33ea30..843019296d 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -16,8 +16,9 @@ choice
 	depends on ARCH_SUNXI
 	default AXP209_POWER if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
 	default AXP221_POWER if MACH_SUN6I || MACH_SUN8I_A23 || MACH_SUN8I_A33
+	default AXP803_POWER if MACH_SUN50I
 	default AXP818_POWER if MACH_SUN8I_A83T
-	default SUNXI_NO_PMIC if MACH_SUN8I_H3 || MACH_SUN50I
+	default SUNXI_NO_PMIC if MACH_SUN8I_H3
 
 config SUNXI_NO_PMIC
 	bool "board without a pmic"
@@ -51,6 +52,15 @@ config AXP221_POWER
 	Select this to enable support for the axp221/axp223 pmic found on most
 	A23 and A31 boards.
 
+config AXP803_POWER
+	bool "axp803 pmic support"
+	depends on MACH_SUN50I
+	select CMD_POWEROFF
+	select AXP_PMIC_BUS
+	---help---
+	Say y here to enable support for the axp803 pmic found on most A64
+	boards.
+
 config AXP809_POWER
 	bool "axp809 pmic support"
 	depends on MACH_SUN9I
@@ -79,8 +89,8 @@ endchoice
 
 config AXP_DCDC1_VOLT
 	int "axp pmic dcdc1 voltage"
-	depends on AXP221_POWER || AXP809_POWER || AXP818_POWER
-	default 3300 if AXP818_POWER
+	depends on AXP221_POWER || AXP809_POWER || AXP803_POWER || AXP818_POWER
+	default 3300 if AXP818_POWER || AXP803_POWER
 	default 3000 if MACH_SUN6I || MACH_SUN8I || MACH_SUN9I
 	---help---
 	Set the voltage (mV) to program the axp pmic dcdc1 at, set to 0 to
@@ -89,15 +99,18 @@ config AXP_DCDC1_VOLT
 	sdcard interfaces, etc. On most boards dcdc1 is undervolted to 3.0V to
 	save battery. On A31 devices dcdc1 is also used for VCC-IO. On A83T
 	dcdc1 is used for VCC-IO, nand, usb0, sd , etc. On A80 dcdc1 normally
-	powers some of the pingroups, NAND/eMMC, SD/MMC, and USB OTG.
+	powers some of the pingroups, NAND/eMMC, SD/MMC, and USB OTG. On A64
+	dcdc1 is usually the generic 3.3V IO voltage for devices such as
+	eMMC, SD card and some pingroups.
 
 config AXP_DCDC2_VOLT
 	int "axp pmic dcdc2 voltage"
-	depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || \
+		AXP803_POWER || AXP809_POWER || AXP818_POWER
 	default 900 if AXP818_POWER
 	default 1400 if AXP152_POWER || AXP209_POWER
 	default 1200 if MACH_SUN6I
-	default 1100 if MACH_SUN8I
+	default 1100 if MACH_SUN8I || AXP803_POWER
 	default 0 if MACH_SUN9I
 	---help---
 	Set the voltage (mV) to program the axp pmic dcdc2 at, set to 0 to
@@ -107,14 +120,17 @@ config AXP_DCDC2_VOLT
 	On A23/A33 boards dcdc2 is used for VDD-SYS and should be 1.1V.
 	On A80 boards dcdc2 powers the GPU and can be left off.
 	On A83T boards dcdc2 is used for VDD-CPUA(cluster 0) and should be 0.9V.
+	On A64 boards dcdc2 is used for VDD-CPU with dcdc3 and should be 1.1V.
 
 config AXP_DCDC3_VOLT
 	int "axp pmic dcdc3 voltage"
-	depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || \
+		AXP803_POWER || AXP809_POWER || AXP818_POWER
 	default 900 if AXP809_POWER || AXP818_POWER
 	default 1500 if AXP152_POWER
 	default 1250 if AXP209_POWER
 	default 1200 if MACH_SUN6I || MACH_SUN8I
+	default 1100 if AXP803_POWER
 	---help---
 	Set the voltage (mV) to program the axp pmic dcdc3 at, set to 0 to
 	disable dcdc3.
@@ -124,37 +140,54 @@ config AXP_DCDC3_VOLT
 	On A23 / A31 / A33 boards dcdc3 is VDD-CPU and should be 1.2V.
 	On A80 boards dcdc3 is used for VDD-CPUA(cluster 0) and should be 0.9V.
 	On A83T boards dcdc3 is used for VDD-CPUB(cluster 1) and should be 0.9V.
+	On A64 boards dcdc3 is used for VDD-CPU with dcdc2 and should be 1.1V.
+
+config AXP_DCDC23_POLYPHASE
+	bool "axp pmic dcdc2 and dcdc3 is polyphase"
+	depends on AXP803_POWER || AXP818_POWER
+	default y if AXP803_POWER
+	default n if AXP818_POWER
+	---help---
+	Select this option if dcdc2 and dcdc3 is dual-phase DCDC (connected
+	together to power up one device).
+	On A83T boards dcdc2 and dcdc3 is for different CPU cluster, so this
+	option should be not selected.
+	On A64 boards dcdc2 and dcdc3 is both used for the only CPU cluster of
+	VDD-CPUX, and they're really dual-phase DCDC, so it should be selected.
 
 config AXP_DCDC4_VOLT
 	int "axp pmic dcdc4 voltage"
-	depends on AXP152_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP152_POWER || AXP221_POWER || AXP803_POWER || \
+		AXP809_POWER || AXP818_POWER
 	default 1250 if AXP152_POWER
 	default 1200 if MACH_SUN6I
-	default 0 if MACH_SUN8I
+	default 0 if MACH_SUN8I || AXP803_POWER
 	default 900 if MACH_SUN9I
 	---help---
 	Set the voltage (mV) to program the axp pmic dcdc4 at, set to 0 to
 	disable dcdc4.
 	On A10s boards with an axp152 dcdc4 is VDD-INT-DLL and should be 1.25V.
 	On A31 boards dcdc4 is used for VDD-SYS and should be 1.2V.
-	On A23 / A33 boards dcdc4 is unused and should be disabled.
+	On A23 / A33 / A64 boards dcdc4 is unused and should be disabled.
 	On A80 boards dcdc4 powers VDD-SYS, HDMI, USB OTG and should be 0.9V.
 	On A83T boards dcdc4 is used for VDD-GPU.
 
 config AXP_DCDC5_VOLT
 	int "axp pmic dcdc5 voltage"
-	depends on AXP221_POWER || AXP809_POWER || AXP818_POWER
-	default 1500 if MACH_SUN6I || MACH_SUN8I || MACH_SUN9I
+	depends on AXP221_POWER || AXP809_POWER || AXP803_POWER || \
+		AXP818_POWER
+	default 1500 if MACH_SUN6I || MACH_SUN8I || MACH_SUN9I || AXP803_POWER
 	---help---
 	Set the voltage (mV) to program the axp pmic dcdc5 at, set to 0 to
 	disable dcdc5.
-	On A23 / A31 / A33 / A80 / A83T boards dcdc5 is VCC-DRAM and
+	On A23 / A31 / A33 / A80 / A83T / A64 boards dcdc5 is VCC-DRAM and
 	should be 1.5V, 1.35V if DDR3L is used.
 
 config AXP_ALDO1_VOLT
 	int "axp pmic (a)ldo1 voltage"
-	depends on AXP221_POWER || AXP809_POWER || AXP818_POWER
-	default 0 if MACH_SUN6I
+	depends on AXP221_POWER || AXP809_POWER || AXP803_POWER || \
+		AXP818_POWER
+	default 0 if MACH_SUN6I || AXP803_POWER
 	default 1800 if MACH_SUN8I_A83T
 	default 3000 if MACH_SUN8I || MACH_SUN9I
 	---help---
@@ -165,13 +198,16 @@ config AXP_ALDO1_VOLT
 	On A80 boards aldo1 powers the USB hosts and should be 3.0V.
 	On A83T / H8 boards aldo1 is used for MIPI CSI, DSI, HDMI, EFUSE, and
 	should be 1.8V.
+	On A64 boards aldo1 is used for CSI and PE pingroup, and can be left
+	disabled when booting.
 
 config AXP_ALDO2_VOLT
 	int "axp pmic (a)ldo2 voltage"
-	depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || \
+		AXP803_POWER || AXP809_POWER || AXP818_POWER
 	default 3000 if AXP152_POWER || AXP209_POWER
 	default 0 if MACH_SUN6I || MACH_SUN9I
-	default 1800 if MACH_SUN8I_A83T
+	default 1800 if MACH_SUN8I_A83T || AXP803_POWER
 	default 2500 if MACH_SUN8I
 	---help---
 	Set the voltage (mV) to program the axp pmic aldo2 at, set to 0 to
@@ -183,17 +219,20 @@ config AXP_ALDO2_VOLT
 	On A80 boards aldo2 powers PB pingroup and camera IO and can be left off.
 	On A83T / H8 boards aldo2 powers VDD-DLL, VCC18-PLL, CPVDD, VDD18-ADC,
 	LPDDR2, and the codec. It should be 1.8V.
+	On A64 boards aldo2 powers PL pingroup and should be 1.8V.
 
 config AXP_ALDO3_VOLT
 	int "axp pmic (a)ldo3 voltage"
-	depends on AXP209_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP209_POWER || AXP221_POWER || AXP803_POWER || \
+		AXP809_POWER || AXP818_POWER
 	default 0 if AXP209_POWER || MACH_SUN9I
-	default 3000 if MACH_SUN6I || MACH_SUN8I
+	default 3000 if MACH_SUN6I || MACH_SUN8I || AXP803_POWER
 	---help---
 	Set the voltage (mV) to program the axp pmic aldo3 at, set to 0 to
 	disable aldo3.
 	On A10(s) / A13 / A20 boards aldo3 should be 2.8V.
-	On A23 / A31 / A33 boards aldo3 is VCC-PLL and AVCC and should be 3.0V.
+	On A23 / A31 / A33 / A64 boards aldo3 is VCC-PLL and AVCC and should
+	be 3.0V.
 	On A80 boards aldo3 is normally not used.
 	On A83T / H8 boards aldo3 is AVCC, VCC-PL, and VCC-LED, and should be
 	3.0V.
@@ -209,27 +248,30 @@ config AXP_ALDO4_VOLT
 
 config AXP_DLDO1_VOLT
 	int "axp pmic dldo1 voltage"
-	depends on AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP221_POWER || AXP803_POWER || AXP809_POWER || AXP818_POWER
 	default 0
 	---help---
 	Set the voltage (mV) to program the axp pmic dldo1 at, set to 0 to
 	disable dldo1. On sun6i (A31) boards with ethernet dldo1 is often used
 	to power the ethernet phy. On A23, A33 and A80 boards this is often
-	used to power the wifi.
+	used to power the wifi. On A64 boards this is often used to power the
+	HDMI.
 
 config AXP_DLDO2_VOLT
 	int "axp pmic dldo2 voltage"
-	depends on AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP221_POWER || AXP803_POWER || AXP809_POWER || AXP818_POWER
 	default 3000 if MACH_SUN9I
 	default 0
 	---help---
 	Set the voltage (mV) to program the axp pmic dldo2 at, set to 0 to
 	disable dldo2.
 	On A80 boards dldo2 normally powers the PL pins and should be 3.0V.
+	On A64 boards dldo2 is normally used to power serial interface display
+	(MIPI or eDP over ANX6345 bridge).
 
 config AXP_DLDO3_VOLT
 	int "axp pmic dldo3 voltage"
-	depends on AXP221_POWER || AXP818_POWER
+	depends on AXP221_POWER || AXP803_POWER || AXP818_POWER
 	default 0
 	---help---
 	Set the voltage (mV) to program the axp pmic dldo3 at, set to 0 to
@@ -237,7 +279,7 @@ config AXP_DLDO3_VOLT
 
 config AXP_DLDO4_VOLT
 	int "axp pmic dldo4 voltage"
-	depends on AXP221_POWER || AXP818_POWER
+	depends on AXP221_POWER || AXP803_POWER || AXP818_POWER
 	default 0
 	---help---
 	Set the voltage (mV) to program the axp pmic dldo4 at, set to 0 to
@@ -245,15 +287,18 @@ config AXP_DLDO4_VOLT
 
 config AXP_ELDO1_VOLT
 	int "axp pmic eldo1 voltage"
-	depends on AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP221_POWER || AXP803_POWER || AXP809_POWER || AXP818_POWER
+	default 1800 if AXP803_POWER
 	default 0
 	---help---
 	Set the voltage (mV) to program the axp pmic eldo1 at, set to 0 to
 	disable eldo1.
+	On A64 boards eldo1 is normally used for CPVDD and LPDDR and should be
+	1.8V.
 
 config AXP_ELDO2_VOLT
 	int "axp pmic eldo2 voltage"
-	depends on AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP221_POWER || AXP803_POWER || AXP809_POWER || AXP818_POWER
 	default 0
 	---help---
 	Set the voltage (mV) to program the axp pmic eldo2 at, set to 0 to
@@ -261,7 +306,7 @@ config AXP_ELDO2_VOLT
 
 config AXP_ELDO3_VOLT
 	int "axp pmic eldo3 voltage"
-	depends on AXP221_POWER || AXP809_POWER || AXP818_POWER
+	depends on AXP221_POWER || AXP803_POWER || AXP809_POWER || AXP818_POWER
 	default 3000 if MACH_SUN9I
 	default 0
 	---help---
@@ -273,22 +318,25 @@ config AXP_ELDO3_VOLT
 
 config AXP_FLDO1_VOLT
 	int "axp pmic fldo1 voltage"
-	depends on AXP818_POWER
-	default 0 if MACH_SUN8I_A83T
+	depends on AXP803_POWER || AXP818_POWER
+	default 0
 	---help---
 	Set the voltage (mV) to program the axp pmic fldo1 at, set to 0 to
 	disable fldo1.
-	On A83T / H8 boards fldo1 is VCC-HSIC and should be 1.2V if HSIC is
-	used.
+	On A83T / H8 / A64 boards fldo1 is VCC-HSIC and should be 1.2V if HSIC
+	is used. On some A64 board fldo1 is also used to power the ANX6345
+	RGB-eDP bridge.
 
 config AXP_FLDO2_VOLT
 	int "axp pmic fldo2 voltage"
-	depends on AXP818_POWER
+	depends on AXP803_POWER || AXP818_POWER
 	default 900 if MACH_SUN8I_A83T
+	default 1100 if MACH_SUN50I
 	---help---
 	Set the voltage (mV) to program the axp pmic fldo2 at, set to 0 to
 	disable fldo2.
 	On A83T / H8 boards fldo2 is VCC-CPUS and should be 0.9V.
+	On A64 boards fldo2 is VCC-CPUS and should be 1.1V.
 
 config AXP_FLDO3_VOLT
 	int "axp pmic fldo3 voltage"
@@ -300,7 +348,7 @@ config AXP_FLDO3_VOLT
 
 config AXP_SW_ON
 	bool "axp pmic sw on"
-	depends on AXP809_POWER || AXP818_POWER
+	depends on AXP803_POWER || AXP809_POWER || AXP818_POWER
 	default n
 	---help---
 	Enable to turn on axp pmic sw.
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index b43523e628..2c10544b73 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -11,6 +11,8 @@ obj-$(CONFIG_AXP209_POWER)	+= axp209.o
 obj-$(CONFIG_AXP221_POWER)	+= axp221.o
 obj-$(CONFIG_AXP809_POWER)	+= axp809.o
 obj-$(CONFIG_AXP818_POWER)	+= axp818.o
+# AXP803 shares the driver of AXP818
+obj-$(CONFIG_AXP803_POWER)	+= axp818.o
 obj-$(CONFIG_EXYNOS_TMU)	+= exynos-tmu.o
 obj-$(CONFIG_FTPMU010_POWER)	+= ftpmu010.o
 obj-$(CONFIG_SY8106A_POWER)	+= sy8106a.o
diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c
index ad0c330ca5..a845a63d54 100644
--- a/drivers/power/axp818.c
+++ b/drivers/power/axp818.c
@@ -199,6 +199,11 @@ int axp_set_fldo(int fldo_num, unsigned int mvolt)
 	if (fldo_num < 1 || fldo_num > 3)
 		return -EINVAL;
 
+#ifdef CONFIG_AXP803_POWER
+	if (fldo_num == 3)
+		return -EINVAL; /* AXP803 do not have FLDO3 */
+#endif
+
 	if (mvolt == 0)
 		return pmic_bus_clrbits(AXP818_OUTPUT_CTRL3,
 				AXP818_OUTPUT_CTRL3_FLDO1_EN << (fldo_num - 1));
@@ -253,6 +258,12 @@ int axp_init(void)
 	else
 		return ret;
 
+#ifdef CONFIG_AXP_DCDC23_POLYPHASE
+	ret = pmic_bus_setbits(AXP818_POLYPHASE_CTRL, AXP818_POLYPHASE_DCDC23);
+	if (ret)
+		return ret;
+#endif
+
 	return 0;
 }
 
diff --git a/include/axp818.h b/include/axp818.h
index 959774c76f..2411f5daa4 100644
--- a/include/axp818.h
+++ b/include/axp818.h
@@ -33,6 +33,9 @@
 #define AXP818_OUTPUT_CTRL3_ALDO2_EN	(1 << 6)
 #define AXP818_OUTPUT_CTRL3_ALDO3_EN	(1 << 7)
 
+#define AXP818_POLYPHASE_CTRL	0x14
+#define AXP818_POLYPHASE_DCDC23	(1 << 6)
+
 #define AXP818_DLDO1_CTRL	0x15
 #define AXP818_DLDO2_CTRL	0x16
 #define AXP818_DLDO3_CTRL	0x17
diff --git a/include/axp_pmic.h b/include/axp_pmic.h
index d789ad8086..943bd93396 100644
--- a/include/axp_pmic.h
+++ b/include/axp_pmic.h
@@ -19,7 +19,7 @@
 #ifdef CONFIG_AXP809_POWER
 #include <axp809.h>
 #endif
-#ifdef CONFIG_AXP818_POWER
+#if defined CONFIG_AXP818_POWER || defined CONFIG_AXP803_POWER
 #include <axp818.h>
 #endif
 
-- 
2.11.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 6/6] sunxi: enable DC1SW in Pine64+ defconfig
  2017-02-25 23:52 [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Icenowy Zheng
                   ` (3 preceding siblings ...)
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 5/6] sunxi: add AXP803 support based on AXP818 code Icenowy Zheng
@ 2017-02-25 23:52 ` Icenowy Zheng
  2017-03-01 10:30 ` [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Jagan Teki
  5 siblings, 0 replies; 9+ messages in thread
From: Icenowy Zheng @ 2017-02-25 23:52 UTC (permalink / raw)
  To: u-boot

Pine64 boards needs DC1SW to be enabled for the ethernet PHY to work.

Enable it in the defconfig.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
 configs/pine64_plus_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
index 7c7d86ff80..01c8368e2d 100644
--- a/configs/pine64_plus_defconfig
+++ b/configs/pine64_plus_defconfig
@@ -13,4 +13,5 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN8I_EMAC=y
+CONFIG_AXP_SW_ON=y
 CONFIG_USB_EHCI_HCD=y
-- 
2.11.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [linux-sunxi] [PATCH v2 4/6] sunxi: fix an error when setting DLDO on AXP818
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 4/6] sunxi: fix an error when setting DLDO on AXP818 Icenowy Zheng
@ 2017-02-27  3:40   ` Chen-Yu Tsai
  0 siblings, 0 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2017-02-27  3:40 UTC (permalink / raw)
  To: u-boot

On Sun, Feb 26, 2017 at 7:52 AM, Icenowy Zheng <icenowy@aosc.xyz> wrote:
> The driver of AXP818 PMIC have a serious bug when setting DLDOs' voltage
> -- the register offset of ELDO is wrongly used instead of DLDO.
>
> Fix this problem.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support
  2017-02-25 23:52 [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Icenowy Zheng
                   ` (4 preceding siblings ...)
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 6/6] sunxi: enable DC1SW in Pine64+ defconfig Icenowy Zheng
@ 2017-03-01 10:30 ` Jagan Teki
  5 siblings, 0 replies; 9+ messages in thread
From: Jagan Teki @ 2017-03-01 10:30 UTC (permalink / raw)
  To: u-boot

On Sun, Feb 26, 2017 at 5:22 AM, Icenowy Zheng <icenowy@aosc.xyz> wrote:
> The Makefile of mach-sunxi used to build PRCM and RSB according to the
> SoC's MACH_SUNxI macro, which makes it needed to add lines for new SoC
> generation.
>
> Change this behavior to invisible options in sunxi Kconfig, so that new
> lines are not needed for new SoC. Also it allows more accurate control
> of the build of the related sources, for example, V3s (sun8iw8) and R40
> (sun8iw11) do not have PRCM at all, and H3 (sun8iw7) do not have RSB,
> but these functions are built with the old code.

Since H3 doesn't have RSB how should it implement or use the RCB
functionalities? what do you mean by old code here?

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 3/6] sunxi: add AXP_PMIC_BUS invisible options for AXP PMICs access
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 3/6] sunxi: add AXP_PMIC_BUS invisible options for AXP PMICs access Icenowy Zheng
@ 2017-03-01 10:36   ` Jagan Teki
  0 siblings, 0 replies; 9+ messages in thread
From: Jagan Teki @ 2017-03-01 10:36 UTC (permalink / raw)
  To: u-boot

On Sun, Feb 26, 2017 at 5:22 AM, Icenowy Zheng <icenowy@aosc.xyz> wrote:
> For AXP PMICs' drivers some functions are needed to provide I/O access
> for the PMIC.
>
> The source file used to be controlled by different AXPxxx_POWER config
> option.
>
> Control the file's compliation via a generic AXP_PMIC_BUS option, and
> make all AXPxxx_POWER select this option, to prevent furtherly more and
> more AXP PMIC names are added to the Makefile of mach-sunxi.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
> ---
>  arch/arm/mach-sunxi/Makefile |  6 +-----
>  drivers/power/Kconfig        | 10 ++++++++++
>  2 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile
> index a8bf3a6c64..5767f7643f 100644
> --- a/arch/arm/mach-sunxi/Makefile
> +++ b/arch/arm/mach-sunxi/Makefile
> @@ -31,11 +31,7 @@ obj-$(CONFIG_MACH_SUN8I)     += clock_sun6i.o
>  endif
>  obj-$(CONFIG_MACH_SUN9I)       += clock_sun9i.o gtbus_sun9i.o
>
> -obj-$(CONFIG_AXP152_POWER)     += pmic_bus.o
> -obj-$(CONFIG_AXP209_POWER)     += pmic_bus.o
> -obj-$(CONFIG_AXP221_POWER)     += pmic_bus.o
> -obj-$(CONFIG_AXP809_POWER)     += pmic_bus.o
> -obj-$(CONFIG_AXP818_POWER)     += pmic_bus.o
> +obj-$(CONFIG_AXP_PMIC_BUS)     += pmic_bus.o
>
>  ifdef CONFIG_SPL_BUILD
>  obj-$(CONFIG_MACH_SUN4I)       += dram_sun4i.o
> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
> index f2c5629be2..442e33ea30 100644
> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -6,6 +6,11 @@ source "drivers/power/pmic/Kconfig"
>
>  source "drivers/power/regulator/Kconfig"
>
> +config AXP_PMIC_BUS
> +       bool
> +       ---help---
> +       Select this for code providing PMIC access code for AXP PMICs.

No, better to move this pmic driver to drivers/power or if possible
use the existing drivers/power/axp*.c

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-03-01 10:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-25 23:52 [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Icenowy Zheng
2017-02-25 23:52 ` [U-Boot] [PATCH v2 2/6] sunxi: support RSB on A64 Icenowy Zheng
2017-02-25 23:52 ` [U-Boot] [PATCH v2 3/6] sunxi: add AXP_PMIC_BUS invisible options for AXP PMICs access Icenowy Zheng
2017-03-01 10:36   ` Jagan Teki
2017-02-25 23:52 ` [U-Boot] [PATCH v2 4/6] sunxi: fix an error when setting DLDO on AXP818 Icenowy Zheng
2017-02-27  3:40   ` [U-Boot] [linux-sunxi] " Chen-Yu Tsai
2017-02-25 23:52 ` [U-Boot] [PATCH v2 5/6] sunxi: add AXP803 support based on AXP818 code Icenowy Zheng
2017-02-25 23:52 ` [U-Boot] [PATCH v2 6/6] sunxi: enable DC1SW in Pine64+ defconfig Icenowy Zheng
2017-03-01 10:30 ` [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Jagan Teki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.