linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] Support Pensando Elba SoC
@ 2022-04-06 23:36 Brad Larson
  2022-04-06 23:36 ` [PATCH 01/11] dt-bindings: arm: add Pensando boards Brad Larson
                   ` (10 more replies)
  0 siblings, 11 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

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 inputs.  The version of 
dtschema used is 2022.3.2.  Changes from V3:

0001-dt-bindings-arm-add-Pensando-boards.patch
- Add description and board compatible

0003-dt-bindings-mmc-Add-Pensando-Elba-SoC-binding.patch
- Change from elba-emmc to elba-sd4hc to match file convention
- Use minItems: 1 and maxItems: 2 to pass schema check

0005-dt-bindings-spi-dw-Add-Pensando-Elba-SoC-SPI-Control.patch
- Add required property pensando,syscon-spics to go with
  pensando,elba-spi

0006-MAINTAINERS-Add-entry-for-PENSANDO.patch
- Change Maintained to Supported

0007-arm64-Add-config-for-Pensando-SoC-platforms.patch
- Fix a typo on interface max speed

0008-spi-cadence-quadspi-Add-compatible-for-Pensando-Elba.patch
- Update due to spi-cadence-quadspi.c changes

0009-mmc-sdhci-cadence-Add-Pensando-Elba-SoC-support.patch
- Change from elba-emmc to elba-sd4hc to match file convention

0010-spi-dw-Add-support-for-Pensando-Elba-SoC.patch
- Use more descriptive dt property pensando,syscon-spics
- Minor changes from review input

0011-arm64-dts-Add-Pensando-Elba-SoC-support.patch
- Changed to dual copyright (GPL-2.0+ OR MIT)
- Minor changes from review input

Brad Larson (11):
  dt-bindings: arm: 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
  dt-bindings: 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           |  26 +++
 .../devicetree/bindings/mmc/cdns,sdhci.yaml   |   4 +-
 .../bindings/spi/cdns,qspi-nor.yaml           |   3 +-
 .../bindings/spi/snps,dw-apb-ssi.yaml         |  17 ++
 .../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         |   3 +
 arch/arm64/boot/dts/pensando/elba-16core.dtsi | 189 ++++++++++++++++++
 .../boot/dts/pensando/elba-asic-common.dtsi   |  98 +++++++++
 arch/arm64/boot/dts/pensando/elba-asic.dts    |  28 +++
 .../boot/dts/pensando/elba-flash-parts.dtsi   | 106 ++++++++++
 arch/arm64/boot/dts/pensando/elba.dtsi        | 189 ++++++++++++++++++
 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, 922 insertions(+), 16 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

-- 
2.17.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 01/11] dt-bindings: arm: add Pensando boards
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-07 18:45   ` Krzysztof Kozlowski
  2022-04-07 18:54   ` Krzysztof Kozlowski
  2022-04-06 23:36 ` [PATCH 02/11] dt-bindings: Add vendor prefix for Pensando Systems Brad Larson
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

Document the compatible for Pensando Elba SoC boards.

Signed-off-by: Brad Larson <brad@pensando.io>
---
Change from V3:
- Add description and board compatible

 .../bindings/arm/pensando,elba.yaml           | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/pensando,elba.yaml

diff --git a/Documentation/devicetree/bindings/arm/pensando,elba.yaml b/Documentation/devicetree/bindings/arm/pensando,elba.yaml
new file mode 100644
index 000000000000..61225f2d6ce5
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/pensando,elba.yaml
@@ -0,0 +1,26 @@
+# 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  <brad@pensando.io>
+
+properties:
+  $nodename:
+    const: "/"
+  compatible:
+    oneOf:
+
+      - description: Boards with Elba SoC
+        items:
+          - enum:
+              - pensando,elba-ortano
+          - const: pensando,elba
+
+additionalProperties: true
+
+...
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 02/11] dt-bindings: Add vendor prefix for Pensando Systems
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
  2022-04-06 23:36 ` [PATCH 01/11] dt-bindings: arm: add Pensando boards Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-07 18:43   ` Krzysztof Kozlowski
  2022-04-06 23:36 ` [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding Brad Larson
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

Add vendor prefix for Pensando Systems: https://pensando.io

Signed-off-by: Brad Larson <brad@pensando.io>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 01430973ecec..0ce8f94eab08 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -936,6 +936,8 @@ patternProperties:
     description: Parade Technologies Inc.
   "^parallax,.*":
     description: Parallax Inc.
+  "^pensando,.*":
+    description: Pensando Systems Inc.
   "^pda,.*":
     description: Precision Design Associates, Inc.
   "^pericom,.*":
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
  2022-04-06 23:36 ` [PATCH 01/11] dt-bindings: arm: add Pensando boards Brad Larson
  2022-04-06 23:36 ` [PATCH 02/11] dt-bindings: Add vendor prefix for Pensando Systems Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-07  6:30   ` Arnd Bergmann
  2022-04-07 18:57   ` Krzysztof Kozlowski
  2022-04-06 23:36 ` [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC Brad Larson
                   ` (7 subsequent siblings)
  10 siblings, 2 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

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 <brad@pensando.io>
---
Change from V3:
- Change from elba-emmc to elba-sd4hc to match file convention
- Use minItems: 1 and maxItems: 2 to pass schema check

 Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
index 4207fed62dfe..278a71b27488 100644
--- a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
+++ b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
@@ -19,10 +19,12 @@ properties:
       - enum:
           - microchip,mpfs-sd4hc
           - socionext,uniphier-sd4hc
+          - pensando,elba-sd4hc
       - const: cdns,sd4hc
 
   reg:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
 
   interrupts:
     maxItems: 1
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
                   ` (2 preceding siblings ...)
  2022-04-06 23:36 ` [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-07 18:59   ` Krzysztof Kozlowski
  2022-04-12 11:37   ` Serge Semin
  2022-04-06 23:36 ` [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings Brad Larson
                   ` (6 subsequent siblings)
  10 siblings, 2 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

Document the cadence qspi controller compatible for Pensando Elba SoC
boards.  The Elba qspi fifo size is 1024.

Signed-off-by: Brad Larson <brad@pensando.io>
---
 Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
index 0a537fa3a641..bc298e413842 100644
--- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
@@ -30,6 +30,7 @@ properties:
               - intel,lgm-qspi
               - xlnx,versal-ospi-1.0
               - intel,socfpga-qspi
+              - pensando,elba-qspi
           - const: cdns,qspi-nor
       - const: cdns,qspi-nor
 
@@ -48,7 +49,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:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
                   ` (3 preceding siblings ...)
  2022-04-06 23:36 ` [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-07 18:52   ` Krzysztof Kozlowski
  2022-04-12 11:29   ` Serge Semin
  2022-04-06 23:36 ` [PATCH 06/11] MAINTAINERS: Add entry for PENSANDO Brad Larson
                   ` (5 subsequent siblings)
  10 siblings, 2 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

The Pensando Elba SoC has integrated the DW APB SPI Controller
and requires the property pensando,syscon-spics for access
to the spics control register.

Signed-off-by: Brad Larson <brad@pensando.io>
---
Change from V3:
- Add required property pensando,syscon-spics to go with
  pensando,elba-spi

 .../bindings/spi/snps,dw-apb-ssi.yaml           | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
index d7e08b03e204..41c3bbf5a55c 100644
--- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
+++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
@@ -37,6 +37,21 @@ allOf:
     else:
       required:
         - interrupts
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - pensando,elba-spi
+    then:
+      properties:
+        pensando,syscon-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,syscon-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 SoC SPI Controller
+        const: pensando,elba-spi
 
   reg:
     minItems: 1
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 06/11] MAINTAINERS: Add entry for PENSANDO
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
                   ` (4 preceding siblings ...)
  2022-04-06 23:36 ` [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-06 23:36 ` [PATCH 07/11] arm64: Add config for Pensando SoC platforms Brad Larson
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

Add entry for PENSANDO maintainer and files

Signed-off-by: Brad Larson <brad@pensando.io>
---
Change from V3:
- Change Maintained to Supported

 MAINTAINERS | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 4cb7fd127e68..456d50921b3a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2509,6 +2509,13 @@ S:	Maintained
 W:	http://hackndev.com
 F:	arch/arm/mach-pxa/palmz72.*
 
+ARM/PENSANDO ARM64 ARCHITECTURE
+M:	Brad Larson <brad@pensando.io>
+L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
+S:	Supported
+F:	Documentation/devicetree/bindings/*/pensando*
+F:	arch/arm64/boot/dts/pensando/
+
 ARM/PLEB SUPPORT
 M:	Peter Chubb <pleb@gelato.unsw.edu.au>
 S:	Maintained
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 07/11] arm64: Add config for Pensando SoC platforms
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
                   ` (5 preceding siblings ...)
  2022-04-06 23:36 ` [PATCH 06/11] MAINTAINERS: Add entry for PENSANDO Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-06 23:36 ` [PATCH 08/11] spi: cadence-quadspi: Add compatible for Pensando Elba SoC Brad Larson
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

Add ARCH_PENSANDO configuration option for Pensando SoC
based platforms.

Signed-off-by: Brad Larson <brad@pensando.io>
---
Change from V3:
- Fix a typo on interface max speed

 arch/arm64/Kconfig.platforms | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 30b123cde02c..e3b5557e1049 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -203,6 +203,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 200 Gb/s.
+
 config ARCH_QCOM
 	bool "Qualcomm Platforms"
 	select GPIOLIB
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 08/11] spi: cadence-quadspi: Add compatible for Pensando Elba SoC
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
                   ` (6 preceding siblings ...)
  2022-04-06 23:36 ` [PATCH 07/11] arm64: Add config for Pensando SoC platforms Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-06 23:36 ` [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support Brad Larson
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

The 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.

Signed-off-by: Brad Larson <brad@pensando.io>
---
Change from V3:
- Update due to spi-cadence-quadspi.c changes

 drivers/spi/spi-cadence-quadspi.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index b0c9f62ccefb..e7bcd9d8ba37 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -38,6 +38,7 @@
 #define CQSPI_DISABLE_DAC_MODE		BIT(1)
 #define CQSPI_SUPPORT_EXTERNAL_DMA	BIT(2)
 #define CQSPI_NO_SUPPORT_WR_COMPLETION	BIT(3)
+#define CQSPI_NEEDS_APB_AHB_HAZARD_WAR	BIT(4)
 
 /* Capabilities */
 #define CQSPI_SUPPORTS_OCTAL		BIT(0)
@@ -88,6 +89,7 @@ struct cqspi_st {
 	bool			use_dma_read;
 	u32			pd_dev_id;
 	bool			wr_completion;
+	bool			apb_ahb_hazard;
 };
 
 struct cqspi_driver_platdata {
@@ -1043,6 +1045,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;
 
@@ -1759,6 +1768,8 @@ static int cqspi_probe(struct platform_device *pdev)
 			cqspi->use_dma_read = true;
 		if (ddata->quirks & CQSPI_NO_SUPPORT_WR_COMPLETION)
 			cqspi->wr_completion = false;
+		if (ddata->quirks & CQSPI_NEEDS_APB_AHB_HAZARD_WAR)
+			cqspi->apb_ahb_hazard = true;
 
 		if (of_device_is_compatible(pdev->dev.of_node,
 					    "xlnx,versal-ospi-1.0"))
@@ -1882,6 +1893,10 @@ static const struct cqspi_driver_platdata versal_ospi = {
 	.get_dma_status = cqspi_get_versal_dma_status,
 };
 
+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",
@@ -1907,6 +1922,10 @@ static const struct of_device_id cqspi_dt_ids[] = {
 		.compatible = "intel,socfpga-qspi",
 		.data = (void *)&socfpga_qspi,
 	},
+	{
+		.compatible = "pensando,elba-qspi",
+		.data = &pen_cdns_qspi,
+	},
 	{ /* end of table */ }
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
                   ` (7 preceding siblings ...)
  2022-04-06 23:36 ` [PATCH 08/11] spi: cadence-quadspi: Add compatible for Pensando Elba SoC Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-07  6:45   ` Arnd Bergmann
  2022-04-06 23:36 ` [PATCH 10/11] spi: dw: Add support for Pensando Elba SoC Brad Larson
  2022-04-06 23:36 ` [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support Brad Larson
  10 siblings, 1 reply; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

Add 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.

Signed-off-by: Brad Larson <brad@pensando.io>
---
Change from V3:
- Change from elba-emmc to elba-sd4hc to match file convention

 drivers/mmc/host/Kconfig         |   1 +
 drivers/mmc/host/sdhci-cadence.c | 148 ++++++++++++++++++++++++++++---
 2 files changed, 135 insertions(+), 14 deletions(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index af6c3c329076..f3f4dc95f21e 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -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.
 
diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
index 6f2de54a5987..e9b7f80e8cf0 100644
--- a/drivers/mmc/host/sdhci-cadence.c
+++ b/drivers/mmc/host/sdhci-cadence.c
@@ -66,7 +66,11 @@ struct sdhci_cdns_phy_param {
 
 struct sdhci_cdns_priv {
 	void __iomem *hrs_addr;
+	void __iomem *ctl_addr;	/* write control */
+	spinlock_t wrlock;	/* write lock */
 	bool enhanced_strobe;
+	void (*priv_write_l)(struct sdhci_cdns_priv *priv, u32 val,
+			     void __iomem *reg);
 	unsigned int nr_phy_params;
 	struct sdhci_cdns_phy_param phy_params[];
 };
@@ -76,6 +80,11 @@ struct sdhci_cdns_phy_cfg {
 	u8 addr;
 };
 
+struct sdhci_cdns_drv_data {
+	int (*init)(struct platform_device *pdev);
+	const struct sdhci_pltfm_data pltfm_data;
+};
+
 static const struct sdhci_cdns_phy_cfg sdhci_cdns_phy_cfgs[] = {
 	{ "cdns,phy-input-delay-sd-highspeed", SDHCI_CDNS_PHY_DLY_SD_HS, },
 	{ "cdns,phy-input-delay-legacy", SDHCI_CDNS_PHY_DLY_SD_DEFAULT, },
@@ -90,6 +99,15 @@ static const struct sdhci_cdns_phy_cfg sdhci_cdns_phy_cfgs[] = {
 	{ "cdns,phy-dll-delay-strobe", SDHCI_CDNS_PHY_DLY_STROBE, },
 };
 
+static inline void sdhci_cdns_priv_writel(struct sdhci_cdns_priv *priv,
+					  u32 val, void __iomem *reg)
+{
+	if (unlikely(priv->priv_write_l))
+		priv->priv_write_l(priv, val, reg);
+	else
+		writel(val, reg);
+}
+
 static int sdhci_cdns_write_phy_reg(struct sdhci_cdns_priv *priv,
 				    u8 addr, u8 data)
 {
@@ -104,17 +122,17 @@ static int sdhci_cdns_write_phy_reg(struct sdhci_cdns_priv *priv,
 
 	tmp = FIELD_PREP(SDHCI_CDNS_HRS04_WDATA, data) |
 	      FIELD_PREP(SDHCI_CDNS_HRS04_ADDR, addr);
-	writel(tmp, reg);
+	sdhci_cdns_priv_writel(priv, tmp, reg);
 
 	tmp |= SDHCI_CDNS_HRS04_WR;
-	writel(tmp, reg);
+	sdhci_cdns_priv_writel(priv, tmp, reg);
 
 	ret = readl_poll_timeout(reg, tmp, tmp & SDHCI_CDNS_HRS04_ACK, 0, 10);
 	if (ret)
 		return ret;
 
 	tmp &= ~SDHCI_CDNS_HRS04_WR;
-	writel(tmp, reg);
+	sdhci_cdns_priv_writel(priv, tmp, reg);
 
 	ret = readl_poll_timeout(reg, tmp, !(tmp & SDHCI_CDNS_HRS04_ACK),
 				 0, 10);
@@ -191,7 +209,7 @@ static void sdhci_cdns_set_emmc_mode(struct sdhci_cdns_priv *priv, u32 mode)
 	tmp = readl(priv->hrs_addr + SDHCI_CDNS_HRS06);
 	tmp &= ~SDHCI_CDNS_HRS06_MODE;
 	tmp |= FIELD_PREP(SDHCI_CDNS_HRS06_MODE, mode);
-	writel(tmp, priv->hrs_addr + SDHCI_CDNS_HRS06);
+	sdhci_cdns_priv_writel(priv, tmp, priv->hrs_addr + SDHCI_CDNS_HRS06);
 }
 
 static u32 sdhci_cdns_get_emmc_mode(struct sdhci_cdns_priv *priv)
@@ -223,7 +241,7 @@ static int sdhci_cdns_set_tune_val(struct sdhci_host *host, unsigned int val)
 	 */
 	for (i = 0; i < 2; i++) {
 		tmp |= SDHCI_CDNS_HRS06_TUNE_UP;
-		writel(tmp, reg);
+		sdhci_cdns_priv_writel(priv, tmp, reg);
 
 		ret = readl_poll_timeout(reg, tmp,
 					 !(tmp & SDHCI_CDNS_HRS06_TUNE_UP),
@@ -309,6 +327,88 @@ static void sdhci_cdns_set_uhs_signaling(struct sdhci_host *host,
 		sdhci_set_uhs_signaling(host, timing);
 }
 
+/*
+ * The Pensando Elba SoC explicitly controls byte-lane enables on writes
+ * which includes writes to the HRS registers.
+ */
+static void elba_priv_write_l(struct sdhci_cdns_priv *priv, u32 val,
+			      void __iomem *reg)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&priv->wrlock, flags);
+	writel(0x78, priv->ctl_addr);
+	writel(val, reg);
+	spin_unlock_irqrestore(&priv->wrlock, flags);
+}
+
+static void elba_write_l(struct sdhci_host *host, u32 val, int reg)
+{
+	elba_priv_write_l(sdhci_cdns_priv(host), val, host->ioaddr + reg);
+}
+
+static void elba_write_w(struct sdhci_host *host, u16 val, int reg)
+{
+	struct sdhci_cdns_priv *priv = sdhci_cdns_priv(host);
+	unsigned long flags;
+	u32 m = (reg & 0x3);
+	u32 msk = (0x3 << (m));
+
+	spin_lock_irqsave(&priv->wrlock, flags);
+	writel(msk << 3, priv->ctl_addr);
+	writew(val, host->ioaddr + reg);
+	spin_unlock_irqrestore(&priv->wrlock, flags);
+}
+
+static void elba_write_b(struct sdhci_host *host, u8 val, int reg)
+{
+	struct sdhci_cdns_priv *priv = sdhci_cdns_priv(host);
+	unsigned long flags;
+	u32 m = (reg & 0x3);
+	u32 msk = (0x1 << (m));
+
+	spin_lock_irqsave(&priv->wrlock, flags);
+	writel(msk << 3, priv->ctl_addr);
+	writeb(val, host->ioaddr + reg);
+	spin_unlock_irqrestore(&priv->wrlock, flags);
+}
+
+static const struct sdhci_ops sdhci_elba_ops = {
+	.write_l = elba_write_l,
+	.write_w = elba_write_w,
+	.write_b = elba_write_b,
+	.set_clock = sdhci_set_clock,
+	.get_timeout_clock = sdhci_cdns_get_timeout_clock,
+	.set_bus_width = sdhci_set_bus_width,
+	.reset = sdhci_reset,
+	.set_uhs_signaling = sdhci_cdns_set_uhs_signaling,
+};
+
+static int elba_drv_init(struct platform_device *pdev)
+{
+	struct sdhci_host *host = platform_get_drvdata(pdev);
+	struct sdhci_cdns_priv *priv = sdhci_cdns_priv(host);
+	struct resource *iomem;
+	void __iomem *ioaddr;
+
+	host->mmc->caps |= (MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA);
+
+	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+	if (!iomem)
+		return -ENOMEM;
+
+	ioaddr = devm_platform_ioremap_resource(pdev, 1);
+	if (IS_ERR(ioaddr))
+		return PTR_ERR(ioaddr);
+
+	priv->ctl_addr = ioaddr;
+	priv->priv_write_l = elba_priv_write_l;
+	spin_lock_init(&priv->wrlock);
+	writel(0x78, priv->ctl_addr);
+
+	return 0;
+}
+
 static const struct sdhci_ops sdhci_cdns_ops = {
 	.set_clock = sdhci_set_clock,
 	.get_timeout_clock = sdhci_cdns_get_timeout_clock,
@@ -318,13 +418,24 @@ static const struct sdhci_ops sdhci_cdns_ops = {
 	.set_uhs_signaling = sdhci_cdns_set_uhs_signaling,
 };
 
-static const struct sdhci_pltfm_data sdhci_cdns_uniphier_pltfm_data = {
-	.ops = &sdhci_cdns_ops,
-	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
+static const struct sdhci_cdns_drv_data sdhci_cdns_uniphier_drv_data = {
+	.pltfm_data = {
+		.ops = &sdhci_cdns_ops,
+		.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
+	},
+};
+
+static const struct sdhci_cdns_drv_data sdhci_elba_drv_data = {
+	.init = elba_drv_init,
+	.pltfm_data = {
+		.ops = &sdhci_elba_ops,
+	},
 };
 
-static const struct sdhci_pltfm_data sdhci_cdns_pltfm_data = {
-	.ops = &sdhci_cdns_ops,
+static const struct sdhci_cdns_drv_data sdhci_cdns_drv_data = {
+	.pltfm_data = {
+		.ops = &sdhci_cdns_ops,
+	},
 };
 
 static void sdhci_cdns_hs400_enhanced_strobe(struct mmc_host *mmc,
@@ -350,7 +461,7 @@ static void sdhci_cdns_hs400_enhanced_strobe(struct mmc_host *mmc,
 static int sdhci_cdns_probe(struct platform_device *pdev)
 {
 	struct sdhci_host *host;
-	const struct sdhci_pltfm_data *data;
+	const struct sdhci_cdns_drv_data *data;
 	struct sdhci_pltfm_host *pltfm_host;
 	struct sdhci_cdns_priv *priv;
 	struct clk *clk;
@@ -369,10 +480,10 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
 
 	data = of_device_get_match_data(dev);
 	if (!data)
-		data = &sdhci_cdns_pltfm_data;
+		data = &sdhci_cdns_drv_data;
 
 	nr_phy_params = sdhci_cdns_phy_param_count(dev->of_node);
-	host = sdhci_pltfm_init(pdev, data,
+	host = sdhci_pltfm_init(pdev, &data->pltfm_data,
 				struct_size(priv, phy_params, nr_phy_params));
 	if (IS_ERR(host)) {
 		ret = PTR_ERR(host);
@@ -389,6 +500,11 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
 	host->ioaddr += SDHCI_CDNS_SRS_BASE;
 	host->mmc_host_ops.hs400_enhanced_strobe =
 				sdhci_cdns_hs400_enhanced_strobe;
+	if (data->init) {
+		ret = data->init(pdev);
+		if (ret)
+			goto free;
+	}
 	sdhci_enable_v4_mode(host);
 	__sdhci_read_caps(host, &version, NULL, NULL);
 
@@ -453,7 +569,11 @@ static const struct dev_pm_ops sdhci_cdns_pm_ops = {
 static const struct of_device_id sdhci_cdns_match[] = {
 	{
 		.compatible = "socionext,uniphier-sd4hc",
-		.data = &sdhci_cdns_uniphier_pltfm_data,
+		.data = &sdhci_cdns_uniphier_drv_data,
+	},
+	{
+		.compatible = "pensando,elba-sd4hc",
+		.data = &sdhci_elba_drv_data
 	},
 	{ .compatible = "cdns,sd4hc" },
 	{ /* sentinel */ }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 10/11] spi: dw: Add support for Pensando Elba SoC
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
                   ` (8 preceding siblings ...)
  2022-04-06 23:36 ` [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-12 11:06   ` Serge Semin
  2022-04-06 23:36 ` [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support Brad Larson
  10 siblings, 1 reply; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

The 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.  The Elba DW_SPI instance has two native
CS signals that are always overridden.

Signed-off-by: Brad Larson <brad@pensando.io>
---
Change from V3:
- Use more descriptive dt property pensando,syscon-spics
- Minor changes from review input

 drivers/spi/spi-dw-mmio.c | 85 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c
index 5101c4c6017b..f4636b271818 100644
--- a/drivers/spi/spi-dw-mmio.c
+++ b/drivers/spi/spi-dw-mmio.c
@@ -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
@@ -238,6 +256,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;
+
+	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 the platform may have fewer native CSs
+	 * than needed, 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,syscon-spics", 1, 0, &args);
+	if (rc) {
+		dev_err(&pdev->dev, "could not find spics\n");
+		return rc;
+	}
+
+	regmap = syscon_node_to_regmap(args.np);
+	if (IS_ERR(regmap))
+		return dev_err_probe(&pdev->dev, PTR_ERR(regmap),
+				     "could not map spics");
+
+	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,
@@ -352,6 +436,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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
                   ` (9 preceding siblings ...)
  2022-04-06 23:36 ` [PATCH 10/11] spi: dw: Add support for Pensando Elba SoC Brad Larson
@ 2022-04-06 23:36 ` Brad Larson
  2022-04-07  7:57   ` Marc Zyngier
                     ` (3 more replies)
  10 siblings, 4 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-06 23:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, brad, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

Add Pensando common and Elba SoC specific device nodes

Signed-off-by: Brad Larson <brad@pensando.io>
---
Change from V3:
- Changed to dual copyright (GPL-2.0+ OR MIT)
- Minor changes from review input

 arch/arm64/boot/dts/Makefile                  |   1 +
 arch/arm64/boot/dts/pensando/Makefile         |   3 +
 arch/arm64/boot/dts/pensando/elba-16core.dtsi | 189 ++++++++++++++++++
 .../boot/dts/pensando/elba-asic-common.dtsi   |  98 +++++++++
 arch/arm64/boot/dts/pensando/elba-asic.dts    |  28 +++
 .../boot/dts/pensando/elba-flash-parts.dtsi   | 106 ++++++++++
 arch/arm64/boot/dts/pensando/elba.dtsi        | 189 ++++++++++++++++++
 7 files changed, 614 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

diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index 1ba04e31a438..cb697f9be2a4 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -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
diff --git a/arch/arm64/boot/dts/pensando/Makefile b/arch/arm64/boot/dts/pensando/Makefile
new file mode 100644
index 000000000000..3d34b8a28a3f
--- /dev/null
+++ b/arch/arm64/boot/dts/pensando/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+dtb-$(CONFIG_ARCH_PENSANDO) += elba-asic.dtb
diff --git a/arch/arm64/boot/dts/pensando/elba-16core.dtsi b/arch/arm64/boot/dts/pensando/elba-16core.dtsi
new file mode 100644
index 000000000000..9de602cdeb8b
--- /dev/null
+++ b/arch/arm64/boot/dts/pensando/elba-16core.dtsi
@@ -0,0 +1,189 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020-2022 Pensando Systems Inc.
+ */
+
+/ {
+	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";
+			reg = <0 0x303>;
+			next-level-cache = <&l2_3>;
+			enable-method = "psci";
+		};
+
+		l2_3: l2-cache3 {
+			compatible = "cache";
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/pensando/elba-asic-common.dtsi b/arch/arm64/boot/dts/pensando/elba-asic-common.dtsi
new file mode 100644
index 000000000000..7a89df68fdf7
--- /dev/null
+++ b/arch/arm64/boot/dts/pensando/elba-asic-common.dtsi
@@ -0,0 +1,98 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020-2022, 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";
+		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 {
+		compatible = "semtech,sx1301";	/* Enable spidev */
+		#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>;
+	};
+};
diff --git a/arch/arm64/boot/dts/pensando/elba-asic.dts b/arch/arm64/boot/dts/pensando/elba-asic.dts
new file mode 100644
index 000000000000..01251143dd5e
--- /dev/null
+++ b/arch/arm64/boot/dts/pensando/elba-asic.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Pensando Elba Board.
+ *
+ * Copyright (c) 2020-2022 Pensando Systems Inc.
+ */
+
+/dts-v1/;
+
+#include "elba.dtsi"
+#include "elba-16core.dtsi"
+#include "elba-asic-common.dtsi"
+#include "elba-flash-parts.dtsi"
+
+/ {
+	model = "Pensando Elba Board";
+	compatible = "pensando,elba-ortano", "pensando,elba";
+
+	aliases {
+		serial0 = &uart0;
+		spi0 = &spi0;
+		spi1 = &qspi;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
diff --git a/arch/arm64/boot/dts/pensando/elba-flash-parts.dtsi b/arch/arm64/boot/dts/pensando/elba-flash-parts.dtsi
new file mode 100644
index 000000000000..4b2e54d97494
--- /dev/null
+++ b/arch/arm64/boot/dts/pensando/elba-flash-parts.dtsi
@@ -0,0 +1,106 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020-2022 Pensando Systems Inc.
+ */
+
+&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>;
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/pensando/elba.dtsi b/arch/arm64/boot/dts/pensando/elba.dtsi
new file mode 100644
index 000000000000..10e06eb8cda6
--- /dev/null
+++ b/arch/arm64/boot/dts/pensando/elba.dtsi
@@ -0,0 +1,189 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020-2022, Pensando Systems Inc.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include "dt-bindings/interrupt-controller/arm-gic.h"
+
+/ {
+	model = "Elba ASIC Board";
+	compatible = "pensando,elba";
+	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>;
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	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>;
+	};
+
+	pmu {
+		compatible = "arm,cortex-a72-pmu";
+		interrupts = <GIC_PPI 7 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,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";
+		};
+
+		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>;
+
+			/*
+			 * Elba specific pre-ITS is enabled using the
+			 * existing property socionext,synquacer-pre-its
+			 */
+			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-sd4hc", "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>;
+		};
+	};
+};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
  2022-04-06 23:36 ` [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding Brad Larson
@ 2022-04-07  6:30   ` Arnd Bergmann
  2022-05-25 15:46     ` Brad Larson
  2022-04-07 18:57   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 50+ messages in thread
From: Arnd Bergmann @ 2022-04-07  6:30 UTC (permalink / raw)
  To: Brad Larson
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, dac2, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc, DTML, Linux Kernel Mailing List

On Thu, Apr 7, 2022 at 1:36 AM Brad Larson <brad@pensando.io> wrote:
>
> 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 <brad@pensando.io>
> ---
> Change from V3:
> - Change from elba-emmc to elba-sd4hc to match file convention
> - Use minItems: 1 and maxItems: 2 to pass schema check
>
>  Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> index 4207fed62dfe..278a71b27488 100644
> --- a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> +++ b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> @@ -19,10 +19,12 @@ properties:
>        - enum:
>            - microchip,mpfs-sd4hc
>            - socionext,uniphier-sd4hc
> +          - pensando,elba-sd4hc
>        - const: cdns,sd4hc
>
>    reg:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2
>

Shouldn't the binding describe what the register areas are? If there
is only one of them, it is fairly clear, but when you have the choice
between one and two, it gets ambiguous, and there is a risk that
another SoC might have a different register area in the second entry,
making it incompatible.

        Arnd

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support
  2022-04-06 23:36 ` [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support Brad Larson
@ 2022-04-07  6:45   ` Arnd Bergmann
  2022-04-07  7:13     ` Adrian Hunter
  0 siblings, 1 reply; 50+ messages in thread
From: Arnd Bergmann @ 2022-04-07  6:45 UTC (permalink / raw)
  To: Brad Larson
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, dac2, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc, DTML, Linux Kernel Mailing List

On Thu, Apr 7, 2022 at 1:36 AM Brad Larson <brad@pensando.io> wrote:
> @@ -350,7 +461,7 @@ static void sdhci_cdns_hs400_enhanced_strobe(struct mmc_host *mmc,
>  static int sdhci_cdns_probe(struct platform_device *pdev)
>  {
>         struct sdhci_host *host;
> -       const struct sdhci_pltfm_data *data;
> +       const struct sdhci_cdns_drv_data *data;
>         struct sdhci_pltfm_host *pltfm_host;
>         struct sdhci_cdns_priv *priv;
>         struct clk *clk;
> @@ -369,10 +480,10 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
>
>         data = of_device_get_match_data(dev);
>         if (!data)
> -               data = &sdhci_cdns_pltfm_data;
> +               data = &sdhci_cdns_drv_data;
>
>         nr_phy_params = sdhci_cdns_phy_param_count(dev->of_node);
> -       host = sdhci_pltfm_init(pdev, data,
> +       host = sdhci_pltfm_init(pdev, &data->pltfm_data,
>                                 struct_size(priv, phy_params, nr_phy_params));
>         if (IS_ERR(host)) {
>                 ret = PTR_ERR(host);
> @@ -389,6 +500,11 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
>         host->ioaddr += SDHCI_CDNS_SRS_BASE;
>         host->mmc_host_ops.hs400_enhanced_strobe =
>                                 sdhci_cdns_hs400_enhanced_strobe;
> +       if (data->init) {
> +               ret = data->init(pdev);
> +               if (ret)
> +                       goto free;
> +       }
>         sdhci_enable_v4_mode(host);
>         __sdhci_read_caps(host, &version, NULL, NULL);

I'm not sure about the abstraction here. The approach of having a single
driver with some platform specific quirks like you do here works fine if the
differences between hardware implementations are fairly minor, but if there
are a larger number of variants, or the differences become too big, the
better approach is to have separate top-level driver instances that call
into a more generic driver, continuing the call chain

elba_drv_init()
 -> sdhci_cdns_probe()
     -> sdhci_pltfm_init()
         -> sdhci_add_host()
             -> mmc_add_host()

with each one being a more specific version of the one below it.
At the moment, it doesn't quite require having a custom driver,
but I fear that it it would get hard to rework if it continues to grow
other front-ends. It may be better to do the abstraction right away,
even if the elba driver becomes rather trivial.

Ulf, any preferences?

         Arnd

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support
  2022-04-07  6:45   ` Arnd Bergmann
@ 2022-04-07  7:13     ` Adrian Hunter
  2022-04-07 17:06       ` Brad Larson
  0 siblings, 1 reply; 50+ messages in thread
From: Adrian Hunter @ 2022-04-07  7:13 UTC (permalink / raw)
  To: Arnd Bergmann, Brad Larson
  Cc: Linux ARM, Linus Walleij, Bartosz Golaszewski, Mark Brown,
	Serge Semin, Ulf Hansson, Olof Johansson, dac2,
	open list:GPIO SUBSYSTEM, linux-spi, linux-mmc, DTML,
	Linux Kernel Mailing List

On 07/04/2022 9.45, Arnd Bergmann wrote:
> On Thu, Apr 7, 2022 at 1:36 AM Brad Larson <brad@pensando.io> wrote:
>> @@ -350,7 +461,7 @@ static void sdhci_cdns_hs400_enhanced_strobe(struct mmc_host *mmc,
>>  static int sdhci_cdns_probe(struct platform_device *pdev)
>>  {
>>         struct sdhci_host *host;
>> -       const struct sdhci_pltfm_data *data;
>> +       const struct sdhci_cdns_drv_data *data;
>>         struct sdhci_pltfm_host *pltfm_host;
>>         struct sdhci_cdns_priv *priv;
>>         struct clk *clk;
>> @@ -369,10 +480,10 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
>>
>>         data = of_device_get_match_data(dev);
>>         if (!data)
>> -               data = &sdhci_cdns_pltfm_data;
>> +               data = &sdhci_cdns_drv_data;
>>
>>         nr_phy_params = sdhci_cdns_phy_param_count(dev->of_node);
>> -       host = sdhci_pltfm_init(pdev, data,
>> +       host = sdhci_pltfm_init(pdev, &data->pltfm_data,
>>                                 struct_size(priv, phy_params, nr_phy_params));
>>         if (IS_ERR(host)) {
>>                 ret = PTR_ERR(host);
>> @@ -389,6 +500,11 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
>>         host->ioaddr += SDHCI_CDNS_SRS_BASE;
>>         host->mmc_host_ops.hs400_enhanced_strobe =
>>                                 sdhci_cdns_hs400_enhanced_strobe;
>> +       if (data->init) {
>> +               ret = data->init(pdev);
>> +               if (ret)
>> +                       goto free;
>> +       }
>>         sdhci_enable_v4_mode(host);
>>         __sdhci_read_caps(host, &version, NULL, NULL);
> 
> I'm not sure about the abstraction here. The approach of having a single
> driver with some platform specific quirks like you do here works fine if the
> differences between hardware implementations are fairly minor, but if there
> are a larger number of variants, or the differences become too big, the
> better approach is to have separate top-level driver instances that call
> into a more generic driver, continuing the call chain
> 
> elba_drv_init()
>  -> sdhci_cdns_probe()
>      -> sdhci_pltfm_init()
>          -> sdhci_add_host()
>              -> mmc_add_host()
> 
> with each one being a more specific version of the one below it.
> At the moment, it doesn't quite require having a custom driver,
> but I fear that it it would get hard to rework if it continues to grow
> other front-ends. It may be better to do the abstraction right away,
> even if the elba driver becomes rather trivial.
> 
> Ulf, any preferences?
> 

What is the relationship between cadence and pensando elba?

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-06 23:36 ` [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support Brad Larson
@ 2022-04-07  7:57   ` Marc Zyngier
  2022-04-09  2:38     ` Brad Larson
  2022-04-07 19:06   ` Krzysztof Kozlowski
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 50+ messages in thread
From: Marc Zyngier @ 2022-04-07  7:57 UTC (permalink / raw)
  To: Brad Larson
  Cc: linux-arm-kernel, arnd, linus.walleij, bgolaszewski, broonie,
	fancer.lancer, adrian.hunter, ulf.hansson, olof, dac2,
	linux-gpio, linux-spi, linux-mmc, devicetree, linux-kernel

On 2022-04-07 00:36, Brad Larson wrote:
> Add Pensando common and Elba SoC specific device nodes
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
> Change from V3:
> - Changed to dual copyright (GPL-2.0+ OR MIT)
> - Minor changes from review input
> 
>  arch/arm64/boot/dts/Makefile                  |   1 +
>  arch/arm64/boot/dts/pensando/Makefile         |   3 +
>  arch/arm64/boot/dts/pensando/elba-16core.dtsi | 189 ++++++++++++++++++
>  .../boot/dts/pensando/elba-asic-common.dtsi   |  98 +++++++++
>  arch/arm64/boot/dts/pensando/elba-asic.dts    |  28 +++
>  .../boot/dts/pensando/elba-flash-parts.dtsi   | 106 ++++++++++
>  arch/arm64/boot/dts/pensando/elba.dtsi        | 189 ++++++++++++++++++
>  7 files changed, 614 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
> 

[...]

> diff --git a/arch/arm64/boot/dts/pensando/elba.dtsi
> b/arch/arm64/boot/dts/pensando/elba.dtsi
> new file mode 100644
> index 000000000000..10e06eb8cda6
> --- /dev/null
> +++ b/arch/arm64/boot/dts/pensando/elba.dtsi

[...]

> +		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 */

You are still missing the GICV and GICH regions that are
provided by the CPU. I already pointed that out in [1].

The Cortex-A72 TRM will tell you where to find them (at
an offset from PERIPHBASE).

Please fix this.

         M.

[1] 
https://lore.kernel.org/all/a20805de16e1196c2ed46dd949473c9a@kernel.org
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support
  2022-04-07  7:13     ` Adrian Hunter
@ 2022-04-07 17:06       ` Brad Larson
  2022-04-07 20:38         ` Arnd Bergmann
  0 siblings, 1 reply; 50+ messages in thread
From: Brad Larson @ 2022-04-07 17:06 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Arnd Bergmann, Linux ARM, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Ulf Hansson, Olof Johansson,
	David Clear, open list:GPIO SUBSYSTEM, linux-spi, linux-mmc,
	DTML, Linux Kernel Mailing List

On Thu, Apr 7, 2022 at 12:13 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> What is the relationship between cadence and pensando elba?

Pensando licensed the cadence controller, its 100% cadence IP.  The
integration issue we ran into was with the accessors where we have the
workaround.  The initial patch added a separate Elba driver file but
the feedback was the Elba support didn't justify doing that and to add
to sdhci-cacence.c.

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 02/11] dt-bindings: Add vendor prefix for Pensando Systems
  2022-04-06 23:36 ` [PATCH 02/11] dt-bindings: Add vendor prefix for Pensando Systems Brad Larson
@ 2022-04-07 18:43   ` Krzysztof Kozlowski
  2022-04-09  2:00     ` Brad Larson
  0 siblings, 1 reply; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07 18:43 UTC (permalink / raw)
  To: Brad Larson, linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, dac2, linux-gpio, linux-spi,
	linux-mmc, devicetree, linux-kernel

On 07/04/2022 01:36, Brad Larson wrote:
> Add vendor prefix for Pensando Systems: https://pensando.io
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 01430973ecec..0ce8f94eab08 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -936,6 +936,8 @@ patternProperties:
>      description: Parade Technologies Inc.
>    "^parallax,.*":
>      description: Parallax Inc.
> +  "^pensando,.*":
> +    description: Pensando Systems Inc.

List is ordered alphabetically, so this goes one further.

>    "^pda,.*":
>      description: Precision Design Associates, Inc.
>    "^pericom,.*":


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/11] dt-bindings: arm: add Pensando boards
  2022-04-06 23:36 ` [PATCH 01/11] dt-bindings: arm: add Pensando boards Brad Larson
@ 2022-04-07 18:45   ` Krzysztof Kozlowski
  2022-04-09  2:19     ` Brad Larson
  2022-04-07 18:54   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07 18:45 UTC (permalink / raw)
  To: Brad Larson, linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, dac2, linux-gpio, linux-spi,
	linux-mmc, devicetree, linux-kernel

On 07/04/2022 01:36, Brad Larson wrote:
> Document the compatible for Pensando Elba SoC boards.
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
> Change from V3:
> - Add description and board compatible

That's a bit confusing... the subject is for v1.

> 
>  .../bindings/arm/pensando,elba.yaml           | 26 +++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/pensando,elba.yaml
> 
> diff --git a/Documentation/devicetree/bindings/arm/pensando,elba.yaml b/Documentation/devicetree/bindings/arm/pensando,elba.yaml
> new file mode 100644
> index 000000000000..61225f2d6ce5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/pensando,elba.yaml
> @@ -0,0 +1,26 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/pensando,elba.yaml#

I propose just pensando.yaml, unless there is going to be hundreds of
different families of SoC from Pensando?

This patch should be after adding the vendor prefix.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings
  2022-04-06 23:36 ` [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings Brad Larson
@ 2022-04-07 18:52   ` Krzysztof Kozlowski
  2022-04-11 21:17     ` Serge Semin
  2022-05-26  0:27     ` Brad Larson
  2022-04-12 11:29   ` Serge Semin
  1 sibling, 2 replies; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07 18:52 UTC (permalink / raw)
  To: Brad Larson, linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, dac2, linux-gpio, linux-spi,
	linux-mmc, devicetree, linux-kernel

On 07/04/2022 01:36, Brad Larson wrote:
> The Pensando Elba SoC has integrated the DW APB SPI Controller
> and requires the property pensando,syscon-spics for access
> to the spics control register.
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
> Change from V3:
> - Add required property pensando,syscon-spics to go with
>   pensando,elba-spi

Thank you for your patch. There is something to discuss/improve.


>  .../bindings/spi/snps,dw-apb-ssi.yaml           | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> index d7e08b03e204..41c3bbf5a55c 100644
> --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> @@ -37,6 +37,21 @@ allOf:
>      else:
>        required:
>          - interrupts
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - pensando,elba-spi
> +    then:
> +      properties:
> +        pensando,syscon-spics:
> +          $ref: /schemas/types.yaml#/definitions/phandle
> +          description:
> +            Phandle to the system control device node which provides access to
> +            the spics control register

It looks you only need to poke one register from spics, so it could be
something like:

    items:
      - items:
          - description: Phandle to the system control device node
          - description: spics control register offset


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/11] dt-bindings: arm: add Pensando boards
  2022-04-06 23:36 ` [PATCH 01/11] dt-bindings: arm: add Pensando boards Brad Larson
  2022-04-07 18:45   ` Krzysztof Kozlowski
@ 2022-04-07 18:54   ` Krzysztof Kozlowski
  2022-04-09  2:04     ` Brad Larson
  1 sibling, 1 reply; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07 18:54 UTC (permalink / raw)
  To: Brad Larson, linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, dac2, linux-gpio, linux-spi,
	linux-mmc, devicetree, linux-kernel

On 07/04/2022 01:36, Brad Larson wrote:
> Document the compatible for Pensando Elba SoC boards.
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
> Change from V3:
> - Add description and board compatible
> 
>  .../bindings/arm/pensando,elba.yaml           | 26 +++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/pensando,elba.yaml
> 
> diff --git a/Documentation/devicetree/bindings/arm/pensando,elba.yaml b/Documentation/devicetree/bindings/arm/pensando,elba.yaml

It seems you ignored to Cc devicetree binding maintainers for all your
devicetree bindings patches.

Please rebase on a recent kernel tree and use scripts/get_maintainers.pl
to get list of people to Cc. Your tree could not have my address, but
why Rob is missing is a surprise...

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
  2022-04-06 23:36 ` [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding Brad Larson
  2022-04-07  6:30   ` Arnd Bergmann
@ 2022-04-07 18:57   ` Krzysztof Kozlowski
  2022-05-25 15:49     ` Brad Larson
  1 sibling, 1 reply; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07 18:57 UTC (permalink / raw)
  To: Brad Larson, linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, dac2, linux-gpio, linux-spi,
	linux-mmc, devicetree, linux-kernel

On 07/04/2022 01:36, Brad Larson wrote:
> 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 <brad@pensando.io>
> ---
> Change from V3:
> - Change from elba-emmc to elba-sd4hc to match file convention
> - Use minItems: 1 and maxItems: 2 to pass schema check
> 
>  Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> index 4207fed62dfe..278a71b27488 100644
> --- a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> +++ b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> @@ -19,10 +19,12 @@ properties:
>        - enum:
>            - microchip,mpfs-sd4hc
>            - socionext,uniphier-sd4hc
> +          - pensando,elba-sd4hc

Put your entry in alphabetical order.

>        - const: cdns,sd4hc
>  
>    reg:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2

This needs allOf:if:then: which sets constraint on number of items per
different compatible.

>  
>    interrupts:
>      maxItems: 1


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC
  2022-04-06 23:36 ` [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC Brad Larson
@ 2022-04-07 18:59   ` Krzysztof Kozlowski
  2022-05-25 16:58     ` Brad Larson
  2022-04-12 11:37   ` Serge Semin
  1 sibling, 1 reply; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07 18:59 UTC (permalink / raw)
  To: Brad Larson, linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, dac2, linux-gpio, linux-spi,
	linux-mmc, devicetree, linux-kernel

On 07/04/2022 01:36, Brad Larson wrote:
> Document the cadence qspi controller compatible for Pensando Elba SoC
> boards.  The Elba qspi fifo size is 1024.
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
>  Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> index 0a537fa3a641..bc298e413842 100644
> --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> @@ -30,6 +30,7 @@ properties:
>                - intel,lgm-qspi
>                - xlnx,versal-ospi-1.0
>                - intel,socfpga-qspi
> +              - pensando,elba-qspi
>            - const: cdns,qspi-nor
>        - const: cdns,qspi-nor
>  
> @@ -48,7 +49,7 @@ properties:
>      description:
>        Size of the data FIFO in words.
>      $ref: "/schemas/types.yaml#/definitions/uint32"
> -    enum: [ 128, 256 ]
> +    enum: [ 128, 256, 1024 ]

Is 1024 valid for other controllers? If not, then probably this should
be further constraint in allOf:if:then...

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-06 23:36 ` [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support Brad Larson
  2022-04-07  7:57   ` Marc Zyngier
@ 2022-04-07 19:06   ` Krzysztof Kozlowski
  2022-05-26  0:19     ` Brad Larson
  2022-04-07 20:58   ` Krzysztof Kozlowski
  2022-04-12 11:22   ` Serge Semin
  3 siblings, 1 reply; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07 19:06 UTC (permalink / raw)
  To: Brad Larson, linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, dac2, linux-gpio, linux-spi,
	linux-mmc, devicetree, linux-kernel

On 07/04/2022 01:36, Brad Larson wrote:
> Add Pensando common and Elba SoC specific device nodes
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
> Change from V3:
> - Changed to dual copyright (GPL-2.0+ OR MIT)
> - Minor changes from review input

Thank you for your patch. There is something to discuss/improve.

(...)

> +&i2c0 {
> +	clock-frequency = <100000>;
> +	status = "okay";
> +	rtc@51 {
> +		compatible = "nxp,pcf85263";
> +		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 {

Generic node name needed matching the class of a devicxe.

> +		compatible = "semtech,sx1301";	/* Enable spidev */

This comment is a bit odd... did you just use random compatible from
spidev instead of defining proper compatible?


> +		#address-cells = <1>;
> +		#size-cells = <1>;

Why address/size cells?

> +		spi-max-frequency = <12000000>;
> +		reg = <0>;

Please put reg just after compatible. It's the most common pattern.

> +	};
> +
> +	spi0_cs1@1 {
> +		compatible = "semtech,sx1301";
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		spi-max-frequency = <12000000>;
> +		reg = <1>;
> +	};
> +

(...)

> +
> +		emmc: mmc@30440000 {
> +			compatible = "pensando,elba-sd4hc", "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 {

Generic node name.

> +			compatible = "syscon", "simple-mfd";

This does not look correct. Syscon is okay, but why do you need
simple-mfd (there are no children here)?

> +			reg = <0x0 0x307c0000 0x0 0x3000>;
> +		};
> +	};
> +};


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support
  2022-04-07 17:06       ` Brad Larson
@ 2022-04-07 20:38         ` Arnd Bergmann
  2022-05-25 16:10           ` Brad Larson
  0 siblings, 1 reply; 50+ messages in thread
From: Arnd Bergmann @ 2022-04-07 20:38 UTC (permalink / raw)
  To: Brad Larson
  Cc: Adrian Hunter, Arnd Bergmann, Linux ARM, Linus Walleij,
	Bartosz Golaszewski, Mark Brown, Serge Semin, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc, DTML, Linux Kernel Mailing List

On Thu, Apr 7, 2022 at 7:06 PM Brad Larson <brad@pensando.io> wrote:
> On Thu, Apr 7, 2022 at 12:13 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
> >
> > What is the relationship between cadence and pensando elba?
>
> Pensando licensed the cadence controller, its 100% cadence IP.  The
> integration issue we ran into was with the accessors where we have the
> workaround.  The initial patch added a separate Elba driver file but
> the feedback was the Elba support didn't justify doing that and to add
> to sdhci-cacence.c.

I looked back at the earlier reviews now, I think the main problem with
versions 1 and 2 was that it had the abstraction the wrong way around,
so you added the complexity of having multiple files, without the benefits.

I still think that the cleanest approach would be to have it the way I
suggested in my reply to v1, with an elba specific platform driver
that calls into the generic cadence code, but the generic code knowing
nothing about the front-end.

Then again, it sounds like there was already an agreement about
the approach you took here, so let's stay with that and hope we don't
get any other chips with the same IP block in the future.

         Arnd

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-06 23:36 ` [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support Brad Larson
  2022-04-07  7:57   ` Marc Zyngier
  2022-04-07 19:06   ` Krzysztof Kozlowski
@ 2022-04-07 20:58   ` Krzysztof Kozlowski
  2022-04-12 11:22   ` Serge Semin
  3 siblings, 0 replies; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07 20:58 UTC (permalink / raw)
  To: Brad Larson, linux-arm-kernel
  Cc: arnd, linus.walleij, bgolaszewski, broonie, fancer.lancer,
	adrian.hunter, ulf.hansson, olof, dac2, linux-gpio, linux-spi,
	linux-mmc, devicetree, linux-kernel

On 07/04/2022 01:36, Brad Larson wrote:
> Add Pensando common and Elba SoC specific device nodes
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
> Change from V3:
> - Changed to dual copyright (GPL-2.0+ OR MIT)
> - Minor changes from review input

Thank you for your patch. There is something to discuss/improve.

(...)

> +&i2c0 {
> +	clock-frequency = <100000>;
> +	status = "okay";
> +	rtc@51 {
> +		compatible = "nxp,pcf85263";
> +		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 {

Generic node name needed matching the class of a devicxe.

> +		compatible = "semtech,sx1301";	/* Enable spidev */

This comment is a bit odd... did you just use random compatible from
spidev instead of defining proper compatible?


> +		#address-cells = <1>;
> +		#size-cells = <1>;

Why address/size cells?

> +		spi-max-frequency = <12000000>;
> +		reg = <0>;

Please put reg just after compatible. It's the most common pattern.

> +	};
> +
> +	spi0_cs1@1 {
> +		compatible = "semtech,sx1301";
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		spi-max-frequency = <12000000>;
> +		reg = <1>;
> +	};
> +

(...)

> +
> +		emmc: mmc@30440000 {
> +			compatible = "pensando,elba-sd4hc", "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 {

Generic node name.

> +			compatible = "syscon", "simple-mfd";

This does not look correct. Syscon is okay, but why do you need
simple-mfd (there are no children here)?

> +			reg = <0x0 0x307c0000 0x0 0x3000>;
> +		};
> +	};
> +};


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 02/11] dt-bindings: Add vendor prefix for Pensando Systems
  2022-04-07 18:43   ` Krzysztof Kozlowski
@ 2022-04-09  2:00     ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-09  2:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Thu, Apr 7, 2022 at 11:43 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> > +  "^pensando,.*":
> > +    description: Pensando Systems Inc.
>
> List is ordered alphabetically, so this goes one further.
>
> >    "^pda,.*":
> >      description: Precision Design Associates, Inc.
> >    "^pericom,.*":

Hi Krzysztof,

Ahh yes, pda, pen, ... I was looking at the company name.  Moving it down one.

Best,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/11] dt-bindings: arm: add Pensando boards
  2022-04-07 18:54   ` Krzysztof Kozlowski
@ 2022-04-09  2:04     ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-04-09  2:04 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Thu, Apr 7, 2022 at 11:54 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> > diff --git a/Documentation/devicetree/bindings/arm/pensando,elba.yaml b/Documentation/devicetree/bindings/arm/pensando,elba.yaml
>
> It seems you ignored to Cc devicetree binding maintainers for all your
> devicetree bindings patches.
>
> Please rebase on a recent kernel tree and use scripts/get_maintainers.pl
> to get list of people to Cc. Your tree could not have my address, but
> why Rob is missing is a surprise...

Hi Krzysztof,

Thanks for pointing this out.  I used get_maintainers.pl on the
original patchset that has evolved.  I will redo the list for the next
submission.

Best,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/11] dt-bindings: arm: add Pensando boards
  2022-04-07 18:45   ` Krzysztof Kozlowski
@ 2022-04-09  2:19     ` Brad Larson
  2022-04-09 10:39       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 50+ messages in thread
From: Brad Larson @ 2022-04-09  2:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Thu, Apr 7, 2022 at 11:45 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> > Change from V3:
> > - Add description and board compatible
>
> That's a bit confusing... the subject is for v1.

Goal was to identify in the cover letter patch the key changes from
the V3 patchset to this V4 patchset.  Then in each patch that had a
material change highlight that in the patch itself.  Will try and make
it more clear.

> > +$id: http://devicetree.org/schemas/arm/pensando,elba.yaml#
>
> I propose just pensando.yaml, unless there is going to be hundreds of
> different families of SoC from Pensando?
>
> This patch should be after adding the vendor prefix.

pensando.yaml is good, I'll change it to that.  I'll order this patch
to be after the vendor prefix addition in the next submission.

Best,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-07  7:57   ` Marc Zyngier
@ 2022-04-09  2:38     ` Brad Larson
  2022-04-09  9:18       ` Marc Zyngier
  0 siblings, 1 reply; 50+ messages in thread
From: Brad Larson @ 2022-04-09  2:38 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Thu, Apr 7, 2022 at 12:57 AM Marc Zyngier <maz@kernel.org> wrote:
>
> > +             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 */
>
> You are still missing the GICV and GICH regions that are
> provided by the CPU. I already pointed that out in [1].
>
> The Cortex-A72 TRM will tell you where to find them (at
> an offset from PERIPHBASE).

Hi Marc,

Got the addresses, neither region is used, and will be included in the
next submission.

Best,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-09  2:38     ` Brad Larson
@ 2022-04-09  9:18       ` Marc Zyngier
  2022-05-25 17:28         ` Brad Larson
  0 siblings, 1 reply; 50+ messages in thread
From: Marc Zyngier @ 2022-04-09  9:18 UTC (permalink / raw)
  To: Brad Larson
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Sat, 09 Apr 2022 03:38:55 +0100,
Brad Larson <brad@pensando.io> wrote:
> 
> On Thu, Apr 7, 2022 at 12:57 AM Marc Zyngier <maz@kernel.org> wrote:
> >
> > > +             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 */
> >
> > You are still missing the GICV and GICH regions that are
> > provided by the CPU. I already pointed that out in [1].
> >
> > The Cortex-A72 TRM will tell you where to find them (at
> > an offset from PERIPHBASE).
> 
> Hi Marc,
> 
> Got the addresses, neither region is used, and will be included in the
> next submission.

Not sure what you mean by these regions being unused here (the Linux
kernel definitely makes use of them). Note that you'll also need to
add GICC (which I forgot to mention above).

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/11] dt-bindings: arm: add Pensando boards
  2022-04-09  2:19     ` Brad Larson
@ 2022-04-09 10:39       ` Krzysztof Kozlowski
  2022-04-11 21:24         ` Serge Semin
  2022-05-25 16:31         ` Brad Larson
  0 siblings, 2 replies; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-09 10:39 UTC (permalink / raw)
  To: Brad Larson
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On 09/04/2022 04:19, Brad Larson wrote:
> On Thu, Apr 7, 2022 at 11:45 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>> Change from V3:
>>> - Add description and board compatible
>>
>> That's a bit confusing... the subject is for v1.
> 
> Goal was to identify in the cover letter patch the key changes from
> the V3 patchset to this V4 patchset.  Then in each patch that had a
> material change highlight that in the patch itself.  Will try and make
> it more clear.

This is fine, I am talking about the subject - it is marked as a v1, so
it's confusing to see a changelog.

One way to achieve this is: "git format-patch -v4 -11 ..."

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings
  2022-04-07 18:52   ` Krzysztof Kozlowski
@ 2022-04-11 21:17     ` Serge Semin
  2022-05-26  0:27     ` Brad Larson
  1 sibling, 0 replies; 50+ messages in thread
From: Serge Semin @ 2022-04-11 21:17 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Serge Semin, Brad Larson, linux-arm-kernel, arnd, linus.walleij,
	bgolaszewski, broonie, adrian.hunter, ulf.hansson, olof, dac2,
	linux-gpio, linux-spi, linux-mmc, devicetree, linux-kernel

On Thu, Apr 07, 2022 at 08:52:34PM +0200, Krzysztof Kozlowski wrote:
> On 07/04/2022 01:36, Brad Larson wrote:
> > The Pensando Elba SoC has integrated the DW APB SPI Controller
> > and requires the property pensando,syscon-spics for access
> > to the spics control register.
> > 
> > Signed-off-by: Brad Larson <brad@pensando.io>
> > ---
> > Change from V3:
> > - Add required property pensando,syscon-spics to go with
> >   pensando,elba-spi
> 
> Thank you for your patch. There is something to discuss/improve.
> 
> 
> >  .../bindings/spi/snps,dw-apb-ssi.yaml           | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> > index d7e08b03e204..41c3bbf5a55c 100644
> > --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> > +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> > @@ -37,6 +37,21 @@ allOf:
> >      else:
> >        required:
> >          - interrupts
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - pensando,elba-spi
> > +    then:
> > +      properties:
> > +        pensando,syscon-spics:
> > +          $ref: /schemas/types.yaml#/definitions/phandle
> > +          description:
> > +            Phandle to the system control device node which provides access to
> > +            the spics control register
> 

> It looks you only need to poke one register from spics, so it could be
> something like:
> 
>     items:
>       - items:
>           - description: Phandle to the system control device node
>           - description: spics control register offset

Right, especially seeing that's the way the elba-specific part of the
DW APB SSI driver expects the property being initialized.

-Sergey

> 
> 
> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/11] dt-bindings: arm: add Pensando boards
  2022-04-09 10:39       ` Krzysztof Kozlowski
@ 2022-04-11 21:24         ` Serge Semin
  2022-05-25 16:31         ` Brad Larson
  1 sibling, 0 replies; 50+ messages in thread
From: Serge Semin @ 2022-04-11 21:24 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Serge Semin, Brad Larson, Linux ARM, Arnd Bergmann,
	Linus Walleij, Bartosz Golaszewski, Mark Brown, Adrian Hunter,
	Ulf Hansson, Olof Johansson, David Clear,
	open list:GPIO SUBSYSTEM, linux-spi, linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Sat, Apr 09, 2022 at 12:39:59PM +0200, Krzysztof Kozlowski wrote:
> On 09/04/2022 04:19, Brad Larson wrote:
> > On Thu, Apr 7, 2022 at 11:45 AM Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>> Change from V3:
> >>> - Add description and board compatible
> >>
> >> That's a bit confusing... the subject is for v1.
> > 
> > Goal was to identify in the cover letter patch the key changes from
> > the V3 patchset to this V4 patchset.  Then in each patch that had a
> > material change highlight that in the patch itself.  Will try and make
> > it more clear.
> 

> This is fine, I am talking about the subject - it is marked as a v1, so
> it's confusing to see a changelog.
> 
> One way to achieve this is: "git format-patch -v4 -11 ..."

v2 was submitted by Brad one year ago:
https://patches.linaro.org/project/linux-spi/cover/20210329015938.20316-1-brad@pensando.io/
most likely he has just forgotten to add the proper suffix.

-Sergey

> 
> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 10/11] spi: dw: Add support for Pensando Elba SoC
  2022-04-06 23:36 ` [PATCH 10/11] spi: dw: Add support for Pensando Elba SoC Brad Larson
@ 2022-04-12 11:06   ` Serge Semin
  2022-05-25 21:54     ` Brad Larson
  0 siblings, 1 reply; 50+ messages in thread
From: Serge Semin @ 2022-04-12 11:06 UTC (permalink / raw)
  To: Brad Larson
  Cc: Serge Semin, linux-arm-kernel, arnd, linus.walleij, bgolaszewski,
	broonie, adrian.hunter, ulf.hansson, olof, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

On Wed, Apr 06, 2022 at 04:36:47PM -0700, Brad Larson wrote:
> The 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.  The Elba DW_SPI instance has two native
> CS signals that are always overridden.
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
> Change from V3:
> - Use more descriptive dt property pensando,syscon-spics
> - Minor changes from review input
> 
>  drivers/spi/spi-dw-mmio.c | 85 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 85 insertions(+)
> 
> diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c
> index 5101c4c6017b..f4636b271818 100644
> --- a/drivers/spi/spi-dw-mmio.c
> +++ b/drivers/spi/spi-dw-mmio.c
> @@ -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
> @@ -238,6 +256,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)

The methods naming is ambiguous. Moreover it breaks this module naming
convention. Could you change them to something like:
dw_spi_elba_override_cs()
and
dw_spi_elba_set_cs()
?

> +{
> +	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;
> +
> +	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 the platform may have fewer native CSs
> +	 * than needed, 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,syscon-spics", 1, 0, &args);
> +	if (rc) {
> +		dev_err(&pdev->dev, "could not find spics\n");
> +		return rc;
> +	}
> +
> +	regmap = syscon_node_to_regmap(args.np);
> +	if (IS_ERR(regmap))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(regmap),
> +				     "could not map spics");
> +
> +	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);

What if the CS lines are of the active-high type? In that case basically
you get to do the opposite to what you claim in the comment here.

Note the CS setting into the deactivated state is done in the spi_setup()
method anyway, at the moment of the peripheral SPI device registration
stage (see its calling the spi_set_cs() function). Thus what you are doing
here is redundant.

-Sergey

> +
> +	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,
> @@ -352,6 +436,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);
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-06 23:36 ` [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support Brad Larson
                     ` (2 preceding siblings ...)
  2022-04-07 20:58   ` Krzysztof Kozlowski
@ 2022-04-12 11:22   ` Serge Semin
  2022-05-25 20:06     ` Brad Larson
  3 siblings, 1 reply; 50+ messages in thread
From: Serge Semin @ 2022-04-12 11:22 UTC (permalink / raw)
  To: Brad Larson
  Cc: Serge Semin, linux-arm-kernel, arnd, linus.walleij, bgolaszewski,
	broonie, adrian.hunter, ulf.hansson, olof, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

On Wed, Apr 06, 2022 at 04:36:48PM -0700, Brad Larson wrote:
> Add Pensando common and Elba SoC specific device nodes
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
> Change from V3:
> - Changed to dual copyright (GPL-2.0+ OR MIT)
> - Minor changes from review input
> 
>  arch/arm64/boot/dts/Makefile                  |   1 +
>  arch/arm64/boot/dts/pensando/Makefile         |   3 +
>  arch/arm64/boot/dts/pensando/elba-16core.dtsi | 189 ++++++++++++++++++
>  .../boot/dts/pensando/elba-asic-common.dtsi   |  98 +++++++++
>  arch/arm64/boot/dts/pensando/elba-asic.dts    |  28 +++
>  .../boot/dts/pensando/elba-flash-parts.dtsi   | 106 ++++++++++
>  arch/arm64/boot/dts/pensando/elba.dtsi        | 189 ++++++++++++++++++
>  7 files changed, 614 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
> 

[...]

> diff --git a/arch/arm64/boot/dts/pensando/elba-asic-common.dtsi b/arch/arm64/boot/dts/pensando/elba-asic-common.dtsi
> new file mode 100644
> index 000000000000..7a89df68fdf7
> --- /dev/null
> +++ b/arch/arm64/boot/dts/pensando/elba-asic-common.dtsi
> @@ -0,0 +1,98 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2020-2022, 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";
> +		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 {
> +		compatible = "semtech,sx1301";	/* Enable spidev */
> +		#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>;
> +	};
> +};

[...]

> diff --git a/arch/arm64/boot/dts/pensando/elba.dtsi b/arch/arm64/boot/dts/pensando/elba.dtsi
> new file mode 100644
> index 000000000000..10e06eb8cda6
> --- /dev/null
> +++ b/arch/arm64/boot/dts/pensando/elba.dtsi
> @@ -0,0 +1,189 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2020-2022, Pensando Systems Inc.
> + */
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include "dt-bindings/interrupt-controller/arm-gic.h"
> +
> +/ {
> +	model = "Elba ASIC Board";
> +	compatible = "pensando,elba";
> +	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>;
> +	};
> +
> +	psci {
> +		compatible = "arm,psci-0.2";
> +		method = "smc";
> +	};
> +
> +	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>;
> +	};
> +
> +	pmu {
> +		compatible = "arm,cortex-a72-pmu";
> +		interrupts = <GIC_PPI 7 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,syscon-spics = <&mssoc 0x2468>;

I am wondering do you really need to define the
"pensando,syscon-spics" property as accepting a phandle with an
additional argument? That would have been justified if you had at
least two SPI controllers with different CS override registers. AFAICS
you've got only one here. So you can simplify the bindings by defining
the property like "pensando,syscon" (with no "spics" suffix) which
accepts the syscon phandle alone. Respective SPICS offset can be
locally declared in the driver as a macro with respective name.

-Sergey


> +			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>;
> +
> +			/*
> +			 * Elba specific pre-ITS is enabled using the
> +			 * existing property socionext,synquacer-pre-its
> +			 */
> +			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-sd4hc", "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>;
> +		};
> +	};
> +};
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings
  2022-04-06 23:36 ` [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings Brad Larson
  2022-04-07 18:52   ` Krzysztof Kozlowski
@ 2022-04-12 11:29   ` Serge Semin
  1 sibling, 0 replies; 50+ messages in thread
From: Serge Semin @ 2022-04-12 11:29 UTC (permalink / raw)
  To: Brad Larson
  Cc: Serge Semin, linux-arm-kernel, arnd, linus.walleij, bgolaszewski,
	broonie, adrian.hunter, ulf.hansson, olof, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

On Wed, Apr 06, 2022 at 04:36:42PM -0700, Brad Larson wrote:
> The Pensando Elba SoC has integrated the DW APB SPI Controller
> and requires the property pensando,syscon-spics for access
> to the spics control register.
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
> Change from V3:
> - Add required property pensando,syscon-spics to go with
>   pensando,elba-spi
> 
>  .../bindings/spi/snps,dw-apb-ssi.yaml           | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> index d7e08b03e204..41c3bbf5a55c 100644
> --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> @@ -37,6 +37,21 @@ allOf:
>      else:
>        required:
>          - interrupts
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - pensando,elba-spi
> +    then:
> +      properties:

> +        pensando,syscon-spics:

Please see my comment to the "[PATCH 11/11] arm64: dts: Add Pensando
Elba SoC support" patch regarding this property implementation.

-Sergey

> +          $ref: /schemas/types.yaml#/definitions/phandle
> +          description:
> +            Phandle to the system control device node which provides access to
> +            the spics control register
> +      required:
> +        - pensando,syscon-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 SoC SPI Controller
> +        const: pensando,elba-spi
>  
>    reg:
>      minItems: 1
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC
  2022-04-06 23:36 ` [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC Brad Larson
  2022-04-07 18:59   ` Krzysztof Kozlowski
@ 2022-04-12 11:37   ` Serge Semin
  2022-05-25 17:03     ` Brad Larson
  1 sibling, 1 reply; 50+ messages in thread
From: Serge Semin @ 2022-04-12 11:37 UTC (permalink / raw)
  To: Brad Larson
  Cc: Serge Semin, linux-arm-kernel, arnd, linus.walleij, bgolaszewski,
	broonie, adrian.hunter, ulf.hansson, olof, dac2, linux-gpio,
	linux-spi, linux-mmc, devicetree, linux-kernel

> [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC

I think you need to be more specific in the patch title to what bindings
you are adding the new compatible string. Something like this
"dt-bindings: spi: cdns: ..."
The same concerns the patch "[PATCH 03/11] dt-bindings: mmc: Add Pensando
Elba SoC binding".
Otherwise it isn't clear to what schema you are adding the Elba SoC
support to.

-Sergey

On Wed, Apr 06, 2022 at 04:36:41PM -0700, Brad Larson wrote:
> Document the cadence qspi controller compatible for Pensando Elba SoC
> boards.  The Elba qspi fifo size is 1024.
> 
> Signed-off-by: Brad Larson <brad@pensando.io>
> ---
>  Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> index 0a537fa3a641..bc298e413842 100644
> --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> @@ -30,6 +30,7 @@ properties:
>                - intel,lgm-qspi
>                - xlnx,versal-ospi-1.0
>                - intel,socfpga-qspi
> +              - pensando,elba-qspi
>            - const: cdns,qspi-nor
>        - const: cdns,qspi-nor
>  
> @@ -48,7 +49,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:
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
  2022-04-07  6:30   ` Arnd Bergmann
@ 2022-05-25 15:46     ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-25 15:46 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux ARM, Linus Walleij, Bartosz Golaszewski, Mark Brown,
	Serge Semin, Adrian Hunter, Ulf Hansson, Olof Johansson,
	David Clear, open list:GPIO SUBSYSTEM, linux-spi, linux-mmc,
	DTML, Linux Kernel Mailing List

Hi Arnd,

On Wed, Apr 6, 2022 at 11:31 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Thu, Apr 7, 2022 at 1:36 AM Brad Larson <brad@pensando.io> wrote:
> >
> > --- a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> > @@ -19,10 +19,12 @@ properties:
> >        - enum:
> >            - microchip,mpfs-sd4hc
> >            - socionext,uniphier-sd4hc
> > +          - pensando,elba-sd4hc
> >        - const: cdns,sd4hc
> >
> >    reg:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
> >
>
> Shouldn't the binding describe what the register areas are? If there
> is only one of them, it is fairly clear, but when you have the choice
> between one and two, it gets ambiguous, and there is a risk that
> another SoC might have a different register area in the second entry,
> making it incompatible.

Thanks for the review.  Changing this to allOf:if:then in updated
patchset.  The second item is particular to Elba SoC.

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding
  2022-04-07 18:57   ` Krzysztof Kozlowski
@ 2022-05-25 15:49     ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-25 15:49 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Krzysztof,

On Thu, Apr 7, 2022 at 11:57 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 07/04/2022 01:36, Brad Larson wrote:
> >
> > --- a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> > @@ -19,10 +19,12 @@ properties:
> >        - enum:
> >            - microchip,mpfs-sd4hc
> >            - socionext,uniphier-sd4hc
> > +          - pensando,elba-sd4hc
>
> Put your entry in alphabetical order.

Yes, will order alphabetical.

> >        - const: cdns,sd4hc
> >
> >    reg:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
>
> This needs allOf:if:then: which sets constraint on number of items per
> different compatible.
>
> >
> >    interrupts:
> >      maxItems: 1

Thanks for the recommendation.  Changing to this approach as the
second item is only for Elba SoC.

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support
  2022-04-07 20:38         ` Arnd Bergmann
@ 2022-05-25 16:10           ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-25 16:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Adrian Hunter, Linux ARM, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Ulf Hansson, Olof Johansson,
	David Clear, open list:GPIO SUBSYSTEM, linux-spi, linux-mmc,
	DTML, Linux Kernel Mailing List

Hi Arnd,

On Thu, Apr 7, 2022 at 1:38 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Thu, Apr 7, 2022 at 7:06 PM Brad Larson <brad@pensando.io> wrote:
> > On Thu, Apr 7, 2022 at 12:13 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
> > >
> > > What is the relationship between cadence and pensando elba?
> >
> > Pensando licensed the cadence controller, its 100% cadence IP.  The
> > integration issue we ran into was with the accessors where we have the
> > workaround.  The initial patch added a separate Elba driver file but
> > the feedback was the Elba support didn't justify doing that and to add
> > to sdhci-cacence.c.
>
> I looked back at the earlier reviews now, I think the main problem with
> versions 1 and 2 was that it had the abstraction the wrong way around,
> so you added the complexity of having multiple files, without the benefits.
>
> I still think that the cleanest approach would be to have it the way I
> suggested in my reply to v1, with an elba specific platform driver
> that calls into the generic cadence code, but the generic code knowing
> nothing about the front-end.
>
> Then again, it sounds like there was already an agreement about
> the approach you took here, so let's stay with that and hope we don't
> get any other chips with the same IP block in the future.

Thanks for looking this over.  I won't change for now in the patch
update in process.  This will likely get another look as I've added a
node to the device tree to enable an added reset driver which can
hardware reset the emmc.  The current cadence sdhci driver does not
include this and I've currently added filling out
mmc_host_ops.card_hw_reset like below, yet one more thing different
for our platforms not in the common driver.

@@ -404,6 +550,17 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
        if (ret)
                goto free;

+       if (host->mmc->caps & MMC_CAP_HW_RESET) {
+               priv->rst_hw =
devm_reset_control_get_optional_exclusive(dev, "hw");
+               if (IS_ERR(priv->rst_hw)) {
+                       ret = PTR_ERR(priv->rst_hw);
+                       if (ret == -ENOENT)
+                               priv->rst_hw = NULL;
+               } else {
+                       host->mmc_host_ops.card_hw_reset = sdhci_mmc_hw_reset;
+               }
+       }
+
        ret = sdhci_add_host(host);

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/11] dt-bindings: arm: add Pensando boards
  2022-04-09 10:39       ` Krzysztof Kozlowski
  2022-04-11 21:24         ` Serge Semin
@ 2022-05-25 16:31         ` Brad Larson
  1 sibling, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-25 16:31 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Krzysztof,

On Sat, Apr 9, 2022 at 3:40 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 09/04/2022 04:19, Brad Larson wrote:
> > On Thu, Apr 7, 2022 at 11:45 AM Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>> Change from V3:
> >>> - Add description and board compatible
> >>
> >> That's a bit confusing... the subject is for v1.
> >
> > Goal was to identify in the cover letter patch the key changes from
> > the V3 patchset to this V4 patchset.  Then in each patch that had a
> > material change highlight that in the patch itself.  Will try and make
> > it more clear.
>
> This is fine, I am talking about the subject - it is marked as a v1, so
> it's confusing to see a changelog.
>
> One way to achieve this is: "git format-patch -v4 -11 ..."

That was the problem, thanks!  Missed including -v4 in last use of
format-patch.  Sorry for the confusion.

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC
  2022-04-07 18:59   ` Krzysztof Kozlowski
@ 2022-05-25 16:58     ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-25 16:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Krzysztof,

On Thu, Apr 7, 2022 at 11:59 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 07/04/2022 01:36, Brad Larson wrote:
> > Document the cadence qspi controller compatible for Pensando Elba SoC
> > boards.  The Elba qspi fifo size is 1024.
> >

> > @@ -48,7 +49,7 @@ properties:
> >      description:
> >        Size of the data FIFO in words.
> >      $ref: "/schemas/types.yaml#/definitions/uint32"
> > -    enum: [ 128, 256 ]
> > +    enum: [ 128, 256, 1024 ]
>
> Is 1024 valid for other controllers? If not, then probably this should
> be further constraint in allOf:if:then...

I'll change this to allOf:if:then so that the 1024 deep FIFO is
specific to Elba SoC.

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC
  2022-04-12 11:37   ` Serge Semin
@ 2022-05-25 17:03     ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-25 17:03 UTC (permalink / raw)
  To: Serge Semin
  Cc: Serge Semin, Linux ARM, Arnd Bergmann, Linus Walleij,
	Bartosz Golaszewski, Mark Brown, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Sergey,

On Tue, Apr 12, 2022 at 4:37 AM Serge Semin <fancer.lancer@gmail.com> wrote:
>
> > [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC
>
> I think you need to be more specific in the patch title to what bindings
> you are adding the new compatible string. Something like this
> "dt-bindings: spi: cdns: ..."
> The same concerns the patch "[PATCH 03/11] dt-bindings: mmc: Add Pensando
> Elba SoC binding".
> Otherwise it isn't clear to what schema you are adding the Elba SoC
> support to.

Thanks for the review, I'll add more specifics to the bindings patch title.

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-09  9:18       ` Marc Zyngier
@ 2022-05-25 17:28         ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-25 17:28 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Marc,

On Sat, Apr 9, 2022 at 2:18 AM Marc Zyngier <maz@kernel.org> wrote:
>
> On Sat, 09 Apr 2022 03:38:55 +0100,
> Brad Larson <brad@pensando.io> wrote:
> >

> > > You are still missing the GICV and GICH regions that are
> > > provided by the CPU. I already pointed that out in [1].
> > >
> > > The Cortex-A72 TRM will tell you where to find them (at
> > > an offset from PERIPHBASE).
> >
> > Hi Marc,
> >
> > Got the addresses, neither region is used, and will be included in the
> > next submission.
>
> Not sure what you mean by these regions being unused here (the Linux
> kernel definitely makes use of them). Note that you'll also need to
> add GICC (which I forgot to mention above).

Added missing GICV, GICH and GICC regions.

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-12 11:22   ` Serge Semin
@ 2022-05-25 20:06     ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-25 20:06 UTC (permalink / raw)
  To: Serge Semin
  Cc: Serge Semin, Linux ARM, Arnd Bergmann, Linus Walleij,
	Bartosz Golaszewski, Mark Brown, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Sergey,

On Tue, Apr 12, 2022 at 4:22 AM Serge Semin <fancer.lancer@gmail.com> wrote:
>
> On Wed, Apr 06, 2022 at 04:36:48PM -0700, Brad Larson wrote:

> > +             spi0: spi@2800 {
> > +                     compatible = "pensando,elba-spi";
> > +                     reg = <0x0 0x2800 0x0 0x100>;
>
> > +                     pensando,syscon-spics = <&mssoc 0x2468>;
>
> I am wondering do you really need to define the
> "pensando,syscon-spics" property as accepting a phandle with an
> additional argument? That would have been justified if you had at
> least two SPI controllers with different CS override registers. AFAICS
> you've got only one here. So you can simplify the bindings by defining
> the property like "pensando,syscon" (with no "spics" suffix) which
> accepts the syscon phandle alone. Respective SPICS offset can be
> locally declared in the driver as a macro with respective name.

Yes this can be simplified and doing that in updated patchset.  Only this
API call is needed in dw_spi_elba_init().

syscon_regmap_lookup_by_phandle(np, "pensando,syscon");

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 10/11] spi: dw: Add support for Pensando Elba SoC
  2022-04-12 11:06   ` Serge Semin
@ 2022-05-25 21:54     ` Brad Larson
  0 siblings, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-25 21:54 UTC (permalink / raw)
  To: Serge Semin
  Cc: Serge Semin, Linux ARM, Arnd Bergmann, Linus Walleij,
	Bartosz Golaszewski, Mark Brown, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Sergey,

On Tue, Apr 12, 2022 at 4:06 AM Serge Semin <fancer.lancer@gmail.com> wrote:
>
> > +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)
>
> The methods naming is ambiguous. Moreover it breaks this module naming
> convention. Could you change them to something like:
> dw_spi_elba_override_cs()
> and
> dw_spi_elba_set_cs()
> ?

Yes, changed elba_spics_set_cs() -> dw_spi_elba_override_cs()

> > +     /* deassert cs */
>
> > +     elba_spics_set_cs(dwselba, 0, 1);
> > +     elba_spics_set_cs(dwselba, 1, 1);
>
> What if the CS lines are of the active-high type? In that case basically
> you get to do the opposite to what you claim in the comment here.
>
> Note the CS setting into the deactivated state is done in the spi_setup()
> method anyway, at the moment of the peripheral SPI device registration
> stage (see its calling the spi_set_cs() function). Thus what you are doing
> here is redundant.

Yes this is a redundant initialization and is removed.  For Elba these CS lines
are active-low only.

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-04-07 19:06   ` Krzysztof Kozlowski
@ 2022-05-26  0:19     ` Brad Larson
  2022-05-26  6:53       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 50+ messages in thread
From: Brad Larson @ 2022-05-26  0:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Krzysztof,

On Thu, Apr 7, 2022 at 12:06 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 07/04/2022 01:36, Brad Larson wrote:
> > Add Pensando common and Elba SoC specific device nodes
> >
> > +&spi0 {
> > +     num-cs = <4>;
> > +     cs-gpios = <0>, <0>, <&porta 1 GPIO_ACTIVE_LOW>,
> > +                <&porta 7 GPIO_ACTIVE_LOW>;
> > +     status = "okay";
> > +     spi0_cs0@0 {
>
> Generic node name needed matching the class of a devicxe.

The device on this spi bus is a FPGA with 4 functions and looking at
other projects I've changed it to a resource-controller node name.  On
cs0 there is a sub-device reset-controller added in the upcoming
patchset to enable hardware reset of the eMMC device.

> > +             compatible = "semtech,sx1301";  /* Enable spidev */
>
> This comment is a bit odd... did you just use random compatible from
> spidev instead of defining proper compatible?

Yes, because adding a compatible was nacked.  We have a driver added
(two actually, mfd and reset driver) for the next patch update.

> > +             #address-cells = <1>;
> > +             #size-cells = <1>;
>
> Why address/size cells?

Removed where not needed

> > +             spi-max-frequency = <12000000>;
> > +             reg = <0>;
>
> Please put reg just after compatible. It's the most common pattern.

Yes, moved reg to be right after compatible

> > +     };
> > +
> > +     spi0_cs1@1 {
> > +             compatible = "semtech,sx1301";
> > +             #address-cells = <1>;
> > +             #size-cells = <1>;
> > +             spi-max-frequency = <12000000>;
> > +             reg = <1>;
> > +     };
> > +
 (...)
> > +
> > +             mssoc: mssoc@307c0000 {
>
> Generic node name.

Changed to syscon

> > +                     compatible = "syscon", "simple-mfd";
>
> This does not look correct. Syscon is okay, but why do you need
> simple-mfd (there are no children here)?

Yes, removed "simple-mfd"

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings
  2022-04-07 18:52   ` Krzysztof Kozlowski
  2022-04-11 21:17     ` Serge Semin
@ 2022-05-26  0:27     ` Brad Larson
  1 sibling, 0 replies; 50+ messages in thread
From: Brad Larson @ 2022-05-26  0:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Krzysztof,

On Thu, Apr 7, 2022 at 11:52 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 07/04/2022 01:36, Brad Larson wrote:
> > --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> > +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> > @@ -37,6 +37,21 @@ allOf:
> >      else:
> >        required:
> >          - interrupts
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - pensando,elba-spi
> > +    then:
> > +      properties:
> > +        pensando,syscon-spics:
> > +          $ref: /schemas/types.yaml#/definitions/phandle
> > +          description:
> > +            Phandle to the system control device node which provides access to
> > +            the spics control register
>
> It looks you only need to poke one register from spics, so it could be
> something like:
>
>     items:
>       - items:
>           - description: Phandle to the system control device node
>           - description: spics control register offset

This looks better, I'll change to this approach for updated patchset.

Regards,
Brad

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support
  2022-05-26  0:19     ` Brad Larson
@ 2022-05-26  6:53       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 50+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-26  6:53 UTC (permalink / raw)
  To: Brad Larson
  Cc: Linux ARM, Arnd Bergmann, Linus Walleij, Bartosz Golaszewski,
	Mark Brown, Serge Semin, Adrian Hunter, Ulf Hansson,
	Olof Johansson, David Clear, open list:GPIO SUBSYSTEM, linux-spi,
	linux-mmc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On 26/05/2022 02:19, Brad Larson wrote:
> Hi Krzysztof,
> 
> On Thu, Apr 7, 2022 at 12:06 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 07/04/2022 01:36, Brad Larson wrote:
>>> Add Pensando common and Elba SoC specific device nodes
>>>
>>> +&spi0 {
>>> +     num-cs = <4>;
>>> +     cs-gpios = <0>, <0>, <&porta 1 GPIO_ACTIVE_LOW>,
>>> +                <&porta 7 GPIO_ACTIVE_LOW>;
>>> +     status = "okay";
>>> +     spi0_cs0@0 {
>>
>> Generic node name needed matching the class of a devicxe.
> 
> The device on this spi bus is a FPGA with 4 functions and looking at
> other projects I've changed it to a resource-controller node name.  On
> cs0 there is a sub-device reset-controller added in the upcoming
> patchset to enable hardware reset of the eMMC device.
> 
>>> +             compatible = "semtech,sx1301";  /* Enable spidev */
>>
>> This comment is a bit odd... did you just use random compatible from
>> spidev instead of defining proper compatible?
> 
> Yes, because adding a compatible was nacked.  We have a driver added
> (two actually, mfd and reset driver) for the next patch update.

Yeah, but using some other one is also not correct.



Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2022-05-26  6:54 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 23:36 [PATCH 00/11] Support Pensando Elba SoC Brad Larson
2022-04-06 23:36 ` [PATCH 01/11] dt-bindings: arm: add Pensando boards Brad Larson
2022-04-07 18:45   ` Krzysztof Kozlowski
2022-04-09  2:19     ` Brad Larson
2022-04-09 10:39       ` Krzysztof Kozlowski
2022-04-11 21:24         ` Serge Semin
2022-05-25 16:31         ` Brad Larson
2022-04-07 18:54   ` Krzysztof Kozlowski
2022-04-09  2:04     ` Brad Larson
2022-04-06 23:36 ` [PATCH 02/11] dt-bindings: Add vendor prefix for Pensando Systems Brad Larson
2022-04-07 18:43   ` Krzysztof Kozlowski
2022-04-09  2:00     ` Brad Larson
2022-04-06 23:36 ` [PATCH 03/11] dt-bindings: mmc: Add Pensando Elba SoC binding Brad Larson
2022-04-07  6:30   ` Arnd Bergmann
2022-05-25 15:46     ` Brad Larson
2022-04-07 18:57   ` Krzysztof Kozlowski
2022-05-25 15:49     ` Brad Larson
2022-04-06 23:36 ` [PATCH 04/11] dt-bindings: spi: Add compatible for Pensando Elba SoC Brad Larson
2022-04-07 18:59   ` Krzysztof Kozlowski
2022-05-25 16:58     ` Brad Larson
2022-04-12 11:37   ` Serge Semin
2022-05-25 17:03     ` Brad Larson
2022-04-06 23:36 ` [PATCH 05/11] dt-bindings: spi: dw: Add Pensando Elba SoC SPI Controller bindings Brad Larson
2022-04-07 18:52   ` Krzysztof Kozlowski
2022-04-11 21:17     ` Serge Semin
2022-05-26  0:27     ` Brad Larson
2022-04-12 11:29   ` Serge Semin
2022-04-06 23:36 ` [PATCH 06/11] MAINTAINERS: Add entry for PENSANDO Brad Larson
2022-04-06 23:36 ` [PATCH 07/11] arm64: Add config for Pensando SoC platforms Brad Larson
2022-04-06 23:36 ` [PATCH 08/11] spi: cadence-quadspi: Add compatible for Pensando Elba SoC Brad Larson
2022-04-06 23:36 ` [PATCH 09/11] mmc: sdhci-cadence: Add Pensando Elba SoC support Brad Larson
2022-04-07  6:45   ` Arnd Bergmann
2022-04-07  7:13     ` Adrian Hunter
2022-04-07 17:06       ` Brad Larson
2022-04-07 20:38         ` Arnd Bergmann
2022-05-25 16:10           ` Brad Larson
2022-04-06 23:36 ` [PATCH 10/11] spi: dw: Add support for Pensando Elba SoC Brad Larson
2022-04-12 11:06   ` Serge Semin
2022-05-25 21:54     ` Brad Larson
2022-04-06 23:36 ` [PATCH 11/11] arm64: dts: Add Pensando Elba SoC support Brad Larson
2022-04-07  7:57   ` Marc Zyngier
2022-04-09  2:38     ` Brad Larson
2022-04-09  9:18       ` Marc Zyngier
2022-05-25 17:28         ` Brad Larson
2022-04-07 19:06   ` Krzysztof Kozlowski
2022-05-26  0:19     ` Brad Larson
2022-05-26  6:53       ` Krzysztof Kozlowski
2022-04-07 20:58   ` Krzysztof Kozlowski
2022-04-12 11:22   ` Serge Semin
2022-05-25 20:06     ` Brad Larson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).