Message ID | 20180321105005.18426-3-u.kleine-koenig@pengutronix.de |
---|---|
State | New |
Headers | show |
Series | [1/3] arm64: dts: marvell: armada-37xx: mark the gpio controllers as irq controller | expand |
On Wed, Mar 21, 2018 at 11:50:05AM +0100, Uwe Kleine-König wrote: > The led is connected to MPP1_2. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- > Note the LED doesn't work for me on two different boards. Do you have a board it does work with? > But the voltage levels on one side of the LED changes from 1.76V to > 0V when enabling the LED. So there is probably something fishy, > don't know if it is hardware or software related. I think we should not apply this patch until we get a better idea why it does not work. Is 1.76V not enough? Is the LED mounted the wrong way around? Not enough current? Andrew
On Wed, Mar 21, 2018 at 02:19:30PM +0100, Andrew Lunn wrote: > On Wed, Mar 21, 2018 at 11:50:05AM +0100, Uwe Kleine-König wrote: > > The led is connected to MPP1_2. > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > --- > > Note the LED doesn't work for me on two different boards. > > Do you have a board it does work with? No, it doesn't work anywhere. > > > But the voltage levels on one side of the LED changes from 1.76V to > > 0V when enabling the LED. So there is probably something fishy, > > don't know if it is hardware or software related. > > I think we should not apply this patch until we get a better idea why > it does not work. Ack. I hoped to get some feedback about this issue. > Is 1.76V not enough? Is the LED mounted the wrong way around? Not > enough current? There is another LED on the board called LED3 that is connected between 12V and ground with a R1k that is very bright. It looks identical to the non-working LED2 which is connected between 1.8V and MPP1_2 with R100. But there is no BOM available that would tell if the led parts are different. With no PSU connected I can make LED1 and LED3 light up with my multimeter, but not LED2. I'll try to contact globalscale and ask there. Best regards Uwe
Hi Uwe, On mer., mars 21 2018, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > The led is connected to MPP1_2. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- > Note the LED doesn't work for me on two different boards. But the > voltage levels on one side of the LED changes from 1.76V to 0V when > enabling the LED. So there is probably something fishy, don't know if it > is hardware or software related. Initially I thought that maybe you should use the "led" function for it. But this function is only available for pin 11 to 14 not for pin 2. Another tricky thing is that the pin controller for Armada 37xx really work on groups: you can't only change the function of a single pin. But the pin 2 is linked to pin 3 and they have as alternate function "i2c" which is not used for the espressobin. Moreover you seemed to managed to controller the pin. So I have no more ideas for this issue. At least according to the datasheet, there is no way to control the behavior of the pin (pull-up, pull-don, open-drain, ...). It is only the pin 11 to 14 which can be put in Open-Drain if they use the function "led". Gregory > > Best regards > Uwe > --- > arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts > index a88f053d2f28..0802d595e0a2 100644 > --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts > +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts > @@ -77,6 +77,15 @@ > 3300000 0x0>; > enable-active-high; > }; > + > + leds { > + compatible = "gpio-leds"; > + > + led2 { > + gpios = <&gpionb 2 GPIO_ACTIVE_LOW>; > + linux,default-trigger = "heartbeat"; > + }; > + }; > }; > > /* J9 */ > -- > 2.16.2 >
Hello! It is old thread, but I have final results about this issue. On Wednesday 21 March 2018 15:06:16 Uwe Kleine-König wrote: > On Wed, Mar 21, 2018 at 02:19:30PM +0100, Andrew Lunn wrote: > > On Wed, Mar 21, 2018 at 11:50:05AM +0100, Uwe Kleine-K?nig wrote: > > > The led is connected to MPP1_2. > > > > > > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de> > > > --- > > > Note the LED doesn't work for me on two different boards. > > > > Do you have a board it does work with? > > No, it doesn't work anywhere. > > > > > But the voltage levels on one side of the LED changes from 1.76V to > > > 0V when enabling the LED. So there is probably something fishy, > > > don't know if it is hardware or software related. > > > > I think we should not apply this patch until we get a better idea why > > it does not work. > > Ack. I hoped to get some feedback about this issue. > > > Is 1.76V not enough? Is the LED mounted the wrong way around? Not > > enough current? > > There is another LED on the board called LED3 that is connected between > 12V and ground with a R1k that is very bright. It looks identical to the > non-working LED2 which is connected between 1.8V and MPP1_2 with R100. > But there is no BOM available that would tell if the led parts are > different. > > With no PSU connected I can make LED1 and LED3 light up with my > multimeter, but not LED2. > > I'll try to contact globalscale and ask there. I contacted globalscale about this issue and I got answer that the led2 on EspressoBin v5 can't be turn on, because of the LED2 vcc use 1.8v, the voltage is too low to drive the led2. So it basically answers why that led was not working on any tested EspressoBin (V5) board. Also I was told that this hw bug was fixed in EpressoBin v7 revision and MPP1_2 can be used to control LED2. So Uwe's patch should be useful for EspressoBin v7 DTS file. On V5 is LED2 nonworking. Just to note that LED1 is working fine on EspressoBin V5, it is controlled by mPCIe card via wlan led pin. So e.g. wifi card which has supported wlan led driver (e.g. ath9k_pci) can power LED1 on/off.
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts index a88f053d2f28..0802d595e0a2 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts @@ -77,6 +77,15 @@ 3300000 0x0>; enable-active-high; }; + + leds { + compatible = "gpio-leds"; + + led2 { + gpios = <&gpionb 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + }; + }; }; /* J9 */
The led is connected to MPP1_2. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- Note the LED doesn't work for me on two different boards. But the voltage levels on one side of the LED changes from 1.76V to 0V when enabling the LED. So there is probably something fishy, don't know if it is hardware or software related. Best regards Uwe --- arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 9 +++++++++ 1 file changed, 9 insertions(+)