-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spi: qspi: Add Phytium spi/qspi controller support #136
Conversation
Add binding documentation for Phytium SPI controller. Signed-off-by: yuanxia <[email protected]> Signed-off-by: Chen Baozi <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]>
Add support for the Phytium SPI controller driver. Signed-off-by: yuanxia <[email protected]> Signed-off-by: Zhang Yiqun <[email protected]> Signed-off-by: Peng Min <[email protected]> Signed-off-by: Chen Baozi <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]>
Add the device tree binding documentation for Phytium QuadSPI controller. Signed-off-by: yuanxia <[email protected]> Signed-off-by: Chen Baozi <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]>
This patch adds a new driver for Phytium QuadSPI (QSPI) controller, which is used to access NOR Flash memory slaves. The driver implements spi-mem framework and does not support generic SPI operations. Signed-off-by: yuanxia <[email protected]> Signed-off-by: Zhou Yulin <[email protected]> Signed-off-by: Chen Baozi <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]>
The driver used devm_spi_register_controller() on bind. Therefore, __device_release_driver() first invokes phytium_spi_remove_host() before unregistering the SPI controller via devres_release_all() when unbinding. Since phytium_spi_remove_host() shuts down the chip, rendering the SPI bus inaccessible even through the SPI controller is still registered. When the SPI controller is subsequently unregistered, it unbinds all its slave devices. Because their drivers cannot access the SPI bus, the slave devices may be left in an improper state. Signed-off-by: yuanxia <[email protected]> Signed-off-by: Chen Baozi <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]>
Since the platform driver wraps the core phytium_spi into phytium_spi_clk struct to include a platform clock, the pointer extract from driver_data should also be 'struct phytium_spi_clk *'. Signed-off-by: yuanxia <[email protected]> Reported-by: Zhou Yulin <[email protected]> Signed-off-by: Chen Baozi <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]>
The mask of sck_sel should be 0x7 instead of 0x3, otherwise the split is set differently than expected. Signed-off-by: yuanxia <[email protected]> Signed-off-by: Liu Tianyu <[email protected]> Signed-off-by: Li Mingzhe <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]>
Code has been modified and added in the SPI driver section to adapt to the DDMA controller. Signed-off-by: yuanxia <[email protected]> Signed-off-by: Liu Tianyu <[email protected]> Signed-off-by: Wang Hanmo <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]>
Hi @yuanxia0927. Thanks for your PR. I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
drivers/mtd/parsers/Kconfig
Outdated
config MTD_ACPI_PARTS | ||
tristate "ACPI partitioning parser" | ||
default y | ||
depends on ACPI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default y?
这个在非飞腾架构上有用么? 建议添加上depends on ARCH_PHYTIUM || COMPILE_TEST
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,这个我会更改一下
@@ -3636,6 +3639,10 @@ static int spi_nor_probe(struct spi_mem *spimem) | |||
nor->spimem = spimem; | |||
nor->dev = &spi->dev; | |||
spi_nor_set_flash_node(nor, spi->dev.of_node); | |||
adev = ACPI_COMPANION(nor->dev); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个adev有什么用? 其后也未使用adev。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里加入adev是为了方便后续在acpi模式进行开发,能方便使用acpi函数操作adev结构体。但是该补丁里面没使用acpi的函数
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个为了后续开发方便,还是进行保留
drivers/mtd/mtdpart.c
Outdated
struct device *dev = &master->dev; | ||
|
||
if (has_acpi_companion(dev)) | ||
adev = ACPI_COMPANION(dev); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个adev也没用吧?
/ok-to-test |
Add acpi table support for qspi/spi driver, supporting parsing of ACPI tables. Signed-off-by: yuanxia <[email protected]> Signed-off-by: Wang Hanmo <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]>
deepin pr auto reviewMake the patch apply cleanly. |
@yuanxia0927 请问您是 Phytium 的员工吗?我看您没有在 https://github.com/deepin-community/SIG/blob/master/corporation/Phytium/metadata.yml 人员列表里,麻烦联系 chenbaozi-ft 提交一个 PR,把您加到 https://github.com/deepin-community/SIG/blob/master/corporation/Phytium/metadata.yml 中,这样您的贡献才能在 https://www.deepin.org/index/datastat/t/Phytium?id=corporate-contributor-phytium 中展示。 |
These patches have added support for Phytium spi/qspi controllers and their related functions.