Skip to content

Commit e945cad

Browse files
committed
rockpi-4: add headphone detect
Signed-off-by: brian <[email protected]>
1 parent f7c3df9 commit e945cad

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

arch/arm64/boot/dts/rockchip/rockpi-4-linux.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,14 @@
269269
};
270270
};
271271

272+
rk_headset {
273+
compatible = "rockchip_headset";
274+
headset_gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
275+
pinctrl-names = "default";
276+
pinctrl-0 = <&hp_det>;
277+
io-channels = <&saradc 2>;
278+
};
279+
272280
test-power {
273281
status = "okay";
274282
};
@@ -860,6 +868,12 @@
860868
};
861869

862870
&pinctrl {
871+
headphone {
872+
hp_det: hp-det {
873+
rockchip,pins =
874+
<1 0 RK_FUNC_GPIO &pcfg_pull_up>;
875+
};
876+
};
863877

864878
sdio0 {
865879
sdio0_bus1: sdio0-bus1 {

arch/arm64/configs/rockchip_linux_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,7 @@ CONFIG_PHY_ROCKCHIP_PCIE=y
12551255
CONFIG_ANDROID=y
12561256
CONFIG_NVMEM=y
12571257
CONFIG_ROCKCHIP_EFUSE=y
1258+
CONFIG_RK_HEADSET=m
12581259
CONFIG_ROCKCHIP_SIP=y
12591260
# CONFIG_ACPI is not set
12601261
CONFIG_EXT4_FS=y

0 commit comments

Comments
 (0)