Support Pensando Elba SoC
Subsystems (8)
v3 cover Support Pensando Elba SoC
This series enables support for Pensando Elba SoC based platforms. The Elba SoC has the following features:
- Sixteen ARM64 A72 cores
- Dual DDR 4/5 memory controllers
- 32 lanes of PCIe Gen3/4 to the Host
- Network interfaces: Dual 200GE, Quad 100GE, 50GE, 25GE, 10GE and also a single 1GE management port.
- Storage/crypto offloads and 144 programmable P4 cores.
- QSPI and EMMC for SoC storage
- Two SPI interfaces for peripheral management
- I2C bus for platform management
This is a respin based on review input. Summary of the changes are:
0001-gpio-Add-Elba-SoC-gpio-driver-for-spi-cs-control.patch
- This patch is deleted. Elba SOC specific gpio spics control is integrated into spi-dw-mmio.c.
0002-spi-cadence-quadspi-Add-QSPI-support-for-Pensando-El.patch
- Changed compatible to "pensando,elba-qspi" to be more descriptive in spi-cadence-quadspi.c.
- Arnd wondered if moving to DT properties for quirks may be the way to go. Feedback I've received on other patches was don't mix two efforts in one patch so I'm currently just adding the Elba support to the current design.
0003-spi-dw-Add-support-for-Pensando-Elba-SoC-SPI.patch
- Changed the implementation to use existing dw_spi_set_cs() and integrated Elba specific CS control into spi-dw-mmio.c. The native designware support is for two chip-selects while Elba provides 4 chip-selects. Instead of adding a new file for this support in gpio-elba-spics.c the support is in one file (spi-dw-mmio.c).
0004-spidev-Add-Pensando-CPLD-compatible.patch
- This patch is deleted. The addition of compatible "pensando,cpld" to spidev.c is not added and an existing compatible is used in the device tree to enable.
0005-mmc-sdhci-cadence-Add-Pensando-Elba-SoC-support.patch
- Ulf and Yamada-san agreed the amount of code for this support is not enough to need a new file. The support is added into sdhci-cadence.c and new files sdhci-cadence-elba.c and sdhci-cadence.h are deleted.
- Redundant defines are removed (e.g. use SDHCI_CDNS_HRS04 and remove SDIO_REG_HRS4).
- Removed phy init function sd4_set_dlyvr() and used existing sdhci_cdns_phy_init(). Init values are from DT properties.
- Replace devm_ioremap_resource(&pdev->dev, iomem) with devm_platform_ioremap_resource(pdev, 1)
- Refactored the elba priv_writ_l() and elba_write_l() to remove a little redundant code.
- The config option CONFIG_MMC_SDHCI_CADENCE_ELBA goes away.
- Only C syntax and Elba functions are prefixed with elba_
0006-arm64-Add-config-for-Pensando-SoC-platforms.patch
- Added a little more info to the platform help text to assist users to decide on including platform support or not.
0007-arm64-dts-Add-Pensando-Elba-SoC-support.patch
- Node names changed to DT generic names
- Changed from using 'spi@' which is reserved
- The elba-flash-parts.dtsi is kept separate as it is included in multiple dts files.
- SPDX license tags at the top of each file
- The compatible = "pensando,elba" and 'model' are now together in the board file.
- UIO nodes removed
- Ordered nodes by increasing unit address
- Removed an unreferenced container node.
- Dropped deprecated 'device_type' for uart0 node.
0010-dt-bindings-spi-cadence-qspi-Add-support-for-Pensand.patch
- Updated since the latest documentation has been converted to yaml
0011-dt-bindings-gpio-Add-Pensando-Elba-SoC-support.patch
- This patch is deleted since the Elba gpio spics is added to the spi dw driver and documented there.
Because of the deletion of patches and merging of code the new patchset is not similar. A changelog is added into the patches for merged code to be helpful on the history.
Brad Larson (11):
dt-bindings: arm: pensando: add Pensando boards
dt-bindings: Add vendor prefix for Pensando Systems
dt-bindings: mmc: Add Pensando Elba SoC binding
dt-bindings: spi: Add compatible for Pensando Elba SoC
spi: dw: Add Pensando Elba SoC SPI Controller bindings
MAINTAINERS: Add entry for PENSANDO
arm64: Add config for Pensando SoC platforms
spi: cadence-quadspi: Add compatible for Pensando Elba SoC
mmc: sdhci-cadence: Add Pensando Elba SoC support
spi: dw: Add support for Pensando Elba SoC
arm64: dts: Add Pensando Elba SoC support
.../bindings/arm/pensando,elba.yaml | 20 ++ .../devicetree/bindings/mmc/cdns,sdhci.yaml | 13 +- .../bindings/spi/cdns,qspi-nor.yaml | 3 +- .../bindings/spi/snps,dw-apb-ssi.yaml | 2 + .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 7 + arch/arm64/Kconfig.platforms | 12 ++ arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/pensando/Makefile | 6 + arch/arm64/boot/dts/pensando/elba-16core.dtsi | 192 ++++++++++++++++++ .../boot/dts/pensando/elba-asic-common.dtsi | 96 +++++++++ arch/arm64/boot/dts/pensando/elba-asic.dts | 23 +++ .../boot/dts/pensando/elba-flash-parts.dtsi | 103 ++++++++++ arch/arm64/boot/dts/pensando/elba.dtsi | 181 +++++++++++++++++ drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-cadence.c | 148 ++++++++++++-- drivers/spi/spi-cadence-quadspi.c | 19 ++ drivers/spi/spi-dw-mmio.c | 85 ++++++++ 18 files changed, 894 insertions(+), 20 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/pensando,elba.yaml create mode 100644 arch/arm64/boot/dts/pensando/Makefile create mode 100644 arch/arm64/boot/dts/pensando/elba-16core.dtsi create mode 100644 arch/arm64/boot/dts/pensando/elba-asic-common.dtsi create mode 100644 arch/arm64/boot/dts/pensando/elba-asic.dts create mode 100644 arch/arm64/boot/dts/pensando/elba-flash-parts.dtsi create mode 100644 arch/arm64/boot/dts/pensando/elba.dtsi
Signature · 1 line
2.17.1
PATCH v3 1/11 dt-bindings: arm: pensando: add Pensando boards
Document the compatible for Pensando Elba SoC boards.
--- .../bindings/arm/pensando,elba.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/pensando,elba.yaml
Documentation/devicetree/bindings/arm/pensando,elba.yaml new file +20 -0
@@ -0,0 +1,20 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/pensando,elba.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Pensando Elba SoC Platforms Device Tree Bindings + +maintainers: + - Brad Larson <[email protected]> + +properties: + $nodename: + const: "/" + compatible: + const: pensando,elba + +additionalProperties: true + +...
Signature · 1 line
2.17.1
Rob Herring
maintainerRe: [PATCH v3 01/11] dt-bindings: arm: pensando: add Pensando boards
Quoted 20 lines · Brad Larson
Document the compatible for Pensando Elba SoC boards.
Signed-off-by Brad Larson <[email protected]>--- .../bindings/arm/pensando,elba.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/pensando,elba.yamlDocumentation/devicetree/bindings/arm/pensando,elba.yaml new file +6
-0@@ -0,0 +1,20 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/pensando,elba.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# +
Documentation/devicetree/bindings/arm/pensando,elba.yaml line 16
Quoted 10 lines
Documentation/devicetree/bindings/arm/pensando,elba.yaml new file +10
-0+title: Pensando Elba SoC Platforms Device Tree Bindings + +maintainers: + - Brad Larson <[email protected]> + +properties: + $nodename: + const: "/" + compatible: + const: pensando,elba
Going to need board compatibles.
Quoted 8 lines
Documentation/devicetree/bindings/arm/pensando,elba.yaml new file +4
-0+ +additionalProperties: true + +...Signature · 1 line
2.17.1
PATCH v3 2/11 dt-bindings: Add vendor prefix for Pensando Systems
In reply to Brad LarsonAdd vendor prefix for Pensando Systems: https://pensando.io
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -880,6 +880,8 @@ patternProperties: description: Parallax Inc. "^pda,.*": description: Precision Design Associates, Inc. + "^pensando,.*": + description: Pensando Systems Inc. "^pericom,.*": description: Pericom Technology Inc. "^pervasive,.*":
Signature · 1 line
2.17.1
Re: [PATCH v3 02/11] dt-bindings: Add vendor prefix for Pensando Systems
Quoted 1 line · Brad Larson
Add vendor prefix for Pensando Systems: https://pensando.io
This should be before patch 1.
Quoted 5 lines
Signed-off-by Brad Larson <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Re: [PATCH v3 02/11] dt-bindings: Add vendor prefix for Pensando Systems
Quoted 5 lines · Rob Herring
Quoted 1 line · Brad Larson
Add vendor prefix for Pensando Systems: https://pensando.io
This should be before patch 1.
ack, will order this way for re-spin of the patch set.
Thanks
Brad
PATCH v3 3/11 dt-bindings: mmc: Add Pensando Elba SoC binding
In reply to Brad LarsonPensando Elba ARM 64-bit SoC is integrated with this IP and explicitly controls byte-lane enables resulting in an additional reg property resource.
--- .../devicetree/bindings/mmc/cdns,sdhci.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml +8 -5
@@ -15,13 +15,16 @@ allOf: properties: compatible: - items: - - enum: - - socionext,uniphier-sd4hc - - const: cdns,sd4hc + oneOf: + - items: + - enum: + - socionext,uniphier-sd4hc + - pensando,elba-emmc + - const: cdns,sd4hc reg: - maxItems: 1 + minItems: 1 + maxItems: 2 interrupts: maxItems: 1
Signature · 1 line
2.17.1
Rob Herring
maintainerRe: [PATCH v3 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
Quoted 9 lines · Brad Larson
Pensando Elba ARM 64-bit SoC is integrated with this IP and explicitly controls byte-lane enables resulting in an additional reg property resource.
Signed-off-by Brad Larson <[email protected]>--- .../devicetree/bindings/mmc/cdns,sdhci.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 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/mmc/cdns,sdhci.yaml:20:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
dtschema/dtc warnings/errors:
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1545481
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
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.
Re: [PATCH v3 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
Hi Rob,
Quoted 27 lines · Rob Herring
Quoted 9 lines · Brad Larson
Pensando Elba ARM 64-bit SoC is integrated with this IP and explicitly controls byte-lane enables resulting in an additional reg property resource.
Signed-off-by Brad Larson <[email protected]>--- .../devicetree/bindings/mmc/cdns,sdhci.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)My bot found errors running 'make DT_CHECKER_FLAGS=-m
dt_binding_check' on your patch (DT_CHECKER_FLAGSis new in v5.13):yamllint warnings/errors:
./Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml:20:9: [warning] wrong indentation: expected 10 but found 8 (indentation)dtschema/dtc warnings/errors:
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1545481
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
Quoted 8 lines
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.
yamllint was not installed, it is now and dtschema is updated to run again before re-submit.
Thanks,
Brad
Rob Herring
maintainerRe: [PATCH v3 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
In reply to Brad LarsonQuoted 22 lines · Brad Larson
Pensando Elba ARM 64-bit SoC is integrated with this IP and explicitly controls byte-lane enables resulting in an additional reg property resource.
Signed-off-by Brad Larson <[email protected]>--- .../devicetree/bindings/mmc/cdns,sdhci.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml +1
-4@@ -15,13 +15,16 @@ allOf: properties: compatible: - items: - - enum: - - socionext,uniphier-sd4hc - - const: cdns,sd4hc + oneOf:
Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml allOf: · line 27
Quoted 10 lines
Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml +7
-1+ - items: + - enum: + - socionext,uniphier-sd4hc + - pensando,elba-emmc + - const: cdns,sd4hc reg: - maxItems: 1 + minItems: 1 + maxItems: 2
If there is more than 1, then you need to describe what each entry is.
Quoted 7 lines
Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml +0
-0interrupts: maxItems: 1Signature · 1 line
2.17.1
Re: [PATCH v3 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
Hi Rob,
Quoted 30 lines · Rob Herring
Quoted 28 lines · Brad Larson
Pensando Elba ARM 64-bit SoC is integrated with this IP and explicitly controls byte-lane enables resulting in an additional reg property resource.
Signed-off-by Brad Larson <[email protected]>--- .../devicetree/bindings/mmc/cdns,sdhci.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml +6
-4@@ -15,13 +15,16 @@ allOf: properties: compatible: - items: - - enum: - - socionext,uniphier-sd4hc - - const: cdns,sd4hc + oneOf: + - items: + - enum: + - socionext,uniphier-sd4hc + - pensando,elba-emmc + - const: cdns,sd4hc
Quoted 6 lines
Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml allOf: · line 27
Quoted 4 lines
Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml +2
-1reg: - maxItems: 1 + minItems: 1 + maxItems: 2If there is more than 1, then you need to describe what each entry is.
The dtschema update and yamllint install shows the errors your bot reported. With the updated cdns,sdhci.yaml to add the description for Elba's two reg items this is what I'm getting with in 5.16.0-rc1 (next-20211116):
(quoted diff) +0 -0
b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml index 4207fed62dfe..c01a7283c468 100644
Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml +33 -6
@@ -12,17 +12,44 @@ maintainers: allOf: - $ref: mmc-controller.yaml + - if: + properties: + compatible: + contains: + enum: + - socionext,uniphier-sd4hc + then: + properties: + reg: + maxItems: 1 + items: + - description: SDHCI CDNS HRS registers + - if: + properties: + compatible: + contains: + enum: + - pensando,elba-emmc + then: + properties: + reg: + maxItems: 2 + items: + - description: SDHCI CDNS HRS registers + - description: Byte lane control register properties: compatible: - items: - - enum: - - microchip,mpfs-sd4hc - - socionext,uniphier-sd4hc - - const: cdns,sd4hc + oneOf: + - items: + - enum: + - socionext,uniphier-sd4hc + - pensando,elba-emmc + - const: cdns,sd4hc reg: - maxItems: 1 + minItems: 1 + maxItems: 2 interrupts: maxItems: 1
$ make DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema-examples.json SCHEMA Documentation/devicetree/bindings/processed-schema-examples.json ... DTEX Documentation/devicetree/bindings/mmc/cdns,sdhci.example.dts DTC Documentation/devicetree/bindings/mmc/cdns,sdhci.example.dt.yaml CHECK Documentation/devicetree/bindings/mmc/cdns,sdhci.example.dt.yaml
These errors are reported for unrelated files not on DT_SCHEMA_FILES
bindings/net/qcom,ipa.yaml: ignoring, error in schema: properties:
qcom,smem-state-names bindings/iio/adc/st,stm32-dfsdm-adc.yaml: ignoring, error in schema:
patternProperties: ^filter@[0-9]+$: properties: st,adc-channel-names bindings/interconnect/qcom,rpmh.yaml: ignoring, error in schema:
properties: qcom,bcm-voter-names
Thanks,
Brad
Re: [PATCH v3 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
Hi Rob,
Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml maintainers: · line 20
Quoted 6 lines · Brad Larson
properties:
compatible:Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml +0
-3- items: - - enum: - - microchip,mpfs-sd4hc
"microchip,mpfs-sd4hc" was inadvertently removed in moving to 5.16.0-rc1 and won't be in the re-spin of the patchset, its recently added.
Also, as you mentioned the patchset should be sent against rc1
Thanks
Brad
PATCH v3 4/11 dt-bindings: spi: Add compatible for Pensando Elba SoC
In reply to Brad LarsonDocument the cadence qspi controller compatible for Pensando Elba SoC boards. The Elba qspi fifo size is 1024.
--- Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +2 -1
@@ -20,6 +20,7 @@ properties: - ti,k2g-qspi - ti,am654-ospi - intel,lgm-qspi + - pensando,elba-qspi - const: cdns,qspi-nor - const: cdns,qspi-nor
@@ -38,7 +39,7 @@ properties: description: Size of the data FIFO in words. $ref: "/schemas/types.yaml#/definitions/uint32" - enum: [ 128, 256 ] + enum: [ 128, 256, 1024 ] default: 128 cdns,fifo-width:
Signature · 1 line
2.17.1
Re: [PATCH v3 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC
Quoted 8 lines · Brad Larson
Document the cadence qspi controller compatible for Pensando Elba SoC boards. The Elba qspi fifo size is 1024.
Signed-off-by Brad Larson <[email protected]>--- Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Re: [PATCH v3 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC
In reply to Brad LarsonHello Brad
The patch name "dt-bindings: spi: Add compatible for Pensando Elba SoC" doesn't mention to what bindings it is referring to. For the sake of having a more representative git log I'd suggest at least to add "cdns" vendor name in the title, like: "dt-bindings: spi: cdns: Add ..." Otherwise it's impossible to understand to what bindings you're adding a new compatibility especially seeing you are doing the similar thing for the DW SPI in the next patch.
-Sergey
Quoted 32 lines · Brad Larson
Document the cadence qspi controller compatible for Pensando Elba SoC boards. The Elba qspi fifo size is 1024.
Signed-off-by Brad Larson <[email protected]>--- Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +2
-1@@ -20,6 +20,7 @@ properties: - ti,k2g-qspi - ti,am654-ospi - intel,lgm-qspi + - pensando,elba-qspi - const: cdns,qspi-nor - const: cdns,qspi-nor@@ -38,7 +39,7 @@ properties: description: Size of the data FIFO in words. $ref: "/schemas/types.yaml#/definitions/uint32" - enum: [ 128, 256 ] + enum: [ 128, 256, 1024 ] default: 128 cdns,fifo-width:Signature · 1 line
2.17.1
Re: [PATCH v3 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC
Hi Sergey,
Quoted 10 lines · Serge Semin
Hello Brad
The patch name "dt-bindings: spi: Add compatible for Pensando Elba SoC" doesn't mention to what bindings it is referring to. For the sake of having a more representative git log I'd suggest at least to add "cdns" vendor name in the title, like: "dt-bindings: spi: cdns: Add ..." Otherwise it's impossible to understand to what bindings you're adding a new compatibility especially seeing you are doing the similar thing for the DW SPI in the next patch.
I'll add "cdns" to the git log for the re-spin.
Thanks
Brad
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v3 5/11 spi: dw: Add Pensando Elba SoC SPI Controller bindings
In reply to Brad LarsonThe Pensando Elba SoC has integrated the DW APB SPI Controller
--- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +2 -0
@@ -73,6 +73,8 @@ properties: - renesas,r9a06g032-spi # RZ/N1D - renesas,r9a06g033-spi # RZ/N1S - const: renesas,rzn1-spi # RZ/N1 + - description: Pensando Elba SoC SPI Controller + const: pensando,elba-spi reg: minItems: 1
Signature · 1 line
2.17.1
Re: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings
Quoted 7 lines · Brad Larson
The Pensando Elba SoC has integrated the DW APB SPI Controller
Signed-off-by Brad Larson <[email protected]>--- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 2 ++ 1 file changed, 2 insertions(+)
Re: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings
In reply to Brad LarsonQuoted 1 line · Brad Larson
The Pensando Elba SoC has integrated the DW APB SPI Controller
Please add the "dt-bindings: " prefix to the patch name and discard the word "bindings" from the title as the submitting DT-patches requires:Documentation/devicetree/bindings/submitting-patches.rst
Quoted 11 lines
Signed-off-by Brad Larson <[email protected]>--- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +0
-0
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml properties: · line 78
Quoted 6 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +2
-0@@ -73,6 +73,8 @@ properties: - renesas,r9a06g032-spi # RZ/N1D - renesas,r9a06g033-spi # RZ/N1S - const: renesas,rzn1-spi # RZ/N1 + - description: Pensando Elba SoC SPI Controller + const: pensando,elba-spi
AFAICS from the driver-part of the patchset it's not enough. You've also got the syscon phandle, which needs to be reflected in the bindings. That also makes me thinking that you didn't perform the "dtbs_check" on the dts-files you were going to submit, but for some reason discarded from this series (btw why?). If you did you would have got an error of an unevaluated property detection.
-Sergey
Quoted 6 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +0
-0reg: minItems: 1Signature · 1 line
2.17.1
Re: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings
Quoted 26 lines · Serge Semin
Quoted 1 line · Brad Larson
The Pensando Elba SoC has integrated the DW APB SPI Controller
Please add the "dt-bindings: " prefix to the patch name and discard the word "bindings" from the title as the submitting DT-patches requires:
Documentation/devicetree/bindings/submitting-patches.rstQuoted 11 lines
Signed-off-by Brad Larson <[email protected]>--- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +0
-0Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml properties: · line 78
Quoted 6 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +2
-0@@ -73,6 +73,8 @@ properties: - renesas,r9a06g032-spi # RZ/N1D - renesas,r9a06g033-spi # RZ/N1S - const: renesas,rzn1-spi # RZ/N1 + - description: Pensando Elba SoC SPI Controller + const: pensando,elba-spi
Quoted 6 lines
AFAICS from the driver-part of the patchset it's not enough. You've also got the syscon phandle, which needs to be reflected in the bindings. That also makes me thinking that you didn't perform the "
dtbs_check" on the dts-files you were going to submit,but for some reason discarded from this series (btw why?).
Oops. Found it. The question regarding "dtbs_check" is still actual.
-Sergey
Quoted 11 lines
If you did you would
have got an error of an unevaluated property detection.-Sergey
Quoted 6 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +0
-0reg: minItems: 1Signature · 1 line
2.17.1
Re: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings
In reply to Serge SeminHi Sergey,
Quoted 8 lines · Serge Semin
Quoted 1 line · Brad Larson
The Pensando Elba SoC has integrated the DW APB SPI Controller
Please add the "dt-bindings: " prefix to the patch name and discard the word "bindings" from the title as the submitting DT-patches requires:
Documentation/devicetree/bindings/submitting-patches.rst
I'll add that. I recall looking at the recent git log for similar changes to the file as the current recommended approach.
Quoted 18 lines
Quoted 11 lines
Signed-off-by Brad Larson <[email protected]>--- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +0
-0Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml properties: · line 78
Quoted 6 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +2
-0@@ -73,6 +73,8 @@ properties: - renesas,r9a06g032-spi # RZ/N1D - renesas,r9a06g033-spi # RZ/N1S - const: renesas,rzn1-spi # RZ/N1 + - description: Pensando Elba SoC SPI Controller + const: pensando,elba-spi
Quoted 6 lines
AFAICS from the driver-part of the patchset it's not enough. You've also got the syscon phandle, which needs to be reflected in the bindings. That also makes me thinking that you didn't perform the "
dtbs_check" on the dts-files you were going to submit, but for some reason discarded from this series (btw why?). If you did you would have got an error of an unevaluated property detection.
I ran the checks below and didn't get errors. Rob provided some info and I found the server did not have yamllint installed (not flagged by tool). Also dt-schema was not the latest. I'm re-doing this and including "DT_CHECKER_FLAGS=-m" as that is new with v5.13.
make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/vendor-prefixes.yaml make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/pensando,elba.yaml
make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/vendor-prefixes.yaml make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/pensando,elba.yaml
Thanks
Brad
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings
Quoted 46 lines · Brad Larson
Hi Sergey,
Quoted 8 lines · Serge Semin
Quoted 1 line · Brad Larson
The Pensando Elba SoC has integrated the DW APB SPI Controller
Please add the "dt-bindings: " prefix to the patch name and discard the word "bindings" from the title as the submitting DT-patches requires:
Documentation/devicetree/bindings/submitting-patches.rstI'll add that. I recall looking at the recent git log for similar changes to the file as the current recommended approach.
Quoted 18 lines
Quoted 11 lines
Signed-off-by Brad Larson <[email protected]>--- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +0
-0Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml properties: · line 78
Quoted 6 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +2
-0@@ -73,6 +73,8 @@ properties: - renesas,r9a06g032-spi # RZ/N1D - renesas,r9a06g033-spi # RZ/N1S - const: renesas,rzn1-spi # RZ/N1 + - description: Pensando Elba SoC SPI Controller + const: pensando,elba-spiQuoted 6 lines
AFAICS from the driver-part of the patchset it's not enough. You've also got the syscon phandle, which needs to be reflected in the bindings. That also makes me thinking that you didn't perform the "
dtbs_check" on the dts-files you were going to submit, but for some reason discarded from this series (btw why?). If you did you would have got an error of an unevaluated property detection.I ran the checks below and didn't get errors. Rob provided some info and I found the server did not have yamllint installed (not flagged by tool). Also dt-schema was not the latest. I'm re-doing this and including "DT_CHECKER_FLAGS=-m" as that is new with v5.13.
Quoted 10 lines
make ARCH=arm64
dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/vendor-prefixes.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/pensando,elba.yaml
Hmm, that's weird. Rob, does dtschema tool have the "unevaluatedProperties" property support?
Brad, anyway you still need to add the syscon-property (pensando,*spics) requirement in the snps,dw-apb-ssi.yaml schema. See the way it's done there for instance for "baikal,bt1-sys-ssi" when it comes to the vendor-specific properties definition in the allOf composition block. You'll need to define a custom phandle property there in case if a DT-node is compatible with you SPI controller.
-Sergey
Quoted 14 lines
make
dt_binding_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml makedt_binding_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml makedt_binding_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml makedt_binding_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/vendor-prefixes.yaml makedt_binding_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/pensando,elba.yamlThanks
Brad
Re: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings
Hi Sergey,
Quoted 28 lines · Serge Semin
Quoted 14 lines
Quoted 7 lines
AFAICS from the driver-part of the patchset it's not enough. You've also got the syscon phandle, which needs to be reflected in the bindings. That also makes me thinking that you didn't perform the "
dtbs_check" on the dts-files you were going to submit, but for some reason discarded from this series (btw why?). If you did you would have got an error of an unevaluated property detection.I ran the checks below and didn't get errors. Rob provided some info and I found the server did not have yamllint installed (not flagged by tool). Also dt-schema was not the latest. I'm re-doing this and including "DT_CHECKER_FLAGS=-m" as that is new with v5.13.
Quoted 10 lines
make ARCH=arm64
dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/vendor-prefixes.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/pensando,elba.yamlHmm, that's weird. Rob, does dtschema tool have the "unevaluatedProperties" property support?
Quoted 6 lines
Brad, anyway you still need to add the syscon-property (pensando,*spics) requirement in the snps,dw-apb-ssi.yaml schema. See the way it's done there for instance for "baikal,bt1-sys-ssi" when it comes to the vendor-specific properties definition in the allOf composition block. You'll need to define a custom phandle property there in case if a DT-node is compatible with you SPI controller.
Updating and adding only this bindings update to file snps,dw-apb-ssi.yaml in 5.16.0-rc1 (next-20211116):
(quoted diff) +0 -0
b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml index d7e08b03e204..99deb587a47b 100644
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +17 -0
@@ -37,6 +37,21 @@ allOf: else: required: - interrupts + - if: + properties: + compatible: + contains: + enum: + - pensando,elba-spics + then: + properties: + pensando,spics: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the system control device node which provides access to + the spics control register + required: + - pensando,spics properties: compatible:
@@ -73,6 +88,8 @@ properties: - renesas,r9a06g032-spi # RZ/N1D - renesas,r9a06g033-spi # RZ/N1S - const: renesas,rzn1-spi # RZ/N1 + - description: Pensando Elba SoC SPI Controller + const: pensando,elba-spics reg: minItems: 1
$ make ARCH=arm64 defconfig ...
$ make DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml ... DTEX Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dts DTC Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dt.yaml CHECK Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dt.yaml Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dt.yaml:0:0: /example-0/spi@fff00000/flash@1: failed to match any schema with compatible: ['spi-nand']
The spi-nand schema match failure happens before I make any change. The tool also throws errors for these files which are unrelated
Documentation/devicetree/bindings/net/qcom,ipa.yaml: ignoring, error in schema: properties: qcom,smem-state-names Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml:
ignoring, error in schema: patternProperties: ^filter@[0-9]+$:
properties: st,adc-channel-names Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml:
ignoring, error in schema: properties: qcom,bcm-voter-names
Thanks,
Brad
Re: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings
Quoted 47 lines · Brad Larson
Hi Sergey,
Quoted 28 lines · Serge Semin
Quoted 14 lines
Quoted 7 lines
AFAICS from the driver-part of the patchset it's not enough. You've also got the syscon phandle, which needs to be reflected in the bindings. That also makes me thinking that you didn't perform the "
dtbs_check" on the dts-files you were going to submit, but for some reason discarded from this series (btw why?). If you did you would have got an error of an unevaluated property detection.I ran the checks below and didn't get errors. Rob provided some info and I found the server did not have yamllint installed (not flagged by tool). Also dt-schema was not the latest. I'm re-doing this and including "DT_CHECKER_FLAGS=-m" as that is new with v5.13.
Quoted 10 lines
make ARCH=arm64
dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/vendor-prefixes.yaml make ARCH=arm64dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/pensando,elba.yamlHmm, that's weird. Rob, does dtschema tool have the "unevaluatedProperties" property support?
Quoted 6 lines
Brad, anyway you still need to add the syscon-property (pensando,*spics) requirement in the snps,dw-apb-ssi.yaml schema. See the way it's done there for instance for "baikal,bt1-sys-ssi" when it comes to the vendor-specific properties definition in the allOf composition block. You'll need to define a custom phandle property there in case if a DT-node is compatible with you SPI controller.
Updating and adding only this bindings update to file snps,dw-apb-ssi.yaml in 5.16.0-rc1 (next-20211116):
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +0
-0
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml allOf: · line 46
Quoted 10 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +6
-0@@ -37,6 +37,21 @@ allOf: else: required: - interrupts + - if: + properties: + compatible: + contains: + enum: + - pensando,elba-spics
I was wrong using that construction here (fixup patch would be very welcome) seeing the "snps,dw-apb-ssi" doesn't permit having a generic "snps,dw*" compatible string. So just const-compatible property should be enough:
+ compatible:
+ const: pensando,elba-spics
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml allOf:
Quoted 10 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +9
-0+ then: + properties: + pensando,spics: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the system control device node which provides access to + the spics control register + required: + - pensando,spics
Please note, I've asked to be more specific in this property naming. Something like this should be fine "pensando,elba-syscon-spics"/"pensando,syscon-spics".
Quoted 13 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +0
-0properties:compatible:
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +2
-0@@ -73,6 +88,8 @@ properties: - renesas,r9a06g032-spi # RZ/N1D - renesas,r9a06g033-spi # RZ/N1S - const: renesas,rzn1-spi # RZ/N1 + - description: Pensando Elba SoC SPI Controller + const: pensando,elba-spics reg: minItems: 1
Quoted 6 lines
$ make ARCH=arm64 defconfig ...$ make DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
I am kind of surprised that this command is still evaluating all the schemas. Compiling only the depended DT-schemas would much better... Anyway that's why you are getting unrelated to the snps,dw-apb-ssi.yaml errors.
Quoted 7 lines
...
DTEX Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dts DTC Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dt.yaml CHECK Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dt.yaml
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dt.yaml:0:0:
/example-0/spi@fff00000/flash@1: failed to match any schema with
compatible: ['spi-nand']
That means there is no bindings defined for the "spi-nand"-compatible node. AFAICS it doesn't make the tool to fail though. Anyway fixing this part would be a subject of additional patches (which would be very appreciated). That would concern converting the Documentation/devicetree/bindings/mtd/spi-nand.txt legacy bindings to the DT-schema. It's not enough though. Seeing that file lacks of the NAND Flash specific DT-property description, you'd need to detach ones (described by the "^nand@[a-f0-9]$"-pattern property) from the Documentation/devicetree/bindings/mtd/nand-controller.yaml schema and place them into a separate DT-schema file for generic nand-flashes Documentation/devicetree/bindings/mtd/nand-flash.yaml in a framework of a pre-requisite patch. Than in the legacy bindings conversion patch you'd need to use it to correctly evaluate a generic NAND flash node. Adding some example properties to the DT-schema would be also required.
-Sergey
Quoted 14 lines
The spi-nand schema match failure happens before I make any change. The tool also throws errors for these files which are unrelated
Documentation/devicetree/bindings/net/qcom,ipa.yaml: ignoring, error in schema: properties: qcom,smem-state-namesDocumentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml:
ignoring, error in schema: patternProperties: ^filter@[0-9]+$:
properties: st,adc-channel-namesDocumentation/devicetree/bindings/interconnect/qcom,rpmh.yaml:
ignoring, error in schema: properties: qcom,bcm-voter-namesThanks,
Brad
Re: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings
Hi Sergey,
Quoted 19 lines · Serge Semin
I was wrong using that construction here (fixup patch would be very welcome) seeing the "snps,dw-apb-ssi" doesn't permit having a generic "snps,dw*" compatible string. So just const-compatible property should be enough:
(quoted diff) +2
-0+ compatible: + const: pensando,elba-spicsQuoted 10 lines
(quoted diff) +8
-0+ then: + properties: + pensando,spics: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the system control device node which provides access to + the spics control register + required:
Quoted 5 lines
Quoted 1 line
+ - pensando,spics
Please note, I've asked to be more specific in this property naming. Something like this should be fine "pensando,elba-syscon-spics"/"pensando,syscon-spics".
I would have avoided a typo in the last reply if the spics property was more specific. Based on needed construction like this?
DT:
spi0: spi@2800 {
compatible = "pensando,elba-spi";
reg = <0x0 0x2800 0x0 0x100>;
pensando,elba-syscon-spics = <&mssoc 0x2468>;
clocks = <&ahb_clk>;
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
num-cs = <2>;
status = "disabled";
};Binding:
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +11 -0
@@ -37,6 +37,15 @@ allOf: else: required: - interrupts + - if: + properties: + compatible: + contains: + enum: + - pensando,elba-spi + then: + required: + - pensando,elba-syscon-spics properties: compatible:
@@ -73,6 +82,8 @@ properties: - renesas,r9a06g032-spi # RZ/N1D - renesas,r9a06g033-spi # RZ/N1S - const: renesas,rzn1-spi # RZ/N1 + - description: Pensando Elba SoC SPI Controller + const: pensando,elba-spi reg: minItems: 1
Thanks,
Brad
PATCH v3 6/11 MAINTAINERS: Add entry for PENSANDO
In reply to Brad LarsonAdd entry for PENSANDO maintainer and files
--- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+)
MAINTAINERS +7 -0
@@ -2364,6 +2364,13 @@ S: Maintained W: http://hackndev.com F: arch/arm/mach-pxa/palmz72.* +ARM/PENSANDO ARM64 ARCHITECTURE +M: Brad Larson <[email protected]> +L: [email protected] (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/*/pensando* +F: arch/arm64/boot/dts/pensando/ + ARM/PLEB SUPPORT M: Peter Chubb <[email protected]> S: Maintained
Signature · 1 line
2.17.1
PATCH v3 7/11 arm64: Add config for Pensando SoC platforms
In reply to Brad LarsonAdd ARCH_PENSANDO configuration option for Pensando SoC based platforms.
--- arch/arm64/Kconfig.platforms | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/Kconfig.platforms +12 -0
@@ -209,6 +209,18 @@ config ARCH_MXC This enables support for the ARMv8 based SoCs in the NXP i.MX family. +config ARCH_PENSANDO + bool "Pensando Platforms" + help + This enables support for the ARMv8 based Pensando SoC + family to include the Elba SoC. + + Pensando SoCs support a range of Distributed Services + Cards in PCIe format installed into servers. The Elba + SoC includes 16 A-72 CPU cores, 144 programmable P4 + cores for a minimal latency/jitter datapath, and network + interfaces up to 100 Gb/s. + config ARCH_QCOM bool "Qualcomm Platforms" select GPIOLIB
Signature · 1 line
2.17.1
PATCH v3 8/11 spi: cadence-quadspi: Add compatible for Pensando Elba SoC
In reply to Brad LarsonThe Pensando Elba SoC has the Cadence QSPI controller integrated.
The quirk CQSPI_NEEDS_APB_AHB_HAZARD_WAR is added and if enabled a dummy readback from the controller is performed to ensure synchronization.
--- drivers/spi/spi-cadence-quadspi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/spi/spi-cadence-quadspi.c +19 -0
@@ -35,6 +35,7 @@/* Quirks */ #define CQSPI_NEEDS_WR_DELAY BIT(0)#define CQSPI_DISABLE_DAC_MODE BIT(1) +#define CQSPI_NEEDS_APB_AHB_HAZARD_WAR BIT(2)/* Capabilities */ #define CQSPI_SUPPORTS_OCTAL BIT(0)
@@ -74,6 +75,7 @@ struct cqspi_st {int current_cs;unsigned long master_ref_clk_hz;bool is_decoded_cs; +bool apb_ahb_hazard;u32 fifo_depth;u32 fifo_width;u32 num_chipselect;
@@ -862,6 +864,13 @@ static int cqspi_indirect_write_execute(struct cqspi_flash_pdata *f_pdata,if (cqspi->wr_delay)ndelay (cqspi->wr_delay); +/* +* If a hazard exists between the APB and AHB interfaces, perform a +* dummy readback from the controller to ensure synchronization. +*/ +if (cqspi->apb_ahb_hazard) + (void )readl (reg_base +CQSPI_REG_INDIRECTWR ); +while (remaining >0 ) {size_t write_words, mod_bytes;
@@ -1548,6 +1557,8 @@ static int cqspi_probe(struct platform_device *pdev) master->mode_bits |=SPI_RX_OCTAL |SPI_TX_OCTAL ;if (!(ddata->quirks &CQSPI_DISABLE_DAC_MODE )) cqspi->use_direct_mode = true; +if (ddata->quirks &CQSPI_NEEDS_APB_AHB_HAZARD_WAR ) + cqspi->apb_ahb_hazard = true; } ret = devm_request_irq(dev, irq, cqspi_irq_handler, 0,
@@ -1656,6 +1667,10 @@ static const struct cqspi_driver_platdata intel_lgm_qspi = { .quirks = CQSPI_DISABLE_DAC_MODE, }; +static const struct cqspi_driver_platdata pen_cdns_qspi = { + .quirks =CQSPI_NEEDS_APB_AHB_HAZARD_WAR |CQSPI_DISABLE_DAC_MODE , +}; +static const struct of_device_id cqspi_dt_ids[] = { { .compatible ="cdns,qspi-nor" ,
@@ -1673,6 +1688,10 @@ static const struct of_device_id cqspi_dt_ids[] = { .compatible = "intel,lgm-qspi", .data = &intel_lgm_qspi, }, + { + .compatible = "pensando,elba-qspi", + .data = &pen_cdns_qspi, + }, {/* end of table */ } };
Signature · 1 line
2.17.1
PATCH v3 9/11 mmc: sdhci-cadence: Add Pensando Elba SoC support
In reply to Brad LarsonAdd support for Pensando Elba SoC which explicitly controls byte-lane enables on writes. Add priv_write_l() which is used on Elba platforms for byte-lane control.
Select MMC_SDHCI_IO_ACCESSORS for MMC_SDHCI_CADENCE which allows Elba SoC sdhci_elba_ops to overwrite the SDHCI IO memory accessors.
---
Changelog:
- Ulf and Yamada-san agreed the amount of code for this support is not enough to need a new file. The support is added into sdhci-cadence.c and new files sdhci-cadence-elba.c and sdhci-cadence.h are deleted.
- Redundant defines are removed (e.g. use SDHCI_CDNS_HRS04 and remove SDIO_REG_HRS4).
- Removed phy init function sd4_set_dlyvr() and used existing sdhci_cdns_phy_init(). Init values are from DT properties.
- Replace devm_ioremap_resource(&pdev->dev, iomem)
with devm_platform_ioremap_resource(pdev, 1)
- Refactored the elba priv_writ_l() and elba_write_l() to remove a little redundant code.
- The config option CONFIG_MMC_SDHCI_CADENCE_ELBA goes away.
- Only C syntax and Elba functions are prefixed with elba_
drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-cadence.c | 148 ++++++++++++++++++++++++++++--- 2 files changed, 135 insertions(+), 14 deletions(-)
drivers/mmc/host/Kconfig +1 -0
@@ -243,6 +243,7 @@ config MMC_SDHCI_CADENCE tristate "SDHCI support for the Cadence SD/SDIO/eMMC controller" depends on MMC_SDHCI_PLTFM depends on OF + select MMC_SDHCI_IO_ACCESSORS help This selects the Cadence SD/SDIO/eMMC driver.
drivers/mmc/host/sdhci-cadence.c +134 -14
233 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 10/11 spi: dw: Add support for Pensando Elba SoC
In reply to Brad LarsonThe Pensando Elba SoC includes a DW apb_ssi v4 controller with device specific chip-select control. The Elba SoC provides four chip-selects where the native DW IP supports two chip-selects.
---
Changelog:
- Changed the implementation to use existing dw_spi_set_cs() and integrated Elba specific CS control into spi-dw-mmio.c. The native designware support is for two chip-selects while Elba provides 4 chip-selects. Instead of adding a new file for this support in gpio-elba-spics.c the support is in one file (spi-dw-mmio.c).
drivers/spi/spi-dw-mmio.c | 85 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)
drivers/spi/spi-dw-mmio.c +85 -0
@@ -53,6 +53,24 @@ struct dw_spi_mscc {void __iomem *spi_mst;/* Not sparx5 */ }; +struct dw_spi_elba { +struct regmap *regmap; +unsigned int reg; +}; + +/* +* Elba SoC does not use ssi, pin override is used for cs 0,1 and +* gpios for cs 2,3 as defined in the device tree. +* +* cs: | 1 0 +* bit: |---3-------2-------1-------0 +* | cs1 cs1_ovr cs0 cs0_ovr +*/ +#define ELBA_SPICS_SHIFT (cs) (2 * (cs)) +#define ELBA_SPICS_MASK (cs) (0x3 << ELBA_SPICS_SHIFT(cs)) +#define ELBA_SPICS_SET (cs, val) \ + ((((val) << 1) | 0x1) << ELBA_SPICS_SHIFT(cs)) +/* * The Designware SPI controller (referred to as master in the documentation) * automatically deasserts chip select when the tx fifo is empty. The chip
@@ -237,6 +255,72 @@ static int dw_spi_canaan_k210_init(struct platform_device *pdev,return 0 ; } +static void elba_spics_set_cs (struct dw_spi_elba *dwselba,int cs,int enable) +{ +regmap_update_bits (dwselba->regmap, dwselba->reg,ELBA_SPICS_MASK (cs), +ELBA_SPICS_SET (cs, enable)); +} + +static void dw_spi_elba_set_cs (struct spi_device *spi,bool enable) +{ +struct dw_spi *dws =spi_master_get_devdata (spi->master); + struct dw_spi_mmio *dwsmmio = container_of(dws, struct dw_spi_mmio, dws); +struct dw_spi_elba *dwselba = dwsmmio->priv; +u8 cs = spi->chip_select; + +if (cs <2 ) { +/* overridden native chip-select */ +elba_spics_set_cs (dwselba, spi->chip_select, enable); + } + +/* +* The DW SPI controller needs a native CS bit selected to start +* the serial engine, and we have fewer native CSs than we need, so +* use CS0 always. +*/ + spi->chip_select =0 ; +dw_spi_set_cs (spi, enable); + spi->chip_select = cs; +} + +static int dw_spi_elba_init (struct platform_device *pdev, +struct dw_spi_mmio *dwsmmio) +{ +struct of_phandle_args args; +struct dw_spi_elba *dwselba; +struct regmap *regmap; +int rc; + + rc =of_parse_phandle_with_fixed_args (pdev->dev.of_node, +"pensando,spics" ,1 ,0 , &args); +if (rc) { +dev_err (&pdev->dev,"could not find pensando,spics\n" ); +return rc; + } + + regmap =syscon_node_to_regmap (args.np); +if (IS_ERR (regmap)) { +dev_err (&pdev->dev,"could not map pensando,spics\n" ); +return PTR_ERR (regmap); + } + + dwselba =devm_kzalloc (&pdev->dev,sizeof (*dwselba),GFP_KERNEL ); +if (!dwselba) +return -ENOMEM ; + + dwselba->regmap = regmap; + dwselba->reg = args.args[0 ]; + +/* deassert cs */ +elba_spics_set_cs (dwselba,0 ,1 ); +elba_spics_set_cs (dwselba,1 ,1 ); + + dwsmmio->priv = dwselba; + dwsmmio->dws.set_cs = dw_spi_elba_set_cs; + +return 0 ; +} +static int dw_spi_mmio_probe (struct platform_device *pdev) { int (*init_func)(struct platform_device *pdev,
@@ -351,6 +435,7 @@ static const struct of_device_id dw_spi_mmio_of_match[] = { { .compatible = "intel,keembay-ssi", .data = dw_spi_keembay_init}, { .compatible = "microchip,sparx5-spi", dw_spi_mscc_sparx5_init}, { .compatible = "canaan,k210-spi", dw_spi_canaan_k210_init}, + { .compatible = "pensando,elba-spi", .data = dw_spi_elba_init}, { /* end of table */} };MODULE_DEVICE_TABLE (of, dw_spi_mmio_of_match);
Signature · 1 line
2.17.1
Re: [PATCH v3 10/11] spi: dw: Add support for Pensando Elba SoC
Quoted 25 lines · Brad Larson
The Pensando Elba SoC includes a DW
apb_ssiv4 controller with device specific chip-select control. The Elba SoC provides four chip-selects where the native DW IP supports two chip-selects.Signed-off-by Brad Larson <[email protected]>---
Changelog:
- Changed the implementation to use existingdw_spi_set_cs()and integrated Elba specific CS control intospi-dw-mmio.c. The native designware support is for two chip-selects while Elba provides 4 chip-selects. Instead of adding a new file for this support ingpio-elba-spics.cthe support is in one file (spi-dw-mmio.c).drivers/spi/spi-dw-mmio.c | 85 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)drivers/spi/spi-dw-mmio.c +0
-0@@ -53,6 +53,24 @@ struct dw_spi_mscc {void __iomem *spi_mst;/* Not sparx5 */ };
drivers/spi/spi-dw-mmio.c struct dw_spi_mscc { · line 64
Quoted 10 lines
drivers/spi/spi-dw-mmio.c +8
-0+struct dw_spi_elba { +struct regmap *regmap; +unsigned int reg; +}; + +/* +* Elba SoC does not use ssi, pin override is used for cs 0,1 and +* gpios for cs 2,3 as defined in the device tree.
I believe GPIO-based CS is the platform-property rather than the SoC one. It's up to the board designers which GPIOs to use as a custom chip-select signal. Thus it would be better to discard the comment regarding the GPIOs here.
Quoted 29 lines
drivers/spi/spi-dw-mmio.c +10
-0+* +* cs: | 1 0 +* bit: |---3-------2-------1-------0 +* | cs1 cs1_ovr cs0 cs0_ovr +*/ +#define ELBA_SPICS_SHIFT (cs) (2 * (cs)) +#define ELBA_SPICS_MASK (cs) (0x3 << ELBA_SPICS_SHIFT(cs)) +#define ELBA_SPICS_SET (cs, val) \ + ((((val) << 1) | 0x1) << ELBA_SPICS_SHIFT(cs)) +/* * The Designware SPI controller (referred to as master in the documentation) * automatically deasserts chip select when the tx fifo is empty. The chip
drivers/spi/spi-dw-mmio.c +12
-0@@ -237,6 +255,72 @@ static int dw_spi_canaan_k210_init(struct platform_device *pdev,return 0 ; } +static void elba_spics_set_cs (struct dw_spi_elba *dwselba,int cs,int enable) +{ +regmap_update_bits (dwselba->regmap, dwselba->reg,ELBA_SPICS_MASK (cs), +ELBA_SPICS_SET (cs, enable)); +} + +static void dw_spi_elba_set_cs (struct spi_device *spi,bool enable) +{ +struct dw_spi *dws =spi_master_get_devdata (spi->master); + struct dw_spi_mmio *dwsmmio = container_of(dws, struct dw_spi_mmio, dws); +struct dw_spi_elba *dwselba = dwsmmio->priv; +u8 cs = spi->chip_select;
drivers/spi/spi-dw-mmio.c static int dw_spi_canaan_k210_init(struct platform_device *pdev, · line 279
Quoted 10 lines
drivers/spi/spi-dw-mmio.c +9
-0+ +if (cs <2 ) { +/* overridden native chip-select */ +elba_spics_set_cs (dwselba, spi->chip_select, enable); + } + +/* +* The DW SPI controller needs a native CS bit selected to start +* the serial engine, and we have fewer native CSs than we need, so
^
+ "the platform may have ..."
drivers/spi/spi-dw-mmio.c static int dw_spi_canaan_k210_init(struct platform_device *pdev, · line 283
Quoted 5 lines
drivers/spi/spi-dw-mmio.c +5
-0+* use CS0 always. +*/ + spi->chip_select =0 ; +dw_spi_set_cs (spi, enable); + spi->chip_select = cs;
Is it correct to think that the DW SSI output CS signals are multiplexed between the native DW SSI CS logic and the logic implemented in the ELBA SPICS syscon? Thus by setting "csX_ovr" in the ELBA_SPICS CSR do you get to switch between the DW SSI SER logic and the signal level selected by the "csX" field of that register?
* Most likely I already asked this question in v2 but it was long time ago, so it's better to clarify things over.
Quoted 13 lines
drivers/spi/spi-dw-mmio.c +12
-0+} + +static int dw_spi_elba_init (struct platform_device *pdev, +struct dw_spi_mmio *dwsmmio) +{ +struct of_phandle_args args; +struct dw_spi_elba *dwselba; +struct regmap *regmap; +int rc; + + rc =of_parse_phandle_with_fixed_args (pdev->dev.of_node, +"pensando,spics" ,1 ,0 , &args);
drivers/spi/spi-dw-mmio.c static int dw_spi_canaan_k210_init(struct platform_device *pdev, · line 305
Quoted 10 lines
drivers/spi/spi-dw-mmio.c +10
-0+if (rc) { +dev_err (&pdev->dev,"could not find pensando,spics\n" ); +return rc; + } + + regmap =syscon_node_to_regmap (args.np); +if (IS_ERR (regmap)) { +dev_err (&pdev->dev,"could not map pensando,spics\n" ); +return PTR_ERR (regmap); + }
There is a good wrapper for this: syscon_regmap_lookup_by_phandle_args() .
The property name isn't well descriptive in the syscon-related part. Could you add something like:
"pensando,elba-syscon-spics"/"pensando,syscon-spics"?
-Sergey
Quoted 32 lines
drivers/spi/spi-dw-mmio.c +18
-0+ + dwselba =devm_kzalloc (&pdev->dev,sizeof (*dwselba),GFP_KERNEL ); +if (!dwselba) +return -ENOMEM ; + + dwselba->regmap = regmap; + dwselba->reg = args.args[0 ]; + +/* deassert cs */ +elba_spics_set_cs (dwselba,0 ,1 ); +elba_spics_set_cs (dwselba,1 ,1 ); + + dwsmmio->priv = dwselba; + dwsmmio->dws.set_cs = dw_spi_elba_set_cs; + +return 0 ; +} +static int dw_spi_mmio_probe (struct platform_device *pdev){
drivers/spi/spi-dw-mmio.c +1
-0int (*init_func)(struct platform_device *pdev,@@ -351,6 +435,7 @@ static const struct of_device_id dw_spi_mmio_of_match[] = { { .compatible = "intel,keembay-ssi", .data = dw_spi_keembay_init}, { .compatible = "microchip,sparx5-spi", dw_spi_mscc_sparx5_init}, { .compatible = "canaan,k210-spi", dw_spi_canaan_k210_init}, + { .compatible = "pensando,elba-spi", .data = dw_spi_elba_init}, { /* end of table */} };MODULE_DEVICE_TABLE (of, dw_spi_mmio_of_match);Signature · 1 line
2.17.1
Re: [PATCH v3 10/11] spi: dw: Add support for Pensando Elba SoC
In reply to Brad LarsonQuoted 5 lines · Brad Larson
The Pensando Elba SoC includes a DW
apb_ssiv4 controller with device specific chip-select control. The Elba SoC provides four chip-selects where the native DW IP supports two chip-selects.
...
drivers/spi/spi-dw-mmio.c static int dw_spi_canaan_k210_init(struct platform_device *pdev, · line 269
Quoted 7 lines
drivers/spi/spi-dw-mmio.c +6
-0+static void dw_spi_elba_set_cs (struct spi_device *spi,bool enable) +{ +struct dw_spi *dws =spi_master_get_devdata (spi->master); + struct dw_spi_mmio *dwsmmio = container_of(dws, struct dw_spi_mmio, dws); +struct dw_spi_elba *dwselba = dwsmmio->priv; +u8 cs = spi->chip_select;
Much easier to maintain and follow the code (in the future) if this assignment is broken to two parts, i.e...
Quoted 1 line
+
...like this
cs = spi->chip_select;
if (cs < 2) {
...Quoted 4 lines
drivers/spi/spi-dw-mmio.c +4
-0+if (cs <2 ) { +/* overridden native chip-select */ +elba_spics_set_cs (dwselba, spi->chip_select, enable); + }
...
drivers/spi/spi-dw-mmio.c static int dw_spi_canaan_k210_init(struct platform_device *pdev, · line 305
Quoted 5 lines
drivers/spi/spi-dw-mmio.c +5
-0+ regmap =syscon_node_to_regmap (args.np); +if (IS_ERR (regmap)) { +dev_err (&pdev->dev,"could not map pensando,spics\n" ); +return PTR_ERR (regmap); + }
Why not return dev_err_probe()?
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v3 11/11 arm64: dts: Add Pensando Elba SoC support
In reply to Brad LarsonAdd Pensando common and Elba SoC specific device nodes
---
Changelog:
- Node names changed to DT generic names
- Changed from using 'spi@' which is reserved
- The elba-flash-parts.dtsi is kept separate as it is included in multiple dts files.
- SPDX license tags at the top of each file
- The compatible = "pensando,elba" and 'model' are now together in the board file.
- UIO nodes removed
- Ordered nodes by increasing unit address
- Removed an unreferenced container node.
- Dropped deprecated 'device_type' for uart0 node.
arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/pensando/Makefile | 6 + arch/arm64/boot/dts/pensando/elba-16core.dtsi | 192 ++++++++++++++++++ .../boot/dts/pensando/elba-asic-common.dtsi | 96 +++++++++ arch/arm64/boot/dts/pensando/elba-asic.dts | 23 +++ .../boot/dts/pensando/elba-flash-parts.dtsi | 103 ++++++++++ arch/arm64/boot/dts/pensando/elba.dtsi | 181 +++++++++++++++++ 7 files changed, 602 insertions(+) create mode 100644 arch/arm64/boot/dts/pensando/Makefile create mode 100644 arch/arm64/boot/dts/pensando/elba-16core.dtsi create mode 100644 arch/arm64/boot/dts/pensando/elba-asic-common.dtsi create mode 100644 arch/arm64/boot/dts/pensando/elba-asic.dts create mode 100644 arch/arm64/boot/dts/pensando/elba-flash-parts.dtsi create mode 100644 arch/arm64/boot/dts/pensando/elba.dtsi
arch/arm64/boot/dts/Makefile +1 -0
@@ -20,6 +20,7 @@ subdir-y += marvell subdir-y += mediatek subdir-y += microchip subdir-y += nvidia +subdir-y += pensando subdir-y += qcom subdir-y += realtek subdir-y += renesas
arch/arm64/boot/dts/pensando/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_PENSANDO) += elba-asic.dtb + +always-y := $(dtb-y) +subdir-y := $(dts-dirs) +clean-files := *.dtb
arch/arm64/boot/dts/pensando/elba-16core.dtsi new file +192 -0
192 lines not on this page · raw message
arch/arm64/boot/dts/pensando/elba-asic-common.dtsi new file +96 -0
96 lines not on this page · raw message
arch/arm64/boot/dts/pensando/elba-asic.dts new file +23 -0
@@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0 + +/dts-v1/; + +/ { + model = "Elba ASIC Board"; + compatible = "pensando,elba"; + + aliases { + serial0 = &uart0; + spi0 = &spi0; + spi1 = &qspi; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +#include "elba.dtsi" +#include "elba-16core.dtsi" +#include "elba-asic-common.dtsi" +#include "elba-flash-parts.dtsi"
arch/arm64/boot/dts/pensando/elba-flash-parts.dtsi new file +103 -0
103 lines not on this page · raw message
arch/arm64/boot/dts/pensando/elba.dtsi new file +181 -0
181 lines not on this page · raw message
Signature · 1 line
2.17.1
Mark Rutland
reviewerRe: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Hi,
Quoted 3 lines · Brad Larson
Add Pensando common and Elba SoC specific device nodes
Signed-off-by Brad Larson <[email protected]>
[...]
arch/arm64/boot/dts/pensando/elba.dtsi line 44
Quoted 11 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +11
-0+ timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>; + };
The GIC_CPU_MASK_SIMPLE() stuff is meant for GICv2, but as below you have GICv3, where this is not valid, so this should go.
Also, beware that GIC_CPU_MASK_SIMPLE(1) means a single CPU, which doesn't mak sense for the 16 CPUs you have.
Quoted 10 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +10
-0+ gic: interrupt-controller@800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + interrupt-controller; + reg = <0x0 0x800000 0x0 0x200000>, /* GICD */ + <0x0 0xa00000 0x0 0x200000>; /* GICR */ + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
arch/arm64/boot/dts/pensando/elba.dtsi line 160
Quoted 10 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +10
-0+ + gic_its: msi-controller@820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <1>; + reg = <0x0 0x820000 0x0 0x10000>; + socionext,synquacer-pre-its = + <0xc00000 0x1000000>; + }; + };
Is there any shared lineage with Synquacer? The commit message didn't describe this quirk.
Thanks,
Mark.
Re: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Quoted 27 lines · Mark Rutland
Hi,
Quoted 3 lines · Brad Larson
Add Pensando common and Elba SoC specific device nodes
Signed-off-by Brad Larson <[email protected]>[...]
arch/arm64/boot/dts/pensando/elba.dtsi line 44
Quoted 11 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +11
-0+ timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>; + };The
GIC_CPU_MASK_SIMPLE()stuff is meant for GICv2, but as below you have GICv3, where this is not valid, so this should go.Also, beware that
GIC_CPU_MASK_SIMPLE(1)means a single CPU, which doesn't mak sense for the 16 CPUs you have.
Quoted 9 lines
arch/arm64/boot/dts/pensando/elba.dtsi line 149
Quoted 9 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +9
-0+ gic: interrupt-controller@800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + interrupt-controller; + reg = <0x0 0x800000 0x0 0x200000>, /* GICD */ + <0x0 0xa00000 0x0 0x200000>; /* GICR */
This is missing the GICv2 compat regions that the CPUs implement.
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +6
-0+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; + + gic_its: msi-controller@820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <1>;
Quoted 8 lines
arch/arm64/boot/dts/pensando/elba.dtsi line 160
Quoted 5 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +5
-0+ reg = <0x0 0x820000 0x0 0x10000>; + socionext,synquacer-pre-its = + <0xc00000 0x1000000>; + }; + };Is there any shared lineage with Synquacer? The commit message didn't describe this quirk.
Funny, it looks like there is a sudden outburst of stupid copy/paste among HW designers. TI did the exact same thing recently.
This totally negates all the advantages of having an ITS and makes sure that you have all the overhead. Facepalm...
M.
Signature · 1 line
Jazz is not dead. It just smells funny...
Re: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Hi Marc,
Quoted 20 lines · Marc Zyngier
Quoted 17 lines · Mark Rutland
Hi,
Quoted 3 lines · Brad Larson
Add Pensando common and Elba SoC specific device nodes
Signed-off-by Brad Larson <[email protected]>[...]
Quoted 9 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +9
-0+ gic: interrupt-controller@800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + interrupt-controller; + reg = <0x0 0x800000 0x0 0x200000>, /* GICD */ + <0x0 0xa00000 0x0 0x200000>; /* GICR */
Quoted 1 line
This is missing the GICv2 compat regions that the CPUs implement.
Is this what is described as optional in the GIC architecture specification where a GICv3 system can run restricted GICv2 code? Can you point me in the right direction in the spec and example dts node if needed.
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +11
-0+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; + + gic_its: msi-controller@820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <1>; + reg = <0x0 0x820000 0x0 0x10000>; + socionext,synquacer-pre-its = + <0xc00000 0x1000000>; + }; + };
Quoted 8 lines
Quoted 2 lines
Is there any shared lineage with Synquacer? The commit message didn't describe this quirk.
Funny, it looks like there is a sudden outburst of stupid copy/paste among HW designers. TI did the exact same thing recently.
This totally negates all the advantages of having an ITS and makes sure that you have all the overhead. Facepalm...
Some background may help explain. To generate an LPI a peripheral must write to the GITS_TRANSLATER (a specific address). For the ITS to know which translations apply to the generated interrupts, it must know which peripheral performed the write. The ID of the peripheral is known as its DeviceID, which is often carried along with the write as an AXI sideband signal.
The Elba SoC doesn't carry the DeviceID, so we have to conjure one up between the peripheral and the ITS. Instead of telling a peripheral to target the GITS_TRANSLATER directly, we instead direct it to a specific offset within a pre-ITS address range (our own IP block). For writes that land in that memory range, we derive the DeviceID from (offset >> 2). The pre-ITS block then sends (DeviceID, data) to the GITS_TRANSLATER.
The hardware designer came up with the Pre-ITS mechanism in Feb 2018. When we looked at the upstream kernel later (we developed on 4.14) we found that not only did it support something similar, it supported the exact scheme we are using.
Thanks,
Brad
Re: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Brad,
Quoted 24 lines · Brad Larson
Hi Marc,
Quoted 20 lines · Marc Zyngier
Quoted 17 lines · Mark Rutland
Hi,
Quoted 3 lines · Brad Larson
Add Pensando common and Elba SoC specific device nodes
Signed-off-by Brad Larson <[email protected]>[...]
Quoted 9 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +9
-0+ gic: interrupt-controller@800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + interrupt-controller; + reg = <0x0 0x800000 0x0 0x200000>, /* GICD */ + <0x0 0xa00000 0x0 0x200000>; /* GICR */
Quoted 4 lines
Quoted 1 line
This is missing the GICv2 compat regions that the CPUs implement.
Is this what is described as optional in the GIC architecture specification where a GICv3 system can run restricted GICv2 code?
Yup, that. It is actually implemented by the CPU.
Quoted 2 lines
Can you point me in the right direction in the spec and example dts node if needed.
The Cortex-A72 TRM has everything you need [1]. And since you used the Synquacer as the model for this, you will see that it has the missing regions. Alternatively, rk3399.dtsi is a good example.
Quoted 21 lines
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +11
-0+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; + + gic_its: msi-controller@820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <1>; + reg = <0x0 0x820000 0x0 0x10000>; + socionext,synquacer-pre-its = + <0xc00000 0x1000000>; + }; + };Quoted 8 lines
Quoted 2 lines
Is there any shared lineage with Synquacer? The commit message didn't describe this quirk.
Funny, it looks like there is a sudden outburst of stupid copy/paste among HW designers. TI did the exact same thing recently.
This totally negates all the advantages of having an ITS and makes sure that you have all the overhead. Facepalm...
Quoted 6 lines
Some background may help explain. To generate an LPI a peripheral must write to the
GITS_TRANSLATER(a specific address). For the ITS to know which translations apply to the generated interrupts, it must know which peripheral performed the write. The ID of the peripheral is known as its DeviceID, which is often carried along with the write as an AXI sideband signal.
Yes, I happen to be vaguely familiar with the GIC architecture.
Quoted 11 lines
The Elba SoC doesn't carry the DeviceID, so we have to conjure one up between the peripheral and the ITS. Instead of telling a peripheral to target the
GITS_TRANSLATERdirectly, we instead direct it to a specific offset within a pre-ITS address range (our own IP block). For writes that land in that memory range, we derive the DeviceID from (offset >> 2). The pre-ITS block then sends (DeviceID, data) to theGITS_TRANSLATER.The hardware designer came up with the Pre-ITS mechanism in Feb 2018. When we looked at the upstream kernel later (we developed on 4.14) we found that not only did it support something similar, it supported the exact scheme we are using.
And this scheme is totally wrong. It breaks interrupt isolation.
Instead of having a single doorbell and getting the ITS to segregate between devices itself, you end-up with multiple ones, allowing a rogue device to impersonate another one by targeting another doorbell. You can't even use an SMMU to preserve some isolation, because all the doorbells are in the *same page*. Unmitigated disaster.
At this stage, why did you bother having an ITS at all? You get none of the security features. Only the excess area, memory allocation, additional latency and complexity. All you get is a larger INTID space.
This only shows that the hardware designer didn't understand the ITS at all. Which seems a common pattern, unfortunately.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Hi Mark,
Quoted 51 lines · Marc Zyngier
Quoted 22 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +11
-0+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; + + gic_its: msi-controller@820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <1>; + reg = <0x0 0x820000 0x0 0x10000>; + socionext,synquacer-pre-its = + <0xc00000 0x1000000>; + }; + };Quoted 8 lines
Quoted 2 lines
Is there any shared lineage with Synquacer? The commit message didn't describe this quirk.
Funny, it looks like there is a sudden outburst of stupid copy/paste among HW designers. TI did the exact same thing recently.
This totally negates all the advantages of having an ITS and makes sure that you have all the overhead. Facepalm...
Quoted 6 lines
Some background may help explain. To generate an LPI a peripheral must write to the
GITS_TRANSLATER(a specific address). For the ITS to know which translations apply to the generated interrupts, it must know which peripheral performed the write. The ID of the peripheral is known as its DeviceID, which is often carried along with the write as an AXI sideband signal.Yes, I happen to be vaguely familiar with the GIC architecture.
Quoted 11 lines
The Elba SoC doesn't carry the DeviceID, so we have to conjure one up between the peripheral and the ITS. Instead of telling a peripheral to target the
GITS_TRANSLATERdirectly, we instead direct it to a specific offset within a pre-ITS address range (our own IP block). For writes that land in that memory range, we derive the DeviceID from (offset >> 2). The pre-ITS block then sends (DeviceID, data) to theGITS_TRANSLATER.The hardware designer came up with the Pre-ITS mechanism in Feb 2018. When we looked at the upstream kernel later (we developed on 4.14) we found that not only did it support something similar, it supported the exact scheme we are using.
And this scheme is totally wrong. It breaks interrupt isolation.
Instead of having a single doorbell and getting the ITS to segregate between devices itself, you end-up with multiple ones, allowing a rogue device to impersonate another one by targeting another doorbell. You can't even use an SMMU to preserve some isolation, because all the doorbells are in the *same page*. Unmitigated disaster.
Quoted 7 lines
At this stage, why did you bother having an ITS at all? You get none of the security features. Only the excess area, memory allocation, additional latency and complexity. All you get is a larger INTID space.
This only shows that the hardware designer didn't understand the ITS at all. Which seems a common pattern, unfortunately.
The Elba SoC is an embedded chip and not intended as a SBSA-compliant general platform. In this implementation the ITS is used to provide message-based interrupts for our (potentially large set) of hardware based platform device instances. Virtualization is not a consideration. We don't have a SMMU. Interrupt isolation isn't a practical consideration for this product. Propose adding a comment to the dts.
+ /*
+ * Elba SoC implemented a pre-ITS that happened to
+ * be the same implementation as synquacer.
+ */
its: interrupt-controller@820000 {
compatible = "arm,gic-v3-its";
msi-controller;Thanks
Brad
Re: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Quoted 2 lines · Brad Larson
Hi Mark,
s/k/c/
Quoted 58 lines · Marc Zyngier
Quoted 56 lines
Quoted 22 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +11
-0+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; + + gic_its: msi-controller@820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <1>; + reg = <0x0 0x820000 0x0 0x10000>; + socionext,synquacer-pre-its = + <0xc00000 0x1000000>; + }; + };Quoted 8 lines
Quoted 2 lines
Is there any shared lineage with Synquacer? The commit message didn't describe this quirk.
Funny, it looks like there is a sudden outburst of stupid copy/paste among HW designers. TI did the exact same thing recently.
This totally negates all the advantages of having an ITS and makes sure that you have all the overhead. Facepalm...
Quoted 6 lines
Some background may help explain. To generate an LPI a peripheral must write to the
GITS_TRANSLATER(a specific address). For the ITS to know which translations apply to the generated interrupts, it must know which peripheral performed the write. The ID of the peripheral is known as its DeviceID, which is often carried along with the write as an AXI sideband signal.Yes, I happen to be vaguely familiar with the GIC architecture.
Quoted 11 lines
The Elba SoC doesn't carry the DeviceID, so we have to conjure one up between the peripheral and the ITS. Instead of telling a peripheral to target the
GITS_TRANSLATERdirectly, we instead direct it to a specific offset within a pre-ITS address range (our own IP block). For writes that land in that memory range, we derive the DeviceID from (offset >> 2). The pre-ITS block then sends (DeviceID, data) to theGITS_TRANSLATER.The hardware designer came up with the Pre-ITS mechanism in Feb 2018. When we looked at the upstream kernel later (we developed on 4.14) we found that not only did it support something similar, it supported the exact scheme we are using.
And this scheme is totally wrong. It breaks interrupt isolation.
Instead of having a single doorbell and getting the ITS to segregate between devices itself, you end-up with multiple ones, allowing a rogue device to impersonate another one by targeting another doorbell. You can't even use an SMMU to preserve some isolation, because all the doorbells are in the *same page*. Unmitigated disaster.
At this stage, why did you bother having an ITS at all? You get none of the security features. Only the excess area, memory allocation, additional latency and complexity. All you get is a larger INTID space.
Quoted 5 lines
Quoted 2 lines
This only shows that the hardware designer didn't understand the ITS at all. Which seems a common pattern, unfortunately.
The Elba SoC is an embedded chip and not intended as a SBSA-compliant general platform.
This has nothing to do with following a standard. It has to do with following the intended use of the architecture. What you have here is the system architecture equivalent of trusting userspace to build the kernel page tables. It can work in limited cases. But would you want to deploy such construct at scale? Probably not.
Quoted 5 lines
In this implementation the ITS is used to provide message-based interrupts for our (potentially large set) of hardware based platform device instances. Virtualization is not a consideration. We don't have a SMMU. Interrupt isolation isn't a practical consideration for this product.
Because you have foreseen all use cases for this HW ahead of time, and can already tell how SW is going to make use of it? Oh well...
Review
Quoted 6 lines
Propose adding a comment to the dts.
(quoted diff) +4
-0+ /* + * Elba SoC implemented a pre-ITS that happened to + * be the same implementation as synquacer. + */
Which contains zero information. What you really want is: "We have decided to ignore the system architecture, good luck".
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Quoted 26 lines · Marc Zyngier
Quoted 3 lines
The Elba SoC is an embedded chip and not intended as a SBSA-compliant general platform.
This has nothing to do with following a standard. It has to do with following the intended use of the architecture. What you have here is the system architecture equivalent of trusting userspace to build the kernel page tables. It can work in limited cases. But would you want to deploy such construct at scale? Probably not.
Quoted 5 lines
In this implementation the ITS is used to provide message-based interrupts for our (potentially large set) of hardware based platform device instances. Virtualization is not a consideration. We don't have a SMMU. Interrupt isolation isn't a practical consideration for this product.
Because you have foreseen all use cases for this HW ahead of time, and can already tell how SW is going to make use of it? Oh well...
Review
Quoted 6 lines
Propose adding a comment to the dts.
(quoted diff) +4
-0+ /* + * Elba SoC implemented a pre-ITS that happened to + * be the same implementation as synquacer. + */
Quoted 7 lines
Which contains zero information. What you really want is: "We have decided to ignore the system architecture, good luck".
M.--
Without deviation from the norm, progress is not possible.
On the contrary, the confusion of using the existing driver match "socionext,synquacer-pre-its" is answered, why add new code. Looks like we are deviating from the norm ;-). I'm not seeing how this conversation is a productive use of time for a platform in production.
Thanks,
Brad
Re: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
In reply to Mark RutlandHi Mark,
Quoted 22 lines · Mark Rutland
Hi,
Quoted 3 lines · Brad Larson
Add Pensando common and Elba SoC specific device nodes
Signed-off-by Brad Larson <[email protected]>[...]
arch/arm64/boot/dts/pensando/elba.dtsi line 44
Quoted 11 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +11
-0+ timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>; + };
Quoted 6 lines
The
GIC_CPU_MASK_SIMPLE()stuff is meant for GICv2, but as below you have GICv3, where this is not valid, so this should go.Also, beware that
GIC_CPU_MASK_SIMPLE(1)means a single CPU, which doesn't mak sense for the 16 CPUs you have.
Thanks for pointing this out. Elba SoC is a GICv3 implementation and looking at other device tree files we should be using this:
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(16) |
IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(16) |
IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(16) |
IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(16) |
IRQ_TYPE_LEVEL_LOW)>;
};Quoted 21 lines
Quoted 10 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +10
-0+ gic: interrupt-controller@800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + interrupt-controller; + reg = <0x0 0x800000 0x0 0x200000>, /* GICD */ + <0x0 0xa00000 0x0 0x200000>; /* GICR */ + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;arch/arm64/boot/dts/pensando/elba.dtsi line 160
Quoted 10 lines
arch/arm64/boot/dts/pensando/elba.dtsi new file +10
-0+ + gic_its: msi-controller@820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <1>; + reg = <0x0 0x820000 0x0 0x10000>; + socionext,synquacer-pre-its = + <0xc00000 0x1000000>; + }; + };
Quoted 2 lines
Is there any shared lineage with Synquacer? The commit message didn't describe this quirk.
There is no shared lineage with Synqacer. We are solving the same issue with the same mechanism. I'll add a comment to this DTS node.
Thanks,
Brad
Mark Rutland
reviewerRe: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Quoted 24 lines · Brad Larson
Quoted 13 lines · Mark Rutland
arch/arm64/boot/dts/pensando/elba.dtsi line 44
Quoted 11 lines · Brad Larson
arch/arm64/boot/dts/pensando/elba.dtsi new file +11
-0+ timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>; + };Quoted 6 lines
The
GIC_CPU_MASK_SIMPLE()stuff is meant for GICv2, but as below you have GICv3, where this is not valid, so this should go.Also, beware that
GIC_CPU_MASK_SIMPLE(1)means a single CPU, which doesn't mak sense for the 16 CPUs you have.Thanks for pointing this out. Elba SoC is a GICv3 implementation and looking at other device tree files we should be using this:
Quoted 11 lines
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(16) |
IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(16) |
IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(16) |
IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(16) |
IRQ_TYPE_LEVEL_LOW)>;
};No; as above, you should *not* use GIC_CPU_MASK_SIMPLE() at all for GICv3. i.e.
Quoted 7 lines
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
<GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
<GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
<GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
};Please see the GICv3 binding documentation:
Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
... and note that it does not have the cpumask field as use by the binding for prior generations of GIC:
Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml
If you've seen other dts files using GIC_CPU_MASK_SIMPLE() with GICv3, those are incorrect, and need to be fixed.
Thanks,
Mark.
Re: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Hi Mark,
Quoted 18 lines · Mark Rutland
No; as above, you should *not* use
GIC_CPU_MASK_SIMPLE()at all for GICv3. i.e.Quoted 7 lines
timer { compatible = "arm,armv8-timer"; interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; };Please see the GICv3 binding documentation:
Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml... and note that it does not have the cpumask field as use by the binding for prior generations of GIC:
Quoted 8 lines
Documentation/devicetree/bindings/interrupt-controller/arm,gic.yamlIf you've seen other dts files using
GIC_CPU_MASK_SIMPLE()with GICv3, those are incorrect, and need to be fixed.Thanks,
Mark.
I'll use the bindings documentation as the primary reference. The use of GIC_CPU_MASK_SIMPLE() is removed and tests ok. These arm64 dts files in linux-next are gic-v3 and use GIC_CPU_MASK_SIMPLE(1, 2, 4, 8)
./nvidia/tegra234.dtsi./renesas/r9a07g044.dtsi./renesas/r8a779a0.dtsi./qcom/sm8350.dtsi./qcom/sm8250.dtsi./freescale/fsl-ls1028a.dtsi./freescale/imx8mp.dtsi./freescale/imx8mn.dtsi./freescale/imx8mm.dtsi
Thanks,
Brad
Rob Herring
maintainerRe: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
In reply to Brad LarsonQuoted 50 lines · Brad Larson
Add Pensando common and Elba SoC specific device nodes
Signed-off-by Brad Larson <[email protected]>---
Changelog:
- Node names changed to DT generic names
- Changed from using 'spi@' which is reserved
- Theelba-flash-parts.dtsiis kept separate as it is included in multiple dts files.
- SPDX license tags at the top of each file
- The compatible = "pensando,elba" and 'model' are now together in the board file.
- UIO nodes removed
- Ordered nodes by increasing unit address
- Removed an unreferenced container node.
- Dropped deprecated 'device_type' for uart0 node.arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/pensando/Makefile | 6 + arch/arm64/boot/dts/pensando/elba-16core.dtsi | 192 ++++++++++++++++++ .../boot/dts/pensando/elba-asic-common.dtsi | 96 +++++++++ arch/arm64/boot/dts/pensando/elba-asic.dts | 23 +++ .../boot/dts/pensando/elba-flash-parts.dtsi | 103 ++++++++++ arch/arm64/boot/dts/pensando/elba.dtsi | 181 +++++++++++++++++ 7 files changed, 602 insertions(+) create mode 100644 arch/arm64/boot/dts/pensando/Makefile create mode 100644 arch/arm64/boot/dts/pensando/elba-16core.dtsi create mode 100644 arch/arm64/boot/dts/pensando/elba-asic-common.dtsi create mode 100644 arch/arm64/boot/dts/pensando/elba-asic.dts create mode 100644 arch/arm64/boot/dts/pensando/elba-flash-parts.dtsi create mode 100644 arch/arm64/boot/dts/pensando/elba.dtsiarch/arm64/boot/dts/Makefile +1
-0@@ -20,6 +20,7 @@ subdir-y += marvell subdir-y += mediatek subdir-y += microchip subdir-y += nvidia +subdir-y += pensando subdir-y += qcom subdir-y += realtek subdir-y += renesasarch/arm64/boot/dts/pensando/Makefile new file +0
-0
arch/arm64/boot/dts/pensando/Makefile line 6
Quoted 7 lines
arch/arm64/boot/dts/pensando/Makefile new file +6
-0@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_PENSANDO) += elba-asic.dtb + +always-y := $(dtb-y) +subdir-y := $(dts-dirs) +clean-files := *.dtb
None of these lines should be needed.
arch/arm64/boot/dts/pensando/elba-16core.dtsi line 1
Quoted 7 lines
arch/arm64/boot/dts/pensando/elba-16core.dtsi new file +1
-0@@ -0,0 +1,192 @@ +// SPDX-License-Identifier: GPL-2.0
Do you care about using with non-GPL OS? Dual license is preferred.
Quoted 175 lines
arch/arm64/boot/dts/pensando/elba-16core.dtsi new file +175
-0+ +/ { + cpus { + #address-cells = <2>; + #size-cells = <0>; + + cpu-map { + cluster0 { + core0 { cpu = <&cpu0>; }; + core1 { cpu = <&cpu1>; }; + core2 { cpu = <&cpu2>; }; + core3 { cpu = <&cpu3>; }; + }; + + cluster1 { + core0 { cpu = <&cpu4>; }; + core1 { cpu = <&cpu5>; }; + core2 { cpu = <&cpu6>; }; + core3 { cpu = <&cpu7>; }; + }; + + cluster2 { + core0 { cpu = <&cpu8>; }; + core1 { cpu = <&cpu9>; }; + core2 { cpu = <&cpu10>; }; + core3 { cpu = <&cpu11>; }; + }; + + cluster3 { + core0 { cpu = <&cpu12>; }; + core1 { cpu = <&cpu13>; }; + core2 { cpu = <&cpu14>; }; + core3 { cpu = <&cpu15>; }; + }; + }; + + /* CLUSTER 0 */ + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x0>; + next-level-cache = <&l2_0>; + enable-method = "psci"; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x1>; + next-level-cache = <&l2_0>; + enable-method = "psci"; + }; + + cpu2: cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x2>; + next-level-cache = <&l2_0>; + enable-method = "psci"; + }; + + cpu3: cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x3>; + next-level-cache = <&l2_0>; + enable-method = "psci"; + }; + + l2_0: l2-cache0 { + compatible = "cache"; + }; + + /* CLUSTER 1 */ + cpu4: cpu@100 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x100>; + next-level-cache = <&l2_1>; + enable-method = "psci"; + }; + + cpu5: cpu@101 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x101>; + next-level-cache = <&l2_1>; + enable-method = "psci"; + }; + + cpu6: cpu@102 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x102>; + next-level-cache = <&l2_1>; + enable-method = "psci"; + }; + + cpu7: cpu@103 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x103>; + next-level-cache = <&l2_1>; + enable-method = "psci"; + }; + + l2_1: l2-cache1 { + compatible = "cache"; + }; + + /* CLUSTER 2 */ + cpu8: cpu@200 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x200>; + next-level-cache = <&l2_2>; + enable-method = "psci"; + }; + + cpu9: cpu@201 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x201>; + next-level-cache = <&l2_2>; + enable-method = "psci"; + }; + + cpu10: cpu@202 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x202>; + next-level-cache = <&l2_2>; + enable-method = "psci"; + }; + + cpu11: cpu@203 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x203>; + next-level-cache = <&l2_2>; + enable-method = "psci"; + }; + + l2_2: l2-cache2 { + compatible = "cache"; + }; + + /* CLUSTER 3 */ + cpu12: cpu@300 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x300>; + next-level-cache = <&l2_3>; + enable-method = "psci"; + }; + + cpu13: cpu@301 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x301>; + next-level-cache = <&l2_3>; + enable-method = "psci"; + }; + + cpu14: cpu@302 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x302>; + next-level-cache = <&l2_3>; + enable-method = "psci"; + }; + + cpu15: cpu@303 { + device_type = "cpu"; + compatible = "arm,cortex-a72";
arch/arm64/boot/dts/pensando/elba-16core.dtsi line 186
Quoted 10 lines
arch/arm64/boot/dts/pensando/elba-16core.dtsi new file +10
-0+ reg = <0 0x303>; + next-level-cache = <&l2_3>; + enable-method = "psci"; + }; + + l2_3: l2-cache3 { + compatible = "cache"; + }; + + psci {
This goes at the root level.
Quoted 65 lines
arch/arm64/boot/dts/pensando/elba-16core.dtsi new file +6
-0+ compatible = "arm,psci-0.2"; + method = "smc"; + }; + + }; +};arch/arm64/boot/dts/pensando/elba-asic-common.dtsi new file +53
-0@@ -0,0 +1,96 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (c) 2019-2021, Pensando Systems Inc. */ + +&ahb_clk { + clock-frequency = <400000000>; +}; + +&emmc_clk { + clock-frequency = <200000000>; +}; + +&flash_clk { + clock-frequency = <400000000>; +}; + +&ref_clk { + clock-frequency = <156250000>; +}; + +&qspi { + status = "okay"; + flash0: flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + spi-rx-bus-width = <2>; + m25p,fast-read; + cdns,read-delay = <0>; + cdns,tshsl-ns = <0>; + cdns,tsd2d-ns = <0>; + cdns,tchsh-ns = <0>; + cdns,tslch-ns = <0>; + }; +}; + +&gpio0 { + status = "okay"; +}; + +&emmc { + bus-width = <8>; + status = "okay"; +}; + +&wdt0 { + status = "okay"; +}; + +&i2c0 { + clock-frequency = <100000>; + status = "okay"; + rtc@51 { + compatible = "nxp,pcf85263";
arch/arm64/boot/dts/pensando/elba-asic-common.dtsi line 63
Quoted 10 lines
arch/arm64/boot/dts/pensando/elba-asic-common.dtsi new file +10
-0+ reg = <0x51>; + }; +}; + +&spi0 { + num-cs = <4>; + cs-gpios = <0>, <0>, <&porta 1 GPIO_ACTIVE_LOW>, + <&porta 7 GPIO_ACTIVE_LOW>; + status = "okay"; + spi0_cs0@0 {
Node names should reflect the class of device and use standard name defined in the DT spec. This probably doesn't have one. 'lora' perhaps?
arch/arm64/boot/dts/pensando/elba-asic-common.dtsi line 64
Quoted 1 line
arch/arm64/boot/dts/pensando/elba-asic-common.dtsi new file +1
-0+ compatible = "semtech,sx1301"; /* Enable spidev */
What's spidev?
Quoted 38 lines
arch/arm64/boot/dts/pensando/elba-asic-common.dtsi new file +32
-0+ #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <12000000>; + reg = <0>; + }; + + spi0_cs1@1 { + compatible = "semtech,sx1301"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <12000000>; + reg = <1>; + }; + + spi0_cs2@2 { + compatible = "semtech,sx1301"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <12000000>; + reg = <2>; + interrupt-parent = <&porta>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; + + spi0_cs3@3 { + compatible = "semtech,sx1301"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <12000000>; + reg = <3>; + }; +};arch/arm64/boot/dts/pensando/elba-asic.dts new file +0
-0
arch/arm64/boot/dts/pensando/elba-asic.dts line 7
Quoted 7 lines
arch/arm64/boot/dts/pensando/elba-asic.dts new file +7
-0@@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0 + +/dts-v1/; + +/ { + model = "Elba ASIC Board"; + compatible = "pensando,elba";
Normally we have a compatible for the board plus the soc compatible.
Quoted 316 lines
arch/arm64/boot/dts/pensando/elba-asic.dts new file +16
-0+ + aliases { + serial0 = &uart0; + spi0 = &spi0; + spi1 = &qspi; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +#include "elba.dtsi" +#include "elba-16core.dtsi" +#include "elba-asic-common.dtsi" +#include "elba-flash-parts.dtsi"arch/arm64/boot/dts/pensando/elba-flash-parts.dtsi new file +103
-0@@ -0,0 +1,103 @@ +// SPDX-License-Identifier: GPL-2.0 + +&flash0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + label = "flash"; + reg = <0x10000 0xfff0000>; + }; + + partition@f0000 { + label = "golduenv"; + reg = <0xf0000 0x10000>; + }; + + partition@100000 { + label = "boot0"; + reg = <0x100000 0x80000>; + }; + + partition@180000 { + label = "golduboot"; + reg = <0x180000 0x200000>; + }; + + partition@380000 { + label = "brdcfg0"; + reg = <0x380000 0x10000>; + }; + + partition@390000 { + label = "brdcfg1"; + reg = <0x390000 0x10000>; + }; + + partition@400000 { + label = "goldfw"; + reg = <0x400000 0x3c00000>; + }; + + partition@4010000 { + label = "fwmap"; + reg = <0x4010000 0x20000>; + }; + + partition@4030000 { + label = "fwsel"; + reg = <0x4030000 0x20000>; + }; + + partition@4090000 { + label = "bootlog"; + reg = <0x4090000 0x20000>; + }; + + partition@40b0000 { + label = "panicbuf"; + reg = <0x40b0000 0x20000>; + }; + + partition@40d0000 { + label = "uservars"; + reg = <0x40d0000 0x20000>; + }; + + partition@4200000 { + label = "uboota"; + reg = <0x4200000 0x400000>; + }; + + partition@4600000 { + label = "ubootb"; + reg = <0x4600000 0x400000>; + }; + + partition@4a00000 { + label = "mainfwa"; + reg = <0x4a00000 0x1000000>; + }; + + partition@5a00000 { + label = "mainfwb"; + reg = <0x5a00000 0x1000000>; + }; + + partition@6a00000 { + label = "diaguboot"; + reg = <0x6a00000 0x400000>; + }; + + partition@8000000 { + label = "diagfw"; + reg = <0x8000000 0x7fe0000>; + }; + + partition@ffe0000 { + label = "ubootenv"; + reg = <0xffe0000 0x10000>; + }; + }; +};arch/arm64/boot/dts/pensando/elba.dtsi new file +181
-0@@ -0,0 +1,181 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (c) 2019-2021, Pensando Systems Inc. */ + +#include <dt-bindings/gpio/gpio.h> +#include "dt-bindings/interrupt-controller/arm-gic.h" + +/ { + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + dma-coherent; + + ahb_clk: oscillator0 { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + emmc_clk: oscillator2 { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + flash_clk: oscillator3 { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + ref_clk: oscillator4 { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>; + }; + + pmu { + compatible = "arm,cortex-a72-pmu"; + interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(1) | + IRQ_TYPE_LEVEL_LOW)>; + }; + + soc: soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + i2c0: i2c@400 { + compatible = "snps,designware-i2c"; + reg = <0x0 0x400 0x0 0x100>; + clocks = <&ahb_clk>; + #address-cells = <1>; + #size-cells = <0>; + i2c-sda-hold-time-ns = <480>; + snps,sda-timeout-ms = <750>; + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + wdt0: watchdog@1400 { + compatible = "snps,dw-wdt"; + reg = <0x0 0x1400 0x0 0x100>; + clocks = <&ahb_clk>; + interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + qspi: spi@2400 { + compatible = "pensando,elba-qspi", "cdns,qspi-nor"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x0 0x2400 0x0 0x400>, + <0x0 0x7fff0000 0x0 0x1000>; + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&flash_clk>; + cdns,fifo-depth = <1024>; + cdns,fifo-width = <4>; + cdns,trigger-address = <0x7fff0000>; + status = "disabled"; + }; + + spi0: spi@2800 { + compatible = "pensando,elba-spi"; + reg = <0x0 0x2800 0x0 0x100>; + pensando,spics = <&mssoc 0x2468>; + clocks = <&ahb_clk>; + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + num-cs = <2>; + status = "disabled"; + }; + + gpio0: gpio@4000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dw-apb-gpio"; + reg = <0x0 0x4000 0x0 0x78>; + status = "disabled"; + + porta: gpio-port@0 { + compatible = "snps,dw-apb-gpio-port"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + ngpios = <8>; + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + interrupt-parent = <&gic>; + #interrupt-cells = <2>; + }; + + portb: gpio-port@1 { + compatible = "snps,dw-apb-gpio-port"; + reg = <1>; + gpio-controller; + #gpio-cells = <2>; + ngpios = <8>; + }; + }; + + uart0: serial@4800 { + compatible = "ns16550a"; + reg = <0x0 0x4800 0x0 0x100>; + clocks = <&ref_clk>; + interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + }; + + gic: interrupt-controller@800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + interrupt-controller; + reg = <0x0 0x800000 0x0 0x200000>, /* GICD */ + <0x0 0xa00000 0x0 0x200000>; /* GICR */ + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; + + gic_its: msi-controller@820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <1>; + reg = <0x0 0x820000 0x0 0x10000>; + socionext,synquacer-pre-its = + <0xc00000 0x1000000>; + }; + }; + + emmc: mmc@30440000 { + compatible = "pensando,elba-emmc", "cdns,sd4hc"; + clocks = <&emmc_clk>; + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; + reg = <0x0 0x30440000 0x0 0x10000>, + <0x0 0x30480044 0x0 0x4>; /* byte-lane ctrl */ + cdns,phy-input-delay-sd-highspeed = <0x4>; + cdns,phy-input-delay-legacy = <0x4>; + cdns,phy-input-delay-sd-uhs-sdr50 = <0x6>; + cdns,phy-input-delay-sd-uhs-ddr50 = <0x16>; + mmc-ddr-1_8v; + status = "disabled"; + }; + + mssoc: mssoc@307c0000 { + compatible = "syscon", "simple-mfd"; + reg = <0x0 0x307c0000 0x0 0x3000>; + }; + }; +};Signature · 1 line
2.17.1
Re: [PATCH v3 11/11] arm64: dts: Add Pensando Elba SoC support
Hi Rob,
Quoted 6 lines · Rob Herring
arch/arm64/boot/dts/pensando/Makefile line 6
Quoted 4 lines
arch/arm64/boot/dts/pensando/Makefile new file +3
-0+always-y := $(dtb-y) +subdir-y := $(dts-dirs) +clean-files := *.dtbNone of these lines should be needed.
Yes, these will be removed.
Quoted 10 lines
arch/arm64/boot/dts/pensando/elba-16core.dtsi line 1
Quoted 7 lines
arch/arm64/boot/dts/pensando/elba-16core.dtsi new file +1
-0@@ -0,0 +1,192 @@ +// SPDX-License-Identifier: GPL-2.0Do you care about using with non-GPL OS? Dual license is preferred.
Dual is fine, changing to this:
SPDX-License-Identifier: (GPL-2.0+ OR MIT)
Quoted 4 lines
arch/arm64/boot/dts/pensando/elba-16core.dtsi line 186
Quoted 1 line
arch/arm64/boot/dts/pensando/elba-16core.dtsi new file +1
-0+ psci {This goes at the root level.
Moving to the root level
Quoted 9 lines
Quoted 9 lines
arch/arm64/boot/dts/pensando/elba-16core.dtsi new file +6
-0+ compatible = "arm,psci-0.2"; + method = "smc"; + }; + + }; +};arch/arm64/boot/dts/pensando/elba-asic-common.dtsi +2
-0+ +&spi0 {
Quoted 9 lines
arch/arm64/boot/dts/pensando/elba-asic-common.dtsi line 63
Quoted 5 lines
arch/arm64/boot/dts/pensando/elba-asic-common.dtsi +5
-0+ num-cs = <4>; + cs-gpios = <0>, <0>, <&porta 1 GPIO_ACTIVE_LOW>, + <&porta 7 GPIO_ACTIVE_LOW>; + status = "okay"; + spi0_cs0@0 {Node names should reflect the class of device and use standard name defined in the DT spec. This probably doesn't have one. 'lora' perhaps?
Right, I didn't see a standard name and found many approaches in other files
so I likely based off of one of these below. I searched the dts
files for 'lora' and
didn't find it. Is that an acronym? I can change it to what the preference is.
./microchip/sparx5_pcb134_board.dtsi:
&spi0 {
status = "okay";
spi@0 {
compatible = "spi-mux";
...
};./rockchip/rk3399.dtsi:
spi5 {
spi5_clk: spi5-clk {
rockchip,pins =
<2 RK_PC6 2 &pcfg_pull_up>;
};
spi5_cs0: spi5-cs0 {
rockchip,pins =
<2 RK_PC7 2 &pcfg_pull_up>;
};
spi5_rx: spi5-rx {
rockchip,pins =
<2 RK_PC4 2 &pcfg_pull_up>;
};
spi5_tx: spi5-tx {
rockchip,pins =
<2 RK_PC5 2 &pcfg_pull_up>;
};
};Quoted 5 lines
Quoted 2 lines
+ compatible = "semtech,sx1301"; /* Enable spidev */
What's spidev?
It's module drivers/spi/spidev.c which won't populate /dev/spidevB.C unless there is a match which we need for the system to boot. An earlier patch added to the compatible list below and the feedback on that was to remove it. Later I noticed the compatible list expanded...
static const struct of_device_id spidev_dt_ids[] = {
{ .compatible = "rohm,dh2228fv" },
{ .compatible = "lineartechnology,ltc2488" },
{ .compatible = "semtech,sx1301" },
{ .compatible = "lwn,bk4" },
{ .compatible = "dh,dhcom-board" },
{ .compatible = "menlo,m53cpld" },
{ .compatible = "cisco,spi-petra" },
{ .compatible = "micron,spi-authenta" },
{},
};Quoted 39 lines
Quoted 39 lines
arch/arm64/boot/dts/pensando/elba-asic-common.dtsi +32
-0+ #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <12000000>; + reg = <0>; + }; + + spi0_cs1@1 { + compatible = "semtech,sx1301"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <12000000>; + reg = <1>; + }; + + spi0_cs2@2 { + compatible = "semtech,sx1301"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <12000000>; + reg = <2>; + interrupt-parent = <&porta>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; + + spi0_cs3@3 { + compatible = "semtech,sx1301"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <12000000>; + reg = <3>; + }; +};arch/arm64/boot/dts/pensando/elba-asic.dts new file +1
-0@@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0
Quoted 8 lines
arch/arm64/boot/dts/pensando/elba-asic.dts line 7
Quoted 6 lines
arch/arm64/boot/dts/pensando/elba-asic.dts new file +6
-0+ +/dts-v1/; + +/ { + model = "Elba ASIC Board"; + compatible = "pensando,elba";Normally we have a compatible for the board plus the soc compatible.
In this case there are currently five different boards/products that have no variations needing a board level description.
Thanks,
Brad