PWM_IR唤醒的配置以及GPIO控制电源的设备树配置

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>;		
		};
	};
};

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值