linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] DT: marvell,mmp2: add MMC controllers
@ 2018-09-10 12:02 Lubomir Rintel
  2018-09-10 15:14 ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Lubomir Rintel @ 2018-09-10 12:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: devicetree, linux-arm-kernel, Eric Miao, Haojian Zhuang,
	Rob Herring, Mark Rutland, Lubomir Rintel

There's apparently four of them on a MMP2.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 arch/arm/boot/dts/mmp2.dtsi | 40 +++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi
index 766bbb8495b6..51d4a2d70db9 100644
--- a/arch/arm/boot/dts/mmp2.dtsi
+++ b/arch/arm/boot/dts/mmp2.dtsi
@@ -18,6 +18,10 @@
 		serial3 = &uart4;
 		i2c0 = &twsi1;
 		i2c1 = &twsi2;
+		sdhci0 = &mmc1;
+		sdhci1 = &mmc2;
+		sdhci2 = &mmc3;
+		sdhci3 = &mmc4;
 	};
 
 	soc {
@@ -239,6 +243,42 @@
 				resets = <&soc_clocks MMP2_CLK_RTC>;
 				status = "disabled";
 			};
+
+			mmc1: mmc@d4280000 {
+				compatible = "mrvl,pxav3-mmc";
+				reg = <0xd4280000 0x120>;
+				clocks = <&soc_clocks MMP2_CLK_SDH0>;
+				clock-names = "io";
+				interrupts = <39>;
+				status = "disabled";
+			};
+
+			mmc2: mmc@d4280800 {
+				compatible = "mrvl,pxav3-mmc";
+				reg = <0xd4280800 0x120>;
+				clocks = <&soc_clocks MMP2_CLK_SDH1>;
+				clock-names = "io";
+				interrupts = <52>;
+				status = "disabled";
+			};
+
+			mmc3: mmc@d4281000 {
+				compatible = "mrvl,pxav3-mmc";
+				reg = <0xd4281000 0x120>;
+				clocks = <&soc_clocks MMP2_CLK_SDH2>;
+				clock-names = "io";
+				interrupts = <53>;
+				status = "disabled";
+			};
+
+			mmc4: mmc@d4288000 {
+				compatible = "mrvl,pxav3-mmc";
+				reg = <0xd4281800 0x120>;
+				clocks = <&soc_clocks MMP2_CLK_SDH3>;
+				clock-names = "io";
+				interrupts = <54>;
+				status = "disabled";
+			};
 		};
 
 		soc_clocks: clocks{
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] DT: marvell,mmp2: add MMC controllers
  2018-09-10 12:02 [PATCH] DT: marvell,mmp2: add MMC controllers Lubomir Rintel
@ 2018-09-10 15:14 ` Rob Herring
  2018-09-11 12:55   ` Lubomir Rintel
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2018-09-10 15:14 UTC (permalink / raw)
  To: lkundrak
  Cc: linux-kernel, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Eric Miao, Haojian Zhuang, Mark Rutland

On Mon, Sep 10, 2018 at 7:02 AM Lubomir Rintel <lkundrak@v3.sk> wrote:
>
> There's apparently four of them on a MMP2.
>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
>  arch/arm/boot/dts/mmp2.dtsi | 40 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi
> index 766bbb8495b6..51d4a2d70db9 100644
> --- a/arch/arm/boot/dts/mmp2.dtsi
> +++ b/arch/arm/boot/dts/mmp2.dtsi
> @@ -18,6 +18,10 @@
>                 serial3 = &uart4;
>                 i2c0 = &twsi1;
>                 i2c1 = &twsi2;
> +               sdhci0 = &mmc1;
> +               sdhci1 = &mmc2;
> +               sdhci2 = &mmc3;
> +               sdhci3 = &mmc4;

Please drop this. MMC nodes don't need an alias and if they did,
"sdhci" wouldn't be the name.

Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] DT: marvell,mmp2: add MMC controllers
  2018-09-10 15:14 ` Rob Herring
@ 2018-09-11 12:55   ` Lubomir Rintel
  2018-09-11 13:23     ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Lubomir Rintel @ 2018-09-11 12:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-kernel, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Eric Miao, Haojian Zhuang, Mark Rutland

On Mon, 2018-09-10 at 10:14 -0500, Rob Herring wrote:
> On Mon, Sep 10, 2018 at 7:02 AM Lubomir Rintel <lkundrak@v3.sk>
> wrote:
> > 
> > There's apparently four of them on a MMP2.
> > 
> > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > ---
> >  arch/arm/boot/dts/mmp2.dtsi | 40
> > +++++++++++++++++++++++++++++++++++++
> >  1 file changed, 40 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/mmp2.dtsi
> > b/arch/arm/boot/dts/mmp2.dtsi
> > index 766bbb8495b6..51d4a2d70db9 100644
> > --- a/arch/arm/boot/dts/mmp2.dtsi
> > +++ b/arch/arm/boot/dts/mmp2.dtsi
> > @@ -18,6 +18,10 @@
> >                 serial3 = &uart4;
> >                 i2c0 = &twsi1;
> >                 i2c1 = &twsi2;
> > +               sdhci0 = &mmc1;
> > +               sdhci1 = &mmc2;
> > +               sdhci2 = &mmc3;
> > +               sdhci3 = &mmc4;
> 
> Please drop this. MMC nodes don't need an alias and if they did,
> "sdhci" wouldn't be the name.

Will do. I essentially just cargo-culted this, because I had no idea
which devices need aliases. How do I decide whether an alias is needed?

> 
> Rob

Thank you,
Lubo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] DT: marvell,mmp2: add MMC controllers
  2018-09-11 12:55   ` Lubomir Rintel
@ 2018-09-11 13:23     ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2018-09-11 13:23 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: linux-kernel, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Eric Miao, Haojian Zhuang, Mark Rutland

On Tue, Sep 11, 2018 at 7:55 AM Lubomir Rintel <lkundrak@v3.sk> wrote:
>
> On Mon, 2018-09-10 at 10:14 -0500, Rob Herring wrote:
> > On Mon, Sep 10, 2018 at 7:02 AM Lubomir Rintel <lkundrak@v3.sk>
> > wrote:
> > >
> > > There's apparently four of them on a MMP2.
> > >
> > > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > > ---
> > >  arch/arm/boot/dts/mmp2.dtsi | 40
> > > +++++++++++++++++++++++++++++++++++++
> > >  1 file changed, 40 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/mmp2.dtsi
> > > b/arch/arm/boot/dts/mmp2.dtsi
> > > index 766bbb8495b6..51d4a2d70db9 100644
> > > --- a/arch/arm/boot/dts/mmp2.dtsi
> > > +++ b/arch/arm/boot/dts/mmp2.dtsi
> > > @@ -18,6 +18,10 @@
> > >                 serial3 = &uart4;
> > >                 i2c0 = &twsi1;
> > >                 i2c1 = &twsi2;
> > > +               sdhci0 = &mmc1;
> > > +               sdhci1 = &mmc2;
> > > +               sdhci2 = &mmc3;
> > > +               sdhci3 = &mmc4;
> >
> > Please drop this. MMC nodes don't need an alias and if they did,
> > "sdhci" wouldn't be the name.
>
> Will do. I essentially just cargo-culted this, because I had no idea
> which devices need aliases. How do I decide whether an alias is needed?

Add them when you find that you actually need them.

Serial to get stable tty names. It used to be for the console too, but
stdout-path property should be used instead.
ethernet for u-boot to determine which interface to net boot from (IIRC).
i2c and spi are also for stable /dev names, but that should be handled
another way IMO. You can find discussions about it in the archives.

Anything else is probably questionable.

Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-11 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-10 12:02 [PATCH] DT: marvell,mmp2: add MMC controllers Lubomir Rintel
2018-09-10 15:14 ` Rob Herring
2018-09-11 12:55   ` Lubomir Rintel
2018-09-11 13:23     ` Rob Herring

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).