diff options
author | Pawel Moll <pawel.moll@arm.com> | 2012-07-09 06:33:47 -0400 |
---|---|---|
committer | Pawel Moll <pawel.moll@arm.com> | 2012-07-13 06:48:28 -0400 |
commit | b2a54ff03ca80f11f3760f4eab9a955e7215f569 (patch) | |
tree | 0b1b658ff7992a052fd18949eb3a4f691544182e | |
parent | b7541a950f27fc9237ce1fcb5c2284ee5c71efe3 (diff) |
ARM: vexpress: Add fixed regulator for SMSC
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>
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 10 | ||||
-rw-r--r-- | arch/arm/boot/dts/vexpress-v2m.dtsi | 10 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/v2m.c | 10 |
4 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 6374a08a6cab..cb15fca4dd04 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -318,6 +318,7 @@ config ARCH_VEXPRESS | |||
318 | select NO_IOPORT | 318 | select NO_IOPORT |
319 | select PLAT_VERSATILE | 319 | select PLAT_VERSATILE |
320 | select PLAT_VERSATILE_CLCD | 320 | select PLAT_VERSATILE_CLCD |
321 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
321 | help | 322 | help |
322 | This enables support for the ARM Ltd Versatile Express boards. | 323 | This enables support for the ARM Ltd Versatile Express boards. |
323 | 324 | ||
diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi index 142c72a938d3..d8a827bd2bf3 100644 --- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | |||
@@ -55,6 +55,8 @@ | |||
55 | reg-io-width = <4>; | 55 | reg-io-width = <4>; |
56 | smsc,irq-active-high; | 56 | smsc,irq-active-high; |
57 | smsc,irq-push-pull; | 57 | smsc,irq-push-pull; |
58 | vdd33a-supply = <&v2m_fixed_3v3>; | ||
59 | vddvario-supply = <&v2m_fixed_3v3>; | ||
58 | }; | 60 | }; |
59 | 61 | ||
60 | usb@2,03000000 { | 62 | usb@2,03000000 { |
@@ -198,5 +200,13 @@ | |||
198 | interrupts = <14>; | 200 | interrupts = <14>; |
199 | }; | 201 | }; |
200 | }; | 202 | }; |
203 | |||
204 | v2m_fixed_3v3: fixedregulator@0 { | ||
205 | compatible = "regulator-fixed"; | ||
206 | regulator-name = "3V3"; | ||
207 | regulator-min-microvolt = <3300000>; | ||
208 | regulator-max-microvolt = <3300000>; | ||
209 | regulator-always-on; | ||
210 | }; | ||
201 | }; | 211 | }; |
202 | }; | 212 | }; |
diff --git a/arch/arm/boot/dts/vexpress-v2m.dtsi b/arch/arm/boot/dts/vexpress-v2m.dtsi index 47ee30791f44..dba53fd026bb 100644 --- a/arch/arm/boot/dts/vexpress-v2m.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m.dtsi | |||
@@ -54,6 +54,8 @@ | |||
54 | reg-io-width = <4>; | 54 | reg-io-width = <4>; |
55 | smsc,irq-active-high; | 55 | smsc,irq-active-high; |
56 | smsc,irq-push-pull; | 56 | smsc,irq-push-pull; |
57 | vdd33a-supply = <&v2m_fixed_3v3>; | ||
58 | vddvario-supply = <&v2m_fixed_3v3>; | ||
57 | }; | 59 | }; |
58 | 60 | ||
59 | usb@3,03000000 { | 61 | usb@3,03000000 { |
@@ -197,5 +199,13 @@ | |||
197 | interrupts = <14>; | 199 | interrupts = <14>; |
198 | }; | 200 | }; |
199 | }; | 201 | }; |
202 | |||
203 | v2m_fixed_3v3: fixedregulator@0 { | ||
204 | compatible = "regulator-fixed"; | ||
205 | regulator-name = "3V3"; | ||
206 | regulator-min-microvolt = <3300000>; | ||
207 | regulator-max-microvolt = <3300000>; | ||
208 | regulator-always-on; | ||
209 | }; | ||
200 | }; | 210 | }; |
201 | }; | 211 | }; |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index a3652a4ddc40..37608f22ee31 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/clkdev.h> | 18 | #include <linux/clkdev.h> |
19 | #include <linux/clk-provider.h> | 19 | #include <linux/clk-provider.h> |
20 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
21 | #include <linux/regulator/fixed.h> | ||
22 | #include <linux/regulator/machine.h> | ||
21 | 23 | ||
22 | #include <asm/arch_timer.h> | 24 | #include <asm/arch_timer.h> |
23 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
@@ -199,6 +201,11 @@ static struct platform_device v2m_eth_device = { | |||
199 | .dev.platform_data = &v2m_eth_config, | 201 | .dev.platform_data = &v2m_eth_config, |
200 | }; | 202 | }; |
201 | 203 | ||
204 | static struct regulator_consumer_supply v2m_eth_supplies[] = { | ||
205 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
206 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
207 | }; | ||
208 | |||
202 | static struct resource v2m_usb_resources[] = { | 209 | static struct resource v2m_usb_resources[] = { |
203 | { | 210 | { |
204 | .start = V2M_ISP1761, | 211 | .start = V2M_ISP1761, |
@@ -503,6 +510,9 @@ static void __init v2m_init(void) | |||
503 | { | 510 | { |
504 | int i; | 511 | int i; |
505 | 512 | ||
513 | regulator_register_fixed(0, v2m_eth_supplies, | ||
514 | ARRAY_SIZE(v2m_eth_supplies)); | ||
515 | |||
506 | platform_device_register(&v2m_pcie_i2c_device); | 516 | platform_device_register(&v2m_pcie_i2c_device); |
507 | platform_device_register(&v2m_ddc_i2c_device); | 517 | platform_device_register(&v2m_ddc_i2c_device); |
508 | platform_device_register(&v2m_flash_device); | 518 | platform_device_register(&v2m_flash_device); |