* [PATCH 3/5] Documentaion: dt: add DT bindings for Qualcomm NAND controller [not found] ` <1421419702-17812-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> @ 2015-01-16 14:48 ` Archit Taneja 0 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-01-16 14:48 UTC (permalink / raw) To: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, agross-sgV2jX0FEOL9JmXXK+q4OQ, galak-sgV2jX0FEOL9JmXXK+q4OQ, Archit Taneja, devicetree-u79uwXL29TY76Z2rM5mHXA Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Archit Taneja <architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> --- .../devicetree/bindings/mtd/qcom_nandc.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt new file mode 100644 index 0000000..e24c77a --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt @@ -0,0 +1,48 @@ +* Qualcomm NAND controller + +Required properties: +- compatible: should be "qcom,ebi2-nand" for IPQ806x +- reg: MMIO address range +- clocks: must contain core clock and always on clock +- clock-names: must contain "core" for the core clock and "aon" for the + always on clock +- dmas: DMA specifier, consisting of a phandle to the ADM DMA + controller node and the channel number to be used for + NAND. Refer to dma.txt and qcom_adm.txt for more details +- dma-names: must be "rxtx" +- qcom,cmd-crci: must contain the ADM command type CRCI block instance + number specified for the NAND controller on the given + platform +- qcom,data-crci: must contain the ADM data type CRCI block instance + number specified for the NAND controller on the given + platform + +Optional properties: +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen + as default + +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 + bits. If not present, 4 is chosen as default + +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. + +Example: + +nand@0x1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + partition@0 { + ... + }; +}; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation -- 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] 31+ messages in thread
* [PATCH 4/5] arm: qcom: dts: Add NAND controller node for ipq806x [not found] <1421419702-17812-1-git-send-email-architt@codeaurora.org> [not found] ` <1421419702-17812-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> @ 2015-01-16 14:48 ` Archit Taneja 2015-01-16 14:48 ` [PATCH 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 pplatform Archit Taneja ` (2 subsequent siblings) 4 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-01-16 14:48 UTC (permalink / raw) To: linux-mtd, linux-arm-msm Cc: linux-kernel, agross, galak, Archit Taneja, devicetree The nand controller in IPQ806x is of the 'EBI2 type'. Use the corresponding compatible string. Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja <architt@codeaurora.org> --- arch/arm/boot/dts/qcom-ipq8064.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi index 733b0f3..6ed0150 100644 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -281,7 +281,7 @@ #reset-cells = <1>; }; - dma@18300000 { + adm_dma: dma@18300000 { compatible = "qcom,adm"; reg = <0x18300000 0x100000>; interrupts = <0 170 0>; @@ -300,5 +300,22 @@ status = "disabled"; }; + + nand@0x1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + status = "disabled"; + }; + }; }; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 pplatform [not found] <1421419702-17812-1-git-send-email-architt@codeaurora.org> [not found] ` <1421419702-17812-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> 2015-01-16 14:48 ` [PATCH 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja @ 2015-01-16 14:48 ` Archit Taneja [not found] ` <1437474886-6209-1-git-send-email-architt@codeaurora.org> [not found] ` <1438578498-32254-1-git-send-email-architt@codeaurora.org> 4 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-01-16 14:48 UTC (permalink / raw) To: linux-mtd, linux-arm-msm Cc: linux-kernel, agross, galak, Archit Taneja, devicetree Enable the NAND controller node on the AP148 platform. Provide pinmux information. Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja <architt@codeaurora.org> --- arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts index 1e1d0d8..82878bb 100644 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts @@ -30,6 +30,28 @@ bias-none; }; }; + nand_pins: nand_pins { + mux { + pins = "gpio34", "gpio35", "gpio36", + "gpio37", "gpio38", "gpio39", + "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + function = "nand"; + drive-strength = <10>; + bias-disable; + }; + pullups { + pins = "gpio39"; + bias-pull-up; + }; + hold { + pins = "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + bias-bus-hold; + }; + }; }; gsbi@16300000 { @@ -93,5 +115,15 @@ dma@18300000 { status = "ok"; }; + + nand@0x1ac00000 { + status = "ok"; + + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + + nand-ecc-strength = <4>; + nand-bus-width = <8>; + }; }; }; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
[parent not found: <1437474886-6209-1-git-send-email-architt@codeaurora.org>]
* [PATCH v2 3/5] dt/bindings: qcom_nandc: Add DT bindings [not found] ` <1437474886-6209-1-git-send-email-architt@codeaurora.org> @ 2015-07-21 10:34 ` Archit Taneja 2015-07-24 18:57 ` Andy Gross 2015-07-24 19:37 ` Stephen Boyd 2015-07-21 10:34 ` [PATCH v2 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja 2015-07-21 10:34 ` [PATCH v2 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 platform Archit Taneja 2 siblings, 2 replies; 31+ messages in thread From: Archit Taneja @ 2015-07-21 10:34 UTC (permalink / raw) To: linux-mtd, dehrenberg, cernekee, computersforpeace Cc: linux-arm-msm, agross, linux-kernel, Archit Taneja, devicetree Add DT bindings document for the Qualcomm NAND controller driver. Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja <architt@codeaurora.org> --- .../devicetree/bindings/mtd/qcom_nandc.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt new file mode 100644 index 0000000..e24c77a --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt @@ -0,0 +1,48 @@ +* Qualcomm NAND controller + +Required properties: +- compatible: should be "qcom,ebi2-nand" for IPQ806x +- reg: MMIO address range +- clocks: must contain core clock and always on clock +- clock-names: must contain "core" for the core clock and "aon" for the + always on clock +- dmas: DMA specifier, consisting of a phandle to the ADM DMA + controller node and the channel number to be used for + NAND. Refer to dma.txt and qcom_adm.txt for more details +- dma-names: must be "rxtx" +- qcom,cmd-crci: must contain the ADM command type CRCI block instance + number specified for the NAND controller on the given + platform +- qcom,data-crci: must contain the ADM data type CRCI block instance + number specified for the NAND controller on the given + platform + +Optional properties: +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen + as default + +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 + bits. If not present, 4 is chosen as default + +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. + +Example: + +nand@0x1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + partition@0 { + ... + }; +}; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH v2 3/5] dt/bindings: qcom_nandc: Add DT bindings 2015-07-21 10:34 ` [PATCH v2 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja @ 2015-07-24 18:57 ` Andy Gross 2015-07-24 19:37 ` Stephen Boyd 1 sibling, 0 replies; 31+ messages in thread From: Andy Gross @ 2015-07-24 18:57 UTC (permalink / raw) To: Archit Taneja Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, linux-arm-msm, linux-kernel, devicetree On Tue, Jul 21, 2015 at 04:04:44PM +0530, Archit Taneja wrote: > Add DT bindings document for the Qualcomm NAND controller driver. > > Cc: devicetree@vger.kernel.org > > Signed-off-by: Archit Taneja <architt@codeaurora.org> > --- Acked-by: Andy Gross <agross@codeaurora.org> -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v2 3/5] dt/bindings: qcom_nandc: Add DT bindings 2015-07-21 10:34 ` [PATCH v2 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja 2015-07-24 18:57 ` Andy Gross @ 2015-07-24 19:37 ` Stephen Boyd 1 sibling, 0 replies; 31+ messages in thread From: Stephen Boyd @ 2015-07-24 19:37 UTC (permalink / raw) To: Archit Taneja Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, linux-arm-msm, agross, linux-kernel, devicetree On 07/21/2015 03:34 AM, Archit Taneja wrote: > + > +nand@0x1ac00000 { s/0x// -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v2 4/5] arm: qcom: dts: Add NAND controller node for ipq806x [not found] ` <1437474886-6209-1-git-send-email-architt@codeaurora.org> 2015-07-21 10:34 ` [PATCH v2 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja @ 2015-07-21 10:34 ` Archit Taneja 2015-07-24 19:01 ` Andy Gross 2015-07-21 10:34 ` [PATCH v2 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 platform Archit Taneja 2 siblings, 1 reply; 31+ messages in thread From: Archit Taneja @ 2015-07-21 10:34 UTC (permalink / raw) To: linux-mtd, dehrenberg, cernekee, computersforpeace Cc: linux-arm-msm, agross, linux-kernel, Archit Taneja, devicetree The nand controller in IPQ806x is of the 'EBI2 type'. Use the corresponding compatible string. Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja <architt@codeaurora.org> --- arch/arm/boot/dts/qcom-ipq8064.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi index 1e1b3f0..08dc2ef 100644 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -350,5 +350,20 @@ status = "disabled"; }; + nand@0x1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + status = "disabled"; + }; }; }; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH v2 4/5] arm: qcom: dts: Add NAND controller node for ipq806x 2015-07-21 10:34 ` [PATCH v2 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja @ 2015-07-24 19:01 ` Andy Gross 0 siblings, 0 replies; 31+ messages in thread From: Andy Gross @ 2015-07-24 19:01 UTC (permalink / raw) To: Archit Taneja Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, linux-arm-msm, linux-kernel, devicetree On Tue, Jul 21, 2015 at 04:04:45PM +0530, Archit Taneja wrote: > The nand controller in IPQ806x is of the 'EBI2 type'. Use the corresponding > compatible string. > > Cc: devicetree@vger.kernel.org > Signed-off-by: Archit Taneja <architt@codeaurora.org> > --- Reviewed-by: Andy Gross <agross@codeaurora.org> -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v2 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 platform [not found] ` <1437474886-6209-1-git-send-email-architt@codeaurora.org> 2015-07-21 10:34 ` [PATCH v2 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja 2015-07-21 10:34 ` [PATCH v2 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja @ 2015-07-21 10:34 ` Archit Taneja 2015-07-24 18:58 ` Andy Gross 2015-07-24 18:59 ` Andy Gross 2 siblings, 2 replies; 31+ messages in thread From: Archit Taneja @ 2015-07-21 10:34 UTC (permalink / raw) To: linux-mtd, dehrenberg, cernekee, computersforpeace Cc: linux-arm-msm, agross, linux-kernel, Archit Taneja, devicetree Enable the NAND controller node on the AP148 platform. Provide pinmux information. Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja <architt@codeaurora.org> --- arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts index 7f9ea50..03fd6b7 100644 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts @@ -30,6 +30,28 @@ bias-none; }; }; + nand_pins: nand_pins { + mux { + pins = "gpio34", "gpio35", "gpio36", + "gpio37", "gpio38", "gpio39", + "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + function = "nand"; + drive-strength = <10>; + bias-disable; + }; + pullups { + pins = "gpio39"; + bias-pull-up; + }; + hold { + pins = "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + bias-bus-hold; + }; + }; }; gsbi@16300000 { @@ -93,5 +115,19 @@ sata@29000000 { status = "ok"; }; + + nand@0x1ac00000 { + status = "ok"; + + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + + nand-ecc-strength = <4>; + nand-bus-width = <8>; + }; }; }; + +&adm_dma { + status = "ok"; +}; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH v2 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 platform 2015-07-21 10:34 ` [PATCH v2 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 platform Archit Taneja @ 2015-07-24 18:58 ` Andy Gross 2015-07-24 18:59 ` Andy Gross 1 sibling, 0 replies; 31+ messages in thread From: Andy Gross @ 2015-07-24 18:58 UTC (permalink / raw) To: Archit Taneja Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, linux-arm-msm, linux-kernel, devicetree On Tue, Jul 21, 2015 at 04:04:46PM +0530, Archit Taneja wrote: > Enable the NAND controller node on the AP148 platform. Provide pinmux > information. > > Cc: devicetree@vger.kernel.org > Signed-off-by: Archit Taneja <architt@codeaurora.org> > --- Looks fine. Reviewed-by: Andy Gross <agross@codeaurora.org> -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v2 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 platform 2015-07-21 10:34 ` [PATCH v2 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 platform Archit Taneja 2015-07-24 18:58 ` Andy Gross @ 2015-07-24 18:59 ` Andy Gross 1 sibling, 0 replies; 31+ messages in thread From: Andy Gross @ 2015-07-24 18:59 UTC (permalink / raw) To: Archit Taneja Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, linux-arm-msm, linux-kernel, devicetree On Tue, Jul 21, 2015 at 04:04:46PM +0530, Archit Taneja wrote: > Enable the NAND controller node on the AP148 platform. Provide pinmux > information. > > Cc: devicetree@vger.kernel.org > Signed-off-by: Archit Taneja <architt@codeaurora.org> > --- One nit though. The subject mispells Enable. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 31+ messages in thread
[parent not found: <1438578498-32254-1-git-send-email-architt@codeaurora.org>]
* [PATCH v3 3/5] dt/bindings: qcom_nandc: Add DT bindings [not found] ` <1438578498-32254-1-git-send-email-architt@codeaurora.org> @ 2015-08-03 5:08 ` Archit Taneja 2015-08-03 5:08 ` [PATCH v3 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja ` (2 subsequent siblings) 3 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-08-03 5:08 UTC (permalink / raw) To: linux-mtd, dehrenberg, cernekee, computersforpeace Cc: linux-arm-msm, agross, sboyd, linux-kernel, Archit Taneja, devicetree Add DT bindings document for the Qualcomm NAND controller driver. Cc: devicetree@vger.kernel.org v3: - Don't use '0x' when specifying nand controller address space - Add optional property for on-flash bbt usage Acked-by: Andy Gross <agross@codeaurora.org> Signed-off-by: Archit Taneja <architt@codeaurora.org> --- .../devicetree/bindings/mtd/qcom_nandc.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt new file mode 100644 index 0000000..1de4643 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt @@ -0,0 +1,49 @@ +* Qualcomm NAND controller + +Required properties: +- compatible: should be "qcom,ebi2-nand" for IPQ806x +- reg: MMIO address range +- clocks: must contain core clock and always on clock +- clock-names: must contain "core" for the core clock and "aon" for the + always on clock +- dmas: DMA specifier, consisting of a phandle to the ADM DMA + controller node and the channel number to be used for + NAND. Refer to dma.txt and qcom_adm.txt for more details +- dma-names: must be "rxtx" +- qcom,cmd-crci: must contain the ADM command type CRCI block instance + number specified for the NAND controller on the given + platform +- qcom,data-crci: must contain the ADM data type CRCI block instance + number specified for the NAND controller on the given + platform + +Optional properties: +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen + as default + +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 + bits. If not present, 4 is chosen as default +- nand-on-flash-bbt: Create/use on-flash bad block table + +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. + +Example: + +nand@1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + partition@0 { + ... + }; +}; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH v3 4/5] arm: qcom: dts: Add NAND controller node for ipq806x [not found] ` <1438578498-32254-1-git-send-email-architt@codeaurora.org> 2015-08-03 5:08 ` [PATCH v3 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja @ 2015-08-03 5:08 ` Archit Taneja [not found] ` <1438578498-32254-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> [not found] ` <1439959746-25498-1-git-send-email-architt@codeaurora.org> 3 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-08-03 5:08 UTC (permalink / raw) To: linux-mtd, dehrenberg, cernekee, computersforpeace Cc: linux-arm-msm, agross, sboyd, linux-kernel, Archit Taneja, devicetree The nand controller in IPQ806x is of the 'EBI2 type'. Use the corresponding compatible string. Cc: devicetree@vger.kernel.org Reviewed-by: Andy Gross <agross@codeaurora.org> Signed-off-by: Archit Taneja <architt@codeaurora.org> --- arch/arm/boot/dts/qcom-ipq8064.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi index 1e1b3f0..a7f0ee5 100644 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -350,5 +350,20 @@ status = "disabled"; }; + nand@1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + status = "disabled"; + }; }; }; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
[parent not found: <1438578498-32254-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>]
* [PATCH v3 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform [not found] ` <1438578498-32254-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> @ 2015-08-03 5:08 ` Archit Taneja 2015-08-03 19:35 ` Andy Gross 2015-08-03 20:58 ` Stephen Boyd 0 siblings, 2 replies; 31+ messages in thread From: Archit Taneja @ 2015-08-03 5:08 UTC (permalink / raw) To: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, dehrenberg-hpIqsD4AKlfQT0dZR+AlfA, cernekee-Re5JQEeQqe8AvxtiuMwx3w, computersforpeace-Re5JQEeQqe8AvxtiuMwx3w Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, agross-sgV2jX0FEOL9JmXXK+q4OQ, sboyd-sgV2jX0FEOL9JmXXK+q4OQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Archit Taneja, devicetree-u79uwXL29TY76Z2rM5mHXA Enable the NAND controller node on the AP148 platform. Provide pinmux information. Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Archit Taneja <architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> --- arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts index 7f9ea50..2e88eff 100644 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts @@ -30,6 +30,28 @@ bias-none; }; }; + nand_pins: nand_pins { + mux { + pins = "gpio34", "gpio35", "gpio36", + "gpio37", "gpio38", "gpio39", + "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + function = "nand"; + drive-strength = <10>; + bias-disable; + }; + pullups { + pins = "gpio39"; + bias-pull-up; + }; + hold { + pins = "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + bias-bus-hold; + }; + }; }; gsbi@16300000 { @@ -93,5 +115,19 @@ sata@29000000 { status = "ok"; }; + + nand@1ac00000 { + status = "ok"; + + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + + nand-ecc-strength = <4>; + nand-bus-width = <8>; + }; }; }; + +&adm_dma { + status = "ok"; +}; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation -- 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] 31+ messages in thread
* Re: [PATCH v3 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform 2015-08-03 5:08 ` [PATCH v3 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform Archit Taneja @ 2015-08-03 19:35 ` Andy Gross 2015-08-04 15:05 ` Archit Taneja 2015-08-03 20:58 ` Stephen Boyd 1 sibling, 1 reply; 31+ messages in thread From: Andy Gross @ 2015-08-03 19:35 UTC (permalink / raw) To: Archit Taneja Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, linux-arm-msm, sboyd, linux-kernel, devicetree On Mon, Aug 03, 2015 at 10:38:18AM +0530, Archit Taneja wrote: > Enable the NAND controller node on the AP148 platform. Provide pinmux > information. > > Cc: devicetree@vger.kernel.org > > Signed-off-by: Archit Taneja <architt@codeaurora.org> > --- > arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 36 ++++++++++++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > > diff --git a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts > index 7f9ea50..2e88eff 100644 > --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts > +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts > @@ -30,6 +30,28 @@ > bias-none; > }; > }; > + nand_pins: nand_pins { > + mux { > + pins = "gpio34", "gpio35", "gpio36", > + "gpio37", "gpio38", "gpio39", > + "gpio40", "gpio41", "gpio42", > + "gpio43", "gpio44", "gpio45", > + "gpio46", "gpio47"; > + function = "nand"; > + drive-strength = <10>; > + bias-disable; > + }; > + pullups { > + pins = "gpio39"; > + bias-pull-up; > + }; > + hold { > + pins = "gpio40", "gpio41", "gpio42", > + "gpio43", "gpio44", "gpio45", > + "gpio46", "gpio47"; > + bias-bus-hold; Maybe split out the bias-disable into a separate set and remove that property from the mux. > + }; > + }; > }; > > gsbi@16300000 { > @@ -93,5 +115,19 @@ > sata@29000000 { > status = "ok"; > }; > + > + nand@1ac00000 { > + status = "ok"; > + > + pinctrl-0 = <&nand_pins>; > + pinctrl-names = "default"; > + > + nand-ecc-strength = <4>; > + nand-bus-width = <8>; > + }; > }; > }; > + > +&adm_dma { > + status = "ok"; > +}; > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > hosted by The Linux Foundation > -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v3 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform 2015-08-03 19:35 ` Andy Gross @ 2015-08-04 15:05 ` Archit Taneja 0 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-08-04 15:05 UTC (permalink / raw) To: Andy Gross Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, linux-arm-msm, sboyd, linux-kernel, devicetree On 8/4/2015 1:05 AM, Andy Gross wrote: > On Mon, Aug 03, 2015 at 10:38:18AM +0530, Archit Taneja wrote: >> Enable the NAND controller node on the AP148 platform. Provide pinmux >> information. >> >> Cc: devicetree@vger.kernel.org >> >> Signed-off-by: Archit Taneja <architt@codeaurora.org> >> --- >> arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 36 ++++++++++++++++++++++++++++++++ >> 1 file changed, 36 insertions(+) >> >> diff --git a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts >> index 7f9ea50..2e88eff 100644 >> --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts >> +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts >> @@ -30,6 +30,28 @@ >> bias-none; >> }; >> }; >> + nand_pins: nand_pins { >> + mux { >> + pins = "gpio34", "gpio35", "gpio36", >> + "gpio37", "gpio38", "gpio39", >> + "gpio40", "gpio41", "gpio42", >> + "gpio43", "gpio44", "gpio45", >> + "gpio46", "gpio47"; >> + function = "nand"; >> + drive-strength = <10>; >> + bias-disable; >> + }; >> + pullups { >> + pins = "gpio39"; >> + bias-pull-up; >> + }; >> + hold { >> + pins = "gpio40", "gpio41", "gpio42", >> + "gpio43", "gpio44", "gpio45", >> + "gpio46", "gpio47"; >> + bias-bus-hold; > > Maybe split out the bias-disable into a separate set and remove that property > from the mux. I'll fix this. Thanks, Archit -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v3 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform 2015-08-03 5:08 ` [PATCH v3 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform Archit Taneja 2015-08-03 19:35 ` Andy Gross @ 2015-08-03 20:58 ` Stephen Boyd 2015-08-04 15:06 ` Archit Taneja 1 sibling, 1 reply; 31+ messages in thread From: Stephen Boyd @ 2015-08-03 20:58 UTC (permalink / raw) To: Archit Taneja Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, linux-arm-msm, agross, linux-kernel, devicetree On 08/03, Archit Taneja wrote: > @@ -93,5 +115,19 @@ > sata@29000000 { > status = "ok"; > }; > + > + nand@1ac00000 { > + status = "ok"; > + > + pinctrl-0 = <&nand_pins>; > + pinctrl-names = "default"; > + > + nand-ecc-strength = <4>; > + nand-bus-width = <8>; > + }; > }; > }; > + > +&adm_dma { > + status = "ok"; > +}; I think the preference is to put the full path to the device in the dts file and then have status = "ok". So please move this into the soc node and give the correct offset, etc. like we've done for other nodes. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v3 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform 2015-08-03 20:58 ` Stephen Boyd @ 2015-08-04 15:06 ` Archit Taneja 0 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-08-04 15:06 UTC (permalink / raw) To: Stephen Boyd Cc: devicetree, dehrenberg, linux-arm-msm, cernekee, linux-kernel, linux-mtd, agross, computersforpeace On 8/4/2015 2:28 AM, Stephen Boyd wrote: > On 08/03, Archit Taneja wrote: >> @@ -93,5 +115,19 @@ >> sata@29000000 { >> status = "ok"; >> }; >> + >> + nand@1ac00000 { >> + status = "ok"; >> + >> + pinctrl-0 = <&nand_pins>; >> + pinctrl-names = "default"; >> + >> + nand-ecc-strength = <4>; >> + nand-bus-width = <8>; >> + }; >> }; >> }; >> + >> +&adm_dma { >> + status = "ok"; >> +}; > > I think the preference is to put the full path to the device in > the dts file and then have status = "ok". So please move this > into the soc node and give the correct offset, etc. like we've > done for other nodes. I'll do that. Archit -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 31+ messages in thread
[parent not found: <1439959746-25498-1-git-send-email-architt@codeaurora.org>]
* [PATCH v4 3/5] dt/bindings: qcom_nandc: Add DT bindings [not found] ` <1439959746-25498-1-git-send-email-architt@codeaurora.org> @ 2015-08-19 4:49 ` Archit Taneja 2015-12-16 6:33 ` Boris Brezillon 2015-08-19 4:49 ` [PATCH v4 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja ` (2 subsequent siblings) 3 siblings, 1 reply; 31+ messages in thread From: Archit Taneja @ 2015-08-19 4:49 UTC (permalink / raw) To: linux-mtd, dehrenberg, cernekee, computersforpeace, sboyd Cc: linux-arm-msm, agross, linux-kernel, Archit Taneja, devicetree Add DT bindings document for the Qualcomm NAND controller driver. Cc: devicetree@vger.kernel.org v4: - No changes v3: - Don't use '0x' when specifying nand controller address space - Add optional property for on-flash bbt usage Acked-by: Andy Gross <agross@codeaurora.org> Signed-off-by: Archit Taneja <architt@codeaurora.org> --- .../devicetree/bindings/mtd/qcom_nandc.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt new file mode 100644 index 0000000..1de4643 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt @@ -0,0 +1,49 @@ +* Qualcomm NAND controller + +Required properties: +- compatible: should be "qcom,ebi2-nand" for IPQ806x +- reg: MMIO address range +- clocks: must contain core clock and always on clock +- clock-names: must contain "core" for the core clock and "aon" for the + always on clock +- dmas: DMA specifier, consisting of a phandle to the ADM DMA + controller node and the channel number to be used for + NAND. Refer to dma.txt and qcom_adm.txt for more details +- dma-names: must be "rxtx" +- qcom,cmd-crci: must contain the ADM command type CRCI block instance + number specified for the NAND controller on the given + platform +- qcom,data-crci: must contain the ADM data type CRCI block instance + number specified for the NAND controller on the given + platform + +Optional properties: +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen + as default + +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 + bits. If not present, 4 is chosen as default +- nand-on-flash-bbt: Create/use on-flash bad block table + +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. + +Example: + +nand@1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + partition@0 { + ... + }; +}; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH v4 3/5] dt/bindings: qcom_nandc: Add DT bindings 2015-08-19 4:49 ` [PATCH v4 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja @ 2015-12-16 6:33 ` Boris Brezillon 2015-12-16 8:11 ` Archit Taneja 0 siblings, 1 reply; 31+ messages in thread From: Boris Brezillon @ 2015-12-16 6:33 UTC (permalink / raw) To: Archit Taneja Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, sboyd, linux-arm-msm, linux-kernel, devicetree, agross Hi Archit, Sorry for the late review, but there are a few things I think should be addressed. On Wed, 19 Aug 2015 10:19:04 +0530 Archit Taneja <architt@codeaurora.org> wrote: > Add DT bindings document for the Qualcomm NAND controller driver. > > Cc: devicetree@vger.kernel.org > > v4: > - No changes > > v3: > - Don't use '0x' when specifying nand controller address space > - Add optional property for on-flash bbt usage > > Acked-by: Andy Gross <agross@codeaurora.org> > Signed-off-by: Archit Taneja <architt@codeaurora.org> > --- > .../devicetree/bindings/mtd/qcom_nandc.txt | 49 ++++++++++++++++++++++ > 1 file changed, 49 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt > > diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > new file mode 100644 > index 0000000..1de4643 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > @@ -0,0 +1,49 @@ > +* Qualcomm NAND controller > + > +Required properties: > +- compatible: should be "qcom,ebi2-nand" for IPQ806x > +- reg: MMIO address range > +- clocks: must contain core clock and always on clock > +- clock-names: must contain "core" for the core clock and "aon" for the > + always on clock > +- dmas: DMA specifier, consisting of a phandle to the ADM DMA > + controller node and the channel number to be used for > + NAND. Refer to dma.txt and qcom_adm.txt for more details > +- dma-names: must be "rxtx" > +- qcom,cmd-crci: must contain the ADM command type CRCI block instance > + number specified for the NAND controller on the given > + platform > +- qcom,data-crci: must contain the ADM data type CRCI block instance > + number specified for the NAND controller on the given > + platform > + > +Optional properties: > +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen > + as default > + > +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 > + bits. If not present, 4 is chosen as default > +- nand-on-flash-bbt: Create/use on-flash bad block table > + > +The device tree may optionally contain sub-nodes describing partitions of the > +address space. See partition.txt for more detail. > + > +Example: > + > +nand@1ac00000 { > + compatible = "qcom,ebi2-nandc"; > + reg = <0x1ac00000 0x800>; > + > + clocks = <&gcc EBI2_CLK>, > + <&gcc EBI2_AON_CLK>; > + clock-names = "core", "aon"; > + > + dmas = <&adm_dma 3>; > + dma-names = "rxtx"; > + qcom,cmd-crci = <15>; > + qcom,data-crci = <3>; > + > + partition@0 { > + ... > + }; > +}; According to the registers layout defined in your driver, your NAND controller can address multiple chips (NAND_DEV_SEL register). Since DT bindings are supposed to be as stable as possible, I would recommend separating the NAND controller and NAND chip declaration (as done here [1] and here [2]). Best Regards, Boris [1]http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt [2]http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/mtd/sunxi-nand.txt -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 3/5] dt/bindings: qcom_nandc: Add DT bindings 2015-12-16 6:33 ` Boris Brezillon @ 2015-12-16 8:11 ` Archit Taneja 0 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-12-16 8:11 UTC (permalink / raw) To: Boris Brezillon Cc: linux-mtd, dehrenberg, cernekee, computersforpeace, sboyd, linux-arm-msm, linux-kernel, devicetree, agross Hi Boris, On 12/16/2015 12:03 PM, Boris Brezillon wrote: > Hi Archit, > > Sorry for the late review, but there are a few things I think should be > addressed. > > On Wed, 19 Aug 2015 10:19:04 +0530 > Archit Taneja <architt@codeaurora.org> wrote: > >> Add DT bindings document for the Qualcomm NAND controller driver. >> >> Cc: devicetree@vger.kernel.org >> >> v4: >> - No changes >> >> v3: >> - Don't use '0x' when specifying nand controller address space >> - Add optional property for on-flash bbt usage >> >> Acked-by: Andy Gross <agross@codeaurora.org> >> Signed-off-by: Archit Taneja <architt@codeaurora.org> >> --- >> .../devicetree/bindings/mtd/qcom_nandc.txt | 49 ++++++++++++++++++++++ >> 1 file changed, 49 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt >> >> diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt >> new file mode 100644 >> index 0000000..1de4643 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt >> @@ -0,0 +1,49 @@ >> +* Qualcomm NAND controller >> + >> +Required properties: >> +- compatible: should be "qcom,ebi2-nand" for IPQ806x >> +- reg: MMIO address range >> +- clocks: must contain core clock and always on clock >> +- clock-names: must contain "core" for the core clock and "aon" for the >> + always on clock >> +- dmas: DMA specifier, consisting of a phandle to the ADM DMA >> + controller node and the channel number to be used for >> + NAND. Refer to dma.txt and qcom_adm.txt for more details >> +- dma-names: must be "rxtx" >> +- qcom,cmd-crci: must contain the ADM command type CRCI block instance >> + number specified for the NAND controller on the given >> + platform >> +- qcom,data-crci: must contain the ADM data type CRCI block instance >> + number specified for the NAND controller on the given >> + platform >> + >> +Optional properties: >> +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen >> + as default >> + >> +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 >> + bits. If not present, 4 is chosen as default >> +- nand-on-flash-bbt: Create/use on-flash bad block table >> + >> +The device tree may optionally contain sub-nodes describing partitions of the >> +address space. See partition.txt for more detail. >> + >> +Example: >> + >> +nand@1ac00000 { >> + compatible = "qcom,ebi2-nandc"; >> + reg = <0x1ac00000 0x800>; >> + >> + clocks = <&gcc EBI2_CLK>, >> + <&gcc EBI2_AON_CLK>; >> + clock-names = "core", "aon"; >> + >> + dmas = <&adm_dma 3>; >> + dma-names = "rxtx"; >> + qcom,cmd-crci = <15>; >> + qcom,data-crci = <3>; >> + >> + partition@0 { >> + ... >> + }; >> +}; > > > According to the registers layout defined in your driver, your NAND > controller can address multiple chips (NAND_DEV_SEL register). Since DT > bindings are supposed to be as stable as possible, I would recommend > separating the NAND controller and NAND chip declaration (as done here > [1] and here [2]). Yes, the controller does support multiple chips, but the driver only supports one chip for now. I'll make changes such that the driver works in accordance to the DT bindings format you shared. Thanks for the review. Archit > > Best Regards, > > Boris > > [1]http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt > [2]http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/mtd/sunxi-nand.txt > > -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v4 4/5] arm: qcom: dts: Add NAND controller node for ipq806x [not found] ` <1439959746-25498-1-git-send-email-architt@codeaurora.org> 2015-08-19 4:49 ` [PATCH v4 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja @ 2015-08-19 4:49 ` Archit Taneja 2015-08-19 4:49 ` [PATCH v4 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform Archit Taneja [not found] ` <1451971501-18160-1-git-send-email-architt@codeaurora.org> 3 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-08-19 4:49 UTC (permalink / raw) To: linux-mtd, dehrenberg, cernekee, computersforpeace, sboyd Cc: linux-arm-msm, agross, linux-kernel, Archit Taneja, devicetree The nand controller in IPQ806x is of the 'EBI2 type'. Use the corresponding compatible string. Cc: devicetree@vger.kernel.org Reviewed-by: Andy Gross <agross@codeaurora.org> Signed-off-by: Archit Taneja <architt@codeaurora.org> --- arch/arm/boot/dts/qcom-ipq8064.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi index 1e1b3f0..a7f0ee5 100644 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -350,5 +350,20 @@ status = "disabled"; }; + nand@1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + status = "disabled"; + }; }; }; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH v4 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform [not found] ` <1439959746-25498-1-git-send-email-architt@codeaurora.org> 2015-08-19 4:49 ` [PATCH v4 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja 2015-08-19 4:49 ` [PATCH v4 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja @ 2015-08-19 4:49 ` Archit Taneja [not found] ` <1451971501-18160-1-git-send-email-architt@codeaurora.org> 3 siblings, 0 replies; 31+ messages in thread From: Archit Taneja @ 2015-08-19 4:49 UTC (permalink / raw) To: linux-mtd, dehrenberg, cernekee, computersforpeace, sboyd Cc: linux-arm-msm, agross, linux-kernel, Archit Taneja, devicetree Enable the NAND controller node on the AP148 platform. Provide pinmux information. v4: - Move bias-disable out of mux and create a separate group for it. - Place the dma node inside soc node and give the full path with address. v3, v2, v1: - No changes Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja <architt@codeaurora.org> --- arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts index 7f9ea50..648994c 100644 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts @@ -30,6 +30,32 @@ bias-none; }; }; + nand_pins: nand_pins { + mux { + pins = "gpio34", "gpio35", "gpio36", + "gpio37", "gpio38", "gpio39", + "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + function = "nand"; + drive-strength = <10>; + }; + disable { + pins = "gpio34", "gpio35", "gpio36", + "gpio37", "gpio38"; + bias-disable; + }; + pullups { + pins = "gpio39"; + bias-pull-up; + }; + hold { + pins = "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + bias-bus-hold; + }; + }; }; gsbi@16300000 { @@ -93,5 +119,19 @@ sata@29000000 { status = "ok"; }; + + dma@18300000 { + status = "ok"; + }; + + nand@1ac00000 { + status = "ok"; + + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + + nand-ecc-strength = <4>; + nand-bus-width = <8>; + }; }; }; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
[parent not found: <1451971501-18160-1-git-send-email-architt@codeaurora.org>]
* [PATCH v5 3/3] dt/bindings: qcom_nandc: Add DT bindings [not found] ` <1451971501-18160-1-git-send-email-architt@codeaurora.org> @ 2016-01-05 5:25 ` Archit Taneja 2016-01-06 15:05 ` Boris Brezillon 2016-01-06 15:14 ` Rob Herring [not found] ` <1453110634-25995-1-git-send-email-architt@codeaurora.org> 1 sibling, 2 replies; 31+ messages in thread From: Archit Taneja @ 2016-01-05 5:25 UTC (permalink / raw) To: computersforpeace, boris.brezillon Cc: linux-mtd, cernekee, sboyd, andy.gross, dehrenberg, linux-arm-msm, Archit Taneja, devicetree, Rob Herring Add DT bindings document for the Qualcomm NAND controller driver. Cc: devicetree@vger.kernel.org Cc: Rob Herring <robh@kernel.org> Signed-off-by: Archit Taneja <architt@codeaurora.org> --- v5: - Make changes to incorporate chip select sub nodes (brcmnand taken as reference) v3: - Don't use '0x' when specifying nand controller address space - Add optional property for on-flash bbt usage .../devicetree/bindings/mtd/qcom_nandc.txt | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt new file mode 100644 index 0000000..b2cf2d9 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt @@ -0,0 +1,84 @@ +* Qualcomm NAND controller + +Required properties: +- compatible: should be "qcom,ebi2-nand" for IPQ806x +- reg: MMIO address range +- clocks: must contain core clock and always on clock +- clock-names: must contain "core" for the core clock and "aon" for the + always on clock +- dmas: DMA specifier, consisting of a phandle to the ADM DMA + controller node and the channel number to be used for + NAND. Refer to dma.txt and qcom_adm.txt for more details +- dma-names: must be "rxtx" +- qcom,cmd-crci: must contain the ADM command type CRCI block instance + number specified for the NAND controller on the given + platform +- qcom,data-crci: must contain the ADM data type CRCI block instance + number specified for the NAND controller on the given + platform +- #address-cells: <1> - subnodes give the chip-select number +- #size-cells: <0> + +* NAND chip-select + +Each controller may contain one or more subnodes to represent enabled +chip-selects which (may) contain NAND flash chips. Their properties are as +follows. + +Required properties: +- compatible: should contain "qcom,nandcs" +- reg: a single integer representing the chip-select + number (e.g., 0, 1, 2, etc.) +- #address-cells: see partition.txt +- #size-cells: see partition.txt +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 + bits. +- nand-ecc-step-size: bytes of data per ECC step. Must be 512. + +Optional properties: +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen + as default + +Each nandcs device node may optionally contain sub-nodes describing the flash +partition mapping. See partition.txt for more detail. + +Example: + +nand@1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + #address-cells = <1>; + #size-cells = <0>; + + nandcs@0 { + compatible = "qcom,nandcs"; + reg = <0>; + + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + nand-bus-width = <8>; + + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "boot-nand"; + reg = <0 0x58a0000>; + }; + + partition@58a0000 { + label = "fs-nand"; + reg = <0x58a0000 0x4000000>; + }; + }; +}; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH v5 3/3] dt/bindings: qcom_nandc: Add DT bindings 2016-01-05 5:25 ` [PATCH v5 3/3] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja @ 2016-01-06 15:05 ` Boris Brezillon 2016-01-06 15:14 ` Rob Herring 1 sibling, 0 replies; 31+ messages in thread From: Boris Brezillon @ 2016-01-06 15:05 UTC (permalink / raw) To: Archit Taneja Cc: computersforpeace, devicetree, Rob Herring, linux-arm-msm, cernekee, sboyd, linux-mtd, dehrenberg, andy.gross Hi Archit, On Tue, 5 Jan 2016 10:55:01 +0530 Archit Taneja <architt@codeaurora.org> wrote: > Add DT bindings document for the Qualcomm NAND controller driver. > > Cc: devicetree@vger.kernel.org > Cc: Rob Herring <robh@kernel.org> > Signed-off-by: Archit Taneja <architt@codeaurora.org> > --- > v5: > - Make changes to incorporate chip select sub nodes (brcmnand taken as > reference) > > v3: > - Don't use '0x' when specifying nand controller address space > - Add optional property for on-flash bbt usage > > .../devicetree/bindings/mtd/qcom_nandc.txt | 84 ++++++++++++++++++++++ > 1 file changed, 84 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt > > diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > new file mode 100644 > index 0000000..b2cf2d9 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > @@ -0,0 +1,84 @@ > +* Qualcomm NAND controller > + > +Required properties: > +- compatible: should be "qcom,ebi2-nand" for IPQ806x > +- reg: MMIO address range > +- clocks: must contain core clock and always on clock > +- clock-names: must contain "core" for the core clock and "aon" for the > + always on clock > +- dmas: DMA specifier, consisting of a phandle to the ADM DMA > + controller node and the channel number to be used for > + NAND. Refer to dma.txt and qcom_adm.txt for more details > +- dma-names: must be "rxtx" > +- qcom,cmd-crci: must contain the ADM command type CRCI block instance > + number specified for the NAND controller on the given > + platform > +- qcom,data-crci: must contain the ADM data type CRCI block instance > + number specified for the NAND controller on the given > + platform > +- #address-cells: <1> - subnodes give the chip-select number > +- #size-cells: <0> > + > +* NAND chip-select > + > +Each controller may contain one or more subnodes to represent enabled > +chip-selects which (may) contain NAND flash chips. Their properties are as > +follows. > + > +Required properties: > +- compatible: should contain "qcom,nandcs" > +- reg: a single integer representing the chip-select > + number (e.g., 0, 1, 2, etc.) > +- #address-cells: see partition.txt > +- #size-cells: see partition.txt > +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 > + bits. > +- nand-ecc-step-size: bytes of data per ECC step. Must be 512. > + > +Optional properties: > +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen > + as default You should probably reference Documentation/devicetree/bindings/mtd/nand.txt which is documenting generic nand-xxx properties. > + > +Each nandcs device node may optionally contain sub-nodes describing the flash > +partition mapping. See partition.txt for more detail. > + > +Example: > + > +nand@1ac00000 { > + compatible = "qcom,ebi2-nandc"; > + reg = <0x1ac00000 0x800>; > + > + clocks = <&gcc EBI2_CLK>, > + <&gcc EBI2_AON_CLK>; > + clock-names = "core", "aon"; > + > + dmas = <&adm_dma 3>; > + dma-names = "rxtx"; > + qcom,cmd-crci = <15>; > + qcom,data-crci = <3>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + nandcs@0 { > + compatible = "qcom,nandcs"; > + reg = <0>; > + > + nand-ecc-strength = <4>; > + nand-ecc-step-size = <512>; > + nand-bus-width = <8>; > + It's now recommended to define a 'partitions' subnode to store those partition nodes. > + #address-cells = <1>; > + #size-cells = <1>; > + > + partition@0 { > + label = "boot-nand"; > + reg = <0 0x58a0000>; > + }; > + > + partition@58a0000 { > + label = "fs-nand"; > + reg = <0x58a0000 0x4000000>; > + }; > + }; > +}; The rest looks good to me. Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v5 3/3] dt/bindings: qcom_nandc: Add DT bindings 2016-01-05 5:25 ` [PATCH v5 3/3] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja 2016-01-06 15:05 ` Boris Brezillon @ 2016-01-06 15:14 ` Rob Herring 2016-01-06 15:37 ` Boris Brezillon 1 sibling, 1 reply; 31+ messages in thread From: Rob Herring @ 2016-01-06 15:14 UTC (permalink / raw) To: Archit Taneja Cc: computersforpeace, boris.brezillon, linux-mtd, cernekee, sboyd, andy.gross, dehrenberg, linux-arm-msm, devicetree On Tue, Jan 05, 2016 at 10:55:01AM +0530, Archit Taneja wrote: > Add DT bindings document for the Qualcomm NAND controller driver. > > Cc: devicetree@vger.kernel.org > Cc: Rob Herring <robh@kernel.org> > Signed-off-by: Archit Taneja <architt@codeaurora.org> > --- > v5: > - Make changes to incorporate chip select sub nodes (brcmnand taken as > reference) > > v3: > - Don't use '0x' when specifying nand controller address space > - Add optional property for on-flash bbt usage > > .../devicetree/bindings/mtd/qcom_nandc.txt | 84 ++++++++++++++++++++++ > 1 file changed, 84 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt > > diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > new file mode 100644 > index 0000000..b2cf2d9 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > @@ -0,0 +1,84 @@ > +* Qualcomm NAND controller > + > +Required properties: > +- compatible: should be "qcom,ebi2-nand" for IPQ806x More specific name please. > +- reg: MMIO address range > +- clocks: must contain core clock and always on clock > +- clock-names: must contain "core" for the core clock and "aon" for the > + always on clock > +- dmas: DMA specifier, consisting of a phandle to the ADM DMA > + controller node and the channel number to be used for > + NAND. Refer to dma.txt and qcom_adm.txt for more details > +- dma-names: must be "rxtx" > +- qcom,cmd-crci: must contain the ADM command type CRCI block instance > + number specified for the NAND controller on the given > + platform > +- qcom,data-crci: must contain the ADM data type CRCI block instance > + number specified for the NAND controller on the given > + platform > +- #address-cells: <1> - subnodes give the chip-select number > +- #size-cells: <0> > + > +* NAND chip-select > + > +Each controller may contain one or more subnodes to represent enabled > +chip-selects which (may) contain NAND flash chips. Their properties are as > +follows. > + > +Required properties: > +- compatible: should contain "qcom,nandcs" > +- reg: a single integer representing the chip-select > + number (e.g., 0, 1, 2, etc.) > +- #address-cells: see partition.txt > +- #size-cells: see partition.txt > +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 > + bits. > +- nand-ecc-step-size: bytes of data per ECC step. Must be 512. > + > +Optional properties: > +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen > + as default > + > +Each nandcs device node may optionally contain sub-nodes describing the flash > +partition mapping. See partition.txt for more detail. Can't the partitioning span across chip selects? After all, interleaving is how you get high performance. Rob ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v5 3/3] dt/bindings: qcom_nandc: Add DT bindings 2016-01-06 15:14 ` Rob Herring @ 2016-01-06 15:37 ` Boris Brezillon 2016-01-06 16:13 ` Rob Herring 0 siblings, 1 reply; 31+ messages in thread From: Boris Brezillon @ 2016-01-06 15:37 UTC (permalink / raw) To: Rob Herring Cc: Archit Taneja, computersforpeace, linux-mtd, cernekee, sboyd, andy.gross, dehrenberg, linux-arm-msm, devicetree On Wed, 6 Jan 2016 09:14:44 -0600 Rob Herring <robh@kernel.org> wrote: > On Tue, Jan 05, 2016 at 10:55:01AM +0530, Archit Taneja wrote: > > Add DT bindings document for the Qualcomm NAND controller driver. > > > > Cc: devicetree@vger.kernel.org > > Cc: Rob Herring <robh@kernel.org> > > Signed-off-by: Archit Taneja <architt@codeaurora.org> > > --- > > v5: > > - Make changes to incorporate chip select sub nodes (brcmnand taken as > > reference) > > > > v3: > > - Don't use '0x' when specifying nand controller address space > > - Add optional property for on-flash bbt usage > > > > .../devicetree/bindings/mtd/qcom_nandc.txt | 84 ++++++++++++++++++++++ > > 1 file changed, 84 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt > > > > diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > > new file mode 100644 > > index 0000000..b2cf2d9 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > > @@ -0,0 +1,84 @@ > > +* Qualcomm NAND controller > > + > > +Required properties: > > +- compatible: should be "qcom,ebi2-nand" for IPQ806x > > More specific name please. > > > +- reg: MMIO address range > > +- clocks: must contain core clock and always on clock > > +- clock-names: must contain "core" for the core clock and "aon" for the > > + always on clock > > +- dmas: DMA specifier, consisting of a phandle to the ADM DMA > > + controller node and the channel number to be used for > > + NAND. Refer to dma.txt and qcom_adm.txt for more details > > +- dma-names: must be "rxtx" > > +- qcom,cmd-crci: must contain the ADM command type CRCI block instance > > + number specified for the NAND controller on the given > > + platform > > +- qcom,data-crci: must contain the ADM data type CRCI block instance > > + number specified for the NAND controller on the given > > + platform > > +- #address-cells: <1> - subnodes give the chip-select number > > +- #size-cells: <0> > > + > > +* NAND chip-select > > + > > +Each controller may contain one or more subnodes to represent enabled > > +chip-selects which (may) contain NAND flash chips. Their properties are as > > +follows. > > + > > +Required properties: > > +- compatible: should contain "qcom,nandcs" > > +- reg: a single integer representing the chip-select > > + number (e.g., 0, 1, 2, etc.) > > +- #address-cells: see partition.txt > > +- #size-cells: see partition.txt > > +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 > > + bits. > > +- nand-ecc-step-size: bytes of data per ECC step. Must be 512. > > + > > +Optional properties: > > +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen > > + as default > > + > > +Each nandcs device node may optionally contain sub-nodes describing the flash > > +partition mapping. See partition.txt for more detail. > > Can't the partitioning span across chip selects? After all, interleaving > is how you get high performance. Hm, defining aggregated mtd devices in the DT is not supported, and since, as I've been told many times ;), DT is supposed to represent the HW not what we want to do with it, I'm not sure that's such a good idea. Note that the infrastructure to concatenate several MTD devices already exists, but it's not used by the NAND layer. Also note that some NAND chips embed several dies and expose multiple CS lines. The NAND framework already supports assigning different CS lines to a single NAND device, so you could abuse this feature and expose your different NAND devices as a single one (that will only work for a cluster of identical chips connected to the same controller), but I'd really like to avoid this kind of things. -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v5 3/3] dt/bindings: qcom_nandc: Add DT bindings 2016-01-06 15:37 ` Boris Brezillon @ 2016-01-06 16:13 ` Rob Herring 2016-01-06 16:36 ` Boris Brezillon 0 siblings, 1 reply; 31+ messages in thread From: Rob Herring @ 2016-01-06 16:13 UTC (permalink / raw) To: Boris Brezillon Cc: Archit Taneja, Brian Norris, linux-mtd@lists.infradead.org, Kevin Cernekee, Stephen Boyd, andy.gross, dehrenberg, linux-arm-msm, devicetree@vger.kernel.org On Wed, Jan 6, 2016 at 9:37 AM, Boris Brezillon <boris.brezillon@free-electrons.com> wrote: > On Wed, 6 Jan 2016 09:14:44 -0600 > Rob Herring <robh@kernel.org> wrote: > >> On Tue, Jan 05, 2016 at 10:55:01AM +0530, Archit Taneja wrote: >> > Add DT bindings document for the Qualcomm NAND controller driver. >> > >> > Cc: devicetree@vger.kernel.org >> > Cc: Rob Herring <robh@kernel.org> >> > Signed-off-by: Archit Taneja <architt@codeaurora.org> >> > --- >> > v5: >> > - Make changes to incorporate chip select sub nodes (brcmnand taken as >> > reference) >> > >> > v3: >> > - Don't use '0x' when specifying nand controller address space >> > - Add optional property for on-flash bbt usage >> > >> > .../devicetree/bindings/mtd/qcom_nandc.txt | 84 ++++++++++++++++++++++ >> > 1 file changed, 84 insertions(+) >> > create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt >> > >> > diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt >> > new file mode 100644 >> > index 0000000..b2cf2d9 >> > --- /dev/null >> > +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt >> > @@ -0,0 +1,84 @@ >> > +* Qualcomm NAND controller >> > + >> > +Required properties: >> > +- compatible: should be "qcom,ebi2-nand" for IPQ806x >> >> More specific name please. >> >> > +- reg: MMIO address range >> > +- clocks: must contain core clock and always on clock >> > +- clock-names: must contain "core" for the core clock and "aon" for the >> > + always on clock >> > +- dmas: DMA specifier, consisting of a phandle to the ADM DMA >> > + controller node and the channel number to be used for >> > + NAND. Refer to dma.txt and qcom_adm.txt for more details >> > +- dma-names: must be "rxtx" >> > +- qcom,cmd-crci: must contain the ADM command type CRCI block instance >> > + number specified for the NAND controller on the given >> > + platform >> > +- qcom,data-crci: must contain the ADM data type CRCI block instance >> > + number specified for the NAND controller on the given >> > + platform >> > +- #address-cells: <1> - subnodes give the chip-select number >> > +- #size-cells: <0> >> > + >> > +* NAND chip-select >> > + >> > +Each controller may contain one or more subnodes to represent enabled >> > +chip-selects which (may) contain NAND flash chips. Their properties are as >> > +follows. >> > + >> > +Required properties: >> > +- compatible: should contain "qcom,nandcs" >> > +- reg: a single integer representing the chip-select >> > + number (e.g., 0, 1, 2, etc.) >> > +- #address-cells: see partition.txt >> > +- #size-cells: see partition.txt >> > +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 >> > + bits. >> > +- nand-ecc-step-size: bytes of data per ECC step. Must be 512. >> > + >> > +Optional properties: >> > +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen >> > + as default >> > + >> > +Each nandcs device node may optionally contain sub-nodes describing the flash >> > +partition mapping. See partition.txt for more detail. >> >> Can't the partitioning span across chip selects? After all, interleaving >> is how you get high performance. > > Hm, defining aggregated mtd devices in the DT is not supported, and > since, as I've been told many times ;), DT is supposed to represent the > HW not what we want to do with it, I'm not sure that's such a good idea. What are partitions then? > Note that the infrastructure to concatenate several MTD devices > already exists, but it's not used by the NAND layer. > > Also note that some NAND chips embed several dies and expose multiple > CS lines. The NAND framework already supports assigning different CS > lines to a single NAND device, so you could abuse this feature and > expose your different NAND devices as a single one (that will only work > for a cluster of identical chips connected to the same controller), but > I'd really like to avoid this kind of things. What exactly the kernel supports ATM is irrelevant. I'm fully aware that the kernel's NAND support has huge gaps in its ability to support raw NAND at typical SSD speeds. My last employer had delusions about doing that. Fortunately, NAND manufacturers don't really want to sell you raw NAND anyway. My point here was only that the partitions node may not be under the CS nodes, but at the same level. Or maybe partitions in DT just doesn't make sense at all for interleaved cases. Rob ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v5 3/3] dt/bindings: qcom_nandc: Add DT bindings 2016-01-06 16:13 ` Rob Herring @ 2016-01-06 16:36 ` Boris Brezillon 0 siblings, 0 replies; 31+ messages in thread From: Boris Brezillon @ 2016-01-06 16:36 UTC (permalink / raw) To: Rob Herring Cc: Archit Taneja, Brian Norris, linux-mtd@lists.infradead.org, Kevin Cernekee, Stephen Boyd, andy.gross, dehrenberg, linux-arm-msm, devicetree@vger.kernel.org On Wed, 6 Jan 2016 10:13:57 -0600 Rob Herring <robh@kernel.org> wrote: > On Wed, Jan 6, 2016 at 9:37 AM, Boris Brezillon > <boris.brezillon@free-electrons.com> wrote: > > On Wed, 6 Jan 2016 09:14:44 -0600 > > Rob Herring <robh@kernel.org> wrote: > > > >> On Tue, Jan 05, 2016 at 10:55:01AM +0530, Archit Taneja wrote: > >> > Add DT bindings document for the Qualcomm NAND controller driver. > >> > > >> > Cc: devicetree@vger.kernel.org > >> > Cc: Rob Herring <robh@kernel.org> > >> > Signed-off-by: Archit Taneja <architt@codeaurora.org> > >> > --- > >> > v5: > >> > - Make changes to incorporate chip select sub nodes (brcmnand taken as > >> > reference) > >> > > >> > v3: > >> > - Don't use '0x' when specifying nand controller address space > >> > - Add optional property for on-flash bbt usage > >> > > >> > .../devicetree/bindings/mtd/qcom_nandc.txt | 84 ++++++++++++++++++++++ > >> > 1 file changed, 84 insertions(+) > >> > create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt > >> > > >> > diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > >> > new file mode 100644 > >> > index 0000000..b2cf2d9 > >> > --- /dev/null > >> > +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt > >> > @@ -0,0 +1,84 @@ > >> > +* Qualcomm NAND controller > >> > + > >> > +Required properties: > >> > +- compatible: should be "qcom,ebi2-nand" for IPQ806x > >> > >> More specific name please. > >> > >> > +- reg: MMIO address range > >> > +- clocks: must contain core clock and always on clock > >> > +- clock-names: must contain "core" for the core clock and "aon" for the > >> > + always on clock > >> > +- dmas: DMA specifier, consisting of a phandle to the ADM DMA > >> > + controller node and the channel number to be used for > >> > + NAND. Refer to dma.txt and qcom_adm.txt for more details > >> > +- dma-names: must be "rxtx" > >> > +- qcom,cmd-crci: must contain the ADM command type CRCI block instance > >> > + number specified for the NAND controller on the given > >> > + platform > >> > +- qcom,data-crci: must contain the ADM data type CRCI block instance > >> > + number specified for the NAND controller on the given > >> > + platform > >> > +- #address-cells: <1> - subnodes give the chip-select number > >> > +- #size-cells: <0> > >> > + > >> > +* NAND chip-select > >> > + > >> > +Each controller may contain one or more subnodes to represent enabled > >> > +chip-selects which (may) contain NAND flash chips. Their properties are as > >> > +follows. > >> > + > >> > +Required properties: > >> > +- compatible: should contain "qcom,nandcs" > >> > +- reg: a single integer representing the chip-select > >> > + number (e.g., 0, 1, 2, etc.) > >> > +- #address-cells: see partition.txt > >> > +- #size-cells: see partition.txt > >> > +- nand-ecc-strength: number of bits to correct per ECC step. Must be 4 or 8 > >> > + bits. > >> > +- nand-ecc-step-size: bytes of data per ECC step. Must be 512. > >> > + > >> > +Optional properties: > >> > +- nand-bus-width: bus width. Must be 8 or 16. If not present, 8 is chosen > >> > + as default > >> > + > >> > +Each nandcs device node may optionally contain sub-nodes describing the flash > >> > +partition mapping. See partition.txt for more detail. > >> > >> Can't the partitioning span across chip selects? After all, interleaving > >> is how you get high performance. > > > > Hm, defining aggregated mtd devices in the DT is not supported, and > > since, as I've been told many times ;), DT is supposed to represent the > > HW not what we want to do with it, I'm not sure that's such a good idea. > > What are partitions then? It's definitely not describing the hardware, and I never said describing partitions in the DT was following the number one rule: "only describe your HW" ;-). I'm generally not in favor of this kind of restrictions, I'm just pointing the irony of the situation here :p. > > > Note that the infrastructure to concatenate several MTD devices > > already exists, but it's not used by the NAND layer. > > > > Also note that some NAND chips embed several dies and expose multiple > > CS lines. The NAND framework already supports assigning different CS > > lines to a single NAND device, so you could abuse this feature and > > expose your different NAND devices as a single one (that will only work > > for a cluster of identical chips connected to the same controller), but > > I'd really like to avoid this kind of things. > > What exactly the kernel supports ATM is irrelevant. I'm fully aware > that the kernel's NAND support has huge gaps in its ability to support > raw NAND at typical SSD speeds. My last employer had delusions about > doing that. Fortunately, NAND manufacturers don't really want to sell > you raw NAND anyway. > > My point here was only that the partitions node may not be under the > CS nodes, but at the same level. Or maybe partitions in DT just > doesn't make sense at all for interleaved cases. IMHO, if we had to support this aggregation feature, the NAND cluster should be represented using a different node, outside of the nand controller node. Theoretically, you can perfectly have several NAND chips connected to different NAND controllers, but still want to aggregate those chips into a single entity. Anyway, that's not the topic here, and since other bindings are already describing partitions under the nand device node and not the nand controller node, I think we can keep doing like this until we find a better solution. Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 31+ messages in thread
[parent not found: <1453110634-25995-1-git-send-email-architt@codeaurora.org>]
* [PATCH v6 3/3] dt/bindings: qcom_nandc: Add DT bindings [not found] ` <1453110634-25995-1-git-send-email-architt@codeaurora.org> @ 2016-01-18 9:50 ` Archit Taneja 2016-01-20 14:46 ` Rob Herring 0 siblings, 1 reply; 31+ messages in thread From: Archit Taneja @ 2016-01-18 9:50 UTC (permalink / raw) To: computersforpeace, boris.brezillon Cc: linux-mtd, cernekee, sboyd, andy.gross, dehrenberg, linux-arm-msm, Archit Taneja, devicetree, Rob Herring Add DT bindings document for the Qualcomm NAND controller driver. Cc: devicetree@vger.kernel.org Cc: Rob Herring <robh@kernel.org> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> --- v6: - Update compatible tring to something more specific - Refer to nand.txt for standard properties - In the example, use 'partitions' node to hold the partition subnodes v5: - Make changes to incorporate chip select sub nodes (brcmnand taken as reference) v3: - Don't use '0x' when specifying nand controller address space - Add optional property for on-flash bbt usage .../devicetree/bindings/mtd/qcom_nandc.txt | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt new file mode 100644 index 0000000..70dd511 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt @@ -0,0 +1,86 @@ +* Qualcomm NAND controller + +Required properties: +- compatible: should be "qcom,ipq806x-nand" +- reg: MMIO address range +- clocks: must contain core clock and always on clock +- clock-names: must contain "core" for the core clock and "aon" for the + always on clock +- dmas: DMA specifier, consisting of a phandle to the ADM DMA + controller node and the channel number to be used for + NAND. Refer to dma.txt and qcom_adm.txt for more details +- dma-names: must be "rxtx" +- qcom,cmd-crci: must contain the ADM command type CRCI block instance + number specified for the NAND controller on the given + platform +- qcom,data-crci: must contain the ADM data type CRCI block instance + number specified for the NAND controller on the given + platform +- #address-cells: <1> - subnodes give the chip-select number +- #size-cells: <0> + +* NAND chip-select + +Each controller may contain one or more subnodes to represent enabled +chip-selects which (may) contain NAND flash chips. Their properties are as +follows. + +Required properties: +- compatible: should contain "qcom,nandcs" +- reg: a single integer representing the chip-select + number (e.g., 0, 1, 2, etc.) +- #address-cells: see partition.txt +- #size-cells: see partition.txt +- nand-ecc-strength: see nand.txt +- nand-ecc-step-size: must be 512. see nand.txt for more details. + +Optional properties: +- nand-bus-width: see nand.txt + +Each nandcs device node may optionally contain a 'partitions' sub-node, which +further contains sub-nodes describing the flash partition mapping. See +partition.txt for more detail. + +Example: + +nand@1ac00000 { + compatible = "qcom,ebi2-nandc"; + reg = <0x1ac00000 0x800>; + + clocks = <&gcc EBI2_CLK>, + <&gcc EBI2_AON_CLK>; + clock-names = "core", "aon"; + + dmas = <&adm_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + #address-cells = <1>; + #size-cells = <0>; + + nandcs@0 { + compatible = "qcom,nandcs"; + reg = <0>; + + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + nand-bus-width = <8>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "boot-nand"; + reg = <0 0x58a0000>; + }; + + partition@58a0000 { + label = "fs-nand"; + reg = <0x58a0000 0x4000000>; + }; + }; + }; +}; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH v6 3/3] dt/bindings: qcom_nandc: Add DT bindings 2016-01-18 9:50 ` [PATCH v6 " Archit Taneja @ 2016-01-20 14:46 ` Rob Herring 0 siblings, 0 replies; 31+ messages in thread From: Rob Herring @ 2016-01-20 14:46 UTC (permalink / raw) To: Archit Taneja Cc: computersforpeace, boris.brezillon, linux-mtd, cernekee, sboyd, andy.gross, dehrenberg, linux-arm-msm, devicetree On Mon, Jan 18, 2016 at 03:20:34PM +0530, Archit Taneja wrote: > Add DT bindings document for the Qualcomm NAND controller driver. > > Cc: devicetree@vger.kernel.org > Cc: Rob Herring <robh@kernel.org> > > Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> > Signed-off-by: Archit Taneja <architt@codeaurora.org> > --- > v6: > - Update compatible tring to something more specific > - Refer to nand.txt for standard properties > - In the example, use 'partitions' node to hold the partition subnodes > > v5: > - Make changes to incorporate chip select sub nodes (brcmnand taken as > reference) > > v3: > - Don't use '0x' when specifying nand controller address space > - Add optional property for on-flash bbt usage > > .../devicetree/bindings/mtd/qcom_nandc.txt | 86 ++++++++++++++++++++++ > 1 file changed, 86 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/qcom_nandc.txt Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2016-01-20 14:46 UTC | newest] Thread overview: 31+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1421419702-17812-1-git-send-email-architt@codeaurora.org> [not found] ` <1421419702-17812-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> 2015-01-16 14:48 ` [PATCH 3/5] Documentaion: dt: add DT bindings for Qualcomm NAND controller Archit Taneja 2015-01-16 14:48 ` [PATCH 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja 2015-01-16 14:48 ` [PATCH 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 pplatform Archit Taneja [not found] ` <1437474886-6209-1-git-send-email-architt@codeaurora.org> 2015-07-21 10:34 ` [PATCH v2 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja 2015-07-24 18:57 ` Andy Gross 2015-07-24 19:37 ` Stephen Boyd 2015-07-21 10:34 ` [PATCH v2 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja 2015-07-24 19:01 ` Andy Gross 2015-07-21 10:34 ` [PATCH v2 5/5] arm: qcom: dts: Enale NAND node on IPQ8064 AP148 platform Archit Taneja 2015-07-24 18:58 ` Andy Gross 2015-07-24 18:59 ` Andy Gross [not found] ` <1438578498-32254-1-git-send-email-architt@codeaurora.org> 2015-08-03 5:08 ` [PATCH v3 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja 2015-08-03 5:08 ` [PATCH v3 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja [not found] ` <1438578498-32254-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> 2015-08-03 5:08 ` [PATCH v3 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform Archit Taneja 2015-08-03 19:35 ` Andy Gross 2015-08-04 15:05 ` Archit Taneja 2015-08-03 20:58 ` Stephen Boyd 2015-08-04 15:06 ` Archit Taneja [not found] ` <1439959746-25498-1-git-send-email-architt@codeaurora.org> 2015-08-19 4:49 ` [PATCH v4 3/5] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja 2015-12-16 6:33 ` Boris Brezillon 2015-12-16 8:11 ` Archit Taneja 2015-08-19 4:49 ` [PATCH v4 4/5] arm: qcom: dts: Add NAND controller node for ipq806x Archit Taneja 2015-08-19 4:49 ` [PATCH v4 5/5] arm: qcom: dts: Enable NAND node on IPQ8064 AP148 platform Archit Taneja [not found] ` <1451971501-18160-1-git-send-email-architt@codeaurora.org> 2016-01-05 5:25 ` [PATCH v5 3/3] dt/bindings: qcom_nandc: Add DT bindings Archit Taneja 2016-01-06 15:05 ` Boris Brezillon 2016-01-06 15:14 ` Rob Herring 2016-01-06 15:37 ` Boris Brezillon 2016-01-06 16:13 ` Rob Herring 2016-01-06 16:36 ` Boris Brezillon [not found] ` <1453110634-25995-1-git-send-email-architt@codeaurora.org> 2016-01-18 9:50 ` [PATCH v6 " Archit Taneja 2016-01-20 14:46 ` 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).