* [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART
@ 2018-07-22 21:19 Andreas Färber
2018-07-22 21:20 ` [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed Andreas Färber
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2018-07-22 21:19 UTC (permalink / raw)
To: linux-mips
Cc: Ralf Baechle, Paul Burton, James Hogan, linux-kernel,
Andreas Färber, Rob Herring, devicetree, Mark Brown,
linux-spi, Vinod Koul, dmaengine, Michael Turquette, Stephen Boyd,
linux-clk
Hello,
This patchset enables SPI and UARTs for the Ci40's mikroBUS and Raspberry Pi B+
connectors, as well as the remaining seven LEDs and as dependency the 802.15.4.
I also dug out some related driver fixes from their pistachio-4.9-lede branch:
https://github.com/CreatorDev/linux/commits/pistachio-4.9-lede
Tested with a LoRa click expansion board. [*]
Note that a number of drivers are missing in the pistachio defconfig. This
should probably be remedied as follow-up.
While all creatordev.io websites appear to be gone, I still had a local copy
of the Ci40 schematics document.
This patchset: https://github.com/afaerber/linux/commits/ci40-spi-uart.v1
Some more potential patches for missing features appear to be here:
https://github.com/CreatorDev/linux/commits/pistachio-4.9-wip
Have a lot of fun!
Cheers,
Andreas
P.S. As follow-up to this series I've reported on linux-serial that sc16is7xx
and serdev drivers don't appear to play nicely together:
https://marc.info/?l=linux-serial&m=153228314300681&w=2
[*] Cf. netdev https://patchwork.ozlabs.org/cover/937545/
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Andreas Färber (7):
MIPS: dts: img: pistachio_marduk: Reorder nodes
MIPS: dts: img: pistachio_marduk: Cleanups
MIPS: dts: img: pistachio: Rename spim0-clk pin node label
MIPS: dts: img: pistachio_marduk: Enable SPIM0
MIPS: dts: img: pistachio_marduk: Add 6Lowpan node
MIPS: dts: img: pistachio_marduk: Add SPI UART node
MIPS: dts: img: pistachio_marduk: Add user LEDs
Damien Horsley (1):
dmaengine: img-mdc: Handle early status read
Govindraj Raja (1):
clk: pistachio: Fix wrong SDHost card speed
Ian Pozella (1):
MIPS: dts: img: pistachio_marduk: Switch mmc to 1 bit mode
Ionela Voinescu (5):
spi: img-spfi: Implement dual and quad mode
spi: img-spfi: Set device select bits for SPFI port state
spi: img-spfi: Use device 0 configuration for all devices
spi: img-spfi: RX maximum burst size for DMA is 8
spi: img-spfi: Finish every transfer cleanly
arch/mips/boot/dts/img/pistachio.dtsi | 2 +-
arch/mips/boot/dts/img/pistachio_marduk.dts | 174 ++++++++++++++++++++++------
drivers/clk/pistachio/clk-pistachio.c | 3 +-
drivers/dma/img-mdc-dma.c | 40 ++++---
drivers/spi/spi-img-spfi.c | 165 +++++++++++++++++++++-----
include/dt-bindings/clock/pistachio-clk.h | 1 +
6 files changed, 299 insertions(+), 86 deletions(-)
--
2.16.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
@ 2018-07-22 21:20 ` Andreas Färber
2018-07-25 23:43 ` Stephen Boyd
2018-07-31 21:21 ` Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Andreas Färber @ 2018-07-22 21:20 UTC (permalink / raw)
To: linux-mips
Cc: Ralf Baechle, Paul Burton, James Hogan, linux-kernel,
Govindraj Raja, Andreas Färber, Michael Turquette,
Stephen Boyd, Rob Herring, Mark Rutland, linux-clk, devicetree
From: Govindraj Raja <Govindraj.Raja@imgtec.com>
The SDHost currently clocks the card 4x slower than it
should do, because there is a fixed divide by 4 in the
sdhost wrapper that is not present in the clock tree.
To model this, add a fixed divide by 4 clock node in
the SDHost clock path.
This will ensure the right clock frequency is selected when
the mmc driver tries to configure frequency on card insert.
Signed-off-by: Govindraj Raja <Govindraj.Raja@imgtec.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
drivers/clk/pistachio/clk-pistachio.c | 3 ++-
include/dt-bindings/clock/pistachio-clk.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/pistachio/clk-pistachio.c b/drivers/clk/pistachio/clk-pistachio.c
index c4ceb5eaf46c..1c968d9a6e17 100644
--- a/drivers/clk/pistachio/clk-pistachio.c
+++ b/drivers/clk/pistachio/clk-pistachio.c
@@ -44,7 +44,7 @@ static struct pistachio_gate pistachio_gates[] __initdata = {
GATE(CLK_AUX_ADC_INTERNAL, "aux_adc_internal", "sys_internal_div",
0x104, 22),
GATE(CLK_AUX_ADC, "aux_adc", "aux_adc_div", 0x104, 23),
- GATE(CLK_SD_HOST, "sd_host", "sd_host_div", 0x104, 24),
+ GATE(CLK_SD_HOST, "sd_host", "sd_host_div4", 0x104, 24),
GATE(CLK_BT, "bt", "bt_div", 0x104, 25),
GATE(CLK_BT_DIV4, "bt_div4", "bt_div4_div", 0x104, 26),
GATE(CLK_BT_DIV8, "bt_div8", "bt_div8_div", 0x104, 27),
@@ -54,6 +54,7 @@ static struct pistachio_gate pistachio_gates[] __initdata = {
static struct pistachio_fixed_factor pistachio_ffs[] __initdata = {
FIXED_FACTOR(CLK_WIFI_DIV4, "wifi_div4", "wifi_pll", 4),
FIXED_FACTOR(CLK_WIFI_DIV8, "wifi_div8", "wifi_pll", 8),
+ FIXED_FACTOR(CLK_SDHOST_DIV4, "sd_host_div4", "sd_host_div", 4),
};
static struct pistachio_div pistachio_divs[] __initdata = {
diff --git a/include/dt-bindings/clock/pistachio-clk.h b/include/dt-bindings/clock/pistachio-clk.h
index 039f83facb68..77b92aed241d 100644
--- a/include/dt-bindings/clock/pistachio-clk.h
+++ b/include/dt-bindings/clock/pistachio-clk.h
@@ -21,6 +21,7 @@
/* Fixed-factor clocks */
#define CLK_WIFI_DIV4 16
#define CLK_WIFI_DIV8 17
+#define CLK_SDHOST_DIV4 18
/* Gate clocks */
#define CLK_MIPS 32
--
2.16.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed
2018-07-22 21:20 ` [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed Andreas Färber
@ 2018-07-25 23:43 ` Stephen Boyd
2018-07-31 21:21 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2018-07-25 23:43 UTC (permalink / raw)
To: Andreas Färber, linux-mips
Cc: Ralf Baechle, Paul Burton, James Hogan, linux-kernel,
Govindraj Raja, Andreas Färber, Michael Turquette,
Rob Herring, Mark Rutland, linux-clk, devicetree
Quoting Andreas F=C3=A4rber (2018-07-22 14:20:10)
> From: Govindraj Raja <Govindraj.Raja@imgtec.com>
> =
> The SDHost currently clocks the card 4x slower than it
> should do, because there is a fixed divide by 4 in the
> sdhost wrapper that is not present in the clock tree.
> To model this, add a fixed divide by 4 clock node in
> the SDHost clock path.
> =
> This will ensure the right clock frequency is selected when
> the mmc driver tries to configure frequency on card insert.
> =
> Signed-off-by: Govindraj Raja <Govindraj.Raja@imgtec.com>
> Signed-off-by: Andreas F=C3=A4rber <afaerber@suse.de>
> ---
Acked-by: Stephen Boyd <sboyd@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed
2018-07-22 21:20 ` [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed Andreas Färber
2018-07-25 23:43 ` Stephen Boyd
@ 2018-07-31 21:21 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2018-07-31 21:21 UTC (permalink / raw)
To: Andreas Färber
Cc: linux-mips, Ralf Baechle, Paul Burton, James Hogan, linux-kernel,
Govindraj Raja, Michael Turquette, Stephen Boyd, Mark Rutland,
linux-clk, devicetree
On Sun, Jul 22, 2018 at 11:20:10PM +0200, Andreas Färber wrote:
> From: Govindraj Raja <Govindraj.Raja@imgtec.com>
>
> The SDHost currently clocks the card 4x slower than it
> should do, because there is a fixed divide by 4 in the
> sdhost wrapper that is not present in the clock tree.
> To model this, add a fixed divide by 4 clock node in
> the SDHost clock path.
>
> This will ensure the right clock frequency is selected when
> the mmc driver tries to configure frequency on card insert.
>
> Signed-off-by: Govindraj Raja <Govindraj.Raja@imgtec.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> drivers/clk/pistachio/clk-pistachio.c | 3 ++-
> include/dt-bindings/clock/pistachio-clk.h | 1 +
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/pistachio/clk-pistachio.c b/drivers/clk/pistachio/clk-pistachio.c
> index c4ceb5eaf46c..1c968d9a6e17 100644
> --- a/drivers/clk/pistachio/clk-pistachio.c
> +++ b/drivers/clk/pistachio/clk-pistachio.c
> @@ -44,7 +44,7 @@ static struct pistachio_gate pistachio_gates[] __initdata = {
> GATE(CLK_AUX_ADC_INTERNAL, "aux_adc_internal", "sys_internal_div",
> 0x104, 22),
> GATE(CLK_AUX_ADC, "aux_adc", "aux_adc_div", 0x104, 23),
> - GATE(CLK_SD_HOST, "sd_host", "sd_host_div", 0x104, 24),
> + GATE(CLK_SD_HOST, "sd_host", "sd_host_div4", 0x104, 24),
> GATE(CLK_BT, "bt", "bt_div", 0x104, 25),
> GATE(CLK_BT_DIV4, "bt_div4", "bt_div4_div", 0x104, 26),
> GATE(CLK_BT_DIV8, "bt_div8", "bt_div8_div", 0x104, 27),
> @@ -54,6 +54,7 @@ static struct pistachio_gate pistachio_gates[] __initdata = {
> static struct pistachio_fixed_factor pistachio_ffs[] __initdata = {
> FIXED_FACTOR(CLK_WIFI_DIV4, "wifi_div4", "wifi_pll", 4),
> FIXED_FACTOR(CLK_WIFI_DIV8, "wifi_div8", "wifi_pll", 8),
> + FIXED_FACTOR(CLK_SDHOST_DIV4, "sd_host_div4", "sd_host_div", 4),
> };
>
> static struct pistachio_div pistachio_divs[] __initdata = {
> diff --git a/include/dt-bindings/clock/pistachio-clk.h b/include/dt-bindings/clock/pistachio-clk.h
> index 039f83facb68..77b92aed241d 100644
> --- a/include/dt-bindings/clock/pistachio-clk.h
> +++ b/include/dt-bindings/clock/pistachio-clk.h
> @@ -21,6 +21,7 @@
> /* Fixed-factor clocks */
> #define CLK_WIFI_DIV4 16
> #define CLK_WIFI_DIV8 17
> +#define CLK_SDHOST_DIV4 18
Does this clock really need to be exposed in DT?
>
> /* Gate clocks */
> #define CLK_MIPS 32
> --
> 2.16.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-31 21:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
2018-07-22 21:20 ` [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed Andreas Färber
2018-07-25 23:43 ` Stephen Boyd
2018-07-31 21:21 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox