linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Da Xue <da@lessconfused.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>, Da Xue <da.xue@libretech.co>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-amlogic@lists.infradead.org
Subject: Re: [PATCH 2/2] arm64: dts: amlogic: add libretech cottonwood support
Date: Wed, 4 Oct 2023 21:33:00 +0800	[thread overview]
Message-ID: <CACdvmAhVODCikHMVpX91kBRxZi=7hgrR2Q-_71mFf9OVdptTWQ@mail.gmail.com> (raw)
In-Reply-To: <1jleciyahv.fsf@starbuckisacylon.baylibre.com>

On Wed, Oct 4, 2023 at 5:59 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
>
> On Wed 04 Oct 2023 at 11:20, Neil Armstrong <neil.armstrong@linaro.org> wrote:
>
> > On 02/10/2023 16:10, Jerome Brunet wrote:
> >> Add support for the Libretech cottonwood board family.
> >> These 2 boards are based on the same PCB, with an RPi B form factor.
> >> The "Alta" board uses an a311d while the "Solitude" variant uses an
> >> s905d3.
> >> Co-developed-by: Da Xue <da.xue@libretech.co>
> >> Signed-off-by: Da Xue <da.xue@libretech.co>
> >> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> >> ---
> >>   arch/arm64/boot/dts/amlogic/Makefile          |   2 +
> >>   .../amlogic/meson-g12b-a311d-libretech-cc.dts | 133 ++++
> >>   .../amlogic/meson-libretech-cottonwood.dtsi   | 610 ++++++++++++++++++
> >>   .../amlogic/meson-sm1-s905d3-libretech-cc.dts |  89 +++
> >>   4 files changed, 834 insertions(+)
> >>   create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-a311d-libretech-cc.dts
> >>   create mode 100644 arch/arm64/boot/dts/amlogic/meson-libretech-cottonwood.dtsi
> >>   create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-s905d3-libretech-cc.dts
> >>
> >
> > <snip>
> >
> >> +
> >> +    leds-pwm {
> >> +            compatible = "pwm-leds";
> >> +
> >> +            led-green {
> >> +                    color = <LED_COLOR_ID_GREEN>;
> >> +                    function = LED_FUNCTION_STATUS;
> >> +                    linux,default-trigger = "default-on";
> >> +                    panic-indicator;
> >> +                    max-brightness = <255>;
> >> +                    pwms = <&pwm_cd 1 1250 0>;
> >> +                    active-low;
> >> +            };
> >> +
> >> +            led-blue {
> >> +                    color = <LED_COLOR_ID_BLUE>;
> >> +                    function = LED_FUNCTION_ACTIVITY;
> >> +                    linux,default-trigger = "activity";
> >
> > "activity" isn't documented, perhaps heartbeat instead ?
> >
>
> The trigger does exist though. The other way is to extend the DT doc.
> I don't really care one way or the other

We can and should use heartbeat to both be consistent and also show
Linux has started for developers.

>
> I'll defer to Da on this one
>
> >> +                    max-brightness = <255>;
> >> +                    pwms = <&pwm_ab 1 1250 0>;
> >> +                    active-low;
> >> +            };
> >
> > leds subnodes should be named as led(-[0-9a-f]+)
> >
> > see Documentation/devicetree/bindings/leds/leds-pwm.yaml
>
> That I do care. The schematics refer to the leds by name. There is no
> number assigned, much less hex. Making one up makes no sense.
>
> User should be able to quickly (and easily) link  what they see in the
> schematics with DT.
>
> So I'd prefer to submit a change for the regex rather than changing this

I don't get why the LEDs should be hex either. It's contradictory to
https://www.kernel.org/doc/html/latest/leds/leds-class.html

I did a simple grep and didn't find any references to
LED_COLOR_ID_ORANGE. We can debug this later.

>
> >
> >> +    };
> >> +
> >> +    leds-gpio {
> >> +            compatible = "gpio-leds";
> >> +
> >> +            led-orange {
> >> +                    color = <LED_COLOR_ID_AMBER>;
> >> +                    function = LED_FUNCTION_STANDBY;
> >> +                    gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
> >> +            };
> >
> > Ditto, but you can simply use "led" since it's the only one.
> >
> > See Documentation/devicetree/bindings/leds/leds-gpio.yaml
> >
> > Neil
> >
> >
> > <snip>
>
>
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2023-10-04 13:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 14:10 [PATCH 0/2] arm64: dts: amlogic: add libretech cottonwood support Jerome Brunet
2023-10-02 14:10 ` [PATCH 1/2] dt-bindings: arm: " Jerome Brunet
2023-10-02 19:28   ` Conor Dooley
2023-10-02 14:10 ` [PATCH 2/2] arm64: dts: " Jerome Brunet
2023-10-02 16:45   ` Neil Armstrong
2023-10-02 18:57     ` Jerome Brunet
2023-10-02 21:15       ` Da Xue
2023-10-03  1:23         ` Christian Hewitt
2023-10-03  7:21           ` Jerome Brunet
2023-10-03  7:38             ` Neil Armstrong
2023-10-04 10:03         ` Jerome Brunet
2023-10-03  7:35       ` Neil Armstrong
2023-10-05  9:42         ` Jerome Brunet
2023-10-05 10:04           ` Neil Armstrong
2023-10-06  8:21             ` Jerome Brunet
2023-10-06  8:32               ` Neil Armstrong
2023-10-06  9:52                 ` Jerome Brunet
2023-10-04  9:20   ` Neil Armstrong
2023-10-04  9:49     ` Jerome Brunet
2023-10-04 13:33       ` Da Xue [this message]
2023-10-06 11:38 ` (subset) [PATCH 0/2] " neil.armstrong

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='CACdvmAhVODCikHMVpX91kBRxZi=7hgrR2Q-_71mFf9OVdptTWQ@mail.gmail.com' \
    --to=da@lessconfused.com \
    --cc=conor+dt@kernel.org \
    --cc=da.xue@libretech.co \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh+dt@kernel.org \
    /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).