All of lore.kernel.org
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: dts: Add emac nodes to the rk3188 device tree
Date: Thu, 04 Sep 2014 14:11:51 +0200	[thread overview]
Message-ID: <2772929.YUnUK3Vc00@diego> (raw)
In-Reply-To: <1409763165-16461-3-git-send-email-romain.perier@gmail.com>

Am Mittwoch, 3. September 2014, 16:52:44 schrieb Romain Perier:
> This adds support for EMAC Rockchip driver on RK3188 SoCs.
> 
> Signed-off-by: Romain Perier <romain.perier@gmail.com>

could you think about changing patches 3 and 4 with the diff below?

For one the comment style is not really following the coding style.
I guess either remove the comments completely or switch to a /* ... */
form.

More importantly, I think the compatible is a property of the SoC and does
not need to be replicated into every board, so it should live in a small
&emac node in the rk3188.dtsi to adapt the property.


Heiko


diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts
index 9f37c6f..a5c90e1 100644
--- a/arch/arm/boot/dts/rk3188-radxarock.dts
+++ b/arch/arm/boot/dts/rk3188-radxarock.dts
@@ -100,7 +100,6 @@
 
 &emac {
 	status = "okay";
-	compatible = "rockchip,rk3188-emac";
 
 	pinctrl-names = "default";
 	pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>;
diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
index 1261358..fd7511e 100644
--- a/arch/arm/boot/dts/rk3188.dtsi
+++ b/arch/arm/boot/dts/rk3188.dtsi
@@ -193,14 +193,14 @@
 
 		emac {
 			emac_xfer: emac-xfer {
-				rockchip,pins = <RK_GPIO3 16 RK_FUNC_2 &pcfg_pull_none>, //tx_en
-						<RK_GPIO3 17 RK_FUNC_2 &pcfg_pull_none>, //txd1
-						<RK_GPIO3 18 RK_FUNC_2 &pcfg_pull_none>, //txd0
-						<RK_GPIO3 19 RK_FUNC_2 &pcfg_pull_none>, //rxd0
-						<RK_GPIO3 20 RK_FUNC_2 &pcfg_pull_none>, //rxd1
-						<RK_GPIO3 21 RK_FUNC_2 &pcfg_pull_none>, //mac_clk
-						<RK_GPIO3 22 RK_FUNC_2 &pcfg_pull_none>, //rx_err
-						<RK_GPIO3 23 RK_FUNC_2 &pcfg_pull_none>; //crs_dvalid
+				rockchip,pins = <RK_GPIO3 16 RK_FUNC_2 &pcfg_pull_none>, /* tx_en */
+						<RK_GPIO3 17 RK_FUNC_2 &pcfg_pull_none>, /* txd1 */
+						<RK_GPIO3 18 RK_FUNC_2 &pcfg_pull_none>, /* txd0 */
+						<RK_GPIO3 19 RK_FUNC_2 &pcfg_pull_none>, /* rxd0 */
+						<RK_GPIO3 20 RK_FUNC_2 &pcfg_pull_none>, /* rxd1 */
+						<RK_GPIO3 21 RK_FUNC_2 &pcfg_pull_none>, /* mac_clk */
+						<RK_GPIO3 22 RK_FUNC_2 &pcfg_pull_none>, /* rx_err */
+						<RK_GPIO3 23 RK_FUNC_2 &pcfg_pull_none>; /* crs_dvalid */
 			};
 
 			emac_mdio: emac-mdio {
@@ -385,6 +385,10 @@
 	};
 };
 
+&emac {
+	compatible = "rockchip,rk3188-emac";
+};
+
 &global_timer {
 	interrupts = <GIC_PPI 11 0xf04>;
 };


> ---
>  arch/arm/boot/dts/rk3188.dtsi | 18 ++++++++++++++++++
>  arch/arm/boot/dts/rk3xxx.dtsi | 17 +++++++++++++++++
>  2 files changed, 35 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
> index ee801a9..a182713 100644
> --- a/arch/arm/boot/dts/rk3188.dtsi
> +++ b/arch/arm/boot/dts/rk3188.dtsi
> @@ -147,6 +147,24 @@
>  			bias-disable;
>  		};
> 
> +		emac {
> +			emac_xfer: emac-xfer {
> +				rockchip,pins = <RK_GPIO3 16 RK_FUNC_2 &pcfg_pull_none>, //tx_en
> +						<RK_GPIO3 17 RK_FUNC_2 &pcfg_pull_none>, //txd1
> +						<RK_GPIO3 18 RK_FUNC_2 &pcfg_pull_none>, //txd0
> +						<RK_GPIO3 19 RK_FUNC_2 &pcfg_pull_none>, //rxd0
> +						<RK_GPIO3 20 RK_FUNC_2 &pcfg_pull_none>, //rxd1
> +						<RK_GPIO3 21 RK_FUNC_2 &pcfg_pull_none>, //mac_clk
> +						<RK_GPIO3 22 RK_FUNC_2 &pcfg_pull_none>, //rx_err
> +						<RK_GPIO3 23 RK_FUNC_2 &pcfg_pull_none>; //crs_dvalid
> +			};
> +
> +			emac_mdio: emac-mdio {
> +				rockchip,pins = <RK_GPIO3 24 RK_FUNC_2 &pcfg_pull_none>,
> +						<RK_GPIO3 25 RK_FUNC_2 &pcfg_pull_none>;
> +			};
> +		};
> +
>  		i2c0 {
>  			i2c0_xfer: i2c0-xfer {
>  				rockchip,pins = <RK_GPIO1 24 RK_FUNC_1 &pcfg_pull_none>,
> diff --git a/arch/arm/boot/dts/rk3xxx.dtsi b/arch/arm/boot/dts/rk3xxx.dtsi
> index 8caf85d..208b1df 100644
> --- a/arch/arm/boot/dts/rk3xxx.dtsi
> +++ b/arch/arm/boot/dts/rk3xxx.dtsi
> @@ -91,6 +91,23 @@
>  		status = "disabled";
>  	};
> 
> +	emac: ethernet at 10204000 {
> +		compatible = "snps,arc-emac";
> +		reg = <0x10204000 0x3c>;
> +		interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		rockchip,grf = <&grf>;
> +
> +		clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>;
> +		clock-names = "hclk", "macref";
> +		max-speed = <100>;
> +		phy-mode = "rmii";
> +
> +		status = "disabled";
> +	};
> +
>  	mmc0: dwmmc at 10214000 {
>  		compatible = "rockchip,rk2928-dw-mshc";
>  		reg = <0x10214000 0x1000>;

WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: Romain Perier <romain.perier@gmail.com>
Cc: linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, arnd@arndb.de
Subject: Re: [PATCH 3/4] ARM: dts: Add emac nodes to the rk3188 device tree
Date: Thu, 04 Sep 2014 14:11:51 +0200	[thread overview]
Message-ID: <2772929.YUnUK3Vc00@diego> (raw)
In-Reply-To: <1409763165-16461-3-git-send-email-romain.perier@gmail.com>

Am Mittwoch, 3. September 2014, 16:52:44 schrieb Romain Perier:
> This adds support for EMAC Rockchip driver on RK3188 SoCs.
> 
> Signed-off-by: Romain Perier <romain.perier@gmail.com>

could you think about changing patches 3 and 4 with the diff below?

For one the comment style is not really following the coding style.
I guess either remove the comments completely or switch to a /* ... */
form.

More importantly, I think the compatible is a property of the SoC and does
not need to be replicated into every board, so it should live in a small
&emac node in the rk3188.dtsi to adapt the property.


Heiko


diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts
index 9f37c6f..a5c90e1 100644
--- a/arch/arm/boot/dts/rk3188-radxarock.dts
+++ b/arch/arm/boot/dts/rk3188-radxarock.dts
@@ -100,7 +100,6 @@
 
 &emac {
 	status = "okay";
-	compatible = "rockchip,rk3188-emac";
 
 	pinctrl-names = "default";
 	pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>;
diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
index 1261358..fd7511e 100644
--- a/arch/arm/boot/dts/rk3188.dtsi
+++ b/arch/arm/boot/dts/rk3188.dtsi
@@ -193,14 +193,14 @@
 
 		emac {
 			emac_xfer: emac-xfer {
-				rockchip,pins = <RK_GPIO3 16 RK_FUNC_2 &pcfg_pull_none>, //tx_en
-						<RK_GPIO3 17 RK_FUNC_2 &pcfg_pull_none>, //txd1
-						<RK_GPIO3 18 RK_FUNC_2 &pcfg_pull_none>, //txd0
-						<RK_GPIO3 19 RK_FUNC_2 &pcfg_pull_none>, //rxd0
-						<RK_GPIO3 20 RK_FUNC_2 &pcfg_pull_none>, //rxd1
-						<RK_GPIO3 21 RK_FUNC_2 &pcfg_pull_none>, //mac_clk
-						<RK_GPIO3 22 RK_FUNC_2 &pcfg_pull_none>, //rx_err
-						<RK_GPIO3 23 RK_FUNC_2 &pcfg_pull_none>; //crs_dvalid
+				rockchip,pins = <RK_GPIO3 16 RK_FUNC_2 &pcfg_pull_none>, /* tx_en */
+						<RK_GPIO3 17 RK_FUNC_2 &pcfg_pull_none>, /* txd1 */
+						<RK_GPIO3 18 RK_FUNC_2 &pcfg_pull_none>, /* txd0 */
+						<RK_GPIO3 19 RK_FUNC_2 &pcfg_pull_none>, /* rxd0 */
+						<RK_GPIO3 20 RK_FUNC_2 &pcfg_pull_none>, /* rxd1 */
+						<RK_GPIO3 21 RK_FUNC_2 &pcfg_pull_none>, /* mac_clk */
+						<RK_GPIO3 22 RK_FUNC_2 &pcfg_pull_none>, /* rx_err */
+						<RK_GPIO3 23 RK_FUNC_2 &pcfg_pull_none>; /* crs_dvalid */
 			};
 
 			emac_mdio: emac-mdio {
@@ -385,6 +385,10 @@
 	};
 };
 
+&emac {
+	compatible = "rockchip,rk3188-emac";
+};
+
 &global_timer {
 	interrupts = <GIC_PPI 11 0xf04>;
 };


> ---
>  arch/arm/boot/dts/rk3188.dtsi | 18 ++++++++++++++++++
>  arch/arm/boot/dts/rk3xxx.dtsi | 17 +++++++++++++++++
>  2 files changed, 35 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
> index ee801a9..a182713 100644
> --- a/arch/arm/boot/dts/rk3188.dtsi
> +++ b/arch/arm/boot/dts/rk3188.dtsi
> @@ -147,6 +147,24 @@
>  			bias-disable;
>  		};
> 
> +		emac {
> +			emac_xfer: emac-xfer {
> +				rockchip,pins = <RK_GPIO3 16 RK_FUNC_2 &pcfg_pull_none>, //tx_en
> +						<RK_GPIO3 17 RK_FUNC_2 &pcfg_pull_none>, //txd1
> +						<RK_GPIO3 18 RK_FUNC_2 &pcfg_pull_none>, //txd0
> +						<RK_GPIO3 19 RK_FUNC_2 &pcfg_pull_none>, //rxd0
> +						<RK_GPIO3 20 RK_FUNC_2 &pcfg_pull_none>, //rxd1
> +						<RK_GPIO3 21 RK_FUNC_2 &pcfg_pull_none>, //mac_clk
> +						<RK_GPIO3 22 RK_FUNC_2 &pcfg_pull_none>, //rx_err
> +						<RK_GPIO3 23 RK_FUNC_2 &pcfg_pull_none>; //crs_dvalid
> +			};
> +
> +			emac_mdio: emac-mdio {
> +				rockchip,pins = <RK_GPIO3 24 RK_FUNC_2 &pcfg_pull_none>,
> +						<RK_GPIO3 25 RK_FUNC_2 &pcfg_pull_none>;
> +			};
> +		};
> +
>  		i2c0 {
>  			i2c0_xfer: i2c0-xfer {
>  				rockchip,pins = <RK_GPIO1 24 RK_FUNC_1 &pcfg_pull_none>,
> diff --git a/arch/arm/boot/dts/rk3xxx.dtsi b/arch/arm/boot/dts/rk3xxx.dtsi
> index 8caf85d..208b1df 100644
> --- a/arch/arm/boot/dts/rk3xxx.dtsi
> +++ b/arch/arm/boot/dts/rk3xxx.dtsi
> @@ -91,6 +91,23 @@
>  		status = "disabled";
>  	};
> 
> +	emac: ethernet@10204000 {
> +		compatible = "snps,arc-emac";
> +		reg = <0x10204000 0x3c>;
> +		interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		rockchip,grf = <&grf>;
> +
> +		clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>;
> +		clock-names = "hclk", "macref";
> +		max-speed = <100>;
> +		phy-mode = "rmii";
> +
> +		status = "disabled";
> +	};
> +
>  	mmc0: dwmmc@10214000 {
>  		compatible = "rockchip,rk2928-dw-mshc";
>  		reg = <0x10214000 0x1000>;

  reply	other threads:[~2014-09-04 12:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 16:52 [PATCH v5 1/4] ethernet: arc: Add support for Rockchip SoC layer device tree bindings Romain Perier
2014-09-03 16:52 ` Romain Perier
2014-09-03 16:52 ` [PATCH v2 2/4] dt-bindings: Document EMAC Rockchip Romain Perier
2014-09-03 16:52   ` Romain Perier
2014-09-03 18:41   ` PERIER Romain
2014-09-04 12:13   ` Heiko Stübner
2014-09-04 12:13     ` Heiko Stübner
2014-09-03 16:52 ` [PATCH 3/4] ARM: dts: Add emac nodes to the rk3188 device tree Romain Perier
2014-09-03 16:52   ` Romain Perier
2014-09-04 12:11   ` Heiko Stübner [this message]
2014-09-04 12:11     ` Heiko Stübner
2014-09-03 16:52 ` [PATCH v2 4/4] ARM: dts: Enable emac node on the rk3188-radxarock boards Romain Perier
2014-09-03 16:52   ` Romain Perier
2014-09-03 18:17 ` [PATCH v5 1/4] ethernet: arc: Add support for Rockchip SoC layer device tree bindings Arnd Bergmann
2014-09-03 18:17   ` Arnd Bergmann
2014-09-03 21:12 ` Beniamino Galvani
2014-09-03 21:12   ` Beniamino Galvani
2014-09-04  8:45   ` PERIER Romain
2014-09-04 19:30     ` Beniamino Galvani
2014-09-04 19:30       ` Beniamino Galvani
2014-09-04  9:33   ` Arnd Bergmann
2014-09-04 21:38     ` Beniamino Galvani
2014-09-04 21:38       ` Beniamino Galvani
2014-09-04 12:05 ` Heiko Stübner
2014-09-04 12:05   ` Heiko Stübner
2014-09-05 22:10 ` David Miller
2014-09-05 22:10   ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2014-09-03 10:27 [PATCH v4 " Romain Perier
2014-09-03 10:27 ` [PATCH 3/4] ARM: dts: Add emac nodes to the rk3188 device tree Romain Perier
2014-09-03 10:27   ` Romain Perier

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=2772929.YUnUK3Vc00@diego \
    --to=heiko@sntech.de \
    --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.