Skip to content

Commit 91300dd

Browse files
masahir0yBoris Brezillon
authored andcommitted
mtd: nand: denali_dt: add compatible strings for UniPhier SoC variants
Add two compatible strings for UniPhier SoC family. "socionext,uniphier-denali-nand-v5a" is used on UniPhier sLD3, LD4, Pro4, sLD8. "socionext,uniphier-denali-nand-v5b" is used on UniPhier Pro5, PXs2, LD6b, LD11, LD20. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Boris Brezillon <[email protected]>
1 parent 0615e7a commit 91300dd

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

Documentation/devicetree/bindings/mtd/denali-nand.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@
33
Required properties:
44
- compatible : should be one of the following:
55
"altr,socfpga-denali-nand" - for Altera SOCFPGA
6+
"socionext,uniphier-denali-nand-v5a" - for Socionext UniPhier (v5a)
7+
"socionext,uniphier-denali-nand-v5b" - for Socionext UniPhier (v5b)
68
- reg : should contain registers location and length for data and reg.
79
- reg-names: Should contain the reg names "nand_data" and "denali_reg"
810
- interrupts : The interrupt number.
911

1012
Optional properties:
1113
- nand-ecc-step-size: see nand.txt for details. If present, the value must be
1214
512 for "altr,socfpga-denali-nand"
15+
1024 for "socionext,uniphier-denali-nand-v5a"
16+
1024 for "socionext,uniphier-denali-nand-v5b"
1317
- nand-ecc-strength: see nand.txt for details. Valid values are:
1418
8, 15 for "altr,socfpga-denali-nand"
19+
8, 16, 24 for "socionext,uniphier-denali-nand-v5a"
20+
8, 16 for "socionext,uniphier-denali-nand-v5b"
1521
- nand-ecc-maximize: see nand.txt for details
1622

1723
The device tree may optionally contain sub-nodes describing partitions of the

drivers/mtd/nand/denali_dt.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,36 @@ static const struct denali_dt_data denali_socfpga_data = {
4242
.ecc_caps = &denali_socfpga_ecc_caps,
4343
};
4444

45+
NAND_ECC_CAPS_SINGLE(denali_uniphier_v5a_ecc_caps, denali_calc_ecc_bytes,
46+
1024, 8, 16, 24);
47+
static const struct denali_dt_data denali_uniphier_v5a_data = {
48+
.caps = DENALI_CAP_HW_ECC_FIXUP |
49+
DENALI_CAP_DMA_64BIT,
50+
.ecc_caps = &denali_uniphier_v5a_ecc_caps,
51+
};
52+
53+
NAND_ECC_CAPS_SINGLE(denali_uniphier_v5b_ecc_caps, denali_calc_ecc_bytes,
54+
1024, 8, 16);
55+
static const struct denali_dt_data denali_uniphier_v5b_data = {
56+
.revision = 0x0501,
57+
.caps = DENALI_CAP_HW_ECC_FIXUP |
58+
DENALI_CAP_DMA_64BIT,
59+
.ecc_caps = &denali_uniphier_v5b_ecc_caps,
60+
};
61+
4562
static const struct of_device_id denali_nand_dt_ids[] = {
4663
{
4764
.compatible = "altr,socfpga-denali-nand",
4865
.data = &denali_socfpga_data,
4966
},
67+
{
68+
.compatible = "socionext,uniphier-denali-nand-v5a",
69+
.data = &denali_uniphier_v5a_data,
70+
},
71+
{
72+
.compatible = "socionext,uniphier-denali-nand-v5b",
73+
.data = &denali_uniphier_v5b_data,
74+
},
5075
{ /* sentinel */ }
5176
};
5277
MODULE_DEVICE_TABLE(of, denali_nand_dt_ids);

0 commit comments

Comments
 (0)