From 59f1ccf234a0861f30b6e798174cd3860b6637a6 Mon Sep 17 00:00:00 2001 From: Zhou weixin Date: Wed, 14 Dec 2016 20:08:11 +0800 Subject: [PATCH] ARM64: dts: rk3399: add some device support for tve1205g 1.add hid i2c toucpad 2.add hid i2c keyboard 3.add battery fuel gauge 4.add hall sensor 5.modify backlight polarity Change-Id: I648d568a595324505f08684308197350a73d763e Signed-off-by: Zhou weixin --- .../devicetree/bindings/power/ec_battery.txt | 20 ++++++++ .../boot/dts/rockchip/rk3399-tve1205g.dts | 51 ++++++++++++++++++- 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/ec_battery.txt diff --git a/Documentation/devicetree/bindings/power/ec_battery.txt b/Documentation/devicetree/bindings/power/ec_battery.txt new file mode 100644 index 000000000000..5d761d9fc532 --- /dev/null +++ b/Documentation/devicetree/bindings/power/ec_battery.txt @@ -0,0 +1,20 @@ +Binding for EC Battery + +Required properties: +- compatible: Should contain one of the following: + * "rockchip,ec-battery" +- reg: integer, smbus address of the device. +- tvirtual_power: integer, test power, if battery is not exist; +- monitor_sec: integer, delay time of queue_delayed_work (s); + + +Optional properties: + +Example: + +ec_battery: ec_battery09 { + compatible = "rockchip,ec-battery"; + reg = <0x76>; + virtual_power = <0>; + monitor_sec = <5>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-tve1205g.dts b/arch/arm64/boot/dts/rockchip/rk3399-tve1205g.dts index 96be5b24b69d..00d4c2a6eaff 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-tve1205g.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-tve1205g.dts @@ -105,7 +105,7 @@ backlight: backlight { compatible = "pwm-backlight"; - pwms = <&pwm0 0 25000 PWM_POLARITY_INVERTED>; + pwms = <&pwm0 0 25000 0>; brightness-levels = < 0 1 51 52 52 53 53 54 54 55 55 56 56 57 57 58 @@ -247,6 +247,15 @@ pinctrl-0 = <&hp_det>; io-channels = <&saradc 2>; }; + + hall_sensor: hall-mh248 { + compatible = "hall-mh248"; + pinctrl-names = "default"; + pinctrl-0 = <&mh248_irq_gpio>; + irq-gpio = <&gpio0 GPIO_A1 IRQ_TYPE_EDGE_BOTH>; + hall-active = <1>; + status = "okay"; + }; }; &rk_key { @@ -348,6 +357,10 @@ mali-supply = <&vdd_gpu>; }; +&hdmi { + status = "disabled"; +}; + &i2s0 { status = "okay"; rockchip,i2s-broken-burst-len; @@ -602,7 +615,29 @@ }; }; -&i2c5 { +&i2c3 { + status="okay"; + + hidkey@68 { + clock-frequency = <100000>; + compatible = "hid-over-i2c"; + interrupt-parent = <&gpio0>; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&hidkey_irq_gpio>; + reg = <0x68>; + hid-descr-addr = <0x0001>; + }; + + ec_battery@76 { + compatible = "rockchip,ec-battery"; + reg = <0x76>; + virtual_power = <0>; + monitor_sec = <5>; + }; +}; + +&i2c2 { status = "okay"; i2c-scl-rising-time-ns = <345>; i2c-scl-falling-time-ns = <11>; @@ -874,6 +909,18 @@ }; }; + hallsensor { + mh248_irq_gpio: mh248-irq-gpio { + rockchip,pins = <0 GPIO_A2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + hidkey { + hidkey_irq_gpio: hidkey-irq-gpio { + rockchip,pins = <0 GPIO_B0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + touchpad { touchpad_irq_gpio: touchpad-irq-gpio { rockchip,pins = <1 GPIO_C2 RK_FUNC_GPIO &pcfg_pull_up>; -- 2.34.1