Skip to contentSkip to conversation

Add minimal boot support for IPQ9574

PATCH Superseded Devi Priya 3 participants 11 messages Apr 4, 2023 – Apr 7, 2023

Subsystems (7)

v11 of 12 Superseded Latest is v12 →

lore
Share & tools
lore

Devi Priya

author
#0 lore raw

v11 cover Add minimal boot support for IPQ9574

The IPQ9574 is Qualcomm's 802.11ax SoC for Routers, Gateways and Access Points

This series adds minimal board boot support for ipq9574-rdp433 variant

V10 can be found at:
https://lore.kernel.org/linux-arm-kernel/[email protected]/

Changes in V11:
- Detailed change log is added to the respective patches

Devi Priya (4):
dt-bindings: clock: Add ipq9574 clock and reset definitions
clk: qcom: Add Global Clock Controller driver for IPQ9574
arm64: dts: qcom: Add support for ipq9574 SoC and RDP433 variant
arm64: defconfig: Enable IPQ9574 SoC base configs

 .../bindings/clock/qcom,ipq9574-gcc.yaml      |   60 +
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts   |   84 +
 arch/arm64/boot/dts/qcom/ipq9574.dtsi         |  263 +
 arch/arm64/configs/defconfig                  |    2 +
 drivers/clk/qcom/Kconfig                      |    8 +
 drivers/clk/qcom/Makefile                     |    1 +
 drivers/clk/qcom/gcc-ipq9574.c                | 4225 +++++++++++++++++
 include/dt-bindings/clock/qcom,ipq9574-gcc.h  |  213 +
 include/dt-bindings/reset/qcom,ipq9574-gcc.h  |  164 +
 10 files changed, 5021 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,ipq9574-gcc.yaml
 create mode 100644 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts
 create mode 100644 arch/arm64/boot/dts/qcom/ipq9574.dtsi
 create mode 100644 drivers/clk/qcom/gcc-ipq9574.c
 create mode 100644 include/dt-bindings/clock/qcom,ipq9574-gcc.h
 create mode 100644 include/dt-bindings/reset/qcom,ipq9574-gcc.h

base-commit: 31bd35b66249699343d2416658f57e97314a433a

Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v11 1/4 dt-bindings: clock: Add ipq9574 clock and reset definitions

Add clock and reset ID definitions for ipq9574

---
Changes in V11:
- Dropped the clock description for Bias PLL ubi clock source to reflect the gcc node in the DT

 .../bindings/clock/qcom,ipq9574-gcc.yaml      |  60 +++++
 include/dt-bindings/clock/qcom,ipq9574-gcc.h  | 213 ++++++++++++++++++
 include/dt-bindings/reset/qcom,ipq9574-gcc.h  | 164 ++++++++++++++
 3 files changed, 437 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,ipq9574-gcc.yaml
 create mode 100644 include/dt-bindings/clock/qcom,ipq9574-gcc.h
 create mode 100644 include/dt-bindings/reset/qcom,ipq9574-gcc.h
Documentation/devicetree/bindings/clock/qcom,ipq9574-gcc.yaml new file +60 -0
new file mode 100644
index 000000000000..8581de266750
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,ipq9574-gcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller on IPQ9574
+
+maintainers:
+  - Bjorn Andersson <[email protected]>
+  - Anusha Rao <[email protected]>
+
+description: |
+  Qualcomm global clock control module provides the clocks, resets and power
+  domains on IPQ9574
+
+  See also::
+    include/dt-bindings/clock/qcom,ipq9574-gcc.h
+    include/dt-bindings/reset/qcom,ipq9574-gcc.h
+
+properties:
+  compatible:
+    const: qcom,ipq9574-gcc
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: Sleep clock source
+      - description: PCIE30 PHY0 pipe clock source
+      - description: PCIE30 PHY1 pipe clock source
+      - description: PCIE30 PHY2 pipe clock source
+      - description: PCIE30 PHY3 pipe clock source
+      - description: USB3 PHY pipe clock source
+
+required:
+  - compatible
+  - clocks
+
+allOf:
+  - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    clock-controller@1800000 {
+      compatible = "qcom,ipq9574-gcc";
+      reg = <0x01800000 0x80000>;
+      clocks = <&xo_board_clk>,
+               <&sleep_clk>,
+               <&pcie30_phy0_pipe_clk>,
+               <&pcie30_phy1_pipe_clk>,
+               <&pcie30_phy2_pipe_clk>,
+               <&pcie30_phy3_pipe_clk>,
+               <&usb3phy_0_cc_pipe_clk>;
+      #clock-cells = <1>;
+      #reset-cells = <1>;
+      #power-domain-cells = <1>;
+    };
+...
include/dt-bindings/clock/qcom,ipq9574-gcc.h new file +213 -0

213 lines not on this page · raw message

include/dt-bindings/reset/qcom,ipq9574-gcc.h new file +164 -0

164 lines not on this page · raw message

Signature · 1 line
2.17.1
author
#3 lore raw

PATCH v11 2/4 clk: qcom: Add Global Clock Controller driver for IPQ9574

In reply to Devi Priya

Add Global Clock Controller (GCC) driver for ipq9574 based devices

---
Changes in V11:
- Dropped unnecessary includes of_device.h & err.h
and added few necessary ones clk-provider.h, clk-rcg.h and common.h
- Modified struct clk_init_data to const struct clk_init_data throughout
- Removed the unused backup source (bias_pll_ubi_nc_clk) entries

 drivers/clk/qcom/Kconfig       |    8 +
 drivers/clk/qcom/Makefile      |    1 +
 drivers/clk/qcom/gcc-ipq9574.c | 4225 ++++++++++++++++++++++++++++++++
 3 files changed, 4234 insertions(+)
 create mode 100644 drivers/clk/qcom/gcc-ipq9574.c
drivers/clk/qcom/Kconfig +8 -0
index 449bc8314d21..d71c9d6036bb 100644
@@ -181,6 +181,14 @@ config IPQ_GCC_8074
 	  i2c, USB, SD/eMMC, etc. Select this for the root clock
 	  of ipq8074.
 
+config IPQ_GCC_9574
+	tristate "IPQ9574 Global Clock Controller"
+	help
+	  Support for global clock controller on ipq9574 devices.
+	  Say Y if you want to use peripheral devices such as UART, SPI,
+	  i2c, USB, SD/eMMC, etc. Select this for the root clock
+	  of ipq9574.
+
 config MSM_GCC_8660
 	tristate "MSM8660 Global Clock Controller"
 	help
drivers/clk/qcom/Makefile +1 -0
index c1adb427d1ef..b54085e579a0 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_IPQ_GCC_5332) += gcc-ipq5332.o
 obj-$(CONFIG_IPQ_GCC_6018) += gcc-ipq6018.o
 obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o
 obj-$(CONFIG_IPQ_GCC_8074) += gcc-ipq8074.o
+obj-$(CONFIG_IPQ_GCC_9574) += gcc-ipq9574.o
 obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o
 obj-$(CONFIG_MDM_GCC_9607) += gcc-mdm9607.o
 obj-$(CONFIG_MDM_GCC_9615) += gcc-mdm9615.o
drivers/clk/qcom/gcc-ipq9574.c new file +4225 -0

2,979 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.17.1

Part of the diff is not shown here. View the raw message.

author
#5 lore raw

PATCH v11 3/4 arm64: dts: qcom: Add support for ipq9574 SoC and RDP433 variant

In reply to Devi Priya

Add initial device tree support for Qualcomm IPQ9574 SoC and Reference Design Platform(RDP) 433 which is based on IPQ9574 family of SoCs

---
Changes in V11:
- Dropped the unused backup clock source bias_pll_ubi_nc_clk

 arch/arm64/boot/dts/qcom/Makefile           |   1 +
 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts |  84 +++++++
 arch/arm64/boot/dts/qcom/ipq9574.dtsi       | 263 ++++++++++++++++++++
 3 files changed, 348 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts
 create mode 100644 arch/arm64/boot/dts/qcom/ipq9574.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 1a29403400b7..52f1f92c5195 100644
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= ipq6018-cp01-c1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq8074-hk01.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq8074-hk10-c1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq8074-hk10-c2.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= ipq9574-rdp433.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-acer-a1-724.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-alcatel-idol347.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-asus-z00l.dtb
arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts new file +84 -0

84 lines not on this page · raw message

arch/arm64/boot/dts/qcom/ipq9574.dtsi new file +263 -0

263 lines not on this page · raw message

Signature · 1 line
2.17.1
#6 lore raw

Re: [PATCH V11 3/4] arm64: dts: qcom: Add support for ipq9574 SoC and RDP433 variant

Quoted 20 lines · Devi Priya

Add initial device tree support for Qualcomm IPQ9574 SoC and Reference Design Platform(RDP) 433 which is based on IPQ9574 family of SoCs

---
Changes in V11:
- Dropped the unused backup clock source bias_pll_ubi_nc_clk

 arch/arm64/boot/dts/qcom/Makefile           |   1 +
 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts |  84 +++++++
 arch/arm64/boot/dts/qcom/ipq9574.dtsi       | 263 ++++++++++++++++++++
 3 files changed, 348 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts
 create mode 100644 arch/arm64/boot/dts/qcom/ipq9574.dtsi

[...]

arch/arm64/boot/dts/qcom/ipq9574.dtsi line 168

Quoted 4 lines
arch/arm64/boot/dts/qcom/ipq9574.dtsi new file +4 -0
+		intc: interrupt-controller@b000000 {
+			compatible = "qcom,msm-qgic2";
+			reg = <0x0b000000 0x1000>,  /* GICD */
+			      <0x0b002000 0x1000>,  /* GICC */

This is definitely wrong. The GICC region cannot be less than 8kB, as the GICC_DIR register is in the second 4kB region.

I'm pretty sure the kernel shouts at you when booting at EL2.

arch/arm64/boot/dts/qcom/ipq9574.dtsi line 170

Quoted 2 lines
arch/arm64/boot/dts/qcom/ipq9574.dtsi new file +2 -0
+			      <0x0b001000 0x1000>,  /* GICH */
+			      <0x0b004000 0x1000>;  /* GICV */

Same thing here.

arch/arm64/boot/dts/qcom/ipq9574.dtsi line 175

Quoted 5 lines
arch/arm64/boot/dts/qcom/ipq9574.dtsi new file +5 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;

Missing target CPU encoding.

        M.
Signature · 6 lines
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#7 lore raw

Re: [PATCH V11 3/4] arm64: dts: qcom: Add support for ipq9574 SoC and RDP433 variant

Quoted 29 lines · Marc Zyngier
Quoted 20 lines · Devi Priya

Add initial device tree support for Qualcomm IPQ9574 SoC and Reference Design Platform(RDP) 433 which is based on IPQ9574 family of SoCs

---
 Changes in V11:
    - Dropped the unused backup clock source bias_pll_ubi_nc_clk

 arch/arm64/boot/dts/qcom/Makefile           |   1 + arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts |  84 +++++++ arch/arm64/boot/dts/qcom/ipq9574.dtsi       | 263 ++++++++++++++++++++

 3 files changed, 348 insertions(+)

 create mode 100644 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts create mode 100644 arch/arm64/boot/dts/qcom/ipq9574.dtsi

[...]

Quoted 4 lines

+        intc: interrupt-controller@b000000 { +            compatible = "qcom,msm-qgic2"; +            reg = <0x0b000000 0x1000>,  /* GICD */ +                  <0x0b002000 0x1000>,  /* GICC */

Quoted 4 lines

This is definitely wrong. The GICC region cannot be less than 8kB, as the GICC_DIR register is in the second 4kB region.

I'm pretty sure the kernel shouts at you when booting at EL2.

Got it, will update the size to 8kB

Quoted 5 lines
Quoted 3 lines

+                  <0x0b001000 0x1000>,  /* GICH */ +                  <0x0b004000 0x1000>;  /* GICV */

Same thing here.

okay

Quoted 8 lines
Quoted 6 lines

+            #address-cells = <1>;
+            #size-cells = <1>;
+            interrupt-controller;
+            #interrupt-cells = <3>;
+            interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;

Missing target CPU encoding.

Okay, will update the interrupts as below. Hope this is the expectation? Please let us know if we are missing something
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;

Quoted 2 lines

        M.

Best Regards,
Devi Priya

#8 lore raw

Re: [PATCH V11 3/4] arm64: dts: qcom: Add support for ipq9574 SoC and RDP433 variant

Quoted 8 lines · Devi Priya
Quoted 7 lines · Marc Zyngier
Quoted 5 lines · Devi Priya

+            #address-cells = <1>;
+            #size-cells = <1>;
+            interrupt-controller;
+            #interrupt-cells = <3>;
+            interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;

Quoted 4 lines
Quoted 1 line

Missing target CPU encoding.

Okay, will update the interrupts as below. Hope this is the expectation? Please let us know if we are missing something
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;

Yup.

        M.
Signature · 1 line
Jazz is not dead. It just smells funny...
author
#9 lore raw

Re: [PATCH V11 3/4] arm64: dts: qcom: Add support for ipq9574 SoC and RDP433 variant

Quoted 9 lines · Marc Zyngier
Quoted 8 lines · Devi Priya
Quoted 7 lines · Marc Zyngier
Quoted 5 lines · Devi Priya

+            #address-cells = <1>;
+            #size-cells = <1>;
+            interrupt-controller;
+            #interrupt-cells = <3>;
+            interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Missing target CPU encoding.

Okay, will update the interrupts as below. Hope this is the expectation? Please let us know if we are missing something
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;

Yup.

Thanks!

Quoted 2 lines

        M.

author
#10 lore raw

PATCH v11 4/4 arm64: defconfig: Enable IPQ9574 SoC base configs

In reply to Devi Priya

Enables clk & pinctrl related configs for Qualcomm IPQ9574 SoC

---
 arch/arm64/configs/defconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/configs/defconfig +2 -0
index 29c79a6a85eb..8f24c280dec2 100644
@@ -557,6 +557,7 @@ CONFIG_PINCTRL_MSM=y
 CONFIG_PINCTRL_IPQ8074=y
 CONFIG_PINCTRL_IPQ5332=y
 CONFIG_PINCTRL_IPQ6018=y
+CONFIG_PINCTRL_IPQ9574=y
 CONFIG_PINCTRL_MSM8916=y
 CONFIG_PINCTRL_MSM8953=y
 CONFIG_PINCTRL_MSM8976=y
@@ -1155,6 +1156,7 @@ CONFIG_QCOM_CLK_RPMH=y
 CONFIG_IPQ_GCC_5332=y
 CONFIG_IPQ_GCC_6018=y
 CONFIG_IPQ_GCC_8074=y
+CONFIG_IPQ_GCC_9574=y
 CONFIG_MSM_GCC_8916=y
 CONFIG_MSM_GCC_8994=y
 CONFIG_MSM_MMCC_8994=m
Signature · 1 line
2.17.1