All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Cc: "Rob Herring" <robh+dt@kernel.org>,
	"Andreas Färber" <afaerber@suse.de>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ARM: dts: owl-s500-roseapplepi: Add ethernet support
Date: Fri, 11 Jun 2021 11:26:06 +0530	[thread overview]
Message-ID: <20210611055606.GB6950@thinkpad> (raw)
In-Reply-To: <632e12c445ced7f10e6d7240162484ae5afc148e.1623358117.git.cristian.ciocaltea@gmail.com>

On Fri, Jun 11, 2021 at 12:09:22AM +0300, Cristian Ciocaltea wrote:
> Add pinctrl configuration for enabling the Ethernet MAC on RoseapplePi
> SBC. Additionally, provide the necessary properties for the generic S500
> ethernet node in order to setup PHY and MDIO.
> 
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
> ---
>  arch/arm/boot/dts/owl-s500-roseapplepi.dts | 56 ++++++++++++++++++++++
>  1 file changed, 56 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/owl-s500-roseapplepi.dts b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
> index b8c5db2344aa..bffabc7eaa50 100644
> --- a/arch/arm/boot/dts/owl-s500-roseapplepi.dts
> +++ b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
> @@ -225,6 +225,38 @@ bias1-pinconf {
>  			bias-pull-down;
>  		};
>  	};
> +
> +	ethernet_pins: ethernet-pins {
> +		txd01-pinmux {
> +			groups = "rmii_txd0_mfp", "rmii_txd1_mfp";
> +			function = "eth_rmii";
> +		};
> +
> +		rxd01-pinmux {
> +			groups = "rmii_rxd0_mfp", "rmii_rxd1_mfp";
> +			function = "eth_rmii";
> +		};
> +
> +		txen_rxer-pinmux {
> +			groups = "rmii_txen_mfp", "rmii_rxen_mfp";
> +			function = "eth_rmii";
> +		};
> +
> +		crs_dv_ref_clk-pinmux {
> +			groups = "rmii_crs_dv_mfp", "rmii_ref_clk_mfp";
> +			function = "eth_rmii";

Since the function is same, just club all the groups together.

> +		};
> +
> +		ref_clk-pinconf {
> +			groups = "rmii_ref_clk_drv";
> +			drive-strength = <2>;
> +		};
> +
> +		phy_clk-pinmux {
> +			groups = "clko_25m_mfp";
> +			function = "clko_25m";
> +		};

Move this above node pinconf.

> +	};
>  };
>  
>  /* uSD */
> @@ -241,6 +273,30 @@ &mmc0 {
>  	vqmmc-supply = <&sd_vcc>;
>  };
>  
> +&ethernet {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&ethernet_pins>;
> +	phy-mode = "rmii";
> +	phy-handle = <&eth_phy>;
> +	status = "okay";
> +
> +	mdio {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		reset-gpios = <&pinctrl 88 GPIO_ACTIVE_LOW>; /* GPIOC24 */
> +		reset-delay-us = <10000>;
> +		reset-post-delay-us = <150000>;

reset-* properties belong to "ethernet-phy" node. Also, while adding new nodes
please run the dtbs_check and try to address the warnings.

Thanks,
Mani

> +
> +		eth_phy: ethernet-phy@3 {
> +			reg = <0x3>;
> +			max-speed = <100>;
> +			interrupt-parent = <&sirq>;
> +			interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> +		};
> +	};
> +};
> +
>  &twd_timer {
>  	status = "okay";
>  };
> -- 
> 2.32.0
> 

WARNING: multiple messages have this Message-ID (diff)
From: Manivannan Sadhasivam <mani@kernel.org>
To: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Cc: "Rob Herring" <robh+dt@kernel.org>,
	"Andreas Färber" <afaerber@suse.de>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ARM: dts: owl-s500-roseapplepi: Add ethernet support
Date: Fri, 11 Jun 2021 11:26:06 +0530	[thread overview]
Message-ID: <20210611055606.GB6950@thinkpad> (raw)
In-Reply-To: <632e12c445ced7f10e6d7240162484ae5afc148e.1623358117.git.cristian.ciocaltea@gmail.com>

On Fri, Jun 11, 2021 at 12:09:22AM +0300, Cristian Ciocaltea wrote:
> Add pinctrl configuration for enabling the Ethernet MAC on RoseapplePi
> SBC. Additionally, provide the necessary properties for the generic S500
> ethernet node in order to setup PHY and MDIO.
> 
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
> ---
>  arch/arm/boot/dts/owl-s500-roseapplepi.dts | 56 ++++++++++++++++++++++
>  1 file changed, 56 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/owl-s500-roseapplepi.dts b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
> index b8c5db2344aa..bffabc7eaa50 100644
> --- a/arch/arm/boot/dts/owl-s500-roseapplepi.dts
> +++ b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
> @@ -225,6 +225,38 @@ bias1-pinconf {
>  			bias-pull-down;
>  		};
>  	};
> +
> +	ethernet_pins: ethernet-pins {
> +		txd01-pinmux {
> +			groups = "rmii_txd0_mfp", "rmii_txd1_mfp";
> +			function = "eth_rmii";
> +		};
> +
> +		rxd01-pinmux {
> +			groups = "rmii_rxd0_mfp", "rmii_rxd1_mfp";
> +			function = "eth_rmii";
> +		};
> +
> +		txen_rxer-pinmux {
> +			groups = "rmii_txen_mfp", "rmii_rxen_mfp";
> +			function = "eth_rmii";
> +		};
> +
> +		crs_dv_ref_clk-pinmux {
> +			groups = "rmii_crs_dv_mfp", "rmii_ref_clk_mfp";
> +			function = "eth_rmii";

Since the function is same, just club all the groups together.

> +		};
> +
> +		ref_clk-pinconf {
> +			groups = "rmii_ref_clk_drv";
> +			drive-strength = <2>;
> +		};
> +
> +		phy_clk-pinmux {
> +			groups = "clko_25m_mfp";
> +			function = "clko_25m";
> +		};

Move this above node pinconf.

> +	};
>  };
>  
>  /* uSD */
> @@ -241,6 +273,30 @@ &mmc0 {
>  	vqmmc-supply = <&sd_vcc>;
>  };
>  
> +&ethernet {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&ethernet_pins>;
> +	phy-mode = "rmii";
> +	phy-handle = <&eth_phy>;
> +	status = "okay";
> +
> +	mdio {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		reset-gpios = <&pinctrl 88 GPIO_ACTIVE_LOW>; /* GPIOC24 */
> +		reset-delay-us = <10000>;
> +		reset-post-delay-us = <150000>;

reset-* properties belong to "ethernet-phy" node. Also, while adding new nodes
please run the dtbs_check and try to address the warnings.

Thanks,
Mani

> +
> +		eth_phy: ethernet-phy@3 {
> +			reg = <0x3>;
> +			max-speed = <100>;
> +			interrupt-parent = <&sirq>;
> +			interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> +		};
> +	};
> +};
> +
>  &twd_timer {
>  	status = "okay";
>  };
> -- 
> 2.32.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-06-11  5:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 21:09 [PATCH 0/2] Add Ethernet DTS for Actions Semi Owl S500 SoCs Cristian Ciocaltea
2021-06-10 21:09 ` Cristian Ciocaltea
2021-06-10 21:09 ` [PATCH 1/2] ARM: dts: owl-s500: Add ethernet support Cristian Ciocaltea
2021-06-10 21:09   ` Cristian Ciocaltea
2021-06-11  6:00   ` Manivannan Sadhasivam
2021-06-11  6:00     ` Manivannan Sadhasivam
2021-06-10 21:09 ` [PATCH 2/2] ARM: dts: owl-s500-roseapplepi: " Cristian Ciocaltea
2021-06-10 21:09   ` Cristian Ciocaltea
2021-06-11  5:56   ` Manivannan Sadhasivam [this message]
2021-06-11  5:56     ` Manivannan Sadhasivam
2021-06-11  6:31     ` Cristian Ciocaltea
2021-06-11  6:31       ` Cristian Ciocaltea
2021-06-11  6:39       ` Manivannan Sadhasivam
2021-06-11  6:39         ` Manivannan Sadhasivam
2021-06-11  7:14         ` Cristian Ciocaltea
2021-06-11  7:14           ` Cristian Ciocaltea
2021-06-28  7:28 [PATCH 0/2] ARM: Actions updates for v5.14 Manivannan Sadhasivam
2021-06-28  7:28 ` [PATCH 2/2] ARM: dts: owl-s500-roseapplepi: Add ethernet support Manivannan Sadhasivam

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=20210611055606.GB6950@thinkpad \
    --to=mani@kernel.org \
    --cc=afaerber@suse.de \
    --cc=cristian.ciocaltea@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-actions@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.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.