From: Anatolij Gustschin <agust@denx.de>
To: Alan Tull <atull@kernel.org>
Cc: linux-fpga@vger.kernel.org, linux-usb@vger.kernel.org,
linux-spi@vger.kernel.org
Subject: Re: RFC: FT232H based FPGA configuration adapter drivers
Date: Fri, 8 Dec 2017 00:12:22 +0100 [thread overview]
Message-ID: <20171208001222.5ed2bf19@crub> (raw)
In-Reply-To: <CANk1AXQtqWBN4Y40vQun6V9Oq+TB5xbXCCT8MDUXCufHtn9ZgQ@mail.gmail.com>
On Thu, 7 Dec 2017 14:24:57 -0600
Alan Tull atull@kernel.org wrote:
...
>> Instead of MFD part as in previous version I intend to add an USB misc
>> driver for our FPGA configuration adapters under drivers/usb/misc.
>> When probing for VID/PID assigned to FIFO-FPP adapter type, this
>> driver will register CBUS GPIO controller, GPIO lookup tables for
>
> I'm not clear how these lookup tables will be specified. Is this
>platform using device tree?
No, this is x86 platform, not using device tree. Therefore we have
to specify device GPIOs for each dynamically added platform device,
e.g. like:
lookup->dev_id = devm_kstrdup(dev, dev_name(dev), GFP_KERNEL);
lookup->table[0].chip_hwnum = N; /* pin offset on this GPIO chip */
lookup->table[0].chip_label = priv->gpiochip->label;
lookup->table[0].con_id = "nconfig";
lookup->table[0].flags = GPIO_ACTIVE_LOW;
lookup->table[1].chip_hwnum = M;
lookup->table[1].chip_label = priv->gpiochip->label;
lookup->table[1].con_id = "conf_done";
lookup->table[1].flags = GPIO_ACTIVE_HIGH;
Then, gpiod_get(dev, "nconfig", GPIOD_OUT_HIGH) in platform driver will
find the appropriate GPIO descriptor.
...
>> Below simplified diagram shows the intended device and drivers
>> relationship for reworking the adapter drivers.
>>
>> +-------------+
>> | |
>> | STRATIX V |PS-SPI FT245 FIFO & GPIO
>> | +-----+ +-------------------+
>> | on Board 1 | + + |
>> | | +----+---+
>> | PCIe | ADBUS&ACBUS | CPLD |
>> +---+---------+ Connection Options +----+---+
>> ^ (MPSSE or FIFO&GPIO) |
>> + + +------+-------+
>> altera-cvp +-----------+----------+ | FPP |
>> | FT232H | | |
>> | 0x0403:0x7148 | | ARRIA 10 |
>> | 0x0403:0x7149 | | |
>> +----------+-----------+ | on Board 2 |
>> | | |
>> +-----------+------------+ | PCIe |
>> USB misc | fpga-cfg-intf USB misc | +----------+---+
>> drv creates| bulk/ctrl xfer | ^
>> platform |ACBUS GPIO Ctrl (0x7148)| |
>> devices |MPSSE GPIO Ctrl (0x7149)| |
>> below +-------+-------+--------+ |
>> | | |
>> for +----+ +------+ for |
>> PID 0x7149 | | PID 0x7148 |
>> +---------+--------+ +-------+---------+ |
>> | ftdi-mpsse-spi + | | | |
>> | altera-ps-spi in | |ftdi-fifo-fpp-mgr| |
>> | spi_board_info | | platform device | |
>> +---------+--------+ +--------+--------+ |
>> ^ ^ |
>> drivers: | | |
>> + | |
>> MPSSE SPI master | |
>> ^ | |
>> | + +
>> altera-ps-spi ftdi-fifo-fpp altera-cvp
>> FPGA Manager FPGA Manager FPGA Manager
>> ^ ^ ^
>> | | |
>> +---------------+ + +---------+
>> fpga-mgr
>>
>
>Just to be clear, this is several solutions that are being
>superimposed in one diagram, depending on which platform you are on,
>right?
Correct, we either have USB -> MPSSE -> PS-SPI -> Stratix V path on
one board, or USB -> FIFO-FPP -> CPLD -> Arria 10 path on another
board.
Anatolij
WARNING: multiple messages have this Message-ID (diff)
From: Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org>
To: Alan Tull <atull-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-fpga-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: RFC: FT232H based FPGA configuration adapter drivers
Date: Fri, 8 Dec 2017 00:12:22 +0100 [thread overview]
Message-ID: <20171208001222.5ed2bf19@crub> (raw)
In-Reply-To: <CANk1AXQtqWBN4Y40vQun6V9Oq+TB5xbXCCT8MDUXCufHtn9ZgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, 7 Dec 2017 14:24:57 -0600
Alan Tull atull-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org wrote:
...
>> Instead of MFD part as in previous version I intend to add an USB misc
>> driver for our FPGA configuration adapters under drivers/usb/misc.
>> When probing for VID/PID assigned to FIFO-FPP adapter type, this
>> driver will register CBUS GPIO controller, GPIO lookup tables for
>
> I'm not clear how these lookup tables will be specified. Is this
>platform using device tree?
No, this is x86 platform, not using device tree. Therefore we have
to specify device GPIOs for each dynamically added platform device,
e.g. like:
lookup->dev_id = devm_kstrdup(dev, dev_name(dev), GFP_KERNEL);
lookup->table[0].chip_hwnum = N; /* pin offset on this GPIO chip */
lookup->table[0].chip_label = priv->gpiochip->label;
lookup->table[0].con_id = "nconfig";
lookup->table[0].flags = GPIO_ACTIVE_LOW;
lookup->table[1].chip_hwnum = M;
lookup->table[1].chip_label = priv->gpiochip->label;
lookup->table[1].con_id = "conf_done";
lookup->table[1].flags = GPIO_ACTIVE_HIGH;
Then, gpiod_get(dev, "nconfig", GPIOD_OUT_HIGH) in platform driver will
find the appropriate GPIO descriptor.
...
>> Below simplified diagram shows the intended device and drivers
>> relationship for reworking the adapter drivers.
>>
>> +-------------+
>> | |
>> | STRATIX V |PS-SPI FT245 FIFO & GPIO
>> | +-----+ +-------------------+
>> | on Board 1 | + + |
>> | | +----+---+
>> | PCIe | ADBUS&ACBUS | CPLD |
>> +---+---------+ Connection Options +----+---+
>> ^ (MPSSE or FIFO&GPIO) |
>> + + +------+-------+
>> altera-cvp +-----------+----------+ | FPP |
>> | FT232H | | |
>> | 0x0403:0x7148 | | ARRIA 10 |
>> | 0x0403:0x7149 | | |
>> +----------+-----------+ | on Board 2 |
>> | | |
>> +-----------+------------+ | PCIe |
>> USB misc | fpga-cfg-intf USB misc | +----------+---+
>> drv creates| bulk/ctrl xfer | ^
>> platform |ACBUS GPIO Ctrl (0x7148)| |
>> devices |MPSSE GPIO Ctrl (0x7149)| |
>> below +-------+-------+--------+ |
>> | | |
>> for +----+ +------+ for |
>> PID 0x7149 | | PID 0x7148 |
>> +---------+--------+ +-------+---------+ |
>> | ftdi-mpsse-spi + | | | |
>> | altera-ps-spi in | |ftdi-fifo-fpp-mgr| |
>> | spi_board_info | | platform device | |
>> +---------+--------+ +--------+--------+ |
>> ^ ^ |
>> drivers: | | |
>> + | |
>> MPSSE SPI master | |
>> ^ | |
>> | + +
>> altera-ps-spi ftdi-fifo-fpp altera-cvp
>> FPGA Manager FPGA Manager FPGA Manager
>> ^ ^ ^
>> | | |
>> +---------------+ + +---------+
>> fpga-mgr
>>
>
>Just to be clear, this is several solutions that are being
>superimposed in one diagram, depending on which platform you are on,
>right?
Correct, we either have USB -> MPSSE -> PS-SPI -> Stratix V path on
one board, or USB -> FIFO-FPP -> CPLD -> Arria 10 path on another
board.
Anatolij
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-12-07 23:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 14:31 RFC: FT232H based FPGA configuration adapter drivers Anatolij Gustschin
2017-12-07 14:31 ` Anatolij Gustschin
2017-12-07 20:24 ` Alan Tull
2017-12-07 20:24 ` Alan Tull
2017-12-07 23:12 ` Anatolij Gustschin [this message]
2017-12-07 23:12 ` Anatolij Gustschin
2017-12-08 9:27 ` Geert Uytterhoeven
2017-12-08 9:27 ` Geert Uytterhoeven
2017-12-08 13:57 ` Anatolij Gustschin
2017-12-08 13:57 ` Anatolij Gustschin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171208001222.5ed2bf19@crub \
--to=agust@denx.de \
--cc=atull@kernel.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.