Add eSPI device driver (flash channel)
PATCH 1/1 Add eSPI device driver (flash channel)
This patch adds the driver support for the eSPI controller of Aspeed 5/6th generation SoCs. This controller is a slave device communicating with a master over Enhanced Serial Peripheral Interface (eSPI).
eSPI supports 4 channels, namely peripheral, virtual wire, out-of-band, and flash, and operates at max frequency of 66MHz.
But at the moment, this patch set only supports the flash channel.
---
Hello everyone,
I'm presenting a revised version of the eSPI device driver patch series found at the following link:
https://lore.kernel.org/openbmc/[email protected]/
This update addresses the issues identified during the review process.
While the previous patch series attempted to incorporate support for all four different channels of eSPI, this new series focuses on upstreaming the flash channel initially, ensuring that all review comments are duly addressed, before progressing further.
Results:
Successfully conducted a flash update via eSPI.
Note:
This marks my inaugural endeavor in contributing code to the kernel subsystem. I kindly request reviewers to incorporate as many details as possible in the review comments.
--- .../devicetree/bindings/soc/aspeed/espi.yaml | 125 ++++++ arch/arm/boot/dts/aspeed/aspeed-g6.dtsi | 16 +- drivers/mtd/mtdcore.c | 2 +- drivers/soc/aspeed/Kconfig | 10 + drivers/soc/aspeed/Makefile | 3 + drivers/soc/aspeed/aspeed-espi-ctrl.c | 197 +++++++++ drivers/soc/aspeed/aspeed-espi-ctrl.h | 169 ++++++++ drivers/soc/aspeed/aspeed-espi-flash.c | 466 +++++++++++++++++++++ drivers/soc/aspeed/aspeed-espi-flash.h | 45 ++ include/uapi/linux/espi/aspeed-espi-ioc.h | 103 +++++ 10 files changed, 1134 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +125 -0
@@ -0,0 +1,125 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# # Copyright (c) 2021 Aspeed Technology Inc. +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/aspeed/espi.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Aspeed eSPI Controller + +maintainers: + - Manojkiran Eda <[email protected]> + - Patrick Rudolph <[email protected]> + - Chia-Wei Wang <[email protected]> + - Ryan Chen <[email protected]> + +description: + Aspeed eSPI controller implements a slave side eSPI endpoint device + supporting the four eSPI channels, namely peripheral, virtual wire, + out-of-band, and flash. + +properties: + compatible: + items: + - enum: + - aspeed,ast2500-espi + - aspeed,ast2600-espi + - const: simple-mfd + - const: syscon + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^espi-ctrl@[0-9a-f]+$": + type: object + + description: Control of the four basic eSPI channels + + properties: + compatible: + items: + - enum: + - aspeed,ast2500-espi-ctrl + - aspeed,ast2600-espi-ctrl + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + flash,dma-mode: + type: boolean + description: Enable DMA support for eSPI flash channel + + flash,safs-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2 ] + default: 0 + description: Slave-Attached-Sharing-Flash mode, 0->Mix, 1->SW, 2->HW + + required: + - compatible + - interrupts + - clocks + + "^espi-mmbi@[0-9a-f]+$": + type: object + + description: Control of the PCH-BMC data exchange over eSPI peripheral memory cycle + + properties: + compatible: + const: aspeed,ast2600-espi-mmbi + + interrupts: + maxItems: 1 + + required: + - compatible + - interrupts + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/ast2600-clock.h> + + espi: espi@1e6ee000 { + compatible = "aspeed,ast2600-espi", "simple-mfd", "syscon"; + reg = <0x1e6ee000 0x1000>; + + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x1e6ee000 0x1000>; + + espi_ctrl: espi-ctrl@0 { + compatible = "aspeed,ast2600-espi-ctrl"; + reg = <0x0 0x800>; + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&syscon ASPEED_CLK_GATE_ESPICLK>; + }; + + espi_mmbi: espi-mmbi@800 { + compatible = "aspeed,ast2600-espi-mmbi"; + reg = <0x800 0x50>; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; + }; + };
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi +15 -1
@@ -453,7 +453,21 @@ video: video@1e700000 { interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; }; - + espi: espi@1e6ee000 { + compatible = "aspeed,ast2600-espi", "simple-mfd", "syscon"; + reg = <0x1e6ee000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x1e6ee000 0x1000>; + espi_ctrl: espi-ctrl@0 { + compatible = "aspeed,ast2600-espi-ctrl"; + reg = <0x0 0x800>,<0x0 0x4000000>; + reg-names = "espi_ctrl","espi_flash"; + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&syscon ASPEED_CLK_GATE_ESPICLK>; + status = "disabled"; + }; + }; gpio0: gpio@1e780000 { #gpio-cells = <2>; gpio-controller;
drivers/mtd/mtdcore.c +1 -1
@@ -2560,7 +2560,7 @@ static void __exit cleanup_mtd(void)idr_destroy (&mtd_idr); } -module_init (init_mtd); +subsys_initcall (init_mtd);module_exit (cleanup_mtd);MODULE_LICENSE ("GPL" );
drivers/soc/aspeed/Kconfig +10 -0
@@ -52,6 +52,16 @@ config ASPEED_SOCINFO help Say yes to support decoding of ASPEED BMC information. +config ASPEED_ESPI + bool "ASPEED eSPI slave driver" + select REGMAP + select MFD_SYSCON + default n + help + Enable driver support for the Aspeed eSPI engine. The eSPI engine + plays as a slave device in BMC to communicate with the Host over + the eSPI interface. + endmenu endif
drivers/soc/aspeed/Makefile +3 -0
@@ -4,3 +4,6 @@ obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o obj-$(CONFIG_ASPEED_UART_ROUTING) += aspeed-uart-routing.o obj-$(CONFIG_ASPEED_P2A_CTRL) += aspeed-p2a-ctrl.o obj-$(CONFIG_ASPEED_SOCINFO) += aspeed-socinfo.o +obj-$(CONFIG_ASPEED_ESPI) += aspeed-espi-ctrl.o \ + aspeed-espi-flash.o +
drivers/soc/aspeed/aspeed-espi-ctrl.c new file +197 -0
197 lines not on this page · raw message
drivers/soc/aspeed/aspeed-espi-ctrl.h new file +169 -0
169 lines not on this page · raw message
drivers/soc/aspeed/aspeed-espi-flash.c new file +466 -0
466 lines not on this page · raw message
drivers/soc/aspeed/aspeed-espi-flash.h new file +45 -0
45 lines not on this page · raw message
include/uapi/linux/espi/aspeed-espi-ioc.h new file +103 -0
103 lines not on this page · raw message
---
base-commit: 841c35169323cd833294798e58b9bf63fa4fa1de
change-id: 20240213-espi_driver-5861a64d7dc4
Best regards,
Signature · 1 line
Manojkiran Eda <[email protected]>
Rob Herring
maintainerQuoted 32 lines · Manojkiran Eda
This patch adds the driver support for the eSPI controller of Aspeed 5/6th generation SoCs. This controller is a slave device communicating with a master over Enhanced Serial Peripheral Interface (eSPI).
eSPI supports 4 channels, namely peripheral, virtual wire, out-of-band, and flash, and operates at max frequency of 66MHz.
But at the moment, this patch set only supports the flash channel.
Signed-off-by Manojkiran Eda <[email protected]>---
Hello everyone,I'm presenting a revised version of the eSPI device driver patch series found at the following link:
https://lore.kernel.org/openbmc/20220516005412.4844-1-chiawei_wang at aspeedtech.com/
This update addresses the issues identified during the review process.
While the previous patch series attempted to incorporate support for all four different channels of eSPI, this new series focuses on upstreaming the flash channel initially, ensuring that all review comments are duly addressed, before progressing further.
Results:
Successfully conducted a flash update via eSPI.
Note:
This marks my inaugural endeavor in contributing code to the kernel subsystem. I kindly request reviewers to incorporate as many details as possible in the review comments.
Quoted 13 lines
--- .../devicetree/bindings/soc/aspeed/espi.yaml | 125 ++++++ arch/arm/boot/dts/aspeed/aspeed-g6.dtsi | 16 +- drivers/mtd/mtdcore.c | 2 +- drivers/soc/aspeed/Kconfig | 10 + drivers/soc/aspeed/Makefile | 3 + drivers/soc/aspeed/aspeed-espi-ctrl.c | 197 +++++++++ drivers/soc/aspeed/aspeed-espi-ctrl.h | 169 ++++++++ drivers/soc/aspeed/aspeed-espi-flash.c | 466 +++++++++++++++++++++ drivers/soc/aspeed/aspeed-espi-flash.h | 45 ++ include/uapi/linux/espi/aspeed-espi-ioc.h | 103 +++++ 10 files changed, 1134 insertions(+), 2 deletions(-)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:./Documentation/devicetree/bindings/soc/aspeed/espi.yaml:5:6: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/soc/aspeed/espi.yaml:6:10: [error] string value is redundantly quoted with any quotes (quoted-strings)
dtschema/dtc warnings/errors:
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240213-espi_driver-v1-1-92741c812843 at gmail.com
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Rob Herring
maintainerQuoted 9 lines · Manojkiran Eda
This patch adds the driver support for the eSPI controller of Aspeed 5/6th generation SoCs. This controller is a slave device communicating with a master over Enhanced Serial Peripheral Interface (eSPI).
eSPI supports 4 channels, namely peripheral, virtual wire, out-of-band, and flash, and operates at max frequency of 66MHz.
But at the moment, this patch set only supports the flash channel.
You're not going to need binding changes to add support for those, right?
Quoted 15 lines
Signed-off-by Manojkiran Eda <[email protected]>---
Hello everyone,I'm presenting a revised version of the eSPI device driver patch series found at the following link:
https://lore.kernel.org/openbmc/20220516005412.4844-1-chiawei_wang at aspeedtech.com/
This update addresses the issues identified during the review process.
While the previous patch series attempted to incorporate support for all four different channels of eSPI, this new series focuses on upstreaming the flash channel initially, ensuring that all review comments are duly addressed, before progressing further.
Quoted 8 lines
Results:
Successfully conducted a flash update via eSPI.
Note:
This marks my inaugural endeavor in contributing code to the kernel subsystem. I kindly request reviewers to incorporate as many details as possible in the review comments.
Please start with submitting-patches.rst and the DT specific version of that.
Quoted 2 lines
--- .../devicetree/bindings/soc/aspeed/espi.yaml | 125 ++++++
This should be a separate patch. checkpatch.pl will tell you this and other things.
Filename should match compatible.
Quoted 1 line
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi | 16 +-
This is another patch.
Quoted 1 line
drivers/mtd/mtdcore.c | 2 +-
Yet another patch. But really, this one will be rejected most likely unless you can justify why it is needed.
Quoted 7 lines
drivers/soc/aspeed/Kconfig | 10 + drivers/soc/aspeed/Makefile | 3 + drivers/soc/aspeed/aspeed-espi-ctrl.c | 197 +++++++++ drivers/soc/aspeed/aspeed-espi-ctrl.h | 169 ++++++++ drivers/soc/aspeed/aspeed-espi-flash.c | 466 +++++++++++++++++++++ drivers/soc/aspeed/aspeed-espi-flash.h | 45 ++ include/uapi/linux/espi/aspeed-espi-ioc.h | 103 +++++
Your own interface to userspace is probably not going to be accepted either.
Documentation/devicetree/bindings/soc/aspeed/espi.yaml line 2
Quoted 10 lines
10 files changed, 1134 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +2
-0@@ -0,0 +1,125 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# # Copyright (c) 2021 Aspeed Technology Inc.
It's 2024 now.
Quoted 5 lines
Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +5
-0+%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/aspeed/espi.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" +
Documentation/devicetree/bindings/soc/aspeed/espi.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +10
-0+title: Aspeed eSPI Controller + +maintainers: + - Manojkiran Eda <[email protected]> + - Patrick Rudolph <[email protected]> + - Chia-Wei Wang <[email protected]> + - Ryan Chen <[email protected]> + +description: + Aspeed eSPI controller implements a slave side eSPI endpoint device
s/slave/device/
Quoted 16 lines
Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +16
-0+ supporting the four eSPI channels, namely peripheral, virtual wire, + out-of-band, and flash. + +properties: + compatible: + items: + - enum: + - aspeed,ast2500-espi + - aspeed,ast2600-espi + - const: simple-mfd + - const: syscon + + reg: + maxItems: 1 + + "#address-cells":
Documentation/devicetree/bindings/soc/aspeed/espi.yaml line 43
Quoted 10 lines
Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +10
-0+ const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^espi-ctrl@[0-9a-f]+$": + type: object
Is this really a separate sub-block? As in could it be reused somewhere else or in a different combination of blocks?
Quoted 23 lines
Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +23
-0+ + description: Control of the four basic eSPI channels + + properties: + compatible: + items: + - enum: + - aspeed,ast2500-espi-ctrl + - aspeed,ast2600-espi-ctrl + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + flash,dma-mode: + type: boolean + description: Enable DMA support for eSPI flash channel + + flash,safs-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2 ]
Documentation/devicetree/bindings/soc/aspeed/espi.yaml line 76
Quoted 10 lines
Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +10
-0+ default: 0 + description: Slave-Attached-Sharing-Flash mode, 0->Mix, 1->SW, 2->HW + + required: + - compatible + - interrupts + - clocks + + "^espi-mmbi@[0-9a-f]+$": + type: object
Is this really a separate sub-block?
Quoted 62 lines
Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +49
-0+ + description: Control of the PCH-BMC data exchange over eSPI peripheral memory cycle + + properties: + compatible: + const: aspeed,ast2600-espi-mmbi + + interrupts: + maxItems: 1 + + required: + - compatible + - interrupts + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/ast2600-clock.h> + + espi: espi at 1e6ee000 { + compatible = "aspeed,ast2600-espi", "simple-mfd", "syscon"; + reg = <0x1e6ee000 0x1000>; + + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x1e6ee000 0x1000>; + + espi_ctrl: espi-ctrl at 0 { + compatible = "aspeed,ast2600-espi-ctrl"; + reg = <0x0 0x800>; + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&syscon ASPEED_CLK_GATE_ESPICLK>; + }; + + espi_mmbi: espi-mmbi at 800 { + compatible = "aspeed,ast2600-espi-mmbi"; + reg = <0x800 0x50>; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; + }; + };arch/arm/boot/dts/aspeed/aspeed-g6.dtsi +4
-1@@ -453,7 +453,21 @@ video: video at 1e700000 { interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; }; - + espi: espi at 1e6ee000 { + compatible = "aspeed,ast2600-espi", "simple-mfd", "syscon"; + reg = <0x1e6ee000 0x1000>; + #address-cells = <1>;
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi video: video at 1e700000 { · line 469
Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi +10
-0+ #size-cells = <1>; + ranges = <0x0 0x1e6ee000 0x1000>; + espi_ctrl: espi-ctrl at 0 { + compatible = "aspeed,ast2600-espi-ctrl"; + reg = <0x0 0x800>,<0x0 0x4000000>; + reg-names = "espi_ctrl","espi_flash"; + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&syscon ASPEED_CLK_GATE_ESPICLK>; + status = "disabled"; + };
Wrong indentation.
Quoted 4 lines
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi +1
-0+ }; gpio0: gpio at 1e780000 { #gpio-cells = <2>; gpio-controller;
Quoted 10 lines · Manojkiran Eda
This patch adds the driver support for the eSPI controller of Aspeed 5/6th generation SoCs. This controller is a slave device communicating with a master over Enhanced Serial Peripheral Interface (eSPI).
eSPI supports 4 channels, namely peripheral, virtual wire, out-of-band, and flash, and operates at max frequency of 66MHz.
But at the moment, this patch set only supports the flash channel.
Quoted 7 lines
Signed-off-by Manojkiran Eda <[email protected]>---
Hello everyone,I'm presenting a revised version of the eSPI device driver patch series found at the following link:
https://lore.kernel.org/openbmc/20220516005412.4844-1-chiawei_wang at aspeedtech.com/
What changed? Please provide changelog and continue with versioning.
Quoted 11 lines
This update addresses the issues identified during the review process.
While the previous patch series attempted to incorporate support for all four different channels of eSPI, this new series focuses on upstreaming the flash channel initially, ensuring that all review comments are duly addressed, before progressing further.
Results:
Successfully conducted a flash update via eSPI.
Quoted 7 lines
Note:
This marks my inaugural endeavor in contributing code to the kernel subsystem. I kindly request reviewers to incorporate as many details as possible in the review comments.
--- .../devicetree/bindings/soc/aspeed/espi.yaml | 125 ++++++ arch/arm/boot/dts/aspeed/aspeed-g6.dtsi | 16 +-
These are all separatge patches.
Please run scripts/checkpatch.pl and fix reported warnings. Some warnings can be ignored, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.
Quoted 16 lines
drivers/mtd/mtdcore.c | 2 +- drivers/soc/aspeed/Kconfig | 10 + drivers/soc/aspeed/Makefile | 3 + drivers/soc/aspeed/aspeed-espi-ctrl.c | 197 +++++++++ drivers/soc/aspeed/aspeed-espi-ctrl.h | 169 ++++++++ drivers/soc/aspeed/aspeed-espi-flash.c | 466 +++++++++++++++++++++ drivers/soc/aspeed/aspeed-espi-flash.h | 45 ++ include/uapi/linux/espi/aspeed-espi-ioc.h | 103 +++++ 10 files changed, 1134 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +0
-0
Documentation/devicetree/bindings/soc/aspeed/espi.yaml line 6
Quoted 6 lines
Documentation/devicetree/bindings/soc/aspeed/espi.yaml new file +6
-0@@ -0,0 +1,125 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# # Copyright (c) 2021 Aspeed Technology Inc. +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/aspeed/espi.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
It does not look like you tested the bindings, at least after quick look. Please run make dt_binding_check (see Documentation/devicetree/bindings/writing-schema.rst for instructions). Maybe you need to update your dtschema and yamllint.
Not reviewing further. Test your code....
Best regards,
Krzysztof
Most of the implementation originates from Aspeed. Please preserve the Aspeed copyright before adding the IBM one.
For removing IOCTL and adopting MTD interface, I thought we have already discussed this in public and in private many times.
The MTD interface acting as a master to control flash can NOT serve SAFS (a.k.a. eDAF), which is the major use case of eSPI flash channel on numerous Intel/AMD platforms.
Is SAFS not necessary on your platform?
If so, please consider to rename the driver to espi-mafs to be more specific. As the driver does not support SAFS actually.
I am not saying IOCTL is the best solution.
If there is a more user-firendly interface, I would be glad to revise the implementation as well.
But, the truth is that most existing kernel subsystems act in the master roles, which makes them hard to be applied on eSPI slave. And this is also well explained in the previous mailing thread.
We appreciate that you are willing to help on the open source contribution.
However, please co-work with Aspeed before submitting drivers of Aspeed HW. Otherwise, a misleading driver on the community are going to bring tons of customer issues to Aspeed.
Thanks,
Chiawei
Quoted 22 lines
Sent by: Manojkiran Eda <[email protected]>
---
Hello everyone,I'm presenting a revised version of the eSPI device driver patch series found at the following link:
https://lore.kernel.org/openbmc/20220516005412.4844-1-chiawei_wang at aspeedtech.com/
This update addresses the issues identified during the review process.
While the previous patch series attempted to incorporate support for all four different channels of eSPI, this new series focuses on upstreaming the flash channel initially, ensuring that all review comments are duly addressed, before progressing further.
Results:
Successfully conducted a flash update via eSPI.
Note:
This marks my inaugural endeavor in contributing code to the kernel subsystem. I kindly request reviewers to incorporate as many details as possible in the review comments.
Quoted 3 lines · ChiaWei Wang
We appreciate that you are willing to help on the open source contribution.
However, please co-work with Aspeed before submitting drivers of Aspeed HW. Otherwise, a misleading driver on the community are going to bring tons of customer issues to Aspeed.
It may not apply in this particular case as Aspeed did write the original driver and it is polite to work with previous authors when respinning a patchset, but in general there is no need to work with a hardware vendor before writing drivers for their hardware.
Blocking a driver because that company might receive more support requests is not the kernel's problem.
Cheers,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20240214/b0863e96/attachment-0001.sig>
Quoted 8 lines · ChiaWei Wang
Quoted 2 lines
We appreciate that you are willing to help on the open source contribution. However, please co-work with Aspeed before submitting drivers of Aspeed
HW.
Quoted 1 line
Otherwise, a misleading driver on the community are going to bring tons of
customer issues to Aspeed.
Quoted 7 lines
It may not apply in this particular case as Aspeed did write the original driver and it is polite to work with previous authors when respinning a patchset, but in general there is no need to work with a hardware vendor before writing drivers for their hardware.
Blocking a driver because that company might receive more support requests is not the kernel's problem.
I agree with that and Aspeed will not refuse to support.
However, in this case, the authors, IBM, and Aspeed already have discussion (at least 4 times) before and foresee "issues" on practical eSPI SAFS use. If there is already a known issue of the driver, why ignoring the previous discussion and push it?
A compromise is to ask for driver renaming to espi-mafs to avoid confusion.
Otherwise we need to explain, again, why the driver does not fulfill the SAFS expectation.
Regards,
Chiawei
Quoted 16 lines · ChiaWei Wang
Quoted 8 lines · ChiaWei Wang
Quoted 2 lines
We appreciate that you are willing to help on the open source contribution. However, please co-work with Aspeed before submitting drivers of Aspeed
HW.
Quoted 1 line
Otherwise, a misleading driver on the community are going to bring tons of
customer issues to Aspeed.
Quoted 7 lines
It may not apply in this particular case as Aspeed did write the original driver and it is polite to work with previous authors when respinning a patchset, but in general there is no need to work with a hardware vendor before writing drivers for their hardware.
Blocking a driver because that company might receive more support requests is not the kernel's problem.
Quoted 6 lines
I agree with that and Aspeed will not refuse to support.
However, in this case, the authors, IBM, and Aspeed already have discussion (at least 4 times) before and foresee "issues" on practical eSPI SAFS use. If there is already a known issue of the driver, why ignoring the previous discussion and push it?
A compromise is to ask for driver renaming to espi-mafs to avoid confusion.
Otherwise we need to explain, again, why the driver does not fulfill the SAFS expectation.
To be clear, in case you misunderstood, I was making a general point and
not about this particular patchset.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20240215/21edebee/attachment.sig>
Quoted 27 lines
From: Conor Dooley <[email protected]>
Sent: Friday, February 16, 2024 1:13 AMQuoted 3 lines · ChiaWei Wang
Quoted 3 lines · ChiaWei Wang
Quoted 1 line
We appreciate that you are willing to help on the open source
contribution.
Quoted 12 lines
Quoted 12 lines
Quoted 2 lines
However, please co-work with Aspeed before submitting drivers of Aspeed
HW.
Quoted 2 lines
Otherwise, a misleading driver on the community are going to bring tons of
customer issues to Aspeed.
It may not apply in this particular case as Aspeed did write the original driver and it is polite to work with previous authors when respinning a patchset, but in general there is no need to work with a hardware vendor before writing drivers for their hardware.
Quoted 6 lines
Quoted 2 lines
Blocking a driver because that company might receive more support requests is not the kernel's problem.
I agree with that and Aspeed will not refuse to support.
However, in this case, the authors, IBM, and Aspeed already have discussion
(at least 4 times) before and foresee "issues" on practical eSPI SAFS use.
Quoted 8 lines
Quoted 1 line
If there is already a known issue of the driver, why ignoring the previous
discussion and push it?
Quoted 2 lines
A compromise is to ask for driver renaming to espi-mafs to avoid confusion. Otherwise we need to explain, again, why the driver does not fulfill the SAFS
expectation.
To be clear, in case you misunderstood, I was making a general point and not about this particular patchset.
Thanks for the clarification and I understand your point.
Most Aspeed-related drivers are from the Aspeed SDK.
And we keep revising the SDK based on our customers' feedback and issues reported.
We only wish that the version submitted to the community will not result in unnecessary misunderstanding and thus more customer issues.
Regards,
Chiawei
Quoted 11 lines · Manojkiran Eda
This patch adds the driver support for the eSPI controller of Aspeed 5/6th generation SoCs. This controller is a slave device communicating with a master over Enhanced Serial Peripheral Interface (eSPI).
eSPI supports 4 channels, namely peripheral, virtual wire, out-of-band, and flash, and operates at max frequency of 66MHz.
But at the moment, this patch set only supports the flash channel.
Signed-off-by Manojkiran Eda <[email protected]>
Hi Manojkiran,
Glad to see this progressing again! It sounds like there may still be some open questions regarding the approach, and as others have noted there are things included here that should be split out into separate patches.
I did try it out in its current form though, and encountered a few problems...
Firstly, the calls to dev_notice() all appear to be missing the struct device * as their first argument and hence don't compile (I hacked around this to get it to build).
Second, the device-tree updates only include aspeed-g6.dtsi, so I manually imported the corresponding aspeed-g5.dtsi change from the last version Chia-Wei posted [1] and used that for the AST2500 system I need eSPI support on.
[1] https://lore.kernel.org/linux-arm-kernel/20220516005412.4844-1-chiawei_wang at aspeedtech.com/
And finally, after making the above changes and running it I got the following during boot:
[ 0.288079] aspeed-espi-ctrl 1e6ee000.espi-ctrl: something went wrong [ 0.288120] aspeed-espi-ctrl 1e6ee000.espi-ctrl: failed to allocate flash channel
I'm not sure if there's some change in this new version such that the dtsi patch I imported from the old one no longer works, but if nothing else it might at least suggest that the error messages could be made a bit more informative.
Thanks,
Zev