Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: armada-38x: update NAND node with new bindings

Use the new bindings of the Marvell NAND controller driver. Also adapt
the NAND controller node organization to distinguish which property is
relevant for the controller, and which one is NAND chip specific. Expose
the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore
as the new driver activates the arbiter by default for all boards which
is either needed or harmless.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>

authored by

Miquel Raynal and committed by
Gregory CLEMENT
925d5e42 c29a7cce

+315 -277
+36 -33
arch/arm/boot/dts/armada-385-db-ap.dts
··· 135 135 status = "okay"; 136 136 }; 137 137 138 - nfc: flash@d0000 { 139 - status = "okay"; 140 - num-cs = <1>; 141 - nand-ecc-strength = <4>; 142 - nand-ecc-step-size = <512>; 143 - marvell,nand-keep-config; 144 - marvell,nand-enable-arbiter; 145 - nand-on-flash-bbt; 146 - 147 - partitions { 148 - compatible = "fixed-partitions"; 149 - #address-cells = <1>; 150 - #size-cells = <1>; 151 - 152 - partition@0 { 153 - label = "U-Boot"; 154 - reg = <0x00000000 0x00800000>; 155 - read-only; 156 - }; 157 - 158 - partition@800000 { 159 - label = "uImage"; 160 - reg = <0x00800000 0x00400000>; 161 - read-only; 162 - }; 163 - 164 - partition@c00000 { 165 - label = "Root"; 166 - reg = <0x00c00000 0x3f400000>; 167 - }; 168 - }; 169 - }; 170 - 171 138 usb3@f0000 { 172 139 status = "okay"; 173 140 usb-phy = <&usb3_phy>; ··· 198 231 compatible = "st,m25p128", "jedec,spi-nor"; 199 232 reg = <0>; /* Chip select 0 */ 200 233 spi-max-frequency = <54000000>; 234 + }; 235 + }; 236 + 237 + &nand_controller { 238 + status = "okay"; 239 + 240 + nand@0 { 241 + reg = <0>; 242 + label = "pxa3xx_nand-0"; 243 + nand-rb = <0>; 244 + nand-on-flash-bbt; 245 + nand-ecc-strength = <4>; 246 + nand-ecc-step-size = <512>; 247 + 248 + partitions { 249 + compatible = "fixed-partitions"; 250 + #address-cells = <1>; 251 + #size-cells = <1>; 252 + 253 + partition@0 { 254 + label = "U-Boot"; 255 + reg = <0x00000000 0x00800000>; 256 + read-only; 257 + }; 258 + 259 + partition@800000 { 260 + label = "uImage"; 261 + reg = <0x00800000 0x00400000>; 262 + read-only; 263 + }; 264 + 265 + partition@c00000 { 266 + label = "Root"; 267 + reg = <0x00c00000 0x3f400000>; 268 + }; 269 + }; 201 270 }; 202 271 };
+57 -52
arch/arm/boot/dts/armada-385-linksys-caiman.dts
··· 73 73 74 74 &nand { 75 75 /* 128MiB */ 76 + partitions { 77 + compatible = "fixed-partitions"; 78 + #address-cells = <1>; 79 + #size-cells = <1>; 76 80 77 - partition@0 { 78 - label = "u-boot"; 79 - reg = <0x0000000 0x200000>; /* 2MiB */ 80 - read-only; 81 - }; 81 + partition@0 { 82 + label = "u-boot"; 83 + reg = <0x0000000 0x200000>; /* 2MiB */ 84 + read-only; 85 + }; 82 86 83 - partition@100000 { 84 - label = "u_env"; 85 - reg = <0x200000 0x40000>; /* 256KiB */ 86 - }; 87 + partition@100000 { 88 + label = "u_env"; 89 + reg = <0x200000 0x40000>; /* 256KiB */ 90 + }; 87 91 88 - partition@140000 { 89 - label = "s_env"; 90 - reg = <0x240000 0x40000>; /* 256KiB */ 91 - }; 92 + partition@140000 { 93 + label = "s_env"; 94 + reg = <0x240000 0x40000>; /* 256KiB */ 95 + }; 92 96 93 - partition@900000 { 94 - label = "devinfo"; 95 - reg = <0x900000 0x100000>; /* 1MiB */ 96 - read-only; 97 - }; 97 + partition@900000 { 98 + label = "devinfo"; 99 + reg = <0x900000 0x100000>; /* 1MiB */ 100 + read-only; 101 + }; 98 102 99 - /* kernel1 overlaps with rootfs1 by design */ 100 - partition@a00000 { 101 - label = "kernel1"; 102 - reg = <0xa00000 0x2800000>; /* 40MiB */ 103 - }; 103 + /* kernel1 overlaps with rootfs1 by design */ 104 + partition@a00000 { 105 + label = "kernel1"; 106 + reg = <0xa00000 0x2800000>; /* 40MiB */ 107 + }; 104 108 105 - partition@1000000 { 106 - label = "rootfs1"; 107 - reg = <0x1000000 0x2200000>; /* 34MiB */ 108 - }; 109 + partition@1000000 { 110 + label = "rootfs1"; 111 + reg = <0x1000000 0x2200000>; /* 34MiB */ 112 + }; 109 113 110 - /* kernel2 overlaps with rootfs2 by design */ 111 - partition@3200000 { 112 - label = "kernel2"; 113 - reg = <0x3200000 0x2800000>; /* 40MiB */ 114 - }; 114 + /* kernel2 overlaps with rootfs2 by design */ 115 + partition@3200000 { 116 + label = "kernel2"; 117 + reg = <0x3200000 0x2800000>; /* 40MiB */ 118 + }; 115 119 116 - partition@3800000 { 117 - label = "rootfs2"; 118 - reg = <0x3800000 0x2200000>; /* 34MiB */ 119 - }; 120 + partition@3800000 { 121 + label = "rootfs2"; 122 + reg = <0x3800000 0x2200000>; /* 34MiB */ 123 + }; 120 124 121 - /* 122 - * 38MiB, last MiB is for the BBT, not writable 123 - */ 124 - partition@5a00000 { 125 - label = "syscfg"; 126 - reg = <0x5a00000 0x2600000>; 127 - }; 125 + /* 126 + * 38MiB, last MiB is for the BBT, not writable 127 + */ 128 + partition@5a00000 { 129 + label = "syscfg"; 130 + reg = <0x5a00000 0x2600000>; 131 + }; 128 132 129 - /* 130 - * Unused area between "s_env" and "devinfo". 131 - * Moved here because otherwise the renumbered 132 - * partitions would break the bootloader 133 - * supplied bootargs 134 - */ 135 - partition@180000 { 136 - label = "unused_area"; 137 - reg = <0x280000 0x680000>; /* 6.5MiB */ 133 + /* 134 + * Unused area between "s_env" and "devinfo". 135 + * Moved here because otherwise the renumbered 136 + * partitions would break the bootloader 137 + * supplied bootargs 138 + */ 139 + partition@180000 { 140 + label = "unused_area"; 141 + reg = <0x280000 0x680000>; /* 6.5MiB */ 142 + }; 138 143 }; 139 144 };
+57 -52
arch/arm/boot/dts/armada-385-linksys-cobra.dts
··· 73 73 74 74 &nand { 75 75 /* 128MiB */ 76 + partitions { 77 + compatible = "fixed-partitions"; 78 + #address-cells = <1>; 79 + #size-cells = <1>; 76 80 77 - partition@0 { 78 - label = "u-boot"; 79 - reg = <0x0000000 0x200000>; /* 2MiB */ 80 - read-only; 81 - }; 81 + partition@0 { 82 + label = "u-boot"; 83 + reg = <0x0000000 0x200000>; /* 2MiB */ 84 + read-only; 85 + }; 82 86 83 - partition@100000 { 84 - label = "u_env"; 85 - reg = <0x200000 0x40000>; /* 256KiB */ 86 - }; 87 + partition@100000 { 88 + label = "u_env"; 89 + reg = <0x200000 0x40000>; /* 256KiB */ 90 + }; 87 91 88 - partition@140000 { 89 - label = "s_env"; 90 - reg = <0x240000 0x40000>; /* 256KiB */ 91 - }; 92 + partition@140000 { 93 + label = "s_env"; 94 + reg = <0x240000 0x40000>; /* 256KiB */ 95 + }; 92 96 93 - partition@900000 { 94 - label = "devinfo"; 95 - reg = <0x900000 0x100000>; /* 1MiB */ 96 - read-only; 97 - }; 97 + partition@900000 { 98 + label = "devinfo"; 99 + reg = <0x900000 0x100000>; /* 1MiB */ 100 + read-only; 101 + }; 98 102 99 - /* kernel1 overlaps with rootfs1 by design */ 100 - partition@a00000 { 101 - label = "kernel1"; 102 - reg = <0xa00000 0x2800000>; /* 40MiB */ 103 - }; 103 + /* kernel1 overlaps with rootfs1 by design */ 104 + partition@a00000 { 105 + label = "kernel1"; 106 + reg = <0xa00000 0x2800000>; /* 40MiB */ 107 + }; 104 108 105 - partition@1000000 { 106 - label = "rootfs1"; 107 - reg = <0x1000000 0x2200000>; /* 34MiB */ 108 - }; 109 + partition@1000000 { 110 + label = "rootfs1"; 111 + reg = <0x1000000 0x2200000>; /* 34MiB */ 112 + }; 109 113 110 - /* kernel2 overlaps with rootfs2 by design */ 111 - partition@3200000 { 112 - label = "kernel2"; 113 - reg = <0x3200000 0x2800000>; /* 40MiB */ 114 - }; 114 + /* kernel2 overlaps with rootfs2 by design */ 115 + partition@3200000 { 116 + label = "kernel2"; 117 + reg = <0x3200000 0x2800000>; /* 40MiB */ 118 + }; 115 119 116 - partition@3800000 { 117 - label = "rootfs2"; 118 - reg = <0x3800000 0x2200000>; /* 34MiB */ 119 - }; 120 + partition@3800000 { 121 + label = "rootfs2"; 122 + reg = <0x3800000 0x2200000>; /* 34MiB */ 123 + }; 120 124 121 - /* 122 - * 38MiB, last MiB is for the BBT, not writable 123 - */ 124 - partition@5a00000 { 125 - label = "syscfg"; 126 - reg = <0x5a00000 0x2600000>; 127 - }; 125 + /* 126 + * 38MiB, last MiB is for the BBT, not writable 127 + */ 128 + partition@5a00000 { 129 + label = "syscfg"; 130 + reg = <0x5a00000 0x2600000>; 131 + }; 128 132 129 - /* 130 - * Unused area between "s_env" and "devinfo". 131 - * Moved here because otherwise the renumbered 132 - * partitions would break the bootloader 133 - * supplied bootargs 134 - */ 135 - partition@180000 { 136 - label = "unused_area"; 137 - reg = <0x280000 0x680000>; /* 6.5MiB */ 133 + /* 134 + * Unused area between "s_env" and "devinfo". 135 + * Moved here because otherwise the renumbered 136 + * partitions would break the bootloader 137 + * supplied bootargs 138 + */ 139 + partition@180000 { 140 + label = "unused_area"; 141 + reg = <0x280000 0x680000>; /* 6.5MiB */ 142 + }; 138 143 }; 139 144 };
+62 -57
arch/arm/boot/dts/armada-385-linksys-rango.dts
··· 81 81 82 82 &nand { 83 83 /* AMD/Spansion S34ML02G2 256MiB, OEM Layout */ 84 + partitions { 85 + compatible = "fixed-partitions"; 86 + #address-cells = <1>; 87 + #size-cells = <1>; 84 88 85 - partition@0 { 86 - label = "u-boot"; 87 - reg = <0x0000000 0x200000>; /* 2MiB */ 88 - read-only; 89 - }; 89 + partition@0 { 90 + label = "u-boot"; 91 + reg = <0x0000000 0x200000>; /* 2MiB */ 92 + read-only; 93 + }; 90 94 91 - partition@200000 { 92 - label = "u_env"; 93 - reg = <0x200000 0x20000>; /* 128KiB */ 94 - }; 95 + partition@200000 { 96 + label = "u_env"; 97 + reg = <0x200000 0x20000>; /* 128KiB */ 98 + }; 95 99 96 - partition@220000 { 97 - label = "s_env"; 98 - reg = <0x220000 0x40000>; /* 256KiB */ 99 - }; 100 + partition@220000 { 101 + label = "s_env"; 102 + reg = <0x220000 0x40000>; /* 256KiB */ 103 + }; 100 104 101 - partition@7e0000 { 102 - label = "devinfo"; 103 - reg = <0x7e0000 0x40000>; /* 256KiB */ 104 - read-only; 105 - }; 105 + partition@7e0000 { 106 + label = "devinfo"; 107 + reg = <0x7e0000 0x40000>; /* 256KiB */ 108 + read-only; 109 + }; 106 110 107 - partition@820000 { 108 - label = "sysdiag"; 109 - reg = <0x820000 0x1e0000>; /* 1920KiB */ 110 - read-only; 111 - }; 111 + partition@820000 { 112 + label = "sysdiag"; 113 + reg = <0x820000 0x1e0000>; /* 1920KiB */ 114 + read-only; 115 + }; 112 116 113 - /* kernel1 overlaps with rootfs1 by design */ 114 - partition@a00000 { 115 - label = "kernel1"; 116 - reg = <0xa00000 0x5000000>; /* 80MiB */ 117 - }; 117 + /* kernel1 overlaps with rootfs1 by design */ 118 + partition@a00000 { 119 + label = "kernel1"; 120 + reg = <0xa00000 0x5000000>; /* 80MiB */ 121 + }; 118 122 119 - partition@1000000 { 120 - label = "rootfs1"; 121 - reg = <0x1000000 0x4a00000>; /* 74MiB */ 122 - }; 123 + partition@1000000 { 124 + label = "rootfs1"; 125 + reg = <0x1000000 0x4a00000>; /* 74MiB */ 126 + }; 123 127 124 - /* kernel2 overlaps with rootfs2 by design */ 125 - partition@5a00000 { 126 - label = "kernel2"; 127 - reg = <0x5a00000 0x5000000>; /* 80MiB */ 128 - }; 128 + /* kernel2 overlaps with rootfs2 by design */ 129 + partition@5a00000 { 130 + label = "kernel2"; 131 + reg = <0x5a00000 0x5000000>; /* 80MiB */ 132 + }; 129 133 130 - partition@6000000 { 131 - label = "rootfs2"; 132 - reg = <0x6000000 0x4a00000>; /* 74MiB */ 133 - }; 134 + partition@6000000 { 135 + label = "rootfs2"; 136 + reg = <0x6000000 0x4a00000>; /* 74MiB */ 137 + }; 134 138 135 - /* 136 - * 86MiB, last MiB is for the BBT, not writable 137 - */ 138 - partition@aa00000 { 139 - label = "syscfg"; 140 - reg = <0xaa00000 0x5600000>; 141 - }; 139 + /* 140 + * 86MiB, last MiB is for the BBT, not writable 141 + */ 142 + partition@aa00000 { 143 + label = "syscfg"; 144 + reg = <0xaa00000 0x5600000>; 145 + }; 142 146 143 - /* 144 - * Unused area between "s_env" and "devinfo". 145 - * Moved here because otherwise the renumbered 146 - * partitions would break the bootloader 147 - * supplied bootargs 148 - */ 149 - partition@180000 { 150 - label = "unused_area"; 151 - reg = <0x260000 0x5c0000>; /* 5.75MiB */ 147 + /* 148 + * Unused area between "s_env" and "devinfo". 149 + * Moved here because otherwise the renumbered 150 + * partitions would break the bootloader 151 + * supplied bootargs 152 + */ 153 + partition@180000 { 154 + label = "unused_area"; 155 + reg = <0x260000 0x5c0000>; /* 5.75MiB */ 156 + }; 152 157 }; 153 158 }; 154 159
+57 -52
arch/arm/boot/dts/armada-385-linksys-shelby.dts
··· 73 73 74 74 &nand { 75 75 /* 128MiB */ 76 + partitions { 77 + compatible = "fixed-partitions"; 78 + #address-cells = <1>; 79 + #size-cells = <1>; 76 80 77 - partition@0 { 78 - label = "u-boot"; 79 - reg = <0x0000000 0x200000>; /* 2MiB */ 80 - read-only; 81 - }; 81 + partition@0 { 82 + label = "u-boot"; 83 + reg = <0x0000000 0x200000>; /* 2MiB */ 84 + read-only; 85 + }; 82 86 83 - partition@100000 { 84 - label = "u_env"; 85 - reg = <0x200000 0x40000>; /* 256KiB */ 86 - }; 87 + partition@100000 { 88 + label = "u_env"; 89 + reg = <0x200000 0x40000>; /* 256KiB */ 90 + }; 87 91 88 - partition@140000 { 89 - label = "s_env"; 90 - reg = <0x240000 0x40000>; /* 256KiB */ 91 - }; 92 + partition@140000 { 93 + label = "s_env"; 94 + reg = <0x240000 0x40000>; /* 256KiB */ 95 + }; 92 96 93 - partition@900000 { 94 - label = "devinfo"; 95 - reg = <0x900000 0x100000>; /* 1MiB */ 96 - read-only; 97 - }; 97 + partition@900000 { 98 + label = "devinfo"; 99 + reg = <0x900000 0x100000>; /* 1MiB */ 100 + read-only; 101 + }; 98 102 99 - /* kernel1 overlaps with rootfs1 by design */ 100 - partition@a00000 { 101 - label = "kernel1"; 102 - reg = <0xa00000 0x2800000>; /* 40MiB */ 103 - }; 103 + /* kernel1 overlaps with rootfs1 by design */ 104 + partition@a00000 { 105 + label = "kernel1"; 106 + reg = <0xa00000 0x2800000>; /* 40MiB */ 107 + }; 104 108 105 - partition@1000000 { 106 - label = "rootfs1"; 107 - reg = <0x1000000 0x2200000>; /* 34MiB */ 108 - }; 109 + partition@1000000 { 110 + label = "rootfs1"; 111 + reg = <0x1000000 0x2200000>; /* 34MiB */ 112 + }; 109 113 110 - /* kernel2 overlaps with rootfs2 by design */ 111 - partition@3200000 { 112 - label = "kernel2"; 113 - reg = <0x3200000 0x2800000>; /* 40MiB */ 114 - }; 114 + /* kernel2 overlaps with rootfs2 by design */ 115 + partition@3200000 { 116 + label = "kernel2"; 117 + reg = <0x3200000 0x2800000>; /* 40MiB */ 118 + }; 115 119 116 - partition@3800000 { 117 - label = "rootfs2"; 118 - reg = <0x3800000 0x2200000>; /* 34MiB */ 119 - }; 120 + partition@3800000 { 121 + label = "rootfs2"; 122 + reg = <0x3800000 0x2200000>; /* 34MiB */ 123 + }; 120 124 121 - /* 122 - * 38MiB, last MiB is for the BBT, not writable 123 - */ 124 - partition@5a00000 { 125 - label = "syscfg"; 126 - reg = <0x5a00000 0x2600000>; 127 - }; 125 + /* 126 + * 38MiB, last MiB is for the BBT, not writable 127 + */ 128 + partition@5a00000 { 129 + label = "syscfg"; 130 + reg = <0x5a00000 0x2600000>; 131 + }; 128 132 129 - /* 130 - * Unused area between "s_env" and "devinfo". 131 - * Moved here because otherwise the renumbered 132 - * partitions would break the bootloader 133 - * supplied bootargs 134 - */ 135 - partition@180000 { 136 - label = "unused_area"; 137 - reg = <0x280000 0x680000>; /* 6.5MiB */ 133 + /* 134 + * Unused area between "s_env" and "devinfo". 135 + * Moved here because otherwise the renumbered 136 + * partitions would break the bootloader 137 + * supplied bootargs 138 + */ 139 + partition@180000 { 140 + label = "unused_area"; 141 + reg = <0x280000 0x680000>; /* 6.5MiB */ 142 + }; 138 143 }; 139 144 };
+11 -5
arch/arm/boot/dts/armada-385-linksys.dtsi
··· 138 138 }; 139 139 }; 140 140 141 - &nand { 141 + &nand_controller { 142 142 /* 128MiB or 256MiB */ 143 143 status = "okay"; 144 - num-cs = <1>; 145 - marvell,nand-keep-config; 146 - marvell,nand-enable-arbiter; 147 - nand-on-flash-bbt; 144 + #address-cells = <1>; 145 + #size-cells = <0>; 146 + 147 + nand: nand@0 { 148 + reg = <0>; 149 + label = "pxa3xx_nand-0"; 150 + nand-rb = <0>; 151 + marvell,nand-keep-config; 152 + nand-on-flash-bbt; 153 + }; 148 154 }; 149 155 150 156 &mdio {
+32 -23
arch/arm/boot/dts/armada-388-db.dts
··· 91 91 status = "okay"; 92 92 }; 93 93 94 - flash@d0000 { 95 - status = "okay"; 96 - num-cs = <1>; 97 - marvell,nand-keep-config; 98 - marvell,nand-enable-arbiter; 99 - nand-on-flash-bbt; 100 - nand-ecc-strength = <4>; 101 - nand-ecc-step-size = <512>; 102 - 103 - partition@0 { 104 - label = "U-Boot"; 105 - reg = <0 0x800000>; 106 - }; 107 - partition@800000 { 108 - label = "Linux"; 109 - reg = <0x800000 0x800000>; 110 - }; 111 - partition@1000000 { 112 - label = "Filesystem"; 113 - reg = <0x1000000 0x3f000000>; 114 - }; 115 - }; 116 - 117 94 sdhci@d8000 { 118 95 broken-cd; 119 96 wp-inverted; ··· 142 165 }; 143 166 }; 144 167 168 + &nand_controller { 169 + status = "okay"; 170 + 171 + nand@0 { 172 + reg = <0>; 173 + label = "pxa3xx_nand-0"; 174 + nand-rb = <0>; 175 + marvell,nand-keep-config; 176 + nand-on-flash-bbt; 177 + nand-ecc-strength = <4>; 178 + nand-ecc-step-size = <512>; 179 + 180 + partitions { 181 + compatible = "fixed-partitions"; 182 + #address-cells = <1>; 183 + #size-cells = <1>; 184 + 185 + partition@0 { 186 + label = "U-Boot"; 187 + reg = <0 0x800000>; 188 + }; 189 + partition@800000 { 190 + label = "Linux"; 191 + reg = <0x800000 0x800000>; 192 + }; 193 + partition@1000000 { 194 + label = "Filesystem"; 195 + reg = <0x1000000 0x3f000000>; 196 + }; 197 + }; 198 + }; 199 + };
+3 -3
arch/arm/boot/dts/armada-38x.dtsi
··· 551 551 status = "okay"; 552 552 }; 553 553 554 - nand: flash@d0000 { 555 - compatible = "marvell,armada370-nand"; 554 + nand_controller: nand-controller@d0000 { 555 + compatible = "marvell,armada370-nand-controller"; 556 556 reg = <0xd0000 0x54>; 557 557 #address-cells = <1>; 558 - #size-cells = <1>; 558 + #size-cells = <0>; 559 559 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; 560 560 clocks = <&coredivclk 0>; 561 561 status = "disabled";