mfd: axp20x: Add support for RSB based AXP223
Subsystems (6)
v3 cover mfd: axp20x: Add support for RSB based AXP223
Hi everyone,
This is v3 of the AXP223 PMIC series.
Changes since v2:
- s/It's/Its/ for the commit messages of patches 5 and 7
- Add Rob's Acked-by for patch 1
Changes since v1:
- Dropped NMI interrupt controller dts patch (Merged)
- Change MFD_AXP20X to represent the axp20x core, and drop MFD_AXP20X_CORE
- Keep the axp20x core bits named axp20x.c
- Add patch 7 to add AXP223 to sun8i-q8-common.dtsi
- Add patch 8 & 9 to update defconfigs
- Make axp20x drivers tristate and buildable as modules
- Drop "_sunxi" substring from identifiers in axp20x-rsb driver
This series adds support for the Reduced Serial Bus based AXP223 PMIC. The AXP223 is functionally identical to the AXP221, which we already support. Only some default values for the regulators are different. The defaults fit their recommended application, paired with different SoCs.
Patch 1 adds AXP223 to the list of supported chips in the DT binding.
Patch 2 splits the axp20x mfd driver into 2 parts, a core library, and an I2C driver.
Patch 3 adds an RSB based driver for the AXP223.
Patch 4 adds support for the AXP223 regulators
Patch 5 enables the AXP223 PMIC and its regulators for the Sinlinx SinA33.
Patch 6 adds a label to the simplefb node in the sun8i dts.
Patch 7 enables the AXP223 PMIC and its regulators for A23/A33 based Q8 devices.
Patch 8 enables MFD_AXP20X_I2C and MFD_AXP20X_RSB in sunxi_defconfig
Patch 9 enables SUNXI_RSB, MFD_AXP20X_RSB and MFD_AXP20X_RSB in multi_v7_defconfig, and changes all existing AXP20X related symbols to M (module).
Regards
ChenYu
Chen-Yu Tsai (9):
mfd: axp20x: Add AXP223 to list of supported PMICs in DT bindings
mfd: axp20x: Split the driver into core and i2c bits
mfd: axp20x: Add support for RSB based AXP223 PMIC
regulator: axp20x: Support new AXP223 PMIC
ARM: dts: sun8i: sinlinx-sina33: Add AXP223 PMIC device and regulator
nodes
ARM: dts: sun8i: Add simplefb node labels to reference at board level
ARM: dts: sun8i: q8-common: Add AXP223 PMIC device and regulator nodes
ARM: sunxi_defconfig: Update MFD_AXP20X symbol and enable
MFD_AXP20X_RSB
ARM: multi_v7_defconfig: Enable RSB and AXP20X related drivers as
modules
Documentation/devicetree/bindings/mfd/axp20x.txt | 7 +- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 +- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 79 +++++++++++++- arch/arm/boot/dts/sun8i-q8-common.dtsi | 86 ++++++++++++++- arch/arm/configs/multi_v7_defconfig | 8 +- arch/arm/configs/sunxi_defconfig | 2 + drivers/mfd/Kconfig | 25 ++++- drivers/mfd/Makefile | 2 + drivers/mfd/axp20x-i2c.c | 127 +++++++++++++++++++++++ drivers/mfd/axp20x-rsb.c | 93 +++++++++++++++++ drivers/mfd/axp20x.c | 110 +++----------------- drivers/regulator/axp20x-regulator.c | 3 + include/linux/mfd/axp20x.h | 34 +++++- 13 files changed, 467 insertions(+), 111 deletions(-) create mode 100644 drivers/mfd/axp20x-i2c.c create mode 100644 drivers/mfd/axp20x-rsb.c
Signature · 1 line
2.6.2
PATCH v3 1/9 mfd: axp20x: Add AXP223 to list of supported PMICs in DT bindings
The AXP223 is a new PMIC commonly paired with Allwinner A23/A33 SoCs. It is functionally identical to AXP221; only the regulator default voltage/status and the external host interface are different.
--- Documentation/devicetree/bindings/mfd/axp20x.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/axp20x.txt +4 -3
@@ -5,11 +5,12 @@ axp152 (X-Powers) axp202 (X-Powers) axp209 (X-Powers) axp221 (X-Powers) +axp223 (X-Powers) Required properties: - compatible: "x-powers,axp152", "x-powers,axp202", "x-powers,axp209", - "x-powers,axp221" -- reg: The I2C slave address for the AXP chip + "x-powers,axp221", "x-powers,axp223" +- reg: The I2C slave address or RSB hardware address for the AXP chip - interrupt-parent: The parent interrupt controller - interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin - interrupt-controller: The PMIC has its own internal IRQs
@@ -51,7 +52,7 @@ LDO3 : LDO : ldo3in-supply LDO4 : LDO : ldo24in-supply : shared supply LDO5 : LDO : ldo5in-supply -AXP221 regulators, type, and corresponding input supply names: +AXP221/AXP223 regulators, type, and corresponding input supply names: Regulator Type Supply Name Notes --------- ---- ----------- -----
Signature · 1 line
2.6.2
PATCH v3 2/9 mfd: axp20x: Split the driver into core and i2c bits
In reply to Chen-Yu TsaiThe axp20x driver assumes the device is i2c based. This is not the case with later chips, which use a proprietary 2 wire serial bus by Allwinner called "Reduced Serial Bus".
This patch follows the example of mfd/wm831x and splits it into an interface independent core, and an i2c specific glue layer. MFD_AXP20X and the new MFD_AXP20X_I2C are changed to tristate symbols, allowing the driver to be built as modules.
Included but unused header files are removed as well.
--- drivers/mfd/Kconfig | 14 +++-- drivers/mfd/Makefile | 1 + drivers/mfd/axp20x-i2c.c | 127 +++++++++++++++++++++++++++++++++++++++++++++ drivers/mfd/axp20x.c | 108 +++++--------------------------------- include/linux/mfd/axp20x.h | 33 +++++++++++- 5 files changed, 183 insertions(+), 100 deletions(-) create mode 100644 drivers/mfd/axp20x-i2c.c
drivers/mfd/Kconfig +9 -5
@@ -91,14 +91,18 @@ config MFD_BCM590XX Support for the BCM590xx PMUs from Broadcom config MFD_AXP20X - bool "X-Powers AXP20X" + tristate select MFD_CORE - select REGMAP_I2C select REGMAP_IRQ - depends on I2C=y + +config MFD_AXP20X_I2C + tristate "X-Powers AXP series PMICs with I2C" + select MFD_AXP20X + select REGMAP_I2C + depends on I2C help - If you say Y here you get support for the X-Powers AXP202, AXP209 and - AXP288 power management IC (PMIC). + If you say Y here you get support for the X-Powers AXP series power + management ICs (PMICs) controlled with I2C. This driver include only the core APIs. You have to select individual components like regulators or the PEK (Power Enable Key) under the corresponding menus.
drivers/mfd/Makefile +1 -0
@@ -107,6 +107,7 @@ obj-$(CONFIG_PMIC_DA9052) += da9052-core.o obj-$(CONFIG_MFD_DA9052_SPI) += da9052-spi.o obj-$(CONFIG_MFD_DA9052_I2C) += da9052-i2c.o obj-$(CONFIG_MFD_AXP20X) += axp20x.o +obj-$(CONFIG_MFD_AXP20X_I2C) += axp20x-i2c.o obj-$(CONFIG_MFD_LP3943) += lp3943.o obj-$(CONFIG_MFD_LP8788) += lp8788.o lp8788-irq.o
drivers/mfd/axp20x-i2c.c new file +127 -0
127 lines not on this page · raw message
drivers/mfd/axp20x.c +14 -94
181 lines not on this page · raw message
include/linux/mfd/axp20x.h +32 -1
@@ -396,7 +396,7 @@ enum axp288_irqs {struct axp20x_dev {struct device *dev; -struct i2c_client *i2c_client; +int irq;struct regmap *regmap;struct regmap_irq_chip_data *regmap_irqc;long variant;
@@ -462,4 +462,35 @@ static inline int axp20x_read_variable_width(struct regmap *regmap, return result; } +/** +* axp20x_match_device(): Setup axp20x variant related fields +* +* @axp20x: axp20x device to setup (.variant field must be set) +* @dev: device associated with this axp20x device +* +* This lets the axp20x core configure the mfd cells and register maps +* for later use. +*/ +int axp20x_match_device (struct axp20x_dev *axp20x,struct device *dev); + +/** +* axp20x_device_probe(): Probe a configured axp20x device +* +* @axp20x: axp20x device to probe (must be configured) +* +* This function lets the axp20x core register the axp20x mfd devices +* and irqchip. The axp20x device passed in must be fully configured +* with axp20x_match_device, its irq set, and regmap created. +*/ +int axp20x_device_probe (struct axp20x_dev *axp20x); + +/** +* axp20x_device_probe(): Remove a axp20x device +* +* @axp20x: axp20x device to remove +* +* This tells the axp20x core to remove the associated mfd devices +*/ +int axp20x_device_remove (struct axp20x_dev *axp20x); +#endif /* __LINUX_MFD_AXP20X_H */
Signature · 1 line
2.6.2
PATCH v3 3/9 mfd: axp20x: Add support for RSB based AXP223 PMIC
In reply to Chen-Yu TsaiThe AXP223 is a new PMIC commonly paired with Allwinner A23/A33 SoCs. It is functionally identical to AXP221; only the regulator default voltage/status and the external host interface are different.
--- drivers/mfd/Kconfig | 11 ++++++ drivers/mfd/Makefile | 1 + drivers/mfd/axp20x-rsb.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/mfd/axp20x.c | 2 + include/linux/mfd/axp20x.h | 1 + 5 files changed, 108 insertions(+) create mode 100644 drivers/mfd/axp20x-rsb.c
drivers/mfd/Kconfig +11 -0
@@ -107,6 +107,17 @@ config MFD_AXP20X_I2C components like regulators or the PEK (Power Enable Key) under the corresponding menus. +config MFD_AXP20X_RSB + tristate "X-Powers AXP series PMICs with RSB" + select MFD_AXP20X + depends on SUNXI_RSB + help + If you say Y here you get support for the X-Powers AXP series power + management ICs (PMICs) controlled with RSB. + This driver include only the core APIs. You have to select individual + components like regulators or the PEK (Power Enable Key) under the + corresponding menus. + config MFD_CROS_EC tristate "ChromeOS Embedded Controller" select MFD_CORE
drivers/mfd/Makefile +1 -0
@@ -108,6 +108,7 @@ obj-$(CONFIG_MFD_DA9052_SPI) += da9052-spi.o obj-$(CONFIG_MFD_DA9052_I2C) += da9052-i2c.o obj-$(CONFIG_MFD_AXP20X) += axp20x.o obj-$(CONFIG_MFD_AXP20X_I2C) += axp20x-i2c.o +obj-$(CONFIG_MFD_AXP20X_RSB) += axp20x-rsb.o obj-$(CONFIG_MFD_LP3943) += lp3943.o obj-$(CONFIG_MFD_LP8788) += lp8788.o lp8788-irq.o
drivers/mfd/axp20x-rsb.c new file +93 -0
93 lines not on this page · raw message
drivers/mfd/axp20x.c +2 -0
@@ -32,6 +32,7 @@ static const char * const axp20x_model_names[] = {"AXP202" ,"AXP209" ,"AXP221" , +"AXP223" , "AXP288", };
@@ -595,6 +596,7 @@ int axp20x_match_device(struct axp20x_dev *axp20x, struct device *dev) axp20x->regmap_irq_chip = &axp20x_regmap_irq_chip;break ;case AXP221_ID : +case AXP223_ID : axp20x->nr_cells =ARRAY_SIZE (axp22x_cells); axp20x->cells = axp22x_cells; axp20x->regmap_cfg = &axp22x_regmap_config;
include/linux/mfd/axp20x.h +1 -0
@@ -18,6 +18,7 @@ enum {AXP202_ID ,AXP209_ID ,AXP221_ID , +AXP223_ID ,AXP288_ID , NR_AXP20X_VARIANTS, };
Signature · 1 line
2.6.2
PATCH v3 4/9 regulator: axp20x: Support new AXP223 PMIC
In reply to Chen-Yu TsaiThe AXP223 is a new PMIC commonly paired with Allwinner A23/A33 SoCs. It is functionally identical to AXP221; only the regulator default voltage/status and the external host interface are different.
--- drivers/regulator/axp20x-regulator.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/regulator/axp20x-regulator.c +3 -0
@@ -244,6 +244,7 @@ static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq) step =75 ;break ;case AXP221_ID : +case AXP223_ID : min =1800 ; max =4050 ; def =3000 ;
@@ -322,6 +323,7 @@ static int axp20x_set_dcdc_workmode(struct regulator_dev *rdev, int id, u32 workbreak ;case AXP221_ID : +case AXP223_ID :if (id <AXP22X_DCDC1 || id >AXP22X_DCDC5 )return -EINVAL ;
@@ -360,6 +362,7 @@ static int axp20x_regulator_probe(struct platform_device *pdev) nregulators =AXP20X_REG_ID_MAX ;break ;case AXP221_ID : +case AXP223_ID : regulators = axp22x_regulators; nregulators =AXP22X_REG_ID_MAX ;break ;
Signature · 1 line
2.6.2
PATCH v3 5/9 ARM: dts: sun8i: sinlinx-sina33: Add AXP223 PMIC device and regulator nodes
In reply to Chen-Yu TsaiThis board has a X-Powers AXP223 PMIC connected via RSB. Its regulators provide power to various parts of the SoC and the board.
Also update the regulator supply phandles.
--- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 79 +++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 3 deletions(-)
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts +76 -3
@@ -68,7 +68,7 @@ }; &lradc { - vref-supply = <®_vcc3v0>; + vref-supply = <®_dcdc1>; status = "okay"; button at 200 {
@@ -96,7 +96,7 @@ &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>; - vmmc-supply = <®_vcc3v0>; + vmmc-supply = <®_dcdc1>; bus-width = <4>; cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ cd-inverted;
@@ -106,7 +106,7 @@ &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_8bit_pins>; - vmmc-supply = <®_vcc3v0>; + vmmc-supply = <®_dcdc1>; bus-width = <8>; non-removable; status = "okay";
@@ -132,6 +132,79 @@ &r_rsb { status = "okay"; + + axp22x: pmic at 3e3 { + compatible = "x-powers,axp223"; + reg = <0x3e3>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + eldoin-supply = <®_dcdc1>; + }; +}; + +#include "axp22x.dtsi" + +®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-io"; +}; + +®_aldo2 { + regulator-always-on; + regulator-min-microvolt = <2350000>; + regulator-max-microvolt = <2650000>; + regulator-name = "vdd-dll"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-pll-avcc"; +}; + +®_dc5ldo { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpus"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-3v0"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-sys"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_rtc_ldo { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-rtc"; }; &uart0 {
Signature · 1 line
2.6.2
Re: [PATCH v3 5/9] ARM: dts: sun8i: sinlinx-sina33: Add AXP223 PMIC device and regulator nodes
Hi,
Quoted 109 lines · Chen-Yu Tsai
This board has a X-Powers AXP223 PMIC connected via RSB. Its regulators provide power to various parts of the SoC and the board.
Also update the regulator supply phandles.
Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 79 +++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 3 deletions(-)arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts +67
-3@@ -68,7 +68,7 @@ }; &lradc { - vref-supply = <®_vcc3v0>; + vref-supply = <®_dcdc1>; status = "okay"; button at 200 {@@ -96,7 +96,7 @@ &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>; - vmmc-supply = <®_vcc3v0>; + vmmc-supply = <®_dcdc1>; bus-width = <4>; cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ cd-inverted;@@ -106,7 +106,7 @@ &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_8bit_pins>; - vmmc-supply = <®_vcc3v0>; + vmmc-supply = <®_dcdc1>; bus-width = <8>; non-removable; status = "okay";@@ -132,6 +132,79 @@ &r_rsb { status = "okay"; + + axp22x: pmic at 3e3 { + compatible = "x-powers,axp223"; + reg = <0x3e3>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + eldoin-supply = <®_dcdc1>; + }; +}; + +#include "axp22x.dtsi" + +®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-io"; +}; + +®_aldo2 { + regulator-always-on; + regulator-min-microvolt = <2350000>; + regulator-max-microvolt = <2650000>; + regulator-name = "vdd-dll"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-pll-avcc"; +}; + +®_dc5ldo { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpus"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-3v0"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-sys"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>;
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts line 208
Quoted 10 lines
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts +9
-0+ regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_rtc_ldo { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-rtc"; };
Isn't this supposed to be in the AXP DTSI?
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151120/61b6d47a/attachment.sig>
Re: [PATCH v3 5/9] ARM: dts: sun8i: sinlinx-sina33: Add AXP223 PMIC device and regulator nodes
Quoted 116 lines · Maxime Ripard
Hi,
Quoted 113 lines · Chen-Yu Tsai
This board has a X-Powers AXP223 PMIC connected via RSB. Its regulators provide power to various parts of the SoC and the board.
Also update the regulator supply phandles.
Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 79 +++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 3 deletions(-)arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts +71
-3@@ -68,7 +68,7 @@ }; &lradc { - vref-supply = <®_vcc3v0>; + vref-supply = <®_dcdc1>; status = "okay"; button at 200 {@@ -96,7 +96,7 @@ &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>; - vmmc-supply = <®_vcc3v0>; + vmmc-supply = <®_dcdc1>; bus-width = <4>; cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ cd-inverted;@@ -106,7 +106,7 @@ &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_8bit_pins>; - vmmc-supply = <®_vcc3v0>; + vmmc-supply = <®_dcdc1>; bus-width = <8>; non-removable; status = "okay";@@ -132,6 +132,79 @@ &r_rsb { status = "okay"; + + axp22x: pmic at 3e3 { + compatible = "x-powers,axp223"; + reg = <0x3e3>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + eldoin-supply = <®_dcdc1>; + }; +}; + +#include "axp22x.dtsi" + +®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-io"; +}; + +®_aldo2 { + regulator-always-on; + regulator-min-microvolt = <2350000>; + regulator-max-microvolt = <2650000>; + regulator-name = "vdd-dll"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-pll-avcc"; +}; + +®_dc5ldo { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpus"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-3v0"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-sys"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; +
Quoted 8 lines
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts line 208
Quoted 6 lines
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts +5
-0+®_rtc_ldo { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-rtc"; };Isn't this supposed to be in the AXP DTSI?
Are you referring to ®_rtc_ldo? Yes, it should. I'll do a new version.
Thanks
ChenYu
Re: [PATCH v3 5/9] ARM: dts: sun8i: sinlinx-sina33: Add AXP223 PMIC device and regulator nodes
Quoted 10 lines · Chen-Yu Tsai
Quoted 8 lines
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts line 208
Quoted 6 lines
+®_rtc_ldo {
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts +4
-0+ regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-rtc"; };Isn't this supposed to be in the AXP DTSI?
Are you referring to
®_rtc_ldo?
Yep :)
Quoted 1 line
Yes, it should. I'll do a new version.
Great, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151122/6734c65a/attachment.sig>
PATCH v3 6/9 ARM: dts: sun8i: Add simplefb node labels to reference at board level
In reply to Chen-Yu TsaiSome boards, such as tablets, have regulators providing power to parts of the display pipeline, like signal converters and LCD panels.
Add labels to the simplefb device nodes so that we can reference them in the board dts files to add regulator supply properties.
--- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-a23-a33.dtsi +1 -1
@@ -56,7 +56,7 @@ #size-cells = <1>; ranges; - framebuffer at 0 { + simplefb_lcd: framebuffer at 0 { compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; allwinner,pipeline = "de_be0-lcd0";
Signature · 1 line
2.6.2
Maxime Ripard
AppliedRe: [PATCH v3 6/9] ARM: dts: sun8i: Add simplefb node labels to reference at board level
Quoted 7 lines · Chen-Yu Tsai
Some boards, such as tablets, have regulators providing power to parts of the display pipeline, like signal converters and LCD panels.
Add labels to the simplefb device nodes so that we can reference them in the board dts files to add regulator supply properties.
Signed-off-by Chen-Yu Tsai <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151120/33333a4c/attachment.sig>
PATCH v3 7/9 ARM: dts: sun8i: q8-common: Add AXP223 PMIC device and regulator nodes
In reply to Chen-Yu TsaiA23/A33 Q8 tablets have an X-Powers AXP223 PMIC connected via RSB. Its regulators provide power to various parts of the SoC and the board.
Also add lcd regulator supply for simplefb and update the existing vmmc-supply for mmc0.
--- arch/arm/boot/dts/sun8i-q8-common.dtsi | 86 +++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 2 deletions(-)
arch/arm/boot/dts/sun8i-q8-common.dtsi +84 -2
@@ -56,7 +56,6 @@ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; default-brightness-level = <8>; enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ - /* backlight is powered by AXP223 DC1SW */ }; chosen {
@@ -67,7 +66,7 @@ &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>; - vmmc-supply = <®_vcc3v0>; + vmmc-supply = <®_dcdc1>; bus-width = <4>; cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ cd-inverted;
@@ -92,6 +91,85 @@ &r_rsb { status = "okay"; + + axp22x: pmic at 3e3 { + compatible = "x-powers,axp223"; + reg = <0x3e3>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + eldoin-supply = <®_dcdc1>; + }; +}; + +#include "axp22x.dtsi" + +®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-io"; +}; + +®_aldo2 { + regulator-always-on; + regulator-min-microvolt = <2350000>; + regulator-max-microvolt = <2650000>; + regulator-name = "vdd-dll"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-pll-avcc"; +}; + +®_dc1sw { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-lcd"; +}; + +®_dc5ldo { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpus"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-3v0"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-sys"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_rtc_ldo { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-rtc"; }; &r_uart {
@@ -99,3 +177,7 @@ pinctrl-0 = <&r_uart_pins_a>; status = "okay"; }; + +&simplefb_lcd { + vcc-lcd-supply = <®_dc1sw>; +};
Signature · 1 line
2.6.2
PATCH v3 8/9 ARM: sunxi_defconfig: Update MFD_AXP20X symbol and enable MFD_AXP20X_RSB
In reply to Chen-Yu Tsaiaxp20x support has been split into 2 parts, I2C and RSB interface variants.
Update the MFD_AXP20X symbol for I2C support, and also enable MFD_AXP20X_RSB to support RSB variants.
Keep MFD_AXP20X enabled for now, to ease migration for automated boot farms while the patches are being merged. This should be removed in the next release.
--- arch/arm/configs/sunxi_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/configs/sunxi_defconfig +2 -0
@@ -89,6 +89,8 @@ CONFIG_CPU_THERMAL=y CONFIG_WATCHDOG=y CONFIG_SUNXI_WATCHDOG=y CONFIG_MFD_AXP20X=y +CONFIG_MFD_AXP20X_I2C=y +CONFIG_MFD_AXP20X_RSB=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_AXP20X=y
Signature · 1 line
2.6.2
Maxime Ripard
AppliedRe: [PATCH v3 8/9] ARM: sunxi_defconfig: Update MFD_AXP20X symbol and enable MFD_AXP20X_RSB
Quoted 11 lines · Chen-Yu Tsai
axp20x support has been split into 2 parts, I2C and RSB interface variants.
Update the
MFD_AXP20Xsymbol for I2C support, and also enableMFD_AXP20X_RSBto support RSB variants.Keep
MFD_AXP20Xenabled for now, to ease migration for automated boot farms while the patches are being merged. This should be removed in the next release.Signed-off-by Chen-Yu Tsai <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151120/eb7c6e47/attachment.sig>
PATCH v3 9/9 ARM: multi_v7_defconfig: Enable RSB and AXP20X related drivers as modules
In reply to Chen-Yu Tsaiaxp20x support has been split into 2 parts, I2C and RSB interface variants.
Update the MFD_AXP20X symbol for I2C support. Also enable SUNXI_RSB MFD_AXP20X_RSB to support RSB variants. Build these drivers as modules.
Keep MFD_AXP20X enabled for now, to ease migration for automated boot farms while the patches are being merged. This should be removed in the next release.
--- arch/arm/configs/multi_v7_defconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/configs/multi_v7_defconfig +6 -2
@@ -169,6 +169,7 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=64 CONFIG_OMAP_OCP2SCP=y CONFIG_SIMPLE_PM_BUS=y +CONFIG_SUNXI_RSB=m CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y
@@ -253,7 +254,7 @@ CONFIG_TOUCHSCREEN_SUN4I=y CONFIG_TOUCHSCREEN_WM97XX=m CONFIG_INPUT_MISC=y CONFIG_INPUT_MPU3050=y -CONFIG_INPUT_AXP20X_PEK=y +CONFIG_INPUT_AXP20X_PEK=m CONFIG_INPUT_ADXL34X=m CONFIG_SERIO_AMBAKMI=y CONFIG_SERIAL_8250=y
@@ -366,6 +367,7 @@ CONFIG_BATTERY_MAX17042=m CONFIG_CHARGER_MAX14577=m CONFIG_CHARGER_MAX77693=m CONFIG_CHARGER_TPS65090=y +CONFIG_AXP20X_POWER=m CONFIG_POWER_RESET_AS3722=y CONFIG_POWER_RESET_GPIO=y CONFIG_POWER_RESET_GPIO_RESTART=y
@@ -397,6 +399,8 @@ CONFIG_MFD_AS3722=y CONFIG_MFD_ATMEL_FLEXCOM=y CONFIG_MFD_BCM590XX=y CONFIG_MFD_AXP20X=y +CONFIG_MFD_AXP20X_I2C=m +CONFIG_MFD_AXP20X_RSB=m CONFIG_MFD_CROS_EC=y CONFIG_MFD_CROS_EC_I2C=m CONFIG_MFD_CROS_EC_SPI=y
@@ -417,7 +421,7 @@ CONFIG_REGULATOR_AB8500=y CONFIG_REGULATOR_ACT8865=y CONFIG_REGULATOR_AS3711=y CONFIG_REGULATOR_AS3722=y -CONFIG_REGULATOR_AXP20X=y +CONFIG_REGULATOR_AXP20X=m CONFIG_REGULATOR_BCM590XX=y CONFIG_REGULATOR_DA9210=y CONFIG_REGULATOR_FAN53555=y
Signature · 1 line
2.6.2
Maxime Ripard
AppliedRe: [PATCH v3 9/9] ARM: multi_v7_defconfig: Enable RSB and AXP20X related drivers as modules
Quoted 7 lines · Chen-Yu Tsai
axp20x support has been split into 2 parts, I2C and RSB interface variants.
Update the
MFD_AXP20Xsymbol for I2C support. Also enableSUNXI_RSBMFD_AXP20X_RSBto support RSB variants. Build these drivers as modules.
Quoted 5 lines
Keep
MFD_AXP20Xenabled for now, to ease migration for automated boot farms while the patches are being merged. This should be removed in the next release.Signed-off-by Chen-Yu Tsai <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151120/07108e91/attachment.sig>