From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guennadi Liakhovetski Date: Fri, 15 Feb 2013 10:36:29 +0000 Subject: [RFC] ARM: shmobile: add framebuffer and backlight support to kzm9g-reference Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-kernel@vger.kernel.org Cc: Magnus Damm , Simon Horman , devicetree-discuss@lists.ozlabs.org, Samuel Ortiz , Mark Brown , Liam Girdwood , Richard Purdie , Andrew Morton , linux-fbdev@vger.kernel.org This adds support for the framebuffer and an AS3711 PMIC, used for supplying power to the CPU, some peripherals and the backlight. not-Signed-off-by: Guennadi Liakhovetski --- As is clear from the not-Sob line and the RFC in the subject, this is not for mainline. This is just an illustration how the recently submitted "mfd: as3711: add OF support" patch can be used with the kzm9g board. I had to add the framebuffer support to kzm9g, because without it the backlight would just be turned on with no image on the LCD, which doesn't look pretty. In the future, if needed, we could first only apply the regulator part of the .dts, leaving the backlight disabled. arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 90 ++++++++++++++++++++++++ arch/arm/mach-shmobile/board-kzm9g-reference.c | 73 +++++++++++++++++++- 2 files changed, 162 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts index b93b16a..a5810fc 100644 --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts @@ -99,6 +99,12 @@ toshiba,mmc-wrprotect-disable; toshiba,mmc-has-idle-wait; }; + + /* A dummy LCDC DT node for now */ + lcdc: lcdc@0xfe940000 { + compatible = "renesas,sh-mobile-lcdc"; + reg = <0xfe940000 0x4000>; + }; }; &i2c3 { @@ -106,6 +112,90 @@ pinctrl-0 = <&i2c3_pins>; }; +&i2c0 { + as3711@40 { + compatible = "ams,as3711"; + reg = <0x40>; + + regulators { + sd1 { + regulator-name = "1.315V CPU"; + regulator-min-microvolt = <1315000>; + regulator-max-microvolt = <1335000>; + regulator-always-on; + regulator-boot-on; + }; + sd2 { + regulator-name = "1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + sd4 { + regulator-name = "1.215V"; + regulator-min-microvolt = <1215000>; + regulator-max-microvolt = <1235000>; + regulator-always-on; + regulator-boot-on; + }; + ldo2 { + regulator-name = "2.8V CPU"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-boot-on; + }; + ldo3 { + regulator-name = "3.0V CPU"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + regulator-boot-on; + }; + ldo4 { + regulator-name = "2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-boot-on; + }; + ldo5 { + regulator-name = "2.8V #2"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-boot-on; + }; + ldo7 { + regulator-name = "1.15V CPU"; + regulator-min-microvolt = <1150000>; + regulator-max-microvolt = <1150000>; + regulator-always-on; + regulator-boot-on; + }; + ldo8 { + regulator-name = "1.15V CPU #2"; + regulator-min-microvolt = <1150000>; + regulator-max-microvolt = <1150000>; + regulator-always-on; + regulator-boot-on; + }; + }; + + backlight { + compatible = "ams,as3711-bl"; + su2-dev = <&lcdc>; + su2-max-uA = <36000>; + su2-feedback-curr-auto; + su2-fbprot-gpio4; + su2-auto-curr1; + su2-auto-curr2; + su2-auto-curr3; + }; + }; +}; + &gpio { sdhi0_pins: pfc_sdhi0_pins { renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp", "sdhi0_cd"; diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index 1490246..9d520ca 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -39,6 +40,62 @@ #include #include +#include