devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Andrew Andrianov <andrew-g16cbSVCqPUdnm+yROfE0A@public.gmane.org>,
	Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
	Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
	Gregory Clement
	<gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v4 1/1] ARM: mvebu: dts: Add dts file for DLink DNS-327L
Date: Wed, 20 May 2015 11:05:12 +0200	[thread overview]
Message-ID: <555C4E48.6020707@gmail.com> (raw)
In-Reply-To: <1432069858-10958-2-git-send-email-andrew-g16cbSVCqPUdnm+yROfE0A@public.gmane.org>

On 19.05.2015 23:10, Andrew Andrianov wrote:
> DNS-327L is a 2-bay NAS with the following specs:
[...]
> Signed-off-by: Andrew Andrianov <andrew-g16cbSVCqPUdnm+yROfE0A@public.gmane.org>
> ---
>   arch/arm/boot/dts/Makefile                     |   1 +
>   arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 356 +++++++++++++++++++++++++
>   2 files changed, 357 insertions(+)
>   create mode 100644 arch/arm/boot/dts/armada-370-dlink-dns327l.dts
[...]
> diff --git a/arch/arm/boot/dts/armada-370-dlink-dns327l.dts b/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
> new file mode 100644
> index 0000000..0f4555c4
> --- /dev/null
> +++ b/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
> @@ -0,0 +1,356 @@
[...]
> +	regulators {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		pinctrl-0 = <&xhci_pwr_pin
> +			&sata_l_pwr_pin
> +			&sata_r_pwr_pin>;
> +
> +		pinctrl-names = "default";

Andrew,

I doubt pinctrl will not work as you expected. For regulators, unlike
gpio-keys/leds above, this node just describes the "bus" of regulators.

> +
> +		usb_power: regulator@1 {
> +			compatible = "regulator-fixed";
> +			reg = <1>;
> +			regulator-name = "USB3.0 Port Power";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			enable-active-high;
> +			regulator-boot-on;
> +			regulator-always-on;
> +			gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;

Instead you'll have to put the corresponding pinctrl-0/names properties
in each of the regulator nodes, i.e.

			pinctrl-0 = <&xhci_pwr_pin>
			pinctrl-names = "default";

here and similar for the other regulator nodes.

> +		};
> +
> +		sata_r_power: regulator@2 {
> +			compatible = "regulator-fixed";
> +			reg = <2>;
> +			regulator-name = "SATA-R Power";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			startup-delay-us = <2000000>;
> +			enable-active-high;
> +			regulator-always-on;
> +			regulator-boot-on;
> +			gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		sata_l_power: regulator@3 {
> +			compatible = "regulator-fixed";
> +			reg = <3>;
> +			regulator-name = "SATA-L Power";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			startup-delay-us = <4000000>;
> +			enable-active-high;
> +			regulator-always-on;
> +			regulator-boot-on;
> +			gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
> +		};
> +	};
> +};
> +
> +&pinctrl {
> +	sata_l_white_pin: sata-l-white-pin {
> +		marvell,pins = "mpp57";
> +		marvell,function = "sata0";
> +	};
> +
> +	sata_r_white_pin: sata-r-white-pin {
> +		marvell,pins = "mpp55";
> +		marvell,function = "sata1";
> +	};
> +
> +	sata_r_amber_pin: sata-r-amber-pin {
> +		marvell,pins = "mpp52";
> +		marvell,function = "gpio";
> +	};
> +

Remove extra empty line.

> +
> +	sata_l_amber_pin: sata-l-amber-pin {
> +		marvell,pins = "mpp53";
> +		marvell,function = "gpio";
> +	};
> +
> +	backup_led_pin: backup-led-pin {
> +		marvell,pins = "mpp61";
> +		marvell,function = "gpo";
> +	};
> +
> +	xhci_pwr_pin: xhci-pwr-pin {
> +		marvell,pins = "mpp13";
> +		marvell,function = "gpio";
> +	};
> +
> +	sata_r_pwr_pin: sata-r-pwr-pin {
> +		marvell,pins = "mpp54";
> +		marvell,function = "gpio";
> +	};
> +
> +	sata_l_pwr_pin: sata-l-pwr-pin {
> +		marvell,pins = "mpp56";
> +		marvell,function = "gpio";
> +	};
> +
> +	uart1_pins: uart1-pins {
> +		marvell,pins = "mpp60", "mpp61";
> +		marvell,function = "uart1";
> +	};
> +
> +	power_button_pin: power-button-pin {
> +		marvell,pins = "mpp65";
> +		marvell,function = "gpio";
> +	};
> +
> +	backup_button_pin: backup-button-pin {
> +		marvell,pins = "mpp63";
> +		marvell,function = "gpio";
> +	};
> +
> +	reset_button_pin: reset-button-pin {
> +		marvell,pins = "mpp64";
> +		marvell,function = "gpio";
> +	};
> +};
> +
> +/* Serial console */
> +&uart0 {
> +	status = "okay";
> +};
> +
> +/* Connected to Weltrend MCU */
> +&uart1 {
> +	pinctrl-0 = <&uart1_pins>;

missing pinctrl-names = "default";

> +	status = "okay";
> +};
> +
> +&mdio {
> +	phy0: ethernet-phy@0 { /* Marvell 88E1318 */
> +		reg = <0>;
> +		marvell,reg-init = <0x0 0x16 0x0 0x2>,
> +		                   <0x0 0x19 0x0 0x77>,
> +		                   <0x0 0x18 0x0 0x5747>;

nit: if you are at it, you could prepend the mdio reg data with 0, i.e.
<0x0 0x16 0x0 0x0002>.

If you address the comments and stick with this version, i.e. do not add
any new stuff now - you can add my

Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Thanks!

> +	};
> +};
> +
> +&eth1 {
> +	phy = <&phy0>;
> +	phy-mode = "rgmii-id";
> +	status = "okay";
> +};
> +
> +&i2c0 {
> +	compatible = "marvell,mv64xxx-i2c";
> +	clock-frequency = <100000>;
> +	status = "okay";
> +};
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-05-20  9:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-03 14:27 [PATCH v3 0/1] ARM: mvebu: dts: Add dts file for DLink DNS-327L Andrew Andrianov
     [not found] ` <1430663256-22714-1-git-send-email-andrew-g16cbSVCqPUdnm+yROfE0A@public.gmane.org>
2015-05-03 14:27   ` [PATCH v3 1/1] " Andrew Andrianov
2015-05-03 20:50   ` [PATCH v3 0/1] " Andrew Lunn
     [not found]     ` <20150503205043.GA23342-g2DYL2Zd6BY@public.gmane.org>
2015-05-03 22:05       ` Andrew
     [not found]         ` <ad0fbb28b4b74de4c6685a5ddd21010c-IcawJbj+vY1vZ+LtbKW8tg@public.gmane.org>
2015-05-06 14:05           ` Andrew Lunn
     [not found]             ` <20150506140534.GC10890-g2DYL2Zd6BY@public.gmane.org>
2015-05-19 21:10               ` [PATCH v4 " Andrew Andrianov
2015-05-19 21:10                 ` [PATCH v4 1/1] " Andrew Andrianov
     [not found]                   ` <1432069858-10958-2-git-send-email-andrew-g16cbSVCqPUdnm+yROfE0A@public.gmane.org>
2015-05-20  9:05                     ` Sebastian Hesselbarth [this message]
2015-05-20 10:20                       ` Andrew
     [not found]                         ` <699cee8678f6e671bd1457aa06180ccf-IcawJbj+vY1vZ+LtbKW8tg@public.gmane.org>
2015-05-20 11:00                           ` Sebastian Hesselbarth
2015-05-25 11:17                             ` Gregory CLEMENT
2015-05-26 15:51                               ` [PATCH v5 0/1] " Andrew Andrianov
2015-05-26 15:51                               ` [PATCH v5 1/1] " Andrew Andrianov
     [not found]                                 ` <1432655471-16212-2-git-send-email-andrew-g16cbSVCqPUdnm+yROfE0A@public.gmane.org>
2015-05-26 15:50                                   ` Andrew Lunn
2015-05-27 10:01                                     ` Gregory CLEMENT

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=555C4E48.6020707@gmail.com \
    --to=sebastian.hesselbarth-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=andrew-g16cbSVCqPUdnm+yROfE0A@public.gmane.org \
    --cc=andrew-g2DYL2Zd6BY@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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).