* [PATCH] arm64: dts: marvell: add NAND support on the 8040-DB board
@ 2017-11-06 22:28 Miquel Raynal
[not found] ` <20171106222823.3442-1-miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Miquel Raynal @ 2017-11-06 22:28 UTC (permalink / raw)
To: Gregory Clement, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth
Cc: Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
devicetree-u79uwXL29TY76Z2rM5mHXA
Add NAND support on the Armada-8040-DB by adding the same tree as for
the Armada-7040-DB by using the same compatible string
"marvell,armada-8k-nand".
Do not enable the NAND node as enabling it (and changing manually the
proper DPR-76 switch) would disable MDIO from CP1 (and thus disable CPS
Ethernet PHY).
Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
arch/arm64/boot/dts/marvell/armada-8040-db.dts | 28 ++++++++++++++++++++++
arch/arm64/boot/dts/marvell/armada-80x0.dtsi | 17 +++++++++++++
.../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 3 ++-
3 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
index 0d7b2ae46610..1c4b4e9137e8 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
@@ -216,6 +216,34 @@
clock-frequency = <100000>;
};
+/*
+ * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
+ * MDIO signal of CP1.
+ */
+&cps_nand {
+ num-cs = <1>;
+ pinctrl-0 = <&nand_pins>, <&nand_rb>;
+ pinctrl-names = "default";
+ nand-ecc-strength = <4>;
+ nand-ecc-step-size = <512>;
+ marvell,nand-enable-arbiter;
+ marvell,system-controller = <&cps_syscon0>;
+ nand-on-flash-bbt;
+
+ partition@0 {
+ label = "U-Boot";
+ reg = <0 0x200000>;
+ };
+ partition@200000 {
+ label = "Linux";
+ reg = <0x200000 0xe00000>;
+ };
+ partition@1000000 {
+ label = "Filesystem";
+ reg = <0x1000000 0x3f000000>;
+ };
+};
+
/* CON4 on CP1 expansion */
&cps_sata0 {
status = "okay";
diff --git a/arch/arm64/boot/dts/marvell/armada-80x0.dtsi b/arch/arm64/boot/dts/marvell/armada-80x0.dtsi
index 666ebe96ba0d..b280ddd3c397 100644
--- a/arch/arm64/boot/dts/marvell/armada-80x0.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-80x0.dtsi
@@ -72,5 +72,22 @@
&cps_syscon0 {
cps_pinctrl: pinctrl {
compatible = "marvell,armada-8k-cps-pinctrl";
+
+ nand_pins: nand-pins {
+ marvell,pins =
+ "mpp0", "mpp1", "mpp2", "mpp3",
+ "mpp4", "mpp5", "mpp6", "mpp7",
+ "mpp8", "mpp9", "mpp10", "mpp11",
+ "mpp15", "mpp16", "mpp17", "mpp18",
+ "mpp19", "mpp20", "mpp21", "mpp22",
+ "mpp23", "mpp24", "mpp25", "mpp26",
+ "mpp27";
+ marvell,function = "dev";
+ };
+
+ nand_rb: nand-rb {
+ marvell,pins = "mpp13", "mpp12";
+ marvell,function = "nf";
+ };
};
};
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
index b71ee6c83668..64663f3f4dfe 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
@@ -275,12 +275,13 @@
* this controller is only usable on the CPM
* for A7K and on the CPS for A8K.
*/
- compatible = "marvell,armada370-nand";
+ compatible = "marvell,armada-8k-nand";
reg = <0x720000 0x54>;
#address-cells = <1>;
#size-cells = <1>;
interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cps_clk 1 2>;
+ marvell,system-controller = <&cpm_syscon0>;
status = "disabled";
};
--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <20171106222823.3442-1-miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>]
* Re: [PATCH] arm64: dts: marvell: add NAND support on the 8040-DB board [not found] ` <20171106222823.3442-1-miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> @ 2017-12-15 10:24 ` Gregory CLEMENT 0 siblings, 0 replies; 2+ messages in thread From: Gregory CLEMENT @ 2017-12-15 10:24 UTC (permalink / raw) To: Miquel Raynal Cc: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Thomas Petazzoni, Antoine Tenart, Nadav Haklai, devicetree-u79uwXL29TY76Z2rM5mHXA Hi Miquel, On lun., nov. 06 2017, Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote: > Add NAND support on the Armada-8040-DB by adding the same tree as for > the Armada-7040-DB by using the same compatible string > "marvell,armada-8k-nand". > > Do not enable the NAND node as enabling it (and changing manually the > proper DPR-76 switch) would disable MDIO from CP1 (and thus disable CPS > Ethernet PHY). > > Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> Applied on mvebu/dt64 Thanks, Gregory > --- > arch/arm64/boot/dts/marvell/armada-8040-db.dts | 28 ++++++++++++++++++++++ > arch/arm64/boot/dts/marvell/armada-80x0.dtsi | 17 +++++++++++++ > .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 3 ++- > 3 files changed, 47 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts > index 0d7b2ae46610..1c4b4e9137e8 100644 > --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts > +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts > @@ -216,6 +216,34 @@ > clock-frequency = <100000>; > }; > > +/* > + * Proper NAND usage will require DPR-76 to be in position 1-2, which disables > + * MDIO signal of CP1. > + */ > +&cps_nand { > + num-cs = <1>; > + pinctrl-0 = <&nand_pins>, <&nand_rb>; > + pinctrl-names = "default"; > + nand-ecc-strength = <4>; > + nand-ecc-step-size = <512>; > + marvell,nand-enable-arbiter; > + marvell,system-controller = <&cps_syscon0>; > + nand-on-flash-bbt; > + > + partition@0 { > + label = "U-Boot"; > + reg = <0 0x200000>; > + }; > + partition@200000 { > + label = "Linux"; > + reg = <0x200000 0xe00000>; > + }; > + partition@1000000 { > + label = "Filesystem"; > + reg = <0x1000000 0x3f000000>; > + }; > +}; > + > /* CON4 on CP1 expansion */ > &cps_sata0 { > status = "okay"; > diff --git a/arch/arm64/boot/dts/marvell/armada-80x0.dtsi b/arch/arm64/boot/dts/marvell/armada-80x0.dtsi > index 666ebe96ba0d..b280ddd3c397 100644 > --- a/arch/arm64/boot/dts/marvell/armada-80x0.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-80x0.dtsi > @@ -72,5 +72,22 @@ > &cps_syscon0 { > cps_pinctrl: pinctrl { > compatible = "marvell,armada-8k-cps-pinctrl"; > + > + nand_pins: nand-pins { > + marvell,pins = > + "mpp0", "mpp1", "mpp2", "mpp3", > + "mpp4", "mpp5", "mpp6", "mpp7", > + "mpp8", "mpp9", "mpp10", "mpp11", > + "mpp15", "mpp16", "mpp17", "mpp18", > + "mpp19", "mpp20", "mpp21", "mpp22", > + "mpp23", "mpp24", "mpp25", "mpp26", > + "mpp27"; > + marvell,function = "dev"; > + }; > + > + nand_rb: nand-rb { > + marvell,pins = "mpp13", "mpp12"; > + marvell,function = "nf"; > + }; > }; > }; > diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi > index b71ee6c83668..64663f3f4dfe 100644 > --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi > @@ -275,12 +275,13 @@ > * this controller is only usable on the CPM > * for A7K and on the CPS for A8K. > */ > - compatible = "marvell,armada370-nand"; > + compatible = "marvell,armada-8k-nand"; > reg = <0x720000 0x54>; > #address-cells = <1>; > #size-cells = <1>; > interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>; > clocks = <&cps_clk 1 2>; > + marvell,system-controller = <&cpm_syscon0>; > status = "disabled"; > }; > > -- > 2.11.0 > -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-15 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-06 22:28 [PATCH] arm64: dts: marvell: add NAND support on the 8040-DB board Miquel Raynal
[not found] ` <20171106222823.3442-1-miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-12-15 10:24 ` Gregory CLEMENT
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).