Path: blob/master/Documentation/arm/Samsung-S3C24XX/Overview.txt
10823 views
S3C24XX ARM Linux Overview1==========================2345Introduction6------------78The Samsung S3C24XX range of ARM9 System-on-Chip CPUs are supported9by the 's3c2410' architecture of ARM Linux. Currently the S3C2410,10S3C2412, S3C2413, S3C2416 S3C2440, S3C2442, S3C2443 and S3C2450 devices11are supported.1213Support for the S3C2400 and S3C24A0 series are in progress.1415The S3C2416 and S3C2450 devices are very similar and S3C2450 support is16included under the arch/arm/mach-s3c2416 directory. Note, whilst core17support for these SoCs is in, work on some of the extra peripherals18and extra interrupts is still ongoing.192021Configuration22-------------2324A generic S3C2410 configuration is provided, and can be used as the25default by `make s3c2410_defconfig`. This configuration has support26for all the machines, and the commonly used features on them.2728Certain machines may have their own default configurations as well,29please check the machine specific documentation.303132Layout33------3435The core support files are located in the platform code contained in36arch/arm/plat-s3c24xx with headers in include/asm-arm/plat-s3c24xx.37This directory should be kept to items shared between the platform38code (arch/arm/plat-s3c24xx) and the arch/arm/mach-s3c24* code.3940Each cpu has a directory with the support files for it, and the41machines that carry the device. For example S3C2410 is contained42in arch/arm/mach-s3c2410 and S3C2440 in arch/arm/mach-s3c24404344Register, kernel and platform data definitions are held in the45arch/arm/mach-s3c2410 directory./include/mach4647arch/arm/plat-s3c24xx:4849Files in here are either common to all the s3c24xx family,50or are common to only some of them with names to indicate this51status. The files that are not common to all are generally named52with the initial cpu they support in the series to ensure a short53name without any possibility of confusion with newer devices.5455As an example, initially s3c244x would cover s3c2440 and s3c2442, but56with the s3c2443 which does not share many of the same drivers in57this directory, the name becomes invalid. We stick to s3c2440-<x>58to indicate a driver that is s3c2440 and s3c2442 compatible.5960This does mean that to find the status of any given SoC, a number61of directories may need to be searched.626364Machines65--------6667The currently supported machines are as follows:6869Simtec Electronics EB2410ITX (BAST)7071A general purpose development board, see EB2410ITX.txt for further72details7374Simtec Electronics IM2440D20 (Osiris)7576CPU Module from Simtec Electronics, with a S3C2440A CPU, nand flash77and a PCMCIA controller.7879Samsung SMDK24108081Samsung's own development board, geared for PDA work.8283Samsung/Aiji SMDK24128485The S3C2412 version of the SMDK2440.8687Samsung/Aiji SMDK24138889The S3C2412 version of the SMDK2440.9091Samsung/Meritech SMDK24409293The S3C2440 compatible version of the SMDK2440, which has the94option of an S3C2440 or S3C2442 CPU module.9596Thorcom VR10009798Custom embedded board99100HP IPAQ 1940101102Handheld (IPAQ), available in several varieties103104HP iPAQ rx3715105106S3C2440 based IPAQ, with a number of variations depending on107features shipped.108109Acer N30110111A S3C2410 based PDA from Acer. There is a Wiki page at112http://handhelds.org/moin/moin.cgi/AcerN30Documentation .113114AML M5900115116American Microsystems' M5900117118Nex Vision Nexcoder119Nex Vision Otom120121Two machines by Nex Vision122123124Adding New Machines125-------------------126127The architecture has been designed to support as many machines as can128be configured for it in one kernel build, and any future additions129should keep this in mind before altering items outside of their own130machine files.131132Machine definitions should be kept in linux/arch/arm/mach-s3c2410,133and there are a number of examples that can be looked at.134135Read the kernel patch submission policies as well as the136Documentation/arm directory before submitting patches. The137ARM kernel series is managed by Russell King, and has a patch system138located at http://www.arm.linux.org.uk/developer/patches/139as well as mailing lists that can be found from the same site.140141As a courtesy, please notify <[email protected]> of any new142machines or other modifications.143144Any large scale modifications, or new drivers should be discussed145on the ARM kernel mailing list (linux-arm-kernel) before being146attempted. See http://www.arm.linux.org.uk/mailinglists/ for the147mailing list information.148149150I2C151---152153The hardware I2C core in the CPU is supported in single master154mode, and can be configured via platform data.155156157RTC158---159160Support for the onboard RTC unit, including alarm function.161162This has recently been upgraded to use the new RTC core,163and the module has been renamed to rtc-s3c to fit in with164the new rtc naming scheme.165166167Watchdog168--------169170The onchip watchdog is available via the standard watchdog171interface.172173174NAND175----176177The current kernels now have support for the s3c2410 NAND178controller. If there are any problems the latest linux-mtd179code can be found from http://www.linux-mtd.infradead.org/180181For more information see Documentation/arm/Samsung-S3C24XX/NAND.txt182183184SD/MMC185------186187The SD/MMC hardware pre S3C2443 is supported in the current188kernel, the driver is drivers/mmc/host/s3cmci.c and supports1891 and 4 bit SD or MMC cards.190191The SDIO behaviour of this driver has not been fully tested. There is no192current support for hardware SDIO interrupts.193194195Serial196------197198The s3c2410 serial driver provides support for the internal199serial ports. These devices appear as /dev/ttySAC0 through 3.200201To create device nodes for these, use the following commands202203mknod ttySAC0 c 204 64204mknod ttySAC1 c 204 65205mknod ttySAC2 c 204 66206207208GPIO209----210211The core contains support for manipulating the GPIO, see the212documentation in GPIO.txt in the same directory as this file.213214Newer kernels carry GPIOLIB, and support is being moved towards215this with some of the older support in line to be removed.216217As of v2.6.34, the move towards using gpiolib support is almost218complete, and very little of the old calls are left.219220See Documentation/arm/Samsung-S3C24XX/GPIO.txt for the S3C24XX specific221support and Documentation/arm/Samsung/GPIO.txt for the core Samsung222implementation.223224225Clock Management226----------------227228The core provides the interface defined in the header file229include/asm-arm/hardware/clock.h, to allow control over the230various clock units231232233Suspend to RAM234--------------235236For boards that provide support for suspend to RAM, the237system can be placed into low power suspend.238239See Suspend.txt for more information.240241242SPI243---244245SPI drivers are available for both the in-built hardware246(although there is no DMA support yet) and a generic247GPIO based solution.248249250LEDs251----252253There is support for GPIO based LEDs via a platform driver254in the LED subsystem.255256257Platform Data258-------------259260Whenever a device has platform specific data that is specified261on a per-machine basis, care should be taken to ensure the262following:2632641) that default data is not left in the device to confuse the265driver if a machine does not set it at startup2662672) the data should (if possible) be marked as __initdata,268to ensure that the data is thrown away if the machine is269not the one currently in use.270271The best way of doing this is to make a function that272kmalloc()s an area of memory, and copies the __initdata273and then sets the relevant device's platform data. Making274the function `__init` takes care of ensuring it is discarded275with the rest of the initialisation code276277static __init void s3c24xx_xxx_set_platdata(struct xxx_data *pd)278{279struct s3c2410_xxx_mach_info *npd;280281npd = kmalloc(sizeof(struct s3c2410_xxx_mach_info), GFP_KERNEL);282if (npd) {283memcpy(npd, pd, sizeof(struct s3c2410_xxx_mach_info));284s3c_device_xxx.dev.platform_data = npd;285} else {286printk(KERN_ERR "no memory for xxx platform data\n");287}288}289290Note, since the code is marked as __init, it should not be291exported outside arch/arm/mach-s3c2410/, or exported to292modules via EXPORT_SYMBOL() and related functions.293294295Port Contributors296-----------------297298Ben Dooks (BJD)299Vincent Sanders300Herbert Potzl301Arnaud Patard (RTP)302Roc Wu303Klaus Fetscher304Dimitry Andric305Shannon Holland306Guillaume Gourat (NexVision)307Christer Weinigel (wingel) (Acer N30)308Lucas Correia Villa Real (S3C2400 port)309310311Document Author312---------------313314Ben Dooks, Copyright 2004-2006 Simtec Electronics315316317