All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM64: dts: marvell: enable USB host on Armada-8040-DB
Date: Mon, 14 Aug 2017 16:32:09 +0200	[thread overview]
Message-ID: <87o9rikyom.fsf@free-electrons.com> (raw)
In-Reply-To: <20170809144437.26858-2-miquel.raynal@free-electrons.com> (Miquel Raynal's message of "Wed, 9 Aug 2017 16:44:37 +0200")

Hi Miquel,
 
 On mer., ao?t 09 2017, Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> From: Grzegorz Jaszczyk <jaz@semihalf.com>
>
> 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.
>
> Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-8040-db.dts | 65 ++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> index 1e8f7242ed6f..0d7b2ae46610 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> @@ -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";
>  };
>  
> -- 
> 2.11.0
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

      reply	other threads:[~2017-08-14 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09  8:19 [PATCH] ARM64: dts: a7040: add regulator nodes to enable USB host VBUS Miquel Raynal
2017-08-09 12:05 ` Thomas Petazzoni
2017-08-09 12:31   ` Miquel RAYNAL
2017-08-09 14:44   ` [PATCH 1/2] ARM64: dts: marvell: enable USB host on Armada-7040-DB Miquel Raynal
2017-08-14 14:31     ` Gregory CLEMENT
2017-08-09 14:44   ` [PATCH 2/2] ARM64: dts: marvell: enable USB host on Armada-8040-DB Miquel Raynal
2017-08-14 14:32     ` Gregory CLEMENT [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9rikyom.fsf@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.