regulator: axp20x: add drivevbus support for axp803
Subsystems (5)
PATCH v5 1/3 regulator: axp20x: add drivevbus support for axp803
Like axp221, axp223, axp813 the axp803 is also supporting external regulator to drive the OTG VBus through N_VBUSEN PMIC pin.
Add support for it.
---
Changes for v5:
- Collect Chen-Yu reviewed-by tag
Changes for v4:
- rebase on master
Changes for v3:
- Update drivevbus in table of regulators
Documentation/devicetree/bindings/mfd/axp20x.txt | 3 ++- drivers/regulator/axp20x-regulator.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mfd/axp20x.txt +2 -1
@@ -43,7 +43,7 @@ Optional properties: regulator to drive the OTG VBus, rather then as an input pin which signals whether the board is driving OTG VBus or not. - (axp221 / axp223 / axp813 only) + (axp221 / axp223 / axp803/ axp813 only) - x-powers,master-mode: Boolean (axp806 only). Set this when the PMIC is wired for master mode. The default is slave mode.
@@ -132,6 +132,7 @@ FLDO2 : LDO : fldoin-supply : shared supply LDO_IO0 : LDO : ips-supply : GPIO 0 LDO_IO1 : LDO : ips-supply : GPIO 1 RTC_LDO : LDO : ips-supply : always on +DRIVEVBUS : Enable output : drivevbus-supply : external regulator AXP806 regulators, type, and corresponding input supply names:
drivers/regulator/axp20x-regulator.c +2 -0
@@ -721,6 +721,8 @@ static int axp20x_regulator_probe(struct platform_device *pdev)case AXP803_ID : regulators = axp803_regulators; nregulators =AXP803_REG_ID_MAX ; + drivevbus =of_property_read_bool (pdev->dev.parent->of_node, +"x-powers,drive-vbus-en" );break ;case AXP806_ID : regulators = axp806_regulators;
Signature · 1 line
2.14.3
PATCH v5 2/3 arm64: allwinner: axp803: Add drivevbus regulator
Add reg_drivevbus regualtor for boards which are using external regulator to drive the OTG VBus through N_VBUSEN PMIC pin.
---
Changes for v5:
- Collect Chen-Yu reviewed-by tag
Changes for v4:
- rebase on master
Changes for v3:
- none
arch/arm64/boot/dts/allwinner/axp803.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/allwinner/axp803.dtsi +5 -0
@@ -146,5 +146,10 @@ regulator-max-microvolt = <3000000>; regulator-name = "rtc-ldo"; }; + + reg_drivevbus: drivevbus { + regulator-name = "drivevbus"; + status = "disabled"; + }; }; };
Signature · 1 line
2.14.3
PATCH v5 3/3 arm64: allwinner: a64: bananapi-m64: add usb otg
In reply to Jagan TekiAdd usb otg support for bananapi-m64 board,
- USB-ID connected with PH9
- USB-DRVVBUS controlled by N_VBUSEN pin from PMIC
---
Changes for v5:
- Kept reg_drivevbus node in alphabetical order.
- Collect Chen-Yu reviewed-by tag
Changes for v4:
- rebase on master
- tested otg host mode.
Changes for v3:
- Move the position of reg_drivevbus as per binding documentation. Changes for v2:
- add drvvbus regulator
- add N_VBUSEN pin
.../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +21 -0
@@ -86,6 +86,10 @@ }; }; +&ehci0 { + status = "okay"; +}; + &ehci1 { status = "okay"; };
@@ -155,6 +159,10 @@ status = "okay"; }; +&ohci0 { + status = "okay"; +}; + &ohci1 { status = "okay"; };
@@ -167,6 +175,7 @@ reg = <0x3a3>; interrupt-parent = <&r_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ }; };
@@ -254,6 +263,11 @@ regulator-name = "vcc-wifi-io"; }; +®_drivevbus { + regulator-name = "usb0-vbus"; + status = "okay"; +}; + ®_eldo1 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@@ -294,6 +308,13 @@ status = "okay"; }; +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + &usbphy { + usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + usb0_vbus-supply = <®_drivevbus>; status = "okay"; };
Signature · 1 line
2.14.3
Quoted 8 lines · Jagan Teki
Like axp221, axp223, axp813 the axp803 is also supporting external regulator to drive the OTG VBus through
N_VBUSENPMIC pin.Add support for it.
Signed-off-by Jagan Teki <[email protected]>Reviewed-by Rob Herring <[email protected]>Reviewed-by Chen-Yu Tsai <[email protected]>
Quoted 7 lines
---
Changes for v5:
- Collect Chen-Yu reviewed-by tag
Changes for v4:
- rebase on master
Changes for v3:
- Update drivevbus in table of regulators
Can you pick these, has some dependency with drivevbus on other patches.
Jagan.
Quoted 17 lines · Jagan Teki
Quoted 8 lines · Jagan Teki
Like axp221, axp223, axp813 the axp803 is also supporting external regulator to drive the OTG VBus through
N_VBUSENPMIC pin.Add support for it.
Signed-off-by Jagan Teki <[email protected]>Reviewed-by Rob Herring <[email protected]>Reviewed-by Chen-Yu Tsai <[email protected]>Quoted 7 lines
---
Changes for v5:
- Collect Chen-Yu reviewed-by tag
Changes for v4:
- rebase on master
Changes for v3:
- Update drivevbus in table of regulators
Quoted 2 lines
Can you pick these, has some dependency with drivevbus on other patches.
I'm not the regulator maintainer, nor the AXP maintainer for that matter. Mark Brown and Chen-Yu are, respectively.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180405/c84ca2f0/attachment-0001.sig>
Quoted 18 lines · Maxime Ripard
Quoted 17 lines · Jagan Teki
Quoted 15 lines · Jagan Teki
Like axp221, axp223, axp813 the axp803 is also supporting external regulator to drive the OTG VBus through
N_VBUSENPMIC pin.Add support for it.
Signed-off-by Jagan Teki <[email protected]>Reviewed-by Rob Herring <[email protected]>Reviewed-by Chen-Yu Tsai <[email protected]>---
Changes for v5:
- Collect Chen-Yu reviewed-by tag
Changes for v4:
- rebase on master
Changes for v3:
- Update drivevbus in table of regulators
Quoted 5 lines
Quoted 2 lines
Can you pick these, has some dependency with drivevbus on other patches.
I'm not the regulator maintainer, nor the AXP maintainer for that matter. Mark Brown and Chen-Yu are, respectively.
I've already reviewed all the patches. Please resend the series and include Mark Brown, the regulator subsystem maintainer. He clearly isn't in the current recipient list, so no wonder things didn't move forward. Once he applies the driver bits, we'll apply any pending device tree changes.
ChenYu