Commit 74f4d797 authored by Miquel Raynal's avatar Miquel Raynal

dt-bindings: mtd: Standardize the style in the examples

As recently requested by the binding maintaines, let's use 4 spaces in
the examples.
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-18-miquel.raynal@bootlin.com
parent d963af0b
...@@ -34,20 +34,20 @@ unevaluatedProperties: false ...@@ -34,20 +34,20 @@ unevaluatedProperties: false
examples: examples:
- | - |
smcc: memory-controller@e000e000 { smcc: memory-controller@e000e000 {
compatible = "arm,pl353-smc-r2p1", "arm,primecell"; compatible = "arm,pl353-smc-r2p1", "arm,primecell";
reg = <0xe000e000 0x0001000>; reg = <0xe000e000 0x0001000>;
clock-names = "memclk", "apb_pclk"; clock-names = "memclk", "apb_pclk";
clocks = <&clkc 11>, <&clkc 44>; clocks = <&clkc 11>, <&clkc 44>;
ranges = <0x0 0x0 0xe1000000 0x1000000 /* Nand CS region */ ranges = <0x0 0x0 0xe1000000 0x1000000 /* Nand CS region */
0x1 0x0 0xe2000000 0x2000000 /* SRAM/NOR CS0 region */ 0x1 0x0 0xe2000000 0x2000000 /* SRAM/NOR CS0 region */
0x2 0x0 0xe4000000 0x2000000>; /* SRAM/NOR CS1 region */ 0x2 0x0 0xe4000000 0x2000000>; /* SRAM/NOR CS1 region */
#address-cells = <2>; #address-cells = <2>;
#size-cells = <1>; #size-cells = <1>;
nfc0: nand-controller@0,0 { nfc0: nand-controller@0,0 {
compatible = "arm,pl353-nand-r2p1"; compatible = "arm,pl353-nand-r2p1";
reg = <0 0 0x1000000>; reg = <0 0 0x1000000>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
}; };
}; };
...@@ -184,51 +184,51 @@ required: ...@@ -184,51 +184,51 @@ required:
examples: examples:
- | - |
nand-controller@f0442800 { nand-controller@f0442800 {
compatible = "brcm,brcmnand-v7.0", "brcm,brcmnand"; compatible = "brcm,brcmnand-v7.0", "brcm,brcmnand";
reg = <0xf0442800 0x600>, reg = <0xf0442800 0x600>,
<0xf0443000 0x100>; <0xf0443000 0x100>;
reg-names = "nand", "flash-dma"; reg-names = "nand", "flash-dma";
interrupt-parent = <&hif_intr2_intc>; interrupt-parent = <&hif_intr2_intc>;
interrupts = <24>, <4>; interrupts = <24>, <4>;
#address-cells = <1>;
#size-cells = <0>;
nand@1 {
compatible = "brcm,nandcs";
reg = <1>; // Chip select 1
nand-on-flash-bbt;
nand-ecc-strength = <12>;
nand-ecc-step-size = <512>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <1>;
};
nand@1 {
compatible = "brcm,nandcs";
reg = <1>; // Chip select 1
nand-on-flash-bbt;
nand-ecc-strength = <12>;
nand-ecc-step-size = <512>;
#address-cells = <1>;
#size-cells = <1>;
};
}; };
- | - |
nand-controller@10000200 { nand-controller@10000200 {
compatible = "brcm,nand-bcm63168", "brcm,nand-bcm6368", compatible = "brcm,nand-bcm63168", "brcm,nand-bcm6368",
"brcm,brcmnand-v4.0", "brcm,brcmnand"; "brcm,brcmnand-v4.0", "brcm,brcmnand";
reg = <0x10000200 0x180>, reg = <0x10000200 0x180>,
<0x100000b0 0x10>, <0x100000b0 0x10>,
<0x10000600 0x200>; <0x10000600 0x200>;
reg-names = "nand", "nand-int-base", "nand-cache"; reg-names = "nand", "nand-int-base", "nand-cache";
interrupt-parent = <&periph_intc>; interrupt-parent = <&periph_intc>;
interrupts = <50>; interrupts = <50>;
clocks = <&periph_clk 20>; clocks = <&periph_clk 20>;
clock-names = "nand"; clock-names = "nand";
#address-cells = <1>;
#size-cells = <0>;
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;
nand-ecc-strength = <1>;
nand-ecc-step-size = <512>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <1>;
};
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;
nand-ecc-strength = <1>;
nand-ecc-step-size = <512>;
#address-cells = <1>;
#size-cells = <1>;
};
}; };
...@@ -145,6 +145,6 @@ examples: ...@@ -145,6 +145,6 @@ examples:
#size-cells = <0>; #size-cells = <0>;
nand@0 { nand@0 {
reg = <0>; reg = <0>;
}; };
}; };
...@@ -58,78 +58,78 @@ examples: ...@@ -58,78 +58,78 @@ examples:
- | - |
#include <dt-bindings/clock/ingenic,jz4780-cgu.h> #include <dt-bindings/clock/ingenic,jz4780-cgu.h>
memory-controller@13410000 { memory-controller@13410000 {
compatible = "ingenic,jz4780-nemc"; compatible = "ingenic,jz4780-nemc";
reg = <0x13410000 0x10000>; reg = <0x13410000 0x10000>;
#address-cells = <2>; #address-cells = <2>;
#size-cells = <1>; #size-cells = <1>;
ranges = <1 0 0x1b000000 0x1000000>, ranges = <1 0 0x1b000000 0x1000000>,
<2 0 0x1a000000 0x1000000>, <2 0 0x1a000000 0x1000000>,
<3 0 0x19000000 0x1000000>, <3 0 0x19000000 0x1000000>,
<4 0 0x18000000 0x1000000>, <4 0 0x18000000 0x1000000>,
<5 0 0x17000000 0x1000000>, <5 0 0x17000000 0x1000000>,
<6 0 0x16000000 0x1000000>; <6 0 0x16000000 0x1000000>;
clocks = <&cgu JZ4780_CLK_NEMC>; clocks = <&cgu JZ4780_CLK_NEMC>;
nand-controller@1 { nand-controller@1 {
compatible = "ingenic,jz4780-nand"; compatible = "ingenic,jz4780-nand";
reg = <1 0 0x1000000>; reg = <1 0 0x1000000>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
ecc-engine = <&bch>; ecc-engine = <&bch>;
ingenic,nemc-tAS = <10>; ingenic,nemc-tAS = <10>;
ingenic,nemc-tAH = <5>; ingenic,nemc-tAH = <5>;
ingenic,nemc-tBP = <10>; ingenic,nemc-tBP = <10>;
ingenic,nemc-tAW = <15>; ingenic,nemc-tAW = <15>;
ingenic,nemc-tSTRV = <100>; ingenic,nemc-tSTRV = <100>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pins_nemc>; pinctrl-0 = <&pins_nemc>;
nand@1 { nand@1 {
reg = <1>; reg = <1>;
nand-ecc-step-size = <1024>; nand-ecc-step-size = <1024>;
nand-ecc-strength = <24>; nand-ecc-strength = <24>;
nand-ecc-mode = "hw"; nand-ecc-mode = "hw";
nand-on-flash-bbt; nand-on-flash-bbt;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pins_nemc_cs1>; pinctrl-0 = <&pins_nemc_cs1>;
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
partition@0 { partition@0 {
label = "u-boot-spl"; label = "u-boot-spl";
reg = <0x0 0x0 0x0 0x800000>; reg = <0x0 0x0 0x0 0x800000>;
};
partition@800000 {
label = "u-boot";
reg = <0x0 0x800000 0x0 0x200000>;
};
partition@a00000 {
label = "u-boot-env";
reg = <0x0 0xa00000 0x0 0x200000>;
};
partition@c00000 {
label = "boot";
reg = <0x0 0xc00000 0x0 0x4000000>;
};
partition@4c00000 {
label = "system";
reg = <0x0 0x4c00000 0x1 0xfb400000>;
};
};
}; };
partition@800000 {
label = "u-boot";
reg = <0x0 0x800000 0x0 0x200000>;
};
partition@a00000 {
label = "u-boot-env";
reg = <0x0 0xa00000 0x0 0x200000>;
};
partition@c00000 {
label = "boot";
reg = <0x0 0xc00000 0x0 0x4000000>;
};
partition@4c00000 {
label = "system";
reg = <0x0 0x4c00000 0x1 0xfb400000>;
};
};
}; };
};
}; };
...@@ -67,25 +67,25 @@ unevaluatedProperties: false ...@@ -67,25 +67,25 @@ unevaluatedProperties: false
examples: examples:
- | - |
nand-controller@e0f00000 { nand-controller@e0f00000 {
compatible = "intel,lgm-ebunand"; compatible = "intel,lgm-ebunand";
reg = <0xe0f00000 0x100>, reg = <0xe0f00000 0x100>,
<0xe1000000 0x300>, <0xe1000000 0x300>,
<0xe1400000 0x8000>, <0xe1400000 0x8000>,
<0xe1c00000 0x1000>, <0xe1c00000 0x1000>,
<0x17400000 0x4>, <0x17400000 0x4>,
<0x17c00000 0x4>; <0x17c00000 0x4>;
reg-names = "ebunand", "hsnand", "nand_cs0", "nand_cs1", reg-names = "ebunand", "hsnand", "nand_cs0", "nand_cs1",
"addr_sel0", "addr_sel1"; "addr_sel0", "addr_sel1";
clocks = <&cgu0 125>; clocks = <&cgu0 125>;
dmas = <&dma0 8>, <&dma0 9>; dmas = <&dma0 8>, <&dma0 9>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
nand@0 { nand@0 {
reg = <0>; reg = <0>;
nand-ecc-mode = "hw"; nand-ecc-mode = "hw";
}; };
}; };
... ...
...@@ -34,13 +34,13 @@ unevaluatedProperties: false ...@@ -34,13 +34,13 @@ unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
eeram@0 { eeram@0 {
compatible = "microchip,48l640"; compatible = "microchip,48l640";
reg = <0>; reg = <0>;
spi-max-frequency = <20000000>; spi-max-frequency = <20000000>;
}; };
}; };
... ...
...@@ -41,22 +41,22 @@ examples: ...@@ -41,22 +41,22 @@ examples:
- | - |
/* Example declaring dynamic partition */ /* Example declaring dynamic partition */
flash { flash {
partitions { partitions {
compatible = "qcom,smem-part"; compatible = "qcom,smem-part";
partition-art { partition-art {
compatible = "nvmem-cells"; compatible = "nvmem-cells";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
label = "0:art"; label = "0:art";
macaddr_art_0: macaddr@0 { macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>; reg = <0x0 0x6>;
}; };
macaddr_art_6: macaddr@6 { macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>; reg = <0x6 0x6>;
}; };
};
}; };
};
}; };
...@@ -136,85 +136,85 @@ examples: ...@@ -136,85 +136,85 @@ examples:
- | - |
#include <dt-bindings/clock/qcom,gcc-ipq806x.h> #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
nand-controller@1ac00000 { nand-controller@1ac00000 {
compatible = "qcom,ipq806x-nand"; compatible = "qcom,ipq806x-nand";
reg = <0x1ac00000 0x800>; reg = <0x1ac00000 0x800>;
clocks = <&gcc EBI2_CLK>, clocks = <&gcc EBI2_CLK>,
<&gcc EBI2_AON_CLK>; <&gcc EBI2_AON_CLK>;
clock-names = "core", "aon"; clock-names = "core", "aon";
dmas = <&adm_dma 3>; dmas = <&adm_dma 3>;
dma-names = "rxtx"; dma-names = "rxtx";
qcom,cmd-crci = <15>; qcom,cmd-crci = <15>;
qcom,data-crci = <3>; qcom,data-crci = <3>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
nand@0 { nand@0 {
reg = <0>; reg = <0>;
nand-ecc-strength = <4>; nand-ecc-strength = <4>;
nand-bus-width = <8>; nand-bus-width = <8>;
qcom,boot-partitions = <0x0 0x58a0000>; qcom,boot-partitions = <0x0 0x58a0000>;
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
partition@0 { partition@0 {
label = "boot-nand"; label = "boot-nand";
reg = <0 0x58a0000>; reg = <0 0x58a0000>;
}; };
partition@58a0000 { partition@58a0000 {
label = "fs-nand"; label = "fs-nand";
reg = <0x58a0000 0x4000000>; reg = <0x58a0000 0x4000000>;
}; };
};
}; };
};
}; };
#include <dt-bindings/clock/qcom,gcc-ipq4019.h> #include <dt-bindings/clock/qcom,gcc-ipq4019.h>
nand-controller@79b0000 { nand-controller@79b0000 {
compatible = "qcom,ipq4019-nand"; compatible = "qcom,ipq4019-nand";
reg = <0x79b0000 0x1000>; reg = <0x79b0000 0x1000>;
clocks = <&gcc GCC_QPIC_CLK>, clocks = <&gcc GCC_QPIC_CLK>,
<&gcc GCC_QPIC_AHB_CLK>; <&gcc GCC_QPIC_AHB_CLK>;
clock-names = "core", "aon"; clock-names = "core", "aon";
dmas = <&qpicbam 0>, dmas = <&qpicbam 0>,
<&qpicbam 1>, <&qpicbam 1>,
<&qpicbam 2>; <&qpicbam 2>;
dma-names = "tx", "rx", "cmd"; dma-names = "tx", "rx", "cmd";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
nand@0 { nand@0 {
reg = <0>; reg = <0>;
nand-ecc-strength = <4>; nand-ecc-strength = <4>;
nand-bus-width = <8>; nand-bus-width = <8>;
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
partition@0 { partition@0 {
label = "boot-nand"; label = "boot-nand";
reg = <0 0x58a0000>; reg = <0 0x58a0000>;
}; };
partition@58a0000 { partition@58a0000 {
label = "fs-nand"; label = "fs-nand";
reg = <0x58a0000 0x4000000>; reg = <0x58a0000 0x4000000>;
}; };
};
}; };
};
}; };
... ...
...@@ -101,31 +101,32 @@ examples: ...@@ -101,31 +101,32 @@ examples:
#include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/stm32mp1-clks.h> #include <dt-bindings/clock/stm32mp1-clks.h>
#include <dt-bindings/reset/stm32mp1-resets.h> #include <dt-bindings/reset/stm32mp1-resets.h>
nand-controller@58002000 { nand-controller@58002000 {
compatible = "st,stm32mp15-fmc2"; compatible = "st,stm32mp15-fmc2";
reg = <0x58002000 0x1000>, reg = <0x58002000 0x1000>,
<0x80000000 0x1000>, <0x80000000 0x1000>,
<0x88010000 0x1000>, <0x88010000 0x1000>,
<0x88020000 0x1000>, <0x88020000 0x1000>,
<0x81000000 0x1000>, <0x81000000 0x1000>,
<0x89010000 0x1000>, <0x89010000 0x1000>,
<0x89020000 0x1000>; <0x89020000 0x1000>;
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&mdma1 20 0x2 0x12000a02 0x0 0x0>, dmas = <&mdma1 20 0x2 0x12000a02 0x0 0x0>,
<&mdma1 20 0x2 0x12000a08 0x0 0x0>, <&mdma1 20 0x2 0x12000a08 0x0 0x0>,
<&mdma1 21 0x2 0x12000a0a 0x0 0x0>; <&mdma1 21 0x2 0x12000a0a 0x0 0x0>;
dma-names = "tx", "rx", "ecc"; dma-names = "tx", "rx", "ecc";
clocks = <&rcc FMC_K>; clocks = <&rcc FMC_K>;
resets = <&rcc FMC_R>; resets = <&rcc FMC_R>;
#address-cells = <1>;
#size-cells = <0>;
nand@0 {
reg = <0>;
nand-on-flash-bbt;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <0>;
};
nand@0 {
reg = <0>;
nand-on-flash-bbt;
#address-cells = <1>;
#size-cells = <1>;
};
}; };
... ...
...@@ -44,26 +44,26 @@ additionalProperties: false ...@@ -44,26 +44,26 @@ additionalProperties: false
examples: examples:
- | - |
bus { bus {
#address-cells = <2>;
#size-cells = <2>;
hbmc: memory-controller@47034000 {
compatible = "ti,am654-hbmc";
reg = <0x0 0x47034000 0x0 0x100>,
<0x5 0x00000000 0x1 0x0000000>;
ranges = <0x0 0x0 0x5 0x00000000 0x4000000>, /* CS0 - 64MB */
<0x1 0x0 0x5 0x04000000 0x4000000>; /* CS1 - 64MB */
clocks = <&k3_clks 102 0>;
#address-cells = <2>; #address-cells = <2>;
#size-cells = <1>; #size-cells = <2>;
power-domains = <&k3_pds 55>;
mux-controls = <&hbmc_mux 0>;
flash@0,0 { hbmc: memory-controller@47034000 {
compatible = "cypress,hyperflash", "cfi-flash"; compatible = "ti,am654-hbmc";
reg = <0x0 0x0 0x4000000>; reg = <0x0 0x47034000 0x0 0x100>,
#address-cells = <1>; <0x5 0x00000000 0x1 0x0000000>;
ranges = <0x0 0x0 0x5 0x00000000 0x4000000>, /* CS0 - 64MB */
<0x1 0x0 0x5 0x04000000 0x4000000>; /* CS1 - 64MB */
clocks = <&k3_clks 102 0>;
#address-cells = <2>;
#size-cells = <1>; #size-cells = <1>;
power-domains = <&k3_pds 55>;
mux-controls = <&hbmc_mux 0>;
flash@0,0 {
compatible = "cypress,hyperflash", "cfi-flash";
reg = <0x0 0x0 0x4000000>;
#address-cells = <1>;
#size-cells = <1>;
};
}; };
};
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment