dts: sun6i: yones toptech bs1078 v2: Add AXP221 support to dts
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/1 dts: sun6i: yones toptech bs1078 v2: Add AXP221 support to dts
Hi,
Quoted 61 lines · Lawrence Yu
Enable the axp221 PMIC chip in the dts file.
Allows board to power off correctly from the poweroff command
This board requires dc1sw to be enabled in order to provide a power source for the 5V DCDC converter that powers USB2.
This board uses dldo1 for 3.3V wifi power
This board requires dldo3 to be enabled at 2.8V in order to provide voltage to the pullup resistors for the i2c0 bus.
---
Changes since v2- Rename regulator vcc-dc1sw to vcc-lcd-usb2
- Rename regulator vcc-csi to vddio-csi
- Remove regulator-always-on from dldo3
- Remove comment about LCD backlight and USB2 fromreg_dc1sw
- Remove comment about dc1sw providing power to LCD backlight in patch descriptionChanges since v1
- Use
axp22x.dtsito standardize the register names
- Change wifi power regulator to dldo1 instead of incorrect aldo1
- Remove unnecessary gpio pin PH27 for wifi power, since this board uses the axp221 chip to control power to the wifi chip.Signed-off-by Lawrence Yu <[email protected]>--- .../dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 95 +++++++++++++++++++--- 1 file changed, 85 insertions(+), 10 deletions(-)arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts +12
-4@@ -113,22 +113,97 @@ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; }; -®_usb1_vbus { - gpio = <&pio 7 27 GPIO_ACTIVE_HIGH>; +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; -&usb1_vbus_pin_a { - allwinner,pins = "PH27"; +&p2wi { + status = "okay"; + + axp22x: pmic at 68 { + compatible = "x-powers,axp221"; + reg = <0x68>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + };
arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts line 137
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts +5
-3}; -&usbphy { - usb1_vbus-supply = <®_usb1_vbus>; - status = "okay"; +#include "axp22x.dtsi" + +&axp22x { + regulators { + reg_dc1sw: dc1sw {
You do not need these extra bits. Just follow what you've done for the other regulators. Use the label references directly. And please keep the nodes alphabetically sorted. You are moving uart0 before all the regulators.
Also, since we'll have regulator support for simplefb, you could consider adding them once you've figured out the connections.
Thanks
ChenYu
Quoted 82 lines
arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts +68
-4+ regulator-name = "vcc-lcd-usb2"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + }; }; -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avcc"; +}; + +®_dc5ldo { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-cpus"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-3v0"; +}; + +®_dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-gpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc4 { + regulator-always-on; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-sys-dll"; +}; + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_dldo1 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi"; +}; + +/* Voltage source for I2C pullup resistors for I2C Bus 0 */ +®_dldo3 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-name = "vddio-csi"; +}; + +&usbphy { + usb1_vbus-supply = <®_dldo1>; + usb2_vbus-supply = <®_dc1sw>; status = "okay"; }; --2.5.3
--
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 at googlegroups.com. For more options, visit https://groups.google.com/d/optout.
PATCH v3 1/1 dts: sun6i: yones toptech bs1078 v2: Add AXP221 support to dts
Quoted 66 lines · Chen-Yu Tsai
Hi,
Quoted 63 lines · Lawrence Yu
Enable the axp221 PMIC chip in the dts file.
Allows board to power off correctly from the poweroff command
This board requires dc1sw to be enabled in order to provide a power source for the 5V DCDC converter that powers USB2.
This board uses dldo1 for 3.3V wifi power
This board requires dldo3 to be enabled at 2.8V in order to provide voltage to the pullup resistors for the i2c0 bus.
---
Changes since v2- Rename regulator vcc-dc1sw to vcc-lcd-usb2
- Rename regulator vcc-csi to vddio-csi
- Remove regulator-always-on from dldo3
- Remove comment about LCD backlight and USB2 fromreg_dc1sw
- Remove comment about dc1sw providing power to LCD backlight in patch descriptionChanges since v1
- Use
axp22x.dtsito standardize the register names
- Change wifi power regulator to dldo1 instead of incorrect aldo1
- Remove unnecessary gpio pin PH27 for wifi power, since this board uses the axp221 chip to control power to the wifi chip.Signed-off-by Lawrence Yu <[email protected]>--- .../dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 95 +++++++++++++++++++--- 1 file changed, 85 insertions(+), 10 deletions(-)arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts +12
-4@@ -113,22 +113,97 @@ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; }; -®_usb1_vbus { - gpio = <&pio 7 27 GPIO_ACTIVE_HIGH>; +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; -&usb1_vbus_pin_a { - allwinner,pins = "PH27"; +&p2wi { + status = "okay"; + + axp22x: pmic at 68 { + compatible = "x-powers,axp221"; + reg = <0x68>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; };
Quoted 14 lines
arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts line 137
Quoted 8 lines
arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts +5
-3-&usbphy { - usb1_vbus-supply = <®_usb1_vbus>; - status = "okay"; +#include "axp22x.dtsi" + +&axp22x { + regulators { + reg_dc1sw: dc1sw {You do not need these extra bits. Just follow what you've done for the other regulators. Use the label references directly. And please keep the nodes alphabetically sorted. You are moving uart0 before all the regulators.
I will remove the extra bits for dc1sw and use the label reference for it directly.
I will move the uart0 node to after the regulator nodes. It looks like the dts has the ehci0, ehci1, and pio nodes out of alphabetical order also. My opinion is that a separate patch would be more appropriate for reordering those nodes since it is not related to the AXP221 support.
Quoted 4 lines
Also, since we'll have regulator support for simplefb, you could consider adding them once you've figured out the connections.
My preference would be to try to add simplefb regulator support in a separate patch.
Thanks!
Quoted 85 lines
Thanks
ChenYuQuoted 82 lines
arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts +68
-4+ regulator-name = "vcc-lcd-usb2"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + }; }; -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avcc"; +}; + +®_dc5ldo { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-cpus"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-3v0"; +}; + +®_dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-gpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc4 { + regulator-always-on; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-sys-dll"; +}; + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_dldo1 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi"; +}; + +/* Voltage source for I2C pullup resistors for I2C Bus 0 */ +®_dldo3 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-name = "vddio-csi"; +}; + +&usbphy { + usb1_vbus-supply = <®_dldo1>; + usb2_vbus-supply = <®_dc1sw>; status = "okay"; }; --2.5.3
--
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 at googlegroups.com. For more options, visit https://groups.google.com/d/optout.