1、PWM_IR唤醒的配置
kernel/arch/arm64/boot/dts/rockchip/x3399-baseboard.dtsi
&rockchip_suspend {
status = "okay";
rockchip,sleep-debug-en = <1>;
rockchip,sleep-mode-config = <
(0
| RKPM_SLP_ARMPD
| RKPM_SLP_PERILPPD
| RKPM_SLP_DDR_RET
| RKPM_SLP_PLLPD
| RKPM_SLP_CENTER_PD
| RKPM_SLP_AP_PWROFF
)
>;
rockchip,wakeup-config = <
(0
| RKPM_GPIO_WKUP_EN //GPIO唤醒源如keyPower
//| RKPM_PWM_WKUP_EN //PWM_IR唤醒源
)
>;
rockchip,pwm-regulator-config = <
(0
| PWM2_REGULATOR_EN
)
>;
rockchip,power-ctrl =
<&gpio1 17 GPIO_ACTIVE_HIGH>,
<&gpio1 14 GPIO_ACTIVE_HIGH>;
};
2、GPIO控制电源的配置
如LCD power_en管脚的配置
//#include "rk3399-excavator-sapphire.dtsi"
#include "x3399-baseboard.dtsi"
#include "rk3399-android.dtsi"
#include "rk3399-vop-clk-set.dtsi"
#include <dt-bindings/input/input.h>
/ {
model = "9tripod RK3399 Development Board";
compatible = "rockchip,android", "9tripod,x3399-development-board", "rockchip,rk3399";
chosen: chosen {
bootargs = "earlycon=uart8250,mmio32,0xff1a0000 console=ttyFIQ0 androidboot.baseband=N/A androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init initrd=0x62000001,0x00800000 coherent_pool=1m";
};
vcc_lcd: vcc-lcd {
compatible = "regulator-fixed";
regulator-name = "vcc_lcd";
pinctrl-names = "default";
pinctrl-0 = <&lcd_power_en>;
gpio = <&gpio4 22 GPIO_ACTIVE_HIGH>; //GPIO4_D5
startup-delay-us = <100000>;
enable-active-high;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
vin-supply = <&vcc5v0_sys>;
};
//edp panel config
panel: panel {
compatible = "simple-panel";
backlight = <&backlight>;
power-supply = <&vcc_lcd>; //这里的使用
//enable-gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>;
//pinctrl-names = "default";
//pinctrl-0 = <&lcd_enable_gpio>;
//enable-delay-ms = <200>;
bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
bpc = <6>;
display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <141400000>;
hactive = <1920>;
vactive = <1080>;
hfront-porch = <142>;
hsync-len = <32>;
hback-porch = <48>;
vfront-porch = <11>;
vsync-len = <6>;
vback-porch = <3>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
};
};
ports {
panel_in: endpoint {
remote-endpoint = <&edp_out>;
};
};
};
};
pin-ctrl {
vcc-lcd {
lcd_power_en: lcd-power-en {
rockchip,pins = <4 22 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};