Hi,
I am looking to reduce power consumption by disabling unused interfaces.
The current power consumption is approx 7.5W on my carrier board including the verdin module WB/IT module and peripherals.
The unused interfaces are all the display, graphics, camera, hdmi, JTAG, QSPI, CAN, PCIE, ETH2, MSP.
My current overlay is as follows:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2023 Your Company Name
*/
/dts-v1/;
/plugin/;
// #include "device-trees/dts-arm64/imx8mm-verdin.dtsi" // this does not work as somehow the tcb task build cant find it
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
#include "imx8mm.dtsi"
/ {
compatible = "toradex,verdin-imx8mm";
};
&{/} {
codec_ext: max98357a@0 {
compatible = "maxim,max98357a";
#sound-dai-cells = <0>;
clocks = <&clk IMX8MM_CLK_SAI2_ROOT>;
clock-names = "bclk";
status = "okay";
};
sound {
compatible = "simple-audio-card";
status = "okay";
simple-audio-card,name = "max98357a";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink_master_cpu>;
simple-audio-card,frame-master = <&dailink_master_cpu>;
dailink_master: simple-audio-card,codec {
sound-dai = <&codec_ext>;
clocks = <&clk IMX8MM_CLK_SAI2_ROOT>;
};
dailink_master_cpu: simple-audio-card,cpu {
sound-dai = <&sai2>;
};
};
};
/* Disable gpu */
&gpu {
status = "disabled";
};
/* Disable display subsystem */
&{/soc@0/bus@32c00000/display-subsystem} {
status = "disabled";
};
/* Disable lcd-if */
&lcdif {
status = "disabled";
};
/* Disable mipi-dsi */
&mipi_dsi {
status = "disabled";
};
/* Disable mipi-csi */
&csi1_bridge {
status = "disabled";
};
/* Disable mipi-csi */
&mipi_csi_1 {
status = "disabled";
};
/* Verdin I2S_1 */
&sai2 {
assigned-clock-rates = <11289600>;
status = "okay";
};
/* Verdin SD_1 */
&usdhc2 {
status = "okay";
};
/* Enable the Ethernet PHY */
&fec1 {
status = "okay";
};
/* Verdin I2C_1 */
&i2c4 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
// disable the toradex pca953x gpio expander
gpio_expander_21: gpio-expander@21 {
status = "disabled";
};
/* GPIO EXPANDER AT 0x21
STATUS: DETECTED AND DRIVER LOADING
*/
gpio_exp_cb: gpio_exp_cb@21 {
compatible = "nxp,pcal6416";
#gpio-cells = <2>;
gpio-controller;
interrupt-parent = <&gpio1>; /* gpio1 contains SODIMM_216 (named gpio5 in schematics) */
interrupts = <0 IRQ_TYPE_EDGE_FALLING>; /* gpio1_216 */
interrupt-controller; // this is a interrupt controller
interrupt-cells = <2>;
reg = <0x21>;
status = "okay";
};
/* LSM6 IMU AT 0x6a
STATUS: DETECTED AND DRIVER LOADING
*/
lsm6_imu: imu@6a {
compatible = "st,lsm6dsl";
reg = <0x6a>;
status = "okay";
interrupt-parent = <&gpio_exp_cb>;
interrupts = <9 IRQ_TYPE_EDGE_FALLING>, <10 IRQ_TYPE_EDGE_FALLING>; // INT1 on pin 9 (504), INT2 on pin 10 (505)
cs-gpios = <&gpio_exp_cb 8 GPIO_ACTIVE_HIGH>; // CS on pin 8 (503)
st,intpin = <1>; // 1: INT1, 2: INT2
};
/* No nuvoton nau8822 in SOMV3 */
nau8822_1a: audio-codec@1a {
compatible = "nuvoton,nau8822";
reg = <0x1a>;
status = "disabled";
};
// codec@1a {
// compatible = "nuvoton,nau8822";
// reg = <0x1a>;
// status = "disabled";
// };
// /delete-node/ codec@1a;
/* example taken from https: //forums.raspberrypi.com/viewtopic.php?t=243562#p1640265 */
/* another example https: //android.googlesource.com/kernel/msm/+/refs/tags/android-s-beta-5_r0.4/arch/arm64/boot/dts/google/sm7150-sunfish-pac193x.dtsi */
/* PAC1934 POWER MONITOR AT REG 0x18
STATUS: DETECTED AND DRIVER LOADING
*/
pac1934@18 {
compatible = "microchip,pac1934";
reg = <0x18>;
samp-rate = <64>;
status = "okay";
// /* CHANNEL 1 (0) IS CONNECTED TO BATTERY FOR CURRENT MEASUREMENT */
// ch1: channel@0 {
// bi-dir;
// uohms-shunt-res = <50000>; /* shunt resistor is 50 milliohm */
// rail-name = "BAT";
// subsys-name = "SUBSYS_BAT";
// channel_enabled;
// };
// /* CHANNEL 2 (1) IS CONNECTED TO VBUS_CHG FOR VOLTAGE MEAS ONLY */
// ch2: channel@1 {
// /* uni-directional channel because of missing "bi-dir" property */
// bi-dir;
// uohms-shunt-res = <0>; /* shunt resistor is not present */
// rail-name = "VBUS";
// subsys-name = "SUBSYS_VBUS";
// channel_enabled;
// };
// /* CHANNEL 3 (2) IS CONNECTED TO SYS_PWR FOR CURRENT MEASUREMENT */
// ch3: channel@2 {
// bi-dir;
// uohms-shunt-res = <50000>; /* shunt resistor is 50 milliohm */
// rail-name = "SYS";
// subsys-name = "SUBSYS_SYS";
// channel_enabled;
// };
// /* CHANNEL 4 (3) IS CONNECTED TO MEASURE SOM SUPPLY VOLTAGE ONLY */
// ch4: channel@3 {
// bi-dir;
// uohms-shunt-res = <0>; /* shunt resistor is not present */
// rail-name = "5V_SOM";
// subsys-name = "SUBSYS_SOM";
// channel_enabled;
// };
channel@1 {
reg = <0x1>;
shunt-resistor-micro-ohms = <50000>;
label = "BAT";
bipolar;
};
channel@2 {
reg = <0x2>;
shunt-resistor-micro-ohms = <0>;
label = "VBUS";
};
channel@3 {
reg = <0x3>;
shunt-resistor-micro-ohms = <50000>;
label = "SYS";
bipolar;
};
channel@4 {
reg = <0x4>;
shunt-resistor-micro-ohms = <0>;
label = "SOM";
};
};
/* PCA9633 LED DRIVER AT REG 0x61
STATUS: DETECTED AND DRIVER LOADING
*/
pca9633@61 {
compatible = "nxp,pca9633";
reg = <0x61>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
lidar@0 {
label = "lidar";
reg = <0>;
linux,default-trigger = "none";
};
unused1@1 {
label = "pwm_empty1";
reg = <1>;
linux,default-trigger = "none";
};
unused2@2 {
label = "pwm_empty2";
reg = <2>;
linux,default-trigger = "none";
};
unused3@3 {
label = "pwm_empty3";
reg = <3>;
linux,default-trigger = "none";
};
};
/*
https: //lore.kernel.org/linux-pm/20201009121532.GN1042@kadam/t/
https: //www.mail-archive.com/linux-kernel@vger.kernel.org/msg2254373.html
*/
bat: battery {
compatible = "simple-battery";
constant-charge-current-max-microamp = <2000000>;
constant-charge-voltage-max-microvolt = <4200000>;
precharge-current-microamp = <160000>;
charge-term-current-microamp = <1500000>;
};
bq25790: charger@6b {
compatible = "ti,bq25792";
reg = <0x6b>;
interrupt-parent = <&gpio1>; // gpiochip0 contains SODIMM_218 which is gpio no 11 of gpiochip0
interrupts = <11 IRQ_TYPE_EDGE_FALLING>; // gpiochip0 gpio 11 is SODIMM_218
ti,watchdog-timeout-ms = <2000>;
input-current-limit-microamp = <1500000>;
input-voltage-limit-microvolt = <4500000>;
monitored-battery = <&bat>;
};
/* LED DRIVER LP55231 AT REG 0x32
STATUS: DETECTED ON I2C BUS BUT DRIVER NOT LOADING
*/
lp55231: led@32 {
compatible = "ti,lp5523";
reg = <0x32>;
status = "okay";
clock-mode = /bits/ 8 <1>; // 1: internal oscillator
/* first multicolor led */
multi-led@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x1>;
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STANDBY;
linux,default-trigger = "heartbeat";
led@0 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x0>;
color = <LED_COLOR_ID_GREEN>;
};
led@1 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x1>;
color = <LED_COLOR_ID_BLUE>;
};
led@6 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x6>;
color = <LED_COLOR_ID_RED>;
};
};
/* second multicolor led */
multi-led@2 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x2>;
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STANDBY;
linux,default-trigger = "heartbeat";
led@2 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x2>;
color = <LED_COLOR_ID_GREEN>;
};
led@3 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x3>;
color = <LED_COLOR_ID_BLUE>;
};
led@7 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x7>;
color = <LED_COLOR_ID_RED>;
};
};
/* third multicolor led */
multi-led@3 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x3>;
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STANDBY;
linux,default-trigger = "heartbeat";
led@4 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x4>;
color = <LED_COLOR_ID_GREEN>;
};
led@5 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x5>;
color = <LED_COLOR_ID_BLUE>;
};
led@8 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x8>;
color = <LED_COLOR_ID_RED>;
};
};
};
};
Any suggestions to reduce power consumption are welcome.