ARM64: dts: a7040: add regulator nodes to enable USB host VBUS
Subsystems (2)
PATCH 1/1 ARM64: dts: a7040: add regulator nodes to enable USB host VBUS
From: Hanna Hawa <[email protected]>
Add I2C expander and USB host PHY (host 0 and host 1) to enable USB VBUS on USB ports of type A on Armada-7040-DB.
--- arch/arm64/boot/dts/marvell/armada-7040-db.dts | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
arch/arm64/boot/dts/marvell/armada-7040-db.dts +41 -0
@@ -44,6 +44,7 @@ * Device Tree file for Marvell Armada 7040 Development board platform */ +#include <dt-bindings/gpio/gpio.h> #include "armada-7040.dtsi" / {
@@ -59,6 +60,36 @@ device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; + + exp_usb3h0_vbus: usb3-0-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb3-0-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + gpio = <&expander0 0 GPIO_ACTIVE_HIGH>; + }; + + exp_usb3h1_vbus: usb3-1-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb3-1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + gpio = <&expander0 1 GPIO_ACTIVE_HIGH>; + }; + + cpm_usb3_0_phy: cpm-usb3-0-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&exp_usb3h0_vbus>; + }; + + cpm_usb3_1_phy: cpm-usb3-1-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&exp_usb3h1_vbus>; + }; }; &i2c0 {
@@ -105,6 +136,14 @@ &cpm_i2c0 { status = "okay"; clock-frequency = <100000>; + + expander0: pca9555 at 21 { + compatible = "nxp,pca9555"; + pinctrl-names = "default"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x21>; + }; }; &cpm_spi1 {
@@ -140,10 +179,12 @@ }; &cpm_usb3_0 { + usb-phy = <&cpm_usb3_0_phy>; status = "okay"; }; &cpm_usb3_1 { + usb-phy = <&cpm_usb3_1_phy>; status = "okay"; };
Signature · 1 line
2.11.0
PATCH 1/1 ARM64: dts: a7040: add regulator nodes to enable USB host VBUS
Hello,
Quoted 6 lines · Miquel Raynal
From: Hanna Hawa <[email protected]>
Add I2C expander and USB host PHY (host 0 and host 1) to enable USB VBUS on USB ports of type A on Armada-7040-DB.
Signed-off-by Miquel Raynal <[email protected]>
You should have kept Hanna's Signed-off-by here and add your own below it.
The author of the patch should always match the first person signing off on the patch.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 ARM64: dts: a7040: add regulator nodes to enable USB host VBUS
Quoted 8 lines · On Wed, 9 Aug 2017 14:05:38 +0200 Thomas Petazzoni…
Hello,
Quoted 5 lines · Miquel Raynal
From: Hanna Hawa <[email protected]>
Add I2C expander and USB host PHY (host 0 and host 1) to enable USB VBUS on USB ports of type A on Armada-7040-DB.
Quoted 7 lines
Quoted 1 line
Signed-off-by Miquel Raynal <[email protected]>You should have kept Hanna's Signed-off-by here and add your own below it.
The author of the patch should always match the first person signing off on the patch.
Right, I will correct that, thank you.
Regards,
Miquel
Quoted 4 lines
Best regards,
Thomas
Signature · 3 lines
Miquel Raynal, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/2 ARM64: dts: marvell: enable USB host on Armada-7040-DB
In reply to Thomas PetazzoniFrom: Hanna Hawa <[email protected]>
Add I2C expander and USB host PHY (host 0 and host 1) to enable USB VBUS on USB ports of type A on Armada-7040-DB.
--- arch/arm64/boot/dts/marvell/armada-7040-db.dts | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
arch/arm64/boot/dts/marvell/armada-7040-db.dts +39 -0
@@ -44,6 +44,7 @@ * Device Tree file for Marvell Armada 7040 Development board platform */ +#include <dt-bindings/gpio/gpio.h> #include "armada-7040.dtsi" / {
@@ -59,6 +60,34 @@ device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; + + cpm_reg_usb3_0_vbus: cpm-usb3-0-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb3h0-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander0 0 GPIO_ACTIVE_HIGH>; + }; + + cpm_reg_usb3_1_vbus: cpm-usb3-1-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb3h1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander0 1 GPIO_ACTIVE_HIGH>; + }; + + cpm_usb3_0_phy: cpm-usb3-0-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cpm_reg_usb3_0_vbus>; + }; + + cpm_usb3_1_phy: cpm-usb3-1-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cpm_reg_usb3_1_vbus>; + }; }; &i2c0 {
@@ -105,6 +134,14 @@ &cpm_i2c0 { status = "okay"; clock-frequency = <100000>; + + expander0: pca9555 at 21 { + compatible = "nxp,pca9555"; + pinctrl-names = "default"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x21>; + }; }; &cpm_spi1 {
@@ -140,10 +177,12 @@ }; &cpm_usb3_0 { + usb-phy = <&cpm_usb3_0_phy>; status = "okay"; }; &cpm_usb3_1 { + usb-phy = <&cpm_usb3_1_phy>; status = "okay"; };
Signature · 1 line
2.11.0
PATCH 1/2 ARM64: dts: marvell: enable USB host on Armada-7040-DB
Hi Miquel,
Quoted 5 lines · Miquel Raynal
From: Hanna Hawa <[email protected]>
Add I2C expander and USB host PHY (host 0 and host 1) to enable USB VBUS on USB ports of type A on Armada-7040-DB.
Applied on mvebu/dt64
Thanks,
Gregory
Quoted 84 lines
Signed-off-by Hanna Hawa <[email protected]>Signed-off-by Miquel Raynal <[email protected]>--- arch/arm64/boot/dts/marvell/armada-7040-db.dts | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)arch/arm64/boot/dts/marvell/armada-7040-db.dts +39
-0@@ -44,6 +44,7 @@ * Device Tree file for Marvell Armada 7040 Development board platform */ +#include <dt-bindings/gpio/gpio.h> #include "armada-7040.dtsi" / {@@ -59,6 +60,34 @@ device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; + + cpm_reg_usb3_0_vbus: cpm-usb3-0-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb3h0-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander0 0 GPIO_ACTIVE_HIGH>; + }; + + cpm_reg_usb3_1_vbus: cpm-usb3-1-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb3h1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander0 1 GPIO_ACTIVE_HIGH>; + }; + + cpm_usb3_0_phy: cpm-usb3-0-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cpm_reg_usb3_0_vbus>; + }; + + cpm_usb3_1_phy: cpm-usb3-1-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cpm_reg_usb3_1_vbus>; + }; }; &i2c0 {@@ -105,6 +134,14 @@ &cpm_i2c0 { status = "okay"; clock-frequency = <100000>; + + expander0: pca9555 at 21 { + compatible = "nxp,pca9555"; + pinctrl-names = "default"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x21>; + }; }; &cpm_spi1 {@@ -140,10 +177,12 @@ }; &cpm_usb3_0 { + usb-phy = <&cpm_usb3_0_phy>; status = "okay"; }; &cpm_usb3_1 { + usb-phy = <&cpm_usb3_1_phy>; status = "okay"; };Signature · 1 line
2.11.0
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/2 ARM64: dts: marvell: enable USB host on Armada-8040-DB
In reply to Thomas PetazzoniFrom: Grzegorz Jaszczyk <[email protected]>
Enable USB host on Armada-8040-DB by adding USB PHY nodes for the following ports:
- host 0 and 1 of CPM
- host 0 of CPS
These PHY are enabled by lanes coming from regulators based on two I2C expanders.
--- arch/arm64/boot/dts/marvell/armada-8040-db.dts | 65 ++++++++++++++++++++++++++ 1 file changed, 65 insertions(+)
arch/arm64/boot/dts/marvell/armada-8040-db.dts +65 -0
@@ -44,6 +44,7 @@ * Device Tree file for Marvell Armada 8040 Development board platform */ +#include <dt-bindings/gpio/gpio.h> #include "armada-8040.dtsi" / {
@@ -59,6 +60,48 @@ device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; + + cpm_reg_usb3_0_vbus: cpm-usb3-0-vbus { + compatible = "regulator-fixed"; + regulator-name = "cpm-usb3h0-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander0 0 GPIO_ACTIVE_HIGH>; + }; + + cpm_reg_usb3_1_vbus: cpm-usb3-1-vbus { + compatible = "regulator-fixed"; + regulator-name = "cpm-usb3h1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander0 1 GPIO_ACTIVE_HIGH>; + }; + + cpm_usb3_0_phy: cpm-usb3-0-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cpm_reg_usb3_0_vbus>; + }; + + cpm_usb3_1_phy: cpm-usb3-1-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cpm_reg_usb3_1_vbus>; + }; + + cps_reg_usb3_0_vbus: cps-usb3-0-vbus { + compatible = "regulator-fixed"; + regulator-name = "cps-usb3h0-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander1 0 GPIO_ACTIVE_HIGH>; + }; + + cps_usb3_0_phy: cps-usb3-0-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cps_reg_usb3_0_vbus>; + }; }; &i2c0 {
@@ -107,6 +150,25 @@ &cpm_i2c0 { status = "okay"; clock-frequency = <100000>; + + /* U31 */ + expander0: pca9555 at 21 { + compatible = "nxp,pca9555"; + pinctrl-names = "default"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x21>; + }; + + /* U25 */ + expander1: pca9555 at 25 { + compatible = "nxp,pca9555"; + pinctrl-names = "default"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x25>; + }; + }; /* CON4 on CP0 expansion */
@@ -116,11 +178,13 @@ /* CON9 on CP0 expansion */ &cpm_usb3_0 { + usb-phy = <&cpm_usb3_0_phy>; status = "okay"; }; /* CON10 on CP0 expansion */ &cpm_usb3_1 { + usb-phy = <&cpm_usb3_1_phy>; status = "okay"; };
@@ -159,6 +223,7 @@ /* CON9 on CP1 expansion */ &cps_usb3_0 { + usb-phy = <&cps_usb3_0_phy>; status = "okay"; };
Signature · 1 line
2.11.0
PATCH 2/2 ARM64: dts: marvell: enable USB host on Armada-8040-DB
Hi Miquel,
Quoted 7 lines · Miquel Raynal
From: Grzegorz Jaszczyk <[email protected]>
Enable USB host on Armada-8040-DB by adding USB PHY nodes for the following ports:
- host 0 and 1 of CPM
- host 0 of CPS
Quoted 5 lines
These PHY are enabled by lanes coming from regulators based on two I2C expanders.
Signed-off-by Grzegorz Jaszczyk <[email protected]>Signed-off-by Miquel Raynal <[email protected]>
Applied on mvebu/dt64
Thanks,
Gregory
Quoted 116 lines
--- arch/arm64/boot/dts/marvell/armada-8040-db.dts | 65 ++++++++++++++++++++++++++ 1 file changed, 65 insertions(+)arch/arm64/boot/dts/marvell/armada-8040-db.dts +65
-0@@ -44,6 +44,7 @@ * Device Tree file for Marvell Armada 8040 Development board platform */ +#include <dt-bindings/gpio/gpio.h> #include "armada-8040.dtsi" / {@@ -59,6 +60,48 @@ device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; + + cpm_reg_usb3_0_vbus: cpm-usb3-0-vbus { + compatible = "regulator-fixed"; + regulator-name = "cpm-usb3h0-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander0 0 GPIO_ACTIVE_HIGH>; + }; + + cpm_reg_usb3_1_vbus: cpm-usb3-1-vbus { + compatible = "regulator-fixed"; + regulator-name = "cpm-usb3h1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander0 1 GPIO_ACTIVE_HIGH>; + }; + + cpm_usb3_0_phy: cpm-usb3-0-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cpm_reg_usb3_0_vbus>; + }; + + cpm_usb3_1_phy: cpm-usb3-1-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cpm_reg_usb3_1_vbus>; + }; + + cps_reg_usb3_0_vbus: cps-usb3-0-vbus { + compatible = "regulator-fixed"; + regulator-name = "cps-usb3h0-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&expander1 0 GPIO_ACTIVE_HIGH>; + }; + + cps_usb3_0_phy: cps-usb3-0-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <&cps_reg_usb3_0_vbus>; + }; }; &i2c0 {@@ -107,6 +150,25 @@ &cpm_i2c0 { status = "okay"; clock-frequency = <100000>; + + /* U31 */ + expander0: pca9555 at 21 { + compatible = "nxp,pca9555"; + pinctrl-names = "default"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x21>; + }; + + /* U25 */ + expander1: pca9555 at 25 { + compatible = "nxp,pca9555"; + pinctrl-names = "default"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x25>; + }; + }; /* CON4 on CP0 expansion */@@ -116,11 +178,13 @@ /* CON9 on CP0 expansion */ &cpm_usb3_0 { + usb-phy = <&cpm_usb3_0_phy>; status = "okay"; }; /* CON10 on CP0 expansion */ &cpm_usb3_1 { + usb-phy = <&cpm_usb3_1_phy>; status = "okay"; };@@ -159,6 +223,7 @@ /* CON9 on CP1 expansion */ &cps_usb3_0 { + usb-phy = <&cps_usb3_0_phy>; status = "okay"; };Signature · 1 line
2.11.0
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com