Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1660746 > unrolled thread
| Started by | Jiada Wang <jiada_wang@mentor.com> |
|---|---|
| First post | 2017-06-08 07:20 +0200 |
| Last post | 2017-06-13 16:40 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH linux-next v4 2/4] spi: imx: add selection for iMX53 and iMX6 controller Jiada Wang <jiada_wang@mentor.com> - 2017-06-08 07:20 +0200
Re: [PATCH linux-next v4 2/4] spi: imx: add selection for iMX53 and iMX6 controller Rob Herring <robh@kernel.org> - 2017-06-12 18:00 +0200
Re: [PATCH linux-next v4 2/4] spi: imx: add selection for iMX53 and iMX6 controller Jiada Wang <jiada_wang@mentor.com> - 2017-06-13 07:30 +0200
Re: [PATCH linux-next v4 2/4] spi: imx: add selection for iMX53 and iMX6 controller Rob Herring <robh@kernel.org> - 2017-06-13 16:40 +0200
| From | Jiada Wang <jiada_wang@mentor.com> |
|---|---|
| Date | 2017-06-08 07:20 +0200 |
| Subject | [PATCH linux-next v4 2/4] spi: imx: add selection for iMX53 and iMX6 controller |
| Message-ID | <tPY1r-8ro-11@gated-at.bofh.it> |
ECSPI contorller for iMX53 and iMX6 has few hardware issues
comparing to iMX51.
The change add possibility to detect which controller is used
to apply possible workaround and limitations.
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
---
.../devicetree/bindings/spi/fsl-imx-cspi.txt | 1 +
drivers/spi/spi-imx.c | 26 ++++++++++++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
index 31b5b21..5bf1396 100644
--- a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
+++ b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
@@ -9,6 +9,7 @@ Required properties:
- "fsl,imx31-cspi" for SPI compatible with the one integrated on i.MX31
- "fsl,imx35-cspi" for SPI compatible with the one integrated on i.MX35
- "fsl,imx51-ecspi" for SPI compatible with the one integrated on i.MX51
+ - "fsl,imx53-ecspi" for SPI compatible with the one integrated on i.MX53 and later Soc
- reg : Offset and length of the register set for the device
- interrupts : Should contain CSPI/eCSPI interrupt
- cs-gpios : Specifies the gpio pins to be used for chipselects.
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 4469121..8e6f339 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -63,7 +63,8 @@ enum spi_imx_devtype {
IMX27_CSPI,
IMX31_CSPI,
IMX35_CSPI, /* CSPI on all i.mx except above */
- IMX51_ECSPI, /* ECSPI on i.mx51 and later */
+ IMX51_ECSPI, /* ECSPI on i.mx51 */
+ IMX53_ECSPI, /* ECSPI on i.mx53 and later */
};
struct spi_imx_data;
@@ -127,6 +128,11 @@ static inline int is_imx51_ecspi(struct spi_imx_data *d)
return d->devtype_data->devtype == IMX51_ECSPI;
}
+static inline int is_imx53_ecspi(struct spi_imx_data *d)
+{
+ return d->devtype_data->devtype == IMX53_ECSPI;
+}
+
#define MXC_SPI_BUF_RX(type) \
static void spi_imx_buf_rx_##type(struct spi_imx_data *spi_imx) \
{ \
@@ -752,6 +758,17 @@ static struct spi_imx_devtype_data imx51_ecspi_devtype_data = {
.devtype = IMX51_ECSPI,
};
+static struct spi_imx_devtype_data imx53_ecspi_devtype_data = {
+ .intctrl = mx51_ecspi_intctrl,
+ .config = mx51_ecspi_config,
+ .trigger = mx51_ecspi_trigger,
+ .rx_available = mx51_ecspi_rx_available,
+ .reset = mx51_ecspi_reset,
+ .fifo_size = 64,
+ .has_dmamode = true,
+ .devtype = IMX53_ECSPI,
+};
+
static const struct platform_device_id spi_imx_devtype[] = {
{
.name = "imx1-cspi",
@@ -772,6 +789,9 @@ static const struct platform_device_id spi_imx_devtype[] = {
.name = "imx51-ecspi",
.driver_data = (kernel_ulong_t) &imx51_ecspi_devtype_data,
}, {
+ .name = "imx53-ecspi",
+ .driver_data = (kernel_ulong_t) &imx53_ecspi_devtype_data,
+ }, {
/* sentinel */
}
};
@@ -783,6 +803,7 @@ static const struct of_device_id spi_imx_dt_ids[] = {
{ .compatible = "fsl,imx31-cspi", .data = &imx31_cspi_devtype_data, },
{ .compatible = "fsl,imx35-cspi", .data = &imx35_cspi_devtype_data, },
{ .compatible = "fsl,imx51-ecspi", .data = &imx51_ecspi_devtype_data, },
+ { .compatible = "fsl,imx53-ecspi", .data = &imx53_ecspi_devtype_data, },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, spi_imx_dt_ids);
@@ -1218,7 +1239,8 @@ static int spi_imx_probe(struct platform_device *pdev)
spi_imx->bitbang.master->prepare_message = spi_imx_prepare_message;
spi_imx->bitbang.master->unprepare_message = spi_imx_unprepare_message;
spi_imx->bitbang.master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
- if (is_imx35_cspi(spi_imx) || is_imx51_ecspi(spi_imx))
+ if (is_imx35_cspi(spi_imx) || is_imx51_ecspi(spi_imx) ||
+ is_imx53_ecspi(spi_imx))
spi_imx->bitbang.master->mode_bits |= SPI_LOOP | SPI_READY;
spi_imx->spi_drctl = spi_drctl;
--
2.9.3
[toc] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-06-12 18:00 +0200 |
| Subject | Re: [PATCH linux-next v4 2/4] spi: imx: add selection for iMX53 and iMX6 controller |
| Message-ID | <tRzV1-40Z-43@gated-at.bofh.it> |
| In reply to | #1660746 |
On Thu, Jun 08, 2017 at 02:16:01PM +0900, Jiada Wang wrote:
> ECSPI contorller for iMX53 and iMX6 has few hardware issues
> comparing to iMX51.
> The change add possibility to detect which controller is used
> to apply possible workaround and limitations.
>
> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
> ---
> .../devicetree/bindings/spi/fsl-imx-cspi.txt | 1 +
> drivers/spi/spi-imx.c | 26 ++++++++++++++++++++--
> 2 files changed, 25 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
> index 31b5b21..5bf1396 100644
> --- a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
> +++ b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
> @@ -9,6 +9,7 @@ Required properties:
> - "fsl,imx31-cspi" for SPI compatible with the one integrated on i.MX31
> - "fsl,imx35-cspi" for SPI compatible with the one integrated on i.MX35
> - "fsl,imx51-ecspi" for SPI compatible with the one integrated on i.MX51
> + - "fsl,imx53-ecspi" for SPI compatible with the one integrated on i.MX53 and later Soc
> - reg : Offset and length of the register set for the device
> - interrupts : Should contain CSPI/eCSPI interrupt
> - cs-gpios : Specifies the gpio pins to be used for chipselects.
> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
> index 4469121..8e6f339 100644
> --- a/drivers/spi/spi-imx.c
> +++ b/drivers/spi/spi-imx.c
> @@ -63,7 +63,8 @@ enum spi_imx_devtype {
> IMX27_CSPI,
> IMX31_CSPI,
> IMX35_CSPI, /* CSPI on all i.mx except above */
> - IMX51_ECSPI, /* ECSPI on i.mx51 and later */
> + IMX51_ECSPI, /* ECSPI on i.mx51 */
> + IMX53_ECSPI, /* ECSPI on i.mx53 and later */
Looks like i.MX51 and i.MX53 are the same. While the DT should have
different compatibles (with fallbacks), the driver should map them to
the same type until there's some difference found.
Rob
[toc] | [prev] | [next] | [standalone]
| From | Jiada Wang <jiada_wang@mentor.com> |
|---|---|
| Date | 2017-06-13 07:30 +0200 |
| Subject | Re: [PATCH linux-next v4 2/4] spi: imx: add selection for iMX53 and iMX6 controller |
| Message-ID | <tRMyS-3SC-13@gated-at.bofh.it> |
| In reply to | #1663800 |
Hello Rob
On 06/13/2017 12:53 AM, Rob Herring wrote:
> On Thu, Jun 08, 2017 at 02:16:01PM +0900, Jiada Wang wrote:
>> ECSPI contorller for iMX53 and iMX6 has few hardware issues
>> comparing to iMX51.
>> The change add possibility to detect which controller is used
>> to apply possible workaround and limitations.
>>
>> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
>> ---
>> .../devicetree/bindings/spi/fsl-imx-cspi.txt | 1 +
>> drivers/spi/spi-imx.c | 26 ++++++++++++++++++++--
>> 2 files changed, 25 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
>> index 31b5b21..5bf1396 100644
>> --- a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
>> +++ b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
>> @@ -9,6 +9,7 @@ Required properties:
>> - "fsl,imx31-cspi" for SPI compatible with the one integrated on i.MX31
>> - "fsl,imx35-cspi" for SPI compatible with the one integrated on i.MX35
>> - "fsl,imx51-ecspi" for SPI compatible with the one integrated on i.MX51
>> + - "fsl,imx53-ecspi" for SPI compatible with the one integrated on i.MX53 and later Soc
>> - reg : Offset and length of the register set for the device
>> - interrupts : Should contain CSPI/eCSPI interrupt
>> - cs-gpios : Specifies the gpio pins to be used for chipselects.
>> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
>> index 4469121..8e6f339 100644
>> --- a/drivers/spi/spi-imx.c
>> +++ b/drivers/spi/spi-imx.c
>> @@ -63,7 +63,8 @@ enum spi_imx_devtype {
>> IMX27_CSPI,
>> IMX31_CSPI,
>> IMX35_CSPI, /* CSPI on all i.mx except above */
>> - IMX51_ECSPI, /* ECSPI on i.mx51 and later */
>> + IMX51_ECSPI, /* ECSPI on i.mx51 */
>> + IMX53_ECSPI, /* ECSPI on i.mx53 and later */
>
> Looks like i.MX51 and i.MX53 are the same. While the DT should have
> different compatibles (with fallbacks), the driver should map them to
> the same type until there's some difference found.
>
the difference between i.MX51 and i.MX53 is introduced in the
4th patch "spi: imx: Add support for SPI Slave mode" in this patch set
do you think, I need to merge the two patches into one?
Thanks,
Jiada
> Rob
>
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-06-13 16:40 +0200 |
| Subject | Re: [PATCH linux-next v4 2/4] spi: imx: add selection for iMX53 and iMX6 controller |
| Message-ID | <tRV97-Fy-3@gated-at.bofh.it> |
| In reply to | #1664443 |
On Tue, Jun 13, 2017 at 12:28 AM, Jiada Wang <jiada_wang@mentor.com> wrote:
> Hello Rob
>
>
> On 06/13/2017 12:53 AM, Rob Herring wrote:
>>
>> On Thu, Jun 08, 2017 at 02:16:01PM +0900, Jiada Wang wrote:
>>>
>>> ECSPI contorller for iMX53 and iMX6 has few hardware issues
>>> comparing to iMX51.
>>> The change add possibility to detect which controller is used
>>> to apply possible workaround and limitations.
>>>
>>> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
>>> ---
>>> .../devicetree/bindings/spi/fsl-imx-cspi.txt | 1 +
>>> drivers/spi/spi-imx.c | 26
>>> ++++++++++++++++++++--
>>> 2 files changed, 25 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
>>> b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
>>> index 31b5b21..5bf1396 100644
>>> --- a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
>>> +++ b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
>>> @@ -9,6 +9,7 @@ Required properties:
>>> - "fsl,imx31-cspi" for SPI compatible with the one integrated on
>>> i.MX31
>>> - "fsl,imx35-cspi" for SPI compatible with the one integrated on
>>> i.MX35
>>> - "fsl,imx51-ecspi" for SPI compatible with the one integrated on
>>> i.MX51
>>> + - "fsl,imx53-ecspi" for SPI compatible with the one integrated on
>>> i.MX53 and later Soc
>>> - reg : Offset and length of the register set for the device
>>> - interrupts : Should contain CSPI/eCSPI interrupt
>>> - cs-gpios : Specifies the gpio pins to be used for chipselects.
>>> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
>>> index 4469121..8e6f339 100644
>>> --- a/drivers/spi/spi-imx.c
>>> +++ b/drivers/spi/spi-imx.c
>>> @@ -63,7 +63,8 @@ enum spi_imx_devtype {
>>> IMX27_CSPI,
>>> IMX31_CSPI,
>>> IMX35_CSPI, /* CSPI on all i.mx except above */
>>> - IMX51_ECSPI, /* ECSPI on i.mx51 and later */
>>> + IMX51_ECSPI, /* ECSPI on i.mx51 */
>>> + IMX53_ECSPI, /* ECSPI on i.mx53 and later */
>>
>>
>> Looks like i.MX51 and i.MX53 are the same. While the DT should have
>> different compatibles (with fallbacks), the driver should map them to
>> the same type until there's some difference found.
>>
> the difference between i.MX51 and i.MX53 is introduced in the
> 4th patch "spi: imx: Add support for SPI Slave mode" in this patch set
Okay, I missed that.
> do you think, I need to merge the two patches into one?
No, not necessary.
Acked-by: Rob Herring <robh@kernel.org>
Rob
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web