ARM: vexpress: Add fixed regulator for SMSC
authorPawel Moll <pawel.moll@arm.com>
Mon, 9 Jul 2012 10:33:47 +0000 (11:33 +0100)
committerPawel Moll <pawel.moll@arm.com>
Fri, 13 Jul 2012 10:48:28 +0000 (11:48 +0100)
SMSC driver requires "vdd33a" and "vddvario" regulator supplies now.

Add fixed regulator describing 3V3 power line (in both motherboard's
Device Trees and the non-DT code) and force fixed regulator config
option if regulators framework is enabled.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
arch/arm/Kconfig
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
arch/arm/boot/dts/vexpress-v2m.dtsi
arch/arm/mach-vexpress/v2m.c

index 6374a08a6cab662794429ee82a07274f90a38d5b..cb15fca4dd047a3f912237e28c3d431a3c813719 100644 (file)
@@ -318,6 +318,7 @@ config ARCH_VEXPRESS
        select NO_IOPORT
        select PLAT_VERSATILE
        select PLAT_VERSATILE_CLCD
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        help
          This enables support for the ARM Ltd Versatile Express boards.
 
index 142c72a938d3572ce7e6c747657dc584d7abfc16..d8a827bd2bf3728984621d1c45d90b640e8373db 100644 (file)
@@ -55,6 +55,8 @@
                        reg-io-width = <4>;
                        smsc,irq-active-high;
                        smsc,irq-push-pull;
+                       vdd33a-supply = <&v2m_fixed_3v3>;
+                       vddvario-supply = <&v2m_fixed_3v3>;
                };
 
                usb@2,03000000 {
                                interrupts = <14>;
                        };
                };
+
+               v2m_fixed_3v3: fixedregulator@0 {
+                       compatible = "regulator-fixed";
+                       regulator-name = "3V3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
        };
 };
index 47ee30791f445670543eb0b3447a4cd2965e8550..dba53fd026bb3692ecf33d69d237a2f9356c4bd1 100644 (file)
@@ -54,6 +54,8 @@
                        reg-io-width = <4>;
                        smsc,irq-active-high;
                        smsc,irq-push-pull;
+                       vdd33a-supply = <&v2m_fixed_3v3>;
+                       vddvario-supply = <&v2m_fixed_3v3>;
                };
 
                usb@3,03000000 {
                                interrupts = <14>;
                        };
                };
+
+               v2m_fixed_3v3: fixedregulator@0 {
+                       compatible = "regulator-fixed";
+                       regulator-name = "3V3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
        };
 };
index a3652a4ddc406208598b62a401a0d2f93923872e..37608f22ee318a903a79d33ad97678ce71244f23 100644 (file)
@@ -18,6 +18,8 @@
 #include <linux/clkdev.h>
 #include <linux/clk-provider.h>
 #include <linux/mtd/physmap.h>
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
 
 #include <asm/arch_timer.h>
 #include <asm/mach-types.h>
@@ -199,6 +201,11 @@ static struct platform_device v2m_eth_device = {
        .dev.platform_data = &v2m_eth_config,
 };
 
+static struct regulator_consumer_supply v2m_eth_supplies[] = {
+       REGULATOR_SUPPLY("vddvario", "smsc911x"),
+       REGULATOR_SUPPLY("vdd33a", "smsc911x"),
+};
+
 static struct resource v2m_usb_resources[] = {
        {
                .start  = V2M_ISP1761,
@@ -503,6 +510,9 @@ static void __init v2m_init(void)
 {
        int i;
 
+       regulator_register_fixed(0, v2m_eth_supplies,
+                       ARRAY_SIZE(v2m_eth_supplies));
+
        platform_device_register(&v2m_pcie_i2c_device);
        platform_device_register(&v2m_ddc_i2c_device);
        platform_device_register(&v2m_flash_device);