Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | S3C24XX ARM Linux Overview |
| 2 | ========================== |
| 3 | |
| 4 | |
| 5 | |
| 6 | Introduction |
| 7 | ------------ |
| 8 | |
| 9 | The Samsung S3C24XX range of ARM9 System-on-Chip CPUs are supported |
Ben Dooks | f964c30 | 2006-06-26 22:51:08 +0100 | [diff] [blame] | 10 | by the 's3c2410' architecture of ARM Linux. Currently the S3C2410, |
Nicolas Pitre | 632b7cf | 2011-07-05 23:44:31 -0400 | [diff] [blame] | 11 | S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443 and S3C2450 devices |
Ben Dooks | b9f141a | 2010-05-24 10:53:06 +0900 | [diff] [blame] | 12 | are supported. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | |
Nicolas Pitre | 632b7cf | 2011-07-05 23:44:31 -0400 | [diff] [blame] | 14 | Support for the S3C2400 and S3C24A0 series was never completed and the |
| 15 | corresponding code has been removed after a while. If someone wishes to |
| 16 | revive this effort, partial support can be retrieved from earlier Linux |
| 17 | versions. |
Ben Dooks | a08ceff | 2006-03-20 17:10:07 +0000 | [diff] [blame] | 18 | |
Ben Dooks | b9f141a | 2010-05-24 10:53:06 +0900 | [diff] [blame] | 19 | The S3C2416 and S3C2450 devices are very similar and S3C2450 support is |
| 20 | included under the arch/arm/mach-s3c2416 directory. Note, whilst core |
| 21 | support for these SoCs is in, work on some of the extra peripherals |
| 22 | and extra interrupts is still ongoing. |
| 23 | |
Ben Dooks | cbc212e | 2008-08-08 21:22:37 +0100 | [diff] [blame] | 24 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | Configuration |
| 26 | ------------- |
| 27 | |
| 28 | A generic S3C2410 configuration is provided, and can be used as the |
| 29 | default by `make s3c2410_defconfig`. This configuration has support |
| 30 | for all the machines, and the commonly used features on them. |
| 31 | |
| 32 | Certain machines may have their own default configurations as well, |
| 33 | please check the machine specific documentation. |
| 34 | |
| 35 | |
Ben Dooks | 961314d | 2007-02-13 13:29:46 +0100 | [diff] [blame] | 36 | Layout |
| 37 | ------ |
| 38 | |
| 39 | The core support files are located in the platform code contained in |
| 40 | arch/arm/plat-s3c24xx with headers in include/asm-arm/plat-s3c24xx. |
| 41 | This directory should be kept to items shared between the platform |
| 42 | code (arch/arm/plat-s3c24xx) and the arch/arm/mach-s3c24* code. |
| 43 | |
| 44 | Each cpu has a directory with the support files for it, and the |
| 45 | machines that carry the device. For example S3C2410 is contained |
| 46 | in arch/arm/mach-s3c2410 and S3C2440 in arch/arm/mach-s3c2440 |
| 47 | |
| 48 | Register, kernel and platform data definitions are held in the |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 49 | arch/arm/mach-s3c2410 directory./include/mach |
Ben Dooks | 961314d | 2007-02-13 13:29:46 +0100 | [diff] [blame] | 50 | |
Ben Dooks | cbc212e | 2008-08-08 21:22:37 +0100 | [diff] [blame] | 51 | arch/arm/plat-s3c24xx: |
| 52 | |
| 53 | Files in here are either common to all the s3c24xx family, |
| 54 | or are common to only some of them with names to indicate this |
| 55 | status. The files that are not common to all are generally named |
| 56 | with the initial cpu they support in the series to ensure a short |
| 57 | name without any possibility of confusion with newer devices. |
| 58 | |
| 59 | As an example, initially s3c244x would cover s3c2440 and s3c2442, but |
| 60 | with the s3c2443 which does not share many of the same drivers in |
| 61 | this directory, the name becomes invalid. We stick to s3c2440-<x> |
| 62 | to indicate a driver that is s3c2440 and s3c2442 compatible. |
| 63 | |
| 64 | This does mean that to find the status of any given SoC, a number |
| 65 | of directories may need to be searched. |
| 66 | |
Ben Dooks | 961314d | 2007-02-13 13:29:46 +0100 | [diff] [blame] | 67 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | Machines |
| 69 | -------- |
| 70 | |
| 71 | The currently supported machines are as follows: |
| 72 | |
| 73 | Simtec Electronics EB2410ITX (BAST) |
| 74 | |
| 75 | A general purpose development board, see EB2410ITX.txt for further |
| 76 | details |
| 77 | |
Ben Dooks | a08ceff | 2006-03-20 17:10:07 +0000 | [diff] [blame] | 78 | Simtec Electronics IM2440D20 (Osiris) |
| 79 | |
| 80 | CPU Module from Simtec Electronics, with a S3C2440A CPU, nand flash |
| 81 | and a PCMCIA controller. |
| 82 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 83 | Samsung SMDK2410 |
| 84 | |
| 85 | Samsung's own development board, geared for PDA work. |
| 86 | |
Ben Dooks | f964c30 | 2006-06-26 22:51:08 +0100 | [diff] [blame] | 87 | Samsung/Aiji SMDK2412 |
| 88 | |
| 89 | The S3C2412 version of the SMDK2440. |
| 90 | |
| 91 | Samsung/Aiji SMDK2413 |
| 92 | |
| 93 | The S3C2412 version of the SMDK2440. |
| 94 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | Samsung/Meritech SMDK2440 |
| 96 | |
Ben Dooks | f964c30 | 2006-06-26 22:51:08 +0100 | [diff] [blame] | 97 | The S3C2440 compatible version of the SMDK2440, which has the |
| 98 | option of an S3C2440 or S3C2442 CPU module. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | |
| 100 | Thorcom VR1000 |
| 101 | |
| 102 | Custom embedded board |
| 103 | |
| 104 | HP IPAQ 1940 |
| 105 | |
| 106 | Handheld (IPAQ), available in several varieties |
| 107 | |
| 108 | HP iPAQ rx3715 |
| 109 | |
| 110 | S3C2440 based IPAQ, with a number of variations depending on |
| 111 | features shipped. |
| 112 | |
| 113 | Acer N30 |
| 114 | |
| 115 | A S3C2410 based PDA from Acer. There is a Wiki page at |
| 116 | http://handhelds.org/moin/moin.cgi/AcerN30Documentation . |
| 117 | |
Ben Dooks | eb3b478 | 2006-12-24 10:08:09 +0100 | [diff] [blame] | 118 | AML M5900 |
| 119 | |
| 120 | American Microsystems' M5900 |
| 121 | |
| 122 | Nex Vision Nexcoder |
| 123 | Nex Vision Otom |
| 124 | |
| 125 | Two machines by Nex Vision |
| 126 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 127 | |
| 128 | Adding New Machines |
| 129 | ------------------- |
| 130 | |
Matt LaPlante | 3f6dee9 | 2006-10-03 22:45:33 +0200 | [diff] [blame] | 131 | The architecture has been designed to support as many machines as can |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | be configured for it in one kernel build, and any future additions |
| 133 | should keep this in mind before altering items outside of their own |
| 134 | machine files. |
| 135 | |
| 136 | Machine definitions should be kept in linux/arch/arm/mach-s3c2410, |
| 137 | and there are a number of examples that can be looked at. |
| 138 | |
| 139 | Read the kernel patch submission policies as well as the |
| 140 | Documentation/arm directory before submitting patches. The |
| 141 | ARM kernel series is managed by Russell King, and has a patch system |
| 142 | located at http://www.arm.linux.org.uk/developer/patches/ |
| 143 | as well as mailing lists that can be found from the same site. |
| 144 | |
| 145 | As a courtesy, please notify <ben-linux@fluff.org> of any new |
| 146 | machines or other modifications. |
| 147 | |
| 148 | Any large scale modifications, or new drivers should be discussed |
| 149 | on the ARM kernel mailing list (linux-arm-kernel) before being |
Ben Dooks | 6ff8f59 | 2005-11-01 19:44:29 +0000 | [diff] [blame] | 150 | attempted. See http://www.arm.linux.org.uk/mailinglists/ for the |
| 151 | mailing list information. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | |
| 153 | |
Ben Dooks | a08ceff | 2006-03-20 17:10:07 +0000 | [diff] [blame] | 154 | I2C |
| 155 | --- |
| 156 | |
| 157 | The hardware I2C core in the CPU is supported in single master |
| 158 | mode, and can be configured via platform data. |
| 159 | |
| 160 | |
| 161 | RTC |
| 162 | --- |
| 163 | |
| 164 | Support for the onboard RTC unit, including alarm function. |
| 165 | |
Ben Dooks | eb3b478 | 2006-12-24 10:08:09 +0100 | [diff] [blame] | 166 | This has recently been upgraded to use the new RTC core, |
| 167 | and the module has been renamed to rtc-s3c to fit in with |
| 168 | the new rtc naming scheme. |
| 169 | |
Ben Dooks | a08ceff | 2006-03-20 17:10:07 +0000 | [diff] [blame] | 170 | |
| 171 | Watchdog |
| 172 | -------- |
| 173 | |
| 174 | The onchip watchdog is available via the standard watchdog |
| 175 | interface. |
| 176 | |
| 177 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 178 | NAND |
| 179 | ---- |
| 180 | |
| 181 | The current kernels now have support for the s3c2410 NAND |
| 182 | controller. If there are any problems the latest linux-mtd |
Ben Dooks | eb3b478 | 2006-12-24 10:08:09 +0100 | [diff] [blame] | 183 | code can be found from http://www.linux-mtd.infradead.org/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 184 | |
Ben Dooks | 71d54f3 | 2008-04-15 11:36:19 +0100 | [diff] [blame] | 185 | For more information see Documentation/arm/Samsung-S3C24XX/NAND.txt |
| 186 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | |
Ben Dooks | a0f774b | 2008-08-08 21:22:39 +0100 | [diff] [blame] | 188 | SD/MMC |
| 189 | ------ |
| 190 | |
| 191 | The SD/MMC hardware pre S3C2443 is supported in the current |
| 192 | kernel, the driver is drivers/mmc/host/s3cmci.c and supports |
| 193 | 1 and 4 bit SD or MMC cards. |
| 194 | |
| 195 | The SDIO behaviour of this driver has not been fully tested. There is no |
| 196 | current support for hardware SDIO interrupts. |
| 197 | |
| 198 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 199 | Serial |
| 200 | ------ |
| 201 | |
| 202 | The s3c2410 serial driver provides support for the internal |
| 203 | serial ports. These devices appear as /dev/ttySAC0 through 3. |
| 204 | |
| 205 | To create device nodes for these, use the following commands |
| 206 | |
| 207 | mknod ttySAC0 c 204 64 |
| 208 | mknod ttySAC1 c 204 65 |
| 209 | mknod ttySAC2 c 204 66 |
| 210 | |
| 211 | |
| 212 | GPIO |
| 213 | ---- |
| 214 | |
| 215 | The core contains support for manipulating the GPIO, see the |
| 216 | documentation in GPIO.txt in the same directory as this file. |
| 217 | |
Ben Dooks | f47c32f | 2008-08-08 21:22:40 +0100 | [diff] [blame] | 218 | Newer kernels carry GPIOLIB, and support is being moved towards |
| 219 | this with some of the older support in line to be removed. |
| 220 | |
Ben Dooks | b9f141a | 2010-05-24 10:53:06 +0900 | [diff] [blame] | 221 | As of v2.6.34, the move towards using gpiolib support is almost |
| 222 | complete, and very little of the old calls are left. |
| 223 | |
Ben Dooks | d192bae | 2010-05-24 12:13:30 +0900 | [diff] [blame] | 224 | See Documentation/arm/Samsung-S3C24XX/GPIO.txt for the S3C24XX specific |
| 225 | support and Documentation/arm/Samsung/GPIO.txt for the core Samsung |
| 226 | implementation. |
| 227 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 228 | |
| 229 | Clock Management |
| 230 | ---------------- |
| 231 | |
| 232 | The core provides the interface defined in the header file |
| 233 | include/asm-arm/hardware/clock.h, to allow control over the |
| 234 | various clock units |
| 235 | |
| 236 | |
Ben Dooks | a08ceff | 2006-03-20 17:10:07 +0000 | [diff] [blame] | 237 | Suspend to RAM |
| 238 | -------------- |
| 239 | |
| 240 | For boards that provide support for suspend to RAM, the |
| 241 | system can be placed into low power suspend. |
| 242 | |
| 243 | See Suspend.txt for more information. |
| 244 | |
| 245 | |
Ben Dooks | eb3b478 | 2006-12-24 10:08:09 +0100 | [diff] [blame] | 246 | SPI |
| 247 | --- |
| 248 | |
| 249 | SPI drivers are available for both the in-built hardware |
| 250 | (although there is no DMA support yet) and a generic |
| 251 | GPIO based solution. |
| 252 | |
| 253 | |
| 254 | LEDs |
| 255 | ---- |
| 256 | |
| 257 | There is support for GPIO based LEDs via a platform driver |
| 258 | in the LED subsystem. |
| 259 | |
| 260 | |
Ben Dooks | 6ff8f59 | 2005-11-01 19:44:29 +0000 | [diff] [blame] | 261 | Platform Data |
| 262 | ------------- |
| 263 | |
| 264 | Whenever a device has platform specific data that is specified |
| 265 | on a per-machine basis, care should be taken to ensure the |
| 266 | following: |
| 267 | |
| 268 | 1) that default data is not left in the device to confuse the |
| 269 | driver if a machine does not set it at startup |
| 270 | |
| 271 | 2) the data should (if possible) be marked as __initdata, |
| 272 | to ensure that the data is thrown away if the machine is |
| 273 | not the one currently in use. |
| 274 | |
| 275 | The best way of doing this is to make a function that |
| 276 | kmalloc()s an area of memory, and copies the __initdata |
| 277 | and then sets the relevant device's platform data. Making |
| 278 | the function `__init` takes care of ensuring it is discarded |
| 279 | with the rest of the initialisation code |
| 280 | |
| 281 | static __init void s3c24xx_xxx_set_platdata(struct xxx_data *pd) |
| 282 | { |
| 283 | struct s3c2410_xxx_mach_info *npd; |
| 284 | |
| 285 | npd = kmalloc(sizeof(struct s3c2410_xxx_mach_info), GFP_KERNEL); |
| 286 | if (npd) { |
| 287 | memcpy(npd, pd, sizeof(struct s3c2410_xxx_mach_info)); |
| 288 | s3c_device_xxx.dev.platform_data = npd; |
| 289 | } else { |
| 290 | printk(KERN_ERR "no memory for xxx platform data\n"); |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | Note, since the code is marked as __init, it should not be |
| 295 | exported outside arch/arm/mach-s3c2410/, or exported to |
| 296 | modules via EXPORT_SYMBOL() and related functions. |
| 297 | |
Ben Dooks | a08ceff | 2006-03-20 17:10:07 +0000 | [diff] [blame] | 298 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 299 | Port Contributors |
| 300 | ----------------- |
| 301 | |
| 302 | Ben Dooks (BJD) |
| 303 | Vincent Sanders |
| 304 | Herbert Potzl |
| 305 | Arnaud Patard (RTP) |
| 306 | Roc Wu |
| 307 | Klaus Fetscher |
| 308 | Dimitry Andric |
| 309 | Shannon Holland |
| 310 | Guillaume Gourat (NexVision) |
| 311 | Christer Weinigel (wingel) (Acer N30) |
| 312 | Lucas Correia Villa Real (S3C2400 port) |
| 313 | |
| 314 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 315 | Document Author |
| 316 | --------------- |
| 317 | |
Ben Dooks | e02f866 | 2009-11-13 22:54:13 +0000 | [diff] [blame] | 318 | Ben Dooks, Copyright 2004-2006 Simtec Electronics |