mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Y.b. Lu" <yangbo.lu@nxp.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Michael Walle <michael@walle.cc>, Shawn Guo <shawnguo@kernel.org>,
	Leo Li <leoyang.li@nxp.com>, Rob Herring <robh+dt@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ashish Kumar <ashish.kumar@nxp.com>
Subject: RE: [PATCH] arm64: dts: ls1028a: make the eMMC and SD card controllers use fixed indices
Date: Tue, 24 Nov 2020 11:15:19 +0000	[thread overview]
Message-ID: <AM7PR04MB688567CA698191E2DB73DEF5F8FB0@AM7PR04MB6885.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20201124103128.zucizod344dgme4o@skbuf>

Hi Vladimir,

> -----Original Message-----
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> Sent: Tuesday, November 24, 2020 6:31 PM
> To: Y.b. Lu <yangbo.lu@nxp.com>
> Cc: Michael Walle <michael@walle.cc>; Shawn Guo <shawnguo@kernel.org>;
> Leo Li <leoyang.li@nxp.com>; Rob Herring <robh+dt@kernel.org>;
> linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org; Adrian
> Hunter <adrian.hunter@intel.com>; Ulf Hansson <ulf.hansson@linaro.org>;
> linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org; Ashish Kumar
> <ashish.kumar@nxp.com>
> Subject: Re: [PATCH] arm64: dts: ls1028a: make the eMMC and SD card
> controllers use fixed indices
> 
> Hi Yangbo,
> 
> On Tue, Nov 24, 2020 at 09:02:57AM +0000, Y.b. Lu wrote:
> > > Am 2020-11-24 09:47, schrieb Y.b. Lu:
> > > > Hi Michael,
> > > >> > I don't think it's a problem in board dts to define board specific
> > > >> > thing, like re-defining alias, and disabling any IP it not using.
> > > >>
> > > >> First, why would you put it in the architecture include anyway? That
> > > >> is really board-specific. That is like you would say, we enable all
> > > >> devices and a board could potentially disable it. TBH it seems that
> > > >> this will fit your reference boards and you don't care about the
> > > >> other ones which uses that include.
> > > >
> > > > In soc dtsi, this is giving default alias for two esdhc controllers.
> > > > This is not board specific.
> > > > That's natural esdhc0 is mmc0 and esdhc1 is mmc1.
> > >
> > > How could this be not board specific if there are at least three
> > > different use cases the board can choose from - and needs three
> > > different configurations:
> > >
> > > (1) eMMC at /dev/mmcblk0, SD card at /dev/mmcblk1
> > > (2) SD card at /dev/mmcblk0, eMMC at /dev/mmcblk1
> > > (3) no eMMC at all, SD card at /dev/mmcblk0
> >
> > Not matter it's SD card or eMMC card, if it's on esdhc0, use /dev/mmcblk0.
> > Not matter it's SD card or eMMC card, if it's on esdhc1, use /dev/mmcblk1.
> 
> With the note here that you can't actually connect an SD card to eSDHC1,
> due to the lack of pins for CD/WP.

CD/WP is not essential to support SD card. Both SD/eMMC are supported on both eSDHC controllers.

> 
> > It's not related to board and card type, it's only related to esdhc interface in
> use.
> 
> I understand the hardware-centric view that you are coming from. It may
> be natural for you that eSDHC0 is for the SD card and eSDHC1 is for eMMC,
> because these are the designations in the SoC.

Right, from hardware-centric view, it's natural esdhc0 interface is mmc0, and esdhc1 is mmc1.
That's what I explained for why I added the alias in common soc dtsi.


> 
> But it is also natural for a customer to define the indices according to
> their schematics and what they use. If, say, there is a board that only
> uses eMMC, I would expect that for the lay person, no one would even bat
> an eye if that was called /dev/mmcblk0. Whereas, if it was called
> /dev/mmcblk1 (and there was no /dev/mmcblk0 in the system), maybe you'd
> have to come up with some explanations which could be avoided.

To make a product friendly to users, it makes sense to define different alias for controller in board dts.
But it's not the reason to remove the default/natural alias in soc dtsi for two controllers.
What needs to be done after removing them? Add the same to all other board files?

This is just my opinion. I don't decide on this:)

> 
> I am only a passerby when it comes to the MMC subsystem. But in
> networking/DSA, it is frequent that the board designer comes up with
> their own numbering scheme, which has nothing to do with the numbering
> of the chip. Consider this extreme case from
> arch/arm/boot/dts/ls1021a-tsn.dts:
> 
> 	sja1105: ethernet-switch@1 {
> 		ports {
> 			port@0 {
> 				/* ETH5 written on chassis */
> 				label = "swp5";
> 			};
> 
> 			port@1 {
> 				/* ETH2 written on chassis */
> 				label = "swp2";
> 			};
> 
> 			port@2 {
> 				/* ETH3 written on chassis */
> 				label = "swp3";
> 			};
> 
> 			port@3 {
> 				/* ETH4 written on chassis */
> 				label = "swp4";
> 			};
> 		};
> 	};
> 
> You just have to go along with how the hardware is being used in the
> product. I could have insisted that hardware switch port 0 is named as
> swp0, but that would have not helped anybody.




  reply	other threads:[~2020-11-24 11:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 15:50 Vladimir Oltean
2020-11-19 16:08 ` Michael Walle
2020-11-19 16:32   ` Vladimir Oltean
2020-11-20  2:04 ` Y.b. Lu
2020-11-20  9:30   ` Vladimir Oltean
2020-11-23 11:09     ` Michael Walle
2020-11-24  7:41     ` Y.b. Lu
2020-11-24  8:03       ` Michael Walle
2020-11-24  8:47         ` Y.b. Lu
2020-11-24  8:55           ` Michael Walle
2020-11-24  9:02             ` Y.b. Lu
2020-11-24  9:08               ` Michael Walle
2020-11-24  9:22                 ` Y.b. Lu
2020-11-24  9:43                   ` Michael Walle
2020-11-24 10:22                     ` Y.b. Lu
2020-11-24 10:31               ` Vladimir Oltean
2020-11-24 11:15                 ` Y.b. Lu [this message]
2020-11-24 11:28                   ` Vladimir Oltean
2020-11-25  2:59                     ` Y.b. Lu
2020-11-25  8:25                       ` Michael Walle
2020-11-30 14:29                         ` Shawn Guo
2020-12-01  2:38                           ` Y.b. Lu

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=AM7PR04MB688567CA698191E2DB73DEF5F8FB0@AM7PR04MB6885.eurprd04.prod.outlook.com \
    --to=yangbo.lu@nxp.com \
    --cc=adrian.hunter@intel.com \
    --cc=ashish.kumar@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vladimir.oltean@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®