devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@codeconstruct.com.au>
To: Tomer Maimon <tmaimon77@gmail.com>,
	robh+dt@kernel.org,  krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, avifishman70@gmail.com,
	 tali.perry1@gmail.com, joel@jms.id.au, venture@google.com,
	yuenn@google.com,  benjaminfair@google.com
Cc: openbmc@lists.ozlabs.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] arm64: dts: nuvoton: npcm845-evb: Add peripheral nodes
Date: Wed, 10 Sep 2025 17:26:31 +0930	[thread overview]
Message-ID: <f516f2021e9b1c541575c5f317037873fa2c730a.camel@codeconstruct.com.au> (raw)
In-Reply-To: <20250908125938.3584927-3-tmaimon77@gmail.com>

On Mon, 2025-09-08 at 15:59 +0300, Tomer Maimon wrote:
> Enable peripheral support for the Nuvoton NPCM845 Evaluation Board by
> adding device nodes for Ethernet controllers, MMC controller, SPI
> controllers, USB device controllers, random number generator, ADC,
> PWM-FAN controller, I2C controllers, and PECI interface.
> Include MDIO nodes for Ethernet PHYs, reserved memory for TIP, and
> aliases for device access.
> 
> Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
> ---
>  .../boot/dts/nuvoton/nuvoton-npcm845-evb.dts  | 439
> ++++++++++++++++++
>  1 file changed, 439 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts
> b/arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts
> index 2638ee1c3846..145a2e599600 100644
> --- a/arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts
> +++ b/arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts
> @@ -10,6 +10,42 @@ / {
>  
>         aliases {
>                 serial0 = &serial0;
> +               ethernet1 = &gmac1;
> +               ethernet2 = &gmac2;
> +               ethernet3 = &gmac3;
> +               mdio-gpio0 = &mdio0;
> +               mdio-gpio1 = &mdio1;
> +               fiu0 = &fiu0;
> +               fiu1 = &fiu3;
> +               fiu2 = &fiux;
> +               fiu3 = &fiu1;
> +               i2c0 = &i2c0;
> +               i2c1 = &i2c1;
> +               i2c2 = &i2c2;
> +               i2c3 = &i2c3;
> +               i2c4 = &i2c4;
> +               i2c5 = &i2c5;
> +               i2c6 = &i2c6;
> +               i2c7 = &i2c7;
> +               i2c8 = &i2c8;
> +               i2c9 = &i2c9;
> +               i2c10 = &i2c10;
> +               i2c11 = &i2c11;
> +               i2c12 = &i2c12;
> +               i2c13 = &i2c13;
> +               i2c14 = &i2c14;
> +               i2c15 = &i2c15;
> +               i2c16 = &i2c16;
> +               i2c17 = &i2c17;
> +               i2c18 = &i2c18;
> +               i2c19 = &i2c19;
> +               i2c20 = &i2c20;
> +               i2c21 = &i2c21;
> +               i2c22 = &i2c22;
> +               i2c23 = &i2c23;
> +               i2c24 = &i2c24;
> +               i2c25 = &i2c25;
> +               i2c26 = &i2c26;
>         };
>  
>         chosen {
> @@ -25,12 +61,415 @@ refclk: refclk-25mhz {
>                 clock-frequency = <25000000>;
>                 #clock-cells = <0>;
>         };
> +
> +       reserved-memory {
> +               #address-cells = <2>;
> +               #size-cells = <2>;
> +               ranges;
> +
> +               tip_reserved: tip@0 {
> +                       reg = <0x0 0x0 0x0 0x6200000>;
> +               };
> +       };
> +
> +       mdio0: mdio-0 {
> +               compatible = "virtual,mdio-gpio";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>,
> +                       <&gpio1 26 GPIO_ACTIVE_HIGH>;
> +
> +               phy0: ethernet-phy@0 {
> +                       reg = <0>;
> +               };
> +       };
> +
> +       mdio1: mdio-1 {
> +               compatible = "virtual,mdio-gpio";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>,
> +                       <&gpio2 28 GPIO_ACTIVE_HIGH>;
> +
> +               phy1: ethernet-phy@0 {
> +                       reg = <0>;
> +               };
> +       };
> +};

By contrast to ordering the DTSI nodes by unit address, for the
referenced nodes that follow here in the DTS, can you please order them
alphabetically? Ordering them by unit address is allowed by the DTS
style guide, but is super tedious to verify. Alphabetical ordering is
also allowed and is straight-forward to enforce:

https://docs.kernel.org/devicetree/bindings/dts-coding-style.html#order-of-nodes

Cheers,

Andrew

> +
> +&gmac1 {
> +       phy-mode = "rgmii-id";
> +       snps,eee-force-disable;
> +       status = "okay";
> +};
> +
> +&gmac2 {
> +       phy-mode = "rmii";
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&r1_pins
> +                       &r1oen_pins>;
> +       phy-handle = <&phy0>;
> +       status = "okay";
> +};
> +
> +&gmac3 {
> +       phy-mode = "rmii";
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&r2_pins
> +                       &r2oen_pins>;
> +       phy-handle = <&phy1>;
> +       status = "okay";
>  };
>  
>  &serial0 {
>         status = "okay";
>  };
>  
> +&fiu0 {

*snip*

  reply	other threads:[~2025-09-10  7:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08 12:59 [PATCH v2 0/2] arm64: dts: nuvoton: Add NPCM845 SoC and EVB support Tomer Maimon
2025-09-08 12:59 ` [PATCH v2 1/2] arm64: dts: nuvoton: npcm845: Add peripheral nodes Tomer Maimon
2025-09-10  7:52   ` Andrew Jeffery
2025-09-21 15:56     ` Tomer Maimon
2025-09-22  3:51       ` Andrew Jeffery
2025-09-08 12:59 ` [PATCH v2 2/2] arm64: dts: nuvoton: npcm845-evb: " Tomer Maimon
2025-09-10  7:56   ` Andrew Jeffery [this message]
2025-09-10  8:04 ` [PATCH v2 0/2] arm64: dts: nuvoton: Add NPCM845 SoC and EVB support Andrew Jeffery

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=f516f2021e9b1c541575c5f317037873fa2c730a.camel@codeconstruct.com.au \
    --to=andrew@codeconstruct.com.au \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=robh+dt@kernel.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.com \
    --cc=yuenn@google.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).