Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Paul Burton | 0752f92 | 2015-05-24 16:11:47 +0100 | [diff] [blame] | 2 | /dts-v1/; |
| 3 | |
| 4 | #include "jz4780.dtsi" |
Harvey Hunt | 8fec553 | 2017-07-07 17:12:08 +0100 | [diff] [blame] | 5 | #include <dt-bindings/gpio/gpio.h> |
Paul Burton | 0752f92 | 2015-05-24 16:11:47 +0100 | [diff] [blame] | 6 | |
| 7 | / { |
| 8 | compatible = "img,ci20", "ingenic,jz4780"; |
| 9 | |
| 10 | aliases { |
| 11 | serial0 = &uart0; |
| 12 | serial1 = &uart1; |
| 13 | serial3 = &uart3; |
| 14 | serial4 = &uart4; |
| 15 | }; |
| 16 | |
| 17 | chosen { |
| 18 | stdout-path = &uart4; |
| 19 | }; |
| 20 | |
| 21 | memory { |
| 22 | device_type = "memory"; |
| 23 | reg = <0x0 0x10000000 |
| 24 | 0x30000000 0x30000000>; |
| 25 | }; |
Harvey Hunt | 8fec553 | 2017-07-07 17:12:08 +0100 | [diff] [blame] | 26 | |
| 27 | eth0_power: fixedregulator@0 { |
| 28 | compatible = "regulator-fixed"; |
| 29 | regulator-name = "eth0_power"; |
| 30 | gpio = <&gpb 25 GPIO_ACTIVE_LOW>; |
| 31 | enable-active-high; |
| 32 | }; |
Paul Burton | 0752f92 | 2015-05-24 16:11:47 +0100 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | &ext { |
| 36 | clock-frequency = <48000000>; |
| 37 | }; |
| 38 | |
Ezequiel Garcia | 671963b | 2018-03-28 18:00:55 -0300 | [diff] [blame^] | 39 | &mmc0 { |
| 40 | status = "okay"; |
| 41 | |
| 42 | bus-width = <4>; |
| 43 | max-frequency = <50000000>; |
| 44 | |
| 45 | pinctrl-names = "default"; |
| 46 | pinctrl-0 = <&pins_mmc0>; |
| 47 | |
| 48 | cd-gpios = <&gpf 20 GPIO_ACTIVE_LOW>; |
| 49 | }; |
| 50 | |
| 51 | &mmc1 { |
| 52 | status = "okay"; |
| 53 | |
| 54 | bus-width = <4>; |
| 55 | max-frequency = <50000000>; |
| 56 | |
| 57 | pinctrl-names = "default"; |
| 58 | pinctrl-0 = <&pins_mmc1>; |
| 59 | }; |
| 60 | |
Paul Burton | 0752f92 | 2015-05-24 16:11:47 +0100 | [diff] [blame] | 61 | &uart0 { |
| 62 | status = "okay"; |
Paul Cercueil | 89a6139 | 2017-05-12 18:53:02 +0200 | [diff] [blame] | 63 | |
| 64 | pinctrl-names = "default"; |
| 65 | pinctrl-0 = <&pins_uart0>; |
Paul Burton | 0752f92 | 2015-05-24 16:11:47 +0100 | [diff] [blame] | 66 | }; |
| 67 | |
| 68 | &uart1 { |
| 69 | status = "okay"; |
Paul Cercueil | 89a6139 | 2017-05-12 18:53:02 +0200 | [diff] [blame] | 70 | |
| 71 | pinctrl-names = "default"; |
| 72 | pinctrl-0 = <&pins_uart1>; |
Paul Burton | 0752f92 | 2015-05-24 16:11:47 +0100 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | &uart3 { |
| 76 | status = "okay"; |
Paul Cercueil | 89a6139 | 2017-05-12 18:53:02 +0200 | [diff] [blame] | 77 | |
| 78 | pinctrl-names = "default"; |
| 79 | pinctrl-0 = <&pins_uart2>; |
Paul Burton | 0752f92 | 2015-05-24 16:11:47 +0100 | [diff] [blame] | 80 | }; |
| 81 | |
| 82 | &uart4 { |
| 83 | status = "okay"; |
Paul Cercueil | 89a6139 | 2017-05-12 18:53:02 +0200 | [diff] [blame] | 84 | |
| 85 | pinctrl-names = "default"; |
| 86 | pinctrl-0 = <&pins_uart4>; |
Paul Burton | 0752f92 | 2015-05-24 16:11:47 +0100 | [diff] [blame] | 87 | }; |
Alex Smith | 7880055 | 2015-12-03 12:02:22 +0000 | [diff] [blame] | 88 | |
| 89 | &nemc { |
| 90 | status = "okay"; |
| 91 | |
| 92 | nandc: nand-controller@1 { |
| 93 | compatible = "ingenic,jz4780-nand"; |
| 94 | reg = <1 0 0x1000000>; |
| 95 | |
| 96 | #address-cells = <1>; |
| 97 | #size-cells = <0>; |
| 98 | |
| 99 | ingenic,bch-controller = <&bch>; |
| 100 | |
| 101 | ingenic,nemc-tAS = <10>; |
| 102 | ingenic,nemc-tAH = <5>; |
| 103 | ingenic,nemc-tBP = <10>; |
| 104 | ingenic,nemc-tAW = <15>; |
| 105 | ingenic,nemc-tSTRV = <100>; |
| 106 | |
Paul Cercueil | 89a6139 | 2017-05-12 18:53:02 +0200 | [diff] [blame] | 107 | /* |
| 108 | * Only CLE/ALE are needed for the devices that are connected, rather |
| 109 | * than the full address line set. |
| 110 | */ |
| 111 | pinctrl-names = "default"; |
| 112 | pinctrl-0 = <&pins_nemc>; |
| 113 | |
Alex Smith | 7880055 | 2015-12-03 12:02:22 +0000 | [diff] [blame] | 114 | nand@1 { |
| 115 | reg = <1>; |
| 116 | |
| 117 | nand-ecc-step-size = <1024>; |
| 118 | nand-ecc-strength = <24>; |
| 119 | nand-ecc-mode = "hw"; |
| 120 | nand-on-flash-bbt; |
| 121 | |
Paul Cercueil | 89a6139 | 2017-05-12 18:53:02 +0200 | [diff] [blame] | 122 | pinctrl-names = "default"; |
| 123 | pinctrl-0 = <&pins_nemc_cs1>; |
| 124 | |
Alex Smith | 7880055 | 2015-12-03 12:02:22 +0000 | [diff] [blame] | 125 | partitions { |
| 126 | compatible = "fixed-partitions"; |
| 127 | #address-cells = <2>; |
| 128 | #size-cells = <2>; |
| 129 | |
| 130 | partition@0 { |
| 131 | label = "u-boot-spl"; |
| 132 | reg = <0x0 0x0 0x0 0x800000>; |
| 133 | }; |
| 134 | |
Mathieu Malaterre | c768519 | 2018-01-24 12:42:07 +0100 | [diff] [blame] | 135 | partition@800000 { |
Alex Smith | 7880055 | 2015-12-03 12:02:22 +0000 | [diff] [blame] | 136 | label = "u-boot"; |
| 137 | reg = <0x0 0x800000 0x0 0x200000>; |
| 138 | }; |
| 139 | |
Mathieu Malaterre | c768519 | 2018-01-24 12:42:07 +0100 | [diff] [blame] | 140 | partition@a00000 { |
Alex Smith | 7880055 | 2015-12-03 12:02:22 +0000 | [diff] [blame] | 141 | label = "u-boot-env"; |
| 142 | reg = <0x0 0xa00000 0x0 0x200000>; |
| 143 | }; |
| 144 | |
Mathieu Malaterre | c768519 | 2018-01-24 12:42:07 +0100 | [diff] [blame] | 145 | partition@c00000 { |
Alex Smith | 7880055 | 2015-12-03 12:02:22 +0000 | [diff] [blame] | 146 | label = "boot"; |
| 147 | reg = <0x0 0xc00000 0x0 0x4000000>; |
| 148 | }; |
| 149 | |
Mathieu Malaterre | 018eab8 | 2018-01-24 12:42:08 +0100 | [diff] [blame] | 150 | partition@4c00000 { |
Alex Smith | 7880055 | 2015-12-03 12:02:22 +0000 | [diff] [blame] | 151 | label = "system"; |
| 152 | reg = <0x0 0x4c00000 0x1 0xfb400000>; |
| 153 | }; |
| 154 | }; |
| 155 | }; |
| 156 | }; |
Harvey Hunt | 8fec553 | 2017-07-07 17:12:08 +0100 | [diff] [blame] | 157 | |
| 158 | dm9000@6 { |
| 159 | compatible = "davicom,dm9000"; |
| 160 | davicom,no-eeprom; |
| 161 | |
| 162 | pinctrl-names = "default"; |
| 163 | pinctrl-0 = <&pins_nemc_cs6>; |
| 164 | |
| 165 | reg = <6 0 1 /* addr */ |
| 166 | 6 2 1>; /* data */ |
| 167 | |
| 168 | ingenic,nemc-tAS = <15>; |
| 169 | ingenic,nemc-tAH = <10>; |
| 170 | ingenic,nemc-tBP = <20>; |
| 171 | ingenic,nemc-tAW = <50>; |
| 172 | ingenic,nemc-tSTRV = <100>; |
| 173 | |
| 174 | reset-gpios = <&gpf 12 GPIO_ACTIVE_HIGH>; |
| 175 | vcc-supply = <ð0_power>; |
| 176 | |
| 177 | interrupt-parent = <&gpe>; |
| 178 | interrupts = <19 4>; |
| 179 | }; |
Alex Smith | 7880055 | 2015-12-03 12:02:22 +0000 | [diff] [blame] | 180 | }; |
| 181 | |
| 182 | &bch { |
| 183 | status = "okay"; |
| 184 | }; |
Paul Cercueil | 89a6139 | 2017-05-12 18:53:02 +0200 | [diff] [blame] | 185 | |
| 186 | &pinctrl { |
| 187 | pins_uart0: uart0 { |
| 188 | function = "uart0"; |
| 189 | groups = "uart0-data"; |
| 190 | bias-disable; |
| 191 | }; |
| 192 | |
| 193 | pins_uart1: uart1 { |
| 194 | function = "uart1"; |
| 195 | groups = "uart1-data"; |
| 196 | bias-disable; |
| 197 | }; |
| 198 | |
| 199 | pins_uart2: uart2 { |
| 200 | function = "uart2"; |
| 201 | groups = "uart2-data", "uart2-hwflow"; |
| 202 | bias-disable; |
| 203 | }; |
| 204 | |
| 205 | pins_uart4: uart4 { |
| 206 | function = "uart4"; |
| 207 | groups = "uart4-data"; |
| 208 | bias-disable; |
| 209 | }; |
| 210 | |
| 211 | pins_nemc: nemc { |
| 212 | function = "nemc"; |
| 213 | groups = "nemc-data", "nemc-cle-ale", "nemc-rd-we", "nemc-frd-fwe"; |
| 214 | bias-disable; |
| 215 | }; |
| 216 | |
| 217 | pins_nemc_cs1: nemc-cs1 { |
| 218 | function = "nemc-cs1"; |
| 219 | groups = "nemc-cs1"; |
| 220 | bias-disable; |
| 221 | }; |
Harvey Hunt | 8fec553 | 2017-07-07 17:12:08 +0100 | [diff] [blame] | 222 | |
| 223 | pins_nemc_cs6: nemc-cs6 { |
| 224 | function = "nemc-cs6"; |
| 225 | groups = "nemc-cs6"; |
| 226 | bias-disable; |
| 227 | }; |
Ezequiel Garcia | 671963b | 2018-03-28 18:00:55 -0300 | [diff] [blame^] | 228 | |
| 229 | pins_mmc0: mmc0 { |
| 230 | function = "mmc0"; |
| 231 | groups = "mmc0-1bit-e", "mmc0-4bit-e"; |
| 232 | bias-disable; |
| 233 | }; |
| 234 | |
| 235 | pins_mmc1: mmc1 { |
| 236 | function = "mmc1"; |
| 237 | groups = "mmc1-1bit-d", "mmc1-4bit-d"; |
| 238 | bias-disable; |
| 239 | }; |
Paul Cercueil | 89a6139 | 2017-05-12 18:53:02 +0200 | [diff] [blame] | 240 | }; |