From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: kernel@collabora.com, devicetree@vger.kernel.org,
"Benoît Cousson" <bcousson@baylibre.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Tony Lindgren" <tony@atomide.com>,
"Mark Rutland" <mark.rutland@arm.com>,
linux-omap@vger.kernel.org
Subject: [PATCH 1/8] ARM: dts: am335x-sl50: update backlight nodes
Date: Wed, 6 Jun 2018 17:54:06 +0200 [thread overview]
Message-ID: <20180606155413.23542-1-enric.balletbo@collabora.com> (raw)
This patch updates the backlight nodes to improve the support and describe
better how hardware is done. The changes done were:
* Use PWM_POLARITY_INVERTED instead of the hardcoded number.
* Add pinctrl configuration.
* Add the enable gpio definition.
* Add the power supply definition.
* Add more brightness levels.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
arch/arm/boot/dts/am335x-sl50.dts | 61 ++++++++++++++++++++++++++++---
1 file changed, 55 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/am335x-sl50.dts b/arch/arm/boot/dts/am335x-sl50.dts
index ddfa7192afd5..6d78bf828bbf 100644
--- a/arch/arm/boot/dts/am335x-sl50.dts
+++ b/arch/arm/boot/dts/am335x-sl50.dts
@@ -5,6 +5,7 @@
/dts-v1/;
#include "am33xx.dtsi"
+#include <dt-bindings/pwm/pwm.h>
/ {
model = "Toby Churchill SL50 Series";
@@ -57,16 +58,44 @@
backlight0: disp0 {
compatible = "pwm-backlight";
- pwms = <&ehrpwm1 0 500000 0>;
- brightness-levels = <0 10 20 30 40 50 60 70 80 90 99>;
- default-brightness-level = <6>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&backlight0_pins>;
+ pwms = <&ehrpwm1 0 500000 PWM_POLARITY_INVERTED>;
+ brightness-levels = < 0 1 2 3 4 5 6 7 8 9
+ 10 11 12 13 14 15 16 17 18 19
+ 20 21 22 23 24 25 26 27 28 29
+ 30 31 32 33 34 35 36 37 38 39
+ 40 41 42 43 44 45 46 47 48 49
+ 50 51 52 53 54 55 56 57 58 59
+ 60 61 62 63 64 65 66 67 68 69
+ 70 71 72 73 74 75 76 77 78 79
+ 80 81 82 83 84 85 86 87 88 89
+ 90 91 92 93 94 95 96 97 98 99
+ 100>;
+ default-brightness-level = <50>;
+ enable-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
+ power-supply = <&vdd_sys_reg>;
};
backlight1: disp1 {
compatible = "pwm-backlight";
- pwms = <&ehrpwm1 1 500000 0>;
- brightness-levels = <0 10 20 30 40 50 60 70 80 90 99>;
- default-brightness-level = <6>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&backlight1_pins>;
+ pwms = <&ehrpwm1 1 500000 PWM_POLARITY_INVERTED>;
+ brightness-levels = < 0 1 2 3 4 5 6 7 8 9
+ 10 11 12 13 14 15 16 17 18 19
+ 20 21 22 23 24 25 26 27 28 29
+ 30 31 32 33 34 35 36 37 38 39
+ 40 41 42 43 44 45 46 47 48 49
+ 50 51 52 53 54 55 56 57 58 59
+ 60 61 62 63 64 65 66 67 68 69
+ 70 71 72 73 74 75 76 77 78 79
+ 80 81 82 83 84 85 86 87 88 89
+ 90 91 92 93 94 95 96 97 98 99
+ 100>;
+ default-brightness-level = <50>;
+ enable-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+ power-supply = <&vdd_sys_reg>;
};
clocks {
@@ -105,6 +134,14 @@
reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
};
+ vdd_sys_reg: regulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_sys_reg";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
vmmcsd_fixed: fixedregulator0 {
compatible = "regulator-fixed";
regulator-name = "vmmcsd_fixed";
@@ -117,6 +154,18 @@
pinctrl-names = "default";
pinctrl-0 = <&lwb_pins>;
+ backlight0_pins: pinmux_backlight0_pins {
+ pinctrl-single,pins = <
+ AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE7) /* gpmc_wen.gpio2_4 */
+ >;
+ };
+
+ backlight1_pins: pinmux_backlight1_pins {
+ pinctrl-single,pins = <
+ AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE7) /* gpmc_ad10.gpio0_26 */
+ >;
+ };
+
led_pins: pinmux_led_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE7) /* gpmc_a5.gpio1_21 */
--
2.17.1
next reply other threads:[~2018-06-06 15:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-06 15:54 Enric Balletbo i Serra [this message]
2018-06-06 15:54 ` [PATCH 2/8] ARM: dts: am335x-sl50: use phy-phandle declarations Enric Balletbo i Serra
2018-06-06 15:54 ` [PATCH 3/8] ARM: dts: am335x-sl50: add a node for the LCD controller Enric Balletbo i Serra
2018-06-06 15:54 ` [PATCH 4/8] ARM: dts: am335x-sl50: set dr_mode to otg Enric Balletbo i Serra
2018-06-06 15:54 ` [PATCH 5/8] ARM: dts: am335x-sl50: add support for DS1339 Real Time Clock Enric Balletbo i Serra
2018-06-06 15:54 ` [PATCH 6/8] ARM: dts: am335x-sl50: use audio-graph-card for sound Enric Balletbo i Serra
2018-06-06 15:54 ` [PATCH 7/8] ARM: dts: am335x-sl50: fix label names for all LEDs Enric Balletbo i Serra
2018-06-06 15:54 ` [PATCH 8/8] ARM: dts: am335x-sl50: enable tsadc on SL50 board Enric Balletbo i Serra
2018-07-03 7:18 ` [PATCH 1/8] ARM: dts: am335x-sl50: update backlight nodes Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180606155413.23542-1-enric.balletbo@collabora.com \
--to=enric.balletbo@collabora.com \
--cc=bcousson@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).