ARM: da850-lego-ev3: Add device tree node for sound
[linux-2.6-microblaze.git] / arch / arm / boot / dts / da850-lego-ev3.dts
index 0309537..c20580a 100644 (file)
                pinctrl-0 = <&system_power_pin>;
        };
 
+       sound {
+               compatible = "pwm-beeper";
+               pinctrl-names = "default";
+               pinctrl-0 = <&ehrpwm0b_pins>;
+               pwms = <&ehrpwm0 1 1000000 0>;
+               amp-supply = <&amp>;
+       };
+
        /*
         * This is a 5V current limiting regulator that is shared by USB,
         * the sensor (input) ports, the motor (output) ports and the A/DC.
                regulator-boot-on;
                vin-supply = <&vcc5v>;
        };
+
+       /*
+        * This is the amplifier for the speaker.
+        */
+       amp: regulator3 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&amp_pins>;
+               compatible = "regulator-fixed";
+               regulator-name = "amp";
+               gpio = <&gpio 111 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &pmx_core {
                        0x4c 0x00008000 0x0000f000
                >;
        };
+
+       amp_pins: pinmux_amp_pins {
+               pinctrl-single,bits = <
+                       /* GP6[15] */
+                       0x34 0x00000008 0x0000000f
+               >;
+       };
 };
 
 &pinconf {
        };
 };
 
+&ehrpwm0 {
+       status = "okay";
+};
+
 &gpio {
        status = "okay";
 };