CM-iAM: Linux: Kernel

From Compulab Mediawiki
(Redirected from Linux Kernel for CM-iAM)
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.31 kernel is available in The Linux package for CM-iAM under the kernel directory. The configuration file is debian/config/i386/config.fitpc2.

This kernel is suitable for all FIT-PC2 compatible boards (FIT-PC2/FIT-PC2i/CM-iAM).

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

Reboot quirk

Proper reboot handling requires the following patch arch/x86/kernel/reboot.c. The patch is present in official Linux sources starting from the 2.6.31 version.

      .matches = {
         DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
         DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"),
      },
   },
+   {   /* Handle problems with rebooting on CompuLab SBC-FITPC2 */
+      .callback = set_bios_reboot,
+      .ident = "CompuLab SBC-FITPC2",
+      .matches = {
+         DMI_MATCH(DMI_SYS_VENDOR, "CompuLab"),
+         DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"),
+      },
+   },

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

Intel SCH PATA support

Source code of the PATA driver for the CM-iAM is found in drivers/ata/pata_sch.c. The module is present in official Linux sources starting from the 2.6.25 version.

.config - Linux Kernel v2.6.31-34-fitpc2 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   │  
 │ ┌────^(-)────────────────────────────────────────────────────────────────┐ │  
 │ │    < >     SC1200 PATA support                                         │ │  
 │ │    < >     SERVERWORKS OSB4/CSB5/CSB6/HT1000 PATA support              │ │  
 │ │    < >     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 >                      │  
 └────────────────────────────────────────────────────────────────────────────┘

GPIO support

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

The CM-iAM provides eight general purpose I/O pins (GPIO’s) from the Poulsbo chipset, seven 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.

The modules are present in official Linux sources starting from the 2.6.34 version.

.config - Linux Kernel v2.6.31-34-fitpc2 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   │  
 │ ┌────────────────────────────────────────────────────────────────────────┐ │  
 │ │    --- GPIO Support                                                    │ │  
 │ │    [ ]   Debug GPIO calls                                              │ │  
 │ │    [*]   /sys/class/gpio/... (sysfs interface)                         │ │  
 │ │          *** Memory mapped GPIO expanders: ***                         │ │  
 │ │    <M>   IT8761E GPIO support                                          │ │  
 │ │    <M>   Intel SCH GPIO                                                │ │  
 │ │          *** I2C GPIO expanders: ***                                   │ │  
 │ │    < >   MAX7319, MAX7320-7327 I2C Port Expanders                      │ │  
 │ │    < >   PCA953x, PCA955x, TCA64xx, 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

Intel® Embedded Graphics Driver (IEGD) requires a kernel drm module for proper functionality. Sources are available at Intel® Embedded Graphics Driver.

Source code of the IEGD driver for the CM-iAM is found in drivers/gpu/drm/iegd/. These drivers are not present in official Linux sources.

.config - Linux Kernel v2.6.31-34-fitpc2 Configuration
─────────────────────────────────────────────────────────────────────────────────
 ┌───── Direct Rendering Manager (XFree86 4.1.0 and higher DRI 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   │  
 │ ┌────────────────────────────────────────────────────────────────────────┐ │  
 │ │    --- 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                                     │ │  
 │ │    < >   Savage video cards                                            │ │  
 │ │    <M>   Intel IEGD                                                    │ │  
 │ │                                                                        │ │  
 │ │                                                                        │ │  
 │ │                                                                        │ │  
 │ │                                                                        │ │  
 │ │                                                                        │ │  
 │ └────────────────────────────────────────────────────────────────────────┘ │  
 ├────────────────────────────────────────────────────────────────────────────┤  
 │                      <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 when 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 the 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 is reset or disabled by software.

Source code of watchdog driver for CM-iAM is found in drivers/watchdog/sbc_fitpc2_wdt.c. The module is present in official Linux sources starting from the 2.6.33 version.

.config - Linux Kernel v2.6.31-34-fitpc2 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   │  
 │ ┌────────────────────────────────────────────────────────────────────────┐ │  
 │ │    --- Watchdog Timer Support                                          │ │  
 │ │    [ ]   Disable watchdog shutdown on close                            │ │  
 │ │          *** Watchdog Device Drivers ***                               │ │  
 │ │    < >   Software watchdog                                             │ │  
 │ │    < >   Acquire SBC Watchdog Timer                                    │ │  
 │ │    < >   Advantech SBC Watchdog Timer                                  │ │  
 │ │    < >   ALi M1535 PMU Watchdog Timer                                  │ │  
 │ │    < >   ALi M7101 PMU Computer Watchdog                               │ │  
 │ │    < >   AMD Elan SC520 processor Watchdog                             │ │  
 │ │    < >   Eurotech CPU-1220/1410 Watchdog Timer                         │ │  
 │ │    <M>   Compulab SBC-FITPC2 watchdog                                  │ │  
 │ │    < >   IB700 SBC Watchdog Timer                                      │ │  
 │ │    < >   IBM Automatic Server Restart                                  │ │  
 │ │    < >   ICP Single Board Computer Watchdog Timer                      │ │  
 │ │    < >   Intel 6300ESB Timer/Watchdog                                  │ │  
 │ │    < >   Intel TCO Timer/Watchdog                                      │ │  
 │ └────v(+)────────────────────────────────────────────────────────────────┘ │  
 ├────────────────────────────────────────────────────────────────────────────┤  
 │                      <Select>    < Exit >    < Help >                      │  
 └────────────────────────────────────────────────────────────────────────────┘

Sound card support

The CM-iAM and SB-iAM use IDT 92HD83 sound codec. Its full name is 92HD83C1C5 and it may not yet be inserted into the kernel tree. Add the following quirk to the 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 the sound driver for the CM-iAM is found in sound/pci/hda/patch_sigmatel.c. The patch is present in official Linux sources starting from the 2.6.34 version.

.config - Linux Kernel v2.6.31-34-fitpc2 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   │  
 │ ┌────────────────────────────────────────────────────────────────────────┐ │  
 │ │    --- 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                              │ │  
 │ │    [ ]   Build ATI HDMI HD-audio codec support                         │ │  
 │ │    [ ]   Build NVIDIA HDMI HD-audio codec support                      │ │  
 │ │    [ ]   Build INTEL HDMI HD-audio codec support                       │ │  
 │ │    [ ]   Build Conexant HD-audio codec support                         │ │  
 │ │    [ ]   Build C-Media HD-audio codec support                          │ │  
 │ │    [ ]   Build Silicon Labs 3054 HD-modem codec support                │ │  
 │ │    [*]   Enable generic HD-audio codec parser                          │ │  
 │ │    [*]   Aggressive power-saving on HD-audio                           │ │  
 │ │    (0)     Default time-out for HD-audio power-save mode               │ │  
 │ │                                                                        │ │  
 │ └────────────────────────────────────────────────────────────────────────┘ │  
 ├────────────────────────────────────────────────────────────────────────────┤  
 │                      <Select>    < Exit >    < Help >                      │  
 └────────────────────────────────────────────────────────────────────────────┘

Network device support

.config - Linux Kernel v2.6.31-34-fitpc2 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 >                          │
 └───────────────────────────────────────────────────────────────────────────────────┘
.config - Linux Kernel v2.6.31-34-fitpc2 Configuration
─────────────────────────────────────────────────────────────────────────────────
 ┌────────────────── PHY Device support and infrastructure ───────────────────┐
 │  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   │  
 │ ┌────^(-)────────────────────────────────────────────────────────────────┐ │  
 │ │    < >   Drivers for SMSC PHYs                                         │ │  
 │ │    < >   Drivers for Broadcom PHYs                                     │ │  
 │ │    < >   Drivers for ICPlus PHYs                                       │ │  
 │ │    <M>   Drivers for Realtek PHYs                                      │ │  
 │ │    < >   Drivers for National Semiconductor PHYs                       │ │  
 │ │    < >   Driver for STMicroelectronics STe10Xp PHYs                    │ │  
 │ └────v(+)────────────────────────────────────────────────────────────────┘ │  
 ├────────────────────────────────────────────────────────────────────────────┤  
 │                      <Select>    < Exit >    < Help >                      │  
 └────────────────────────────────────────────────────────────────────────────┘

I2C/SMBus support

.config - Linux Kernel v2.6.31-34-fitpc2 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.31-34-fitpc2 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   │  
 │ ┌────────────────────────────────────────────────────────────────────────┐ │  
 │ │    --- MMC/SD/SDIO card support                                        │ │  
 │ │    [ ]   MMC debugging                                                 │ │  
 │ │    [*]   Allow unsafe resume (DANGEROUS)                               │ │  
 │ │          *** MMC/SD/SDIO Card Drivers ***                              │ │  
 │ │    <*>   MMC block device driver                                       │ │  
 │ │    [*]     Use bounce buffer for simple hosts                          │ │  
 │ │    <M>   SDIO UART/GPS class support                                   │ │  
 │ │    < >   MMC host test driver                                          │ │  
 │ │          *** MMC/SD/SDIO Host Controller Drivers ***                   │ │  
 │ │    <*>   Secure Digital Host Controller Interface support              │ │  
 │ │    <*>     SDHCI support on PCI bus                                    │ │  
 │ │    < >       Ricoh MMC Controller Disabler  (EXPERIMENTAL)             │ │  
 │ │    < >     SDHCI support on the platform specific bus                  │ │  
 │ └────v(+)────────────────────────────────────────────────────────────────┘ │  
 ├────────────────────────────────────────────────────────────────────────────┤  
 │                      <Select>    < Exit >    < Help >                      │  
 └────────────────────────────────────────────────────────────────────────────┘  
   

See also