One: Add development board configuration file
Create "imx_my_emmc_defconfig" configuration file under /arch/arm/configs directory
Two: Add the development board device tree file
Create the "imx6ull-my-emmc.dts" device tree file in the /arch/arm/boot/dts directory
Add the device tree file in the "CONFIG_SOC_IMX6ULL" column of Makefile in the same directory: "imx6ull-my-emmc.dtb"
dtb-$(CONFIG_SOC_IMX6ULL) += \
imx6ull-14x14-ddr3-arm2.dtb \
imx6ull-14x14-ddr3-arm2-adc.dtb \
imx6ull-14x14-ddr3-arm2-cs42888.dtb \
imx6ull-14x14-ddr3-arm2-ecspi.dtb \
imx6ull-14x14-ddr3-arm2-emmc.dtb \
imx6ull-14x14-ddr3-arm2-epdc.dtb \
imx6ull-14x14-ddr3-arm2-flexcan2.dtb \
... ...
imx6ull-my-emmc.dtb \
... ...
Three: modify the CPU frequency
1. There are 5 frequency modulation strategies in the Linux kernel
(1): Performance, the highest performance, directly use the highest frequency, regardless of power consumption.
(2): Interactive, use the highest frequency directly at the beginning, and then slowly decrease it according to the CPU load.
(3): Powersave, power saving mode, usually runs at the lowest frequency, system performance will be affected, generally not used.
(4): Userspace, you can manually adjust the frequency in the user space.
(5): Ondemand, check the load regularly, and then adjust the frequency according to the load. When the load is low, reduce the CPU frequency
to save power, and when the load is high, increase the CPU frequency to increase performance.
2. Modification method
(1): Modify the configuration file xxx_defconfig
... ...
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
... ...
(2): Graphical interface configuration
3. CPU frequency modification
Modify the corresponding parameters in the imx6ull.dtsi file as required
cpu0: cpu@0 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0>;
clock-latency = <61036>; /* two CLK32 periods */
operating-points = <
/* kHz uV */
996000 1275000
792000 1225000
528000 1175000
396000 1025000
198000 950000
>;
fsl,soc-operating-points = <
/* KHz uV */
996000 1175000
792000 1175000
528000 1175000
396000 1175000
198000 1175000
>;
After modification, execute the "make dtbs" command to compile the device tree.
4: Enable 8-channel EMMC driver
From the device tree file "imx6ull-14x14-evk.dts" configured by the system, you can see that the linux driver defaults to 4-way emmc.
/* imx6ull-14x14-evk.dts */
&usdhc1 {
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc1>;
pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
keep-power-in-suspend;
enable-sdio-wakeup;
vmmc-supply = <®_sd1_vmmc>;
status = "okay";
};
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2>;
non-removable;
status = "okay";
};
Modify the attributes of the device tree configuration file "usdhc2" created by yourself:
/* imx6ull-my-emmc.dts */
#include "imx6ull-14x14-evk.dts"
&usdhc2 {
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc2_8bit>;
pinctrl-1 = <&pinctrl_usdhc2_8bit_100mhz>;
pinctrl-2 = <&pinctrl_usdhc2_8bit_200mhz>;
bus-width = <8>;
non-removable;
status = "okay";
};