ARM64: dts: rk3399: add some device support for tve1205g
authorZhou weixin <zwx@rock-chips.com>
Wed, 14 Dec 2016 12:08:11 +0000 (20:08 +0800)
committerJianqun Xu <jay.xu@rock-chips.com>
Thu, 15 Dec 2016 09:48:47 +0000 (17:48 +0800)
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 <zwx@rock-chips.com>
Documentation/devicetree/bindings/power/ec_battery.txt [new file with mode: 0644]
arch/arm64/boot/dts/rockchip/rk3399-tve1205g.dts

diff --git a/Documentation/devicetree/bindings/power/ec_battery.txt b/Documentation/devicetree/bindings/power/ec_battery.txt
new file mode 100644 (file)
index 0000000..5d761d9
--- /dev/null
@@ -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>;
+};
index 96be5b24b69ddde4786c05fea754114f1224a8be..00d4c2a6eaff2ed23347392255c9a0e9eb5ce649 100644 (file)
 
        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
                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 {
        mali-supply = <&vdd_gpu>;
 };
 
+&hdmi {
+       status = "disabled";
+};
+
 &i2s0 {
        status = "okay";
        rockchip,i2s-broken-burst-len;
        };
 };
 
-&i2c5 {
+&i2c3 {
+       status="okay";
+
+       hidkey@68 {
+               clock-frequency = <100000>;
+               compatible = "hid-over-i2c";
+               interrupt-parent = <&gpio0>;
+               interrupts = <GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
+               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>;
                };
        };
 
+       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>;