These patches were generated from: https://github.com/raspberrypi/linux/commits/rpi-6.12.y With the following command: git format-patch -N v6.12.27..HEAD (HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e) Exceptions: - (def)configs patches - github workflows patches - applied & reverted patches - readme patches - wireless patches Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
From 672715d5c4d5da3b77ea8b0c31961052ee355c33 Mon Sep 17 00:00:00 2001
|
|
From: Richard Oliver <richard.oliver@raspberrypi.com>
|
|
Date: Tue, 25 Feb 2025 15:27:59 +0000
|
|
Subject: [PATCH] spi: rp2040-gpio-bridge: probe: Cfg fast_xfer clk
|
|
|
|
Fast transfer mode requires that the first bit of data is clocked with a
|
|
rising edge. This can cause extra bits of data to be clocked on hardware
|
|
where the clock signal uses a pull-up. This change ensures that clk is
|
|
driven low before fast data transfer mode is entered.
|
|
|
|
Signed-off-by: Richard Oliver <richard.oliver@raspberrypi.com>
|
|
---
|
|
drivers/spi/spi-rp2040-gpio-bridge.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/spi/spi-rp2040-gpio-bridge.c
|
|
+++ b/drivers/spi/spi-rp2040-gpio-bridge.c
|
|
@@ -617,7 +617,6 @@ static int rp2040_gbdg_fast_xfer(struct
|
|
&clock_mux);
|
|
|
|
gpiod_direction_output(priv_data->fast_xfer_gpios->desc[0], 1);
|
|
- gpiod_direction_output(priv_data->fast_xfer_gpios->desc[1], 0);
|
|
|
|
rp2040_gbdg_rp1_calc_offsets(priv_data->fast_xfer_data_index,
|
|
&data_bank, &data_offset);
|
|
@@ -989,6 +988,11 @@ static void rp2040_gbdg_parse_dt(struct
|
|
goto node_put;
|
|
}
|
|
|
|
+ /*
|
|
+ * fast_xfer mode requires first data bit to be clocked on a rising
|
|
+ * edge. Configure as output-low here before fast_xfer mode is entered.
|
|
+ */
|
|
+ gpiod_direction_output(rp2040_gbdg->fast_xfer_gpios->desc[1], 0);
|
|
node_put:
|
|
if (of_args[0].np)
|
|
of_node_put(of_args[0].np);
|