* [PATCH 01/15] MIPS: dts: img: pistachio_marduk: Reorder nodes
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
@ 2018-07-22 21:19 ` Andreas Färber
2018-07-22 21:19 ` [PATCH 02/15] MIPS: dts: img: pistachio_marduk: Cleanups Andreas Färber
` (7 subsequent siblings)
8 siblings, 0 replies; 14+ 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, James Hartley, Rahul Bedarkar, Rob Herring,
Mark Rutland, devicetree
Consistently order nodes referenced by label alphabetically.
No functional changes. This prepares for adding nodes.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/mips/boot/dts/img/pistachio_marduk.dts | 76 ++++++++++++++---------------
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
index cf9cebd52294..f03f4114e645 100644
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
@@ -74,40 +74,34 @@
};
};
-&internal_dac {
- VDD-supply = <&internal_dac_supply>;
-};
-
-&spfi1 {
+&adc {
status = "okay";
-
- pinctrl-0 = <&spim1_pins>, <&spim1_quad_pins>, <&spim1_cs0_pin>,
- <&spim1_cs1_pin>;
- pinctrl-names = "default";
- cs-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>, <&gpio0 1 GPIO_ACTIVE_HIGH>;
-
- flash@0 {
- compatible = "spansion,s25fl016k", "jedec,spi-nor";
- reg = <0>;
- spi-max-frequency = <50000000>;
- };
+ vref-supply = <®_1v8>;
+ adc-reserved-channels = <0x10>;
};
-&uart0 {
+&enet {
status = "okay";
- assigned-clock-rates = <114278400>, <1843200>;
};
-&uart1 {
+&i2c2 {
status = "okay";
+ clock-frequency = <400000>;
+
+ tpm@20 {
+ compatible = "infineon,slb9645tt";
+ reg = <0x20>;
+ };
+
};
-&usb {
+&i2c3 {
status = "okay";
+ clock-frequency = <400000>;
};
-&enet {
- status = "okay";
+&internal_dac {
+ VDD-supply = <&internal_dac_supply>;
};
&pin_enet {
@@ -118,12 +112,6 @@
drive-strength = <2>;
};
-&sdhost {
- status = "okay";
- bus-width = <4>;
- disable-wp;
-};
-
&pin_sdhost_cmd {
drive-strength = <2>;
};
@@ -140,24 +128,36 @@
pinctrl-names = "default";
};
-&adc {
+&sdhost {
status = "okay";
- vref-supply = <®_1v8>;
- adc-reserved-channels = <0x10>;
+ bus-width = <4>;
+ disable-wp;
};
-&i2c2 {
+&spfi1 {
status = "okay";
- clock-frequency = <400000>;
- tpm@20 {
- compatible = "infineon,slb9645tt";
- reg = <0x20>;
+ pinctrl-0 = <&spim1_pins>, <&spim1_quad_pins>, <&spim1_cs0_pin>,
+ <&spim1_cs1_pin>;
+ pinctrl-names = "default";
+ cs-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>, <&gpio0 1 GPIO_ACTIVE_HIGH>;
+
+ flash@0 {
+ compatible = "spansion,s25fl016k", "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
};
+};
+&uart0 {
+ status = "okay";
+ assigned-clock-rates = <114278400>, <1843200>;
};
-&i2c3 {
+&uart1 {
+ status = "okay";
+};
+
+&usb {
status = "okay";
- clock-frequency = <400000>;
};
--
2.16.4
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 02/15] MIPS: dts: img: pistachio_marduk: Cleanups
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
2018-07-22 21:19 ` [PATCH 01/15] MIPS: dts: img: pistachio_marduk: Reorder nodes Andreas Färber
@ 2018-07-22 21:19 ` Andreas Färber
2018-07-22 21:19 ` [PATCH 03/15] MIPS: dts: img: pistachio: Rename spim0-clk pin node label Andreas Färber
` (6 subsequent siblings)
8 siblings, 0 replies; 14+ 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, James Hartley, Rahul Bedarkar, Rob Herring,
Mark Rutland, devicetree
Add and remove some white lines for consistency.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/mips/boot/dts/img/pistachio_marduk.dts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
index f03f4114e645..29358d1f7027 100644
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
@@ -51,6 +51,7 @@
leds {
compatible = "pwm-leds";
+
heartbeat {
label = "marduk:red:heartbeat";
pwms = <&pwm 3 300000>;
@@ -61,11 +62,13 @@
keys {
compatible = "gpio-keys";
+
button@1 {
label = "Button 1";
linux,code = <0x101>; /* BTN_1 */
gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
};
+
button@2 {
label = "Button 2";
linux,code = <0x102>; /* BTN_2 */
@@ -92,7 +95,6 @@
compatible = "infineon,slb9645tt";
reg = <0x20>;
};
-
};
&i2c3 {
--
2.16.4
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 03/15] MIPS: dts: img: pistachio: Rename spim0-clk pin node label
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
2018-07-22 21:19 ` [PATCH 01/15] MIPS: dts: img: pistachio_marduk: Reorder nodes Andreas Färber
2018-07-22 21:19 ` [PATCH 02/15] MIPS: dts: img: pistachio_marduk: Cleanups Andreas Färber
@ 2018-07-22 21:19 ` Andreas Färber
2018-07-22 21:19 ` [PATCH 04/15] MIPS: dts: img: pistachio_marduk: Switch mmc to 1 bit mode Andreas Färber
` (5 subsequent siblings)
8 siblings, 0 replies; 14+ 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, James Hartley, Rob Herring, Mark Rutland,
devicetree
Renaming will allow consistent ordering when referenced.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/mips/boot/dts/img/pistachio.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/boot/dts/img/pistachio.dtsi b/arch/mips/boot/dts/img/pistachio.dtsi
index f8d7e6f622cb..1adef5bc740d 100644
--- a/arch/mips/boot/dts/img/pistachio.dtsi
+++ b/arch/mips/boot/dts/img/pistachio.dtsi
@@ -406,7 +406,7 @@
function = "spim0";
drive-strength = <4>;
};
- spim0_clk: spim0-clk {
+ pin_spim0_clk: spim0-clk {
pins = "mfio8";
function = "spim0";
drive-strength = <4>;
--
2.16.4
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 04/15] MIPS: dts: img: pistachio_marduk: Switch mmc to 1 bit mode
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
` (2 preceding siblings ...)
2018-07-22 21:19 ` [PATCH 03/15] MIPS: dts: img: pistachio: Rename spim0-clk pin node label Andreas Färber
@ 2018-07-22 21:19 ` Andreas Färber
2018-07-24 22:15 ` Andreas Färber
2018-07-22 21:20 ` [PATCH 05/15] MIPS: dts: img: pistachio_marduk: Enable SPIM0 Andreas Färber
` (4 subsequent siblings)
8 siblings, 1 reply; 14+ 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, Ian Pozella,
Andreas Färber, James Hartley, Rahul Bedarkar, Rob Herring,
Mark Rutland, devicetree
From: Ian Pozella <Ian.Pozella@imgtec.com>
The mmc block in Pistachio allows 1 to 8 data bits to be used.
Marduk uses 4 bits allowing the upper 4 bits to be allocated
to the Mikrobus ports. However these bits are still connected
internally meaning the mmc block recieves signals on all data lines
and seems the internal HW CRC checks get corrupted by this erroneous
data.
We cannot control what data is sent on these lines because they go
to external ports. 1 bit mode does not exhibit the issue hence the
safe default is to use this. If a user knows that in their use case
they will not use the upper bits then they can set to 4 bit mode in
order to improve performance.
Also make sure that the upper 4 bits don't get allocated to the mmc
driver (the default is to assign all 8 pins) so they can be allocated
to other drivers. Allocating all 4 despite setting 1 bit mode as this
matches what is there in hardware.
Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/mips/boot/dts/img/pistachio_marduk.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
index 29358d1f7027..5557a6ad61c3 100644
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
@@ -120,6 +120,7 @@
&pin_sdhost_data {
drive-strength = <2>;
+ pins = "mfio17", "mfio18", "mfio19", "mfio20";
};
&pwm {
@@ -132,7 +133,7 @@
&sdhost {
status = "okay";
- bus-width = <4>;
+ bus-width = <1>;
disable-wp;
};
--
2.16.4
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH 04/15] MIPS: dts: img: pistachio_marduk: Switch mmc to 1 bit mode
2018-07-22 21:19 ` [PATCH 04/15] MIPS: dts: img: pistachio_marduk: Switch mmc to 1 bit mode Andreas Färber
@ 2018-07-24 22:15 ` Andreas Färber
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Färber @ 2018-07-24 22:15 UTC (permalink / raw)
To: linux-mips
Cc: Ralf Baechle, Paul Burton, James Hogan, linux-kernel, Ian Pozella,
James Hartley, Rahul Bedarkar, Rob Herring, Mark Rutland,
devicetree
Am 22.07.2018 um 23:19 schrieb Andreas Färber:
> From: Ian Pozella <Ian.Pozella@imgtec.com>
>
> The mmc block in Pistachio allows 1 to 8 data bits to be used.
> Marduk uses 4 bits allowing the upper 4 bits to be allocated
> to the Mikrobus ports. However these bits are still connected
> internally meaning the mmc block recieves signals on all data lines
"receives"
I had fixed a number of typos from the downstream patches already, but
this one slipped through.
Regards,
Andreas
> and seems the internal HW CRC checks get corrupted by this erroneous
> data.
>
> We cannot control what data is sent on these lines because they go
> to external ports. 1 bit mode does not exhibit the issue hence the
> safe default is to use this. If a user knows that in their use case
> they will not use the upper bits then they can set to 4 bit mode in
> order to improve performance.
>
> Also make sure that the upper 4 bits don't get allocated to the mmc
> driver (the default is to assign all 8 pins) so they can be allocated
> to other drivers. Allocating all 4 despite setting 1 bit mode as this
> matches what is there in hardware.
>
> Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
[snip]
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 05/15] MIPS: dts: img: pistachio_marduk: Enable SPIM0
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
` (3 preceding siblings ...)
2018-07-22 21:19 ` [PATCH 04/15] MIPS: dts: img: pistachio_marduk: Switch mmc to 1 bit mode Andreas Färber
@ 2018-07-22 21:20 ` Andreas Färber
2018-07-22 21:20 ` [PATCH 06/15] MIPS: dts: img: pistachio_marduk: Add 6Lowpan node Andreas Färber
` (3 subsequent siblings)
8 siblings, 0 replies; 14+ 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,
Andreas Färber, Rahul Bedarkar, James Hartley, Rob Herring,
Mark Rutland, devicetree
SPIM0 supplies SPI pins on the mikroBUS and Raspberry Pi B+ connectors.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/mips/boot/dts/img/pistachio_marduk.dts | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
index 5557a6ad61c3..d723b68084c9 100644
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
@@ -123,6 +123,14 @@
pins = "mfio17", "mfio18", "mfio19", "mfio20";
};
+&pin_spim0 {
+ drive-strength = <2>;
+};
+
+&pin_spim0_clk {
+ drive-strength = <2>;
+};
+
&pwm {
status = "okay";
@@ -137,6 +145,21 @@
disable-wp;
};
+&spfi0 {
+ status = "okay";
+
+ pinctrl-0 = <&spim0_pins>,
+ <&spim0_cs0_alt_pin>,
+ <&spim0_cs2_alt_pin>,
+ <&spim0_cs3_alt_pin>,
+ <&spim0_cs4_alt_pin>;
+ pinctrl-names = "default";
+ cs-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>, <0>,
+ <&gpio1 12 GPIO_ACTIVE_HIGH>,
+ <&gpio1 13 GPIO_ACTIVE_HIGH>,
+ <&gpio1 14 GPIO_ACTIVE_HIGH>;
+};
+
&spfi1 {
status = "okay";
--
2.16.4
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 06/15] MIPS: dts: img: pistachio_marduk: Add 6Lowpan node
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
` (4 preceding siblings ...)
2018-07-22 21:20 ` [PATCH 05/15] MIPS: dts: img: pistachio_marduk: Enable SPIM0 Andreas Färber
@ 2018-07-22 21:20 ` Andreas Färber
2018-07-24 0:06 ` Paul Burton
2018-07-22 21:20 ` [PATCH 07/15] MIPS: dts: img: pistachio_marduk: Add SPI UART node Andreas Färber
` (2 subsequent siblings)
8 siblings, 1 reply; 14+ 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,
Andreas Färber, Rahul Bedarkar, James Hartley, Rob Herring,
Mark Rutland, devicetree
The CA8210's clock output is needed for the SPI-UART bridge.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/mips/boot/dts/img/pistachio_marduk.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
index d723b68084c9..b0b6b534a41f 100644
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
@@ -158,6 +158,20 @@
<&gpio1 12 GPIO_ACTIVE_HIGH>,
<&gpio1 13 GPIO_ACTIVE_HIGH>,
<&gpio1 14 GPIO_ACTIVE_HIGH>;
+
+ ca8210: sixlowpan@4 {
+ compatible = "cascoda,ca8210";
+ reg = <4>;
+ spi-max-frequency = <3000000>;
+ spi-cpol;
+ reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ irq-gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
+
+ extclock-enable;
+ extclock-freq = <16000000>;
+ extclock-gpio = <2>; /* spiuart_clk */
+ #clock-cells = <0>;
+ };
};
&spfi1 {
--
2.16.4
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH 06/15] MIPS: dts: img: pistachio_marduk: Add 6Lowpan node
2018-07-22 21:20 ` [PATCH 06/15] MIPS: dts: img: pistachio_marduk: Add 6Lowpan node Andreas Färber
@ 2018-07-24 0:06 ` Paul Burton
0 siblings, 0 replies; 14+ messages in thread
From: Paul Burton @ 2018-07-24 0:06 UTC (permalink / raw)
To: Andreas Färber, Rob Herring
Cc: linux-mips, Ralf Baechle, James Hogan, linux-kernel,
Rahul Bedarkar, James Hartley, Mark Rutland, devicetree,
Harry Morris, Stefan Schmidt, Marcel Holtmann, David Gibson
Hi Andreas,
On Sun, Jul 22, 2018 at 11:20:01PM +0200, Andreas Färber wrote:
> diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
> index d723b68084c9..b0b6b534a41f 100644
> --- a/arch/mips/boot/dts/img/pistachio_marduk.dts
> +++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
> @@ -158,6 +158,20 @@
> <&gpio1 12 GPIO_ACTIVE_HIGH>,
> <&gpio1 13 GPIO_ACTIVE_HIGH>,
> <&gpio1 14 GPIO_ACTIVE_HIGH>;
> +
> + ca8210: sixlowpan@4 {
> + compatible = "cascoda,ca8210";
> + reg = <4>;
> + spi-max-frequency = <3000000>;
> + spi-cpol;
> + reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
> + irq-gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
> +
> + extclock-enable;
> + extclock-freq = <16000000>;
> + extclock-gpio = <2>; /* spiuart_clk */
> + #clock-cells = <0>;
> + };
dtc complains about the extclock-gpio property because it expects a
property named *-gpio to contain a gpio-list:
DTC arch/mips/boot/dts/img/pistachio_marduk.dtb
arch/mips/boot/dts/img/pistachio_marduk.dtb: Warning (gpios_property):
/spi@18100f00/sixlowpan@4: Missing property '#gpio-cells' in node
/clk@18144000 or bad phandle (referred from extclock-gpio[0])
Rob, perhaps this should be added as a second false-positive case in
dtc's prop_is_gpio()?
Thanks,
Paul
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 07/15] MIPS: dts: img: pistachio_marduk: Add SPI UART node
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
` (5 preceding siblings ...)
2018-07-22 21:20 ` [PATCH 06/15] MIPS: dts: img: pistachio_marduk: Add 6Lowpan node Andreas Färber
@ 2018-07-22 21:20 ` Andreas Färber
2018-07-22 21:20 ` [PATCH 08/15] MIPS: dts: img: pistachio_marduk: Add user LEDs Andreas Färber
2018-07-22 21:20 ` [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed Andreas Färber
8 siblings, 0 replies; 14+ 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,
Andreas Färber, Rahul Bedarkar, James Hartley, Rob Herring,
Mark Rutland, devicetree
The mikroBUS and Raspberry Pi B+ connector UARTs are behind an SC16IS752
SPI-UART bridge. Add it in order to be able to use these connectors.
Note: For UART flow control two pairs of jumpers need to be configured.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/mips/boot/dts/img/pistachio_marduk.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
index b0b6b534a41f..f682d0a5a3d9 100644
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
@@ -159,6 +159,18 @@
<&gpio1 13 GPIO_ACTIVE_HIGH>,
<&gpio1 14 GPIO_ACTIVE_HIGH>;
+ sc16is752: uart@0 {
+ compatible = "nxp,sc16is752";
+ reg = <0>;
+ spi-max-frequency = <4000000>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
+ clocks = <&ca8210>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
ca8210: sixlowpan@4 {
compatible = "cascoda,ca8210";
reg = <4>;
--
2.16.4
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 08/15] MIPS: dts: img: pistachio_marduk: Add user LEDs
2018-07-22 21:19 [PATCH 00/15] MIPS: pistachio: Creator Ci40 aka Marduk SPI-UART Andreas Färber
` (6 preceding siblings ...)
2018-07-22 21:20 ` [PATCH 07/15] MIPS: dts: img: pistachio_marduk: Add SPI UART node Andreas Färber
@ 2018-07-22 21:20 ` Andreas Färber
2018-07-22 21:20 ` [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed Andreas Färber
8 siblings, 0 replies; 14+ 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,
Andreas Färber, Rahul Bedarkar, James Hartley, Rob Herring,
Mark Rutland, devicetree
Add the LEDs that are connected to the SPI UART bridge.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/mips/boot/dts/img/pistachio_marduk.dts | 46 +++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
index f682d0a5a3d9..6984933b3cdc 100644
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
@@ -60,6 +60,52 @@
};
};
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led0 {
+ label = "marduk:red:user0";
+ gpios = <&sc16is752 0 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+
+ led1 {
+ label = "marduk:red:user1";
+ gpios = <&sc16is752 1 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+
+ led2 {
+ label = "marduk:red:user2";
+ gpios = <&sc16is752 2 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+
+ led3 {
+ label = "marduk:red:user3";
+ gpios = <&sc16is752 3 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+
+ led4 {
+ label = "marduk:red:user4";
+ gpios = <&sc16is752 4 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+
+ led5 {
+ label = "marduk:red:user5";
+ gpios = <&sc16is752 5 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+
+ led6 {
+ label = "marduk:red:user6";
+ gpios = <&sc16is752 6 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+ };
+
keys {
compatible = "gpio-keys";
--
2.16.4
^ permalink raw reply related [flat|nested] 14+ 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
` (7 preceding siblings ...)
2018-07-22 21:20 ` [PATCH 08/15] MIPS: dts: img: pistachio_marduk: Add user LEDs 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
8 siblings, 2 replies; 14+ 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] 14+ 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; 14+ messages in thread
From: Stephen Boyd @ 2018-07-25 23:43 UTC (permalink / raw)
To: 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ärber (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ärber <afaerber@suse.de>
> ---
Acked-by: Stephen Boyd <sboyd@kernel.org>
^ permalink raw reply [flat|nested] 14+ 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; 14+ 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] 14+ messages in thread