All of lore.kernel.org
 help / color / mirror / Atom feed
From: "N, Mugunthan V" <mugunthanvnm@ti.com>
To: "Cousson, Benoit" <b-cousson@ti.com>,
	"Hiremath, Vaibhav" <hvaibhav@ti.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"paul@pwsan.com" <paul@pwsan.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Richard Cochran <richardcochran@gmail.com>
Subject: RE: [PATCH 4/4] arm/dts: am33xx: Add CPSW and MDIO module nodes for AM33XX
Date: Fri, 2 Nov 2012 08:46:46 +0000	[thread overview]
Message-ID: <EB1619762EAF8B4E97A227FB77B7E0293EA08F53@DBDE01.ent.ti.com> (raw)
In-Reply-To: <50914107.2090909@ti.com>

> -----Original Message-----
> From: Cousson, Benoit
> Sent: Wednesday, October 31, 2012 8:47 PM
> To: Hiremath, Vaibhav
> Cc: netdev@vger.kernel.org; paul@pwsan.com; linux-arm-
> kernel@lists.infradead.org; linux-omap@vger.kernel.org; N, Mugunthan V;
> Richard Cochran
> Subject: Re: [PATCH 4/4] arm/dts: am33xx: Add CPSW and MDIO module
> nodes for AM33XX
> > +			compatible = "ti,cpsw";
> > +			ti,hwmods = "cpgmac0";
> > +			cpdma_channels = <8>;
> > +			host_port_no = <0>;
> > +			cpdma_reg_ofs = <0x800>;
> > +			cpdma_sram_ofs = <0xa00>;
> > +			ale_reg_ofs = <0xd00>;
> > +			ale_entries = <1024>;
> > +			host_port_reg_ofs = <0x108>;
> > +			hw_stats_reg_ofs = <0x900>;
> > +			bd_ram_ofs = <0x2000>;
> > +			bd_ram_size = <0x2000>;
> > +			no_bd_ram = <0>;
> > +			rx_descs = <64>;
> > +			mac_control = <0x20>;
> 
> Do you have to store all these data in the DTS? Cannot it be in the
> driver?
> 
> Do you expect to have several instance of the same IP with different
> parameters here?

Though CPSW is a single IP in AM335X, CPSW has sub modules like CPDMA, ALE,
SLIVER, CPTS and SLAVES where is IP integrator can locate it at different
offsets. For example comparing the CPSW ip in TI814X and AM335X all the
above offsets are changed. So I have kept all these offsets in DT as driver
should not hold any SoC related informations

> > +			cpsw_emac0: slave@0 {
> 
> Mmm, you are using some address later and here some relative number,
> that does not looks very consistent.
> 
> > +				slave_reg_ofs = <0x208>;
> 
> Is it an offset from 4a100000? Cannot you use the address for the slave
> name?
> 
> Something like that: cpsw_emac0: slave@4a100208
> 

I have followed the naming convention as per the TRM which is mentioned as
Slave 0 and Slave 1 and its offset is from 0x4a100000. I have taken the
reference from  arch/arm/boot/dts/picoxcell-pc3x2.dtsi+167 and followed
the same naming convention from TRM. There is one more method to implement
in reference from arch/arm/boot/dts/imx6q.dtsi+408 as below

+			cpsw_emac0: slave@208 {
+				slave_reg_ofs = <0x208>;
+				sliver_reg_ofs = <0xd80>;
+				/* Filled in by U-Boot */
+				mac-address = [ 00 00 00 00 00 00 ];
+			};

Regards
Mugunthan V N 


WARNING: multiple messages have this Message-ID (diff)
From: mugunthanvnm@ti.com (N, Mugunthan V)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] arm/dts: am33xx: Add CPSW and MDIO module nodes for AM33XX
Date: Fri, 2 Nov 2012 08:46:46 +0000	[thread overview]
Message-ID: <EB1619762EAF8B4E97A227FB77B7E0293EA08F53@DBDE01.ent.ti.com> (raw)
In-Reply-To: <50914107.2090909@ti.com>

> -----Original Message-----
> From: Cousson, Benoit
> Sent: Wednesday, October 31, 2012 8:47 PM
> To: Hiremath, Vaibhav
> Cc: netdev at vger.kernel.org; paul at pwsan.com; linux-arm-
> kernel at lists.infradead.org; linux-omap at vger.kernel.org; N, Mugunthan V;
> Richard Cochran
> Subject: Re: [PATCH 4/4] arm/dts: am33xx: Add CPSW and MDIO module
> nodes for AM33XX
> > +			compatible = "ti,cpsw";
> > +			ti,hwmods = "cpgmac0";
> > +			cpdma_channels = <8>;
> > +			host_port_no = <0>;
> > +			cpdma_reg_ofs = <0x800>;
> > +			cpdma_sram_ofs = <0xa00>;
> > +			ale_reg_ofs = <0xd00>;
> > +			ale_entries = <1024>;
> > +			host_port_reg_ofs = <0x108>;
> > +			hw_stats_reg_ofs = <0x900>;
> > +			bd_ram_ofs = <0x2000>;
> > +			bd_ram_size = <0x2000>;
> > +			no_bd_ram = <0>;
> > +			rx_descs = <64>;
> > +			mac_control = <0x20>;
> 
> Do you have to store all these data in the DTS? Cannot it be in the
> driver?
> 
> Do you expect to have several instance of the same IP with different
> parameters here?

Though CPSW is a single IP in AM335X, CPSW has sub modules like CPDMA, ALE,
SLIVER, CPTS and SLAVES where is IP integrator can locate it at different
offsets. For example comparing the CPSW ip in TI814X and AM335X all the
above offsets are changed. So I have kept all these offsets in DT as driver
should not hold any SoC related informations

> > +			cpsw_emac0: slave at 0 {
> 
> Mmm, you are using some address later and here some relative number,
> that does not looks very consistent.
> 
> > +				slave_reg_ofs = <0x208>;
> 
> Is it an offset from 4a100000? Cannot you use the address for the slave
> name?
> 
> Something like that: cpsw_emac0: slave at 4a100208
> 

I have followed the naming convention as per the TRM which is mentioned as
Slave 0 and Slave 1 and its offset is from 0x4a100000. I have taken the
reference from  arch/arm/boot/dts/picoxcell-pc3x2.dtsi+167 and followed
the same naming convention from TRM. There is one more method to implement
in reference from arch/arm/boot/dts/imx6q.dtsi+408 as below

+			cpsw_emac0: slave at 208 {
+				slave_reg_ofs = <0x208>;
+				sliver_reg_ofs = <0xd80>;
+				/* Filled in by U-Boot */
+				mac-address = [ 00 00 00 00 00 00 ];
+			};

Regards
Mugunthan V N 

  parent reply	other threads:[~2012-11-02  8:46 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29  8:21 # (c) 2007, Joe Perches <joe@perches.com> Vaibhav Hiremath
2012-10-29  8:21 ` Vaibhav Hiremath
2012-10-29  8:21 ` Vaibhav Hiremath
2012-10-29  8:21 ` [PATCH-V2 0/4] ARM: AM33XX: net: Add DT support to CPGMAC and MDIO driver Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-29  8:33   ` Richard Cochran
2012-10-29  8:33     ` Richard Cochran
2012-10-29  8:21 ` [PATCH 1/4] net: davinci_mdio: Fix typo mistake in calling runtime-pm api Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-30 21:33   ` Peter Korsgaard
2012-10-30 21:33     ` Peter Korsgaard
2012-10-30 21:33     ` Peter Korsgaard
2012-10-29  8:21 ` [PATCH 2/4] net: cpsw: Add parent<->child relation support between cpsw and mdio Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-30 21:34   ` Peter Korsgaard
2012-10-30 21:34     ` Peter Korsgaard
2012-10-30 21:34     ` Peter Korsgaard
2012-10-29  8:21 ` [PATCH 3/4] ARM: OMAP3+: hwmod: Add AM33XX HWMOD data for davinci_mdio module Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-30 21:35   ` Peter Korsgaard
2012-10-30 21:35     ` Peter Korsgaard
2012-10-30 21:35     ` Peter Korsgaard
2012-10-29  8:21 ` [PATCH 4/4] arm/dts: am33xx: Add CPSW and MDIO module nodes for AM33XX Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-29  8:21   ` Vaibhav Hiremath
2012-10-30 21:35   ` Peter Korsgaard
2012-10-30 21:35     ` Peter Korsgaard
2012-10-30 21:35     ` Peter Korsgaard
2012-10-31 15:17   ` Benoit Cousson
2012-10-31 15:17     ` Benoit Cousson
2012-10-31 15:17     ` Benoit Cousson
2012-10-31 19:52     ` Hiremath, Vaibhav
2012-10-31 19:52       ` Hiremath, Vaibhav
2012-11-01  7:45     ` Richard Cochran
2012-11-01  7:45       ` Richard Cochran
2012-11-01  9:28       ` Cousson, Benoit
2012-11-01  9:28         ` Cousson, Benoit
2012-11-01  9:28         ` Cousson, Benoit
2012-11-03 17:45         ` [PATCH RFC net-next 0/1] Simplify the CPSW DT Richard Cochran
2012-11-03 17:45           ` Richard Cochran
2012-11-03 17:45           ` Richard Cochran
2012-11-03 17:45           ` [PATCH RFC net-next 1/1] cpsw: simplify the setup of the register pointers Richard Cochran
2012-11-03 17:45             ` Richard Cochran
2012-11-03 17:45             ` Richard Cochran
2012-11-02  8:46     ` N, Mugunthan V [this message]
2012-11-02  8:46       ` [PATCH 4/4] arm/dts: am33xx: Add CPSW and MDIO module nodes for AM33XX N, Mugunthan V
2012-11-02  8:56       ` Richard Cochran
2012-11-02  8:56         ` Richard Cochran
2012-11-02 10:42         ` N, Mugunthan V
2012-11-02 10:42           ` N, Mugunthan V
2012-11-02 15:19           ` Richard Cochran
2012-11-02 15:19             ` Richard Cochran
2012-11-08 12:59     ` Mugunthan V N
2012-11-08 12:59       ` Mugunthan V N
2012-11-08 12:59       ` Mugunthan V N
2012-10-29  9:25 ` # (c) 2007, Joe Perches <joe@perches.com> Vaibhav Hiremath
2012-10-29  9:25   ` Vaibhav Hiremath
2012-10-29  9:25   ` Vaibhav Hiremath

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=EB1619762EAF8B4E97A227FB77B7E0293EA08F53@DBDE01.ent.ti.com \
    --to=mugunthanvnm@ti.com \
    --cc=b-cousson@ti.com \
    --cc=hvaibhav@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=richardcochran@gmail.com \
    /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.