Release notes about "linux-2.6.29.1-ts7200_matt-7" patch This is mainly created for EP9301 & EP9302 CPUs and more especially for TS-7200, TS-7250 & TS-7260 SBCs manufactured by Technologic Systems (http://www.embeddedarm.com). linux-arm-kernel mailing list is a good place to find new material. Lots of people are doing great work for ep93xx architecture. You can find their submitted patches here: [Hartley Sweeten] http://www.arm.linux.org.uk/developer/patches/search.php?uid=1443 [Ryan Mallon] http://www.arm.linux.org.uk/developer/patches/search.php?uid=1556 [Lennert Buytenhek] http://www.arm.linux.org.uk/developer/patches/search.php?uid=535 Short version ============= EP93xx processor ---------------- - Ethernet - RTC (no backed up RAM) - I2C (based on gpio) - SPI (master driver) - USB 2.0 - Leds (red and green) - PWM - /proc/cpuinfo : ep93xx cpu revision & uniq ID TS-72xx SBCs ------------ - Console LCD text driver (LCD 2x7 header) - Cpufreq driver (configured for ep9301, not tested with ep9302) - Input matrix keypad driver (DIO header) - Watchdog (CPLD of TS-7200) - IDE & PATA support: TS-7200 CF - Max197 option (platform driver) - TMP124 spi slave driver - Flash mapping driver for 8mo NOR flash (physmap mapping driver can be used too) - /proc/driver/sbcinfo : some infos about TS-72XX sbc PC/104 peripherals ----------------- - TS-SER1 support [/dev/ttyS0] - TS-9600: PATA support - TS-5620 (RTC daughterboard for TS-7200) support - TS-ETH100 support Notes ===== This patch reuse previous work for earlier kernels (2.6.27.4, 2.6.24.4 and 2.6.28.3). 2.6.29 suppress one more patch "ep93xx_debounce_irq". It does not add much compared to 2.6.28.x DMA engine is not included yet. For potential memory problems (we use sparse memory model), try adding some params to the kernel command: mem=8M@0x0 mem=8M@16M mem=8M@64M mem=8M@80M Some SBCs (especially those with 32mb SRAM) were experiencing the "cat /proc/pagetypeinfo" oops. Please apply "tmp/double_check_mel.patch". TODO: * ts72xx_con: if no LCD is connected, modprobe is stuck (wait busy flag from LCD on GPIO port A) * cpufreq: values for EP9302 chips Available 'defconfig' --------------------- * ts7200_eabi_full: perfect for development, NFS/USB root support, NOR flash support. ETH, CF (compact flash), I2C, SPI, GPIO, LED, RTC (ep93xx-rtc & rtc-m48t86), HID are embedded. zImage is ~1.9mo. Note: NFS client is about 200kb. * ts72xx_eabi_full: same as "ts7200_eabi_full" but without TS-7200 product specificities. No MTD (NOR flash) support, no PATA (compatch flash). zImage is ~1.8mo. * ts7250_eabi_full: same as "ts72xx_eabi_full" but with TS-7250 product specificities. MTD (NAND flash) support. zImage is ~1.8mo. * ts72xx_eabi_mid: same as "ts72xx_eabi_full" except that USB/HID/SCSI stuff are compiled as modules. Disabled "CPU Frequency scaling" & "CPU idle PM support". zImage is ~1.6mo. * ts72xx_eabi_small: same as "ts72xx_eabi_mid" but.. moved I2C, SPI, LED to modules. Also moved filesystems EXT2 & EXT3 to module compilation. zImage is ~1.4mo. Long version ============ To compile (once patch is applied): $ cp /../ts72xx_eabi_full_defconfig /../linux-2.6.29.1/arch/arm/configs/ $ make ts72xx_eabi_full_defconfig $ vi +/^CROSS Makefile // fix path of your toolchain $ make menuconfig $ make $ INSTALL_MOD_PATH=/your-path-to/nfsroot make modules_install EP93xx processor ---------------- # EP93XX GPIO. As "CONFIG_GPIOLIB" is supported, we can enable "CONFIG_GPIO_SYSFS" to have sysfs entries Example with TS-72xx DIO 2x8 header: $ echo 8 >/sys/class/gpio/export // DIO_0 = Port B, bit 0 $ echo 9 >/sys/class/gpio/export // DIO_1 = Port B, bit 1 $ echo 10 >/sys/class/gpio/export // DIO_2 = Port B, bit 2 $ echo 11 >/sys/class/gpio/export // DIO_3 = Port B, bit 3 $ echo 12 >/sys/class/gpio/export // DIO_4 = Port B, bit 4 $ echo 13 >/sys/class/gpio/export // DIO_5 = Port B, bit 5 $ echo 14 >/sys/class/gpio/export // DIO_6 = Port B, bit 6 (can be already reserved for I2C SDA pin) $ echo 15 >/sys/class/gpio/export // DIO_7 = Port B, bit 7 (can be already reserved for I2C SCL pin) $ echo 17 >/sys/class/gpio/export // DIO_8 = Port F, bit 1 A new file "gpio8" will appear: $ echo out >/sys/class/gpio/gpio8/direction $ echo 1 >/sys/class/gpio/gpio8/value $ echo 0 >/sys/class/gpio/gpio8/value # EP93XX spi controller (module named spi_ep93xx.ko). It is a platform driver. Driver has been reworked by Marco for adding a workqueue, and dynamic frenquency setup. # Leds. Example1: Example2: $ cd /sys/class/leds/ep93xx:red $ cd /sys/class/leds/ep93xx:green $ echo timer >trigger $ echo none >trigger $ echo 1000 >delay_on $ echo 100 >brightness $ echo 500 >delay_off # /proc/cpuinfo has been slightly patched to add ep93xx features. Thanks to Petr Stetiar. $ cat /proc/cpuinfo Processor : ARM920T rev 0 (v4l) BogoMIPS : 82.73 Features : swp half thumb CPU implementer : 0x41 CPU architecture: 4T CPU variant : 0x1 CPU part : 0x920 CPU revision : 0 Cache type : write-back Cache clean : cp15 c7 ops Cache lockdown : format A Cache format : Harvard I size : 16384 I assoc : 64 I line length : 32 I sets : 8 D size : 16384 D assoc : 64 D line length : 32 D sets : 8 Hardware : Technologic Systems TS-72xx SBC Revision : 0004 Serial : 0000000092011e06 # I2C pins (default ep93xx) are set to: SCL pin: EP93XX_GPIO_LINE_EECLK (port G, bit 0) SDA pin: EP93XX_GPIO_LINE_EEDAT (port G, bit 1) But for TS-72xx machines, it is defined as: SCL pin: EP93XX_GPIO_LINE_EGPIO15 (DIO_7: TS-72xx DIO 2x8 header) SDA pin: EP93XX_GPIO_LINE_EGPIO14 (DIO_6: TS-72xx DIO 2x8 header) # CPUfreq (tested on EP9301 only - 166Mhz max) $ cd /sys/devices/system/cpu/cpu0/cpufreq/ $ cat scaling_available_governors conservative ondemand userspace powersave performance Powersave governor Performance governor $ echo powersave >scaling_governor $ echo performance >scaling_governor $ cat cpuinfo_cur_freq $ cat cpuinfo_cur_freq 41472 165888 $ cat /proc/cpuinfo | grep MIPS $ cat /proc/cpuinfo | grep MIPS BogoMIPS : 20.68 BogoMIPS : 82.73 Note: It seems that only hclk (and not fclk) is important for power saving: $ echo userspace > scaling_governor $ echo 165888 > scaling_setspeed // (hclk=66.4MHz) I get 338mA on my TS-7200... $ echo 165887 > scaling_setspeed // (hclk=33.2MHz) I get 287mA on my TS-7200... $ echo 73728 > scaling_setspeed // (hclk=59.0Mhz) I get 328mA on my TS-7200... # PWM driver(module named ep93xx_pwm.ko). EP93XX has got two channels (range is 225Hz to 7372800Hz) On TS-72xx machine I enable PWM0 and PWM1 which is available through header (DIO_6) Note: PWM1 is multiplexed with port B bit 6 GPIO (EGPIO[14]) $ echo 75 > /sys/devices/platform/ep93xx-pwm.1/duty_percent $ cat /sys/devices/platform/ep93xx-pwm.1/duty_percent 75 $ echo 555 > /sys/devices/platform/ep93xx-pwm.1/freq $ cat /sys/devices/platform/ep93xx-pwm.1/freq 555 Hz $ echo 0 > /sys/devices/platform/ep93xx-pwm.1/freq $ cat /sys/devices/platform/ep93xx-pwm.1/freq disabled $ echo 1234567 > /sys/devices/platform/ep93xx-pwm.1/freq $ cat /sys/devices/platform/ep93xx-pwm.1/freq 1340509 Hz TS-72xx SBCs ------------ # TMP124 spi slave driver (module named tmp124.ko). This an "3-wire SPI" device (miso and mosi shares the same pin). Cirrus IP can only handle regular 4-wire SPI. Due to TS-7200 hardware, it's only read only (read sensor). One entry is exported in sysfs. Chip select pin is FGPIO[2] (EP93XX_GPIO_LINE_MCCD2). $ cat /sys/bus/spi/devices/spi1.0/temperature 28.56 BUG: first cat always returns 0, the following reads are good. # Flash mapping driver for 8mo NOR strata-flash. This is some harcoded partitions values: [0x60000000 - 0x60020000[ size=0x20000 (131072 = 1 block) : TS-BOOTROM (read-only) [0x60020000 - 0x60620000[ size=0x600000 (6291456 = 48 blocks) : RootFS [0x60620000 - 0x60800000| size=0x1E0000 (1966080 = 15 blocks) : Redboot # /proc/driver/sbcinfo entry (module named ts72xx_sbcinfo.ko). Original idea by Liberty Young (Technologic Systems). Print some information about the board. $ cat /proc/driver/sbcinfo Model : TS-7200 (CPU rev D1) (PLD rev C) Option max197 A/D : yes Option RS-485 : no Jumpers : JP2=y JP3=y JP4=n JP5=n JP6=n # MAX197 option. 8 (12-bit) ADC channels (module named ts72xx_max197) $ cd /sys/devices/platform/ts72xx-max197 $ cat ch1 0.000 For configuring range input: $ echo 5 >ch2 // range 0..5V (this is the default) $ echo 10 >ch3 // range 0..10V $ echo -5 >ch4 // range -5..5V $ echo -10 >ch5 // range -10..10V If average option is compiled: $ cd /sys/module/ts72xx_max197/parameters $ cat average 1 $ echo 2 >average // two samples are acquired foa one request PC/104 peripherals ----------------- # TS-SER1. COM number is autodetected by driver (by writing to scratch register of uart 16550A) # TS-ETH100. The main ethernet driver is ax88796 (introduced in Kernel 2.6.23). This is only a platform device driver. Except that the main driver has to be modified : NE2000 registers are 8-bit access, except for DATAPORT which is 16-bit access. Load the driver at boot time is rather simple: echo ax88796_ts_eth100 >>/etc/modules ChangeLog ========= linux-2.6.29.1-ts7200_matt-7 (2009.sep.28) * ts72xx_wdt: commented ioctl (WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT) API issue, thanks to Todd Valentic. This driver needs to be reworked. * updated tmp/yaffs.patch (not included in monolithic patch) + added tmp/ts72xx-fix_128mo.patch (thanks to Todd Valentic) linux-2.6.29.1-ts7200_matt-6 (2009.aug.01) * ts72xx_base: reverted "include/mach/uncompress.h"; "include/mach/ts72xx.h": modified board_is_ts7xxx inline functions (thanks to Todd Valentic) * ts72xx_sbcinfo: fixed test bug (thanks to Todd Valentic). Reindented according 'CodingStyle'. * ep93xx_pwm: rebase according to official patch: http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=5628/1 linux-2.6.29.1-ts7200_matt-5 (2009.jul.11) + added ts72xx_rs485 patch. Thanks to Daniel Smolik. + added new config: ts7250_eabi_full + added tmp/yaffs.patch (not included in monolithic patch) linux-2.6.29.1-ts7200_matt-4 (2009.jun.01) * ts72xx_base: applied #5527/1 (from Hartley Sweeten) http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=5527/1 Also added more definitions (MODEL, NAND, RS485) in ts72xx.h, thanks to Daniel Smolik. * ep93xx_spi: added missing clk_put in remove function * ep93xx_pwm: added missing clk_put in remove function * ts72xx_sbcinfo: uses "board_is_ts7XXX" macros to be more portable ; added CPU revision * ep93xx_cpufreq: fixed regression (set correctly policy->min and policy->max) ; some minor rework * ts72xx_ts_eth100: fix trailing whitespace (Kconfig) * ts72{00,xx}_eabi_full_defconfig: removed CONFIG_CPU_FREQ (because power saving is not significant) linux-2.6.29.1-ts7200_matt-3 (2009.may.21) + ep93xx_pwm: new platform driver * ep93xx_spi: fixed clock rate value (EP93XX_EXT_CLK_RATE/2) * ts7200_cf_ide: fixed trailing whitespace in makefile * created several "ts7200_xxx_defconfig: see documentation above linux-2.6.29.1-ts7200_matt-2 (2009.may.01) * ts7200_noeabi_defconfig: enabled CONFIG_GPIO_SYSFS * ts72xx_base: applied #5451/1 (from Hartley Sweeten) http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=5451/1 * ep93xx_spi: fixed some sparse warning. + temporary fix for `cat /proc/pagetypeinfo` oops (see tmp/double_check_mel.patch) linux-2.6.29.1-ts7200_matt-1 (2009.apr.04) * Initial release + added some "pending patch" (see linux-arm-kernel mailing list): ep93xx_syscon_devcfg.patch and ep93xx_uart_clk.patch (both Hartley Sweeten). * ts7200_pata: s/ata_link_for_each_dev/ata_for_each_dev/ * ep93xx_spi: s/EP93XX_SYSCON_DEVICE_CONFIG/EP93XX_SYSCON_DEVCFG/ should be reworked (we should not read that register directly). * ep93xx_pm: s/EP93XX_SYSCON_DEVICE_CONFIG_SHENA/EP93XX_SYSCON_DEVCFG_SHENA/g should be reworked. + added ts7250_nand patch by Stefan Agner (removed for spam).