Skip to contentSkip to conversation

mfd: AXP20x: Add support for AXP202 and AXP209

PATCH Superseded Carlo Caione 6 participants 30 messages May 1, 2014 – May 19, 2014 1 message not in the archive

Subsystems (7)

v5 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v5 cover mfd: AXP20x: Add support for AXP202 and AXP209

AXP209 and AXP202 are the PMUs (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner. AXP20x comprises an adaptive USB-Compatible PWM charger, 2 BUCK DC-DC converters, 5 LDOs, multiple 12-bit ADCs of voltage, current and temperature as well as 4 configurable GPIOs.

This set of patches introduces the core driver and support for two different subsystems:
- Regulators
- PEK (Power Enable Key)

Changes since v1:

- Added a new standalone patch for defconfig

- MFD core:
* Removed axp,system-power-controller property

- Bindings documentation:
* Corrected description for dcdc-workmode property
* Removed unused axp20x-pek compatible

- Input misc PEK driver:
* Fixed seconds in lower case

- Regulators subsystem:
* Fixed axp20x_set_suspend_voltage()
* Switched to using multi-bit control for regulators
* When "regulators" node is not found driver doesn't quit
* Driver is now using devm_regulator_register()
* Added module_platform_driver() instead of subsys_initcall()

- DT:
* Added new DTSI for AXP209
* Added support for cubietruck and olinuxino-micro

Changes since v2:

- Added a new patch for multi_v7_defconfig to enable MFD core and subsystems

- DT:
* Dropped axp,system-power-controller property from DTS
* Moved compatible and interrupt-related properties from the DTSI file to the DTS board files

- Regulators subsystem:
* Deleted useless struct axp20x_regulators
* Added a warning when out of specs values are used for the dcdc frequency

- MFD core:
* Fixed coding style
* Removed IDs from device table for i2c

- Bindings documentation:
* Several corrections and fixes

Changes since v3:

- Removed x-powers-axp209.dtsi file
- Rewritten bindings document

- MFD core:
* Fixed casting
* Better comments / documentation

- Input misc PEK driver:
* Timings are now expressed in ms and the sysfs appies the closest possible value
* No more useless pretty-printing
* Removed devm_request_threaded_irq in favour of devm_request_any_context_irq
* Moved from input attributes to platform device attributes

- Regulators subsystem:
* Removed suspend mode (axp20x_set_suspend_voltage)
* Added regulators input supply

- DT:
* DTs doesn't include anymore the dtsi
* Added input supplies for regulators

Changes since v4:

- Removed regulator patches already applied / acked by Mark Brown

- Input misc PEK driver:
* Don't print anymore the "us" unit
* Added cleanup for attributes when unbindind the device
* Fixed error code returned when device_create_file() fails

- DT:
* Enable all the regulators on at boot-time
* Removed min and max microvolts for all the regulators but DCDC2
* Moved the axp_ipsout regulator outside the MFD node

- MFD core:
* The supply regulators are now specified in the MFD driver using regulator_bulk_register_supply_alias() and the .parent_supplies in the MFD cell

Carlo Caione (8):
mfd: AXP20x: Add mfd driver for AXP20x PMIC
dt-bindings: add vendor-prefix for X-Powers
mfd: AXP20x: Add bindings documentation
input: misc: Add driver for AXP20x Power Enable Key
input: misc: Add ABI docs for AXP20x PEK
ARM: sunxi: Add AXP20x support in defconfig
ARM: sunxi: Add AXP20x support multi_v7_defconfig
ARM: sun7i/sun4i: dt: Add AXP209 support to various boards

 .../ABI/testing/sysfs-driver-input-axp-pek         |  11 +
 Documentation/devicetree/bindings/mfd/axp20x.txt   |  93 +++++++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/sun4i-a10-a1000.dts              |  58 +++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts         |  58 +++++
 arch/arm/boot/dts/sun4i-a10-hackberry.dts          |  64 +++++
 arch/arm/boot/dts/sun4i-a10-inet97fv2.dts          |  58 +++++
 arch/arm/boot/dts/sun4i-a10-mini-xplus.dts         |  65 +++++
 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts     |  64 +++++
 arch/arm/boot/dts/sun4i-a10-pcduino.dts            |  58 +++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts        |  59 +++++
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts         |  59 +++++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts    |  59 +++++
 arch/arm/configs/multi_v7_defconfig                |   3 +
 arch/arm/configs/sunxi_defconfig                   |   4 +
 drivers/input/misc/Kconfig                         |  11 +
 drivers/input/misc/Makefile                        |   1 +
 drivers/input/misc/axp20x-pek.c                    | 281 +++++++++++++++++++++
 drivers/mfd/Kconfig                                |  12 +
 drivers/mfd/Makefile                               |   1 +
 drivers/mfd/axp20x.c                               | 258 +++++++++++++++++++
 include/linux/mfd/axp20x.h                         | 180 +++++++++++++
 22 files changed, 1458 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-input-axp-pek
 create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt
 create mode 100644 drivers/input/misc/axp20x-pek.c
 create mode 100644 drivers/mfd/axp20x.c
 create mode 100644 include/linux/mfd/axp20x.h
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH v5 1/8 mfd: AXP20x: Add mfd driver for AXP20x PMIC

This patch introduces the preliminary support for PMICs X-Powers AXP202 and AXP209. The AXP209 and AXP202 are the PMUs (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner.

The core enables support for two subsystems:
- PEK (Power Enable Key)
- Regulators

---

There is still a small bug in the MFD core that causes hitting the

WARN_ON(!list_empty(&dev->devres_head));

in linux/drivers/base/dd.c#L272 when using the regulator_bulk_register_supply_alias(). The warning complains that the MFD core is trying to probe a device that has devres attached. Charles Keepax is looking for this problem and a patch should be submitted soon, see http://www.spinics.net/lists/linux-input/msg31099.html and following

 drivers/mfd/Kconfig        |  12 +++
 drivers/mfd/Makefile       |   1 +
 drivers/mfd/axp20x.c       | 258 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/mfd/axp20x.h | 180 +++++++++++++++++++++++++++++++
 4 files changed, 451 insertions(+)
 create mode 100644 drivers/mfd/axp20x.c
 create mode 100644 include/linux/mfd/axp20x.h
drivers/mfd/Kconfig +12 -0
index 3383412..6c2a920 100644
@@ -67,6 +67,18 @@ config MFD_BCM590XX
 	help
 	  Support for the BCM590xx PMUs from Broadcom
 
+config MFD_AXP20X
+	bool "X-Powers AXP20X"
+	select MFD_CORE
+	select REGMAP_I2C
+	select REGMAP_IRQ
+	depends on I2C=y
+	help
+	  If you say Y here you get support for the X-Powers AXP202 and AXP209.
+	  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
index 2851275..1efecf2 100644
@@ -102,6 +102,7 @@ obj-$(CONFIG_PMIC_DA9052)	+= da9052-irq.o
 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_LP3943)	+= lp3943.o
 obj-$(CONFIG_MFD_LP8788)	+= lp8788.o lp8788-irq.o
drivers/mfd/axp20x.c new file +258 -0

258 lines not on this page · raw message

include/linux/mfd/axp20x.h new file +180 -0

180 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#2 lore raw

PATCH v5 1/8 mfd: AXP20x: Add mfd driver for AXP20x PMIC

Quoted 5 lines

This patch introduces the preliminary support for PMICs X-Powers AXP202 and AXP209. The AXP209 and AXP202 are the PMUs (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner.

Quoted 7 lines

The core enables support for two subsystems:
- PEK (Power Enable Key)
- Regulators

---

I guess I can just apply this and expect not to see any adverse symptoms?

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw

[linux-sunxi] Re: [PATCH v5 1/8] mfd: AXP20x: Add mfd driver for AXP20x PMIC

Quoted 9 lines · Lee Jones
Quoted 9 lines

This patch introduces the preliminary support for PMICs X-Powers AXP202 and AXP209. The AXP209 and AXP202 are the PMUs (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner.

The core enables support for two subsystems:
- PEK (Power Enable Key)
- Regulators

Quoted 6 lines
Quoted 3 lines

---

I guess I can just apply this and expect not to see any adverse symptoms?

It has been tested with a sun7i/cubieboard2 with to adverse symptoms. It's not core stuff so I guess you could apply it.

Thank you,

Signature · 1 line
Carlo Caione
Applied
#4 lore raw

[linux-sunxi] Re: [PATCH v5 1/8] mfd: AXP20x: Add mfd driver for AXP20x PMIC

Quoted 13 lines
Quoted 13 lines
Quoted 12 lines

This patch introduces the preliminary support for PMICs X-Powers AXP202 and AXP209. The AXP209 and AXP202 are the PMUs (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner.

The core enables support for two subsystems:
- PEK (Power Enable Key)
- Regulators

---

Quoted 7 lines
Quoted 2 lines

I guess I can just apply this and expect not to see any adverse symptoms?

It has been tested with a sun7i/cubieboard2 with to adverse symptoms. It's not core stuff so I guess you could apply it.

Thank you,

Applied, thanks.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#5 lore raw

PATCH v5 1/8 mfd: AXP20x: Add mfd driver for AXP20x PMIC

In reply to Carlo Caione
Quoted 11 lines · Carlo Caione

This patch introduces the preliminary support for PMICs X-Powers AXP202 and AXP209. The AXP209 and AXP202 are the PMUs (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner.

The core enables support for two subsystems:
- PEK (Power Enable Key)
- Regulators

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: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140502/06eaa45b/attachment.sig>
#6 lore raw

PATCH v5 2/8 dt-bindings: add vendor-prefix for X-Powers

In reply to Carlo Caione
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index abc3080..792cf56 100644
@@ -135,3 +135,4 @@ wm	Wondermedia Technologies, Inc.
 xes	Extreme Engineering Solutions (X-ES)
 xlnx	Xilinx
 zyxel	ZyXEL Communications Corp.
+x-powers	X-Powers
Signature · 1 line
1.8.3.2
#7 lore raw

PATCH v5 2/8 dt-bindings: add vendor-prefix for X-Powers

Quoted 11 lines · Carlo Caione
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +0 -0
index abc3080..792cf56 100644

Documentation/devicetree/bindings/vendor-prefixes.txt wm Wondermedia Technologies, Inc. · line 138

Quoted 4 lines
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -135,3 +135,4 @@ wm	Wondermedia Technologies, Inc.
 xes	Extreme Engineering Solutions (X-ES)
 xlnx	Xilinx
 zyxel	ZyXEL Communications Corp.
+x-powers	X-Powers

Keep list sorted.

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140502/f2f91c89/attachment.sig>

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Re: [PATCH v5 2/8] dt-bindings: add vendor-prefix for X-Powers

Quoted 8 lines · Michal Simek

Review

Quoted 6 lines · Carlo Caione
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/vendor-prefixes.txt

Quoted 12 lines

Documentation/devicetree/bindings/vendor-prefixes.txt wm Wondermedia Technologies, Inc. · line 138

Quoted 9 lines

index abc3080..792cf56 100644

Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -135,3 +135,4 @@ wm        Wondermedia Technologies, Inc.
 xes  Extreme Engineering Solutions (X-ES)
 xlnx Xilinx
 zyxel        ZyXEL Communications Corp.
+x-powers     X-Powers

Keep list sorted.

Fooled by rebasing on master :(
I'll sort it, thanks.

Signature · 6 lines
Carlo Caione

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
#10 lore raw

PATCH v5 3/8 mfd: AXP20x: Add bindings documentation

In reply to Carlo Caione

Bindings documentation for the AXP20x driver. In this file also sub-nodes are documented.

---
 Documentation/devicetree/bindings/mfd/axp20x.txt | 93 ++++++++++++++++++++++++
 1 file changed, 93 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt
Documentation/devicetree/bindings/mfd/axp20x.txt new file +93 -0
new file mode 100644
index 0000000..cc9e01b
@@ -0,0 +1,93 @@
+AXP202/AXP209 device tree bindings
+
+The axp20x family current members :-
+axp202 (X-Powers)
+axp209 (X-Powers)
+
+Required properties:
+- compatible: "x-powers,axp202" or "x-powers,axp209"
+- reg: The I2C slave address for the AXP chip
+- interrupt-parent: The parent interrupt controller
+- interrupts: Interrupt specifiers for interrupt sources
+- interrupt-controller: axp20x has its own internal IRQs
+- #interrupt-cells: Should be set to 1
+- acin-supply: The input supply for LDO1
+- vin2-supply: The input supply for DCDC2
+- vin3-supply: The input supply for DCDC3
+- ldo24in-supply: The input supply for LDO2, LDO4
+- ldo3in-supply: The input supply for LDO3
+- ldo5in-supply: The input supply for LDO5
+
+- regulators: A node that houses a sub-node for each regulator. The regulators are
+	      bound using their name as listed here: dcdc2, dcdc3, ldo1, ldo2,
+	      ldo3, ldo4, ldo5.  The bindings details of individual regulator
+	      device can be found in:
+	      Documentation/devicetree/bindings/regulator/regulator.txt with
+	      the exception of x-powers,dcdc-freq
+- x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz
+		      (range: 750-1875). Default: 1.5MHz
+
+Optional properties for DCDCs:
+- x-powers,dcdc-workmode: 1 for PWM mode, 0 for AUTO mode
+			  Default: AUTO mode
+
+Example:
+
+axp209: pmic at 34 {
+	compatible = "x-powers,axp209";
+	reg = <0x34>;
+	interrupt-parent = <&nmi_intc>;
+	interrupts = <0 8>;
+
+	interrupt-controller;
+	#interrupt-cells = <1>;
+
+	acin-supply = <&axp_ipsout_reg>;
+	vin2-supply = <&axp_ipsout_reg>;
+	vin3-supply = <&axp_ipsout_reg>;
+	ldo24in-supply = <&axp_ipsout_reg>;
+	ldo3in-supply = <&axp_ipsout_reg>;
+	ldo5in-supply = <&axp_ipsout_reg>;
+
+	regulators {
+		x-powers,dcdc-freq = <1500>;
+
+		axp_vcore_reg: dcdc2 {
+			regulator-min-microvolt = <700000>;
+			regulator-max-microvolt = <2275000>;
+			regulator-always-on;
+		};
+
+		axp_ddr_reg: dcdc3 {
+			regulator-min-microvolt = <700000>;
+			regulator-max-microvolt = <3500000>;
+			regulator-always-on;
+		};
+
+		axp_rtc_reg: ldo1 {
+			regulator-always-on;
+		};
+
+		axp_analog_reg: ldo2 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-always-on;
+		};
+
+		axp_pll_reg: ldo3 {
+			regulator-min-microvolt = <700000>;
+			regulator-max-microvolt = <3500000>;
+		};
+
+		axp_hdmi_reg: ldo4 {
+			regulator-min-microvolt = <1250000>;
+			regulator-max-microvolt = <3300000>;
+		};
+
+		axp_mic_reg: ldo5 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
Signature · 1 line
1.8.3.2
#11 lore raw

PATCH v5 3/8 mfd: AXP20x: Add bindings documentation

Hi,

Quoted 4 lines · Carlo Caione

Bindings documentation for the AXP20x driver. In this file also sub-nodes are documented.

Thanks for your efforts,
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: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140502/b78a5ad6/attachment.sig>
#12 lore raw

PATCH v5 4/8 input: misc: Add driver for AXP20x Power Enable Key

In reply to Carlo Caione

This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.

---
 drivers/input/misc/Kconfig      |  11 ++
 drivers/input/misc/Makefile     |   1 +
 drivers/input/misc/axp20x-pek.c | 281 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 293 insertions(+)
 create mode 100644 drivers/input/misc/axp20x-pek.c
drivers/input/misc/Kconfig +11 -0
index 5928ea7..f4c3177 100644
@@ -393,6 +393,17 @@ config INPUT_RETU_PWRBUTTON
 	  To compile this driver as a module, choose M here. The module will
 	  be called retu-pwrbutton.
 
+config INPUT_AXP20X_PEK
+	tristate "X-Powers AXP20X power button driver"
+	depends on MFD_AXP20X
+	help
+	  Say Y here if you want to enable power key reporting via the
+	  AXP20X PMIC.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called axp20x-pek.
+
+
 config INPUT_TWL4030_PWRBUTTON
 	tristate "TWL4030 Power button Driver"
 	depends on TWL4030_CORE
drivers/input/misc/Makefile +1 -0
index 4955ad3..a25ad18 100644
@@ -50,6 +50,7 @@ obj-$(CONFIG_INPUT_POWERMATE)		+= powermate.o
 obj-$(CONFIG_INPUT_PWM_BEEPER)		+= pwm-beeper.o
 obj-$(CONFIG_INPUT_RB532_BUTTON)	+= rb532_button.o
 obj-$(CONFIG_INPUT_RETU_PWRBUTTON)	+= retu-pwrbutton.o
+obj-$(CONFIG_INPUT_AXP20X_PEK)		+= axp20x-pek.o
 obj-$(CONFIG_INPUT_GPIO_ROTARY_ENCODER)	+= rotary_encoder.o
 obj-$(CONFIG_INPUT_SGI_BTNS)		+= sgi_btns.o
 obj-$(CONFIG_INPUT_SIRFSOC_ONKEY)	+= sirfsoc-onkey.o
drivers/input/misc/axp20x-pek.c new file +281 -0

281 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#13 lore raw

PATCH v5 4/8 input: misc: Add driver for AXP20x Power Enable Key

Quoted 5 lines · Carlo Caione

This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.

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: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140502/8fe6d50c/attachment.sig>
maintainer
#14 lore raw

PATCH v5 4/8 input: misc: Add driver for AXP20x Power Enable Key

Quoted 8 lines · Maxime Ripard
Quoted 5 lines · Carlo Caione

This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.

How are we merging it? MFD tree?

Thanks.

Signature · 1 line
Dmitry
#15 lore raw

[linux-sunxi] Re: [PATCH v5 4/8] input: misc: Add driver for AXP20x Power Enable Key

Quoted 6 lines · Dmitry Torokhov
Quoted 5 lines · Maxime Ripard
Quoted 4 lines · Carlo Caione

This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

How are we merging it? MFD tree?

No idea. Lee, can you help in merging it?
The only thing still left out is the DT to be merged through Maxime (I need to submit a v6 only for that).

Thanks,

Signature · 1 line
Carlo Caione
#16 lore raw

[linux-sunxi] Re: [PATCH v5 4/8] input: misc: Add driver for AXP20x Power Enable Key

Quoted 12 lines · Carlo Caione
Quoted 10 lines · Dmitry Torokhov
Quoted 8 lines · Maxime Ripard
Quoted 5 lines · Carlo Caione

This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.

Quoted 7 lines
Quoted 3 lines

How are we merging it? MFD tree?

No idea. Lee, can you help in merging it?
The only thing still left out is the DT to be merged through Maxime (I need to submit a v6 only for that).

Yes.

Weren't you in receipt of my email sent out an hour before this one?

I thought you were re-sending the test though (v6?).

If you can set that, complete with all the Acks, I'd be much obliged.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#17 lore raw

[linux-sunxi] Re: [PATCH v5 4/8] input: misc: Add driver for AXP20x Power Enable Key

Quoted 18 lines · Lee Jones
Quoted 16 lines · Carlo Caione
Quoted 13 lines · Dmitry Torokhov
Quoted 8 lines · Maxime Ripard
Quoted 5 lines · Carlo Caione

This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.

How are we merging it? MFD tree?

Quoted 7 lines
Quoted 3 lines

No idea. Lee, can you help in merging it?
The only thing still left out is the DT to be merged through Maxime (I need to submit a v6 only for that).

Yes.

Weren't you in receipt of my email sent out an hour before this one?

Yes, but this email was sent before receiving yours :)

Quoted 3 lines

I thought you were re-sending the test though (v6?).

If you can set that, complete with all the Acks, I'd be much obliged.

Ok, no problem. I'll also fix a small compilation-warning spotted by Hans.

Thank you,

Signature · 1 line
Carlo Caione
#18 lore raw

[linux-sunxi] Re: [PATCH v5 4/8] input: misc: Add driver for AXP20x Power Enable Key

Quoted 27 lines · Carlo Caione
Quoted 18 lines · Lee Jones
Quoted 16 lines · Carlo Caione
Quoted 13 lines · Dmitry Torokhov
Quoted 8 lines · Maxime Ripard
Quoted 5 lines · Carlo Caione

This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.

How are we merging it? MFD tree?

Quoted 7 lines
Quoted 3 lines

No idea. Lee, can you help in merging it?
The only thing still left out is the DT to be merged through Maxime (I need to submit a v6 only for that).

Yes.

Weren't you in receipt of my email sent out an hour before this one?

Quoted 7 lines

Yes, but this email was sent before receiving yours :)

Quoted 3 lines

I thought you were re-sending the test though (v6?).

If you can set that, complete with all the Acks, I'd be much obliged.

Ok, no problem. I'll also fix a small compilation-warning spotted by Hans.

Great thanks, and sorry for all the typos, I was in a rush. :)

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#19 lore raw

PATCH v5 4/8 input: misc: Add driver for AXP20x Power Enable Key

In reply to Dmitry Torokhov
Quoted 11 lines
Quoted 7 lines
Quoted 5 lines

This patch add support for the Power Enable Key found on MFD AXP202 and AXP209. Besides the basic support for the button, the driver adds two entries in sysfs to configure the time delay for power on/off.

How are we merging it? MFD tree?

Yes, I'm happy to do that.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#20 lore raw

PATCH v5 5/8 input: misc: Add ABI docs for AXP20x PEK

In reply to Carlo Caione

Add ABI entries for the PEK found on PMU X-Powers AXP202 and AXP209.

---
 Documentation/ABI/testing/sysfs-driver-input-axp-pek | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-input-axp-pek
Documentation/ABI/testing/sysfs-driver-input-axp-pek new file +11 -0
new file mode 100644
index 0000000..080563b
@@ -0,0 +1,11 @@
+What:		/sys/class/input/input(x)/startup
+Date:		March 2014
+Contact:	Carlo Caione <[email protected]>
+Description:	Startup time in us. Board is powered on if the button is pressed
+		for more than <startup_time>
+
+What:		/sys/class/input/input(x)/shutdown
+Date:		March 2014
+Contact:	Carlo Caione <[email protected]>
+Description:	Shutdown time in us. Board is powered off if the button is pressed
+		for more than <shutdown_time>
Signature · 1 line
1.8.3.2
#21 lore raw

PATCH v5 6/8 ARM: sunxi: Add AXP20x support in defconfig

In reply to Carlo Caione
---
 arch/arm/configs/sunxi_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/configs/sunxi_defconfig +4 -0
index b5df4a5..6e305da 100644
@@ -40,6 +40,8 @@ CONFIG_SUN4I_EMAC=y
 # CONFIG_NET_VENDOR_STMICRO is not set
 # CONFIG_NET_VENDOR_WIZNET is not set
 # CONFIG_WLAN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_AXP20X_PEK=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=8
@@ -55,6 +57,7 @@ CONFIG_GPIO_SYSFS=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_SUNXI_WATCHDOG=y
+CONFIG_MFD_AXP20X=y
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
@@ -69,3 +72,4 @@ CONFIG_NFS_FS=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS=y
 CONFIG_PRINTK_TIME=y
+CONFIG_REGULATOR_AXP20X=y
Signature · 1 line
1.8.3.2
#22 lore raw

PATCH v5 7/8 ARM: sunxi: Add AXP20x support multi_v7_defconfig

In reply to Carlo Caione
---
 arch/arm/configs/multi_v7_defconfig | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/configs/multi_v7_defconfig +3 -0
index d4e8a47..5aeea19 100644
@@ -146,6 +146,7 @@ CONFIG_KEYBOARD_SPEAR=y
 CONFIG_KEYBOARD_CROS_EC=y
 CONFIG_MOUSE_PS2_ELANTECH=y
 CONFIG_INPUT_MISC=y
+CONFIG_INPUT_AXP20X_PEK=y
 CONFIG_INPUT_MPU3050=y
 CONFIG_SERIO_AMBAKMI=y
 CONFIG_SERIAL_8250=y
@@ -207,6 +208,7 @@ CONFIG_ARMADA_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_ORION_WATCHDOG=y
 CONFIG_MFD_AS3722=y
+CONFIG_MFD_AXP20X=y
 CONFIG_MFD_CROS_EC=y
 CONFIG_MFD_CROS_EC_SPI=y
 CONFIG_MFD_MAX8907=y
@@ -217,6 +219,7 @@ CONFIG_MFD_TPS65910=y
 CONFIG_REGULATOR_VIRTUAL_CONSUMER=y
 CONFIG_REGULATOR_AB8500=y
 CONFIG_REGULATOR_AS3722=y
+CONFIG_REGULATOR_AXP20X=y
 CONFIG_REGULATOR_GPIO=y
 CONFIG_REGULATOR_MAX8907=y
 CONFIG_REGULATOR_PALMAS=y
Signature · 1 line
1.8.3.2
#23 lore raw

PATCH v5 8/8 ARM: sun7i/sun4i: dt: Add AXP209 support to various boards

In reply to Carlo Caione
---
 arch/arm/boot/dts/sun4i-a10-a1000.dts           | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts      | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-hackberry.dts       | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-inet97fv2.dts       | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-mini-xplus.dts      | 65 +++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts  | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-pcduino.dts         | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts     | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts      | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 59 ++++++++++++++++++++++
 10 files changed, 602 insertions(+)
arch/arm/boot/dts/sun4i-a10-a1000.dts +58 -0
index fa746aea..57d3fb4 100644
@@ -88,6 +88,56 @@
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c0_pins_a>;
 			status = "okay";
+
+			axp209: pmic at 34 {
+				compatible = "x-powers,axp209";
+				reg = <0x34>;
+				interrupts = <0>;
+
+				interrupt-controller;
+				#interrupt-cells = <1>;
+
+				acin-supply = <&reg_axp_ipsout>;
+				vin2-supply = <&reg_axp_ipsout>;
+				vin3-supply = <&reg_axp_ipsout>;
+				ldo24in-supply = <&reg_axp_ipsout>;
+				ldo3in-supply = <&reg_axp_ipsout>;
+				ldo5in-supply = <&reg_axp_ipsout>;
+
+				regulators {
+					x-powers,dcdc-freq = <1500>;
+
+					axp_vcore_reg: dcdc2 {
+						regulator-min-microvolt = <700000>;
+						regulator-max-microvolt = <2275000>;
+						regulator-always-on;
+					};
+
+					axp_ddr_reg: dcdc3 {
+						regulator-always-on;
+					};
+
+					axp_rtc_reg: ldo1 {
+						regulator-always-on;
+					};
+
+					axp_analog_reg: ldo2 {
+						regulator-always-on;
+					};
+
+					axp_pll_reg: ldo3 {
+						regulator-always-on;
+					};
+
+					axp_hdmi_reg: ldo4 {
+						regulator-always-on;
+					};
+
+					axp_mic_reg: ldo5 {
+						regulator-always-on;
+					};
+				};
+			};
 		};
 	};
 
@@ -125,4 +175,12 @@
 	reg_usb2_vbus: usb2-vbus {
 		status = "okay";
 	};
+
+	reg_axp_ipsout: axp_ipsout {
+		compatible = "regulator-fixed";
+		regulator-name = "axp-ipsout";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
 };
arch/arm/boot/dts/sun4i-a10-cubieboard.dts +58 -0

68 lines not on this page · raw message

arch/arm/boot/dts/sun4i-a10-hackberry.dts +64 -0

74 lines not on this page · raw message

arch/arm/boot/dts/sun4i-a10-inet97fv2.dts +58 -0

68 lines not on this page · raw message

arch/arm/boot/dts/sun4i-a10-mini-xplus.dts +65 -0

75 lines not on this page · raw message

arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts +64 -0

74 lines not on this page · raw message

arch/arm/boot/dts/sun4i-a10-pcduino.dts +58 -0

68 lines not on this page · raw message

arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +59 -0

69 lines not on this page · raw message

arch/arm/boot/dts/sun7i-a20-cubietruck.dts +59 -0

69 lines not on this page · raw message

arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +59 -0

69 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#24 lore raw

PATCH v5 8/8 ARM: sun7i/sun4i: dt: Add AXP209 support to various boards

Hi,

Quoted 60 lines · Carlo Caione
---
 arch/arm/boot/dts/sun4i-a10-a1000.dts           | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts      | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-hackberry.dts       | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-inet97fv2.dts       | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-mini-xplus.dts      | 65 +++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts  | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-pcduino.dts         | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts     | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts      | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 59 ++++++++++++++++++++++
 10 files changed, 602 insertions(+)
arch/arm/boot/dts/sun4i-a10-a1000.dts +37 -0
index fa746aea..57d3fb4 100644
@@ -88,6 +88,56 @@
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c0_pins_a>;
 			status = "okay";
+
+			axp209: pmic at 34 {
+				compatible = "x-powers,axp209";
+				reg = <0x34>;
+				interrupts = <0>;
+
+				interrupt-controller;
+				#interrupt-cells = <1>;
+
+				acin-supply = <&reg_axp_ipsout>;
+				vin2-supply = <&reg_axp_ipsout>;
+				vin3-supply = <&reg_axp_ipsout>;
+				ldo24in-supply = <&reg_axp_ipsout>;
+				ldo3in-supply = <&reg_axp_ipsout>;
+				ldo5in-supply = <&reg_axp_ipsout>;
+
+				regulators {
+					x-powers,dcdc-freq = <1500>;
+
+					axp_vcore_reg: dcdc2 {
+						regulator-min-microvolt = <700000>;
+						regulator-max-microvolt = <2275000>;
+						regulator-always-on;
+					};
+
+					axp_ddr_reg: dcdc3 {
+						regulator-always-on;
+					};
+
+					axp_rtc_reg: ldo1 {
+						regulator-always-on;
+					};
+
+					axp_analog_reg: ldo2 {
+						regulator-always-on;
+					};
+

arch/arm/boot/dts/sun4i-a10-a1000.dts line 137

Quoted 10 lines
arch/arm/boot/dts/sun4i-a10-a1000.dts +10 -0
+					axp_pll_reg: ldo3 {
+						regulator-always-on;
+					};
+
+					axp_hdmi_reg: ldo4 {
+						regulator-always-on;
+					};
+
+					axp_mic_reg: ldo5 {
+						regulator-always-on;

Do all these regulators need to be always on? It makes sense for the pll and vcore, but I don't get why the mic and hdmi regulators need this.

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: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140502/0db2e6a4/attachment.sig>
#25 lore raw

[linux-sunxi] Re: [PATCH v5 8/8] ARM: sun7i/sun4i: dt: Add AXP209 support to various boards

Quoted 69 lines · Maxime Ripard

Hi,

Quoted 66 lines · Carlo Caione
---
 arch/arm/boot/dts/sun4i-a10-a1000.dts           | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts      | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-hackberry.dts       | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-inet97fv2.dts       | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-mini-xplus.dts      | 65 +++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts  | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-pcduino.dts         | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts     | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts      | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 59 ++++++++++++++++++++++
 10 files changed, 602 insertions(+)
arch/arm/boot/dts/sun4i-a10-a1000.dts +43 -0
index fa746aea..57d3fb4 100644
@@ -88,6 +88,56 @@
                      pinctrl-names = "default";
                      pinctrl-0 = <&i2c0_pins_a>;
                      status = "okay";
+
+                     axp209: pmic at 34 {
+                             compatible = "x-powers,axp209";
+                             reg = <0x34>;
+                             interrupts = <0>;
+
+                             interrupt-controller;
+                             #interrupt-cells = <1>;
+
+                             acin-supply = <&reg_axp_ipsout>;
+                             vin2-supply = <&reg_axp_ipsout>;
+                             vin3-supply = <&reg_axp_ipsout>;
+                             ldo24in-supply = <&reg_axp_ipsout>;
+                             ldo3in-supply = <&reg_axp_ipsout>;
+                             ldo5in-supply = <&reg_axp_ipsout>;
+
+                             regulators {
+                                     x-powers,dcdc-freq = <1500>;
+
+                                     axp_vcore_reg: dcdc2 {
+                                             regulator-min-microvolt = <700000>;
+                                             regulator-max-microvolt = <2275000>;
+                                             regulator-always-on;
+                                     };
+
+                                     axp_ddr_reg: dcdc3 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_rtc_reg: ldo1 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_analog_reg: ldo2 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_pll_reg: ldo3 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_hdmi_reg: ldo4 {
+                                             regulator-always-on;
Quoted 8 lines

arch/arm/boot/dts/sun4i-a10-a1000.dts line 137

Quoted 4 lines
arch/arm/boot/dts/sun4i-a10-a1000.dts +4 -0
+                                     };
+
+                                     axp_mic_reg: ldo5 {
+                                             regulator-always-on;

Do all these regulators need to be always on? It makes sense for the pll and vcore, but I don't get why the mic and hdmi regulators need this.

I did this way because I don't have the schematics for all the board so I thought it was safer to leave all the regulators enabled

Signature · 1 line
Carlo Caione
#26 lore raw

[linux-sunxi] Re: [PATCH v5 8/8] ARM: sun7i/sun4i: dt: Add AXP209 support to various boards

Quoted 80 lines · Carlo Caione
Quoted 69 lines · Maxime Ripard

Hi,

Quoted 66 lines · Carlo Caione
---
 arch/arm/boot/dts/sun4i-a10-a1000.dts           | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts      | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-hackberry.dts       | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-inet97fv2.dts       | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-mini-xplus.dts      | 65 +++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts  | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-pcduino.dts         | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts     | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts      | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 59 ++++++++++++++++++++++
 10 files changed, 602 insertions(+)
arch/arm/boot/dts/sun4i-a10-a1000.dts +43 -0
index fa746aea..57d3fb4 100644
@@ -88,6 +88,56 @@
                      pinctrl-names = "default";
                      pinctrl-0 = <&i2c0_pins_a>;
                      status = "okay";
+
+                     axp209: pmic at 34 {
+                             compatible = "x-powers,axp209";
+                             reg = <0x34>;
+                             interrupts = <0>;
+
+                             interrupt-controller;
+                             #interrupt-cells = <1>;
+
+                             acin-supply = <&reg_axp_ipsout>;
+                             vin2-supply = <&reg_axp_ipsout>;
+                             vin3-supply = <&reg_axp_ipsout>;
+                             ldo24in-supply = <&reg_axp_ipsout>;
+                             ldo3in-supply = <&reg_axp_ipsout>;
+                             ldo5in-supply = <&reg_axp_ipsout>;
+
+                             regulators {
+                                     x-powers,dcdc-freq = <1500>;
+
+                                     axp_vcore_reg: dcdc2 {
+                                             regulator-min-microvolt = <700000>;
+                                             regulator-max-microvolt = <2275000>;
+                                             regulator-always-on;
+                                     };
+
+                                     axp_ddr_reg: dcdc3 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_rtc_reg: ldo1 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_analog_reg: ldo2 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_pll_reg: ldo3 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_hdmi_reg: ldo4 {
+                                             regulator-always-on;
Quoted 8 lines

arch/arm/boot/dts/sun4i-a10-a1000.dts line 137

Quoted 4 lines
arch/arm/boot/dts/sun4i-a10-a1000.dts +4 -0
+                                     };
+
+                                     axp_mic_reg: ldo5 {
+                                             regulator-always-on;

Do all these regulators need to be always on? It makes sense for the pll and vcore, but I don't get why the mic and hdmi regulators need this.

Quoted 2 lines

I did this way because I don't have the schematics for all the board so I thought it was safer to leave all the regulators enabled

Well, we have the schematics for most of these boards (at least all the cubie and olinuxinos).

As far as the other boards are concerned, if we don't have that information, I'd say leave them alone until someone has access to these informations.

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: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140505/d94d5b5e/attachment.sig>
#27 lore raw

[linux-sunxi] Re: [PATCH v5 8/8] ARM: sun7i/sun4i: dt: Add AXP209 support to various boards

Quoted 84 lines · Maxime Ripard
Quoted 80 lines · Carlo Caione
Quoted 69 lines · Maxime Ripard

Hi,

Quoted 66 lines · Carlo Caione
---
 arch/arm/boot/dts/sun4i-a10-a1000.dts           | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts      | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-hackberry.dts       | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-inet97fv2.dts       | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-mini-xplus.dts      | 65 +++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts  | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-pcduino.dts         | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts     | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts      | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 59 ++++++++++++++++++++++
 10 files changed, 602 insertions(+)
arch/arm/boot/dts/sun4i-a10-a1000.dts +43 -0
index fa746aea..57d3fb4 100644
@@ -88,6 +88,56 @@
                      pinctrl-names = "default";
                      pinctrl-0 = <&i2c0_pins_a>;
                      status = "okay";
+
+                     axp209: pmic at 34 {
+                             compatible = "x-powers,axp209";
+                             reg = <0x34>;
+                             interrupts = <0>;
+
+                             interrupt-controller;
+                             #interrupt-cells = <1>;
+
+                             acin-supply = <&reg_axp_ipsout>;
+                             vin2-supply = <&reg_axp_ipsout>;
+                             vin3-supply = <&reg_axp_ipsout>;
+                             ldo24in-supply = <&reg_axp_ipsout>;
+                             ldo3in-supply = <&reg_axp_ipsout>;
+                             ldo5in-supply = <&reg_axp_ipsout>;
+
+                             regulators {
+                                     x-powers,dcdc-freq = <1500>;
+
+                                     axp_vcore_reg: dcdc2 {
+                                             regulator-min-microvolt = <700000>;
+                                             regulator-max-microvolt = <2275000>;
+                                             regulator-always-on;
+                                     };
+
+                                     axp_ddr_reg: dcdc3 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_rtc_reg: ldo1 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_analog_reg: ldo2 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_pll_reg: ldo3 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_hdmi_reg: ldo4 {
+                                             regulator-always-on;
Quoted 8 lines

arch/arm/boot/dts/sun4i-a10-a1000.dts line 137

Quoted 4 lines
arch/arm/boot/dts/sun4i-a10-a1000.dts +4 -0
+                                     };
+
+                                     axp_mic_reg: ldo5 {
+                                             regulator-always-on;

Do all these regulators need to be always on? It makes sense for the pll and vcore, but I don't get why the mic and hdmi regulators need this.

Quoted 2 lines

I did this way because I don't have the schematics for all the board so I thought it was safer to leave all the regulators enabled

Quoted 6 lines

Well, we have the schematics for most of these boards (at least all the cubie and olinuxinos).

As far as the other boards are concerned, if we don't have that information, I'd say leave them alone until someone has access to these informations.

What do you mean exactly with "leave them alone". The problem is that if the regulator is not explicitly marked as always-on, it is disabled at boot time, so I think that the most safe thing to do is leave them on to avoid turning off something at boot time that could be important.

Signature · 1 line
Carlo Caione
#28 lore raw

[linux-sunxi] Re: [PATCH v5 8/8] ARM: sun7i/sun4i: dt: Add AXP209 support to various boards

Quoted 93 lines · Carlo Caione
Quoted 84 lines · Maxime Ripard
Quoted 80 lines · Carlo Caione
Quoted 69 lines · Maxime Ripard

Hi,

Quoted 66 lines · Carlo Caione
---
 arch/arm/boot/dts/sun4i-a10-a1000.dts           | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts      | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-hackberry.dts       | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-inet97fv2.dts       | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-mini-xplus.dts      | 65 +++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts  | 64 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-pcduino.dts         | 58 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts     | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts      | 59 ++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 59 ++++++++++++++++++++++
 10 files changed, 602 insertions(+)
arch/arm/boot/dts/sun4i-a10-a1000.dts +43 -0
index fa746aea..57d3fb4 100644
@@ -88,6 +88,56 @@
                      pinctrl-names = "default";
                      pinctrl-0 = <&i2c0_pins_a>;
                      status = "okay";
+
+                     axp209: pmic at 34 {
+                             compatible = "x-powers,axp209";
+                             reg = <0x34>;
+                             interrupts = <0>;
+
+                             interrupt-controller;
+                             #interrupt-cells = <1>;
+
+                             acin-supply = <&reg_axp_ipsout>;
+                             vin2-supply = <&reg_axp_ipsout>;
+                             vin3-supply = <&reg_axp_ipsout>;
+                             ldo24in-supply = <&reg_axp_ipsout>;
+                             ldo3in-supply = <&reg_axp_ipsout>;
+                             ldo5in-supply = <&reg_axp_ipsout>;
+
+                             regulators {
+                                     x-powers,dcdc-freq = <1500>;
+
+                                     axp_vcore_reg: dcdc2 {
+                                             regulator-min-microvolt = <700000>;
+                                             regulator-max-microvolt = <2275000>;
+                                             regulator-always-on;
+                                     };
+
+                                     axp_ddr_reg: dcdc3 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_rtc_reg: ldo1 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_analog_reg: ldo2 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_pll_reg: ldo3 {
+                                             regulator-always-on;
+                                     };
+
+                                     axp_hdmi_reg: ldo4 {
+                                             regulator-always-on;
Quoted 8 lines

arch/arm/boot/dts/sun4i-a10-a1000.dts line 137

Quoted 4 lines
arch/arm/boot/dts/sun4i-a10-a1000.dts +4 -0
+                                     };
+
+                                     axp_mic_reg: ldo5 {
+                                             regulator-always-on;

Do all these regulators need to be always on? It makes sense for the pll and vcore, but I don't get why the mic and hdmi regulators need this.

Quoted 2 lines

I did this way because I don't have the schematics for all the board so I thought it was safer to leave all the regulators enabled

Quoted 6 lines

Well, we have the schematics for most of these boards (at least all the cubie and olinuxinos).

As far as the other boards are concerned, if we don't have that information, I'd say leave them alone until someone has access to these informations.

Quoted 5 lines

What do you mean exactly with "leave them alone". The problem is that if the regulator is not explicitly marked as always-on, it is disabled at boot time, so I think that the most safe thing to do is leave them on to avoid turning off something at boot time that could be important.

What I mean is that no information is still better than wrong informations. If you don't have the schematics, then don't do anything on this boards. Hopefully, someone with more infos on this will know what to do.

Moreover, I have the feeling that you just copy pasted all the informations on this patch. The first example I'm seeing is the cubieboard, for which we do have the schematics, and this patch says that ldo4 is used for HDMI, and that is required to stays always on, while LDO4 doesn't seem to be used at all, and that HDMI takes directly its input source from DC-5V.

I guess you need some more refining on this patch.

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: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140507/f95fdaa3/attachment.sig>
#29 lore raw

[linux-sunxi] Re: [PATCH v5 8/8] ARM: sun7i/sun4i: dt: Add AXP209 support to various boards

On Thu, May 8, 2014 at 4:53 AM, Maxime Ripard
<[email protected]> wrote:

<snip>

Quoted 4 lines

What I mean is that no information is still better than wrong informations. If you don't have the schematics, then don't do anything on this boards. Hopefully, someone with more infos on this will know what to do.

I partially agree here. Not specifying the voltage range for the regulators but only keeping them always-on from a practical point of view means that we do nothing with those regulators (see also
https://www.mail-archive.com/linux-input at vger.kernel.org/msg09532.html )

Quoted 6 lines

Moreover, I have the feeling that you just copy pasted all the informations on this patch. The first example I'm seeing is the cubieboard, for which we do have the schematics, and this patch says that ldo4 is used for HDMI, and that is required to stays always on, while LDO4 doesn't seem to be used at all, and that HDMI takes directly its input source from DC-5V.

The names for the regulators are taken from the original Allwinner driver and (of course) they can have nothing to do with the function they have in the board. I agree that this could be misleading so I'll change them with more general names. Concerning LDO4 that is always on, it was off until this v4, but I changed it back to have one common DT representation among all the boards.

Quoted 1 line

I guess you need some more refining on this patch.

Ok, I'll submit a v6 only for this patch.

Thanks,

Signature · 1 line
Carlo Caione
#30 lore raw

[linux-sunxi] Re: [PATCH v5 8/8] ARM: sun7i/sun4i: dt: Add AXP209 support to various boards

Quoted 10 lines · Carlo Caione

On Thu, May 8, 2014 at 4:53 AM, Maxime Ripard
<[email protected]> wrote:

<snip>

Quoted 4 lines

What I mean is that no information is still better than wrong informations. If you don't have the schematics, then don't do anything on this boards. Hopefully, someone with more infos on this will know what to do.

Quoted 5 lines

I partially agree here. Not specifying the voltage range for the regulators but only keeping them always-on from a practical point of view means that we do nothing with those regulators (see also
https://www.mail-archive.com/linux-input at vger.kernel.org/msg09532.html )

But we don't even know if they are used on these boards or not in the first place..

Quoted 7 lines
Quoted 6 lines

Moreover, I have the feeling that you just copy pasted all the informations on this patch. The first example I'm seeing is the cubieboard, for which we do have the schematics, and this patch says that ldo4 is used for HDMI, and that is required to stays always on, while LDO4 doesn't seem to be used at all, and that HDMI takes directly its input source from DC-5V.

Quoted 6 lines

The names for the regulators are taken from the original Allwinner driver and (of course) they can have nothing to do with the function they have in the board. I agree that this could be misleading so I'll change them with more general names. Concerning LDO4 that is always on, it was off until this v4, but I changed it back to have one common DT representation among all the boards.

I'm sorry, you did a great job on this PMIC driver, but this is just wrong. I'm completely fine with the names. What I'm not fine with is all this "one common DT representation across all boards". Pretty much all the boards are wired differently when it comes to regulators. Why do you want to just do some copy pasting without any checking on the schematics side if not just for the joy of duplicating code?

Quoted 3 lines
Quoted 1 line

I guess you need some more refining on this patch.

Ok, I'll submit a v6 only for this patch.

Please, please, *please* make sure that the informations you put in there are actually accurate.

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: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140509/abd40966/attachment.sig>