All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Thomas Gerner" <thomas.gerner@muenchen-mail.de>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v3] Enable wifi on the BeagleV-Ahead
Date: Thu, 14 May 2026 19:42:22 +0000	[thread overview]
Message-ID: <20260514194223.2F67CC2BCB7@smtp.kernel.org> (raw)
In-Reply-To: <20260514144836.50101-1-thomas.gerner@muenchen-mail.de>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] The `host-wake` interrupt pin is configured with `input-schmitt-disable`, which makes it susceptible to noise and false interrupts.
- [Medium] The pinctrl for the Wi-Fi `reg-on` GPIO is incorrectly assigned to the SDIO host (`&sdio1`) instead of the power sequence provider (`brcmf_pwrseq`).
- [Low] The power sequence node uses a non-generic name (`brcmf-pwrseq`), violating Devicetree naming guidelines.
--

commit aef7ec6dc80f633bb4abb51e59f66c088fa8d55f
Author: Thomas Gerner <thomas.gerner@muenchen-mail.de>

Enable wifi on the BeagleV-Ahead

This commit enables the AP6203BM WiFi chip on the BeagleV-Ahead board by
adding the necessary device tree nodes. It sets up the SDIO interface,
pin configurations, and power sequence for the wireless module.

> diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
> --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
> +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
[ ... ]
> @@ -86,6 +86,11 @@ hdmi_con_in: endpoint {
>  			};
>  		};
>  	};
> +
> +	brcmf_pwrseq: brcmf-pwrseq {

This isn't a bug, but should this node use a generic name like wifi-pwrseq
instead of the vendor-specific brcmf-pwrseq? Section 2.2.2 of the Devicetree
Specification suggests node names should reflect the function of the device.

> +		compatible = "mmc-pwrseq-simple";
> +		reset-gpios = <&gpio2 31 GPIO_ACTIVE_LOW>;	/* WL-REG-ON */
> +	};
>  };
[ ... ]
> @@ -239,6 +244,28 @@ rx-pins {
>  			slew-rate = <0>;
>  		};
>  	};
> +
> +	wifi_pins: wifi-0 {
> +		host-wake-pins {
> +			pins = "GPIO2_25";
> +			function = "gpio";
> +			bias-disable;
> +			drive-strength = <1>;
> +			input-enable;
> +			input-schmitt-disable;

Could disabling the Schmitt trigger here cause issues with false interrupts?

The host-wake pin is configured later in this patch as an external,
asynchronous signal triggering on a rising edge (IRQ_TYPE_EDGE_RISING).

Disabling hysteresis removes protection against signal noise and slow
transitions, which might lead to multiple false triggers or interrupt storms
on a single edge.

> +			slew-rate = <0>;
> +		};
> +
> +		reg-on-pins {
> +			pins = "GPIO2_31";
> +			function = "gpio";
> +			bias-disable;
> +			drive-strength = <3>;
> +			input-disable;
> +			input-schmitt-disable;
> +			slew-rate = <0>;
> +		};
> +	};
>  };
[ ... ]
> +&sdio1 {
> +	bus-width = <4>;
> +	max-frequency = <198000000>;
> +	status = "okay";
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	non-removable;
> +	keep-power-in-suspend;
> +
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&wifi_pins>;

Does the reg-on-pins pinctrl configuration need to be assigned to the
brcmf_pwrseq node rather than the sdio1 node?

The mmc-pwrseq-simple device is an independent platform device that
requests and drives the reset-gpios (GPIO2_31) during its own probe
sequence.

By keeping the pinctrl assignment here in the sdio1 node, the power
sequencer might attempt to drive the GPIO before the SDIO host has
multiplexed the pin correctly.

> +	mmc-pwrseq = <&brcmf_pwrseq>;
> +
> +	wifi@1 {
> +		compatible = "cypress,cyw43012-fmac", "brcm,bcm4329-fmac";
> +		reg = <1>;
> +		interrupt-parent = <&gpio2>;
> +		interrupts = <25 IRQ_TYPE_EDGE_RISING>;
> +		interrupt-names = "host-wake";
> +	};
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260514144836.50101-1-thomas.gerner@muenchen-mail.de?part=1

      parent reply	other threads:[~2026-05-14 19:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 14:11 [PATCH] Enable wifi on the BeagleV-Ahead Thomas Gerner
2026-05-11 14:11 ` Thomas Gerner
2026-05-12  5:28 ` sashiko-bot
2026-05-12 17:33 ` Thomas Gerner
2026-05-12 17:33   ` Thomas Gerner
2026-05-12 18:39   ` Shengyu Qu
2026-05-12 18:39     ` Shengyu Qu
2026-05-13 17:38     ` Thomas Gerner
2026-05-13 17:38       ` Thomas Gerner
2026-05-13 23:43   ` sashiko-bot
2026-05-14 14:47   ` [PATCH v3] " Thomas Gerner
2026-05-14 14:47     ` Thomas Gerner
2026-05-14 14:55     ` Krzysztof Kozlowski
2026-05-14 14:55       ` Krzysztof Kozlowski
2026-05-14 18:16       ` Thomas Gerner
2026-05-14 18:16         ` Thomas Gerner
2026-05-14 19:42     ` sashiko-bot [this message]

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=20260514194223.2F67CC2BCB7@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=thomas.gerner@muenchen-mail.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.