From patchwork Fri Feb 15 10:36:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2145391 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EDDD8DF24C for ; Fri, 15 Feb 2013 10:36:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935691Ab3BOKgg (ORCPT ); Fri, 15 Feb 2013 05:36:36 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:56404 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935700Ab3BOKgf (ORCPT ); Fri, 15 Feb 2013 05:36:35 -0500 Received: from axis700.grange (dslb-188-109-033-039.pools.arcor-ip.net [188.109.33.39]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0Mh6iv-1UJrKh469h-00MR9q; Fri, 15 Feb 2013 11:36:32 +0100 Received: by axis700.grange (Postfix, from userid 1000) id DDAC440B99; Fri, 15 Feb 2013 11:36:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id DA25C40B98; Fri, 15 Feb 2013 11:36:29 +0100 (CET) Date: Fri, 15 Feb 2013 11:36:29 +0100 (CET) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange 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 Subject: [RFC] ARM: shmobile: add framebuffer and backlight support to kzm9g-reference In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V02:K0:87jZHzQhsp+HhLn7HEFApgP+ZisGQYKJ5xNUkNCP6Db Q921rJ6sjwp6qaxZdlAJKcSlYrj+700GdydRFkNb8C1iDV+UAW hgaB+DXyoOY99x17zT7F0mKvUCJ2AlqHSURjDofdAKpre5YVSA KsYFG9bMt9pE2IsYnMU/YeBwHDwU7cnP90p4y1fG40CaZGQQgP 9ZjsQRI+Jqk2ayVoMUoez+EOv3bBO9sS1lWAx7qRXtPLYDcYng gw7s/0SOU6ZtPh5egJ+pE641IJszmisjblJzzFtnxpidmTFJxX Y0a8uvgJiBR0UJQvPwaavRm5DyBh8aiFWTT2tMXtGYR44Sid6o zHuSsHmYRpGP7QvrujxRQ2P7QLKu9l7NKXWAd3J+9ET7dVZkyU n0XSTsvu+7hHg== Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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