Adds device nodes for two front panel LEDs.
Signed-off-by: Tomasz Maciej Nowak <[email protected]>
---
arch/arm/boot/dts/tegra20-trimslice.dts | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts
index d55c6b240a30..31a8b088d386 100644
--- a/arch/arm/boot/dts/tegra20-trimslice.dts
+++ b/arch/arm/boot/dts/tegra20-trimslice.dts
@@ -200,16 +200,17 @@
conf_ata {
nvidia,pins = "ata", "atc", "atd", "ate",
"crtp", "dap2", "dap3", "dap4", "dta",
- "dtb", "dtc", "dtd", "dte", "gmb",
- "gme", "i2cp", "pta", "slxc", "slxd",
- "spdi", "spdo", "uda";
+ "dtb", "dtc", "dtd", "gmb", "gme",
+ "i2cp", "pta", "slxc", "slxd", "spdi",
+ "spdo", "uda";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
};
conf_atb {
nvidia,pins = "atb", "cdev1", "cdev2", "dap1",
- "gma", "gmc", "gmd", "gpu", "gpu7",
- "gpv", "sdio1", "slxa", "slxk", "uac";
+ "dte", "gma", "gmc", "gmd", "gpu",
+ "gpu7", "gpv", "sdio1", "slxa", "slxk",
+ "uac";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
};
@@ -402,6 +403,20 @@
};
};
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ ds2 {
+ label = "trimslice:green:right";
+ gpios = <&gpio TEGRA_GPIO(D, 2) GPIO_ACTIVE_LOW>;
+ };
+
+ ds3 {
+ label = "trimslice:green:left";
+ gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_LOW>;
+ };
+ };
+
poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_LOW>;
--
2.16.2
On 02/19/2018 01:16 PM, Tomasz Maciej Nowak wrote:
> Adds device nodes for two front panel LEDs.
Why do you need to change the pinmux settings? Configuring a pin as a
GPIO should override any pinmux special function selection and hence
make it irrelevant, so I don't think you should need to change the pinmux.
W dniu 20.02.2018 o 20:55, Stephen Warren pisze:
> On 02/19/2018 01:16 PM, Tomasz Maciej Nowak wrote:
>> Adds device nodes for two front panel LEDs.
>
> Why do you need to change the pinmux settings? Configuring a pin as a
> GPIO should override any pinmux special function selection and hence
> make it irrelevant, so I don't think you should need to change the pinmux.
At first I did exactly that without changing the pinmux, but the LEDs
didn't light up. After that I compared with CompuLab source tree [1].
The pinmux was specified as in my patch. With this change the LEDs are
fully functional.
1.
https://gitorious.org/trimslice-kernel/trimslice-kernel?p=trimslice-kernel:trimslice-kernel.git;a=blob;f=arch/arm/mach-tegra/board-trimslice-pinmux.c;h=cc6d5225d97eb9327c820bf1d5b2bc16ab8c6dda;hb=d25bf45d6314089489b30d218ed8a0d6d94417f9#l45
--
Tomek
On 02/21/2018 09:20 AM, Tomasz Maciej Nowak wrote:
> W dniu 20.02.2018 o 20:55, Stephen Warren pisze:
>> On 02/19/2018 01:16 PM, Tomasz Maciej Nowak wrote:
>>> Adds device nodes for two front panel LEDs.
>>
>> Why do you need to change the pinmux settings? Configuring a pin as a
>> GPIO should override any pinmux special function selection and hence
>> make it irrelevant, so I don't think you should need to change the
>> pinmux.
>
> At first I did exactly that without changing the pinmux, but the LEDs
> didn't light up. After that I compared with CompuLab source tree [1].
> The pinmux was specified as in my patch. With this change the LEDs are
> fully functional.
>
> 1.
> https://gitorious.org/trimslice-kernel/trimslice-kernel?p=trimslice-kernel:trimslice-kernel.git;a=blob;f=arch/arm/mach-tegra/board-trimslice-pinmux.c;h=cc6d5225d97eb9327c820bf1d5b2bc16ab8c6dda;hb=d25bf45d6314089489b30d218ed8a0d6d94417f9#l45
Oh I see. Your patch isn't changing the pinmux function selection but
the other configuration bits, which are relevant even when the pin is in
GPIO mode. In particular, it clears the tristate bit for the dte
pingroup. That makes perfect sense.