ARM: tegra: acer-a500: Add Embedded Controller
authorDmitry Osipenko <digetx@gmail.com>
Mon, 16 Nov 2020 19:48:27 +0000 (22:48 +0300)
committerThierry Reding <treding@nvidia.com>
Thu, 26 Nov 2020 18:06:48 +0000 (19:06 +0100)
This patch adds device-tree node for the Embedded Controller which is
found on the Picasso board. The Embedded Controller itself is ENE KB930,
it provides functions like battery-gauge/LED/GPIO/etc and it uses firmware
that is specifically customized for the Acer A500 device.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts

index dd6fb13..9dafd3d 100644 (file)
                        reg = <1>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+
+                       embedded-controller@58 {
+                               compatible = "acer,a500-iconia-ec", "ene,kb930";
+                               reg = <0x58>;
+
+                               system-power-controller;
+
+                               monitored-battery = <&bat1010>;
+                               power-supplies = <&mains>;
+                       };
                };
        };
 
                default-brightness-level = <20>;
        };
 
+       bat1010: battery-2s1p {
+               compatible = "simple-battery";
+               charge-full-design-microamp-hours = <3260000>;
+               energy-full-design-microwatt-hours = <24000000>;
+               operating-range-celsius = <0 40>;
+       };
+
        /* PMIC has a built-in 32KHz oscillator which is used by PMC */
        clk32k_in: clock@0 {
                compatible = "fixed-clock";