Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440358

[PATCH V2 3/3] dts: Add disp bls dtsi and dts config for MT2701

From Weiqing Kong <weiqing.kong@mediatek.com>
Newsgroups linux.kernel
Subject [PATCH V2 3/3] dts: Add disp bls dtsi and dts config for MT2701
Date 2016-07-11 10:30 +0200
Message-ID <rTELg-4vb-11@gated-at.bofh.it> (permalink)
References <rTELf-4vb-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Add disp_bls node in dtsi for CCF, add backlight_lcd
in dts for backlight subsystem driver, and init pwm gpio mode.

Signed-off-by: Weiqing Kong <weiqing.kong@mediatek.com>
---
 arch/arm/boot/dts/mt2701-evb.dts | 29 +++++++++++++++++++++++++++++
 arch/arm/boot/dts/mt2701.dtsi    |  9 +++++++++
 2 files changed, 38 insertions(+)

diff --git a/arch/arm/boot/dts/mt2701-evb.dts b/arch/arm/boot/dts/mt2701-evb.dts
index 082ca88..6d572f4 100644
--- a/arch/arm/boot/dts/mt2701-evb.dts
+++ b/arch/arm/boot/dts/mt2701-evb.dts
@@ -22,6 +22,35 @@
 	memory {
 		reg = <0 0x80000000 0 0x40000000>;
 	};
+
+	backlight_lcd: backlight_lcd {
+		compatible = "pwm-backlight";
+		pwms = <&disp_bls 0 100000>;
+		brightness-levels = <
+			  0  16  32  48  64  80  96 112
+			128 144 160 176 192 208 224 240
+			255
+		>;
+		default-brightness-level = <9>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pwm_bls_gpio>;
+	};
+};
+
+&disp_bls {
+	status = "okay";
+};
+
+&mmsys {
+	status = "okay";
+};
+
+&pio {
+	pwm_bls_gpio: pwm_bls_gpio {
+		pins_cmd_dat {
+			pinmux = <MT2701_PIN_208_AUD_EXT_CK1__FUNC_DISP_PWM>;
+		};
+	};
 };
 
 &uart0 {
diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi
index 42d5a37..49b8767 100644
--- a/arch/arm/boot/dts/mt2701.dtsi
+++ b/arch/arm/boot/dts/mt2701.dtsi
@@ -234,6 +234,15 @@
 		status = "disabled";
 	};
 
+	disp_bls: dispsys@1400a000 {
+		compatible = "mediatek,mt2701-disp-pwm";
+		reg = <0 0x1400a000 0 0x1000>;
+		#pwm-cells = <2>;
+		clocks = <&mmsys CLK_MM_MDP_BLS_26M>, <&mmsys CLK_MM_DISP_BLS>;
+		clock-names = "main", "mm";
+		status = "disabled";
+	};
+
 	imgsys: syscon@15000000 {
 		compatible = "mediatek,mt2701-imgsys", "syscon";
 		reg = <0 0x15000000 0 0x1000>;
-- 
1.8.1.1.dirty

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH V2 0/3] Support Mediatek Soc MT2701 disp pwm Weiqing Kong <weiqing.kong@mediatek.com> - 2016-07-11 10:30 +0200
  [PATCH V2 2/3] pwm: Add MediaTek MT2701 display PWM driver support Weiqing Kong <weiqing.kong@mediatek.com> - 2016-07-11 10:30 +0200
  [PATCH V2 1/3] dt-bindings: pwm: Add MediaTek display PWM bindings Weiqing Kong <weiqing.kong@mediatek.com> - 2016-07-11 10:30 +0200
    Re: [PATCH V2 1/3] dt-bindings: pwm: Add MediaTek display PWM  bindings Rob Herring <robh@kernel.org> - 2016-07-16 15:50 +0200
  [PATCH V2 3/3] dts: Add disp bls dtsi and dts config for MT2701 Weiqing Kong <weiqing.kong@mediatek.com> - 2016-07-11 10:30 +0200

csiph-web