sunxi: Kconfig-ify CONFIG_AXP152_POWER and _AXP209_POWER
Subsystems (5)
PATCH 1/7 sunxi: Kconfig-ify CONFIG_AXP152_POWER and _AXP209_POWER
Kconfig-ify CONFIG_AXP152_POWER and _AXP209_POWER settings, removing them from CONFIG_SYS_EXTRA_OPTIONS.
Note that sun5i boards can have either an AXP209 or an AXP152 pmic, so there is no default for these in Kconfig, and the board-defconfig must always select one (except on the rare pmic-less board).
--- configs/A10-OLinuXino-Lime_defconfig | 2 +- configs/A10s-OLinuXino-M_defconfig | 3 ++- configs/A13-OLinuXino_defconfig | 3 ++- configs/A20-OLinuXino-Lime2_defconfig | 2 +- configs/A20-OLinuXino-Lime_defconfig | 2 +- configs/A20-OLinuXino_MICRO_defconfig | 2 +- configs/A20-Olimex-SOM-EVB_defconfig | 2 +- configs/Ainol_AW1_defconfig | 1 - configs/Ampe_A76_defconfig | 3 ++- configs/Auxtek-T003_defconfig | 2 +- configs/Auxtek-T004_defconfig | 2 +- configs/Bananapi_defconfig | 2 +- configs/Bananapro_defconfig | 2 +- configs/Chuwi_V7_CW0825_defconfig | 1 - configs/Cubieboard2_defconfig | 2 +- configs/Cubieboard_defconfig | 2 +- configs/Cubietruck_defconfig | 2 +- configs/Hyundai_A7HD_defconfig | 1 - configs/Linksprite_pcDuino3_Nano_defconfig | 2 +- configs/Linksprite_pcDuino3_defconfig | 2 +- configs/Linksprite_pcDuino_defconfig | 2 +- configs/MK808C_defconfig | 1 - configs/MSI_Primo73_defconfig | 1 - configs/Mele_A1000_defconfig | 2 +- configs/Mele_M3_defconfig | 2 +- configs/Mini-X_defconfig | 1 - configs/Orangepi_defconfig | 2 +- configs/Orangepi_mini_defconfig | 2 +- configs/UTOO_P66_defconfig | 2 +- configs/Wexler_TAB7200_defconfig | 1 - configs/Wits_Pro_A20_DKT_defconfig | 2 +- configs/Wobo_i5_defconfig | 2 +- configs/Yones_Toptech_BD1078_defconfig | 1 - configs/ba10_tv_box_defconfig | 2 +- configs/i12-tvbox_defconfig | 2 +- configs/iNet_3F_defconfig | 1 - configs/iNet_3W_defconfig | 1 - configs/iNet_86VS_defconfig | 2 +- configs/inet1_defconfig | 1 - configs/inet97fv2_defconfig | 1 - configs/inet98v_rev2_defconfig | 3 ++- configs/inet9f_rev03_defconfig | 1 - configs/jesurun_q5_defconfig | 2 +- configs/mk802_a10s_defconfig | 2 +- configs/mk802_defconfig | 1 + configs/mk802ii_defconfig | 1 - configs/pov_protab2_ips9_defconfig | 1 - configs/q8_a13_tablet_defconfig | 3 ++- configs/r7-tv-dongle_defconfig | 2 +- configs/sunxi_Gemei_G9_defconfig | 1 - drivers/power/Kconfig | 15 +++++++++++++++ 51 files changed, 54 insertions(+), 49 deletions(-)
configs/A10-OLinuXino-Lime_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_MMC0_CD_PIN="PH1" CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/A10s-OLinuXino-M_defconfig +2 -1
@@ -9,8 +9,9 @@ CONFIG_USB1_VBUS_PIN="PB10" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-olinuxino-micro" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP152_POWER,SUNXI_EMAC" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_EHCI_HCD=y +CONFIG_AXP152_POWER=y
configs/A13-OLinuXino_defconfig +2 -1
@@ -14,9 +14,10 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,AXP209_POWER" +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_EHCI_HCD=y CONFIG_NAND_SUNXI=y +CONFIG_AXP209_POWER=y
configs/A20-OLinuXino-Lime2_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_USB0_VBUS_DET="PH5" CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/A20-OLinuXino-Lime_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_MMC0_CD_PIN="PH1" CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPC(3)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPC(3)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/A20-OLinuXino_MICRO_defconfig +1 -1
@@ -9,7 +9,7 @@ CONFIG_VIDEO_VGA=y CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/A20-Olimex-SOM-EVB_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_USB0_VBUS_DET="PH5" CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Ainol_AW1_defconfig +0 -1
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-ainol-aw1" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Ampe_A76_defconfig +2 -1
@@ -15,8 +15,9 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-ampe-a76" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,AXP209_POWER" +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_MUSB_HOST=y +CONFIG_AXP209_POWER=y
configs/Auxtek-T003_defconfig +1 -1
@@ -8,8 +8,8 @@ CONFIG_VIDEO_COMPOSITE=y CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-auxtek-t003" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP152_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_EHCI_HCD=y +CONFIG_AXP152_POWER=y
configs/Auxtek-T004_defconfig +1 -1
@@ -6,8 +6,8 @@ CONFIG_USB1_VBUS_PIN="PG13" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-auxtek-t004" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP152_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_EHCI_HCD=y +CONFIG_AXP152_POWER=y
configs/Bananapi_defconfig +1 -1
@@ -7,7 +7,7 @@ CONFIG_GMAC_TX_DELAY=3 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapi" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Bananapro_defconfig +1 -1
@@ -9,7 +9,7 @@ CONFIG_GMAC_TX_DELAY=3 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapro" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Chuwi_V7_CW0825_defconfig +0 -1
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_HITACHI_TX18D42VM=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-chuwi-v7-cw0825" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Cubieboard2_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_MMC0_CD_PIN="PH1" CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-cubieboard2" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Cubieboard_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_MMC0_CD_PIN="PH1" CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-cubieboard" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Cubietruck_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_GMAC_TX_DELAY=1 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-cubietruck" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Hyundai_A7HD_defconfig +0 -1
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-hyundai-a7hd" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Linksprite_pcDuino3_Nano_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_GMAC_TX_DELAY=3 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3-nano" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(2)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(2)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Linksprite_pcDuino3_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_DRAM_ZQ=122 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Linksprite_pcDuino_defconfig +1 -1
@@ -5,7 +5,7 @@ CONFIG_DRAM_CLK=408 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-pcduino" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/MK808C_defconfig +0 -1
@@ -5,7 +5,6 @@ CONFIG_DRAM_CLK=384 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-mk808c" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/MSI_Primo73_defconfig +0 -1
@@ -10,7 +10,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-primo73" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Mele_A1000_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_VIDEO_COMPOSITE=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-a1000" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Mele_M3_defconfig +1 -1
@@ -9,7 +9,7 @@ CONFIG_VIDEO_COMPOSITE=y CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-m3" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Mini-X_defconfig +0 -1
@@ -6,7 +6,6 @@ CONFIG_VIDEO_COMPOSITE=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mini-xplus" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Orangepi_defconfig +1 -1
@@ -10,7 +10,7 @@ CONFIG_GMAC_TX_DELAY=3 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Orangepi_mini_defconfig +1 -1
@@ -12,7 +12,7 @@ CONFIG_GMAC_TX_DELAY=3 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi-mini" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/UTOO_P66_defconfig +1 -1
@@ -20,9 +20,9 @@ CONFIG_VIDEO_LCD_TL059WV5C0=y CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-utoo-p66" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set CONFIG_USB_MUSB_HOST=y +CONFIG_AXP209_POWER=y
configs/Wexler_TAB7200_defconfig +0 -1
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-wexler-tab7200" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Wits_Pro_A20_DKT_defconfig +1 -1
@@ -11,7 +11,7 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-wits-pro-a20-dkt" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,AHCI" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/Wobo_i5_defconfig +1 -1
@@ -7,8 +7,8 @@ CONFIG_USB1_VBUS_PIN="PG12" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-wobo-i5" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_EHCI_HCD=y +CONFIG_AXP209_POWER=y
configs/Yones_Toptech_BD1078_defconfig +0 -1
@@ -19,7 +19,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-yones-toptech-bd1078" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/ba10_tv_box_defconfig +1 -1
@@ -9,7 +9,7 @@ CONFIG_VIDEO_COMPOSITE=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-ba10-tvbox" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/i12-tvbox_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_VIDEO_COMPOSITE=y CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-i12-tvbox" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,MACPWR=SUNXI_GPH(21)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/iNet_3F_defconfig +0 -1
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet-3f" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/iNet_3W_defconfig +0 -1
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet-3w" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/iNet_86VS_defconfig +1 -1
@@ -13,8 +13,8 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-inet-86vs" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_MUSB_HOST=y +CONFIG_AXP209_POWER=y
configs/inet1_defconfig +0 -1
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet1" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/inet97fv2_defconfig +0 -1
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet97fv2" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/inet98v_rev2_defconfig +2 -1
@@ -15,8 +15,9 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-inet-98v-rev2" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,AXP209_POWER" +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_MUSB_HOST=y +CONFIG_AXP209_POWER=y
configs/inet9f_rev03_defconfig +0 -1
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet9f-rev03" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/jesurun_q5_defconfig +1 -1
@@ -7,7 +7,7 @@ CONFIG_VIDEO_COMPOSITE=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-jesurun-q5" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(19)" +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,MACPWR=SUNXI_GPH(19)" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/mk802_a10s_defconfig +1 -1
@@ -7,8 +7,8 @@ CONFIG_USB1_VBUS_PIN="PB10" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-mk802" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP152_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_EHCI_HCD=y +CONFIG_AXP152_POWER=y
configs/mk802_defconfig +1 -0
@@ -10,3 +10,4 @@ CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_EHCI_HCD=y +# CONFIG_AXP209_POWER is not set
configs/mk802ii_defconfig +0 -1
@@ -4,7 +4,6 @@ CONFIG_MACH_SUN4I=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mk802ii" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/pov_protab2_ips9_defconfig +0 -1
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-pov-protab2-ips9" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
configs/q8_a13_tablet_defconfig +2 -1
@@ -15,8 +15,9 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-q8-tablet" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,AXP209_POWER" +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_MUSB_HOST=y +CONFIG_AXP209_POWER=y
configs/r7-tv-dongle_defconfig +1 -1
@@ -6,8 +6,8 @@ CONFIG_USB1_VBUS_PIN="PG13" CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-r7-tv-dongle" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP152_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_EHCI_HCD=y +CONFIG_AXP152_POWER=y
configs/sunxi_Gemei_G9_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-gemei-g9" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set
drivers/power/Kconfig +15 -0
@@ -4,6 +4,21 @@ source "drivers/power/pmic/Kconfig" source "drivers/power/regulator/Kconfig" +config AXP152_POWER + boolean "axp152 pmic support" + depends on MACH_SUN5I + ---help--- + Say y here to enable support for the axp152 pmic found on most A10s + boards. + +config AXP209_POWER + boolean "axp209 pmic support" + depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I + default y if MACH_SUN4I || MACH_SUN7I + ---help--- + Say y here to enable support for the axp209 pmic found on most + A10, A13 and A20 boards. + config AXP221_POWER boolean "axp221 / axp223 pmic support" depends on MACH_SUN6I || MACH_SUN8I
Signature · 1 line
2.5.0
PATCH 2/7 sunxi: power: Make all voltages configurable through Kconfig
On boards with axp221/223 pmic-s we already allow configuring most voltages. Make the Kconfig options for these also apply to boards with axp152 / axp209 pmic-s and extend them to configure all voltages.
The Kconfig defaults are chosen so that this commit does not introduce any functional changes.
--- board/sunxi/board.c | 48 ++++----- configs/CSQ_CS908_defconfig | 4 +- configs/Colombus_defconfig | 4 +- configs/Hummingbird_A31_defconfig | 2 +- configs/MSI_Primo81_defconfig | 2 +- configs/Mele_A1000G_quad_defconfig | 8 +- configs/Mele_I7_defconfig | 8 +- configs/Mele_M9_defconfig | 8 +- configs/Sinlinx_SinA33_defconfig | 2 +- configs/ga10h_v1_1_defconfig | 4 +- configs/gt90h_v4_defconfig | 6 +- configs/mixtile_loftq_defconfig | 2 +- configs/q8_a23_tablet_800x480_defconfig | 4 +- configs/q8_a33_tablet_1024x600_defconfig | 4 +- configs/q8_a33_tablet_800x480_defconfig | 4 +- drivers/power/Kconfig | 174 +++++++++++++++++++++++-------- 16 files changed, 185 insertions(+), 99 deletions(-)
board/sunxi/board.c +24 -24
@@ -444,36 +444,36 @@ void sunxi_board_init(void)#ifdef CONFIG_AXP152_POWER power_failed =axp152_init (); - power_failed |=axp152_set_dcdc2 (1400 ); - power_failed |=axp152_set_dcdc3 (1500 ); - power_failed |=axp152_set_dcdc4 (1250 ); - power_failed |=axp152_set_ldo2 (3000 ); + power_failed |=axp152_set_dcdc2 (CONFIG_AXP_DCDC2_VOLT ); + power_failed |=axp152_set_dcdc3 (CONFIG_AXP_DCDC3_VOLT ); + power_failed |=axp152_set_dcdc4 (CONFIG_AXP_DCDC4_VOLT ); + power_failed |=axp152_set_ldo2 (CONFIG_AXP_ALDO2_VOLT );#endif #ifdef CONFIG_AXP209_POWER power_failed |=axp209_init (); - power_failed |=axp209_set_dcdc2 (1400 ); - power_failed |=axp209_set_dcdc3 (1250 ); - power_failed |=axp209_set_ldo2 (3000 ); - power_failed |=axp209_set_ldo3 (2800 ); - power_failed |=axp209_set_ldo4 (2800 ); + power_failed |=axp209_set_dcdc2 (CONFIG_AXP_DCDC2_VOLT ); + power_failed |=axp209_set_dcdc3 (CONFIG_AXP_DCDC3_VOLT ); + power_failed |=axp209_set_ldo2 (CONFIG_AXP_ALDO2_VOLT ); + power_failed |=axp209_set_ldo3 (CONFIG_AXP_ALDO3_VOLT ); + power_failed |=axp209_set_ldo4 (CONFIG_AXP_ALDO4_VOLT );#endif #ifdef CONFIG_AXP221_POWER power_failed =axp221_init (); - power_failed |=axp221_set_dcdc1 (CONFIG_AXP221_DCDC1_VOLT ); - power_failed |=axp221_set_dcdc2 (CONFIG_AXP221_DCDC2_VOLT ); - power_failed |=axp221_set_dcdc3 (1200 );/* VDD-CPU */ -#ifdef CONFIG_MACH_SUN6I - power_failed |=axp221_set_dcdc4 (1200 );/* A31:VDD-SYS */ -#else - power_failed |=axp221_set_dcdc4 (0 );/* A23:unused */ -#endif - power_failed |=axp221_set_dcdc5 (1500 );/* VCC-DRAM */ - power_failed |=axp221_set_dldo1 (CONFIG_AXP221_DLDO1_VOLT ); - power_failed |=axp221_set_dldo4 (CONFIG_AXP221_DLDO4_VOLT ); - power_failed |=axp221_set_aldo1 (CONFIG_AXP221_ALDO1_VOLT ); - power_failed |=axp221_set_aldo2 (CONFIG_AXP221_ALDO2_VOLT ); - power_failed |=axp221_set_aldo3 (CONFIG_AXP221_ALDO3_VOLT ); - power_failed |=axp221_set_eldo (3 ,CONFIG_AXP221_ELDO3_VOLT ); + power_failed |=axp221_set_dcdc1 (CONFIG_AXP_DCDC1_VOLT ); + power_failed |=axp221_set_dcdc2 (CONFIG_AXP_DCDC2_VOLT ); + power_failed |=axp221_set_dcdc3 (CONFIG_AXP_DCDC3_VOLT ); + power_failed |=axp221_set_dcdc4 (CONFIG_AXP_DCDC4_VOLT ); + power_failed |=axp221_set_dcdc5 (CONFIG_AXP_DCDC5_VOLT ); + power_failed |=axp221_set_aldo1 (CONFIG_AXP_ALDO1_VOLT ); + power_failed |=axp221_set_aldo2 (CONFIG_AXP_ALDO2_VOLT ); + power_failed |=axp221_set_aldo3 (CONFIG_AXP_ALDO3_VOLT ); + power_failed |=axp221_set_dldo1 (CONFIG_AXP_DLDO1_VOLT ); + power_failed |=axp221_set_dldo2 (CONFIG_AXP_DLDO2_VOLT ); + power_failed |=axp221_set_dldo3 (CONFIG_AXP_DLDO3_VOLT ); + power_failed |=axp221_set_dldo4 (CONFIG_AXP_DLDO4_VOLT ); + power_failed |=axp221_set_eldo (1 ,CONFIG_AXP_ELDO1_VOLT ); + power_failed |=axp221_set_eldo (2 ,CONFIG_AXP_ELDO2_VOLT ); + power_failed |=axp221_set_eldo (3 ,CONFIG_AXP_ELDO3_VOLT );#endif printf ("DRAM:" );
configs/CSQ_CS908_defconfig +2 -2
@@ -12,7 +12,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_ETH_DESIGNWARE=y -CONFIG_AXP221_DLDO1_VOLT=3300 -CONFIG_AXP221_ALDO1_VOLT=3300 +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y
configs/Colombus_defconfig +2 -2
@@ -22,6 +22,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_ETH_DESIGNWARE=y -CONFIG_AXP221_ALDO1_VOLT=3300 -CONFIG_AXP221_ELDO3_VOLT=1800 +CONFIG_AXP_ALDO1_VOLT=3300 +CONFIG_AXP_ELDO3_VOLT=1800 CONFIG_USB_EHCI_HCD=y
configs/Hummingbird_A31_defconfig +1 -1
@@ -14,5 +14,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPA(21)" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_ETH_DESIGNWARE=y -CONFIG_AXP221_ALDO1_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_USB_EHCI_HCD=y
configs/MSI_Primo81_defconfig +1 -1
@@ -16,7 +16,7 @@ CONFIG_SPL=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_AXP221_DLDO1_VOLT=3300 +CONFIG_AXP_DLDO1_VOLT=3300 CONFIG_USB_MUSB_HOST=y CONFIG_VIDEO_LCD_SSD2828_TX_CLK=27 CONFIG_VIDEO_LCD_SSD2828_RESET="PA26"
configs/Mele_A1000G_quad_defconfig +4 -4
@@ -12,9 +12,9 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_ETH_DESIGNWARE=y -CONFIG_AXP221_DCDC1_VOLT=3300 -CONFIG_AXP221_DLDO1_VOLT=3300 -CONFIG_AXP221_DLDO4_VOLT=3300 -CONFIG_AXP221_ALDO1_VOLT=3300 +CONFIG_AXP_DCDC1_VOLT=3300 +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_DLDO4_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y
configs/Mele_I7_defconfig +4 -4
@@ -12,8 +12,8 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_ETH_DESIGNWARE=y -CONFIG_AXP221_DCDC1_VOLT=3300 -CONFIG_AXP221_DLDO1_VOLT=3300 -CONFIG_AXP221_DLDO4_VOLT=3300 -CONFIG_AXP221_ALDO1_VOLT=3300 +CONFIG_AXP_DCDC1_VOLT=3300 +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_DLDO4_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_USB_EHCI_HCD=y
configs/Mele_M9_defconfig +4 -4
@@ -12,8 +12,8 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_ETH_DESIGNWARE=y -CONFIG_AXP221_DCDC1_VOLT=3300 -CONFIG_AXP221_DLDO1_VOLT=3300 -CONFIG_AXP221_DLDO4_VOLT=3300 -CONFIG_AXP221_ALDO1_VOLT=3300 +CONFIG_AXP_DCDC1_VOLT=3300 +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_DLDO4_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_USB_EHCI_HCD=y
configs/Sinlinx_SinA33_defconfig +1 -1
@@ -9,4 +9,4 @@ CONFIG_SPL=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_AXP221_ALDO1_VOLT=3000 +CONFIG_AXP_ALDO1_VOLT=3000
configs/ga10h_v1_1_defconfig +2 -2
@@ -21,7 +21,7 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_AXP221_DLDO1_VOLT=3300 -CONFIG_AXP221_ALDO1_VOLT=3000 +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y
configs/gt90h_v4_defconfig +3 -3
@@ -20,7 +20,7 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_AXP221_DCDC2_VOLT=1100 -CONFIG_AXP221_DLDO1_VOLT=3300 -CONFIG_AXP221_ALDO1_VOLT=3000 +CONFIG_AXP_DCDC2_VOLT=1100 +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_MUSB_HOST=y
configs/mixtile_loftq_defconfig +1 -1
@@ -13,5 +13,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPA(21)" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_ETH_DESIGNWARE=y -CONFIG_AXP221_ALDO1_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_USB_EHCI_HCD=y
configs/q8_a23_tablet_800x480_defconfig +2 -2
@@ -20,6 +20,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_AXP221_DLDO1_VOLT=3300 -CONFIG_AXP221_ALDO1_VOLT=3000 +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_MUSB_HOST=y
configs/q8_a33_tablet_1024x600_defconfig +2 -2
@@ -20,6 +20,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_AXP221_DLDO1_VOLT=3300 -CONFIG_AXP221_ALDO1_VOLT=3000 +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_MUSB_HOST=y
configs/q8_a33_tablet_800x480_defconfig +2 -2
@@ -20,6 +20,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_AXP221_DLDO1_VOLT=3300 -CONFIG_AXP221_ALDO1_VOLT=3000 +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_MUSB_HOST=y
drivers/power/Kconfig +130 -44
209 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH 3/7 sunxi: power: Unify axp pmic function names
In reply to Hans de GoedeStop prefixing the axp functions for setting voltages, etc. with the model number, there ever is only one pmic driver built into u-boot, this allows simplifying the callers.
--- arch/arm/cpu/armv7/sunxi/cpu_info.c | 4 +-- arch/arm/cpu/armv7/sunxi/usb_phy.c | 9 ----- board/sunxi/board.c | 70 +++++++++++++++++-------------------- drivers/gpio/axp_gpio.c | 11 +----- drivers/power/axp152.c | 12 +++---- drivers/power/axp209.c | 39 +++++---------------- drivers/power/axp221.c | 35 +++++++++---------- drivers/video/sunxi_display.c | 6 ++-- include/axp152.h | 6 ---- include/axp209.h | 9 ----- include/axp221.h | 16 --------- include/axp_pmic.h | 37 ++++++++++++++++++++ 12 files changed, 106 insertions(+), 148 deletions(-) create mode 100644 include/axp_pmic.h
arch/arm/cpu/armv7/sunxi/cpu_info.c +2 -2
@@ -10,7 +10,7 @@#include <asm/io.h> #include <asm/arch/cpu.h> #include <asm/arch/clock.h> -#include <axp221.h> +#include <axp_pmic.h> #include <errno.h> #ifdef CONFIG_MACH_SUN6I
@@ -82,7 +82,7 @@ int print_cpuinfo(void)int sunxi_get_sid (unsigned int *sid) {#ifdef CONFIG_AXP221_POWER -return axp221_get_sid (sid); +return axp_get_sid (sid);#elif definedSUNXI_SID_BASE int i;
arch/arm/cpu/armv7/sunxi/usb_phy.c +0 -9
@@ -17,15 +17,6 @@#include <asm/gpio.h> #include <asm/io.h> #include <errno.h> -#ifdef CONFIG_AXP152_POWER -#include <axp152.h> -#endif -#ifdef CONFIG_AXP209_POWER -#include <axp209.h> -#endif -#ifdef CONFIG_AXP221_POWER -#include <axp221.h> -#endif #define SUNXI_USB_PMU_IRQ_ENABLE 0x800#ifdef CONFIG_MACH_SUN8I_A33
board/sunxi/board.c +32 -38
87 lines not on this page · raw message
drivers/gpio/axp_gpio.c +1 -10
@@ -10,22 +10,13 @@#include <asm/arch/gpio.h> #include <asm/arch/pmic_bus.h> #include <asm/gpio.h> +#include <axp_pmic.h> #include <dm.h> #include <dm/device-internal.h> #include <dm/lists.h> #include <dm/root.h> #include <errno.h> -#ifdef CONFIG_AXP152_POWER -#include <axp152.h> -#elif definedCONFIG_AXP209_POWER -#include <axp209.h> -#elif definedCONFIG_AXP221_POWER -#include <axp221.h> -#else -#error Unknown AXP model -#endif -static int axp_gpio_set_value (struct udevice *dev,unsigned pin,int val);static u8 axp_get_gpio_ctrl_reg (unsigned pin)
drivers/power/axp152.c +6 -6
@@ -6,7 +6,7 @@*/ #include <common.h> #include <i2c.h> -#include <axp152.h> +#include <axp_pmic.h> static int axp152_write (enum axp152_reg reg,u8 val) {
@@ -28,7 +28,7 @@ static u8 axp152_mvolt_to_target(int mvolt, int min, int max, int div)return (mvolt - min) / div; } -int axp152_set_dcdc2 (int mvolt) +int axp_set_dcdc2 (unsigned int mvolt) {int rc;u8 current, target;
@@ -49,28 +49,28 @@ int axp152_set_dcdc2(int mvolt)return rc; } -int axp152_set_dcdc3 (int mvolt) +int axp_set_dcdc3 (unsigned int mvolt) {u8 target =axp152_mvolt_to_target (mvolt,700 ,3500 ,50 );return axp152_write (AXP152_DCDC3_VOLTAGE , target); } -int axp152_set_dcdc4 (int mvolt) +int axp_set_dcdc4 (unsigned int mvolt) {u8 target =axp152_mvolt_to_target (mvolt,700 ,3500 ,25 );return axp152_write (AXP152_DCDC4_VOLTAGE , target); } -int axp152_set_ldo2 (int mvolt) +int axp_set_aldo2 (unsigned int mvolt) {u8 target =axp152_mvolt_to_target (mvolt,700 ,3500 ,100 );return axp152_write (AXP152_LDO2_VOLTAGE , target); } -int axp152_init (void ) +int axp_init (void ) {u8 ver;int rc;
drivers/power/axp209.c +8 -31
@@ -7,8 +7,7 @@#include <common.h> #include <i2c.h> -#include <asm/arch/gpio.h> -#include <axp209.h> +#include <axp_pmic.h> static int axp209_write (enum axp209_reg reg,u8 val) {
@@ -30,7 +29,7 @@ static u8 axp209_mvolt_to_cfg(int mvolt, int min, int max, int div)return (mvolt - min) / div; } -int axp209_set_dcdc2 (int mvolt) +int axp_set_dcdc2 (unsigned int mvolt) {int rc;u8 cfg, current;
@@ -53,14 +52,14 @@ int axp209_set_dcdc2(int mvolt)return rc; } -int axp209_set_dcdc3 (int mvolt) +int axp_set_dcdc3 (unsigned int mvolt) {u8 cfg =axp209_mvolt_to_cfg (mvolt,700 ,3500 ,25 );return axp209_write (AXP209_DCDC3_VOLTAGE , cfg); } -int axp209_set_ldo2 (int mvolt) +int axp_set_aldo2 (unsigned int mvolt) {int rc;u8 cfg, reg;
@@ -76,7 +75,7 @@ int axp209_set_ldo2(int mvolt)return axp209_write (AXP209_LDO24_VOLTAGE , reg); } -int axp209_set_ldo3 (int mvolt) +int axp_set_aldo3 (unsigned int mvolt) {u8 cfg;
@@ -88,10 +87,10 @@ int axp209_set_ldo3(int mvolt)return axp209_write (AXP209_LDO3_VOLTAGE , cfg); } -int axp209_set_ldo4 (int mvolt) +int axp_set_aldo4 (unsigned int mvolt) {int rc; -static const int vindex[] = { +static const unsigned int vindex[] = {1250 ,1300 ,1400 ,1500 ,1600 ,1700 ,1800 ,1900 ,2000 ,2500 ,2700 ,2800 ,3000 ,3100 ,3200 ,3300 };
@@ -109,7 +108,7 @@ int axp209_set_ldo4(int mvolt)return axp209_write (AXP209_LDO24_VOLTAGE , reg); } -int axp209_init (void ) +int axp_init (void ) {u8 ver;int i, rc;
@@ -133,25 +132,3 @@ int axp209_init(void)return 0 ; } - -int axp209_poweron_by_dc (void ) -{ -u8 v; - -if (axp209_read (AXP209_POWER_STATUS , &v)) -return 0 ; - -return (v &AXP209_POWER_STATUS_ON_BY_DC ); -} - -int axp209_power_button (void ) -{ -u8 v; - -if (axp209_read (AXP209_IRQ_STATUS5 , &v)) -return 0 ; - -axp209_write (AXP209_IRQ_STATUS5 ,AXP209_IRQ5_PEK_DOWN ); - -return v &AXP209_IRQ5_PEK_DOWN ; -}
drivers/power/axp221.c +17 -18
@@ -12,9 +12,8 @@#include <common.h> #include <errno.h> -#include <asm/arch/gpio.h> #include <asm/arch/pmic_bus.h> -#include <axp221.h> +#include <axp_pmic.h> static u8 axp221_mvolt_to_cfg (int mvolt,int min,int max,int div) {
@@ -26,7 +25,7 @@ static u8 axp221_mvolt_to_cfg(int mvolt, int min, int max, int div)return (mvolt - min) / div; } -int axp221_set_dcdc1 (unsigned int mvolt) +int axp_set_dcdc1 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,1600 ,3400 ,100 );
@@ -48,7 +47,7 @@ int axp221_set_dcdc1(unsigned int mvolt) AXP221_OUTPUT_CTRL1_DCDC1_EN); } -int axp221_set_dcdc2 (unsigned int mvolt) +int axp_set_dcdc2 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,600 ,1540 ,20 );
@@ -65,7 +64,7 @@ int axp221_set_dcdc2(unsigned int mvolt) AXP221_OUTPUT_CTRL1_DCDC2_EN); } -int axp221_set_dcdc3 (unsigned int mvolt) +int axp_set_dcdc3 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,600 ,1860 ,20 );
@@ -82,7 +81,7 @@ int axp221_set_dcdc3(unsigned int mvolt) AXP221_OUTPUT_CTRL1_DCDC3_EN); } -int axp221_set_dcdc4 (unsigned int mvolt) +int axp_set_dcdc4 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,600 ,1540 ,20 );
@@ -99,7 +98,7 @@ int axp221_set_dcdc4(unsigned int mvolt) AXP221_OUTPUT_CTRL1_DCDC4_EN); } -int axp221_set_dcdc5 (unsigned int mvolt) +int axp_set_dcdc5 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,1000 ,2550 ,50 );
@@ -116,7 +115,7 @@ int axp221_set_dcdc5(unsigned int mvolt) AXP221_OUTPUT_CTRL1_DCDC5_EN); } -int axp221_set_dldo1 (unsigned int mvolt) +int axp_set_dldo1 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,700 ,3300 ,100 );
@@ -133,7 +132,7 @@ int axp221_set_dldo1(unsigned int mvolt) AXP221_OUTPUT_CTRL2_DLDO1_EN); } -int axp221_set_dldo2 (unsigned int mvolt) +int axp_set_dldo2 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,700 ,3300 ,100 );
@@ -150,7 +149,7 @@ int axp221_set_dldo2(unsigned int mvolt) AXP221_OUTPUT_CTRL2_DLDO2_EN); } -int axp221_set_dldo3 (unsigned int mvolt) +int axp_set_dldo3 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,700 ,3300 ,100 );
@@ -167,7 +166,7 @@ int axp221_set_dldo3(unsigned int mvolt) AXP221_OUTPUT_CTRL2_DLDO3_EN); } -int axp221_set_dldo4 (unsigned int mvolt) +int axp_set_dldo4 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,700 ,3300 ,100 );
@@ -184,7 +183,7 @@ int axp221_set_dldo4(unsigned int mvolt) AXP221_OUTPUT_CTRL2_DLDO4_EN); } -int axp221_set_aldo1 (unsigned int mvolt) +int axp_set_aldo1 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,700 ,3300 ,100 );
@@ -201,7 +200,7 @@ int axp221_set_aldo1(unsigned int mvolt) AXP221_OUTPUT_CTRL1_ALDO1_EN); } -int axp221_set_aldo2 (unsigned int mvolt) +int axp_set_aldo2 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,700 ,3300 ,100 );
@@ -218,7 +217,7 @@ int axp221_set_aldo2(unsigned int mvolt) AXP221_OUTPUT_CTRL1_ALDO2_EN); } -int axp221_set_aldo3 (unsigned int mvolt) +int axp_set_aldo3 (unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,700 ,3300 ,100 );
@@ -235,7 +234,7 @@ int axp221_set_aldo3(unsigned int mvolt) AXP221_OUTPUT_CTRL3_ALDO3_EN); } -int axp221_set_eldo (int eldo_num,unsigned int mvolt) +int axp_set_eldo (int eldo_num,unsigned int mvolt) {int ret;u8 cfg =axp221_mvolt_to_cfg (mvolt,700 ,3300 ,100 );
@@ -268,7 +267,7 @@ int axp221_set_eldo(int eldo_num, unsigned int mvolt)return pmic_bus_setbits (AXP221_OUTPUT_CTRL2 , bits); } -int axp221_init (void ) +int axp_init (void ) {/* This cannot be 0 because it is used in SPL before BSS is ready */ static int needs_init =1 ;
@@ -293,12 +292,12 @@ int axp221_init(void)return 0 ; } -int axp221_get_sid (unsigned int *sid) +int axp_get_sid (unsigned int *sid) {u8 *dest = (u8 *)sid;int i, ret; - ret =axp221_init (); + ret =pmic_bus_init ();if (ret)return ret;
drivers/video/sunxi_display.c +3 -3
@@ -15,7 +15,7 @@#include <asm/global_data.h> #include <asm/gpio.h> #include <asm/io.h> -#include <axp221.h> +#include <axp_pmic.h> #include <errno.h> #include <fdtdec.h> #include <fdt_support.h>
@@ -1217,10 +1217,10 @@ static void sunxi_mode_set(const struct ctfb_res_modes *mode,if (IS_ENABLED (CONFIG_VIDEO_LCD_PANEL_EDP_4_LANE_1620M_VIA_ANX9804 )) {/* * The anx9804 needs 1.8V from eldo3, we do this here -* and not via CONFIG_AXP221_ELDO3 from board_init() +* and not via CONFIG_AXP_ELDO3_VOLT from board_init() * to avoid turning this on when using hdmi output. */ -axp221_set_eldo (3 ,1800 ); +axp_set_eldo (3 ,1800 );anx9804_init (CONFIG_VIDEO_LCD_I2C_BUS ,4 ,ANX9804_DATA_RATE_1620M , sunxi_display.depth);
include/axp152.h +0 -6
@@ -25,9 +25,3 @@ enum axp152_reg {#define AXP_GPIO_CTRL_INPUT 0x02/* Input */ #define AXP_GPIO_STATE 0x97#define AXP_GPIO_STATE_OFFSET 0 - -int axp152_set_dcdc2 (int mvolt); -int axp152_set_dcdc3 (int mvolt); -int axp152_set_dcdc4 (int mvolt); -int axp152_set_ldo2 (int mvolt); -int axp152_init (void );
include/axp209.h +0 -9
@@ -39,12 +39,3 @@ enum axp209_reg {#define AXP_GPIO_CTRL_INPUT 0x02/* Input */ #define AXP_GPIO_STATE 0x94#define AXP_GPIO_STATE_OFFSET 4 - -extern int axp209_set_dcdc2 (int mvolt); -extern int axp209_set_dcdc3 (int mvolt); -extern int axp209_set_ldo2 (int mvolt); -extern int axp209_set_ldo3 (int mvolt); -extern int axp209_set_ldo4 (int mvolt); -extern int axp209_init (void ); -extern int axp209_poweron_by_dc (void ); -extern int axp209_power_button (void );
include/axp221.h +0 -16
@@ -62,19 +62,3 @@#define AXP_GPIO_CTRL_INPUT 0x02/* Input */ #define AXP_GPIO_STATE 0x94#define AXP_GPIO_STATE_OFFSET 0 - -int axp221_set_dcdc1 (unsigned int mvolt); -int axp221_set_dcdc2 (unsigned int mvolt); -int axp221_set_dcdc3 (unsigned int mvolt); -int axp221_set_dcdc4 (unsigned int mvolt); -int axp221_set_dcdc5 (unsigned int mvolt); -int axp221_set_dldo1 (unsigned int mvolt); -int axp221_set_dldo2 (unsigned int mvolt); -int axp221_set_dldo3 (unsigned int mvolt); -int axp221_set_dldo4 (unsigned int mvolt); -int axp221_set_aldo1 (unsigned int mvolt); -int axp221_set_aldo2 (unsigned int mvolt); -int axp221_set_aldo3 (unsigned int mvolt); -int axp221_set_eldo (int eldo_num,unsigned int mvolt); -int axp221_init (void ); -int axp221_get_sid (unsigned int *sid);
include/axp_pmic.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* (C) Copyright 2015 Hans de Goede <[email protected]> +* +* X-Powers AX Power Management IC support header +* +* SPDX-License-Identifier: GPL-2.0+ +*/ +#ifndef _AXP_PMIC_H_ + +#ifdef CONFIG_AXP152_POWER +#include <axp152.h> +#endif +#ifdef CONFIG_AXP209_POWER +#include <axp209.h> +#endif +#ifdef CONFIG_AXP221_POWER +#include <axp221.h> +#endif + +int axp_set_dcdc1 (unsigned int mvolt); +int axp_set_dcdc2 (unsigned int mvolt); +int axp_set_dcdc3 (unsigned int mvolt); +int axp_set_dcdc4 (unsigned int mvolt); +int axp_set_dcdc5 (unsigned int mvolt); +int axp_set_aldo1 (unsigned int mvolt); +int axp_set_aldo2 (unsigned int mvolt); +int axp_set_aldo3 (unsigned int mvolt); +int axp_set_aldo4 (unsigned int mvolt); +int axp_set_dldo1 (unsigned int mvolt); +int axp_set_dldo2 (unsigned int mvolt); +int axp_set_dldo3 (unsigned int mvolt); +int axp_set_dldo4 (unsigned int mvolt); +int axp_set_eldo (int eldo_num,unsigned int mvolt); +int axp_init (void ); +int axp_get_sid (unsigned int *sid); + +#endif
Signature · 1 line
2.5.0
PATCH 4/7 sunxi: power: Change A23/A33 VDD-SYS default from 1.2V to 1.1V
In reply to Hans de GoedeChange the axp223 dcdc2 / VDD-SYS default from 1.2V to 1.1V, 1.1V is the value recommended by Allwinner and is what most fex files specify.
This has been tested on a number of A23/A33 tablets including on an A23 Ippo-q8h-v1.2 PCB tablet which has a fex file which specifies 1.2V (which is where our original 1.2V default comes from).
--- configs/gt90h_v4_defconfig | 1 - drivers/power/Kconfig | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-)
configs/gt90h_v4_defconfig +0 -1
@@ -20,7 +20,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_AXP_DCDC2_VOLT=1100 CONFIG_AXP_DLDO1_VOLT=3300 CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_MUSB_HOST=y
drivers/power/Kconfig +3 -2
@@ -42,13 +42,14 @@ config AXP_DCDC2_VOLT int "axp pmic dcdc2 voltage" depends on AXP152_POWER || AXP209_POWER || AXP221_POWER default 1400 if AXP152_POWER || AXP209_POWER - default 1200 if MACH_SUN6I || MACH_SUN8I + default 1200 if MACH_SUN6I + default 1100 if MACH_SUN8I ---help--- Set the voltage (mV) to program the axp pmic dcdc2 at, set to 0 to disable dcdc2. On A10(s) / A13 / A20 boards dcdc2 is VDD-CPU and should be 1.4V. On A31 boards dcdc2 is used for VDD-GPU and should be 1.2V. - On A23/A33 boards dcdc2 is used for VDD-SYS and should be 1.2V. + On A23/A33 boards dcdc2 is used for VDD-SYS and should be 1.1V. config AXP_DCDC3_VOLT int "axp pmic dcdc3 voltage"
Signature · 1 line
2.5.0
PATCH 5/7 sunxi: power: Change A23/A33 aldo1 default voltage to 3.0V
In reply to Hans de GoedeOn A23 / A33 boards aldo1 is used for VCC-IO and should be 3.0V, make this the default.
Note that this does not cause any functional changes since all sun8i board defconfig-s already contained: CONFIG_AXP_ALDO1_VOLT=3000 .
--- configs/Sinlinx_SinA33_defconfig | 1 - configs/ga10h_v1_1_defconfig | 1 - configs/gt90h_v4_defconfig | 1 - configs/q8_a23_tablet_800x480_defconfig | 1 - configs/q8_a33_tablet_1024x600_defconfig | 1 - configs/q8_a33_tablet_800x480_defconfig | 1 - drivers/power/Kconfig | 3 ++- 7 files changed, 2 insertions(+), 7 deletions(-)
configs/Sinlinx_SinA33_defconfig +0 -1
@@ -9,4 +9,3 @@ CONFIG_SPL=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_AXP_ALDO1_VOLT=3000
configs/ga10h_v1_1_defconfig +0 -1
@@ -22,6 +22,5 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_AXP_DLDO1_VOLT=3300 -CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y
configs/gt90h_v4_defconfig +0 -1
@@ -21,5 +21,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_AXP_DLDO1_VOLT=3300 -CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_MUSB_HOST=y
configs/q8_a23_tablet_800x480_defconfig +0 -1
@@ -21,5 +21,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_AXP_DLDO1_VOLT=3300 -CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_MUSB_HOST=y
configs/q8_a33_tablet_1024x600_defconfig +0 -1
@@ -21,5 +21,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_AXP_DLDO1_VOLT=3300 -CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_MUSB_HOST=y
configs/q8_a33_tablet_800x480_defconfig +0 -1
@@ -21,5 +21,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_AXP_DLDO1_VOLT=3300 -CONFIG_AXP_ALDO1_VOLT=3000 CONFIG_USB_MUSB_HOST=y
drivers/power/Kconfig +2 -1
@@ -90,7 +90,8 @@ config AXP_DCDC5_VOLT config AXP_ALDO1_VOLT int "axp pmic (a)ldo1 voltage" depends on AXP221_POWER - default 0 + default 0 if MACH_SUN6I + default 3000 if MACH_SUN8I ---help--- Set the voltage (mV) to program the axp pmic aldo1 at, set to 0 to disable aldo1.
Signature · 1 line
2.5.0
PATCH 6/7 sunxi: power: Use pmic_bus functions for axp152 / axp209 driver
In reply to Hans de GoedeUse the generic pmic_bus helpers for the axp152 / axp209 drivers, rather then having them define their own register read / write functions.
--- drivers/power/axp152.c | 28 +++++++++++----------------- drivers/power/axp209.c | 36 +++++++++++++++--------------------- 2 files changed, 26 insertions(+), 38 deletions(-)
drivers/power/axp152.c +11 -17
@@ -5,19 +5,9 @@* SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> -#include <i2c.h> +#include <asm/arch/pmic_bus.h> #include <axp_pmic.h> -static int axp152_write (enum axp152_reg reg,u8 val) -{ -return i2c_write (0x30 , reg,1 , &val,1 ); -} - -static int axp152_read (enum axp152_reg reg,u8 *val) -{ -return i2c_read (0x30 , reg,1 , val,1 ); -} -static u8 axp152_mvolt_to_target (int mvolt,int min,int max,int div) {if (mvolt < min)
@@ -36,13 +26,13 @@ int axp_set_dcdc2(unsigned int mvolt) target =axp152_mvolt_to_target (mvolt,700 ,2275 ,25 );/* Do we really need to be this gentle? It has built-in voltage slope */ -while ((rc =axp152_read (AXP152_DCDC2_VOLTAGE , ¤t)) ==0 && +while ((rc =pmic_bus_read (AXP152_DCDC2_VOLTAGE , ¤t)) ==0 && current != target) {if (current < target) current++;else current--; - rc =axp152_write (AXP152_DCDC2_VOLTAGE , current); + rc =pmic_bus_write (AXP152_DCDC2_VOLTAGE , current);if (rc)break ; }
@@ -53,21 +43,21 @@ int axp_set_dcdc3(unsigned int mvolt) {u8 target =axp152_mvolt_to_target (mvolt,700 ,3500 ,50 ); -return axp152_write (AXP152_DCDC3_VOLTAGE , target); +return pmic_bus_write (AXP152_DCDC3_VOLTAGE , target); }int axp_set_dcdc4 (unsigned int mvolt) {u8 target =axp152_mvolt_to_target (mvolt,700 ,3500 ,25 ); -return axp152_write (AXP152_DCDC4_VOLTAGE , target); +return pmic_bus_write (AXP152_DCDC4_VOLTAGE , target); }int axp_set_aldo2 (unsigned int mvolt) {u8 target =axp152_mvolt_to_target (mvolt,700 ,3500 ,100 ); -return axp152_write (AXP152_LDO2_VOLTAGE , target); +return pmic_bus_write (AXP152_LDO2_VOLTAGE , target); }int axp_init (void )
@@ -75,7 +65,11 @@ int axp_init(void)u8 ver;int rc; - rc =axp152_read (AXP152_CHIP_VERSION , &ver); + rc =pmic_bus_init (); +if (rc) +return rc; + + rc =pmic_bus_read (AXP152_CHIP_VERSION , &ver);if (rc)return rc;
drivers/power/axp209.c +15 -21
@@ -6,19 +6,9 @@*/ #include <common.h> -#include <i2c.h> +#include <asm/arch/pmic_bus.h> #include <axp_pmic.h> -static int axp209_write (enum axp209_reg reg,u8 val) -{ -return i2c_write (0x34 , reg,1 , &val,1 ); -} - -static int axp209_read (enum axp209_reg reg,u8 *val) -{ -return i2c_read (0x34 , reg,1 , val,1 ); -} -static u8 axp209_mvolt_to_cfg (int mvolt,int min,int max,int div) {if (mvolt < min)
@@ -37,14 +27,14 @@ int axp_set_dcdc2(unsigned int mvolt) cfg =axp209_mvolt_to_cfg (mvolt,700 ,2275 ,25 );/* Do we really need to be this gentle? It has built-in voltage slope */ -while ((rc =axp209_read (AXP209_DCDC2_VOLTAGE , ¤t)) ==0 && +while ((rc =pmic_bus_read (AXP209_DCDC2_VOLTAGE , ¤t)) ==0 && current != cfg) {if (current < cfg) current++;else current--; - rc =axp209_write (AXP209_DCDC2_VOLTAGE , current); + rc =pmic_bus_write (AXP209_DCDC2_VOLTAGE , current);if (rc)break ; }
@@ -56,7 +46,7 @@ int axp_set_dcdc3(unsigned int mvolt) {u8 cfg =axp209_mvolt_to_cfg (mvolt,700 ,3500 ,25 ); -return axp209_write (AXP209_DCDC3_VOLTAGE , cfg); +return pmic_bus_write (AXP209_DCDC3_VOLTAGE , cfg); }int axp_set_aldo2 (unsigned int mvolt)
@@ -66,13 +56,13 @@ int axp_set_aldo2(unsigned int mvolt) cfg =axp209_mvolt_to_cfg (mvolt,1800 ,3300 ,100 ); - rc =axp209_read (AXP209_LDO24_VOLTAGE , ®); + rc =pmic_bus_read (AXP209_LDO24_VOLTAGE , ®);if (rc)return rc;/* LDO2 configuration is in upper 4 bits */ reg = (reg &0x0f ) | (cfg <<4 ); -return axp209_write (AXP209_LDO24_VOLTAGE , reg); +return pmic_bus_write (AXP209_LDO24_VOLTAGE , reg); }int axp_set_aldo3 (unsigned int mvolt)
@@ -84,7 +74,7 @@ int axp_set_aldo3(unsigned int mvolt)else cfg =axp209_mvolt_to_cfg (mvolt,700 ,3500 ,25 ); -return axp209_write (AXP209_LDO3_VOLTAGE , cfg); +return pmic_bus_write (AXP209_LDO3_VOLTAGE , cfg); }int axp_set_aldo4 (unsigned int mvolt)
@@ -99,13 +89,13 @@ int axp_set_aldo4(unsigned int mvolt)/* Translate mvolt to register cfg value, requested <= selected */ for (cfg =15 ; vindex[cfg] > mvolt && cfg >0 ; cfg--); - rc =axp209_read (AXP209_LDO24_VOLTAGE , ®); + rc =pmic_bus_read (AXP209_LDO24_VOLTAGE , ®);if (rc)return rc;/* LDO4 configuration is in lower 4 bits */ reg = (reg &0xf0 ) | (cfg <<0 ); -return axp209_write (AXP209_LDO24_VOLTAGE , reg); +return pmic_bus_write (AXP209_LDO24_VOLTAGE , reg); }int axp_init (void )
@@ -113,7 +103,11 @@ int axp_init(void)u8 ver;int i, rc; - rc =axp209_read (AXP209_CHIP_VERSION , &ver); + rc =pmic_bus_init (); +if (rc) +return rc; + + rc =pmic_bus_read (AXP209_CHIP_VERSION , &ver);if (rc)return rc;
@@ -125,7 +119,7 @@ int axp_init(void)/* Mask all interrupts */ for (i =AXP209_IRQ_ENABLE1 ; i <=AXP209_IRQ_ENABLE5 ; i++) { - rc =axp209_write (i,0 ); + rc =pmic_bus_write (i,0 );if (rc)return rc; }
Signature · 1 line
2.5.0
PATCH 7/7 sunxi: power: Drop protection against multiple calls from axp221 axp_init()
In reply to Hans de GoedeThe only thing axp221.c's axp_init() does which needs protection against multiple calls is calling pmic_bus_init, and pmic_bus_init() itself is already protected against being called multiple times.
--- drivers/power/axp221.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/power/axp221.c +0 -6
@@ -269,14 +269,9 @@ int axp_set_eldo(int eldo_num, unsigned int mvolt)int axp_init (void ) { -/* This cannot be 0 because it is used in SPL before BSS is ready */ -static int needs_init =1 ;u8 axp_chip_id;int ret; -if (!needs_init) -return 0 ; - ret =pmic_bus_init ();if (ret)return ret;
@@ -288,7 +283,6 @@ int axp_init(void)if (!(axp_chip_id ==0x6 || axp_chip_id ==0x7 || axp_chip_id ==0x17 ))return -ENODEV ; - needs_init =0 ;return 0 ; }
Signature · 1 line
2.5.0
PATCH 3/7 sunxi: power: Unify axp pmic function names
In reply to Hans de GoedeQuoted 3 lines · Hans de Goede
Stop prefixing the axp functions for setting voltages, etc. with the model number, there ever is only one pmic driver built into u-boot, this allows simplifying the callers.
Hmm... What's going to happen with the A80, which has 2 PMICs? IIRC a subset of their LDOs share the same name, which would be a problem.
ChenYu
Quoted 2 lines
Signed-off-by Hans de Goede <[email protected]>---
PATCH 3/7 sunxi: power: Unify axp pmic function names
Hi,
Quoted 7 lines · Chen-Yu Tsai
Quoted 3 lines · Hans de Goede
Stop prefixing the axp functions for setting voltages, etc. with the model number, there ever is only one pmic driver built into u-boot, this allows simplifying the callers.
Hmm... What's going to happen with the A80, which has 2 PMICs? IIRC a subset of their LDOs share the same name, which would be a problem.
My plan for that is to use a different function name for the ldo-s on the secondary pmic, e.g. something like axp2_set_xldo1(...), or somesuch. Actually this patch should help adding support for the other pmics since it will make it less of an #ifdef fest.
Regards,
Hans
PATCH 1/7 sunxi: Kconfig-ify CONFIG_AXP152_POWER and _AXP209_POWER
In reply to Hans de GoedeQuoted 1 line · Hans de Goede
Note that sun5i boards can have either an AXP209 or an AXP152 pmic,
Is it actually xor? I think so given that you later on unify the names such that they cannot be compiled in at the same time.
If so then...
Quoted 15 lines
drivers/power/Kconfig +5
-0+config AXP152_POWER + boolean "axp152 pmic support" + depends on MACH_SUN5I + ---help--- + Say y here to enable support for the axp152 pmic found onmost A10s
drivers/power/Kconfig +8
-0+ boards. + +config AXP209_POWER + boolean "axp209 pmic support" + depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I + default y if MACH_SUN4I || MACH_SUN7I + ---help--- + Say y here to enable support for the axp209 pmic found onmost
drivers/power/Kconfig source "drivers/power/pmic/Kconfig" · line 22
Quoted 3 lines
drivers/power/Kconfig +2
-0+ A10, A13 and A20 boards. + config AXP221_POWER
... these three ought to be inside a choice?
Ian.
PATCH 2/7 sunxi: power: Make all voltages configurable through Kconfig
In reply to Hans de GoedeQuoted 10 lines · Hans de Goede
On boards with axp221/223 pmic-s we already allow configuring most voltages. Make the
Kconfigoptions for these also apply to boards with
axp152 / axp209 pmic-s and extend them to configure all voltages.The
Kconfigdefaults are chosen so that this commit does not introduce any
functional changes.Signed-off-by Hans de Goede <[email protected]>
(I'm afraid I have to go to the dentist now, I'll try and get to the remainder after that, or if not then at the w/e.
Ian)
PATCH 3/7 sunxi: power: Unify axp pmic function names
In reply to Hans de GoedeQuoted 9 lines · Hans de Goede
Hi,
Quoted 6 lines · Chen-Yu Tsai
Quoted 3 lines · Hans de Goede
Stop prefixing the axp functions for setting voltages, etc. with the model number, there ever is only one pmic driver built into u-boot, this allows simplifying the callers.
Quoted 7 lines
Quoted 2 lines
Hmm... What's going to happen with the A80, which has 2 PMICs? IIRC a subset of their LDOs share the same name, which would be a problem.
My plan for that is to use a different function name for the ldo-s on the secondary pmic, e.g. something like
axp2_set_xldo1(...), or somesuch. Actually this patch should help adding support for the other pmics since it will make it less of an #ifdef fest.
Is it going to be (or very likely to be) the case that a given AXPxxx device will only ever be a primary or a secondary, but never used as both (perhaps on different boards)?
Is there some property of these devices which causes them to be only usable as one or the other?
If there is some possibility of this not being the case then this unification + my comments on patch #1 might be seen in a different light.
Having a board which uses two of the same AXPxxx device looks like it would be even more problematic, if such a thing is possible.
Or is the plan to just cross that bridge if/when we get there? (I think I'm
OK with that).
Ian.
PATCH 4/7 sunxi: power: Change A23/A33 VDD-SYS default from 1.2V to 1.1V
In reply to Hans de GoedeQuoted 8 lines · Hans de Goede
Change the axp223 dcdc2 / VDD-SYS default from 1.2V to 1.1V, 1.1V is the value recommended by Allwinner and is what most fex files specify.
This has been tested on a number of A23/A33 tablets including on an A23 Ippo-q8h-v1.2 PCB tablet which has a fex file which specifies 1.2V (which is where our original 1.2V default comes from).
Signed-off-by Hans de Goede <[email protected]>
PATCH 5/7 sunxi: power: Change A23/A33 aldo1 default voltage to 3.0V
In reply to Hans de GoedeQuoted 8 lines · Hans de Goede
On A23 / A33 boards aldo1 is used for VCC-IO and should be 3.0V, make this
the default.Note that this does not cause any functional changes since all sun8i board defconfig-s already contained:
CONFIG_AXP_ALDO1_VOLT=3000.Signed-off-by Hans de Goede <[email protected]>
PATCH 6/7 sunxi: power: Use pmic_bus functions for axp152 / axp209 driver
In reply to Hans de GoedeQuoted 5 lines · Hans de Goede
Use the generic
pmic_bushelpers for the axp152 / axp209 drivers, rather then having them define their own register read / write functions.Signed-off-by Hans de Goede <[email protected]>
PATCH 7/7 sunxi: power: Drop protection against multiple calls from axp221 axp_init()
In reply to Hans de GoedeQuoted 5 lines · Hans de Goede
The only thing axp221.c's
axp_init()does which needs protection against multiple calls is callingpmic_bus_init, andpmic_bus_init()itself is already protected against being called multiple times.Signed-off-by Hans de Goede <[email protected]>
PATCH 1/7 sunxi: Kconfig-ify CONFIG_AXP152_POWER and _AXP209_POWER
In reply to Ian CampbellHi,
Quoted 20 lines · Ian Campbell
Quoted 1 line · Hans de Goede
Note that sun5i boards can have either an AXP209 or an AXP152 pmic,
Is it actually xor? I think so given that you later on unify the names such that they cannot be compiled in at the same time.
If so then...
Quoted 12 lines
drivers/power/Kconfig +5
-0+config AXP152_POWER + boolean "axp152 pmic support" + depends on MACH_SUN5I + ---help--- + Say y here to enable support for the axp152 pmic found onmost A10s
drivers/power/Kconfig +6
-0+ boards. + +config AXP209_POWER + boolean "axp209 pmic support" + depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I + default y if MACH_SUN4I || MACH_SUN7I
Quoted 8 lines
drivers/power/Kconfig source "drivers/power/pmic/Kconfig" · line 22
Quoted 6 lines
(quoted diff) +2
-0+ ---help--- + Say y here to enable support for the axp209 pmic found onmost
drivers/power/Kconfig +2
-0+ A10, A13 and A20 boards. + config AXP221_POWER... these three ought to be inside a choice?
I was thinking the same, but on A80 boards there are 2 different axp chips, so if we make this a choice now we just end up needing to revert this when we get full A80 support.
Regards,
Hans
PATCH 3/7 sunxi: power: Unify axp pmic function names
In reply to Ian CampbellHi,
Quoted 13 lines · Ian Campbell
Quoted 12 lines · Hans de Goede
Hi,
Quoted 8 lines · Chen-Yu Tsai
Quoted 3 lines · Hans de Goede
Stop prefixing the axp functions for setting voltages, etc. with the model number, there ever is only one pmic driver built into u-boot, this allows simplifying the callers.
Hmm... What's going to happen with the A80, which has 2 PMICs? IIRC a subset of their LDOs share the same name, which would be a problem.
Quoted 8 lines
Quoted 4 lines
My plan for that is to use a different function name for the ldo-s on the secondary pmic, e.g. something like
axp2_set_xldo1(...), or somesuch. Actually this patch should help adding support for the other pmics since it will make it less of an #ifdef fest.Is it going to be (or very likely to be) the case that a given AXPxxx device will only ever be a primary or a secondary, but never used as both (perhaps on different boards)?
AFAIK that is correct, there are different axp models for primary / secondary pmics. Some a80 / a83 boards may only use the primary pmic, but using only the secondary is not really expected.
Quoted 2 lines
Is there some property of these devices which causes them to be only usable as one or the other?
No, not really (unless you count things like power-on / power-button handling which only the primary has AFAIK).
Quoted 5 lines
If there is some possibility of this not being the case then this unification + my comments on patch #1 might be seen in a different light.
Having a board which uses two of the same AXPxxx device looks like it would be even more problematic, if such a thing is possible.
AFAIK there are no boards which use the same pmic twice.
Quoted 2 lines
Or is the plan to just cross that bridge if/when we get there? (I think I'm
OK with that).
Yes that is pretty much the plan :)
Regards,
Hans
PATCH 3/7 sunxi: power: Unify axp pmic function names
Quoted 25 lines · Hans de Goede
Hi,
Quoted 22 lines · Ian Campbell
Quoted 20 lines · Hans de Goede
Hi,
Quoted 9 lines · Chen-Yu Tsai
On Sat, Oct 3, 2015 at 10:26 PM, Hans de Goede <[email protected]
Quoted 1 line
Quoted 5 lines · wrote:
Stop prefixing the axp functions for setting voltages, etc. with the
model number, there ever is only one pmic driver built into u -boot,
this allows simplifying the callers.Quoted 3 lines
Hmm... What's going to happen with the A80, which has 2 PMICs? IIRC a subset of their LDOs share the same name, which would be a problem.
My plan for that is to use a different function name for the ldo-s on the secondary pmic, e.g. something like
axp2_set_xldo1(...), or somesuch. Actually this patch should help adding support for the other pmics since it will make it less of an #ifdef fest.
Quoted 7 lines
Quoted 4 lines
Is it going to be (or very likely to be) the case that a given AXPxxx device will only ever be a primary or a secondary, but never used as both
(perhaps on different boards)?AFAIK that is correct, there are different axp models for primary / secondary pmics.
OK, that makes sense, but then this:
Quoted 2 lines
Some a80 / a83 boards may only use the primary pmic, but using only
the secondary is not really expected.
... makes me want to clarify, since I understand that having a secondary but not a primary would be rather strange and wasn't what I was getting at.
What I meant was for a given AXPxxx is that model only ever either used as a primary _or_ used as a secondary (with some other AXPabc as the primary). I think your answer further above is telling me that yes, a given AXPxxx is either designed (and used) as a primary or a secondary.
From the patch #1 discussion (since it is predicated on the above and splitting the conversation in two will probably just get confusing):
Quoted 5 lines
Quoted 1 line
... these three ought to be inside a choice?
I was thinking the same, but on A80 boards there are 2 different axp chips, so if we make this a choice now we just end up needing to revert this when we get full A80 support.
But one of those would be a primary and the other a secondary, and as discussed above (as I currently understand it at least) each CONFIG_AXPxxx_POWER can be a primary XOR a secondary.
In which case what we would want is a set of choice options for primary and a separate set choice options for secondary (with a none option too in this case) and there would be no duplication of any specific AXPxxx option between both the primary and secondary sets.
Ian.
PATCH 3/7 sunxi: power: Unify axp pmic function names
Hi,
Quoted 56 lines · Ian Campbell
Quoted 25 lines · Hans de Goede
Hi,
Quoted 22 lines · Ian Campbell
Quoted 20 lines · Hans de Goede
Hi,
Quoted 9 lines · Chen-Yu Tsai
On Sat, Oct 3, 2015 at 10:26 PM, Hans de Goede <[email protected]
Quoted 1 line
Quoted 5 lines · wrote:
Stop prefixing the axp functions for setting voltages, etc. with the
model number, there ever is only one pmic driver built into u -boot,
this allows simplifying the callers.Quoted 3 lines
Hmm... What's going to happen with the A80, which has 2 PMICs? IIRC a subset of their LDOs share the same name, which would be a problem.
My plan for that is to use a different function name for the ldo-s on the secondary pmic, e.g. something like
axp2_set_xldo1(...), or somesuch. Actually this patch should help adding support for the other pmics since it will make it less of an #ifdef fest.Quoted 7 lines
Quoted 4 lines
Is it going to be (or very likely to be) the case that a given AXPxxx device will only ever be a primary or a secondary, but never used as both
(perhaps on different boards)?AFAIK that is correct, there are different axp models for primary / secondary pmics.
OK, that makes sense, but then this:
Quoted 2 lines
Some a80 / a83 boards may only use the primary pmic, but using only
the secondary is not really expected.... makes me want to clarify, since I understand that having a secondary but not a primary would be rather strange and wasn't what I was getting at.
What I meant was for a given AXPxxx is that model only ever either used as a primary _or_ used as a secondary (with some other AXPabc as the primary). I think your answer further above is telling me that yes, a given AXPxxx is either designed (and used) as a primary or a secondary.
From the patch #1 discussion (since it is predicated on the above and
splitting the conversation in two will probably just get confusing):Quoted 5 lines
Quoted 1 line
... these three ought to be inside a choice?
I was thinking the same, but on A80 boards there are 2 different axp chips, so if we make this a choice now we just end up needing to revert this when we get full A80 support.
Quoted 8 lines
But one of those would be a primary and the other a secondary, and as discussed above (as I currently understand it at least) each
CONFIG_AXPxxx_POWERcan be a primary XOR a secondary.In which case what we would want is a set of choice options for primary and a separate set choice options for secondary (with a none option too in this case) and there would be no duplication of any specific AXPxxx option between both the primary and secondary sets.
Ah Yes, from what we now know / expect about how things will work on boards with 2 pmics that is correct. I'll respin the first patch to change things into a choice including a none option.
Regards,
Hans
PATCH 3/7 sunxi: power: Unify axp pmic function names
Quoted 8 lines · Hans de Goede
Quoted 4 lines
In which case what we would want is a set of choice options for primary and a separate set choice options for secondary (with a none option too in this case) and there would be no duplication of any specific AXPxxx option between both the primary and secondary sets.
Ah Yes, from what we now know / expect about how things will work on boards with 2 pmics that is correct. I'll respin the first patch to change things into a choice including a none option.
Do we need a "none" option for the primary case?
PATCH 3/7 sunxi: power: Unify axp pmic function names
In reply to Ian CampbellHi,
Quoted 39 lines · Ian Campbell
Quoted 25 lines · Hans de Goede
Hi,
Quoted 22 lines · Ian Campbell
Quoted 20 lines · Hans de Goede
Hi,
Quoted 9 lines · Chen-Yu Tsai
On Sat, Oct 3, 2015 at 10:26 PM, Hans de Goede <[email protected]
Quoted 1 line
Quoted 5 lines · wrote:
Stop prefixing the axp functions for setting voltages, etc. with the
model number, there ever is only one pmic driver built into u -boot,
this allows simplifying the callers.Quoted 3 lines
Hmm... What's going to happen with the A80, which has 2 PMICs? IIRC a subset of their LDOs share the same name, which would be a problem.
My plan for that is to use a different function name for the ldo-s on the secondary pmic, e.g. something like
axp2_set_xldo1(...), or somesuch. Actually this patch should help adding support for the other pmics since it will make it less of an #ifdef fest.Quoted 7 lines
Quoted 4 lines
Is it going to be (or very likely to be) the case that a given AXPxxx device will only ever be a primary or a secondary, but never used as both
(perhaps on different boards)?AFAIK that is correct, there are different axp models for primary / secondary pmics.
OK, that makes sense, but then this:
Quoted 2 lines
Some a80 / a83 boards may only use the primary pmic, but using only
the secondary is not really expected.
Quoted 7 lines
... makes me want to clarify, since I understand that having a secondary but not a primary would be rather strange and wasn't what I was getting at.
What I meant was for a given AXPxxx is that model only ever either used as a primary _or_ used as a secondary (with some other AXPabc as the primary). I think your answer further above is telling me that yes, a given AXPxxx is either designed (and used) as a primary or a secondary.
Only the AXP806 is multi-role, i.e. can be primary or secondary. All the others that we know of, excluding the AXP818 for which we have no docs, are standalone PMICs.
And a system can also have multiple AXP806s, even on the same bus. This is supported by some address extension register.
Having said the above, I really don't expect to see these kinds of designs in the wild.
Quoted 9 lines
From the patch #1 discussion (since it is predicated on the above and splitting the conversation in two will probably just get confusing):
Quoted 5 lines
Quoted 1 line
... these three ought to be inside a choice?
I was thinking the same, but on A80 boards there are 2 different axp chips, so if we make this a choice now we just end up needing to revert this when we get full A80 support.
Quoted 8 lines
But one of those would be a primary and the other a secondary, and as discussed above (as I currently understand it at least) each
CONFIG_AXPxxx_POWERcan be a primary XOR a secondary.In which case what we would want is a set of choice options for primary and a separate set choice options for secondary (with a none option too in this case) and there would be no duplication of any specific AXPxxx option between both the primary and secondary sets.
AFAIK, all the AXPs except AXP806 belong in the primary list. The secondary set should only have AXP806, at least until Allwinner delivers some Cortex-A57 or Cortex-A72 design that needs the extra power of a secondary PMIC.
Regards
ChenYu
PATCH 4/7 sunxi: power: Change A23/A33 VDD-SYS default from 1.2V to 1.1V
In reply to Hans de GoedeQuoted 8 lines · Hans de Goede
Change the axp223 dcdc2 / VDD-SYS default from 1.2V to 1.1V, 1.1V is the value recommended by Allwinner and is what most fex files specify.
This has been tested on a number of A23/A33 tablets including on an A23 Ippo-q8h-v1.2 PCB tablet which has a fex file which specifies 1.2V (which is where our original 1.2V default comes from).
Signed-off-by Hans de Goede <[email protected]>
We should also be able to drop the VDD-SYS voltage for A31/A31s, which is from DCDC4, as well.
Furthermore, DCDC2 on AXP221/sun6i is normally powering the GPU, in spite of the reference design using it for the CPU.
Regards
ChenYu
PATCH 3/7 sunxi: power: Unify axp pmic function names
In reply to Hans de GoedeQuoted 5 lines · Hans de Goede
Stop prefixing the axp functions for setting voltages, etc. with the model number, there ever is only one pmic driver built into u-boot, this allows simplifying the callers.
Signed-off-by Hans de Goede <[email protected]>
@@ -1217,10 +1217,10 @@ static void sunxi_mode_set(const struct
Quoted 6 lines
ctfb_res_modes*mode,Quoted 3 lines
> > if (IS_ENABLED(CONFIG_VIDEO_LCD_PANEL_EDP_4_LANE_1620M_VIA_ANX9804)) { > > > /* > > > * The anx9804 needs 1.8V from eldo3, we do this here-> > > > * and not via
CONFIG_AXP221_ELDO3fromboard_init()
+> > > > * and not viaCONFIG_AXP_ELDO3_VOLTfromboard_init()
I think strictly speaking that hunk belonged in a previous patch, but nevermind (or feel to retain acks on both if you want to move it).
Ian.
PATCH 4/7 sunxi: power: Change A23/A33 VDD-SYS default from 1.2V to 1.1V
In reply to Chen-Yu TsaiHi,
Quoted 4 lines · Chen-Yu Tsai
Quoted 3 lines · Hans de Goede
Change the axp223 dcdc2 / VDD-SYS default from 1.2V to 1.1V, 1.1V is the value recommended by Allwinner and is what most fex files specify.
Quoted 8 lines
Quoted 5 lines
This has been tested on a number of A23/A33 tablets including on an A23 Ippo-q8h-v1.2 PCB tablet which has a fex file which specifies 1.2V (which is where our original 1.2V default comes from).
Signed-off-by Hans de Goede <[email protected]>We should also be able to drop the VDD-SYS voltage for A31/A31s, which is from DCDC4, as well.
The fex files do not agree with you all A31 fex files have it at either 1200 or 1240 mV.
Quoted 2 lines
Furthermore, DCDC2 on AXP221/sun6i is normally powering the GPU, in spite of the reference design using it for the CPU.
Right, the Kconfig help for DCDC2 already contains:
On A31 boards dcdc2 is used for VDD-GPU and should be 1.2V.
Regards,
Hans