* [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller
@ 2025-11-13 21:45 Alex Elder
2025-11-13 21:45 ` [PATCH v6 1/7] dt-bindings: phy: spacemit: Add SpacemiT PCIe/combo PHY Alex Elder
` (8 more replies)
0 siblings, 9 replies; 11+ messages in thread
From: Alex Elder @ 2025-11-13 21:45 UTC (permalink / raw)
To: dlan, robh, krzk+dt, conor+dt, vkoul, kishon, bhelgaas,
lpieralisi, kwilczynski, mani
Cc: ziyao, aurelien, johannes, mayank.rana, qiang.yu, shradha.t,
inochiama, pjw, palmer, aou, alex, p.zabel, christian.bruel,
thippeswamy.havalige, krishna.chundru, guodong, devicetree,
linux-pci, linux-phy, spacemit, linux-riscv, linux-kernel
This series introduces a PHY driver and a PCIe driver to support PCIe
on the SpacemiT K1 SoC. The PCIe implementation is derived from a
Synopsys DesignWare PCIe IP. The PHY driver supports one combination
PCIe/USB PHY as well as two PCIe-only PHYs. The combo PHY port uses
one PCIe lane, and the other two ports each have two lanes. All PCIe
ports operate at 5 GT/second.
The PCIe PHYs must be configured using a value that can only be
determined using the combo PHY, operating in PCIe mode. To allow
that PHY to be used for USB, the needed calibration step is performed
by the PHY driver automatically at probe time. Once this step is done,
the PHY can be used for either PCIe or USB.
The driver supports 256 MSIs, and initially does not support PCI INTx
interrupts. The hardware does not support MSI-X.
Version 6 of this series addresses a few comments from Christophe
Jaillet, and improves a workaround that disables ASPM L1. The two
people who had reported errors on earlier versions of this code have
confirmed their NVMe devices now work when configured with the default
RISC-V kernel configuration.
-Alex
This series is available here:
https://github.com/riscstar/linux/tree/outgoing/pcie-v6
Between version 5 and version 6:
- Aurelien Jarno and Johannes Erdfelt tested this code and found
they no longer saw the errors they observed previously
- Disabling ASPM L1 is now done earlier, at the end of the
dw_pcie_host_ops->init callback rather than ->post_init
- The function that disables ASPM L1 has been moved and renamed
- The return value from devm_platform_ioremap_resource_byname()
is now checked with IS_ERR()
- The number of MSI vectors implemented is back to 256, after
confirming with SpacemiT that they are all in fact supported
- The sentinel entry in the OF match table no longer includes
a trailing comma
- MODULE_LICENSE() and MODULE_DESCRIPTION() macros are now
included
Here is version 5 of this series:
https://lore.kernel.org/lkml/20251107191557.1827677-1-elder@riscstar.com/
Between version 4 and version 5:
- Clarify that INTx interrupts are not currently supported
- Add Rob Herring's Reviewed-by on patch 3
- The name of the PCIe root port will always begin with "pcie"
- Lines in the bindings are now wrapped at 80 columns
- Subject lines are all captialized (after subsystem tags)
- Place the PCIe Kconfig option in the proper location based on
vendor name (not Kconfig symbol); expand its description
- Drop two PCIe controller Kconfig dependencies
- Use dw_pcie_readl_dbi() and dw_pcie_writel_dbi() when turning
off ASPM L1
- The dw_pcie_host_ops->init callback has been rearranged a bit:
- The vendor and device IDs are now set early
- PERST# is asserted separate from putting the controller in RC mode
and indicating power is detected
- phy_init() is now called later, just before deasserting PERST#
- Because of timing issues involved in having the root port enable power,
getting and enabling the regulator is back to being done in the PCIe
controller probe function
- The regulator definition is moved back to the PCIe controller DT node,
out of the root port sub-node (in "k1-bananapi-f3.dts")
Here is version 4 of this series:
https://lore.kernel.org/lkml/20251030220259.1063792-1-elder@riscstar.com/
Additional history is available at that link.
Alex Elder (7):
dt-bindings: phy: spacemit: Add SpacemiT PCIe/combo PHY
dt-bindings: phy: spacemit: Introduce PCIe PHY
dt-bindings: pci: spacemit: Introduce PCIe host controller
phy: spacemit: Introduce PCIe/combo PHY
PCI: spacemit: Add SpacemiT PCIe host driver
riscv: dts: spacemit: Add a PCIe regulator
riscv: dts: spacemit: PCIe and PHY-related updates
.../bindings/pci/spacemit,k1-pcie-host.yaml | 157 ++++
.../bindings/phy/spacemit,k1-combo-phy.yaml | 114 +++
.../bindings/phy/spacemit,k1-pcie-phy.yaml | 71 ++
.../boot/dts/spacemit/k1-bananapi-f3.dts | 44 ++
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 33 +
arch/riscv/boot/dts/spacemit/k1.dtsi | 176 +++++
drivers/pci/controller/dwc/Kconfig | 13 +
drivers/pci/controller/dwc/Makefile | 1 +
drivers/pci/controller/dwc/pcie-spacemit-k1.c | 358 ++++++++++
drivers/phy/Kconfig | 11 +
drivers/phy/Makefile | 1 +
drivers/phy/phy-spacemit-k1-pcie.c | 670 ++++++++++++++++++
12 files changed, 1649 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pci/spacemit,k1-pcie-host.yaml
create mode 100644 Documentation/devicetree/bindings/phy/spacemit,k1-combo-phy.yaml
create mode 100644 Documentation/devicetree/bindings/phy/spacemit,k1-pcie-phy.yaml
create mode 100644 drivers/pci/controller/dwc/pcie-spacemit-k1.c
create mode 100644 drivers/phy/phy-spacemit-k1-pcie.c
base-commit: 6d7e7251d03f98f26f2ee0dfd21bb0a0480a2178
--
2.48.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v6 1/7] dt-bindings: phy: spacemit: Add SpacemiT PCIe/combo PHY
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
@ 2025-11-13 21:45 ` Alex Elder
2025-11-13 21:45 ` [PATCH v6 2/7] dt-bindings: phy: spacemit: Introduce PCIe PHY Alex Elder
` (7 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Alex Elder @ 2025-11-13 21:45 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, vkoul, kishon
Cc: dlan, guodong, devicetree, linux-phy, spacemit, linux-riscv,
linux-kernel
Add the Device Tree binding for the PCIe/USB 3.0 combo PHY found in
the SpacemiT K1 SoC. This is one of three PCIe PHYs, and is unusual
in that only the combo PHY can perform a calibration step needed to
determine settings used by the other two PCIe PHYs.
Calibration must be done with the combo PHY in PCIe mode, and to allow
this to occur independent of the eventual use for the PHY (PCIe or USB)
some PCIe-related properties must be supplied: clocks; resets; and a
syscon phandle.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Alex Elder <elder@riscstar.com>
---
.../bindings/phy/spacemit,k1-combo-phy.yaml | 114 ++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/spacemit,k1-combo-phy.yaml
diff --git a/Documentation/devicetree/bindings/phy/spacemit,k1-combo-phy.yaml b/Documentation/devicetree/bindings/phy/spacemit,k1-combo-phy.yaml
new file mode 100644
index 0000000000000..b59476cd78b57
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/spacemit,k1-combo-phy.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/spacemit,k1-combo-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SpacemiT K1 PCIe/USB3 Combo PHY
+
+maintainers:
+ - Alex Elder <elder@riscstar.com>
+
+description: >
+ Of the three PHYs on the SpacemiT K1 SoC capable of being used for
+ PCIe, one is a combo PHY that can also be configured for use by a
+ USB 3 controller. Using PCIe or USB 3 is a board design decision.
+
+ The combo PHY is also the only PCIe PHY that is able to determine
+ PCIe calibration values to use, and this must be determined before
+ the other two PCIe PHYs can be used. This calibration must be
+ performed with the combo PHY in PCIe mode, and is this is done
+ when the combo PHY is probed.
+
+ The combo PHY uses an external oscillator as a reference clock.
+ During normal operation, the PCIe or USB port driver is responsible
+ for ensuring all other clocks needed by a PHY are enabled, and all
+ resets affecting the PHY are deasserted. However, for the combo
+ PHY to perform calibration independent of whether it's later used
+ for PCIe or USB, all PCIe mode clocks and resets must be defined.
+
+properties:
+ compatible:
+ const: spacemit,k1-combo-phy
+
+ reg:
+ items:
+ - description: PHY control registers
+
+ clocks:
+ items:
+ - description: External oscillator used by the PHY PLL
+ - description: DWC PCIe Data Bus Interface (DBI) clock
+ - description: DWC PCIe application AXI-bus Master interface clock
+ - description: DWC PCIe application AXI-bus slave interface clock
+
+ clock-names:
+ items:
+ - const: refclk
+ - const: dbi
+ - const: mstr
+ - const: slv
+
+ resets:
+ items:
+ - description: PHY reset; remains deasserted after initialization
+ - description: DWC PCIe Data Bus Interface (DBI) reset
+ - description: DWC PCIe application AXI-bus Master interface reset
+ - description: DWC PCIe application AXI-bus slave interface reset
+
+ reset-names:
+ items:
+ - const: phy
+ - const: dbi
+ - const: mstr
+ - const: slv
+
+ spacemit,apmu:
+ description:
+ A phandle that refers to the APMU system controller, whose
+ regmap is used in setting the mode
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ "#phy-cells":
+ const: 1
+ description:
+ The argument value (PHY_TYPE_PCIE or PHY_TYPE_USB3) determines
+ whether the PHY operates in PCIe or USB3 mode.
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - spacemit,apmu
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/spacemit,k1-syscon.h>
+ phy@c0b10000 {
+ compatible = "spacemit,k1-combo-phy";
+ reg = <0xc0b10000 0x1000>;
+ clocks = <&vctcxo_24m>,
+ <&syscon_apmu CLK_PCIE0_DBI>,
+ <&syscon_apmu CLK_PCIE0_MASTER>,
+ <&syscon_apmu CLK_PCIE0_SLAVE>;
+ clock-names = "refclk",
+ "dbi",
+ "mstr",
+ "slv";
+ resets = <&syscon_apmu RESET_PCIE0_GLOBAL>,
+ <&syscon_apmu RESET_PCIE0_DBI>,
+ <&syscon_apmu RESET_PCIE0_MASTER>,
+ <&syscon_apmu RESET_PCIE0_SLAVE>;
+ reset-names = "phy",
+ "dbi",
+ "mstr",
+ "slv";
+ spacemit,apmu = <&syscon_apmu>;
+ #phy-cells = <1>;
+ };
--
2.48.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v6 2/7] dt-bindings: phy: spacemit: Introduce PCIe PHY
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
2025-11-13 21:45 ` [PATCH v6 1/7] dt-bindings: phy: spacemit: Add SpacemiT PCIe/combo PHY Alex Elder
@ 2025-11-13 21:45 ` Alex Elder
2025-11-13 21:45 ` [PATCH v6 3/7] dt-bindings: pci: spacemit: Introduce PCIe host controller Alex Elder
` (6 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Alex Elder @ 2025-11-13 21:45 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt
Cc: ziyao, dlan, guodong, devicetree, linux-phy, spacemit,
linux-riscv, linux-kernel
Add the Device Tree binding for two PCIe PHYs present on the SpacemiT
K1 SoC. These PHYs are dependent on a separate combo PHY, which
determines at probe time the calibration values used by the PCIe-only
PHYs.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Alex Elder <elder@riscstar.com>
---
.../bindings/phy/spacemit,k1-pcie-phy.yaml | 71 +++++++++++++++++++
1 file changed, 71 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/spacemit,k1-pcie-phy.yaml
diff --git a/Documentation/devicetree/bindings/phy/spacemit,k1-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/spacemit,k1-pcie-phy.yaml
new file mode 100644
index 0000000000000..019b28349be75
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/spacemit,k1-pcie-phy.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/spacemit,k1-pcie-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SpacemiT K1 PCIe PHY
+
+maintainers:
+ - Alex Elder <elder@riscstar.com>
+
+description: >
+ Two PHYs on the SpacemiT K1 SoC used for only for PCIe. These
+ PHYs must be configured using calibration values that are
+ determined by a third "combo PHY". The combo PHY determines
+ these calibration values during probe so they can be used for
+ the two PCIe-only PHYs.
+
+ The PHY uses an external oscillator as a reference clock. During
+ normal operation, the PCIe host driver is responsible for ensuring
+ all other clocks needed by a PHY are enabled, and all resets
+ affecting the PHY are deasserted.
+
+properties:
+ compatible:
+ const: spacemit,k1-pcie-phy
+
+ reg:
+ items:
+ - description: PHY control registers
+
+ clocks:
+ items:
+ - description: External oscillator used by the PHY PLL
+
+ clock-names:
+ const: refclk
+
+ resets:
+ items:
+ - description: PHY reset; remains deasserted after initialization
+
+ reset-names:
+ const: phy
+
+ "#phy-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/spacemit,k1-syscon.h>
+ phy@c0c10000 {
+ compatible = "spacemit,k1-pcie-phy";
+ reg = <0xc0c10000 0x1000>;
+ clocks = <&vctcxo_24m>;
+ clock-names = "refclk";
+ resets = <&syscon_apmu RESET_PCIE1_GLOBAL>;
+ reset-names = "phy";
+ #phy-cells = <0>;
+ };
--
2.48.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v6 3/7] dt-bindings: pci: spacemit: Introduce PCIe host controller
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
2025-11-13 21:45 ` [PATCH v6 1/7] dt-bindings: phy: spacemit: Add SpacemiT PCIe/combo PHY Alex Elder
2025-11-13 21:45 ` [PATCH v6 2/7] dt-bindings: phy: spacemit: Introduce PCIe PHY Alex Elder
@ 2025-11-13 21:45 ` Alex Elder
2025-11-13 21:45 ` [PATCH v6 6/7] riscv: dts: spacemit: Add a PCIe regulator Alex Elder
` (5 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Alex Elder @ 2025-11-13 21:45 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, bhelgaas, lpieralisi, kwilczynski, mani
Cc: dlan, guodong, devicetree, linux-pci, spacemit, linux-riscv,
linux-kernel
Add the Device Tree binding for the PCIe root complex found on the
SpacemiT K1 SoC. This device is derived from the Synopsys Designware
PCIe IP. It supports up to three PCIe ports operating at PCIe gen 2
link speeds (5 GT/sec). One of the ports uses a combo PHY, which is
typically used to support a USB 3 port.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Alex Elder <elder@riscstar.com>
---
.../bindings/pci/spacemit,k1-pcie-host.yaml | 157 ++++++++++++++++++
1 file changed, 157 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pci/spacemit,k1-pcie-host.yaml
diff --git a/Documentation/devicetree/bindings/pci/spacemit,k1-pcie-host.yaml b/Documentation/devicetree/bindings/pci/spacemit,k1-pcie-host.yaml
new file mode 100644
index 0000000000000..c4c00b5fcdc0c
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/spacemit,k1-pcie-host.yaml
@@ -0,0 +1,157 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/spacemit,k1-pcie-host.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SpacemiT K1 PCI Express Host Controller
+
+maintainers:
+ - Alex Elder <elder@riscstar.com>
+
+description: >
+ The SpacemiT K1 SoC PCIe host controller is based on the Synopsys DesignWare
+ PCIe IP. The controller uses the DesignWare built-in MSI interrupt
+ controller, and supports 256 MSIs.
+
+allOf:
+ - $ref: /schemas/pci/snps,dw-pcie.yaml#
+
+properties:
+ compatible:
+ const: spacemit,k1-pcie
+
+ reg:
+ items:
+ - description: DesignWare PCIe registers
+ - description: ATU address space
+ - description: PCIe configuration space
+ - description: Link control registers
+
+ reg-names:
+ items:
+ - const: dbi
+ - const: atu
+ - const: config
+ - const: link
+
+ clocks:
+ items:
+ - description: DWC PCIe Data Bus Interface (DBI) clock
+ - description: DWC PCIe application AXI-bus master interface clock
+ - description: DWC PCIe application AXI-bus slave interface clock
+
+ clock-names:
+ items:
+ - const: dbi
+ - const: mstr
+ - const: slv
+
+ resets:
+ items:
+ - description: DWC PCIe Data Bus Interface (DBI) reset
+ - description: DWC PCIe application AXI-bus master interface reset
+ - description: DWC PCIe application AXI-bus slave interface reset
+
+ reset-names:
+ items:
+ - const: dbi
+ - const: mstr
+ - const: slv
+
+ interrupts:
+ items:
+ - description: Interrupt used for MSIs
+
+ interrupt-names:
+ const: msi
+
+ spacemit,apmu:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description:
+ A phandle that refers to the APMU system controller, whose regmap is
+ used in managing resets and link state, along with and offset of its
+ reset control register.
+ items:
+ - items:
+ - description: phandle to APMU system controller
+ - description: register offset
+
+patternProperties:
+ '^pcie@':
+ type: object
+ $ref: /schemas/pci/pci-pci-bridge.yaml#
+
+ properties:
+ phys:
+ maxItems: 1
+
+ vpcie3v3-supply:
+ description:
+ A phandle for 3.3v regulator to use for PCIe
+
+ required:
+ - phys
+ - vpcie3v3-supply
+
+ unevaluatedProperties: false
+
+required:
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - interrupts
+ - interrupt-names
+ - spacemit,apmu
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/spacemit,k1-syscon.h>
+ pcie@ca400000 {
+ device_type = "pci";
+ compatible = "spacemit,k1-pcie";
+ reg = <0xca400000 0x00001000>,
+ <0xca700000 0x0001ff24>,
+ <0x9f000000 0x00002000>,
+ <0xc0c20000 0x00001000>;
+ reg-names = "dbi",
+ "atu",
+ "config",
+ "link";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges = <0x01000000 0x0 0x00000000 0x9f002000 0x0 0x00100000>,
+ <0x02000000 0x0 0x90000000 0x90000000 0x0 0x0f000000>;
+ interrupts = <142>;
+ interrupt-names = "msi";
+ clocks = <&syscon_apmu CLK_PCIE1_DBI>,
+ <&syscon_apmu CLK_PCIE1_MASTER>,
+ <&syscon_apmu CLK_PCIE1_SLAVE>;
+ clock-names = "dbi",
+ "mstr",
+ "slv";
+ resets = <&syscon_apmu RESET_PCIE1_DBI>,
+ <&syscon_apmu RESET_PCIE1_MASTER>,
+ <&syscon_apmu RESET_PCIE1_SLAVE>;
+ reset-names = "dbi",
+ "mstr",
+ "slv";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie1_3_cfg>;
+ spacemit,apmu = <&syscon_apmu 0x3d4>;
+
+ pcie@0 {
+ device_type = "pci";
+ compatible = "pciclass,0604";
+ reg = <0x0 0x0 0x0 0x0 0x0>;
+ bus-range = <0x01 0xff>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ phys = <&pcie1_phy>;
+ vpcie3v3-supply = <&pcie_vcc_3v3>;
+ };
+ };
--
2.48.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v6 6/7] riscv: dts: spacemit: Add a PCIe regulator
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
` (2 preceding siblings ...)
2025-11-13 21:45 ` [PATCH v6 3/7] dt-bindings: pci: spacemit: Introduce PCIe host controller Alex Elder
@ 2025-11-13 21:45 ` Alex Elder
2025-11-13 21:45 ` [PATCH v6 7/7] riscv: dts: spacemit: PCIe and PHY-related updates Alex Elder
` (4 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Alex Elder @ 2025-11-13 21:45 UTC (permalink / raw)
To: dlan, robh, krzk+dt, conor+dt
Cc: pjw, palmer, aou, alex, devicetree, linux-riscv, spacemit,
linux-kernel
Define a 3.3v fixed voltage regulator to be used by PCIe on the
Banana Pi BPI-F3. On this platform, this regulator is always on.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 02f218a16318e..71f48454ba47c 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -33,6 +33,14 @@ led1 {
};
};
+ pcie_vcc_3v3: pcie-vcc3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "PCIE_VCC3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
reg_dc_in: dc-in-12v {
compatible = "regulator-fixed";
regulator-name = "dc_in_12v";
--
2.48.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v6 7/7] riscv: dts: spacemit: PCIe and PHY-related updates
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
` (3 preceding siblings ...)
2025-11-13 21:45 ` [PATCH v6 6/7] riscv: dts: spacemit: Add a PCIe regulator Alex Elder
@ 2025-11-13 21:45 ` Alex Elder
2025-11-14 5:34 ` [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Aurelien Jarno
` (3 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Alex Elder @ 2025-11-13 21:45 UTC (permalink / raw)
To: dlan, robh, krzk+dt, conor+dt
Cc: pjw, palmer, aou, alex, guodong, devicetree, linux-riscv,
spacemit, linux-kernel
Define PCIe and PHY-related Device Tree nodes for the SpacemiT K1 SoC.
Enable the combo PHY and the two PCIe-only PHYs on the Banana Pi BPI-F3
board. The combo PHY is used for USB on this board, and that will be
enabled when USB 3 support is accepted.
The combo PHY must perform a calibration step to determine configuration
values used by the PCIe-only PHYs. As a result, it must be enabled if
either of the other two PHYs is enabled.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
.../boot/dts/spacemit/k1-bananapi-f3.dts | 36 ++++
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 33 ++++
arch/riscv/boot/dts/spacemit/k1.dtsi | 176 ++++++++++++++++++
3 files changed, 245 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 71f48454ba47c..3f10efd925dc8 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -61,6 +61,12 @@ reg_vcc_4v: vcc-4v {
};
};
+&combo_phy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie0_3_cfg>;
+ status = "okay";
+};
+
&emmc {
bus-width = <8>;
mmc-hs400-1_8v;
@@ -272,6 +278,36 @@ dldo7 {
};
};
+&pcie1_phy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie1_3_cfg>;
+ status = "okay";
+};
+
+&pcie1_port {
+ phys = <&pcie1_phy>;
+};
+
+&pcie1 {
+ vpcie3v3-supply = <&pcie_vcc_3v3>;
+ status = "okay";
+};
+
+&pcie2_phy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_4_cfg>;
+ status = "okay";
+};
+
+&pcie2_port {
+ phys = <&pcie2_phy>;
+};
+
+&pcie2 {
+ vpcie3v3-supply = <&pcie_vcc_3v3>;
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_2_cfg>;
diff --git a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
index e922e05ff856d..b13dcb10f4d66 100644
--- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
@@ -530,6 +530,39 @@ uart9-2-pins {
};
};
+ pcie0_3_cfg: pcie0-3-cfg {
+ pcie0-3-pins {
+ pinmux = <K1_PADCONF(54, 3)>, /* PERST# */
+ <K1_PADCONF(55, 3)>, /* WAKE# */
+ <K1_PADCONF(53, 3)>; /* CLKREQ# */
+
+ bias-pull-up = <0>;
+ drive-strength = <21>;
+ };
+ };
+
+ pcie1_3_cfg: pcie1-3-cfg {
+ pcie1-3-pins {
+ pinmux = <K1_PADCONF(59, 4)>, /* PERST# */
+ <K1_PADCONF(60, 4)>, /* WAKE# */
+ <K1_PADCONF(61, 4)>; /* CLKREQ# */
+
+ bias-pull-up = <0>;
+ drive-strength = <21>;
+ };
+ };
+
+ pcie2_4_cfg: pcie2-4-cfg {
+ pcie2-4-pins {
+ pinmux = <K1_PADCONF(62, 4)>, /* PERST# */
+ <K1_PADCONF(112, 3)>, /* WAKE# */
+ <K1_PADCONF(117, 4)>; /* CLKREQ# */
+
+ bias-pull-up = <0>;
+ drive-strength = <21>;
+ };
+ };
+
pwm14_1_cfg: pwm14-1-cfg {
pwm14-1-pins {
pinmux = <K1_PADCONF(44, 4)>;
diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
index 7818ca4979b6a..86d1db14e2ee4 100644
--- a/arch/riscv/boot/dts/spacemit/k1.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
@@ -4,6 +4,7 @@
*/
#include <dt-bindings/clock/spacemit,k1-syscon.h>
+#include <dt-bindings/phy/phy.h>
/dts-v1/;
/ {
@@ -423,6 +424,52 @@ i2c5: i2c@d4013800 {
status = "disabled";
};
+ combo_phy: phy@c0b10000 {
+ compatible = "spacemit,k1-combo-phy";
+ reg = <0x0 0xc0b10000 0x0 0x1000>;
+ clocks = <&vctcxo_24m>,
+ <&syscon_apmu CLK_PCIE0_DBI>,
+ <&syscon_apmu CLK_PCIE0_MASTER>,
+ <&syscon_apmu CLK_PCIE0_SLAVE>;
+ clock-names = "refclk",
+ "dbi",
+ "mstr",
+ "slv";
+ resets = <&syscon_apmu RESET_PCIE0_GLOBAL>,
+ <&syscon_apmu RESET_PCIE0_DBI>,
+ <&syscon_apmu RESET_PCIE0_MASTER>,
+ <&syscon_apmu RESET_PCIE0_SLAVE>;
+ reset-names = "phy",
+ "dbi",
+ "mstr",
+ "slv";
+ #phy-cells = <1>;
+ spacemit,apmu = <&syscon_apmu>;
+ status = "disabled";
+ };
+
+ pcie1_phy: phy@c0c10000 {
+ compatible = "spacemit,k1-pcie-phy";
+ reg = <0x0 0xc0c10000 0x0 0x1000>;
+ clocks = <&vctcxo_24m>;
+ clock-names = "refclk";
+ resets = <&syscon_apmu RESET_PCIE1_GLOBAL>;
+ reset-names = "phy";
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ pcie2_phy: phy@c0d10000 {
+ compatible = "spacemit,k1-pcie-phy";
+ reg = <0x0 0xc0d10000 0x0 0x1000>;
+ clocks = <&vctcxo_24m>;
+ clock-names = "refclk";
+ resets = <&syscon_apmu RESET_PCIE2_GLOBAL>;
+ reset-names = "phy";
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
syscon_apbc: system-controller@d4015000 {
compatible = "spacemit,k1-syscon-apbc";
reg = <0x0 0xd4015000 0x0 0x1000>;
@@ -969,6 +1016,135 @@ pcie-bus {
#size-cells = <2>;
dma-ranges = <0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>,
<0x0 0xb8000000 0x1 0x38000000 0x3 0x48000000>;
+ pcie0: pcie@ca000000 {
+ device_type = "pci";
+ compatible = "spacemit,k1-pcie";
+ reg = <0x0 0xca000000 0x0 0x00001000>,
+ <0x0 0xca300000 0x0 0x0001ff24>,
+ <0x0 0x8f000000 0x0 0x00002000>,
+ <0x0 0xc0b20000 0x0 0x00001000>;
+ reg-names = "dbi",
+ "atu",
+ "config",
+ "link";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges = <0x01000000 0x0 0x00000000 0x0 0x8f002000 0x0 0x00100000>,
+ <0x02000000 0x0 0x80000000 0x0 0x80000000 0x0 0x0f000000>;
+ interrupts = <141>;
+ interrupt-names = "msi";
+ clocks = <&syscon_apmu CLK_PCIE0_DBI>,
+ <&syscon_apmu CLK_PCIE0_MASTER>,
+ <&syscon_apmu CLK_PCIE0_SLAVE>;
+ clock-names = "dbi",
+ "mstr",
+ "slv";
+ resets = <&syscon_apmu RESET_PCIE0_DBI>,
+ <&syscon_apmu RESET_PCIE0_MASTER>,
+ <&syscon_apmu RESET_PCIE0_SLAVE>;
+ reset-names = "dbi",
+ "mstr",
+ "slv";
+ spacemit,apmu = <&syscon_apmu 0x03cc>;
+ status = "disabled";
+
+ pcie0_port: pcie@0 {
+ device_type = "pci";
+ compatible = "pciclass,0604";
+ reg = <0x0 0x0 0x0 0x0 0x0>;
+ bus-range = <0x01 0xff>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ };
+ };
+
+ pcie1: pcie@ca400000 {
+ device_type = "pci";
+ compatible = "spacemit,k1-pcie";
+ reg = <0x0 0xca400000 0x0 0x00001000>,
+ <0x0 0xca700000 0x0 0x0001ff24>,
+ <0x0 0x9f000000 0x0 0x00002000>,
+ <0x0 0xc0c20000 0x0 0x00001000>;
+ reg-names = "dbi",
+ "atu",
+ "config",
+ "link";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges = <0x01000000 0x0 0x00000000 0x0 0x9f002000 0x0 0x00100000>,
+ <0x02000000 0x0 0x90000000 0x0 0x90000000 0x0 0x0f000000>;
+ interrupts = <142>;
+ interrupt-names = "msi";
+ clocks = <&syscon_apmu CLK_PCIE1_DBI>,
+ <&syscon_apmu CLK_PCIE1_MASTER>,
+ <&syscon_apmu CLK_PCIE1_SLAVE>;
+ clock-names = "dbi",
+ "mstr",
+ "slv";
+ resets = <&syscon_apmu RESET_PCIE1_DBI>,
+ <&syscon_apmu RESET_PCIE1_MASTER>,
+ <&syscon_apmu RESET_PCIE1_SLAVE>;
+ reset-names = "dbi",
+ "mstr",
+ "slv";
+ spacemit,apmu = <&syscon_apmu 0x3d4>;
+ status = "disabled";
+
+ pcie1_port: pcie@0 {
+ device_type = "pci";
+ compatible = "pciclass,0604";
+ reg = <0x0 0x0 0x0 0x0 0x0>;
+ bus-range = <0x01 0xff>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ };
+ };
+
+ pcie2: pcie@ca800000 {
+ device_type = "pci";
+ compatible = "spacemit,k1-pcie";
+ reg = <0x0 0xca800000 0x0 0x00001000>,
+ <0x0 0xcab00000 0x0 0x0001ff24>,
+ <0x0 0xb7000000 0x0 0x00002000>,
+ <0x0 0xc0d20000 0x0 0x00001000>;
+ reg-names = "dbi",
+ "atu",
+ "config",
+ "link";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges = <0x01000000 0x0 0x00000000 0x0 0xb7002000 0x0 0x00100000>,
+ <0x42000000 0x0 0xa0000000 0x0 0xa0000000 0x0 0x10000000>,
+ <0x02000000 0x0 0xb0000000 0x0 0xb0000000 0x0 0x07000000>;
+ interrupts = <143>;
+ interrupt-names = "msi";
+ clocks = <&syscon_apmu CLK_PCIE2_DBI>,
+ <&syscon_apmu CLK_PCIE2_MASTER>,
+ <&syscon_apmu CLK_PCIE2_SLAVE>;
+ clock-names = "dbi",
+ "mstr",
+ "slv";
+ resets = <&syscon_apmu RESET_PCIE2_DBI>,
+ <&syscon_apmu RESET_PCIE2_MASTER>,
+ <&syscon_apmu RESET_PCIE2_SLAVE>;
+ reset-names = "dbi",
+ "mstr",
+ "slv";
+ spacemit,apmu = <&syscon_apmu 0x3dc>;
+ status = "disabled";
+
+ pcie2_port: pcie@0 {
+ device_type = "pci";
+ compatible = "pciclass,0604";
+ reg = <0x0 0x0 0x0 0x0 0x0>;
+ bus-range = <0x01 0xff>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ };
+ };
};
storage-bus {
--
2.48.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
` (4 preceding siblings ...)
2025-11-13 21:45 ` [PATCH v6 7/7] riscv: dts: spacemit: PCIe and PHY-related updates Alex Elder
@ 2025-11-14 5:34 ` Aurelien Jarno
2025-11-14 6:05 ` Johannes Erdfelt
` (2 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Aurelien Jarno @ 2025-11-14 5:34 UTC (permalink / raw)
To: Alex Elder
Cc: dlan, robh, krzk+dt, conor+dt, vkoul, kishon, bhelgaas,
lpieralisi, kwilczynski, mani, ziyao, johannes, mayank.rana,
qiang.yu, shradha.t, inochiama, pjw, palmer, aou, alex, p.zabel,
christian.bruel, thippeswamy.havalige, krishna.chundru, guodong,
devicetree, linux-pci, linux-phy, spacemit, linux-riscv,
linux-kernel
On 2025-11-13 15:45, Alex Elder wrote:
> This series introduces a PHY driver and a PCIe driver to support PCIe
> on the SpacemiT K1 SoC. The PCIe implementation is derived from a
> Synopsys DesignWare PCIe IP. The PHY driver supports one combination
> PCIe/USB PHY as well as two PCIe-only PHYs. The combo PHY port uses
> one PCIe lane, and the other two ports each have two lanes. All PCIe
> ports operate at 5 GT/second.
>
> The PCIe PHYs must be configured using a value that can only be
> determined using the combo PHY, operating in PCIe mode. To allow
> that PHY to be used for USB, the needed calibration step is performed
> by the PHY driver automatically at probe time. Once this step is done,
> the PHY can be used for either PCIe or USB.
>
> The driver supports 256 MSIs, and initially does not support PCI INTx
> interrupts. The hardware does not support MSI-X.
>
> Version 6 of this series addresses a few comments from Christophe
> Jaillet, and improves a workaround that disables ASPM L1. The two
> people who had reported errors on earlier versions of this code have
> confirmed their NVMe devices now work when configured with the default
> RISC-V kernel configuration.
Thanks for this new version. I confirm it works fine on the various NVME
devices for which I reported issues with the previous versions of this
patchset.
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
` (5 preceding siblings ...)
2025-11-14 5:34 ` [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Aurelien Jarno
@ 2025-11-14 6:05 ` Johannes Erdfelt
2025-11-15 4:21 ` Jason Montleon
2025-11-17 14:55 ` (subset) " Manivannan Sadhasivam
8 siblings, 0 replies; 11+ messages in thread
From: Johannes Erdfelt @ 2025-11-14 6:05 UTC (permalink / raw)
To: Alex Elder
Cc: dlan, robh, krzk+dt, conor+dt, vkoul, kishon, bhelgaas,
lpieralisi, kwilczynski, mani, ziyao, aurelien, mayank.rana,
qiang.yu, shradha.t, inochiama, pjw, palmer, aou, alex, p.zabel,
christian.bruel, thippeswamy.havalige, krishna.chundru, guodong,
devicetree, linux-pci, linux-phy, spacemit, linux-riscv,
linux-kernel
On Thu, Nov 13, 2025, Alex Elder <elder@riscstar.com> wrote:
> This series introduces a PHY driver and a PCIe driver to support PCIe
> on the SpacemiT K1 SoC. The PCIe implementation is derived from a
> Synopsys DesignWare PCIe IP. The PHY driver supports one combination
> PCIe/USB PHY as well as two PCIe-only PHYs. The combo PHY port uses
> one PCIe lane, and the other two ports each have two lanes. All PCIe
> ports operate at 5 GT/second.
>
> The PCIe PHYs must be configured using a value that can only be
> determined using the combo PHY, operating in PCIe mode. To allow
> that PHY to be used for USB, the needed calibration step is performed
> by the PHY driver automatically at probe time. Once this step is done,
> the PHY can be used for either PCIe or USB.
>
> The driver supports 256 MSIs, and initially does not support PCI INTx
> interrupts. The hardware does not support MSI-X.
>
> Version 6 of this series addresses a few comments from Christophe
> Jaillet, and improves a workaround that disables ASPM L1. The two
> people who had reported errors on earlier versions of this code have
> confirmed their NVMe devices now work when configured with the default
> RISC-V kernel configuration.
I've tested this latest patchset on my Orange Pi RV2 board. This
patchset now works with the Intel 600p NVME SSD I had previously had
troublw with. Thanks!
Tested-by: Johannes Erdfelt <johannes@erdfelt.com>
JE
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
` (6 preceding siblings ...)
2025-11-14 6:05 ` Johannes Erdfelt
@ 2025-11-15 4:21 ` Jason Montleon
2025-11-17 17:12 ` Alex Elder
2025-11-17 14:55 ` (subset) " Manivannan Sadhasivam
8 siblings, 1 reply; 11+ messages in thread
From: Jason Montleon @ 2025-11-15 4:21 UTC (permalink / raw)
To: Alex Elder
Cc: dlan, robh, krzk+dt, conor+dt, vkoul, kishon, bhelgaas,
lpieralisi, kwilczynski, mani, ziyao, aurelien, johannes,
mayank.rana, qiang.yu, shradha.t, inochiama, pjw, palmer, aou,
alex, p.zabel, christian.bruel, thippeswamy.havalige,
krishna.chundru, guodong, devicetree, linux-pci, linux-phy,
spacemit, linux-riscv, linux-kernel
On Thu, Nov 13, 2025 at 4:45 PM Alex Elder <elder@riscstar.com> wrote:
>
> This series introduces a PHY driver and a PCIe driver to support PCIe
> on the SpacemiT K1 SoC. The PCIe implementation is derived from a
> Synopsys DesignWare PCIe IP. The PHY driver supports one combination
> PCIe/USB PHY as well as two PCIe-only PHYs. The combo PHY port uses
> one PCIe lane, and the other two ports each have two lanes. All PCIe
> ports operate at 5 GT/second.
>
> The PCIe PHYs must be configured using a value that can only be
> determined using the combo PHY, operating in PCIe mode. To allow
> that PHY to be used for USB, the needed calibration step is performed
> by the PHY driver automatically at probe time. Once this step is done,
> the PHY can be used for either PCIe or USB.
>
> The driver supports 256 MSIs, and initially does not support PCI INTx
> interrupts. The hardware does not support MSI-X.
>
> Version 6 of this series addresses a few comments from Christophe
> Jaillet, and improves a workaround that disables ASPM L1. The two
> people who had reported errors on earlier versions of this code have
> confirmed their NVMe devices now work when configured with the default
> RISC-V kernel configuration.
I successfully tested this patchset on a Banana Pi F3 and also a
Milk-V M1 Jupiter by making the same additions to k1-milkv-jupiter.dts
as were made to k1-bananapi-f3.dts.
I no longer have problems with NVME devices like I did when I tried v3 and v4.
Tested-by: Jason Montleon <jmontleo@redhat.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (subset) [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
` (7 preceding siblings ...)
2025-11-15 4:21 ` Jason Montleon
@ 2025-11-17 14:55 ` Manivannan Sadhasivam
8 siblings, 0 replies; 11+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-17 14:55 UTC (permalink / raw)
To: dlan, robh, krzk+dt, conor+dt, vkoul, kishon, bhelgaas,
lpieralisi, kwilczynski, Alex Elder
Cc: ziyao, aurelien, johannes, mayank.rana, qiang.yu, shradha.t,
inochiama, pjw, palmer, aou, alex, p.zabel, christian.bruel,
thippeswamy.havalige, krishna.chundru, guodong, devicetree,
linux-pci, linux-phy, spacemit, linux-riscv, linux-kernel
On Thu, 13 Nov 2025 15:45:32 -0600, Alex Elder wrote:
> This series introduces a PHY driver and a PCIe driver to support PCIe
> on the SpacemiT K1 SoC. The PCIe implementation is derived from a
> Synopsys DesignWare PCIe IP. The PHY driver supports one combination
> PCIe/USB PHY as well as two PCIe-only PHYs. The combo PHY port uses
> one PCIe lane, and the other two ports each have two lanes. All PCIe
> ports operate at 5 GT/second.
>
> [...]
Applied, thanks!
[3/7] dt-bindings: pci: spacemit: Introduce PCIe host controller
commit: a812b09a6b599ea80ec1065a9a635724a235843d
[5/7] PCI: spacemit: Add SpacemiT PCIe host driver
commit: ff64e078e45faee50cc6ca7900a3520e8ff1c79e
Best regards,
--
Manivannan Sadhasivam <mani@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller
2025-11-15 4:21 ` Jason Montleon
@ 2025-11-17 17:12 ` Alex Elder
0 siblings, 0 replies; 11+ messages in thread
From: Alex Elder @ 2025-11-17 17:12 UTC (permalink / raw)
To: Jason Montleon
Cc: dlan, robh, krzk+dt, conor+dt, vkoul, kishon, bhelgaas,
lpieralisi, kwilczynski, mani, ziyao, aurelien, johannes,
mayank.rana, qiang.yu, shradha.t, inochiama, pjw, palmer, aou,
alex, p.zabel, christian.bruel, thippeswamy.havalige,
krishna.chundru, guodong, devicetree, linux-pci, linux-phy,
spacemit, linux-riscv, linux-kernel
On 11/14/25 10:21 PM, Jason Montleon wrote:
> On Thu, Nov 13, 2025 at 4:45 PM Alex Elder <elder@riscstar.com> wrote:
>>
>> This series introduces a PHY driver and a PCIe driver to support PCIe
>> on the SpacemiT K1 SoC. The PCIe implementation is derived from a
>> Synopsys DesignWare PCIe IP. The PHY driver supports one combination
>> PCIe/USB PHY as well as two PCIe-only PHYs. The combo PHY port uses
>> one PCIe lane, and the other two ports each have two lanes. All PCIe
>> ports operate at 5 GT/second.
>>
>> The PCIe PHYs must be configured using a value that can only be
>> determined using the combo PHY, operating in PCIe mode. To allow
>> that PHY to be used for USB, the needed calibration step is performed
>> by the PHY driver automatically at probe time. Once this step is done,
>> the PHY can be used for either PCIe or USB.
>>
>> The driver supports 256 MSIs, and initially does not support PCI INTx
>> interrupts. The hardware does not support MSI-X.
>>
>> Version 6 of this series addresses a few comments from Christophe
>> Jaillet, and improves a workaround that disables ASPM L1. The two
>> people who had reported errors on earlier versions of this code have
>> confirmed their NVMe devices now work when configured with the default
>> RISC-V kernel configuration.
>
> I successfully tested this patchset on a Banana Pi F3 and also a
> Milk-V M1 Jupiter by making the same additions to k1-milkv-jupiter.dts
> as were made to k1-bananapi-f3.dts.
> I no longer have problems with NVME devices like I did when I tried v3 and v4.
>
> Tested-by: Jason Montleon <jmontleo@redhat.com>
Thank you very much for testing this. Your Tested-by is included
in Mani's commit.
-Alex
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-11-17 17:12 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13 21:45 [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Alex Elder
2025-11-13 21:45 ` [PATCH v6 1/7] dt-bindings: phy: spacemit: Add SpacemiT PCIe/combo PHY Alex Elder
2025-11-13 21:45 ` [PATCH v6 2/7] dt-bindings: phy: spacemit: Introduce PCIe PHY Alex Elder
2025-11-13 21:45 ` [PATCH v6 3/7] dt-bindings: pci: spacemit: Introduce PCIe host controller Alex Elder
2025-11-13 21:45 ` [PATCH v6 6/7] riscv: dts: spacemit: Add a PCIe regulator Alex Elder
2025-11-13 21:45 ` [PATCH v6 7/7] riscv: dts: spacemit: PCIe and PHY-related updates Alex Elder
2025-11-14 5:34 ` [PATCH v6 0/7] Introduce SpacemiT K1 PCIe phy and host controller Aurelien Jarno
2025-11-14 6:05 ` Johannes Erdfelt
2025-11-15 4:21 ` Jason Montleon
2025-11-17 17:12 ` Alex Elder
2025-11-17 14:55 ` (subset) " Manivannan Sadhasivam
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).