Message ID | 580F5B06.6030608@sigmadesigns.com |
---|---|
State | Not Applicable, archived |
Headers | show |
On Tue, 25 Oct 2016 15:15:50 +0200 Marc Gonzalez <marc_gonzalez@sigmadesigns.com> wrote: > Add the tango NAND Flash Controller dt bindings documentation. > > Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> > --- > Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mtd/tango-nand.txt b/Documentation/devicetree/bindings/mtd/tango-nand.txt > new file mode 100644 > index 000000000000..3cbf95d6595a > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/tango-nand.txt > @@ -0,0 +1,38 @@ > +Sigma Designs Tango4 NAND Flash Controller (NFC) > + > +Required properties: > + > +- compatible: "sigma,smp8758-nand" > +- reg: address/size of nfc_reg, nfc_mem, and pbus_reg > +- dmas: reference to the DMA channel used by the controller > +- dma-names: "nfc_sbox" > +- clocks: reference to the system clock > +- #address-cells: <1> > +- #size-cells: <0> > + > +Children nodes represent the available NAND chips. > +See Documentation/devicetree/bindings/mtd/nand.txt for generic bindings. > + > +Example: > + > + nand: nand@2c000 { nandc: nand-controller@2c000 { No need to resend a new version for that (I can fix it when applying), unless I find other things in patch 2. > + compatible = "sigma,smp8758-nand"; > + reg = <0x2c000 0x30 0x2d000 0x800 0x20000 0x1000>; > + dmas = <&dma0 3>; > + dma-names = "nfc_sbox"; > + clocks = <&clkgen SYS_CLK>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + nand@0 { > + reg = <0>; /* CS0 */ > + nand-ecc-strength = <14>; > + nand-ecc-step-size = <1024>; > + }; > + > + nand@1 { > + reg = <1>; /* CS1 */ > + nand-ecc-strength = <14>; > + nand-ecc-step-size = <1024>; > + }; > + }; -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Oct 25, 2016 at 03:15:50PM +0200, Marc Gonzalez wrote: > Add the tango NAND Flash Controller dt bindings documentation. > > Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> > --- > Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) Acked-by: Rob Herring <robh@kernel.org> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 25 Oct 2016 15:15:50 +0200 Marc Gonzalez <marc_gonzalez@sigmadesigns.com> wrote: > Add the tango NAND Flash Controller dt bindings documentation. > > Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Applied after renaming the nand controller node. Thanks, Boris > --- > Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mtd/tango-nand.txt b/Documentation/devicetree/bindings/mtd/tango-nand.txt > new file mode 100644 > index 000000000000..3cbf95d6595a > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/tango-nand.txt > @@ -0,0 +1,38 @@ > +Sigma Designs Tango4 NAND Flash Controller (NFC) > + > +Required properties: > + > +- compatible: "sigma,smp8758-nand" > +- reg: address/size of nfc_reg, nfc_mem, and pbus_reg > +- dmas: reference to the DMA channel used by the controller > +- dma-names: "nfc_sbox" > +- clocks: reference to the system clock > +- #address-cells: <1> > +- #size-cells: <0> > + > +Children nodes represent the available NAND chips. > +See Documentation/devicetree/bindings/mtd/nand.txt for generic bindings. > + > +Example: > + > + nand: nand@2c000 { > + compatible = "sigma,smp8758-nand"; > + reg = <0x2c000 0x30 0x2d000 0x800 0x20000 0x1000>; > + dmas = <&dma0 3>; > + dma-names = "nfc_sbox"; > + clocks = <&clkgen SYS_CLK>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + nand@0 { > + reg = <0>; /* CS0 */ > + nand-ecc-strength = <14>; > + nand-ecc-step-size = <1024>; > + }; > + > + nand@1 { > + reg = <1>; /* CS1 */ > + nand-ecc-strength = <14>; > + nand-ecc-step-size = <1024>; > + }; > + }; -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tuesday, October 25, 2016 3:15:50 PM CET Marc Gonzalez wrote: > Add the tango NAND Flash Controller dt bindings documentation. > > Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> > --- > Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mtd/tango-nand.txt b/Documentation/devicetree/bindings/mtd/tango-nand.txt > new file mode 100644 > index 000000000000..3cbf95d6595a > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/tango-nand.txt > @@ -0,0 +1,38 @@ > +Sigma Designs Tango4 NAND Flash Controller (NFC) > + > +Required properties: > + > +- compatible: "sigma,smp8758-nand" > +- reg: address/size of nfc_reg, nfc_mem, and pbus_reg > +- dmas: reference to the DMA channel used by the controller > +- dma-names: "nfc_sbox" Drop the "nfc_" prefix here, it seems redundant. > +- clocks: reference to the system clock > +- #address-cells: <1> > +- #size-cells: <0> > + > +Children nodes represent the available NAND chips. > +See Documentation/devicetree/bindings/mtd/nand.txt for generic bindings. > + > +Example: > + > + nand: nand@2c000 { > + compatible = "sigma,smp8758-nand"; > + reg = <0x2c000 0x30 0x2d000 0x800 0x20000 0x1000>; It would be nicer to write this as reg = <0x2c000 0x30>, <0x2d000 0x800>, <0x20000 0x1000>; which is identical in binary format. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/11/2016 10:18, Arnd Bergmann wrote: > On Tuesday, October 25, 2016 3:15:50 PM CET Marc Gonzalez wrote: >> Add the tango NAND Flash Controller dt bindings documentation. >> >> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> >> --- >> Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ >> 1 file changed, 38 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/mtd/tango-nand.txt b/Documentation/devicetree/bindings/mtd/tango-nand.txt >> new file mode 100644 >> index 000000000000..3cbf95d6595a >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/mtd/tango-nand.txt >> @@ -0,0 +1,38 @@ >> +Sigma Designs Tango4 NAND Flash Controller (NFC) >> + >> +Required properties: >> + >> +- compatible: "sigma,smp8758-nand" >> +- reg: address/size of nfc_reg, nfc_mem, and pbus_reg >> +- dmas: reference to the DMA channel used by the controller >> +- dma-names: "nfc_sbox" > > Drop the "nfc_" prefix here, it seems redundant. I don't think it's redundant; there are switch boxes for several different HW blocks; nfc_sbox is the first one to be exposed. >> +- clocks: reference to the system clock >> +- #address-cells: <1> >> +- #size-cells: <0> >> + >> +Children nodes represent the available NAND chips. >> +See Documentation/devicetree/bindings/mtd/nand.txt for generic bindings. >> + >> +Example: >> + >> + nand: nand@2c000 { >> + compatible = "sigma,smp8758-nand"; >> + reg = <0x2c000 0x30 0x2d000 0x800 0x20000 0x1000>; > > It would be nicer to write this as > > reg = <0x2c000 0x30>, <0x2d000 0x800>, <0x20000 0x1000>; > > which is identical in binary format. I didn't know that, thanks for pointing it out. Unfortunately, Boris already accepted the patch yesterday :-( Boris, do you fixup patches in your tree? Regards. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 7 Nov 2016 10:26:48 +0100 Marc Gonzalez <marc_gonzalez@sigmadesigns.com> wrote: > On 07/11/2016 10:18, Arnd Bergmann wrote: > > On Tuesday, October 25, 2016 3:15:50 PM CET Marc Gonzalez wrote: > >> Add the tango NAND Flash Controller dt bindings documentation. > >> > >> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> > >> --- > >> Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ > >> 1 file changed, 38 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/mtd/tango-nand.txt b/Documentation/devicetree/bindings/mtd/tango-nand.txt > >> new file mode 100644 > >> index 000000000000..3cbf95d6595a > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/mtd/tango-nand.txt > >> @@ -0,0 +1,38 @@ > >> +Sigma Designs Tango4 NAND Flash Controller (NFC) > >> + > >> +Required properties: > >> + > >> +- compatible: "sigma,smp8758-nand" > >> +- reg: address/size of nfc_reg, nfc_mem, and pbus_reg > >> +- dmas: reference to the DMA channel used by the controller > >> +- dma-names: "nfc_sbox" > > > > Drop the "nfc_" prefix here, it seems redundant. > > I don't think it's redundant; there are switch boxes for several > different HW blocks; nfc_sbox is the first one to be exposed. The dma-names are local to the device, so I think the nfc_ prefix is indeed not needed. > > >> +- clocks: reference to the system clock > >> +- #address-cells: <1> > >> +- #size-cells: <0> > >> + > >> +Children nodes represent the available NAND chips. > >> +See Documentation/devicetree/bindings/mtd/nand.txt for generic bindings. > >> + > >> +Example: > >> + > >> + nand: nand@2c000 { > >> + compatible = "sigma,smp8758-nand"; > >> + reg = <0x2c000 0x30 0x2d000 0x800 0x20000 0x1000>; > > > > It would be nicer to write this as > > > > reg = <0x2c000 0x30>, <0x2d000 0x800>, <0x20000 0x1000>; > > > > which is identical in binary format. > > I didn't know that, thanks for pointing it out. > > Unfortunately, Boris already accepted the patch yesterday :-( > > Boris, do you fixup patches in your tree? I usually try to avoid that, unless one of the patches breaks bisectibility (which is not the case here). Please send new patches to fix that. Thanks, Boris -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/11/2016 10:18, Arnd Bergmann wrote: > On Tuesday, October 25, 2016 3:15:50 PM CET Marc Gonzalez wrote: >> Add the tango NAND Flash Controller dt bindings documentation. >> >> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> >> --- >> Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ >> 1 file changed, 38 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/mtd/tango-nand.txt b/Documentation/devicetree/bindings/mtd/tango-nand.txt >> new file mode 100644 >> index 000000000000..3cbf95d6595a >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/mtd/tango-nand.txt >> @@ -0,0 +1,38 @@ >> +Sigma Designs Tango4 NAND Flash Controller (NFC) >> + >> +Required properties: >> + >> +- compatible: "sigma,smp8758-nand" >> +- reg: address/size of nfc_reg, nfc_mem, and pbus_reg >> +- dmas: reference to the DMA channel used by the controller >> +- dma-names: "nfc_sbox" > > Drop the "nfc_" prefix here, it seems redundant. I took a closer look at Documentation/devicetree/bindings and arch/arm/boot/dts and it seems the overwhelming nomenclature is "rx", "tx" (with variants around these two). Should I just use "rxtx" for my driver? >> +- clocks: reference to the system clock >> +- #address-cells: <1> >> +- #size-cells: <0> >> + >> +Children nodes represent the available NAND chips. >> +See Documentation/devicetree/bindings/mtd/nand.txt for generic bindings. >> + >> +Example: >> + >> + nand: nand@2c000 { >> + compatible = "sigma,smp8758-nand"; >> + reg = <0x2c000 0x30 0x2d000 0x800 0x20000 0x1000>; > > It would be nicer to write this as > > reg = <0x2c000 0x30>, <0x2d000 0x800>, <0x20000 0x1000>; > > which is identical in binary format. This is indeed a marked improvement. Boris, if I fix these two nits, can I submit a single patch, or do you want them split? Regards. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 16/12/2016 11:56, Marc Gonzalez wrote: > On 07/11/2016 10:18, Arnd Bergmann wrote: >> On Tuesday, October 25, 2016 3:15:50 PM CET Marc Gonzalez wrote: >>> Add the tango NAND Flash Controller dt bindings documentation. >>> >>> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> >>> --- >>> Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ >>> 1 file changed, 38 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/mtd/tango-nand.txt b/Documentation/devicetree/bindings/mtd/tango-nand.txt >>> new file mode 100644 >>> index 000000000000..3cbf95d6595a >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/mtd/tango-nand.txt >>> @@ -0,0 +1,38 @@ >>> +Sigma Designs Tango4 NAND Flash Controller (NFC) >>> + >>> +Required properties: >>> + >>> +- compatible: "sigma,smp8758-nand" >>> +- reg: address/size of nfc_reg, nfc_mem, and pbus_reg >>> +- dmas: reference to the DMA channel used by the controller >>> +- dma-names: "nfc_sbox" >> >> Drop the "nfc_" prefix here, it seems redundant. > > I took a closer look at Documentation/devicetree/bindings and > arch/arm/boot/dts and it seems the overwhelming nomenclature > is "rx", "tx" (with variants around these two). > > Should I just use "rxtx" for my driver? On IRC, Arnd wrote: "The string for dma-names is not important, it just needs to be documented in the binding. If you have hardware specifications, use the name that is next to the wire for the dma-request line. "dma-names" is only required so you can connect a single dmarq to multiple dma engines (most chips only connect each rq to one dmaengine though)." In my system, peripheral devices are connected to DMA channels via a multiplexer called the "host switch box". The documentation calls the ports FOO_SBOX and SBOX_FOO. For MLC NAND Flash controller 0, the ports are mlc_flash0_sbox and sbox_mlc_flash0. Additionally, the DMA driver handles both directions, so the DT only defines a single duplex channel. I originally used "nfc_sbox" (nfc = NAND Flash controller) to stick to the HW naming, but I am willing to change it to "rxtx" if that's what Boris prefers, (or just "sbox", but Mans pointed out that this was too specific, and future HW might do away with the switch box). I'm open to comments. Regards. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Dec 16, 2016 at 02:26:33PM +0100, Marc Gonzalez wrote: > On 16/12/2016 11:56, Marc Gonzalez wrote: > > Should I just use "rxtx" for my driver? > > On IRC, Arnd wrote: > > "The string for dma-names is not important, it just needs to be documented > in the binding. If you have hardware specifications, use the name that is > next to the wire for the dma-request line. "dma-names" is only required so > you can connect a single dmarq to multiple dma engines (most chips only > connect each rq to one dmaengine though)." > > In my system, peripheral devices are connected to DMA channels via > a multiplexer called the "host switch box". The documentation calls > the ports FOO_SBOX and SBOX_FOO. > > For MLC NAND Flash controller 0, the ports are mlc_flash0_sbox > and sbox_mlc_flash0. > > Additionally, the DMA driver handles both directions, so the DT only > defines a single duplex channel. > > I originally used "nfc_sbox" (nfc = NAND Flash controller) to stick to > the HW naming, but I am willing to change it to "rxtx" if that's what > Boris prefers, (or just "sbox", but Mans pointed out that this was too > specific, and future HW might do away with the switch box). "rxtx" is the best option, if you need a name at all. The name is relative to the device instance, so "nfc_" is unnecessary; we know the node is an NFC controller. The sbox is part of the SoC wiring rather than being part of the NFC controller, so the "sbox" part also shouldn't be part of the name. Likewise for the NAND flash controller. There, the "0" instance number also shouldn't have been there -- the name is relative to the instance, and two instances should use the same names. Too late now, I guess. :( Thanks, Mark. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 16 Dec 2016 11:56:38 +0100 Marc Gonzalez <marc_gonzalez@sigmadesigns.com> wrote: > On 07/11/2016 10:18, Arnd Bergmann wrote: > > On Tuesday, October 25, 2016 3:15:50 PM CET Marc Gonzalez wrote: > >> Add the tango NAND Flash Controller dt bindings documentation. > >> > >> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> > >> --- > >> Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ > >> 1 file changed, 38 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/mtd/tango-nand.txt b/Documentation/devicetree/bindings/mtd/tango-nand.txt > >> new file mode 100644 > >> index 000000000000..3cbf95d6595a > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/mtd/tango-nand.txt > >> @@ -0,0 +1,38 @@ > >> +Sigma Designs Tango4 NAND Flash Controller (NFC) > >> + > >> +Required properties: > >> + > >> +- compatible: "sigma,smp8758-nand" > >> +- reg: address/size of nfc_reg, nfc_mem, and pbus_reg > >> +- dmas: reference to the DMA channel used by the controller > >> +- dma-names: "nfc_sbox" > > > > Drop the "nfc_" prefix here, it seems redundant. > > I took a closer look at Documentation/devicetree/bindings and > arch/arm/boot/dts and it seems the overwhelming nomenclature > is "rx", "tx" (with variants around these two). > > Should I just use "rxtx" for my driver? > > >> +- clocks: reference to the system clock > >> +- #address-cells: <1> > >> +- #size-cells: <0> > >> + > >> +Children nodes represent the available NAND chips. > >> +See Documentation/devicetree/bindings/mtd/nand.txt for generic bindings. > >> + > >> +Example: > >> + > >> + nand: nand@2c000 { > >> + compatible = "sigma,smp8758-nand"; > >> + reg = <0x2c000 0x30 0x2d000 0x800 0x20000 0x1000>; > > > > It would be nicer to write this as > > > > reg = <0x2c000 0x30>, <0x2d000 0x800>, <0x20000 0x1000>; > > > > which is identical in binary format. > > This is indeed a marked improvement. Boris, if I fix these two nits, > can I submit a single patch, or do you want them split? Sure, just describe the different binding changes in your commit message. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/mtd/tango-nand.txt b/Documentation/devicetree/bindings/mtd/tango-nand.txt new file mode 100644 index 000000000000..3cbf95d6595a --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/tango-nand.txt @@ -0,0 +1,38 @@ +Sigma Designs Tango4 NAND Flash Controller (NFC) + +Required properties: + +- compatible: "sigma,smp8758-nand" +- reg: address/size of nfc_reg, nfc_mem, and pbus_reg +- dmas: reference to the DMA channel used by the controller +- dma-names: "nfc_sbox" +- clocks: reference to the system clock +- #address-cells: <1> +- #size-cells: <0> + +Children nodes represent the available NAND chips. +See Documentation/devicetree/bindings/mtd/nand.txt for generic bindings. + +Example: + + nand: nand@2c000 { + compatible = "sigma,smp8758-nand"; + reg = <0x2c000 0x30 0x2d000 0x800 0x20000 0x1000>; + dmas = <&dma0 3>; + dma-names = "nfc_sbox"; + clocks = <&clkgen SYS_CLK>; + #address-cells = <1>; + #size-cells = <0>; + + nand@0 { + reg = <0>; /* CS0 */ + nand-ecc-strength = <14>; + nand-ecc-step-size = <1024>; + }; + + nand@1 { + reg = <1>; /* CS1 */ + nand-ecc-strength = <14>; + nand-ecc-step-size = <1024>; + }; + };
Add the tango NAND Flash Controller dt bindings documentation. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> --- Documentation/devicetree/bindings/mtd/tango-nand.txt | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)