From: sashiko-bot@kernel.org
To: "Fil Dunsky" <filipp.dunsky@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 2/3] ARM: dts: cortina: Enable Almond+ board peripherals
Date: Sat, 05 Dec 2026 20:08:46 +0000 [thread overview]
Message-ID: <sashiko-outbox-251878@kernel.org> (raw)
In-Reply-To: <20261205-b4-cs7542-peripherals-dts-v4-2-f4e93d42533a@gmail.com>
Thank you for your contribution! Sashiko AI review found 7 potential
issues to consider:
- [High] ARM: dts: cortina: uncoordinated shared PCIe PERST# GPIO92
breaks pcie1
- [Medium] ARM: dts: cortina: ethaddr offset -1 breaks Ethernet probe on
:00 MACs
- [Medium] ARM: dts: cortina: pinctrl hogs omit probe ordering for keys
and UARTs
- [Medium] ARM: dts: cortina: missing GPIO pinmux state for touchscreen
IRQ gpio156
- [Low] ARM: dts: cortina: duplicate pinctrl override block in Almond+
DTS
- [Low] ARM: dts: cortina: undocumented compatible pci168c,003c on
ath10k node
- [Low] ARM: dts: cortina: out-of-order unit addresses in cal
nvmem-layout
--
commit 9a0f6ed0467de1ffec33e5b7f7a05708aa49f484
Author: Fil Dunsky <filipp.dunsky@gmail.com>
ARM: dts: cortina: Enable Almond+ board peripherals
This commit enables the onboard peripherals for the Securifi Almond+
board, including NAND partitions and NVMEM calibration cells, PCIe
endpoints, the QCA8337 switch and Ethernet GMACs, touchscreen, reset
button, auxiliary UARTs, and ramoops reserved memory.
> diff --git a/arch/arm/boot/dts/cortina/cs7542-securifi-almondplus.dts b/arch/arm/boot/dts/cortina/cs7542-securifi-almondplus.dts
> index 2da3645927f61..81c6390f67846 100644
> --- a/arch/arm/boot/dts/cortina/cs7542-securifi-almondplus.dts
> +++ b/arch/arm/boot/dts/cortina/cs7542-securifi-almondplus.dts
[ ... ]
> @@ -29,14 +47,335 @@ reserved-memory {
[ ... ]
> +&pinctrl {
> + pinctrl-names = "default";
> + pinctrl-0 = <&reset_pins &aux_uarts_pins>;
> +
> + reset_pins: reset-pins {
> + function = "gpio";
> + pins = "gpio37";
> + };
> +
> + aux_uarts_pins: aux-uarts-pins {
> + function = "uart";
> + pins = "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77";
> + };
> +};
[Severity: Medium]
Should reset_pins and aux_uarts_pins be referenced from pinctrl-0 on the
keys and uart1-uart3 consumer nodes instead of hogged on &pinctrl?
Because PINCTRL_CS7542 is tristate, hogging these pins on &pinctrl drops
the supplier dependency for gpio-keys and the auxiliary UARTs, so they
can probe and operate before pinctrl-cs7542 has muxed their pins.
Attaching pinctrl-0 to the consumers, as done for &pcie0, lets the
driver core defer them until their pins are configured.
> +&i2c {
> + clock-frequency = <400000>;
> +
> + status = "okay";
> +
> + touchscreen@48 {
> + compatible = "semtech,sx8650";
> + reg = <0x48>;
> + interrupt-parent = <&gpio4>;
> + interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
> + };
> +};
[Severity: Medium]
Does touchscreen@48 need a pinctrl-0 state muxing gpio156 (gpio4 line 28)
to GPIO mode?
gpio-cs75xx does not configure pin muxing and cs7542.dtsi defines no
gpio-ranges, so unlike gpio37 and gpio92, this interrupt line relies on
the bootloader having pre-muxed it. If firmware leaves gpio156 in its
peripheral function, touchscreen interrupts will silently fail to fire.
[ ... ]
> + nvmem-layout {
> + compatible = "fixed-layout";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + macaddr_ath9k: macaddr@1002 {
> + reg = <0x1002 0x6>;
> + };
> +
> + cal_ath9k: cal@1000 {
> + reg = <0x1000 0x440>;
> + };
> +
> + cal_ath10k: cal@5000 {
> + reg = <0x5000 0x844>;
> + };
> + };
[Severity: Low]
Minor DT style nit: cal@1000 should be ordered before macaddr@1002 so
sibling nodes are sorted by ascending unit address.
[ ... ]
> +&pcie0 {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pcie0_reset_pins>;
> +};
> +
> +&pcie0_port {
> + /* GPIO92 resets both Wi-Fi endpoints; only this port owns it. */
> + reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
> +
> + wifi@0,0 {
> + compatible = "pci168c,003c";
> + reg = <0 0 0 0 0>;
> + nvmem-cells = <&cal_ath10k>;
> + nvmem-cell-names = "calibration";
> + };
> +};
[Severity: Low]
Is "pci168c,003c" documented in the Devicetree bindings?
Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml currently
only lists qcom,ath10k, qcom,ipq4019-wifi, and qcom,wcn3990-wifi, so this
node and its nvmem-cells properties will fail dtbs_check unless the PCI
compatible is added to the binding.
> +&pcie1 {
> + status = "okay";
> +};
> +
> +&pcie1_port {
> + wifi@0,0 {
> + compatible = "pci168c,0033";
> + reg = <0 0 0 0 0>;
> + nvmem-cells = <&macaddr_ath9k>, <&cal_ath9k>;
> + nvmem-cell-names = "mac-address", "calibration";
> + };
> +};
[Severity: High]
Can giving exclusive ownership of the shared PERST# line (GPIO92) to
&pcie0_port break &pcie1?
Because &pcie1 declares no reset-gpios or dependency on gpio2, pinctrl,
or &pcie0, pcie1 can probe first when GPIO_CS75XX or PINCTRL_CS7542
probes later. When pcie0 then probes, cortina_pcie_parse_port()
requests GPIO92 with GPIOD_OUT_HIGH, asserting PERST# across pcie0 init.
That resets the live AR9580 endpoint and fires INT_LINK_DOWN in
cortina_pcie_irq_handler(), permanently latching cp->link_lost and
clearing APP_INT_ENABLE until pcie1 is reprobed. If GPIO92 starts
asserted instead, pcie1 fails link training before pcie0 releases it.
pcie0 probe failure, remove, or out-of-order shutdown also re-asserts
GPIO92 via gpiod_set_value_cansleep(cp->port.perst, 1), holding pcie1's
endpoint in reset while ath9k is active. Both ports need shared,
refcounted reset coordination rather than exclusive ownership on
&pcie0_port.
[ ... ]
> +&gmac0 {
> + status = "okay";
> + /* The QCA8337 CPU port supplies the internal RX and TX delays. */
> + phy-mode = "rgmii-id";
> + nvmem-cells = <ðaddr 0>;
> + nvmem-cell-names = "mac-address";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + };
> +};
> +
> +&gmac1 {
> + status = "okay";
> + /* The QCA8337 CPU port supplies the internal RX and TX delays. */
> + phy-mode = "rgmii-id";
> + nvmem-cells = <ðaddr (-1)>;
> + nvmem-cell-names = "mac-address";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + };
> +};
[Severity: Medium]
Will nvmem-cells = <ðaddr (-1)> break Ethernet probe on boards whose
factory ethaddr ends in 0x00?
u_boot_env_read_post_process_ethaddr() calls 48-bit eth_addr_add(), so
subtracting 1 from a :00 MAC borrows from byte 4. gmac0 and gmac1 then
differ in their first five bytes, causing cs_ne_cache_addresses() to
fail cs_ne_probe() with -EINVAL and leaving wired Ethernet unprobed.
Passing (-1) in DT also relies on unsigned 0xffffffff wrapping to signed
int in of_nvmem_cell_get().
> +&pinctrl {
> + pcie0_reset_pins: pcie0-reset-pins {
> + function = "gpio";
> + pins = "gpio92";
> + };
> +};
[Severity: Low]
This isn't a bug, but &pinctrl is already opened earlier in this file;
merging pcie0_reset_pins into the first &pinctrl block would keep all
board pinmux nodes in one place.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-b4-cs7542-peripherals-dts-v4-0-f4e93d42533a@gmail.com?part=2
next prev parent reply other threads:[~2026-12-05 20:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 19:51 [PATCH v4 0/3] ARM: dts: cortina: Enable CS7542 Almond+ peripherals Fil Dunsky via B4 Relay
2026-12-05 19:51 ` [PATCH v4 1/3] ARM: dts: cortina: Describe CS7542 peripheral controllers Fil Dunsky via B4 Relay
2026-12-05 20:08 ` sashiko-bot
2026-12-05 19:51 ` [PATCH v4 2/3] ARM: dts: cortina: Enable Almond+ board peripherals Fil Dunsky via B4 Relay
2026-12-05 20:08 ` sashiko-bot [this message]
2026-12-05 19:51 ` [PATCH v4 3/3] ARM: multi_v7_defconfig: Enable CS7542 " Fil Dunsky via B4 Relay
2026-12-05 20:03 ` sashiko-bot
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=sashiko-outbox-251878@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=filipp.dunsky@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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