Skip to content

Commit

Permalink
DT: bcm2712: override supports-cqe to a cell
Browse files Browse the repository at this point in the history
We want to be able to control the interop surface exposed by Command
Queueing across bcm2712 products to a more restrictive default, with
selectable disable and permissive behaviour.

Changing the bool to a cell lets it relay a tristate value.

Also add the override parameter to CM5 as CM5-lite may interface with
arbitrary eMMC or SD cards.

(Reimplemented on 6.12 - bcm2712 dts now has a downstream/upstream split.)

Signed-off-by: Jonathan Bell <[email protected]>
  • Loading branch information
P33M authored and pelwell committed Jan 10, 2025
1 parent 23b2029 commit 47a5106
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
11 changes: 8 additions & 3 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,14 @@ Params:
non-lite SKU of CM4).
(default "on")

sd_cqe Set to "off" to disable Command Queueing if you
have an incompatible Class A2 SD card
(Pi 5 only, default "on")
sd_cqe Modify Command Queuing behaviour on the main SD
interface. Legal values are:
0: disable CQ
1: allow CQ for known-good SD A2 cards, and all
eMMC cards
2: allow CQ for all SD A2 cards that aren't
known-bad, and all eMMC cards.
(2712 only, default "1")

sd_overclock Clock (in MHz) to use when the MMC framework
requests 50MHz
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/broadcom/bcm2712-ds.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@
clocks = <&clk_emmc2>;
sdhci-caps-mask = <0x0000C000 0x0>;
sdhci-caps = <0x0 0x0>;
supports-cqe;
supports-cqe = <1>;
mmc-ddr-3_3v;
status = "disabled";
};
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ dpi_16bit_gpio2: &rp1_dpi_16bit_gpio2 { };
sd-uhs-sdr50;
sd-uhs-ddr50;
sd-uhs-sdr104;
supports-cqe;
supports-cqe = <1>;
cd-gpios = <&gio_aon 5 GPIO_ACTIVE_LOW>;
//no-1-8-v;
status = "okay";
Expand Down Expand Up @@ -703,7 +703,7 @@ spi10_cs_pins: &spi10_cs_gpio1 {};

/ {
__overrides__ {
sd_cqe = <&sdio1>, "supports-cqe?";
sd_cqe = <&sdio1>, "supports-cqe:0";
};
};

Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ dpi_16bit_gpio2: &rp1_dpi_16bit_gpio2 { };
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
broken-cd;
supports-cqe;
supports-cqe = <1>;
status = "okay";
};

Expand Down Expand Up @@ -710,5 +710,6 @@ spi10_cs_pins: &spi10_cs_gpio1 {};
<&ant2>, "output-low?=on";
noanthogs = <&ant1>,"status=disabled",
<&ant2>, "status=disabled";
sd_cqe = <&sdio1>, "supports-cqe:0";
};
};

0 comments on commit 47a5106

Please sign in to comment.