···11+* Insignal's Exynos4210 based Origen evaluation board22+33+Origen low-cost evaluation board is based on Samsung's Exynos4210 SoC.44+55+Required root node properties:66+ - compatible = should be one or more of the following.77+ (a) "samsung,smdkv310" - for Samsung's SMDKV310 eval board.88+ (b) "samsung,exynos4210" - for boards based on Exynos4210 SoC.
···11+* Samsung's Exynos4210 based SMDKV310 evaluation board22+33+SMDKV310 evaluation board is based on Samsung's Exynos4210 SoC.44+55+Required root node properties:66+ - compatible = should be one or more of the following.77+ (a) "samsung,smdkv310" - for Samsung's SMDKV310 eval board.88+ (b) "samsung,exynos4210" - for boards based on Exynos4210 SoC.
···11+* ARM PrimeCell PL330 DMA Controller22+33+The ARM PrimeCell PL330 DMA controller can move blocks of memory contents44+between memory and peripherals or memory to memory.55+66+Required properties:77+ - compatible: should include both "arm,pl330" and "arm,primecell".88+ - reg: physical base address of the controller and length of memory mapped99+ region.1010+ - interrupts: interrupt number to the cpu.1111+1212+Example:1313+1414+ pdma0: pdma@12680000 {1515+ compatible = "arm,pl330", "arm,primecell";1616+ reg = <0x12680000 0x1000>;1717+ interrupts = <99>;1818+ };1919+2020+Client drivers (device nodes requiring dma transfers from dev-to-mem or2121+mem-to-dev) should specify the DMA channel numbers using a two-value pair2222+as shown below.2323+2424+ [property name] = <[phandle of the dma controller] [dma request id]>;2525+2626+ where 'dma request id' is the dma request number which is connected2727+ to the client controller. The 'property name' is recommended to be2828+ of the form <name>-dma-channel.2929+3030+ Example: tx-dma-channel = <&pdma0 12>;
···11+Samsung Exynos4 GPIO Controller22+33+Required properties:44+- compatible: Compatible property value should be "samsung,exynos4-gpio>".55+66+- reg: Physical base address of the controller and length of memory mapped77+ region.88+99+- #gpio-cells: Should be 4. The syntax of the gpio specifier used by client nodes1010+ should be the following with values derived from the SoC user manual.1111+ <[phandle of the gpio controller node]1212+ [pin number within the gpio controller]1313+ [mux function]1414+ [pull up/down]1515+ [drive strength]>1616+1717+ Values for gpio specifier:1818+ - Pin number: is a value between 0 to 7.1919+ - Pull Up/Down: 0 - Pull Up/Down Disabled.2020+ 1 - Pull Down Enabled.2121+ 3 - Pull Up Enabled.2222+ - Drive Strength: 0 - 1x,2323+ 1 - 3x,2424+ 2 - 2x,2525+ 3 - 4x2626+2727+- gpio-controller: Specifies that the node is a gpio controller.2828+- #address-cells: should be 1.2929+- #size-cells: should be 1.3030+3131+Example:3232+3333+ gpa0: gpio-controller@11400000 {3434+ #address-cells = <1>;3535+ #size-cells = <1>;3636+ compatible = "samsung,exynos4-gpio";3737+ reg = <0x11400000 0x20>;3838+ #gpio-cells = <4>;3939+ gpio-controller;4040+ };
···11+* Samsung's Keypad Controller device tree bindings22+33+Samsung's Keypad controller is used to interface a SoC with a matrix-type44+keypad device. The keypad controller supports multiple row and column lines.55+A key can be placed at each intersection of a unique row and a unique column.66+The keypad controller can sense a key-press and key-release and report the77+event using a interrupt to the cpu.88+99+Required SoC Specific Properties:1010+- compatible: should be one of the following1111+ - "samsung,s3c6410-keypad": For controllers compatible with s3c6410 keypad1212+ controller.1313+ - "samsung,s5pv210-keypad": For controllers compatible with s5pv210 keypad1414+ controller.1515+1616+- reg: physical base address of the controller and length of memory mapped1717+ region.1818+1919+- interrupts: The interrupt number to the cpu.2020+2121+Required Board Specific Properties:2222+- samsung,keypad-num-rows: Number of row lines connected to the keypad2323+ controller.2424+2525+- samsung,keypad-num-columns: Number of column lines connected to the2626+ keypad controller.2727+2828+- row-gpios: List of gpios used as row lines. The gpio specifier for2929+ this property depends on the gpio controller to which these row lines3030+ are connected.3131+3232+- col-gpios: List of gpios used as column lines. The gpio specifier for3333+ this property depends on the gpio controller to which these column3434+ lines are connected.3535+3636+- Keys represented as child nodes: Each key connected to the keypad3737+ controller is represented as a child node to the keypad controller3838+ device node and should include the following properties.3939+ - keypad,row: the row number to which the key is connected.4040+ - keypad,column: the column number to which the key is connected.4141+ - linux,code: the key-code to be reported when the key is pressed4242+ and released.4343+4444+Optional Properties specific to linux:4545+- linux,keypad-no-autorepeat: do no enable autorepeat feature.4646+- linux,keypad-wakeup: use any event on keypad as wakeup event.4747+4848+4949+Example:5050+ keypad@100A0000 {5151+ compatible = "samsung,s5pv210-keypad";5252+ reg = <0x100A0000 0x100>;5353+ interrupts = <173>;5454+ samsung,keypad-num-rows = <2>;5555+ samsung,keypad-num-columns = <8>;5656+ linux,input-no-autorepeat;5757+ linux,input-wakeup;5858+5959+ row-gpios = <&gpx2 0 3 3 06060+ &gpx2 1 3 3 0>;6161+6262+ col-gpios = <&gpx1 0 3 0 06363+ &gpx1 1 3 0 06464+ &gpx1 2 3 0 06565+ &gpx1 3 3 0 06666+ &gpx1 4 3 0 06767+ &gpx1 5 3 0 06868+ &gpx1 6 3 0 06969+ &gpx1 7 3 0 0>;7070+7171+ key_1 {7272+ keypad,row = <0>;7373+ keypad,column = <3>;7474+ linux,code = <2>;7575+ };7676+7777+ key_2 {7878+ keypad,row = <0>;7979+ keypad,column = <4>;8080+ linux,code = <3>;8181+ };8282+8383+ key_3 {8484+ keypad,row = <0>;8585+ keypad,column = <5>;8686+ linux,code = <4>;8787+ };8888+ };
+20
Documentation/devicetree/bindings/rtc/s3c-rtc.txt
···11+* Samsung's S3C Real Time Clock controller22+33+Required properties:44+- compatible: should be one of the following.55+ * "samsung,s3c2410-rtc" - for controllers compatible with s3c2410 rtc.66+ * "samsung,s3c6410-rtc" - for controllers compatible with s3c6410 rtc.77+- reg: physical base address of the controller and length of memory mapped88+ region.99+- interrupts: Two interrupt numbers to the cpu should be specified. First1010+ interrupt number is the rtc alarm interupt and second interrupt number1111+ is the rtc tick interrupt. The number of cells representing a interrupt1212+ depends on the parent interrupt controller.1313+1414+Example:1515+1616+ rtc@10070000 {1717+ compatible = "samsung,s3c6410-rtc";1818+ reg = <0x10070000 0x100>;1919+ interrupts = <44 0 45 0>;2020+ };
···11+* Samsung's UART Controller22+33+The Samsung's UART controller is used for interfacing SoC with serial communicaion44+devices.55+66+Required properties:77+- compatible: should be88+ - "samsung,exynos4210-uart", for UART's compatible with Exynos4210 uart ports.99+1010+- reg: base physical address of the controller and length of memory mapped1111+ region.1212+1313+- interrupts: interrupt number to the cpu. The interrupt specifier format depends1414+ on the interrupt controller parent.
+137
arch/arm/boot/dts/exynos4210-origen.dts
···11+/*22+ * Samsung's Exynos4210 based Origen board device tree source33+ *44+ * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.55+ * http://www.samsung.com66+ * Copyright (c) 2010-2011 Linaro Ltd.77+ * www.linaro.org88+ *99+ * Device tree source file for Insignal's Origen board which is based on1010+ * Samsung's Exynos4210 SoC.1111+ *1212+ * This program is free software; you can redistribute it and/or modify1313+ * it under the terms of the GNU General Public License version 2 as1414+ * published by the Free Software Foundation.1515+*/1616+1717+/dts-v1/;1818+/include/ "exynos4210.dtsi"1919+2020+/ {2121+ model = "Insignal Origen evaluation board based on Exynos4210";2222+ compatible = "insignal,origen", "samsung,exynos4210";2323+2424+ memory {2525+ reg = <0x40000000 0x40000000>;2626+ };2727+2828+ chosen {2929+ bootargs ="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC2,115200 init=/linuxrc";3030+ };3131+3232+ sdhci@12530000 {3333+ samsung,sdhci-bus-width = <4>;3434+ linux,mmc_cap_4_bit_data;3535+ samsung,sdhci-cd-internal;3636+ gpio-cd = <&gpk2 2 2 3 3>;3737+ gpios = <&gpk2 0 2 0 3>,3838+ <&gpk2 1 2 0 3>,3939+ <&gpk2 3 2 3 3>,4040+ <&gpk2 4 2 3 3>,4141+ <&gpk2 5 2 3 3>,4242+ <&gpk2 6 2 3 3>;4343+ };4444+4545+ sdhci@12510000 {4646+ samsung,sdhci-bus-width = <4>;4747+ linux,mmc_cap_4_bit_data;4848+ samsung,sdhci-cd-internal;4949+ gpio-cd = <&gpk0 2 2 3 3>;5050+ gpios = <&gpk0 0 2 0 3>,5151+ <&gpk0 1 2 0 3>,5252+ <&gpk0 3 2 3 3>,5353+ <&gpk0 4 2 3 3>,5454+ <&gpk0 5 2 3 3>,5555+ <&gpk0 6 2 3 3>;5656+ };5757+5858+ gpio_keys {5959+ compatible = "gpio-keys";6060+ #address-cells = <1>;6161+ #size-cells = <0>;6262+6363+ up {6464+ label = "Up";6565+ gpios = <&gpx2 0 0 0 2>;6666+ linux,code = <103>;6767+ };6868+6969+ down {7070+ label = "Down";7171+ gpios = <&gpx2 1 0 0 2>;7272+ linux,code = <108>;7373+ };7474+7575+ back {7676+ label = "Back";7777+ gpios = <&gpx1 7 0 0 2>;7878+ linux,code = <158>;7979+ };8080+8181+ home {8282+ label = "Home";8383+ gpios = <&gpx1 6 0 0 2>;8484+ linux,code = <102>;8585+ };8686+8787+ menu {8888+ label = "Menu";8989+ gpios = <&gpx1 5 0 0 2>;9090+ linux,code = <139>;9191+ };9292+ };9393+9494+ keypad@100A0000 {9595+ status = "disabled";9696+ };9797+9898+ sdhci@12520000 {9999+ status = "disabled";100100+ };101101+102102+ sdhci@12540000 {103103+ status = "disabled";104104+ };105105+106106+ i2c@13860000 {107107+ status = "disabled";108108+ };109109+110110+ i2c@13870000 {111111+ status = "disabled";112112+ };113113+114114+ i2c@13880000 {115115+ status = "disabled";116116+ };117117+118118+ i2c@13890000 {119119+ status = "disabled";120120+ };121121+122122+ i2c@138A0000 {123123+ status = "disabled";124124+ };125125+126126+ i2c@138B0000 {127127+ status = "disabled";128128+ };129129+130130+ i2c@138C0000 {131131+ status = "disabled";132132+ };133133+134134+ i2c@138D0000 {135135+ status = "disabled";136136+ };137137+};
···5757 help5858 Use MCT (Multi Core Timer) as kernel timers59596060+config EXYNOS4_DEV_DMA6161+ bool6262+ help6363+ Compile in amba device definitions for DMA controller6464+6065config EXYNOS4_DEV_AHCI6166 bool6267 help···187182 select SAMSUNG_DEV_BACKLIGHT188183 select EXYNOS4_DEV_AHCI189184 select SAMSUNG_DEV_KEYPAD185185+ select EXYNOS4_DEV_DMA190186 select EXYNOS4_DEV_PD191187 select SAMSUNG_DEV_PWM192188 select EXYNOS4_DEV_USB_OHCI···209203 select S3C_DEV_HSMMC2210204 select S3C_DEV_HSMMC3211205 select EXYNOS4_DEV_AHCI206206+ select EXYNOS4_DEV_DMA212207 select EXYNOS4_DEV_SYSMMU213208 select EXYNOS4_SETUP_SDHCI214209 help···235228 select S5P_DEV_MFC236229 select S5P_DEV_ONENAND237230 select S5P_DEV_TV231231+ select EXYNOS4_DEV_DMA238232 select EXYNOS4_DEV_PD239233 select EXYNOS4_SETUP_FIMD0240234 select EXYNOS4_SETUP_I2C1···269261 select S5P_DEV_MFC270262 select S5P_DEV_USB_EHCI271263 select S5P_SETUP_MIPIPHY264264+ select EXYNOS4_DEV_DMA272265 select EXYNOS4_DEV_PD273266 select EXYNOS4_SETUP_FIMC274267 select EXYNOS4_SETUP_FIMD0···302293 select S5P_DEV_USB_EHCI303294 select SAMSUNG_DEV_BACKLIGHT304295 select SAMSUNG_DEV_PWM296296+ select EXYNOS4_DEV_DMA305297 select EXYNOS4_DEV_PD306298 select EXYNOS4_DEV_USB_OHCI307299 select EXYNOS4_SETUP_FIMD0···343333 help344334 Machine support for Samsung SMDK4412345335endif336336+337337+comment "Flattened Device Tree based board for Exynos4 based SoC"338338+339339+config MACH_EXYNOS4_DT340340+ bool "Samsung Exynos4 Machine using device tree"341341+ select CPU_EXYNOS4210342342+ select USE_OF343343+ select ARM_AMBA344344+ select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD345345+ help346346+ Machine support for Samsung Exynos4 machine with device tree enabled.347347+ Select this if a fdt blob is available for the Exynos4 SoC based board.348348+ Note: This is under development and not all peripherals can be supported349349+ with this machine file.346350347351if ARCH_EXYNOS4348352
···11+/*22+ * Samsung's Exynos4210 flattened device tree enabled machine33+ *44+ * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.55+ * http://www.samsung.com66+ * Copyright (c) 2010-2011 Linaro Ltd.77+ * www.linaro.org88+ *99+ * This program is free software; you can redistribute it and/or modify1010+ * it under the terms of the GNU General Public License version 2 as1111+ * published by the Free Software Foundation.1212+*/1313+1414+#include <linux/of_platform.h>1515+#include <linux/serial_core.h>1616+1717+#include <asm/mach/arch.h>1818+#include <mach/map.h>1919+2020+#include <plat/cpu.h>2121+#include <plat/regs-serial.h>2222+#include <plat/exynos4.h>2323+2424+/*2525+ * The following lookup table is used to override device names when devices2626+ * are registered from device tree. This is temporarily added to enable2727+ * device tree support addition for the Exynos4 architecture.2828+ *2929+ * For drivers that require platform data to be provided from the machine3030+ * file, a platform data pointer can also be supplied along with the3131+ * devices names. Usually, the platform data elements that cannot be parsed3232+ * from the device tree by the drivers (example: function pointers) are3333+ * supplied. But it should be noted that this is a temporary mechanism and3434+ * at some point, the drivers should be capable of parsing all the platform3535+ * data from the device tree.3636+ */3737+static const struct of_dev_auxdata exynos4210_auxdata_lookup[] __initconst = {3838+ OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART0,3939+ "exynos4210-uart.0", NULL),4040+ OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART1,4141+ "exynos4210-uart.1", NULL),4242+ OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART2,4343+ "exynos4210-uart.2", NULL),4444+ OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART3,4545+ "exynos4210-uart.3", NULL),4646+ OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(0),4747+ "exynos4-sdhci.0", NULL),4848+ OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(1),4949+ "exynos4-sdhci.1", NULL),5050+ OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(2),5151+ "exynos4-sdhci.2", NULL),5252+ OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(3),5353+ "exynos4-sdhci.3", NULL),5454+ OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(0),5555+ "s3c2440-i2c.0", NULL),5656+ OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL),5757+ OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL),5858+ {},5959+};6060+6161+static void __init exynos4210_dt_map_io(void)6262+{6363+ s5p_init_io(NULL, 0, S5P_VA_CHIPID);6464+ s3c24xx_init_clocks(24000000);6565+}6666+6767+static void __init exynos4210_dt_machine_init(void)6868+{6969+ of_platform_populate(NULL, of_default_bus_match_table,7070+ exynos4210_auxdata_lookup, NULL);7171+}7272+7373+static char const *exynos4210_dt_compat[] __initdata = {7474+ "samsung,exynos4210",7575+ NULL7676+};7777+7878+DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")7979+ /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */8080+ .init_irq = exynos4_init_irq,8181+ .map_io = exynos4210_dt_map_io,8282+ .init_machine = exynos4210_dt_machine_init,8383+ .timer = &exynos4_timer,8484+ .dt_compat = exynos4210_dt_compat,8585+MACHINE_END
-22
arch/arm/mach-exynos/setup-sdhci.c
···11-/* linux/arch/arm/mach-exynos4/setup-sdhci.c22- *33- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.44- * http://www.samsung.com55- *66- * EXYNOS4 - Helper functions for settign up SDHCI device(s) (HSMMC)77- *88- * This program is free software; you can redistribute it and/or modify99- * it under the terms of the GNU General Public License version 2 as1010- * published by the Free Software Foundation.1111-*/1212-1313-#include <linux/types.h>1414-1515-/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */1616-1717-char *exynos4_hsmmc_clksrcs[4] = {1818- [0] = NULL,1919- [1] = NULL,2020- [2] = "sclk_mmc", /* mmc_bus */2121- [3] = NULL,2222-};
···11-/* linux/arch/arm/mach-s3c2416/setup-sdhci.c22- *33- * Copyright 2010 Promwad Innovation Company44- * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>55- *66- * S3C2416 - Helper functions for settign up SDHCI device(s) (HSMMC)77- *88- * Based on mach-s3c64xx/setup-sdhci.c99- *1010- * This program is free software; you can redistribute it and/or modify1111- * it under the terms of the GNU General Public License version 2 as1212- * published by the Free Software Foundation.1313-*/1414-1515-#include <linux/types.h>1616-1717-/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */1818-1919-char *s3c2416_hsmmc_clksrcs[4] = {2020- [0] = "hsmmc",2121- [1] = "hsmmc",2222- [2] = "hsmmc-if",2323- /* [3] = "48m", - note not successfully used yet */2424-};
···11-/* linux/arch/arm/mach-s3c64xx/setup-sdhci.c22- *33- * Copyright 2008 Simtec Electronics44- * Copyright 2008 Simtec Electronics55- * Ben Dooks <ben@simtec.co.uk>66- * http://armlinux.simtec.co.uk/77- *88- * S3C6400/S3C6410 - Helper functions for settign up SDHCI device(s) (HSMMC)99- *1010- * This program is free software; you can redistribute it and/or modify1111- * it under the terms of the GNU General Public License version 2 as1212- * published by the Free Software Foundation.1313-*/1414-1515-#include <linux/types.h>1616-1717-/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */1818-1919-char *s3c64xx_hsmmc_clksrcs[4] = {2020- [0] = "hsmmc",2121- [1] = "hsmmc",2222- [2] = "mmc_bus",2323- /* [3] = "48m", - note not successfully used yet */2424-};
+45
arch/arm/mach-s3c64xx/setup-spi.c
···11+/* linux/arch/arm/mach-s3c64xx/setup-spi.c22+ *33+ * Copyright (C) 2011 Samsung Electronics Ltd.44+ * http://www.samsung.com/55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License version 2 as88+ * published by the Free Software Foundation.99+ */1010+1111+#include <linux/gpio.h>1212+#include <linux/platform_device.h>1313+1414+#include <plat/gpio-cfg.h>1515+#include <plat/s3c64xx-spi.h>1616+1717+#ifdef CONFIG_S3C64XX_DEV_SPI01818+struct s3c64xx_spi_info s3c64xx_spi0_pdata __initdata = {1919+ .fifo_lvl_mask = 0x7f,2020+ .rx_lvl_offset = 13,2121+ .tx_st_done = 21,2222+};2323+2424+int s3c64xx_spi0_cfg_gpio(struct platform_device *dev)2525+{2626+ s3c_gpio_cfgall_range(S3C64XX_GPC(0), 3,2727+ S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);2828+ return 0;2929+}3030+#endif3131+3232+#ifdef CONFIG_S3C64XX_DEV_SPI13333+struct s3c64xx_spi_info s3c64xx_spi1_pdata __initdata = {3434+ .fifo_lvl_mask = 0x7f,3535+ .rx_lvl_offset = 13,3636+ .tx_st_done = 21,3737+};3838+3939+int s3c64xx_spi1_cfg_gpio(struct platform_device *dev)4040+{4141+ s3c_gpio_cfgall_range(S3C64XX_GPC(4), 3,4242+ S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);4343+ return 0;4444+}4545+#endif
+5-2
arch/arm/mach-s5p64x0/Kconfig
···3636 help3737 Common setup code for i2c bus 1.38383939+config S5P64X0_SETUP_SPI4040+ bool4141+ help4242+ Common setup code for SPI GPIO configurations4343+3944# machine support40454146config MACH_SMDK6440···5045 select S3C_DEV_I2C15146 select S3C_DEV_RTC5247 select S3C_DEV_WDT5353- select S3C64XX_DEV_SPI5448 select SAMSUNG_DEV_ADC5549 select SAMSUNG_DEV_BACKLIGHT5650 select SAMSUNG_DEV_PWM···6662 select S3C_DEV_I2C16763 select S3C_DEV_RTC6864 select S3C_DEV_WDT6969- select S3C64XX_DEV_SPI7065 select SAMSUNG_DEV_ADC7166 select SAMSUNG_DEV_BACKLIGHT7267 select SAMSUNG_DEV_PWM
···11-/* linux/arch/arm/mach-s5pc100/setup-sdhci.c22- *33- * Copyright 2008 Samsung Electronics44- *55- * S5PC100 - Helper functions for settign up SDHCI device(s) (HSMMC)66- *77- * Based on mach-s3c6410/setup-sdhci.c88- *99- * This program is free software; you can redistribute it and/or modify1010- * it under the terms of the GNU General Public License version 2 as1111- * published by the Free Software Foundation.1212-*/1313-1414-#include <linux/types.h>1515-1616-/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */1717-1818-char *s5pc100_hsmmc_clksrcs[4] = {1919- [0] = "hsmmc", /* HCLK */2020- /* [1] = "hsmmc", - duplicate HCLK entry */2121- [2] = "sclk_mmc", /* mmc_bus */2222- /* [3] = "48m", - note not successfully used yet */2323-};
+65
arch/arm/mach-s5pc100/setup-spi.c
···11+/* linux/arch/arm/mach-s5pc100/setup-spi.c22+ *33+ * Copyright (C) 2011 Samsung Electronics Ltd.44+ * http://www.samsung.com/55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License version 2 as88+ * published by the Free Software Foundation.99+ */1010+1111+#include <linux/gpio.h>1212+#include <linux/platform_device.h>1313+1414+#include <plat/gpio-cfg.h>1515+#include <plat/s3c64xx-spi.h>1616+1717+#ifdef CONFIG_S3C64XX_DEV_SPI01818+struct s3c64xx_spi_info s3c64xx_spi0_pdata __initdata = {1919+ .fifo_lvl_mask = 0x7f,2020+ .rx_lvl_offset = 13,2121+ .high_speed = 1,2222+ .tx_st_done = 21,2323+};2424+2525+int s3c64xx_spi0_cfg_gpio(struct platform_device *dev)2626+{2727+ s3c_gpio_cfgall_range(S5PC100_GPB(0), 3,2828+ S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);2929+ return 0;3030+}3131+#endif3232+3333+#ifdef CONFIG_S3C64XX_DEV_SPI13434+struct s3c64xx_spi_info s3c64xx_spi1_pdata __initdata = {3535+ .fifo_lvl_mask = 0x7f,3636+ .rx_lvl_offset = 13,3737+ .high_speed = 1,3838+ .tx_st_done = 21,3939+};4040+4141+int s3c64xx_spi1_cfg_gpio(struct platform_device *dev)4242+{4343+ s3c_gpio_cfgall_range(S5PC100_GPB(4), 3,4444+ S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);4545+ return 0;4646+}4747+#endif4848+4949+#ifdef CONFIG_S3C64XX_DEV_SPI25050+struct s3c64xx_spi_info s3c64xx_spi2_pdata __initdata = {5151+ .fifo_lvl_mask = 0x7f,5252+ .rx_lvl_offset = 13,5353+ .high_speed = 1,5454+ .tx_st_done = 21,5555+};5656+5757+int s3c64xx_spi2_cfg_gpio(struct platform_device *dev)5858+{5959+ s3c_gpio_cfgpin(S5PC100_GPG3(0), S3C_GPIO_SFN(3));6060+ s3c_gpio_setpull(S5PC100_GPG3(0), S3C_GPIO_PULL_UP);6161+ s3c_gpio_cfgall_range(S5PC100_GPB(2), 2,6262+ S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);6363+ return 0;6464+}6565+#endif
+5
arch/arm/mach-s5pv210/Kconfig
···6060 help6161 Common setup code for the camera interfaces.62626363+config S5PV210_SETUP_SPI6464+ bool6565+ help6666+ Common setup code for SPI GPIO configurations.6767+6368menu "S5PC110 Machines"64696570config MACH_AQUILA
···11-/* linux/arch/arm/mach-s5pv210/setup-sdhci.c22- *33- * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.44- * http://www.samsung.com/55- *66- * S5PV210 - Helper functions for settign up SDHCI device(s) (HSMMC)77- *88- * This program is free software; you can redistribute it and/or modify99- * it under the terms of the GNU General Public License version 2 as1010- * published by the Free Software Foundation.1111-*/1212-1313-#include <linux/types.h>1414-1515-/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */1616-1717-char *s5pv210_hsmmc_clksrcs[4] = {1818- [0] = "hsmmc", /* HCLK */1919- /* [1] = "hsmmc", - duplicate HCLK entry */2020- [2] = "sclk_mmc", /* mmc_bus */2121- /* [3] = NULL, - reserved */2222-};
+51
arch/arm/mach-s5pv210/setup-spi.c
···11+/* linux/arch/arm/mach-s5pv210/setup-spi.c22+ *33+ * Copyright (C) 2011 Samsung Electronics Ltd.44+ * http://www.samsung.com/55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License version 2 as88+ * published by the Free Software Foundation.99+ */1010+1111+#include <linux/gpio.h>1212+#include <linux/platform_device.h>1313+1414+#include <plat/gpio-cfg.h>1515+#include <plat/s3c64xx-spi.h>1616+1717+#ifdef CONFIG_S3C64XX_DEV_SPI01818+struct s3c64xx_spi_info s3c64xx_spi0_pdata = {1919+ .fifo_lvl_mask = 0x1ff,2020+ .rx_lvl_offset = 15,2121+ .high_speed = 1,2222+ .tx_st_done = 25,2323+};2424+2525+int s3c64xx_spi0_cfg_gpio(struct platform_device *dev)2626+{2727+ s3c_gpio_cfgpin(S5PV210_GPB(0), S3C_GPIO_SFN(2));2828+ s3c_gpio_setpull(S5PV210_GPB(0), S3C_GPIO_PULL_UP);2929+ s3c_gpio_cfgall_range(S5PV210_GPB(2), 2,3030+ S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);3131+ return 0;3232+}3333+#endif3434+3535+#ifdef CONFIG_S3C64XX_DEV_SPI13636+struct s3c64xx_spi_info s3c64xx_spi1_pdata = {3737+ .fifo_lvl_mask = 0x7f,3838+ .rx_lvl_offset = 15,3939+ .high_speed = 1,4040+ .tx_st_done = 25,4141+};4242+4343+int s3c64xx_spi1_cfg_gpio(struct platform_device *dev)4444+{4545+ s3c_gpio_cfgpin(S5PV210_GPB(4), S3C_GPIO_SFN(2));4646+ s3c_gpio_setpull(S5PV210_GPB(4), S3C_GPIO_PULL_UP);4747+ s3c_gpio_cfgall_range(S5PV210_GPB(6), 2,4848+ S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);4949+ return 0;5050+}5151+#endif
···2121 * use these just as IDs.2222 */2323enum dma_ch {2424- DMACH_UART0_RX,2424+ DMACH_DT_PROP = -1,2525+ DMACH_UART0_RX = 0,2526 DMACH_UART0_TX,2627 DMACH_UART1_RX,2728 DMACH_UART1_TX,
···7171#define S3C2410_LCON_IRM (1<<6)72727373#define S3C2440_UCON_CLKMASK (3<<10)7474+#define S3C2440_UCON_CLKSHIFT (10)7475#define S3C2440_UCON_PCLK (0<<10)7576#define S3C2440_UCON_UCLK (1<<10)7677#define S3C2440_UCON_PCLK2 (2<<10)···7978#define S3C2443_UCON_EPLL (3<<10)80798180#define S3C6400_UCON_CLKMASK (3<<10)8181+#define S3C6400_UCON_CLKSHIFT (10)8282#define S3C6400_UCON_PCLK (0<<10)8383#define S3C6400_UCON_PCLK2 (2<<10)8484#define S3C6400_UCON_UCLK0 (1<<10)···9290#define S3C2440_UCON_DIVSHIFT (12)93919492#define S3C2412_UCON_CLKMASK (3<<10)9393+#define S3C2412_UCON_CLKSHIFT (10)9594#define S3C2412_UCON_UCLK (1<<10)9695#define S3C2412_UCON_USYSCLK (3<<10)9796#define S3C2412_UCON_PCLK (0<<10)9897#define S3C2412_UCON_PCLK2 (2<<10)99989999+#define S3C2410_UCON_CLKMASK (1 << 10)100100+#define S3C2410_UCON_CLKSHIFT (10)100101#define S3C2410_UCON_UCLK (1<<10)101102#define S3C2410_UCON_SBREAK (1<<4)102103···198193199194/* Following are specific to S5PV210 */200195#define S5PV210_UCON_CLKMASK (1<<10)196196+#define S5PV210_UCON_CLKSHIFT (10)201197#define S5PV210_UCON_PCLK (0<<10)202198#define S5PV210_UCON_UCLK (1<<10)203199···227221#define S5PV210_UFSTAT_RXMASK (255<<0)228222#define S5PV210_UFSTAT_RXSHIFT (0)229223230230-#define NO_NEED_CHECK_CLKSRC 1224224+#define S3C2410_UCON_CLKSEL0 (1 << 0)225225+#define S3C2410_UCON_CLKSEL1 (1 << 1)226226+#define S3C2410_UCON_CLKSEL2 (1 << 2)227227+#define S3C2410_UCON_CLKSEL3 (1 << 3)228228+229229+/* Default values for s5pv210 UCON and UFCON uart registers */230230+#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \231231+ S3C2410_UCON_RXILEVEL | \232232+ S3C2410_UCON_TXIRQMODE | \233233+ S3C2410_UCON_RXIRQMODE | \234234+ S3C2410_UCON_RXFIFO_TOI | \235235+ S3C2443_UCON_RXERR_IRQEN)236236+237237+#define S5PV210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \238238+ S5PV210_UFCON_TXTRIG4 | \239239+ S5PV210_UFCON_RXTRIG4)231240232241#ifndef __ASSEMBLY__233233-234234-/* struct s3c24xx_uart_clksrc235235- *236236- * this structure defines a named clock source that can be used for the237237- * uart, so that the best clock can be selected for the requested baud238238- * rate.239239- *240240- * min_baud and max_baud define the range of baud-rates this clock is241241- * acceptable for, if they are both zero, it is assumed any baud rate that242242- * can be generated from this clock will be used.243243- *244244- * divisor gives the divisor from the clock to the one seen by the uart245245-*/246246-247247-struct s3c24xx_uart_clksrc {248248- const char *name;249249- unsigned int divisor;250250- unsigned int min_baud;251251- unsigned int max_baud;252252-};253242254243/* configuration structure for per-machine configurations for the255244 * serial port···258257 unsigned char unused;259258 unsigned short flags;260259 upf_t uart_flags; /* default uart flags */260260+ unsigned int clk_sel;261261262262 unsigned int has_fracval;263263264264 unsigned long ucon; /* value of ucon for port */265265 unsigned long ulcon; /* value of ulcon for port */266266 unsigned long ufcon; /* value of ufcon for port */267267-268268- struct s3c24xx_uart_clksrc *clocks;269269- unsigned int clocks_size;270267};271268272269/* s3c24xx_uart_devs
+16-8
arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
···3131/**3232 * struct s3c64xx_spi_info - SPI Controller defining structure3333 * @src_clk_nr: Clock source index for the CLK_CFG[SPI_CLKSEL] field.3434- * @src_clk_name: Platform name of the corresponding clock.3534 * @clk_from_cmu: If the SPI clock/prescalar control block is present3635 * by the platform's clock-management-unit and not in SPI controller.3736 * @num_cs: Number of CS this controller emulates.···4243 */4344struct s3c64xx_spi_info {4445 int src_clk_nr;4545- char *src_clk_name;4646 bool clk_from_cmu;47474848 int num_cs;···5658};57595860/**5959- * s3c64xx_spi_set_info - SPI Controller configure callback by the board6161+ * s3c64xx_spi_set_platdata - SPI Controller configure callback by the board6062 * initialization code.6161- * @cntrlr: SPI controller number the configuration is for.6363+ * @pd: SPI platform data to set.6264 * @src_clk_nr: Clock the SPI controller is to use to generate SPI clocks.6365 * @num_cs: Number of elements in the 'cs' array.6466 *6567 * Call this from machine init code for each SPI Controller that6668 * has some chips attached to it.6769 */6868-extern void s3c64xx_spi_set_info(int cntrlr, int src_clk_nr, int num_cs);6969-extern void s5pc100_spi_set_info(int cntrlr, int src_clk_nr, int num_cs);7070-extern void s5pv210_spi_set_info(int cntrlr, int src_clk_nr, int num_cs);7171-extern void s5p64x0_spi_set_info(int cntrlr, int src_clk_nr, int num_cs);7070+extern void s3c64xx_spi0_set_platdata(struct s3c64xx_spi_info *pd,7171+ int src_clk_nr, int num_cs);7272+extern void s3c64xx_spi1_set_platdata(struct s3c64xx_spi_info *pd,7373+ int src_clk_nr, int num_cs);7474+extern void s3c64xx_spi2_set_platdata(struct s3c64xx_spi_info *pd,7575+ int src_clk_nr, int num_cs);72767777+/* defined by architecture to configure gpio */7878+extern int s3c64xx_spi0_cfg_gpio(struct platform_device *dev);7979+extern int s3c64xx_spi1_cfg_gpio(struct platform_device *dev);8080+extern int s3c64xx_spi2_cfg_gpio(struct platform_device *dev);8181+8282+extern struct s3c64xx_spi_info s3c64xx_spi0_pdata;8383+extern struct s3c64xx_spi_info s3c64xx_spi1_pdata;8484+extern struct s3c64xx_spi_info s3c64xx_spi2_pdata;7385#endif /* __S3C64XX_PLAT_SPI_H */
···971971 struct s3c64xx_spi_info *sci;972972 struct spi_master *master;973973 int ret;974974+ char clk_name[16];974975975976 if (pdev->id < 0) {976977 dev_err(&pdev->dev,···985984 }986985987986 sci = pdev->dev.platform_data;988988- if (!sci->src_clk_name) {989989- dev_err(&pdev->dev,990990- "Board init must call s3c64xx_spi_set_info()\n");991991- return -EINVAL;992992- }993987994988 /* Check for availability of necessary resource */995989···10691073 goto err4;10701074 }1071107510721072- sdd->src_clk = clk_get(&pdev->dev, sci->src_clk_name);10761076+ sprintf(clk_name, "spi_busclk%d", sci->src_clk_nr);10771077+ sdd->src_clk = clk_get(&pdev->dev, clk_name);10731078 if (IS_ERR(sdd->src_clk)) {10741079 dev_err(&pdev->dev,10751075- "Unable to acquire clock '%s'\n", sci->src_clk_name);10801080+ "Unable to acquire clock '%s'\n", clk_name);10761081 ret = PTR_ERR(sdd->src_clk);10771082 goto err5;10781083 }1079108410801085 if (clk_enable(sdd->src_clk)) {10811081- dev_err(&pdev->dev, "Couldn't enable clock '%s'\n",10821082- sci->src_clk_name);10861086+ dev_err(&pdev->dev, "Couldn't enable clock '%s'\n", clk_name);10831087 ret = -EBUSY;10841088 goto err6;10851089 }
+2-43
drivers/tty/serial/Kconfig
···457457config SERIAL_SAMSUNG_UARTS_4458458 bool459459 depends on ARM && PLAT_SAMSUNG460460- default y if CPU_S3C2443460460+ default y if !(CPU_S3C2410 || SERIAL_S3C2412 || CPU_S3C2440 || CPU_S3C2442)461461 help462462 Internal node for the common case of 4 Samsung compatible UARTs463463···465465 int466466 depends on ARM && PLAT_SAMSUNG467467 default 6 if ARCH_S5P6450468468- default 4 if SERIAL_SAMSUNG_UARTS_4468468+ default 4 if SERIAL_SAMSUNG_UARTS_4 || CPU_S3C2416469469 default 3470470 help471471 Select the number of available UART ports for the Samsung S3C···494494 "console=ttySACx". (Try "man bootparam" or see the documentation of495495 your boot loader about how to pass options to the kernel at496496 boot time.)497497-498498-config SERIAL_S3C2410499499- tristate "Samsung S3C2410 Serial port support"500500- depends on SERIAL_SAMSUNG && CPU_S3C2410501501- default y if CPU_S3C2410502502- help503503- Serial port support for the Samsung S3C2410 SoC504504-505505-config SERIAL_S3C2412506506- tristate "Samsung S3C2412/S3C2413 Serial port support"507507- depends on SERIAL_SAMSUNG && CPU_S3C2412508508- default y if CPU_S3C2412509509- help510510- Serial port support for the Samsung S3C2412 and S3C2413 SoC511511-512512-config SERIAL_S3C2440513513- tristate "Samsung S3C2440/S3C2442/S3C2416 Serial port support"514514- depends on SERIAL_SAMSUNG && (CPU_S3C2440 || CPU_S3C2442 || CPU_S3C2416)515515- default y if CPU_S3C2440516516- default y if CPU_S3C2442517517- select SERIAL_SAMSUNG_UARTS_4 if CPU_S3C2416518518- help519519- Serial port support for the Samsung S3C2440, S3C2416 and S3C2442 SoC520520-521521-config SERIAL_S3C6400522522- tristate "Samsung S3C6400/S3C6410/S5P6440/S5P6450/S5PC100 Serial port support"523523- depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440 || CPU_S5P6450 || CPU_S5PC100)524524- select SERIAL_SAMSUNG_UARTS_4525525- default y526526- help527527- Serial port support for the Samsung S3C6400, S3C6410, S5P6440, S5P6450528528- and S5PC100 SoCs529529-530530-config SERIAL_S5PV210531531- tristate "Samsung S5PV210 Serial port support"532532- depends on SERIAL_SAMSUNG && (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212)533533- select SERIAL_SAMSUNG_UARTS_4 if (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212)534534- default y535535- help536536- Serial port support for Samsung's S5P Family of SoC's537537-538497539498config SERIAL_MAX3100540499 tristate "MAX3100 support"