Merge branch 'master' of git://git.denx.de/u-boot-video
[oweals/u-boot.git] / arch / arm / dts / sun4i-a10-gemei-g9.dts
index fbd638a38018bfee04b288a3fa255adabb555c69..ea7a59dcf8f9acf9af5870b716c693f224a7aa64 100644 (file)
  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *     GNU General Public License for more details.
  *
- *     You should have received a copy of the GNU General Public
- *     License along with this file; if not, write to the Free
- *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- *     MA 02110-1301 USA
- *
  * Or, alternatively,
  *
  *  b) Permission is hereby granted, free of charge, to any person
@@ -52,6 +47,7 @@
 #include "sunxi-common-regulators.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
        model = "Gemei G9 Tablet";
 /*
  * TODO:
  *   2x cameras via CSI
- *   bma250 IRQs
  *   AXP battery management
  *   NAND
  *   OTG
  *   Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
  */
+&codec {
+       /* PH15 controls power to external amplifier (ft2012q) */
+       allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
 
 &ehci0 {
        status = "okay";
 };
 
 &i2c0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c0_pins_a>;
        status = "okay";
 
        axp209: pmic@34 {
-               compatible = "x-powers,axp209";
                reg = <0x34>;
                interrupts = <0>;
-
-               interrupt-controller;
-               #interrupt-cells = <1>;
        };
 };
 
+#include "axp209.dtsi"
+
 &i2c1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c1_pins_a>;
        status = "okay";
 
        /* Accelerometer */
        bma250@18 {
                compatible = "bosch,bma250";
                reg = <0x18>;
-
-               /*
-                * TODO: interrupt pins:
-                * int1 - PH00
-                * int2 - PI10
-                */
+               interrupt-parent = <&pio>;
+               interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */
        };
 };
 
 &lradc {
-       vref-supply = <&reg_vcc3v0>;
+       vref-supply = <&reg_ldo2>;
 
        status = "okay";
 
-       button@158 {
+       button-158 {
                label = "Volume Down";
                linux,code = <KEY_VOLUMEDOWN>;
                channel = <0>;
                voltage = <158730>;
        };
 
-       button@349 {
+       button-349 {
                label = "Volume Up";
                linux,code = <KEY_VOLUMEUP>;
                channel = <0>;
                voltage = <349206>;
        };
 
-       button@1142 {
+       button-1142 {
                label = "Esc";
                linux,code = <KEY_ESC>;
                channel = <0>;
 };
 
 &mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
-       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH01 */
-       cd-inverted;
+       cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH01 */
        status = "okay";
 };
 
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1250000>;
+       regulator-max-microvolt = <1250000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
 
 &uart0  {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };