CM-iAM: Linux: Kernel

From Compulab Mediawiki
Revision as of 08:45, 23 December 2009 by Mike (talk | contribs) (Linux Kernel for CM-iAM moved to CM-iAM: Linux: Kernel)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The CM-iAM is a fully-compatible x86 PC. Recent Linux kernels support most CM-iAM hardware features. A customized 2.6.28 kernel is available in Linux kernel package for CM-iAM under the kernel directory. The configuration file is debian/config/i386/config.sb-iam.

The most important features of interest to kernel developers are described below.

Processor type and features

  • Disable Symmetric multi-processing support, this option conflicts with proper GMA500 graphic driver operation.
  • Set Processor family to (586/K5/5x86/6x86/6x86MX).
  • Enable Enable X86 board specific fixups for reboot.
.config - Linux Kernel v2.6.28-34-sb-iam Configuration
────────────────────────────────────────────────────────────────────────────────────────────────
 ┌─────────────────────────────── Processor type and features ───────────────────────────────┐
 │  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted letters are   │
 │  hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes features.  Press          │
 │  <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*] built-in  [ ] excluded    │
 │  <M> module  < > module capable                                                           │
 │ ┌───────────────────────────────────────────────────────────────────────────────────────┐ │
 │ │        [*] Tickless System (Dynamic Ticks)                                            │ │
 │ │        [*] High Resolution Timer Support                                              │ │
 │ │        [ ] Symmetric multi-processing support                                         │ │
 │ │        [*] Support for extended (non-PC) x86 platforms                                │ │
 │ │        [ ] AMD Elan                                                                   │ │
 │ │        [ ] RDC R-321x SoC                                                             │ │
 │ │        [*] Single-depth WCHAN output                                                  │ │
 │ │        [ ] Paravirtualized guest support  --->                                        │ │
 │ │        [ ] Memtest                                                                    │ │
 │ │            Processor family (586/K5/5x86/6x86/6x86MX)  --->                           │ │
 │ │        [*] Generic x86 support                                                        │ │
 │ │        [ ] PentiumPro memory ordering errata workaround                               │ │
 │ │        [*] HPET Timer Support                                                         │ │
 │ │            Preemption Model (Voluntary Kernel Preemption (Desktop))  --->             │ │
 │ │        [ ] Local APIC support on uniprocessors (NEW)                                  │ │
 │ │        [*] Machine Check Exception                                                    │ │
 │ │        < > Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4 (NEW)     │ │
 │ │        < > Toshiba Laptop support                                                     │ │
 │ │        < > Dell laptop support                                                        │ │
 │ │        [*] Enable X86 board specific fixups for reboot                                │ │
 │ └────────v(+)───────────────────────────────────────────────────────────────────────────┘ │
 ├───────────────────────────────────────────────────────────────────────────────────────────┤
 │                             <Select>    < Exit >    < Help >                              │
 └───────────────────────────────────────────────────────────────────────────────────────────┘

Reboot quirk

Proper reboot handling requires the following patch to arch/x86/kernel/reboot.c

      .matches = {
         DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
         DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"),
      },
   },
+   {   /* Handle problems with rebooting on CompuLab CM-iAM/SBC-FITPC2i board */
+      .callback = set_bios_reboot,
+      .ident = "CompuLab Atom based module",
+      .matches = {
+         DMI_MATCH(DMI_SYS_VENDOR, "CompuLab"),
+         DMI_MATCH(DMI_PRODUCT_NAME, "CM-iAM/SBC-FITPC2i"),
+      },
+   },

Another option for proper reboot handling is adding to the kernel command line the reboot=b option, which means "use BIOS reboot". No patch is needed in this case.

Intel SCH PATA support

Source code of PATA driver for CM-iAM is drivers/ata/pata_sch.c

.config - Linux Kernel v2.6.28-34-sb-iam Configuration
────────────────────────────────────────────────────────────────────────────────────────────────
 ┌──────────────── Serial ATA (prod) and Parallel ATA (experimental) drivers ────────────────┐
 │  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted letters are   │
 │  hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes features.  Press          │
 │  <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*] built-in  [ ] excluded    │
 │  <M> module  < > module capable                                                           │
 │ ┌────────^(-)───────────────────────────────────────────────────────────────────────────┐ │
 │ │        < >     Promise PATA 2027x support                                             │ │
 │ │        < >     CMD / Silicon Image 680 PATA support                                   │ │
 │ │        < >     SiS PATA support                                                       │ │
 │ │        < >     VIA PATA support                                                       │ │
 │ │        < >     Winbond SL82C105 PATA support                                          │ │
 │ │        <*>     Intel SCH PATA support                                                 │ │
 │ └───────────────────────────────────────────────────────────────────────────────────────┘ │
 ├───────────────────────────────────────────────────────────────────────────────────────────┤
 │                             <Select>    < Exit >    < Help >                              │
 └───────────────────────────────────────────────────────────────────────────────────────────┘

SATA interface on SB-iAM is available via a special SATA-to-PATA bridge. This bridge requires a minor software fix in order for the SATA disk to be recognized properly when configured as a slave. See implementation of sch_tf_read function in drivers/ata/pata_sch.c.

GPIO support

The SB-iAM board from Compulab contains 8 or 15 general purpose I/O pins (GPIO’s) depending on assembly configuration.

The CM-iAM provides 8 general purpose I/O pins (GPIO’s) from Poulsbo chipset, 7 of which are dedicated and one is shared with alternate functionality, with different power domain support. Seven additional GPIO’s are available from the IT8761E super I/O chip when option S (SIO) is assembled.

Source code of GPIO driver for CM-iAM is drivers/gpio/sb_iam_gpio.c

.config - Linux Kernel v2.6.28-34-sb-iam Configuration
─────────────────────────────────────────────────────────────────────────────────────────
 ┌─────────────────────────────────── GPIO Support ───────────────────────────────────┐
 │  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted        │  
 │  letters are hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes        │  
 │  features.  Press <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*]   │  
 │  built-in  [ ] excluded  <M> module  < > module capable                            │  
 │ ┌────────────────────────────────────────────────────────────────────────────────┐ │  
 │ │     --- GPIO Support                                                           │ │  
 │ │     [ ]   Debug GPIO calls                                                     │ │  
 │ │     [*]   /sys/class/gpio/... (sysfs interface)                                │ │  
 │ │           *** Memory mapped GPIO expanders: ***                                │ │  
 │ │     <M>   SB-iAM GPIO support                                                  │ │  
 │ │           *** I2C GPIO expanders: ***                                          │ │  
 │ │     < >   MAX7319, MAX7320-7327 I2C Port Expanders                             │ │  
 │ │     {M}   PCA953x, PCA955x, and MAX7310 I/O ports                              │ │  
 │ │     < >   PCF857x, PCA{85,96}7x, and MAX732[89] I2C GPIO expanders             │ │  
 │ │           *** PCI GPIO expanders: ***                                          │ │  
 │ │           *** SPI GPIO expanders: ***                                          │ │  
 │ │                                                                                │ │  
 │ │                                                                                │ │  
 │ └────────────────────────────────────────────────────────────────────────────────┘ │  
 ├────────────────────────────────────────────────────────────────────────────────────┤  
 │                          <Select>    < Exit >    < Help >                          │  
 └────────────────────────────────────────────────────────────────────────────────────┘  

Poulsbo DRM support

The GMA500 graphic driver requires kernel drm module for proper functionality. Original sources are named psb-kernel-source and are available at PPA for Ubuntu Mobile Team. We moved this package into the kernel tree and made some minor fixes.

Source code of DRM driver for CM-iAM is under drivers/gpu/drm/

.config - Linux Kernel v2.6.28-34-sb-iam Configuration
─────────────────────────────────────────────────────────────────────────────────────────
 ┌───────────────────────────── I2C Hardware Bus support ─────────────────────────────┐
 │  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted        │
 │  letters are hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes        │
 │  features.  Press <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*]   │
 │  built-in  [ ] excluded  <M> module  < > module capable                            │
 │ ┌────────────────────────────────────────────────────────────────────────────────┐ │
 │ │           <M> /dev/agpgart (AGP Support)  --->                                 │ │  
 │ │           [*] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  │ │  
 │ │           < >   3dfx Banshee/Voodoo3+                                          │ │  
 │ │           < >   ATI Rage 128                                                   │ │  
 │ │           < >   ATI Radeon                                                     │ │  
 │ │           < >   Intel I810                                                     │ │  
 │ │           < >   Intel 830M, 845G, 852GM, 855GM, 865G                           │ │  
 │ │           < >   Matrox g200/g400                                               │ │  
 │ │           < >   SiS video cards                                                │ │  
 │ │           < >   Via unichrome video cards                                      │ │  
 │ │           < >   ATI Rage Pro (Mach64)                                          │ │  
 │ │           <M>   Intel Poulsbo                                                  │ │  
 │ │           <M> Lowlevel video output switch controls                            │ │  
 │ │           <*> Support for frame buffer devices  --->                           │ │  
 │ │           < > CyberPro 2000/2010/5000 support                                  │ │  
 │ │           < > Arc Monochrome LCD board support                                 │ │  
 │ │           [ ] Asiliant (Chips) 69000 display support                           │ │  
 │ │           [ ] IMS Twin Turbo display support                                   │ │  
 │ └───────────v(+)─────────────────────────────────────────────────────────────────┘ │  
 ├────────────────────────────────────────────────────────────────────────────────────┤
 │                          <Select>    < Exit >    < Help >                          │
 └────────────────────────────────────────────────────────────────────────────────────┘

Watchdog Timer Support

The CM-iAM provides watchdog functionality. It is possible to enable a watchdog timer either from BIOS (F2) or from running Linux. The CM-iAM watchdog has an operating range between 31 and 255 seconds. The range is defined by the "Watchdog Timer Value" in the BIOS or by the margin parameter of the watchdog driver. Entering BIOS setup temporarily disables watchdog operation regardless of the current state; therefore, the system will not be restarted during an interactive BIOS session. Once the watchdog has been enabled, the system will be restarted every "Watchdog Timer Value" period, unless the watchdog timer was reset or disabled by the software.

Source code of watchdog driver for CM-iAM is drivers/watchdog/cm_iam_wdt.c

.config - Linux Kernel v2.6.28-34-sb-iam Configuration
─────────────────────────────────────────────────────────────────────────────────────────
 ┌────────────────────────────── Watchdog Timer Support ──────────────────────────────┐
 │  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted        │
 │  letters are hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes        │
 │  features.  Press <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*]   │
 │  built-in  [ ] excluded  <M> module  < > module capable                            │
 │ ┌─────^(-)───────────────────────────────────────────────────────────────────────┐ │
 │ │     < >   Advantech SBC Watchdog Timer                                         │ │
 │ │     < >   ALi M1535 PMU Watchdog Timer                                         │ │
 │ │     < >   ALi M7101 PMU Computer Watchdog                                      │ │
 │ │     < >   AMD Elan SC520 processor Watchdog                                    │ │
 │ │     <M>   Compulab CM-iAM watchdog                                             │ │
 │ │     < >   Eurotech CPU-1220/1410 Watchdog Timer                                │ │
 │ │     < >   IB700 SBC Watchdog Timer                                             │ │
 │ │     < >   IBM Automatic Server Restart                                         │ │
 │ │     < >   ICP Single Board Computer Watchdog Timer                             │ │
 │ └─────v(+)───────────────────────────────────────────────────────────────────────┘ │
 ├────────────────────────────────────────────────────────────────────────────────────┤
 │                          <Select>    < Exit >    < Help >                          │
 └────────────────────────────────────────────────────────────────────────────────────┘

Sound card support

The CM-iAM and SB-iAM use IDT 92HD83 sound codec. Its full name is 92HD83C1C5 and may not be inserted in the kernel tree yet. Add the following quirk to sound driver for proper codec recognition:

	{ .id = 0x111d7604, .name = "92HD83C1X5", .patch = patch_stac92hd83xxx},
+	{ .id = 0x111d76d4, .name = "92HD83C1C5", .patch = patch_stac92hd83xxx},
	{ .id = 0x111d7605, .name = "92HD81B1X5", .patch = patch_stac92hd83xxx},

Source code of sound driver for CM-iAM is sound/pci/hda/patch_sigmatel.c

.config - Linux Kernel v2.6.28-34-sb-iam Configuration
─────────────────────────────────────────────────────────────────────────────────────────
 ┌────────────────────────────────── Intel HD Audio ──────────────────────────────────┐
 │  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted        │
 │  letters are hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes        │
 │  features.  Press <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*]   │
 │  built-in  [ ] excluded  <M> module  < > module capable                            │
 │ ┌────────────────────────────────────────────────────────────────────────────────┐ │
 │ │     --- Intel HD Audio                                                         │ │
 │ │     [*]   Build hwdep interface for HD-audio driver                            │ │
 │ │     [ ]     Allow dynamic codec reconfiguration (EXPERIMENTAL)                 │ │
 │ │     [ ]   Support digital beep via input layer                                 │ │
 │ │     [*]   Support jack plugging notification via input layer                   │ │
 │ │     [ ]   Build Realtek HD-audio codec support                                 │ │
 │ │     [ ]   Build Analog Device HD-audio codec support                           │ │
 │ │     [*]   Build IDT/Sigmatel HD-audio codec support                            │ │
 │ │     [ ]   Build VIA HD-audio codec support                                     │ │
 │ └─────v(+)───────────────────────────────────────────────────────────────────────┘ │
 ├────────────────────────────────────────────────────────────────────────────────────┤
 │                          <Select>    < Exit >    < Help >                          │
 └────────────────────────────────────────────────────────────────────────────────────┘

Network device support

.config - Linux Kernel v2.6.28-34-sb-iam Configuration
────────────────────────────────────────────────────────────────────────────────────────
 ┌────────────────────────────── Ethernet (1000 Mbit) ───────────────────────────────┐
 │  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted       │
 │  letters are hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes       │
 │  features.  Press <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*]  │
 │  built-in  [ ] excluded  <M> module  < > module capable                           │
 │ ┌────^(-)───────────────────────────────────────────────────────────────────────┐ │
 │ │    < >   National Semiconductor DP83820 support                               │ │
 │ │    < >   Packet Engines Hamachi GNIC-II support                               │ │
 │ │    < >   Packet Engines Yellowfin Gigabit-NIC support (EXPERIMENTAL)          │ │
 │ │    <M>   Realtek 8169 gigabit ethernet support                                │ │
 │ │    < >   SiS190/SiS191 gigabit ethernet support                               │ │
 │ └────v(+)───────────────────────────────────────────────────────────────────────┘ │
 ├───────────────────────────────────────────────────────────────────────────────────┤
 │                         <Select>    < Exit >    < Help >                          │
 └───────────────────────────────────────────────────────────────────────────────────┘

I2C/SMBus support

.config - Linux Kernel v2.6.28-34-sb-iam Configuration
─────────────────────────────────────────────────────────────────────────────────────────
 ┌───────────────────────────── I2C Hardware Bus support ─────────────────────────────┐
 │  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted        │
 │  letters are hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes        │
 │  features.  Press <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*]   │
 │  built-in  [ ] excluded  <M> module  < > module capable                            │
 │ ┌────────────────────────────────────────────────────────────────────────────────┐ │
 │ │         *** PC SMBus host controller drivers ***                               │ │
 │ │     < > ALI 1535                                                               │ │
 │ │     < > ALI 1563                                                               │ │
 │ │     < > ALI 15x3                                                               │ │
 │ │     < > AMD 756/766/768/8111 and nVidia nForce                                 │ │
 │ │     < > AMD 8111                                                               │ │
 │ │     < > Intel 82801 (ICH)                                                      │ │
 │ │     <M> Intel SCH SMBus 1.0                                                    │ │
 │ │     < > Intel PIIX4 and compatible (ATI/Serverworks/Broadcom/SMSC)             │ │
 │ └─────v(+)───────────────────────────────────────────────────────────────────────┘ │
 ├────────────────────────────────────────────────────────────────────────────────────┤
 │                          <Select>    < Exit >    < Help >                          │
 └────────────────────────────────────────────────────────────────────────────────────┘

MMC/SD/SDIO card support

.config - Linux Kernel v2.6.28-34-sb-iam Configuration
─────────────────────────────────────────────────────────────────────────────────────────
 ┌───────────────────────────── MMC/SD/SDIO card support ─────────────────────────────┐
 │  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted        │
 │  letters are hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes        │
 │  features.  Press <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*]   │
 │  built-in  [ ] excluded  <M> module  < > module capable                            │
 │ ┌────────────────────────────────────────────────────────────────────────────────┐ │
 │ │     --- MMC/SD/SDIO card support                                               │ │
 │ │     [ ]   MMC debugging                                                        │ │
 │ │     [ ]   Allow unsafe resume (DANGEROUS)                                      │ │
 │ │           *** MMC/SD/SDIO Card Drivers ***                                     │ │
 │ │     <M>   MMC block device driver                                              │ │
 │ │     [*]     Use bounce buffer for simple hosts                                 │ │
 │ │     < >   SDIO UART/GPS class support                                          │ │
 │ │     < >   MMC host test driver                                                 │ │
 │ │           *** MMC/SD/SDIO Host Controller Drivers ***                          │ │
 │ │     <M>   Secure Digital Host Controller Interface support                     │ │
 │ │     < >     SDHCI support on PCI bus                                           │ │
 │ │     < >   Winbond W83L51xD SD/MMC Card Interface support                       │ │
 │ │     < >   TI Flash Media MMC/SD Interface support  (EXPERIMENTAL)              │ │
 │ └────────────────────────────────────────────────────────────────────────────────┘ │
 ├────────────────────────────────────────────────────────────────────────────────────┤
 │                          <Select>    < Exit >    < Help >                          │
 └────────────────────────────────────────────────────────────────────────────────────┘

See also