Linux Kernel - 5.15
The Linux kernel for Microchip ARM-Based MPUs (aka AT91) is distributed as a GIT tree hosted on GitHub as a fork of the
official Linus Torvalds' git tree. The objective of the Microchip Linux team is to integrate all the AT91-related material in the official Linux Kernel.
Before completing this inclusion process, which can take time, this website provides the Linux4SAM Linux Kernel git tree for AT91 devices at:
https://github.com/linux4sam/linux-at91/tree/linux-5.15-at91
and now on:
https://github.com/linux4microchip/linux/tree/linux-5.15-mchp
Tags
Enhancements are added on top of the official
v5.15 Linux kernel tag where most of the Microchip SoC features are already supported. Note as well that we re-integrate each and every
stable kernel release on top of this Long Term Support (LTS) kernel revision. This means that each
v5.15.x version is merged in our branch.
Here is a little summary of the main additional enhancements:
- Integration of stable kernel updates up to v5.15.68
- Enable RTT driver for SAM9x60 Curiosity
- Fix phylink suspend / resume on SAMA7G5
- Serial: enable GCLK usage for SoCs that support it to get better baud rate accuracy
- Improve thermal management calibration for SAMA7G5
- Backport of LAN93XX drivers from upstream
- Enable OP-TEE support for SAMA5D2 SoM1-EK
- DMA: convert HDMAC driver to use virt-dma
- Add support for MCP251xfd CAN driver
Enhancements are added on top of the official
v5.15 Linux kernel tag where most of the Microchip SoC features are already supported.
Here are the main additional enhancements:
- Addition of support for the new SAM9X60 Curiosity kit
Enhancements are added on top of the official
v5.15 Linux kernel tag where most of the Microchip SoC features are already supported. Note as well that we re-integrate each and every
stable kernel release on top of this Long Term Support (LTS) kernel revision. This means that each
v5.15.x version is merged in our branch.
Here is a little summary of the main additional enhancements:
- Integration of stable kernel updates up to v5.15.32
- Addition of the new SAMA7G54 SoC as part of the SAMA7G5 family
- WILC: Update driver & firmware to 15.7 with WPA3 security support
- Add support for Sony imx274 camera sensor
- ISC driver moved to media controller paradigm for image acquisition pipeline (MIPI CSI-2)
- Support for External Interrupt Controller (EIC) available on SAMA7G5
- Add Dynamic Voltage and Frequency Scaling (DVFS) support with Operating Performance Points (OPP) for 90MHz, 250MHz, 600MHz, 800MHz, 1GHz frequencies for SAMA7G5
- Refactored clocks' suspend/resume
- Support for power management modes: WFI (standby), ULP0, ULP1, BSR for SAMA7G5
- Low power mode for on board crystal oscillators in ULP0 and ULP1 to reduce overall power consumption
- GEMAC support with RGMII and MII for SAMA7G5
- Fix GEMAC Wake On LAN on ulp0, ulp1 for SAMA7G5
- Increased PIT64B clockevent timer frequency to 5MHz for better timers resolution on
- CPU Idle support with minimized CPU frequency and DDRAM in self-refresh for SAMA7G5 family
- Use ADC reworked driver from mainline
- ADC support for reading temperature channel available on SAMA7G5
- Support for accessing memory backed by OTP controller (modeled as NVMEM driver) for SAMA7G5
- Thermal management support for SAMA7G5
- Add QSPI / Octal SPI driver for SAMA7G5 (Single, Dual, Quad, Octal DTR modes), tested with mx66lm1g45g
- Add NAND support for SAMA7G5 and test it with 29F4G08ABAEA
- Add support for mx66lm1g45g NOR Flash, implement byte swap to fix endianness in 8D-8D-8D(Octal DTR)
- Enable crypto engines on SAMA7G5: AES, TDES, SHA with same features as on sama5d2 SoC
- Cleanup and runtime PM support for atmel-rng driver
- Fix deadlocks on AT91 DMA driver
- Reset controller support for USB PHY on SAMA7G5
- Improve USB PHY clock handling when used by both Host and Device for SAMA7G5
- Add SAMA7G5 audio interfaces drivers: SPDIF-TX, SPDIF-RX, I2S, SCC
- Add Asynchronous Sample Rate Converter (ASRC) audio driver for SAMA7G5
- Implement microphone PDMC driver using DMA mode for SAMA7G5
- Enable CAN driver for SAMA7G5
Getting Kernel sources
To get the source code, you have to clone the repository:
$ git clone https://github.com/linux4microchip/linux.git
Cloning into 'linux'...
remote: Enumerating objects: 8587836, done.
remote: Total 8587836 (delta 0), reused 0 (delta 0), pack-reused 8587836
Receiving objects: 100% (8587836/8587836), 3.49 GiB | 13.44 MiB/s, done.
Resolving deltas: 100% (7117887/7117887), done.
Updating files: 100% (70687/70687), done.
$ cd linux
The source code has been taken from the master branch which is pointing on the latest branch we use.
Note that you can also add this Linux4SAM repository as a
remote GIT repository to your usual Linux git tree. It will save you a lot of bandwidth and download time:
$ git remote add linux4microchip https://github.com/linux4microchip/linux.git
$ git remote update linux4microchip
Fetching linux4icrochip
From https://github.com/linux4microchip/linux
* [new branch] linux-5.10-mchp -> linux4microchip/linux-5.10-mchp
* [new branch] linux-5.15-mchp -> linux4microchip/linux-5.15-mchp
* [new branch] master -> linux4microchip/master
If you want to use another branch, you can list them and use one of them by doing this:
$ git branch -r
origin/HEAD -> origin/master
origin/linux-5.10-mchp
origin/linux-5.15-mchp
origin/master
$ git checkout origin/linux-5.15-mchp -b linux-5.15-mchp
Branch linux-5.15-mchp set up to track remote branch linux-5.15-mchp from origin.
Switched to a new branch 'linux-5.15-mchp'
Setup ARM Cross Compiler
Configure and Build the Linux kernel
Now you have to configure the Linux kernel according to your hardware. We have two default configuration at91 SoC in
arch/arm/configs
arch/arm/configs/at91_dt_defconfig
arch/arm/configs/sama5_defconfig
arch/arm/configs/sama7_defconfig
-
at91_dt_defconfig
: for SAM9 (ARM926) series chips
-
sama5_defconfig
: for SAMA5 series chips
-
sama7_defconfig
: for SAMA7 series chips
Now we Configure and Build kernel for board:
$ make ARCH=arm sama5_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
At this step, you can modify default configuration using the
menuconfig
$ make ARCH=arm menuconfig
Now, in the menuconfig dialog, you can easily add or remove some features. Once done, Move to
<Exit>
with arrows and press this button hitting the
Enter
key to exit from this screen.
Build the Linux kernel image, before you build you need set up the cross compile toolchain, check
this section.
$ make ARCH=arm
[..]
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
Now you have an usable compressed kernel image
zImage
.
If you need an uImage you can run this additional step:
make ARCH=arm uImage LOADADDR=0x20008000
[..]
Kernel: arch/arm/boot/zImage is ready
UIMAGE arch/arm/boot/uImage
Image Name: Linux-5.15.32-linux4microchip-20
Created: Wed May 4 21:18:58 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5069704 Bytes = 4950.88 KiB = 4.83 MiB
Load Address: 20008000
Entry Point: 20008000
Kernel: arch/arm/boot/uImage is ready
make ARCH=arm dtbs
[..]
DTC arch/arm/boot/dts/at91-kizbox2-2.dtb
DTC arch/arm/boot/dts/at91-kizbox3-hs.dtb
DTC arch/arm/boot/dts/at91-nattis-2-natte-2.dtb
DTC arch/arm/boot/dts/at91-sama5d27_som1_ek.dtb
DTC arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dtb
DTC arch/arm/boot/dts/at91-sama5d2_icp.dtb
DTC arch/arm/boot/dts/at91-sama5d2_ptc_ek.dtb
DTC arch/arm/boot/dts/at91-sama5d2_xplained.dtb
DTC arch/arm/boot/dts/at91-sama5d3_xplained.dtb
DTC arch/arm/boot/dts/at91-dvk_som60.dtb
DTC arch/arm/boot/dts/at91-gatwick.dtb
DTC arch/arm/boot/dts/at91-tse850-3.dtb
DTC arch/arm/boot/dts/at91-wb50n.dtb
DTC arch/arm/boot/dts/sama5d31ek.dtb
DTC arch/arm/boot/dts/sama5d33ek.dtb
DTC arch/arm/boot/dts/sama5d34ek.dtb
DTC arch/arm/boot/dts/sama5d35ek.dtb
DTC arch/arm/boot/dts/sama5d36ek.dtb
DTC arch/arm/boot/dts/sama5d36ek_cmp.dtb
DTC arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dtb
DTC arch/arm/boot/dts/at91-sama5d4_xplained.dtb
DTC arch/arm/boot/dts/at91-sama5d4ek.dtb
DTC arch/arm/boot/dts/at91-vinco.dtb
DTC arch/arm/boot/dts/at91-sama7g5ek.dtb
DTC arch/arm/boot/dts/at91-sam9x60_curiosity.dtb
[..]
If the building process is successful, the final images can be found under
arch/arm/boot/ directory.
- linux-5.15-mchp
-
• Media Controller: What is Media controller and how to use it with SAM products.. (Sam9x75Curiosity, Sama7g5-ek, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2Xplained)
• Using Atmel DRMDriver: Using Atmel KMS/DRM LCD driver. (Sama7d65Curiosity, Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity, Sam9x60EK, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek)
• Thermal Faq: Thermal management support on SAMA7G5. (Sama7d65Curiosity, Sama7g5-ek)
• Using SAMA 5 D 2 ADCDevice: Using the SAMA5D2-compatible ADC device. (Sama7d65Curiosity, Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity, Sama7g5-ek, Sama5d2-icp, Sam9x60EK, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained)
• Using Max Touch: Introduction for how to use maxTouch. (Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity)
• Crypto Config: How to configure Crypto driver. (Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity, Sama5d2-icp, Sam9x60EK, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek)
• USBGadget Config: Configure AT91 USB Gadget on Linux and Endpoint order management (composite USB). (Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity, Sama5d2-icp, Sam9x60EK, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek, AT91sam9x5-ek, other AT91SAM9 boards)
• Pwm Faq: PWM Driver. (Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity, Sam9x60EK, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d3Xplained, Sama5d3xek)
• Using I 2 SC: How to use I2SC. (Sam9x75Curiosity, Sama7g5-ek, Sam9x60EK, Sama5d2Xplained)
• ISCWhite Balance Features: White balance features of the Image sensor controller.. (Sam9x75Curiosity, Sama7g5-ek, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2Xplained)
• Sama 7 g 5 Xisc: Detailed explanation of the sama7g5 image acquisition pipeline. (Sam9x75Curiosity, Sama7g5-ek)
• External Component On EBI: Connecting an external component on the External Bus Interface. (Sam9x75Curiosity, Sam9x60Curiosity, Sam9x60EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek, AT91sam9x5-ek)
• Sama 7 g 5 Ov 7740: Interfacing sama7g5 with parallel omnivision ov7740 sensor.. (Sama7g5-ek)
• Using ASRC: How to use ASRC. (Sama7g5-ek)
• Boot Logo: Boot Logo for At91 SOC's. (Sama5d2Xplained)
• Using Isi 6: Using ISI with Linux4sam 6.0 and Kernel 4.14 and later. (Sam9x60EK, Sama5d3xek, AT91sam9x5-ek)