ARM: dts: imx6dl-alti6p: Fix the SPI chipselect polarity
Subsystems (2)
Fabio Estevam
reviewerPATCH 1/4 ARM: dts: imx6dl-alti6p: Fix the SPI chipselect polarity
The conversion of the spi-imx driver to use GPIO descriptors in commit 8cdcd8aeee28 ("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:
[ 4.854337] m25p80@0 enforce active low on chipselect handle
Prior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside drivers/gpio/gpiolib-of.c:
* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
* GPIO_ACTIVE_LOW as flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
--- arch/arm/boot/dts/imx6dl-alti6p.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6dl-alti6p.dts +1 -1
@@ -192,7 +192,7 @@ &can1 { }; &ecspi1 { - cs-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi1>; status = "okay";
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerPATCH 2/4 ARM: dts: imx6qp-prtwd3: Fix the SPI chipselect polarity
The conversion of the spi-imx driver to use GPIO descriptors in commit 8cdcd8aeee28 ("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:
[ 4.854337] m25p80@0 enforce active low on chipselect handle
Prior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside drivers/gpio/gpiolib-of.c:
* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
* GPIO_ACTIVE_LOW as flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
The conversion of the spi-imx driver to use GPIO descriptors in commit 8cdcd8aeee28 ("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:
[ 4.854337] m25p80@0 enforce active low on chipselect handle
Prior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside drivers/gpio/gpiolib-of.c:
* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
* GPIO_ACTIVE_LOW as flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
--- arch/arm/boot/dts/imx6qp-prtwd3.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx6qp-prtwd3.dts +2 -2
@@ -123,7 +123,7 @@ &can1 { }; &ecspi2 { - cs-gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi2>; status = "okay";
@@ -189,7 +189,7 @@ fixed-link { }; &ecspi3 { - cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi3>; status = "okay";
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/4] ARM: dts: imx6qp-prtwd3: Fix the SPI chipselect polarity
Quoted 51 lines · Fabio Estevam
The conversion of the spi-imx driver to use GPIO descriptors in commit
8cdcd8aeee28("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:[ 4.854337] m25p80@0 enforce active low on chipselect handlePrior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside
drivers/gpio/gpiolib-of.c:* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
*GPIO_ACTIVE_LOWas flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
The conversion of the spi-imx driver to use GPIO descriptors in commit
8cdcd8aeee28("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:[ 4.854337] m25p80@0 enforce active low on chipselect handlePrior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside
drivers/gpio/gpiolib-of.c:* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
*GPIO_ACTIVE_LOWas flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
Quoted 4 lines
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
Signed-off-by Fabio Estevam <[email protected]>
Thank you!
Quoted 30 lines
--- arch/arm/boot/dts/imx6qp-prtwd3.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/boot/dts/imx6qp-prtwd3.dts +2
-2@@ -123,7 +123,7 @@ &can1 { }; &ecspi2 { - cs-gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi2>; status = "okay";@@ -189,7 +189,7 @@ fixed-link { }; &ecspi3 { - cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi3>; status = "okay";Signature · 1 line
2.25.1
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/4] ARM: dts: imx6qp-prtwd3: Fix the SPI chipselect polarity
In reply to Fabio EstevamQuoted 26 lines · Fabio Estevam
The conversion of the spi-imx driver to use GPIO descriptors in commit
8cdcd8aeee28("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:[ 4.854337] m25p80@0 enforce active low on chipselect handlePrior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside
drivers/gpio/gpiolib-of.c:* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
*GPIO_ACTIVE_LOWas flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
...
Quoted 24 lines
The conversion of the spi-imx driver to use GPIO descriptors in commit
8cdcd8aeee28("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:[ 4.854337] m25p80@0 enforce active low on chipselect handlePrior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside
drivers/gpio/gpiolib-of.c:* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
*GPIO_ACTIVE_LOWas flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
Quoted 2 lines
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
So the commit log was written twice? I will fix it up.
Shawn
Quoted 31 lines
Signed-off-by Fabio Estevam <[email protected]>--- arch/arm/boot/dts/imx6qp-prtwd3.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/boot/dts/imx6qp-prtwd3.dts +2
-2@@ -123,7 +123,7 @@ &can1 { }; &ecspi2 { - cs-gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi2>; status = "okay";@@ -189,7 +189,7 @@ fixed-link { }; &ecspi3 { - cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi3>; status = "okay";Signature · 1 line
2.25.1
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerPATCH 3/4 ARM: dts: imx6qdl-tqma6: Fix the SPI chipselect polarity
In reply to Fabio EstevamThe conversion of the spi-imx driver to use GPIO descriptors in commit 8cdcd8aeee28 ("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:
[ 4.854337] m25p80@0 enforce active low on chipselect handle
Prior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside drivers/gpio/gpiolib-of.c:
* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
* GPIO_ACTIVE_LOW as flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
--- arch/arm/boot/dts/imx6qdl-tqma6.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-tqma6.dtsi +1 -1
@@ -20,7 +20,7 @@ reg_3p3v: regulator-3p3v { &ecspi1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi1>; - cs-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; status = "okay"; m25p80: flash@0 {
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerPATCH 4/4 ARM: dts: imx7d-sdb: Fix the SPI chipselect polarity
In reply to Fabio EstevamThe following warning is seen when the SPI GPIO driver probes:
gpio-expander@0 enforce active low on chipselect handle
The reason for this warning is clearly explained in the comments inside drivers/gpio/gpiolib-of.c:
* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
* GPIO_ACTIVE_LOW as flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
--- arch/arm/boot/dts/imx7d-sdb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx7d-sdb.dts +1 -1
@@ -45,7 +45,7 @@ spi4 { pinctrl-0 = <&pinctrl_spi4>; gpio-sck = <&gpio1 13 GPIO_ACTIVE_HIGH>; gpio-mosi = <&gpio1 9 GPIO_ACTIVE_HIGH>; - cs-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; num-chipselects = <1>; #address-cells = <1>; #size-cells = <0>;
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 24 lines · Fabio Estevam
The conversion of the spi-imx driver to use GPIO descriptors in commit
8cdcd8aeee28("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:[ 4.854337] m25p80@0 enforce active low on chipselect handlePrior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside
drivers/gpio/gpiolib-of.c:* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
*GPIO_ACTIVE_LOWas flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
Quoted 4 lines
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
Signed-off-by Fabio Estevam <[email protected]>
Thank you!
Quoted 21 lines
--- arch/arm/boot/dts/imx6dl-alti6p.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/imx6dl-alti6p.dts +1
-1@@ -192,7 +192,7 @@ &can1 { }; &ecspi1 { - cs-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi1>; status = "okay";Signature · 1 line
2.25.1
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerHi Shawn,
Quoted 26 lines · Oleksij Rempel
Quoted 24 lines · Fabio Estevam
The conversion of the spi-imx driver to use GPIO descriptors in commit
8cdcd8aeee28("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:[ 4.854337] m25p80@0 enforce active low on chipselect handlePrior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside
drivers/gpio/gpiolib-of.c:* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
*GPIO_ACTIVE_LOWas flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
Quoted 7 lines
Quoted 4 lines
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Oleksij Rempel <[email protected]>Thank you!
A gentle ping on this series.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 32 lines · Fabio Estevam
Hi Shawn,
Quoted 29 lines · Oleksij Rempel
Quoted 27 lines · Fabio Estevam
The conversion of the spi-imx driver to use GPIO descriptors in commit
8cdcd8aeee28("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:[ 4.854337] m25p80@0 enforce active low on chipselect handlePrior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside
drivers/gpio/gpiolib-of.c:* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
*GPIO_ACTIVE_LOWas flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Oleksij Rempel <[email protected]>Thank you!
A gentle ping on this series.
Should we have Fixes tags for the patches?
Shawn
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerHi Shawn,
Quoted 1 line · Shawn Guo
Should we have Fixes tags for the patches?
As this does not change the functionality, I did not put a Fixes tag.
It will only fix a warning like this:
[ 4.854337] m25p80@0 enforce active low on chipselect handle
IMHO it is OK to apply them without a Fixes tag.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 6 lines · Fabio Estevam
Hi Shawn,
Quoted 1 line · Shawn Guo
Should we have Fixes tags for the patches?
Quoted 7 lines
As this does not change the functionality, I did not put a Fixes tag.
It will only fix a warning like this:
[ 4.854337] m25p80@0 enforce active low on chipselect handleIMHO it is OK to apply them without a Fixes tag.
Okay, then I assume it applies to imx8mm-kontron-n801x-som and imx8mm-venice patches as well?
Shawn
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerQuoted 2 lines · Shawn Guo
Okay, then I assume it applies to imx8mm-kontron-n801x-som and imx8mm-venice patches as well?
Yes, that's correct.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Shawn Guo
AppliedQuoted 24 lines · Fabio Estevam
The conversion of the spi-imx driver to use GPIO descriptors in commit
8cdcd8aeee28("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example:[ 4.854337] m25p80@0 enforce active low on chipselect handlePrior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low.
The reason for such mismatch is clearly explained in the comments inside
drivers/gpio/gpiolib-of.c:* SPI children have active low chip selects
* by default. This can be specified negatively
* by just omitting "spi-cs-high" in the
* device node, or actively by tagging on
*GPIO_ACTIVE_LOWas flag in the device
* tree. If the line is simultaneously
* tagged as active low in the device tree
* and has the "spi-cs-high" set, we get a
* conflict and the "spi-cs-high" flag will
* take precedence.
Quoted 4 lines
To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent.
Signed-off-by Fabio Estevam <[email protected]>
Applied all, thanks!
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel