* [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803
@ 2017-12-07 19:04 Jagan Teki
2017-12-07 19:04 ` [PATCH v2 2/3] arm64: allwinner: axp803: Add drivevbus regulator Jagan Teki
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Jagan Teki @ 2017-12-07 19:04 UTC (permalink / raw)
To: Maxime Ripard
Cc: Chen-Yu Tsai, Icenowy Zheng, Rob Herring, Mark Rutland,
Catalin Marinas, Will Deacon, Michael Trimarchi,
linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
Jagan Teki
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.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- New patch
Documentation/devicetree/bindings/mfd/axp20x.txt | 2 +-
drivers/regulator/axp20x-regulator.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt
index 9455503..34f24a2 100644
--- a/Documentation/devicetree/bindings/mfd/axp20x.txt
+++ b/Documentation/devicetree/bindings/mfd/axp20x.txt
@@ -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.
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
index 181622b..91b8ff8 100644
--- a/drivers/regulator/axp20x-regulator.c
+++ b/drivers/regulator/axp20x-regulator.c
@@ -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;
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] arm64: allwinner: axp803: Add drivevbus regulator
2017-12-07 19:04 [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803 Jagan Teki
@ 2017-12-07 19:04 ` Jagan Teki
2017-12-08 2:52 ` Chen-Yu Tsai
2017-12-07 19:04 ` [PATCH v2 3/3] arm64: allwinner: a64: bananapi-m64: add usb otg Jagan Teki
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Jagan Teki @ 2017-12-07 19:04 UTC (permalink / raw)
To: Maxime Ripard
Cc: Chen-Yu Tsai, Icenowy Zheng, Rob Herring, Mark Rutland,
Catalin Marinas, Will Deacon, Michael Trimarchi,
linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
Jagan Teki
Add reg_drivevbus regualtor for boards which are using
external regulator to drive the OTG VBus through N_VBUSEN
PMIC pin.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- New patch
arch/arm64/boot/dts/allwinner/axp803.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/axp803.dtsi b/arch/arm64/boot/dts/allwinner/axp803.dtsi
index ff8af52..e5eae8b 100644
--- a/arch/arm64/boot/dts/allwinner/axp803.dtsi
+++ b/arch/arm64/boot/dts/allwinner/axp803.dtsi
@@ -146,5 +146,10 @@
regulator-max-microvolt = <3000000>;
regulator-name = "rtc-ldo";
};
+
+ reg_drivevbus: drivevbus {
+ regulator-name = "drivevbus";
+ status = "disabled";
+ };
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] arm64: allwinner: a64: bananapi-m64: add usb otg
2017-12-07 19:04 [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803 Jagan Teki
2017-12-07 19:04 ` [PATCH v2 2/3] arm64: allwinner: axp803: Add drivevbus regulator Jagan Teki
@ 2017-12-07 19:04 ` Jagan Teki
2017-12-07 23:46 ` [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803 Rob Herring
2017-12-08 2:18 ` Chen-Yu Tsai
3 siblings, 0 replies; 7+ messages in thread
From: Jagan Teki @ 2017-12-07 19:04 UTC (permalink / raw)
To: Maxime Ripard
Cc: Chen-Yu Tsai, Icenowy Zheng, Rob Herring, Mark Rutland,
Catalin Marinas, Will Deacon, Michael Trimarchi,
linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
Jagan Teki
Add usb otg support for bananapi-m64 board,
- USB-ID connected with PH9
- USB-DRVVBUS controlled by N_VBUSEN pin from PMIC
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- add drvvbus regulator
- add N_VBUSEN pin
.../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 4a8d3f8..e4b2d8e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -66,6 +66,10 @@
};
};
+&ehci0 {
+ status = "okay";
+};
+
&ehci1 {
status = "okay";
};
@@ -136,6 +140,10 @@
status = "okay";
};
+&ohci0 {
+ status = "okay";
+};
+
&ohci1 {
status = "okay";
};
@@ -148,6 +156,7 @@
reg = <0x3a3>;
interrupt-parent = <&r_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+ x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
};
};
@@ -243,6 +252,11 @@
regulator-name = "vdd-cpus";
};
+®_drivevbus {
+ regulator-name = "usb0-vbus";
+ status = "okay";
+};
+
®_rtc_ldo {
regulator-name = "vcc-rtc";
};
@@ -259,6 +273,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";
};
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803
2017-12-07 19:04 [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803 Jagan Teki
2017-12-07 19:04 ` [PATCH v2 2/3] arm64: allwinner: axp803: Add drivevbus regulator Jagan Teki
2017-12-07 19:04 ` [PATCH v2 3/3] arm64: allwinner: a64: bananapi-m64: add usb otg Jagan Teki
@ 2017-12-07 23:46 ` Rob Herring
2017-12-08 2:18 ` Chen-Yu Tsai
3 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2017-12-07 23:46 UTC (permalink / raw)
To: Jagan Teki
Cc: Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng, Mark Rutland,
Catalin Marinas, Will Deacon, Michael Trimarchi,
linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
Jagan Teki
On Fri, Dec 08, 2017 at 12:34:18AM +0530, Jagan Teki wrote:
> 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.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v2:
> - New patch
>
> Documentation/devicetree/bindings/mfd/axp20x.txt | 2 +-
> drivers/regulator/axp20x-regulator.c | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803
2017-12-07 19:04 [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803 Jagan Teki
` (2 preceding siblings ...)
2017-12-07 23:46 ` [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803 Rob Herring
@ 2017-12-08 2:18 ` Chen-Yu Tsai
3 siblings, 0 replies; 7+ messages in thread
From: Chen-Yu Tsai @ 2017-12-08 2:18 UTC (permalink / raw)
To: Jagan Teki
Cc: Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng, Rob Herring,
Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi,
linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
Jagan Teki
On Fri, Dec 8, 2017 at 3:04 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> 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.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v2:
> - New patch
>
> Documentation/devicetree/bindings/mfd/axp20x.txt | 2 +-
> drivers/regulator/axp20x-regulator.c | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt
> index 9455503..34f24a2 100644
> --- a/Documentation/devicetree/bindings/mfd/axp20x.txt
> +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt
> @@ -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)
There is also a table of regulators in that file. Please update it.
ChenYu
>
> - x-powers,master-mode: Boolean (axp806 only). Set this when the PMIC is
> wired for master mode. The default is slave mode.
> diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
> index 181622b..91b8ff8 100644
> --- a/drivers/regulator/axp20x-regulator.c
> +++ b/drivers/regulator/axp20x-regulator.c
> @@ -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;
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] arm64: allwinner: axp803: Add drivevbus regulator
2017-12-07 19:04 ` [PATCH v2 2/3] arm64: allwinner: axp803: Add drivevbus regulator Jagan Teki
@ 2017-12-08 2:52 ` Chen-Yu Tsai
2017-12-08 5:32 ` Jagan Teki
0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2017-12-08 2:52 UTC (permalink / raw)
To: Jagan Teki
Cc: Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng, Rob Herring,
Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi,
linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
Jagan Teki
On Fri, Dec 8, 2017 at 3:04 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> Add reg_drivevbus regualtor for boards which are using
> external regulator to drive the OTG VBus through N_VBUSEN
> PMIC pin.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v2:
> - New patch
>
> arch/arm64/boot/dts/allwinner/axp803.dtsi | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/axp803.dtsi b/arch/arm64/boot/dts/allwinner/axp803.dtsi
> index ff8af52..e5eae8b 100644
> --- a/arch/arm64/boot/dts/allwinner/axp803.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/axp803.dtsi
> @@ -146,5 +146,10 @@
> regulator-max-microvolt = <3000000>;
> regulator-name = "rtc-ldo";
> };
> +
> + reg_drivevbus: drivevbus {
Could you keep the nodes in alphabetical order please?
Thanks
ChenYu
> + regulator-name = "drivevbus";
> + status = "disabled";
> + };
> };
> };
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] arm64: allwinner: axp803: Add drivevbus regulator
2017-12-08 2:52 ` Chen-Yu Tsai
@ 2017-12-08 5:32 ` Jagan Teki
0 siblings, 0 replies; 7+ messages in thread
From: Jagan Teki @ 2017-12-08 5:32 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Maxime Ripard, Icenowy Zheng, Rob Herring, Mark Rutland,
Catalin Marinas, Will Deacon, Michael Trimarchi,
linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
Jagan Teki
On Fri, Dec 8, 2017 at 8:22 AM, Chen-Yu Tsai <wens@csie.org> wrote:
> On Fri, Dec 8, 2017 at 3:04 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>> Add reg_drivevbus regualtor for boards which are using
>> external regulator to drive the OTG VBus through N_VBUSEN
>> PMIC pin.
>>
>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>> ---
>> Changes for v2:
>> - New patch
>>
>> arch/arm64/boot/dts/allwinner/axp803.dtsi | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/axp803.dtsi b/arch/arm64/boot/dts/allwinner/axp803.dtsi
>> index ff8af52..e5eae8b 100644
>> --- a/arch/arm64/boot/dts/allwinner/axp803.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/axp803.dtsi
>> @@ -146,5 +146,10 @@
>> regulator-max-microvolt = <3000000>;
>> regulator-name = "rtc-ldo";
>> };
>> +
>> + reg_drivevbus: drivevbus {
>
> Could you keep the nodes in alphabetical order please?
thought the same, but this seems to be different regulator from above
AXP_DESC regulators and even binding documentation follow this order.
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-12-08 5:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 19:04 [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803 Jagan Teki
2017-12-07 19:04 ` [PATCH v2 2/3] arm64: allwinner: axp803: Add drivevbus regulator Jagan Teki
2017-12-08 2:52 ` Chen-Yu Tsai
2017-12-08 5:32 ` Jagan Teki
2017-12-07 19:04 ` [PATCH v2 3/3] arm64: allwinner: a64: bananapi-m64: add usb otg Jagan Teki
2017-12-07 23:46 ` [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803 Rob Herring
2017-12-08 2:18 ` Chen-Yu Tsai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).