Re: [U-Boot] [PATCH v1 2/9] arm: dts: imx7: colibri: split dt for raw NAND and eMMC devices
On Mon, 2019-01-07 at 17:33 +0100, Stefan Agner wrote: > On 07.01.2019 00:18, Marcel Ziswiler wrote: > > On Sun, 2019-01-06 at 22:00 +0100, Stefan Agner wrote: > > > From: Stefan Agner > > > > > > In preparation of adding CONFIG_DM_MMC support use separate > > > device > > > trees for raw NAND and eMMC devices. > > > > > > Signed-off-by: Stefan Agner > > > --- > > > > > > arch/arm/dts/imx7-colibri-emmc.dts| 16 +++ > > > arch/arm/dts/imx7-colibri-rawnand.dts | 46 > > > +++ > > > .../{imx7-colibri.dts => imx7-colibri.dtsi} | 39 +-- > > > - > > > > I believe renaming that one also needs changes in resp. Makefile > > otherwise leading to the following: > > > > make[3]: *** No rule to make target 'arch/arm/dts/imx7- > > colibri.dtb', > > needed by 'dtbs'. Stop. > > Good catch, I definitely need to remove imx7-colibri.dtb there. > > > Plus you may want to add the eMMC one as well e.g. as follows: > > > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > > index dda4e59491..9596b2a64f 100644 > > --- a/arch/arm/dts/Makefile > > +++ b/arch/arm/dts/Makefile > > @@ -458,7 +458,8 @@ dtb-$(CONFIG_MX6UL) += \ > > > > dtb-$(CONFIG_MX6ULL) += imx6ull-14x14-evk.dtb > > > > -dtb-$(CONFIG_MX7) += imx7-colibri.dtb \ > > +dtb-$(CONFIG_MX7) += imx7-colibri-emmc.dtb \ > > + imx7-colibri-rawnand.dtb \ > > imx7d-sdb.dtb \ > > imx7d-sdb-qspi.dtb > > It seems that removing is actually sufficient. dtc/Makefile along > with > CONFIG_OF_EMBED actually builds the device tree specified in the > config > file automatically. Should we still add board device trees to > arch/arm/dts/Makefile? Ah, that's why. I don't see much of an advantage having them all in there then. > @Stefano/ML any preference? > > > > BTW: Remember, I am not too big of a fan of renaming stuff and > > everywhere else we so far did not call anything -rawnand as of yet. > > However, in general I agree that this would be more clear and if > > you do > > clean-up the rest of the world(TM) in a similar fashion I am OK > > with > > it. > > > > I don't _re_name, I just name :-) Yeah, but I do know how a git rename looks like (;-p). So you are cheating just a tiny little bit! > When we had to name the dt's in the > kernel, we did not knew that there will be an eMMC variant. It's a > different start condition here. Sure. > Also mind that device trees are named differently: Since we use the > same > boot loader for i.MX 7S and 7D, I dropped a letter there too... Yep, fully aware of this and fully agree. > IMHO, > renaming the dt in Linux now is too much churn. So I suggest either > leave as is in Kernel and deviate a bit in U-Boot or drop -rawnand in > U-Boot, what do you think? No, I'm fine with it. With the Makefile fixed: Acked-by: Marcel Ziswiler > -- > Stefan > > > > board/toradex/colibri_imx7/MAINTAINERS| 3 ++ > > > configs/colibri_imx7_defconfig| 2 +- > > > 5 files changed, 67 insertions(+), 39 deletions(-) > > > create mode 100644 arch/arm/dts/imx7-colibri-emmc.dts > > > create mode 100644 arch/arm/dts/imx7-colibri-rawnand.dts > > > rename arch/arm/dts/{imx7-colibri.dts => imx7-colibri.dtsi} > > > (65%) > > > > > > diff --git a/arch/arm/dts/imx7-colibri-emmc.dts > > > b/arch/arm/dts/imx7- > > > colibri-emmc.dts > > > new file mode 100644 > > > index 00..295ca05916 > > > --- /dev/null > > > +++ b/arch/arm/dts/imx7-colibri-emmc.dts > > > @@ -0,0 +1,16 @@ > > > +// SPDX-License-Identifier: GPL-2.0+ OR X11 > > > > Don't we rather want GPL-2.0 OR MIT? > > > > > +/* > > > + * Copyright 2019 Toradex AG > > > + */ > > > + > > > +/dts-v1/; > > > +#include "imx7-colibri.dtsi" > > > + > > > +/ { > > > + model = "Toradex Colibri iMX7D 1GB (eMMC)"; > > > + compatible = "toradex,imx7d-colibri-emmc", "fsl,imx7d"; > > > + > > > + chosen { > > > + stdout-path = > > > + }; > > > +}; > > > > I guess the meat-on-the-bone will follow (;-p). > > > > > diff --git a/arch/arm/dts/imx7-colibri-rawnand.dts > > > b/arch/arm/dts/imx7-colibri-rawnand.dts > > > new file mode 100644 > > > index 00..4eb86fb011 > > > --- /dev/null > > > +++ b/arch/arm/dts/imx7-colibri-rawnand.dts > > > @@ -0,0 +1,46 @@ > > > +// SPDX-License-Identifier: GPL-2.0+ OR X11 > > > > Dito. > > > > > +/* > > > + * Copyright 2019 Toradex AG > > > + */ > > > + > > > +/dts-v1/; > > > +#include "imx7-colibri.dtsi" > > > + > > > +/ { > > > + model = "Toradex Colibri iMX7S/D"; > > > + compatible = "toradex,imx7-colibri", "fsl,imx7"; > > > + > > > + chosen { > > > + stdout-path = > > > + }; > > > +}; > > > + > > > + { > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <_gpmi_nand>; > > > + ,use-minimum-ecc; > > > + nand-on-flash-bbt; > > > + -ecc-mode = "hw"; > > > + status = "okay"; > > > +}; > > > + > > > + { > > > + pinctrl_gpmi_nand: gpmi-nand-grp { > > > + fsl,pins = < > > > + MX7D_PAD_SD3_CLK__NAND_CLE
Re: [U-Boot] [PATCH v1 2/9] arm: dts: imx7: colibri: split dt for raw NAND and eMMC devices
On 07.01.2019 00:18, Marcel Ziswiler wrote: > On Sun, 2019-01-06 at 22:00 +0100, Stefan Agner wrote: >> From: Stefan Agner >> >> In preparation of adding CONFIG_DM_MMC support use separate device >> trees for raw NAND and eMMC devices. >> >> Signed-off-by: Stefan Agner >> --- >> >> arch/arm/dts/imx7-colibri-emmc.dts| 16 +++ >> arch/arm/dts/imx7-colibri-rawnand.dts | 46 >> +++ >> .../{imx7-colibri.dts => imx7-colibri.dtsi} | 39 +--- > > I believe renaming that one also needs changes in resp. Makefile > otherwise leading to the following: > > make[3]: *** No rule to make target 'arch/arm/dts/imx7-colibri.dtb', > needed by 'dtbs'. Stop. Good catch, I definitely need to remove imx7-colibri.dtb there. > > Plus you may want to add the eMMC one as well e.g. as follows: > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > index dda4e59491..9596b2a64f 100644 > --- a/arch/arm/dts/Makefile > +++ b/arch/arm/dts/Makefile > @@ -458,7 +458,8 @@ dtb-$(CONFIG_MX6UL) += \ > > dtb-$(CONFIG_MX6ULL) += imx6ull-14x14-evk.dtb > > -dtb-$(CONFIG_MX7) += imx7-colibri.dtb \ > +dtb-$(CONFIG_MX7) += imx7-colibri-emmc.dtb \ > + imx7-colibri-rawnand.dtb \ > imx7d-sdb.dtb \ > imx7d-sdb-qspi.dtb It seems that removing is actually sufficient. dtc/Makefile along with CONFIG_OF_EMBED actually builds the device tree specified in the config file automatically. Should we still add board device trees to arch/arm/dts/Makefile? @Stefano/ML any preference? > > BTW: Remember, I am not too big of a fan of renaming stuff and > everywhere else we so far did not call anything -rawnand as of yet. > However, in general I agree that this would be more clear and if you do > clean-up the rest of the world(TM) in a similar fashion I am OK with > it. > I don't _re_name, I just name :-) When we had to name the dt's in the kernel, we did not knew that there will be an eMMC variant. It's a different start condition here. Also mind that device trees are named differently: Since we use the same boot loader for i.MX 7S and 7D, I dropped a letter there too... IMHO, renaming the dt in Linux now is too much churn. So I suggest either leave as is in Kernel and deviate a bit in U-Boot or drop -rawnand in U-Boot, what do you think? -- Stefan >> board/toradex/colibri_imx7/MAINTAINERS| 3 ++ >> configs/colibri_imx7_defconfig| 2 +- >> 5 files changed, 67 insertions(+), 39 deletions(-) >> create mode 100644 arch/arm/dts/imx7-colibri-emmc.dts >> create mode 100644 arch/arm/dts/imx7-colibri-rawnand.dts >> rename arch/arm/dts/{imx7-colibri.dts => imx7-colibri.dtsi} (65%) >> >> diff --git a/arch/arm/dts/imx7-colibri-emmc.dts b/arch/arm/dts/imx7- >> colibri-emmc.dts >> new file mode 100644 >> index 00..295ca05916 >> --- /dev/null >> +++ b/arch/arm/dts/imx7-colibri-emmc.dts >> @@ -0,0 +1,16 @@ >> +// SPDX-License-Identifier: GPL-2.0+ OR X11 > > Don't we rather want GPL-2.0 OR MIT? > >> +/* >> + * Copyright 2019 Toradex AG >> + */ >> + >> +/dts-v1/; >> +#include "imx7-colibri.dtsi" >> + >> +/ { >> +model = "Toradex Colibri iMX7D 1GB (eMMC)"; >> +compatible = "toradex,imx7d-colibri-emmc", "fsl,imx7d"; >> + >> +chosen { >> +stdout-path = >> +}; >> +}; > > I guess the meat-on-the-bone will follow (;-p). > >> diff --git a/arch/arm/dts/imx7-colibri-rawnand.dts >> b/arch/arm/dts/imx7-colibri-rawnand.dts >> new file mode 100644 >> index 00..4eb86fb011 >> --- /dev/null >> +++ b/arch/arm/dts/imx7-colibri-rawnand.dts >> @@ -0,0 +1,46 @@ >> +// SPDX-License-Identifier: GPL-2.0+ OR X11 > > Dito. > >> +/* >> + * Copyright 2019 Toradex AG >> + */ >> + >> +/dts-v1/; >> +#include "imx7-colibri.dtsi" >> + >> +/ { >> +model = "Toradex Colibri iMX7S/D"; >> +compatible = "toradex,imx7-colibri", "fsl,imx7"; >> + >> +chosen { >> +stdout-path = >> +}; >> +}; >> + >> + { >> +pinctrl-names = "default"; >> +pinctrl-0 = <_gpmi_nand>; >> +,use-minimum-ecc; >> +nand-on-flash-bbt; >> +-ecc-mode = "hw"; >> +status = "okay"; >> +}; >> + >> + { >> +pinctrl_gpmi_nand: gpmi-nand-grp { >> +fsl,pins = < >> +MX7D_PAD_SD3_CLK__NAND_CLE 0x71 >> +MX7D_PAD_SD3_CMD__NAND_ALE 0x71 >> +MX7D_PAD_SAI1_TX_BCLK__NAND_CE0_B 0x71 >> +MX7D_PAD_SAI1_TX_DATA__NAND_READY_B 0x74 >> +MX7D_PAD_SD3_STROBE__NAND_RE_B 0x71 >> +MX7D_PAD_SD3_RESET_B__NAND_WE_B 0x71 >> +MX7D_PAD_SD3_DATA0__NAND_DATA00 0x71 >> +MX7D_PAD_SD3_DATA1__NAND_DATA01 0x71 >> +MX7D_PAD_SD3_DATA2__NAND_DATA02 0x71 >> +MX7D_PAD_SD3_DATA3__NAND_DATA03 0x71 >> +MX7D_PAD_SD3_DATA4__NAND_DATA04 0x71 >> +
Re: [U-Boot] [PATCH v1 2/9] arm: dts: imx7: colibri: split dt for raw NAND and eMMC devices
On Sun, 2019-01-06 at 22:00 +0100, Stefan Agner wrote: > From: Stefan Agner > > In preparation of adding CONFIG_DM_MMC support use separate device > trees for raw NAND and eMMC devices. > > Signed-off-by: Stefan Agner > --- > > arch/arm/dts/imx7-colibri-emmc.dts| 16 +++ > arch/arm/dts/imx7-colibri-rawnand.dts | 46 > +++ > .../{imx7-colibri.dts => imx7-colibri.dtsi} | 39 +--- I believe renaming that one also needs changes in resp. Makefile otherwise leading to the following: make[3]: *** No rule to make target 'arch/arm/dts/imx7-colibri.dtb', needed by 'dtbs'. Stop. Plus you may want to add the eMMC one as well e.g. as follows: diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index dda4e59491..9596b2a64f 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -458,7 +458,8 @@ dtb-$(CONFIG_MX6UL) += \ dtb-$(CONFIG_MX6ULL) += imx6ull-14x14-evk.dtb -dtb-$(CONFIG_MX7) += imx7-colibri.dtb \ +dtb-$(CONFIG_MX7) += imx7-colibri-emmc.dtb \ + imx7-colibri-rawnand.dtb \ imx7d-sdb.dtb \ imx7d-sdb-qspi.dtb BTW: Remember, I am not too big of a fan of renaming stuff and everywhere else we so far did not call anything -rawnand as of yet. However, in general I agree that this would be more clear and if you do clean-up the rest of the world(TM) in a similar fashion I am OK with it. > board/toradex/colibri_imx7/MAINTAINERS| 3 ++ > configs/colibri_imx7_defconfig| 2 +- > 5 files changed, 67 insertions(+), 39 deletions(-) > create mode 100644 arch/arm/dts/imx7-colibri-emmc.dts > create mode 100644 arch/arm/dts/imx7-colibri-rawnand.dts > rename arch/arm/dts/{imx7-colibri.dts => imx7-colibri.dtsi} (65%) > > diff --git a/arch/arm/dts/imx7-colibri-emmc.dts b/arch/arm/dts/imx7- > colibri-emmc.dts > new file mode 100644 > index 00..295ca05916 > --- /dev/null > +++ b/arch/arm/dts/imx7-colibri-emmc.dts > @@ -0,0 +1,16 @@ > +// SPDX-License-Identifier: GPL-2.0+ OR X11 Don't we rather want GPL-2.0 OR MIT? > +/* > + * Copyright 2019 Toradex AG > + */ > + > +/dts-v1/; > +#include "imx7-colibri.dtsi" > + > +/ { > + model = "Toradex Colibri iMX7D 1GB (eMMC)"; > + compatible = "toradex,imx7d-colibri-emmc", "fsl,imx7d"; > + > + chosen { > + stdout-path = > + }; > +}; I guess the meat-on-the-bone will follow (;-p). > diff --git a/arch/arm/dts/imx7-colibri-rawnand.dts > b/arch/arm/dts/imx7-colibri-rawnand.dts > new file mode 100644 > index 00..4eb86fb011 > --- /dev/null > +++ b/arch/arm/dts/imx7-colibri-rawnand.dts > @@ -0,0 +1,46 @@ > +// SPDX-License-Identifier: GPL-2.0+ OR X11 Dito. > +/* > + * Copyright 2019 Toradex AG > + */ > + > +/dts-v1/; > +#include "imx7-colibri.dtsi" > + > +/ { > + model = "Toradex Colibri iMX7S/D"; > + compatible = "toradex,imx7-colibri", "fsl,imx7"; > + > + chosen { > + stdout-path = > + }; > +}; > + > + { > + pinctrl-names = "default"; > + pinctrl-0 = <_gpmi_nand>; > + ,use-minimum-ecc; > + nand-on-flash-bbt; > + -ecc-mode = "hw"; > + status = "okay"; > +}; > + > + { > + pinctrl_gpmi_nand: gpmi-nand-grp { > + fsl,pins = < > + MX7D_PAD_SD3_CLK__NAND_CLE 0x71 > + MX7D_PAD_SD3_CMD__NAND_ALE 0x71 > + MX7D_PAD_SAI1_TX_BCLK__NAND_CE0_B 0x71 > + MX7D_PAD_SAI1_TX_DATA__NAND_READY_B 0x74 > + MX7D_PAD_SD3_STROBE__NAND_RE_B 0x71 > + MX7D_PAD_SD3_RESET_B__NAND_WE_B 0x71 > + MX7D_PAD_SD3_DATA0__NAND_DATA00 0x71 > + MX7D_PAD_SD3_DATA1__NAND_DATA01 0x71 > + MX7D_PAD_SD3_DATA2__NAND_DATA02 0x71 > + MX7D_PAD_SD3_DATA3__NAND_DATA03 0x71 > + MX7D_PAD_SD3_DATA4__NAND_DATA04 0x71 > + MX7D_PAD_SD3_DATA5__NAND_DATA05 0x71 > + MX7D_PAD_SD3_DATA6__NAND_DATA06 0x71 > + MX7D_PAD_SD3_DATA7__NAND_DATA07 0x71 > + >; > + }; > +}; > diff --git a/arch/arm/dts/imx7-colibri.dts b/arch/arm/dts/imx7- > colibri.dtsi > similarity index 65% > rename from arch/arm/dts/imx7-colibri.dts > rename to arch/arm/dts/imx7-colibri.dtsi > index dca501be25..47295117aa 100644 > --- a/arch/arm/dts/imx7-colibri.dts > +++ b/arch/arm/dts/imx7-colibri.dtsi > @@ -1,30 +1,12 @@ > // SPDX-License-Identifier: GPL-2.0+ OR X11 > /* > - * Copyright 2016 Toradex AG > + * Copyright 2016-2019 Toradex AG > */ > > /dts-v1/; > #include > #include "imx7d.dtsi" > > -/ { > - model = "Toradex Colibri iMX7S/D"; > - compatible = "toradex,imx7-colibri", "fsl,imx7"; > - > - chosen { > - stdout-path = > - }; > -}; > - > - { > - pinctrl-names = "default"; > - pinctrl-0 =
[U-Boot] [PATCH v1 2/9] arm: dts: imx7: colibri: split dt for raw NAND and eMMC devices
From: Stefan Agner In preparation of adding CONFIG_DM_MMC support use separate device trees for raw NAND and eMMC devices. Signed-off-by: Stefan Agner --- arch/arm/dts/imx7-colibri-emmc.dts| 16 +++ arch/arm/dts/imx7-colibri-rawnand.dts | 46 +++ .../{imx7-colibri.dts => imx7-colibri.dtsi} | 39 +--- board/toradex/colibri_imx7/MAINTAINERS| 3 ++ configs/colibri_imx7_defconfig| 2 +- 5 files changed, 67 insertions(+), 39 deletions(-) create mode 100644 arch/arm/dts/imx7-colibri-emmc.dts create mode 100644 arch/arm/dts/imx7-colibri-rawnand.dts rename arch/arm/dts/{imx7-colibri.dts => imx7-colibri.dtsi} (65%) diff --git a/arch/arm/dts/imx7-colibri-emmc.dts b/arch/arm/dts/imx7-colibri-emmc.dts new file mode 100644 index 00..295ca05916 --- /dev/null +++ b/arch/arm/dts/imx7-colibri-emmc.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0+ OR X11 +/* + * Copyright 2019 Toradex AG + */ + +/dts-v1/; +#include "imx7-colibri.dtsi" + +/ { + model = "Toradex Colibri iMX7D 1GB (eMMC)"; + compatible = "toradex,imx7d-colibri-emmc", "fsl,imx7d"; + + chosen { + stdout-path = + }; +}; diff --git a/arch/arm/dts/imx7-colibri-rawnand.dts b/arch/arm/dts/imx7-colibri-rawnand.dts new file mode 100644 index 00..4eb86fb011 --- /dev/null +++ b/arch/arm/dts/imx7-colibri-rawnand.dts @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: GPL-2.0+ OR X11 +/* + * Copyright 2019 Toradex AG + */ + +/dts-v1/; +#include "imx7-colibri.dtsi" + +/ { + model = "Toradex Colibri iMX7S/D"; + compatible = "toradex,imx7-colibri", "fsl,imx7"; + + chosen { + stdout-path = + }; +}; + + { + pinctrl-names = "default"; + pinctrl-0 = <_gpmi_nand>; + fsl,use-minimum-ecc; + nand-on-flash-bbt; + nand-ecc-mode = "hw"; + status = "okay"; +}; + + { + pinctrl_gpmi_nand: gpmi-nand-grp { + fsl,pins = < + MX7D_PAD_SD3_CLK__NAND_CLE 0x71 + MX7D_PAD_SD3_CMD__NAND_ALE 0x71 + MX7D_PAD_SAI1_TX_BCLK__NAND_CE0_B 0x71 + MX7D_PAD_SAI1_TX_DATA__NAND_READY_B 0x74 + MX7D_PAD_SD3_STROBE__NAND_RE_B 0x71 + MX7D_PAD_SD3_RESET_B__NAND_WE_B 0x71 + MX7D_PAD_SD3_DATA0__NAND_DATA00 0x71 + MX7D_PAD_SD3_DATA1__NAND_DATA01 0x71 + MX7D_PAD_SD3_DATA2__NAND_DATA02 0x71 + MX7D_PAD_SD3_DATA3__NAND_DATA03 0x71 + MX7D_PAD_SD3_DATA4__NAND_DATA04 0x71 + MX7D_PAD_SD3_DATA5__NAND_DATA05 0x71 + MX7D_PAD_SD3_DATA6__NAND_DATA06 0x71 + MX7D_PAD_SD3_DATA7__NAND_DATA07 0x71 + >; + }; +}; diff --git a/arch/arm/dts/imx7-colibri.dts b/arch/arm/dts/imx7-colibri.dtsi similarity index 65% rename from arch/arm/dts/imx7-colibri.dts rename to arch/arm/dts/imx7-colibri.dtsi index dca501be25..47295117aa 100644 --- a/arch/arm/dts/imx7-colibri.dts +++ b/arch/arm/dts/imx7-colibri.dtsi @@ -1,30 +1,12 @@ // SPDX-License-Identifier: GPL-2.0+ OR X11 /* - * Copyright 2016 Toradex AG + * Copyright 2016-2019 Toradex AG */ /dts-v1/; #include #include "imx7d.dtsi" -/ { - model = "Toradex Colibri iMX7S/D"; - compatible = "toradex,imx7-colibri", "fsl,imx7"; - - chosen { - stdout-path = - }; -}; - - { - pinctrl-names = "default"; - pinctrl-0 = <_gpmi_nand>; - fsl,use-minimum-ecc; - nand-on-flash-bbt; - nand-ecc-mode = "hw"; - status = "okay"; -}; - { pinctrl-names = "default", "gpio"; pinctrl-0 = <_i2c1>; @@ -57,25 +39,6 @@ }; { - pinctrl_gpmi_nand: gpmi-nand-grp { - fsl,pins = < - MX7D_PAD_SD3_CLK__NAND_CLE 0x71 - MX7D_PAD_SD3_CMD__NAND_ALE 0x71 - MX7D_PAD_SAI1_TX_BCLK__NAND_CE0_B 0x71 - MX7D_PAD_SAI1_TX_DATA__NAND_READY_B 0x74 - MX7D_PAD_SD3_STROBE__NAND_RE_B 0x71 - MX7D_PAD_SD3_RESET_B__NAND_WE_B 0x71 - MX7D_PAD_SD3_DATA0__NAND_DATA00 0x71 - MX7D_PAD_SD3_DATA1__NAND_DATA01 0x71 - MX7D_PAD_SD3_DATA2__NAND_DATA02 0x71 - MX7D_PAD_SD3_DATA3__NAND_DATA03 0x71 - MX7D_PAD_SD3_DATA4__NAND_DATA04 0x71 - MX7D_PAD_SD3_DATA5__NAND_DATA05 0x71 - MX7D_PAD_SD3_DATA6__NAND_DATA06 0x71 - MX7D_PAD_SD3_DATA7__NAND_DATA07 0x71 -