Aw: Re: [PATCH v3 10/13] arm64: dts: mediatek: mt7988a-bpi-r4: add gpio leds
From: Frank Wunderlich
Date: Wed Jun 11 2025 - 06:36:20 EST
Hi
> Gesendet: Mittwoch, 11. Juni 2025 um 11:33
> Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@xxxxxxxxxxxxx>
> Betreff: Re: [PATCH v3 10/13] arm64: dts: mediatek: mt7988a-bpi-r4: add gpio leds
>
> Il 08/06/25 23:14, Frank Wunderlich ha scritto:
> > From: Frank Wunderlich <frank-w@xxxxxxxxxxxxxxx>
> >
> > Bananapi R4 has a green and a blue led which can be switched by gpio.
> > Green led is for running state so default on.
> >
> > Green led also shares pin with eeprom writeprotect where led off allows
> > writing to eeprom.
>
> This is extremely ugly from a hardware perspective and I'm sad to see such
> a thing here.
i know, but cannot change this...found this out while testing the eeprom...
where uboot allows the writing of eeprom currently without having this pin configured, linux does not and require green-led switch off.
> Though, I don't see any other solution, so I can only give you an advice:
> don't ever write to the eeprom from the kernel. Things will eventually go
> south otherwise.
>
> I would also advise to add a read-only property to the eeprom node.
the eeprom is empty from factory, but can be used to store e.g. mac-adress which are random by default.
i tested a bit with tlv_eeprom command in uboot and some additional patches to archive this.
imho green-led as running indicator on (=write-protect of eeprom) is a good solution
=> readonly by default, but allowing to write it if user is really sure :)
> Regardless (and sadly),
>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
Thanks for your opinion and RB
regards Frank