Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1504305 > unrolled thread
| Started by | Sergio Prado <sergio.prado@e-labworks.com> |
|---|---|
| First post | 2016-10-19 22:00 +0200 |
| Last post | 2016-10-20 20:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2 0/3] mtd: s3c2410: add device tree support Sergio Prado <sergio.prado@e-labworks.com> - 2016-10-19 22:00 +0200
[PATCH v2 2/3] dt-bindings: mtd: add DT binding for s3c2410 flash controller Sergio Prado <sergio.prado@e-labworks.com> - 2016-10-19 22:00 +0200
Re: [PATCH v2 2/3] dt-bindings: mtd: add DT binding for s3c2410 flash controller Krzysztof Kozlowski <krzk@kernel.org> - 2016-10-20 20:00 +0200
| From | Sergio Prado <sergio.prado@e-labworks.com> |
|---|---|
| Date | 2016-10-19 22:00 +0200 |
| Subject | [PATCH v2 0/3] mtd: s3c2410: add device tree support |
| Message-ID | <su5bP-5KC-17@gated-at.bofh.it> |
This series adds support for configuring Samsung's s3c2410 and compatible flash memory controller via devicetree. Tested on FriendlyARM mini2440, based on s3c2440 SoC. Patch 3 depends on patch 1. Changes since v1: - automate timing selection when booting with a device tree - make s3c24XX_nand_devtype_data structs "static const" - removing samsung,s3c6400-nand compatible since it is equivalent to samsung,s3c2412-nand Changes since initial version: - patch converted to a patch series - read timings from nand_sdr_timings when booting with a device tree - naming improvements in the device tree binding (s/nand/nand-controller/, s/_/-, s/children/child) - dropped property samsung,ignore_unset_ecc - remove @0 from nand device node - checking pdev->dev.of_node instead of using ifdef CONFIG_OF_MTD - preventing from parsing device tree properties twice - increment the nand controller child node refcount, since we maintain a reference to it and its name field - using of_device_get_match_data() instead of of_match_device() to make the code simpler - remove CONFIG_MTD_NAND_S3C2410_HWECC compile option so we can select ECC mode using nand-ecc-mode property in the device tree Sergio Prado (3): mtd: s3c2410: make ecc mode configurable via platform data dt-bindings: mtd: add DT binding for s3c2410 flash controller mtd: s3c2410: parse the device configuration from OF node .../devicetree/bindings/mtd/samsung-s3c2410.txt | 56 +++++ arch/arm/mach-s3c24xx/common-smdk.c | 1 + arch/arm/mach-s3c24xx/mach-anubis.c | 1 + arch/arm/mach-s3c24xx/mach-at2440evb.c | 1 + arch/arm/mach-s3c24xx/mach-bast.c | 1 + arch/arm/mach-s3c24xx/mach-gta02.c | 1 + arch/arm/mach-s3c24xx/mach-jive.c | 1 + arch/arm/mach-s3c24xx/mach-mini2440.c | 1 + arch/arm/mach-s3c24xx/mach-osiris.c | 1 + arch/arm/mach-s3c24xx/mach-qt2410.c | 1 + arch/arm/mach-s3c24xx/mach-rx1950.c | 1 + arch/arm/mach-s3c24xx/mach-rx3715.c | 1 + arch/arm/mach-s3c24xx/mach-vstms.c | 1 + arch/arm/mach-s3c64xx/mach-hmt.c | 1 + arch/arm/mach-s3c64xx/mach-mini6410.c | 1 + arch/arm/mach-s3c64xx/mach-real6410.c | 1 + drivers/mtd/nand/Kconfig | 9 - drivers/mtd/nand/s3c2410.c | 274 +++++++++++++++------ include/linux/platform_data/mtd-nand-s3c2410.h | 7 +- 19 files changed, 275 insertions(+), 86 deletions(-) create mode 100644 Documentation/devicetree/bindings/mtd/samsung-s3c2410.txt -- 1.9.1
[toc] | [next] | [standalone]
| From | Sergio Prado <sergio.prado@e-labworks.com> |
|---|---|
| Date | 2016-10-19 22:00 +0200 |
| Subject | [PATCH v2 2/3] dt-bindings: mtd: add DT binding for s3c2410 flash controller |
| Message-ID | <su5bP-5KC-23@gated-at.bofh.it> |
| In reply to | #1504305 |
Adds the device tree bindings description for Samsung S3C2410 and
compatible NAND flash controller.
Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
---
.../devicetree/bindings/mtd/samsung-s3c2410.txt | 56 ++++++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mtd/samsung-s3c2410.txt
diff --git a/Documentation/devicetree/bindings/mtd/samsung-s3c2410.txt b/Documentation/devicetree/bindings/mtd/samsung-s3c2410.txt
new file mode 100644
index 000000000000..0040eb8895e0
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/samsung-s3c2410.txt
@@ -0,0 +1,56 @@
+* Samsung S3C2410 and compatible NAND flash controller
+
+Required properties:
+- compatible : The possible values are:
+ "samsung,s3c2410-nand"
+ "samsung,s3c2412-nand"
+ "samsung,s3c2440-nand"
+- reg : register's location and length.
+- #address-cells, #size-cells : see nand.txt
+- clocks : phandle to the nand controller clock
+- clock-names : must contain "nand"
+
+Optional child nodes:
+Child nodes representing the available nand chips.
+
+Optional child properties:
+- nand-ecc-mode : see nand.txt
+- nand-on-flash-bbt : see nand.txt
+
+Each child 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-controller@4e000000 {
+ compatible = "samsung,s3c2440-nand";
+ reg = <0x4e000000 0x40>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ clocks = <&clocks HCLK_NAND>;
+ clock-names = "nand";
+
+ nand {
+ nand-ecc-mode = "soft";
+ nand-on-flash-bbt;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0 0x040000>;
+ };
+
+ partition@40000 {
+ label = "kernel";
+ reg = <0x040000 0x500000>;
+ };
+ };
+ };
+};
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <krzk@kernel.org> |
|---|---|
| Date | 2016-10-20 20:00 +0200 |
| Subject | Re: [PATCH v2 2/3] dt-bindings: mtd: add DT binding for s3c2410 flash controller |
| Message-ID | <supNg-2j8-13@gated-at.bofh.it> |
| In reply to | #1504306 |
On Wed, Oct 19, 2016 at 05:52:04PM -0200, Sergio Prado wrote: > Adds the device tree bindings description for Samsung S3C2410 and > compatible NAND flash controller. > > Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com> > --- > .../devicetree/bindings/mtd/samsung-s3c2410.txt | 56 ++++++++++++++++++++++ > 1 file changed, 56 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/samsung-s3c2410.txt > Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Best regards, Krzysztof
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web