Skip to content

Commit

Permalink
Merge pull request radxa-pkg#177 from nascs/rock4_pwm_ir_remotectl
Browse files Browse the repository at this point in the history
add carMp3 pwm ir remotectl for rock4
  • Loading branch information
RadxaYuntian authored Sep 15, 2023
2 parents dbb3495 + 46962fa commit 858ddc3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dtb-$(CONFIG_CLK_RK3399) += \
rk3399-opp-2400.dtbo \
rk3399-pcie0-gen2.dtbo \
rk3399-pwm0.dtbo \
rk3399-pwm1-ir-rx.dtbo \
rk3399-pwm1.dtbo \
rk3399-radxa-25w-poe.dtbo \
rk3399-rga-400.dtbo \
Expand Down
42 changes: 42 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/rk3399-pwm1-ir-rx.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/input/input.h>

/ {
metadata {
title = "Enable IR receiver on PWM1";
compatible = "rockchip,rk3399";
category = "misc";
exclusive = "GPIO4_C6", "pwm1";
description = "Enable IR receiver on PWM1.";
};

fragment@0 {
target = <&pwm1>;

__overlay__ {
compatible = "rockchip,remotectl-pwm";
remote_pwm_id = <1>;
handle_cpu_id = <1>;
remote_support_psci = <1>;
status = "okay";
pinctrl-0 = <&pwm1_pin>;
pinctrl-names = "default";
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;

ir_key1 {
rockchip,usercode = <0xff00>;
rockchip,key_table =
<0xba KEY_CHANNELDOWN>, <0xb9 KEY_CHANNEL>, <0xb8 KEY_CHANNELUP>,
<0xbb KEY_PREVIOUS>, <0xbf KEY_NEXT>, <0xbc KEY_PLAYPAUSE>,
<0xf8 KEY_VOLUMEDOWN>, <0xea KEY_VOLUMEUP>, <0xf6 KEY_EQUAL>,
<0xe9 KEY_0>, <0xe6 KEY_F1>, <0xf2 KEY_F2>,
<0xf3 KEY_1>, <0xe7 KEY_2>, <0xa1 KEY_3>,
<0xf7 KEY_4>, <0xe3 KEY_5>, <0xa5 KEY_6>,
<0xbd KEY_7>, <0xad KEY_8>, <0xb5 KEY_9>;
};
};
};
};

0 comments on commit 858ddc3

Please sign in to comment.