Skip to contentSkip to conversation

Add minimal boot support for IPQ6018

PATCH Superseded Sricharan R 4 participants 19 messages Dec 19, 2019 – Dec 30, 2019

Subsystems (10)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add minimal boot support for IPQ6018

The IPQ6018 is Qualcomm’s 802.11ax SoC for Routers, Gateways and Access Points.

This series adds minimal board boot support for ipq6018-cp01 board.

[v2]
* Splitted dt bindings and driver into different patches. Added missing bindings and some style changes.
* Added ipq6018 schema
* Addressed review comments for gcc clock bindings.
* Removed all clk critical flags, removed 1/1 factor clocks, moved to new way of specifying clk parents, and addressed other review comments.
* Sorted nodes based on address, name, label. Removed unused clock nodes, Addressed other review comments.

Sricharan R (7):
dt-bindings: pinctrl: qcom: Add ipq6018 pinctrl bindings
pinctrl: qcom: Add ipq6018 pinctrl driver
dt-bindings: qcom: Add ipq6018 bindings
clk: qcom: Add DT bindings for ipq6018 gcc clock controller
clk: qcom: Add ipq6018 Global Clock Controller support
arm64: dts: Add ipq6018 SoC and CP01 board support
arm64: defconfig: Enable qcom ipq6018 clock and pinctrl

 Documentation/devicetree/bindings/arm/qcom.yaml    |    7 +
 .../devicetree/bindings/clock/qcom,gcc.yaml        |    3 +-
 .../bindings/pinctrl/qcom,ipq6018-pinctrl.yaml     |  172 +
 arch/arm64/boot/dts/qcom/Makefile                  |    1 +
 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts       |   41 +
 arch/arm64/boot/dts/qcom/ipq6018.dtsi              |  215 +
 arch/arm64/configs/defconfig                       |    3 +
 drivers/clk/qcom/Kconfig                           |    8 +
 drivers/clk/qcom/Makefile                          |    1 +
 drivers/clk/qcom/gcc-ipq6018.c                     | 4674 ++++++++++++++++++++
 drivers/pinctrl/qcom/Kconfig                       |   10 +
 drivers/pinctrl/qcom/Makefile                      |    1 +
 drivers/pinctrl/qcom/pinctrl-ipq6018.c             | 1161 +++++
 include/dt-bindings/clock/qcom,gcc-ipq6018.h       |  262 ++
 include/dt-bindings/reset/qcom,gcc-ipq6018.h       |  157 +
 15 files changed, 6715 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
 create mode 100644 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
 create mode 100644 arch/arm64/boot/dts/qcom/ipq6018.dtsi
 create mode 100644 drivers/clk/qcom/gcc-ipq6018.c
 create mode 100644 drivers/pinctrl/qcom/pinctrl-ipq6018.c
 create mode 100644 include/dt-bindings/clock/qcom,gcc-ipq6018.h
 create mode 100644 include/dt-bindings/reset/qcom,gcc-ipq6018.h
Signature · 1 line
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#1 lore raw

PATCH v2 1/7 dt-bindings: pinctrl: qcom: Add ipq6018 pinctrl bindings

Add device tree binding Documentation details for ipq6018 pinctrl driver.

---

[V2] Splitted dt bindings and driver into different patches. Added missing bindings,
and some style changes.

 .../bindings/pinctrl/qcom,ipq6018-pinctrl.yaml     | 172 +++++++++++++++++++++
 1 file changed, 172 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +172 -0
new file mode 100644
index 0000000..745a11e
@@ -0,0 +1,172 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,ipq6018-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. IPQ6018 TLMM block
+
+maintainers:
+  - Sricharan R <[email protected]>
+
+description: |
+  This binding describes the Top Level Mode Multiplexer block found in the
+  IPQ6018 platform.
+
+properties:
+  compatible:
+    const: qcom,ipq6018-pinctrl
+  reg:
+    maxItems: 1
+  interrupts:
+    Description: Specifies the TLMM summary IRQ
+    maxItems: 1
+  interrupt-controller: true
+  '#interrupt-cells':
+    Description:
+      Specifies the PIN numbers and Flags, as defined in defined in
+      include/dt-bindings/interrupt-controller/irq.h
+    const: 2
+  gpio-controller: true
+  '#gpio-cells':
+    Description: Specifying the pin number and flags, as defined in
+      include/dt-bindings/gpio/gpio.h
+    const: 2
+  gpio-ranges:
+    Description: Documentation/devicetree/bindings/gpio/gpio.txt
+    maxItems: 1
+
+#PIN CONFIGURATION NODES
+patternProperties:
+  '-pins$':
+    type: object
+    Description:
+      Pinctrl node's client devices use subnodes for desired pin configuration.
+      Client device subnodes use below standard properties.
+
+    Properties:
+      pins:
+        allOf:
+          $ref: /schemas/types.yaml#/definitions/string
+          enum:
+            gpio0-gpio80
+            sdc1_clk
+            sdc1_cmd
+            sdc1_data
+            sdc2_clk
+            sdc2_cmd
+            sdc2_data
+            qdsd_cmd
+            qdsd_data0
+            qdsd_data1
+            qdsd_data2
+            qdsd_data3
+        Description:
+          List of gpio pins affected by the properties specified in this
+          subnode.
+
+      function:
+        allOf:
+          $ref: /schemas/types.yaml#/definitions/string
+          enum:
+            adsp_ext, alsp_int, atest_bbrx0, atest_bbrx1, atest_char,
+            atest_char0, atest_char1, atest_char2, atest_char3, atest_combodac,
+            atest_gpsadc0, atest_gpsadc1, atest_tsens, atest_wlan0,
+            atest_wlan1, backlight_en, bimc_dte0, bimc_dte1, blsp_i2c1,
+            blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5, blsp_i2c6,  blsp_spi1,
+            blsp_spi1_cs1, blsp_spi1_cs2, blsp_spi1_cs3, blsp_spi2,
+            blsp_spi2_cs1, blsp_spi2_cs2, blsp_spi2_cs3, blsp_spi3,
+            blsp_spi3_cs1, blsp_spi3_cs2, blsp_spi3_cs3, blsp_spi4, blsp_spi5,
+            blsp_spi6, blsp_uart1, blsp_uart2, blsp_uim1, blsp_uim2, cam1_rst,
+            cam1_standby, cam_mclk0, cam_mclk1, cci_async, cci_i2c, cci_timer0,
+            cci_timer1, cci_timer2, cdc_pdm0, codec_mad, dbg_out, display_5v,
+            dmic0_clk, dmic0_data, dsi_rst, ebi0_wrcdc, euro_us, ext_lpass,
+            flash_strobe, gcc_gp1_clk_a, gcc_gp1_clk_b, gcc_gp2_clk_a,
+            gcc_gp2_clk_b, gcc_gp3_clk_a, gcc_gp3_clk_b, gpio, gsm0_tx0,
+            gsm0_tx1, gsm1_tx0, gsm1_tx1, gyro_accl, kpsns0, kpsns1, kpsns2,
+            ldo_en, ldo_update, mag_int, mdp_vsync, modem_tsync, m_voc,
+            nav_pps, nav_tsync, pa_indicator, pbs0, pbs1, pbs2, pri_mi2s,
+            pri_mi2s_ws, prng_rosc, pwr_crypto_enabled_a, pwr_crypto_enabled_b,
+            pwr_modem_enabled_a,  pwr_modem_enabled_b, pwr_nav_enabled_a,
+            pwr_nav_enabled_b, qdss_ctitrig_in_a0, qdss_ctitrig_in_a1,
+            qdss_ctitrig_in_b0, qdss_ctitrig_in_b1, qdss_ctitrig_out_a0,
+            qdss_ctitrig_out_a1, qdss_ctitrig_out_b0, qdss_ctitrig_out_b1,
+            qdss_traceclk_a, qdss_traceclk_b, qdss_tracectl_a, qdss_tracectl_b,
+            qdss_tracedata_a, qdss_tracedata_b, reset_n, sd_card, sd_write,
+            sec_mi2s, smb_int, ssbi_wtr0, ssbi_wtr1, uim1, uim2, uim3,
+            uim_batt, wcss_bt, wcss_fm, wcss_wlan, webcam1_rst
+        Description:
+          Specify the alternative function to be configured for the specified
+          pins.
+      bias-disable:
+        type: boolean
+        Description:
+          The specified pins should be configured as no pull.
+      bias-pull-down:
+        type: boolean
+        Description:
+          The specified pins should be configured as pull down.
+      bias-pull-up:
+        type: boolean
+        Description:
+          The specified pins should be configured as pull up.
+      output-high:
+        type: boolean
+        Description:
+          The specified pins are configured in output mode, driven high.
+          This option is not available for sdc pins.
+      output-low:
+        type: boolean
+        Description:
+          The specified pins are configured in output mode, driven low.
+          This option is not available for sdc pins.
+      drive-strength:
+        allOf:
+          $ref: /schemas/types.yaml#/definitions/uint32
+          enum: [2, 4, 6, 8, 10, 12, 14, 16]
+        Description:
+          elects the drive strength for the specified pins, in mA.
+
+    required:
+      - pins
+      - function
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-controller
+  - '#interrupt-cells'
+  - gpio-controller
+  - '#gpio-cells'
+  - gpio-ranges
+
+example:
+        tlmm: pinctrl@1000000 {
+                compatible = "qcom,ipq6018-pinctrl";
+                reg = <0x1000000 0x300000>;
+                interrupts = <0 208 0>;
+                gpio-controller;
+                #gpio-cells = <2>;
+                interrupt-controller;
+                #interrupt-cells = <2>;
+
+                uart_pins: uart_pins {
+                        mux {
+                                pins = "gpio4", "gpio5";
+                                function = "blsp_uart2";
+                        };
+
+                        tx {
+                                pins = "gpio4";
+                                drive-strength = <4>;
+                                bias-disable;
+                        };
+
+                        rx {
+                                pins = "gpio5";
+                                drive-strength = <2>;
+                                bias-pull-up;
+                        };
+                };
+        };
Signature · 1 line
1.9.1
#4 lore raw

PATCH v2 2/7 pinctrl: qcom: Add ipq6018 pinctrl driver

In reply to Sricharan R

Add initial pinctrl driver to support pin configuration with pinctrl framework for ipq6018.

---

[V2] Splitted dt bindings and driver into different patches. Addressed review
comments.

 drivers/pinctrl/qcom/Kconfig           |   10 +
 drivers/pinctrl/qcom/Makefile          |    1 +
 drivers/pinctrl/qcom/pinctrl-ipq6018.c | 1161 ++++++++++++++++++++++++++++++++
 3 files changed, 1172 insertions(+)
 create mode 100644 drivers/pinctrl/qcom/pinctrl-ipq6018.c
drivers/pinctrl/qcom/Kconfig +10 -0
index 811af2f8..c5d4428 100644
@@ -50,6 +50,16 @@ config PINCTRL_IPQ8074
 	  Qualcomm Technologies Inc. IPQ8074 platform. Select this for
 	  IPQ8074.
 
+config PINCTRL_IPQ6018
+	tristate "Qualcomm Technologies, Inc. IPQ6018 pin controller driver"
+	depends on GPIOLIB && OF
+	select PINCTRL_MSM
+	help
+	  This is the pinctrl, pinmux, pinconf and gpiolib driver for
+	  the Qualcomm Technologies Inc. TLMM block found on the
+	  Qualcomm Technologies Inc. IPQ6018 platform. Select this for
+	  IPQ6018.
+
 config PINCTRL_MSM8660
 	tristate "Qualcomm 8660 pin controller driver"
 	depends on GPIOLIB && OF
drivers/pinctrl/qcom/Makefile +1 -0
index c2c2f9a..d9e0904 100644
@@ -6,6 +6,7 @@ obj-$(CONFIG_PINCTRL_APQ8084)	+= pinctrl-apq8084.o
 obj-$(CONFIG_PINCTRL_IPQ4019)	+= pinctrl-ipq4019.o
 obj-$(CONFIG_PINCTRL_IPQ8064)	+= pinctrl-ipq8064.o
 obj-$(CONFIG_PINCTRL_IPQ8074)	+= pinctrl-ipq8074.o
+obj-$(CONFIG_PINCTRL_IPQ6018)	+= pinctrl-ipq6018.o
 obj-$(CONFIG_PINCTRL_MSM8660)	+= pinctrl-msm8660.o
 obj-$(CONFIG_PINCTRL_MSM8960)	+= pinctrl-msm8960.o
 obj-$(CONFIG_PINCTRL_MSM8X74)	+= pinctrl-msm8x74.o
drivers/pinctrl/qcom/pinctrl-ipq6018.c new file +1161 -0

1,161 lines not on this page · raw message

Signature · 1 line
1.9.1
#7 lore raw

PATCH v2 3/7 dt-bindings: qcom: Add ipq6018 bindings

In reply to Sricharan R

Document the new ipq6018 SOC/board device tree bindings.

---

[V2] Added schema for the ipq6018 platform.

 Documentation/devicetree/bindings/arm/qcom.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +8 -0
index 529d924..164177e 100644
@@ -28,6 +28,7 @@ description: |
         apq8074
         apq8084
         apq8096
+        ipq6018
         ipq8074
         mdm9615
         msm8916
@@ -41,6 +42,7 @@ description: |
   The 'board' element must be one of the following strings:
 
         cdp
+        cp01-c1
         dragonboard
         hk01
         idp
@@ -150,4 +152,10 @@ properties:
           - enum:
               - qcom,sc7180-idp
           - const: qcom,sc7180
+
+      - items:
+          - enum:
+              - qcom,ipq6018-cp01-c1
+          - const: qcom,ipq6018
+
 ...
Signature · 1 line
1.9.1
#8 lore raw

PATCH v2 4/7 clk: qcom: Add DT bindings for ipq6018 gcc clock controller

In reply to Sricharan R

Add the compatible strings and the include file for ipq6018 gcc clock controller.

---

[V2] Addressed review comments.

 .../devicetree/bindings/clock/qcom,gcc.yaml        |   3 +-
 include/dt-bindings/clock/qcom,gcc-ipq6018.h       | 262 +++++++++++++++++++++
 include/dt-bindings/reset/qcom,gcc-ipq6018.h       | 157 ++++++++++++
 3 files changed, 421 insertions(+), 1 deletion(-)
 create mode 100644 include/dt-bindings/clock/qcom,gcc-ipq6018.h
 create mode 100644 include/dt-bindings/reset/qcom,gcc-ipq6018.h
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +2 -1
index e73a56f..e67341a 100644
@@ -19,8 +19,9 @@ properties:
     enum:
        - qcom,gcc-apq8064
        - qcom,gcc-apq8084
-       - qcom,gcc-ipq8064
        - qcom,gcc-ipq4019
+       - qcom,gcc-ipq6018
+       - qcom,gcc-ipq8064
        - qcom,gcc-ipq8074
        - qcom,gcc-msm8660
        - qcom,gcc-msm8916
include/dt-bindings/clock/qcom,gcc-ipq6018.h new file +262 -0

262 lines not on this page · raw message

include/dt-bindings/reset/qcom,gcc-ipq6018.h new file +157 -0

157 lines not on this page · raw message

Signature · 1 line
1.9.1
#13 lore raw

PATCH v2 6/7 arm64: dts: Add ipq6018 SoC and CP01 board support

In reply to Sricharan R

Add initial device tree support for the Qualcomm IPQ6018 SoC and CP01 evaluation board.

---

[V2] Sorted nodes based on address, name, label.
Removed unused clock nodes.
Addressed other review comments.

 arch/arm64/boot/dts/qcom/Makefile            |   1 +
 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts |  41 +++++
 arch/arm64/boot/dts/qcom/ipq6018.dtsi        | 215 +++++++++++++++++++++++++++
 3 files changed, 257 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
 create mode 100644 arch/arm64/boot/dts/qcom/ipq6018.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 6498a1e..2b24998 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8096-db820c.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= ipq6018-cp01-c1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq8074-hk01.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-longcheer-l8150.dtb
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +41 -0

41 lines not on this page · raw message

arch/arm64/boot/dts/qcom/ipq6018.dtsi new file +215 -0

215 lines not on this page · raw message

Signature · 1 line
1.9.1
#16 lore raw

PATCH v2 7/7 arm64: defconfig: Enable qcom ipq6018 clock and pinctrl

In reply to Sricharan R

These configs are required for booting kernel in qcom ipq6018 boards.

---
 arch/arm64/configs/defconfig | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/configs/defconfig +3 -0
index 6a83ba2..497d5f0 100644
@@ -399,6 +399,7 @@ CONFIG_PINCTRL_IMX8MN=y
 CONFIG_PINCTRL_IMX8MQ=y
 CONFIG_PINCTRL_IMX8QXP=y
 CONFIG_PINCTRL_IPQ8074=y
+CONFIG_PINCTRL_IPQ6018=y
 CONFIG_PINCTRL_MSM8916=y
 CONFIG_PINCTRL_MSM8994=y
 CONFIG_PINCTRL_MSM8996=y
@@ -700,6 +701,8 @@ CONFIG_QCOM_CLK_APCS_MSM8916=y
 CONFIG_QCOM_CLK_SMD_RPM=y
 CONFIG_QCOM_CLK_RPMH=y
 CONFIG_IPQ_GCC_8074=y
+CONFIG_IPQ_GCC_6018=y
+CONFIG_IPQ_APSS_6018=y
 CONFIG_MSM_GCC_8916=y
 CONFIG_MSM_GCC_8994=y
 CONFIG_MSM_MMCC_8996=y
Signature · 1 line
1.9.1
#10 lore raw

PATCH v2 5/7 clk: qcom: Add ipq6018 Global Clock Controller support

In reply to Sricharan R

This patch adds support for the global clock controller found on the ipq6018 based devices.

---

[V2] Removed all crtitical flags, removed 1/1 clocks, moved to new way
of specifyig clk parents, and addressed other review comments.

 drivers/clk/qcom/Kconfig       |    8 +
 drivers/clk/qcom/Makefile      |    1 +
 drivers/clk/qcom/gcc-ipq6018.c | 4674 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 4683 insertions(+)
 create mode 100644 drivers/clk/qcom/gcc-ipq6018.c
drivers/clk/qcom/Kconfig +8 -0
index 3b33ef1..d0392f1 100644
@@ -95,6 +95,14 @@ config IPQ_GCC_4019
 	  Say Y if you want to use peripheral devices such as UART, SPI,
 	  i2c, USB, SD/eMMC, etc.
 
+config IPQ_GCC_6018
+	tristate "IPQ6018 Global Clock Controller"
+	help
+	  Support for global clock controller on ipq6018 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 ipq6018.
+
 config IPQ_GCC_806X
 	tristate "IPQ806x Global Clock Controller"
 	help
drivers/clk/qcom/Makefile +1 -0
index d899661..546275b 100644
@@ -20,6 +20,7 @@ clk-qcom-$(CONFIG_QCOM_GDSC) += gdsc.o
 obj-$(CONFIG_APQ_GCC_8084) += gcc-apq8084.o
 obj-$(CONFIG_APQ_MMCC_8084) += mmcc-apq8084.o
 obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.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_LCC_806X) += lcc-ipq806x.o
drivers/clk/qcom/gcc-ipq6018.c new file +4674 -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
1.9.1

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

maintainer Reviewed-by on v2 4/7
#9 lore raw

Re: [PATCH V2 4/7] clk: qcom: Add DT bindings for ipq6018 gcc clock controller

In reply to Sricharan R
Quoted 12 lines · Sricharan R

Add the compatible strings and the include file for ipq6018 gcc clock controller.

---

Quoted 8 lines

[V2] Addressed review comments.

 .../devicetree/bindings/clock/qcom,gcc.yaml        |   3 +-
 include/dt-bindings/clock/qcom,gcc-ipq6018.h       | 262 +++++++++++++++++++++
 include/dt-bindings/reset/qcom,gcc-ipq6018.h       | 157 ++++++++++++
 3 files changed, 421 insertions(+), 1 deletion(-)
 create mode 100644 include/dt-bindings/clock/qcom,gcc-ipq6018.h
 create mode 100644 include/dt-bindings/reset/qcom,gcc-ipq6018.h
maintainer
#11 lore raw

Re: [PATCH V2 5/7] clk: qcom: Add ipq6018 Global Clock Controller support

In reply to Sricharan R

Quoting Sricharan R (2019-12-19 02:41:47)

Quoted 5 lines
drivers/clk/qcom/Kconfig +0 -0
index 3b33ef1..d0392f1 100644

drivers/clk/qcom/Kconfig config IPQ_GCC_4019 · line 104

Quoted 10 lines
drivers/clk/qcom/Kconfig +7 -0
@@ -95,6 +95,14 @@ config IPQ_GCC_4019
          Say Y if you want to use peripheral devices such as UART, SPI,
          i2c, USB, SD/eMMC, etc.
 
+config IPQ_GCC_6018
+       tristate "IPQ6018 Global Clock Controller"
+       help
+         Support for global clock controller on ipq6018 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 ipq6018.

What is the root clock of ipq6018?

Quoted 55 lines
drivers/clk/qcom/Kconfig +1 -0
+
 config IPQ_GCC_806X
        tristate "IPQ806x Global Clock Controller"
        help
drivers/clk/qcom/gcc-ipq6018.c new file +45 -0
new file mode 100644
index 0000000..b6f0148
@@ -0,0 +1,4674 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ */
+
+#include <linux/kernel.h>
+#include <linux/err.h>
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/clk-provider.h>
+#include <linux/regmap.h>
+
+#include <linux/reset-controller.h>
+#include <dt-bindings/clock/qcom,gcc-ipq6018.h>
+#include <dt-bindings/reset/qcom,gcc-ipq6018.h>
+
+#include "common.h"
+#include "clk-regmap.h"
+#include "clk-pll.h"
+#include "clk-rcg.h"
+#include "clk-branch.h"
+#include "clk-alpha-pll.h"
+#include "clk-regmap-divider.h"
+#include "clk-regmap-mux.h"
+#include "reset.h"
+
+#define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
+
+enum {
+       P_XO,
+       P_BIAS_PLL,
+       P_UNIPHY0_RX,
+       P_UNIPHY0_TX,
+       P_UNIPHY1_RX,
+       P_BIAS_PLL_NSS_NOC,
+       P_UNIPHY1_TX,
+       P_PCIE20_PHY0_PIPE,
+       P_USB3PHY_0_PIPE,
+       P_GPLL0,
+       P_GPLL0_DIV2,
+       P_GPLL2,
+       P_GPLL4,
+       P_GPLL6,

drivers/clk/qcom/gcc-ipq6018.c line 55

Quoted 10 lines
drivers/clk/qcom/gcc-ipq6018.c new file +10 -0
+       P_SLEEP_CLK,
+       P_UBI32_PLL,
+       P_NSS_CRYPTO_PLL,
+       P_PI_SLEEP,
+};
+
+static const struct clk_parent_data gcc_xo_gpll0_gpll0_out_main_div2[] = {
+       { .fw_name = "xo", .name = "xo"},
+       { .fw_name = "gpll0", .name = "gpll0"},
+       { .fw_name = "gpll0_out_main_div2", .name = "gpll0_out_main_div2"},

Because we aren't migrating this from existing DT to new DT we should be able to leave out .name in all these structs. That's the legacy fallback mechanism used to migrate DT over to the new way.

Quoted 8 lines
drivers/clk/qcom/gcc-ipq6018.c new file +8 -0
+};
+
+static const struct parent_map gcc_xo_gpll0_gpll0_out_main_div2_map[] = {
+       { P_XO, 0 },
+       { P_GPLL0, 1 },
+       { P_GPLL0_DIV2, 4 },
+};
+

[...]

Quoted 9 lines
drivers/clk/qcom/gcc-ipq6018.c new file +9 -0
+
+static int gcc_ipq6018_probe(struct platform_device *pdev)
+{
+       int i, ret;
+       struct regmap *regmap;
+       struct clk *clk;
+       struct device *dev = &pdev->dev;
+
+       regmap = qcom_cc_map(pdev, &gcc_ipq6018_desc);

drivers/clk/qcom/gcc-ipq6018.c line 4627

Quoted 10 lines
drivers/clk/qcom/gcc-ipq6018.c new file +10 -0
+       if (IS_ERR(regmap))
+               return PTR_ERR(regmap);
+
+       for (i = 0; i < ARRAY_SIZE(gcc_ipq6018_hws); i++) {
+               clk = devm_clk_register(&pdev->dev, gcc_ipq6018_hws[i]);
+               if (IS_ERR(clk))
+                       return PTR_ERR(clk);
+       }
+
+       clk_register_fixed_rate(dev, "pcie20_phy0_pipe_clk", NULL, 0, 250000000);

Why do we need to register this? Can it come from DT then? Also what if it fails? And what if really_probe fails? Then we'll need to undo this registration. Ideally this is created somewhere else.

Quoted 11 lines
drivers/clk/qcom/gcc-ipq6018.c new file +11 -0
+
+       /* Disable SW_COLLAPSE for USB0 GDSCR */
+       regmap_update_bits(regmap, 0x3e078, BIT(0), 0x0);
+       /* Enable SW_OVERRIDE for USB0 GDSCR */
+       regmap_update_bits(regmap, 0x3e078, BIT(2), BIT(2));
+       /* Disable SW_COLLAPSE for USB1 GDSCR */
+       regmap_update_bits(regmap, 0x3f078, BIT(0), 0x0);
+       /* Enable SW_OVERRIDE for USB1 GDSCR */
+       regmap_update_bits(regmap, 0x3f078, BIT(2), BIT(2));
+
+       /* SW Workaround for UBI Huyara PLL */

drivers/clk/qcom/gcc-ipq6018.c line 4648

Quoted 10 lines
drivers/clk/qcom/gcc-ipq6018.c new file +10 -0
+       regmap_update_bits(regmap, 0x2501c, BIT(26), BIT(26));
+
+       clk_alpha_pll_configure(&ubi32_pll_main, regmap, &ubi32_pll_config);
+
+       clk_alpha_pll_configure(&nss_crypto_pll_main, regmap,
+                               &nss_crypto_pll_config);
+
+       ret = qcom_cc_really_probe(pdev, &gcc_ipq6018_desc, regmap);
+
+       dev_dbg(&pdev->dev, "Registered ipq6018 clock provider");

Please remove this and just return the result of really_probe.

Quoted 3 lines
drivers/clk/qcom/gcc-ipq6018.c new file +3 -0
+
+       return ret;
+}
maintainer
#17 lore raw
In reply to Sricharan R

Quoting Sricharan R (2019-12-19 02:41:42)

Quoted 5 lines

The IPQ6018 is Qualcomm\u2019s 802.11ax SoC for Routers, Gateways and Access Points.

This series adds minimal board boot support for ipq6018-cp01 board.

Quoted 9 lines

[v2]
* Splitted dt bindings and driver into different patches. Added missing bindings and some style changes.
* Added ipq6018 schema
* Addressed review comments for gcc clock bindings.
* Removed all clk critical flags, removed 1/1 factor clocks, moved to new way of specifying clk parents, and addressed other review comments.
* Sorted nodes based on address, name, label. Removed unused clock nodes, Addressed other review comments.

Can you just send the clk and clk binding to me in a different series? I don't want to review all the other patches in the same thread.

#14 lore raw

Re: [PATCH V2 6/7] arm64: dts: Add ipq6018 SoC and CP01 board support

In reply to Sricharan R
Quoted 3 lines · Sricharan R

Add initial device tree support for the Qualcomm IPQ6018 SoC and CP01 evaluation board.

Hi Sricharan, thanks for the rework, this looks pretty good now, just some minor comments below.

Quoted 3 lines

Should this have some Co-developed-by?

Quoted 31 lines

---

[V2] Sorted nodes based on address, name, label.
Removed unused clock nodes.
Addressed other review comments.

 arch/arm64/boot/dts/qcom/Makefile            |   1 +
 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts |  41 +++++
 arch/arm64/boot/dts/qcom/ipq6018.dtsi        | 215 +++++++++++++++++++++++++++
 3 files changed, 257 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
 create mode 100644 arch/arm64/boot/dts/qcom/ipq6018.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 6498a1e..2b24998 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8096-db820c.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= ipq6018-cp01-c1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq8074-hk01.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-longcheer-l8150.dtb
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +0 -0
new file mode 100644
index 0000000..82a6024

arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts line 1

Quoted 1 line
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +1 -0
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0

Please dual license as GPL+BSD

Quoted 22 lines
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +22 -0
+/*
+ * IPQ6018 CP01 board device tree source
+ *
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "ipq6018.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. IPQ6018/AP-CP01-C1";
+	compatible = "qcom,ipq6018-cp01", "qcom,ipq6018";
+
+	aliases {
+		serial0 = &blsp1_uart3;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		bootargs-append = " swiotlb=1";
+	};

arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts line 33

Quoted 10 lines
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +10 -0
+};
+
+&blsp1_uart3 {
+	pinctrl-0 = <&uart_pins>;
+	pinctrl-names = "default";
+	status = "ok";
+};
+
+&tlmm {
+	uart_pins: uart_pins {

Reference the &uart_pins directly, and please use a more specific name.

arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts line 34

Quoted 1 line
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +1 -0
+		mux {

I would suggest that you either flatten the "mux" subnode and define the properties directly in &uart_pins; or you split it the functional pieces of rx { } tx { }.

And right now you're duplicating the properties between the dtsi and the dts, either drop one of them or define the function in the dtsi and add the drive-strenght and bias-pull-down here.

Quoted 30 lines
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +7 -0
+			pins = "gpio44", "gpio45";
+			function = "blsp2_uart";
+			drive-strength = <8>;
+			bias-pull-down;
+		};
+	};
+};
arch/arm64/boot/dts/qcom/ipq6018.dtsi new file +17 -0
new file mode 100644
index 0000000..269287c
@@ -0,0 +1,215 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * IPQ6018 SoC device tree source
+ *
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/qcom,gcc-ipq6018.h>
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <2>;
+	interrupt-parent = <&intc>;
+
+	reserved-memory {
+		#address-cells = <2>;

arch/arm64/boot/dts/qcom/ipq6018.dtsi line 27

Quoted 10 lines
arch/arm64/boot/dts/qcom/ipq6018.dtsi new file +10 -0
+		#size-cells = <2>;
+		ranges;
+
+		tz: tz@48500000 {
+			reg = <0x0 0x48500000 0x0 0x00200000>;
+			no-map;
+		};
+	};
+
+	soc: soc {

soc@0

Shouldn't this be sorted after 'p'?

Regards,
Bjorn

Quoted 190 lines
arch/arm64/boot/dts/qcom/ipq6018.dtsi new file +188 -0
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0xffffffff>;
+		dma-ranges;
+		compatible = "simple-bus";
+
+		tlmm: pinctrl@1000000 {
+			compatible = "qcom,ipq6018-pinctrl";
+			reg = <0x01000000 0x300000>;
+			interrupts = <GIC_SPI 0xd0 IRQ_TYPE_LEVEL_HIGH>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			gpio-ranges = <&tlmm 0 80>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+
+			uart_pins: uart_pins {
+				pins = "gpio44", "gpio45";
+				function = "blsp2_uart";
+				drive-strength = <8>;
+				bias-pull-down;
+			};
+		};
+
+		gcc: gcc@1800000 {
+			compatible = "qcom,gcc-ipq6018";
+			reg = <0x01800000 0x80000>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		blsp1_uart3: serial@78b1000 {
+			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+			reg = <0x078b1000 0x200>;
+			interrupts = <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc GCC_BLSP1_UART3_APPS_CLK>,
+				<&gcc GCC_BLSP1_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};
+
+		intc: interrupt-controller@b000000 {
+			compatible = "qcom,msm-qgic2";
+			interrupt-controller;
+			#interrupt-cells = <0x3>;
+			reg =   <0x0b000000 0x1000>,  /*GICD*/
+				<0x0b002000 0x1000>,  /*GICC*/
+				<0x0b001000 0x1000>,  /*GICH*/
+				<0x0b004000 0x1000>;  /*GICV*/
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
+		timer {
+			compatible = "arm,armv8-timer";
+			interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+				     <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+				     <GIC_PPI 4 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+				     <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+		};
+
+		timer@b120000 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+			compatible = "arm,armv7-timer-mem";
+			reg = <0x0b120000 0x1000>;
+			clock-frequency = <19200000>;
+
+			frame@b120000 {
+				frame-number = <0>;
+				interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x0b121000 0x1000>,
+				      <0x0b122000 0x1000>;
+			};
+
+			frame@b123000 {
+				frame-number = <1>;
+				interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0xb123000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@b124000 {
+				frame-number = <2>;
+				interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x0b124000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@b125000 {
+				frame-number = <3>;
+				interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x0b125000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@b126000 {
+				frame-number = <4>;
+				interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x0b126000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@b127000 {
+				frame-number = <5>;
+				interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x0b127000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@b128000 {
+				frame-number = <6>;
+				interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x0b128000 0x1000>;
+				status = "disabled";
+			};
+		};
+
+	};
+
+	clocks {
+		sleep_clk: sleep-clk {
+			compatible = "fixed-clock";
+			clock-frequency = <32000>;
+			#clock-cells = <0>;
+		};
+
+		xo: xo {
+			compatible = "fixed-clock";
+			clock-frequency = <24000000>;
+			#clock-cells = <0>;
+		};
+	};
+
+	cpus: cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		CPU0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0>;
+			enable-method = "psci";
+			next-level-cache = <&L2_0>;
+		};
+
+		CPU1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			enable-method = "psci";
+			reg = <0x1>;
+			next-level-cache = <&L2_0>;
+		};
+
+		CPU2: cpu@2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			enable-method = "psci";
+			reg = <0x2>;
+			next-level-cache = <&L2_0>;
+		};
+
+		CPU3: cpu@3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			enable-method = "psci";
+			reg = <0x3>;
+			next-level-cache = <&L2_0>;
+		};
+
+		L2_0: l2-cache {
+			compatible = "cache";
+			cache-level = <0x2>;
+		};
+	};
+
+	pmuv8: pmu {
+		compatible = "arm,cortex-a53-pmu";
+		interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
+					 IRQ_TYPE_LEVEL_HIGH)>;
+	};
+
+	psci: psci {
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+};
Signature · 1 line
1.9.1
#5 lore raw

Re: [PATCH V2 2/7] pinctrl: qcom: Add ipq6018 pinctrl driver

In reply to Sricharan R
Quoted 1 line · Sricharan R
drivers/pinctrl/qcom/pinctrl-ipq6018.c +0 -0

[..]

Quoted 1 line

+static const struct msm_function ipq6018_functions[] = {

[..]

drivers/pinctrl/qcom/pinctrl-ipq6018.c line 1015

Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-ipq6018.c +10 -0
+	FUNCTION(qpic_pad),
+	FUNCTION(qpic_pad0),
+	FUNCTION(qpic_pad1),
+	FUNCTION(qpic_pad2),
+	FUNCTION(qpic_pad3),
+	FUNCTION(qpic_pad4),
+	FUNCTION(qpic_pad5),
+	FUNCTION(qpic_pad6),
+	FUNCTION(qpic_pad7),
+	FUNCTION(qpic_pad8),

Shouldn't the qpic_padN entries be removed now? (Please double check the rest as well)

[..]

Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-ipq6018.c +10 -0
+
+static const struct msm_pingroup ipq6018_groups[] = {
+	PINGROUP(0, qpic_pad, wci20, qdss_traceclk_b, _, burn0, _, _, _, _),
+	PINGROUP(1, qpic_pad, mac12, qdss_tracectl_b, _, burn1, _, _, _, _),
+	PINGROUP(2, qpic_pad, wci20, qdss_tracedata_b, _, _, _, _, _, _),
+	PINGROUP(3, qpic_pad, mac01, qdss_tracedata_b, _, _, _, _, _, _),
+	PINGROUP(4, qpic_pad, mac01, qdss_tracedata_b, _, _, _, _, _, _),
+	PINGROUP(5, qpic_pad, mac21, qdss_tracedata_b, _, _, _, _, _, _),
+	PINGROUP(6, qpic_pad, mac21, qdss_tracedata_b, _, _, _, _, _, _),
+	PINGROUP(7, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),

drivers/pinctrl/qcom/pinctrl-ipq6018.c line 1053

Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-ipq6018.c +10 -0
+	PINGROUP(8, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
+	PINGROUP(9, qpic_pad, atest_char, cxc0, mac13, dbg_out, qdss_tracedata_b, _, _, _),
+	PINGROUP(10, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
+	PINGROUP(11, qpic_pad, wci22, mac12, qdss_tracedata_b, _, _, _, _, _),
+	PINGROUP(12, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
+	PINGROUP(13, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
+	PINGROUP(14, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
+	PINGROUP(15, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
+	PINGROUP(16, qpic_pad, cxc0, mac13, qdss_tracedata_b, _, _, _, _, _),
+	PINGROUP(17, qpic_pad, qdss_tracedata_b, wci22, _, _, _, _, _, _),

Regards,
Bjorn

#2 lore raw

Re: [PATCH V2 1/7] dt-bindings: pinctrl: qcom: Add ipq6018 pinctrl bindings

In reply to Sricharan R
Quoted 116 lines · Sricharan R

Add device tree binding Documentation details for ipq6018 pinctrl driver.

---

[V2] Splitted dt bindings and driver into different patches. Added missing bindings,
and some style changes.

 .../bindings/pinctrl/qcom,ipq6018-pinctrl.yaml     | 172 +++++++++++++++++++++
 1 file changed, 172 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +91 -0
new file mode 100644
index 0000000..745a11e
@@ -0,0 +1,172 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,ipq6018-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. IPQ6018 TLMM block
+
+maintainers:
+  - Sricharan R <[email protected]>
+
+description: |
+  This binding describes the Top Level Mode Multiplexer block found in the
+  IPQ6018 platform.
+
+properties:
+  compatible:
+    const: qcom,ipq6018-pinctrl
+  reg:
+    maxItems: 1
+  interrupts:
+    Description: Specifies the TLMM summary IRQ
+    maxItems: 1
+  interrupt-controller: true
+  '#interrupt-cells':
+    Description:
+      Specifies the PIN numbers and Flags, as defined in defined in
+      include/dt-bindings/interrupt-controller/irq.h
+    const: 2
+  gpio-controller: true
+  '#gpio-cells':
+    Description: Specifying the pin number and flags, as defined in
+      include/dt-bindings/gpio/gpio.h
+    const: 2
+  gpio-ranges:
+    Description: Documentation/devicetree/bindings/gpio/gpio.txt
+    maxItems: 1
+
+#PIN CONFIGURATION NODES
+patternProperties:
+  '-pins$':
+    type: object
+    Description:
+      Pinctrl node's client devices use subnodes for desired pin configuration.
+      Client device subnodes use below standard properties.
+
+    Properties:
+      pins:
+        allOf:
+          $ref: /schemas/types.yaml#/definitions/string
+          enum:
+            gpio0-gpio80
+            sdc1_clk
+            sdc1_cmd
+            sdc1_data
+            sdc2_clk
+            sdc2_cmd
+            sdc2_data
+            qdsd_cmd
+            qdsd_data0
+            qdsd_data1
+            qdsd_data2
+            qdsd_data3
+        Description:
+          List of gpio pins affected by the properties specified in this
+          subnode.
+
+      function:
+        allOf:
+          $ref: /schemas/types.yaml#/definitions/string
+          enum:
+            adsp_ext, alsp_int, atest_bbrx0, atest_bbrx1, atest_char,
+            atest_char0, atest_char1, atest_char2, atest_char3, atest_combodac,
+            atest_gpsadc0, atest_gpsadc1, atest_tsens, atest_wlan0,
+            atest_wlan1, backlight_en, bimc_dte0, bimc_dte1, blsp_i2c1,
+            blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5, blsp_i2c6,  blsp_spi1,
+            blsp_spi1_cs1, blsp_spi1_cs2, blsp_spi1_cs3, blsp_spi2,
+            blsp_spi2_cs1, blsp_spi2_cs2, blsp_spi2_cs3, blsp_spi3,
+            blsp_spi3_cs1, blsp_spi3_cs2, blsp_spi3_cs3, blsp_spi4, blsp_spi5,
+            blsp_spi6, blsp_uart1, blsp_uart2, blsp_uim1, blsp_uim2, cam1_rst,
+            cam1_standby, cam_mclk0, cam_mclk1, cci_async, cci_i2c, cci_timer0,
+            cci_timer1, cci_timer2, cdc_pdm0, codec_mad, dbg_out, display_5v,
+            dmic0_clk, dmic0_data, dsi_rst, ebi0_wrcdc, euro_us, ext_lpass,
+            flash_strobe, gcc_gp1_clk_a, gcc_gp1_clk_b, gcc_gp2_clk_a,
+            gcc_gp2_clk_b, gcc_gp3_clk_a, gcc_gp3_clk_b, gpio, gsm0_tx0,
+            gsm0_tx1, gsm1_tx0, gsm1_tx1, gyro_accl, kpsns0, kpsns1, kpsns2,
+            ldo_en, ldo_update, mag_int, mdp_vsync, modem_tsync, m_voc,
+            nav_pps, nav_tsync, pa_indicator, pbs0, pbs1, pbs2, pri_mi2s,
+            pri_mi2s_ws, prng_rosc, pwr_crypto_enabled_a, pwr_crypto_enabled_b,
+            pwr_modem_enabled_a,  pwr_modem_enabled_b, pwr_nav_enabled_a,
+            pwr_nav_enabled_b, qdss_ctitrig_in_a0, qdss_ctitrig_in_a1,

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 101

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +10 -0
+            qdss_ctitrig_in_b0, qdss_ctitrig_in_b1, qdss_ctitrig_out_a0,
+            qdss_ctitrig_out_a1, qdss_ctitrig_out_b0, qdss_ctitrig_out_b1,
+            qdss_traceclk_a, qdss_traceclk_b, qdss_tracectl_a, qdss_tracectl_b,
+            qdss_tracedata_a, qdss_tracedata_b, reset_n, sd_card, sd_write,
+            sec_mi2s, smb_int, ssbi_wtr0, ssbi_wtr1, uim1, uim2, uim3,
+            uim_batt, wcss_bt, wcss_fm, wcss_wlan, webcam1_rst
+        Description:
+          Specify the alternative function to be configured for the specified
+          pins.
+      bias-disable:

Is there any way to inherit these from some common definition?

Quoted 17 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +17 -0
+        type: boolean
+        Description:
+          The specified pins should be configured as no pull.
+      bias-pull-down:
+        type: boolean
+        Description:
+          The specified pins should be configured as pull down.
+      bias-pull-up:
+        type: boolean
+        Description:
+          The specified pins should be configured as pull up.
+      output-high:
+        type: boolean
+        Description:
+          The specified pins are configured in output mode, driven high.
+          This option is not available for sdc pins.
+      output-low:

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 128

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +10 -0
+        type: boolean
+        Description:
+          The specified pins are configured in output mode, driven low.
+          This option is not available for sdc pins.
+      drive-strength:
+        allOf:
+          $ref: /schemas/types.yaml#/definitions/uint32
+          enum: [2, 4, 6, 8, 10, 12, 14, 16]
+        Description:
+          elects the drive strength for the specified pins, in mA.

Selects?

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +10 -0
+
+    required:
+      - pins
+      - function
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-controller

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 148

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +10 -0
+  - '#interrupt-cells'
+  - gpio-controller
+  - '#gpio-cells'
+  - gpio-ranges
+
+example:
+        tlmm: pinctrl@1000000 {
+                compatible = "qcom,ipq6018-pinctrl";
+                reg = <0x1000000 0x300000>;
+                interrupts = <0 208 0>;

<GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 154

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +6 -0
+                gpio-controller;
+                #gpio-cells = <2>;
+                interrupt-controller;
+                #interrupt-cells = <2>;
+
+                uart_pins: uart_pins {

s/_/- in the node name.

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 157

Quoted 3 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +3 -0
+                        mux {
+                                pins = "gpio4", "gpio5";
+                                function = "blsp_uart2";

Duplicate the function definition in tx and rx and drop the "mux" node.

Regards,
Bjorn

Quoted 17 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +15 -0
+                        };
+
+                        tx {
+                                pins = "gpio4";
+                                drive-strength = <4>;
+                                bias-disable;
+                        };
+
+                        rx {
+                                pins = "gpio5";
+                                drive-strength = <2>;
+                                bias-pull-up;
+                        };
+                };
+        };
Signature · 1 line
1.9.1
#12 lore raw

Re: [PATCH V2 5/7] clk: qcom: Add ipq6018 Global Clock Controller support

In reply to Stephen Boyd

Hi Stephen,
Thanks for the review.

Quoted 9 lines · Stephen Boyd

Quoting Sricharan R (2019-12-19 02:41:47)

Quoted 8 lines
drivers/clk/qcom/Kconfig +0 -0
index 3b33ef1..d0392f1 100644
@@ -95,6 +95,14 @@ config IPQ_GCC_4019
          Say Y if you want to use peripheral devices such as UART, SPI,
          i2c, USB, SD/eMMC, etc.
 
Quoted 10 lines

drivers/clk/qcom/Kconfig config IPQ_GCC_4019 · line 104

Quoted 7 lines
drivers/clk/qcom/Kconfig +7 -0
+config IPQ_GCC_6018
+       tristate "IPQ6018 Global Clock Controller"
+       help
+         Support for global clock controller on ipq6018 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 ipq6018.

What is the root clock of ipq6018?

root clock is 'xo'. But i guess this statement is not correct. will remove that line.

Quoted 61 lines
Quoted 61 lines
drivers/clk/qcom/Kconfig +1 -0
+
 config IPQ_GCC_806X
        tristate "IPQ806x Global Clock Controller"
        help
drivers/clk/qcom/gcc-ipq6018.c new file +51 -0
new file mode 100644
index 0000000..b6f0148
@@ -0,0 +1,4674 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ */
+
+#include <linux/kernel.h>
+#include <linux/err.h>
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/clk-provider.h>
+#include <linux/regmap.h>
+
+#include <linux/reset-controller.h>
+#include <dt-bindings/clock/qcom,gcc-ipq6018.h>
+#include <dt-bindings/reset/qcom,gcc-ipq6018.h>
+
+#include "common.h"
+#include "clk-regmap.h"
+#include "clk-pll.h"
+#include "clk-rcg.h"
+#include "clk-branch.h"
+#include "clk-alpha-pll.h"
+#include "clk-regmap-divider.h"
+#include "clk-regmap-mux.h"
+#include "reset.h"
+
+#define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
+
+enum {
+       P_XO,
+       P_BIAS_PLL,
+       P_UNIPHY0_RX,
+       P_UNIPHY0_TX,
+       P_UNIPHY1_RX,
+       P_BIAS_PLL_NSS_NOC,
+       P_UNIPHY1_TX,
+       P_PCIE20_PHY0_PIPE,
+       P_USB3PHY_0_PIPE,
+       P_GPLL0,
+       P_GPLL0_DIV2,
+       P_GPLL2,
+       P_GPLL4,
+       P_GPLL6,
+       P_SLEEP_CLK,
+       P_UBI32_PLL,
+       P_NSS_CRYPTO_PLL,
+       P_PI_SLEEP,
+};
+
Quoted 9 lines

drivers/clk/qcom/gcc-ipq6018.c line 55

Quoted 4 lines
drivers/clk/qcom/gcc-ipq6018.c new file +4 -0
+static const struct clk_parent_data gcc_xo_gpll0_gpll0_out_main_div2[] = {
+       { .fw_name = "xo", .name = "xo"},
+       { .fw_name = "gpll0", .name = "gpll0"},
+       { .fw_name = "gpll0_out_main_div2", .name = "gpll0_out_main_div2"},

Because we aren't migrating this from existing DT to new DT we should be able to leave out .name in all these structs. That's the legacy fallback mechanism used to migrate DT over to the new way.

ok will fix it.

Quoted 24 lines
Quoted 8 lines
drivers/clk/qcom/gcc-ipq6018.c new file +8 -0
+};
+
+static const struct parent_map gcc_xo_gpll0_gpll0_out_main_div2_map[] = {
+       { P_XO, 0 },
+       { P_GPLL0, 1 },
+       { P_GPLL0_DIV2, 4 },
+};
+

[...]

Quoted 15 lines
drivers/clk/qcom/gcc-ipq6018.c new file +15 -0
+
+static int gcc_ipq6018_probe(struct platform_device *pdev)
+{
+       int i, ret;
+       struct regmap *regmap;
+       struct clk *clk;
+       struct device *dev = &pdev->dev;
+
+       regmap = qcom_cc_map(pdev, &gcc_ipq6018_desc);
+       if (IS_ERR(regmap))
+               return PTR_ERR(regmap);
+
+       for (i = 0; i < ARRAY_SIZE(gcc_ipq6018_hws); i++) {
+               clk = devm_clk_register(&pdev->dev, gcc_ipq6018_hws[i]);
+               if (IS_ERR(clk))
Quoted 9 lines

drivers/clk/qcom/gcc-ipq6018.c line 4627

Quoted 4 lines
drivers/clk/qcom/gcc-ipq6018.c new file +4 -0
+                       return PTR_ERR(clk);
+       }
+
+       clk_register_fixed_rate(dev, "pcie20_phy0_pipe_clk", NULL, 0, 250000000);

Why do we need to register this? Can it come from DT then? Also what if it fails? And what if really_probe fails? Then we'll need to undo this registration. Ideally this is created somewhere else.

ok, will move this in to the actual clk list.

Quoted 15 lines
Quoted 15 lines
drivers/clk/qcom/gcc-ipq6018.c new file +15 -0
+
+       /* Disable SW_COLLAPSE for USB0 GDSCR */
+       regmap_update_bits(regmap, 0x3e078, BIT(0), 0x0);
+       /* Enable SW_OVERRIDE for USB0 GDSCR */
+       regmap_update_bits(regmap, 0x3e078, BIT(2), BIT(2));
+       /* Disable SW_COLLAPSE for USB1 GDSCR */
+       regmap_update_bits(regmap, 0x3f078, BIT(0), 0x0);
+       /* Enable SW_OVERRIDE for USB1 GDSCR */
+       regmap_update_bits(regmap, 0x3f078, BIT(2), BIT(2));
+
+       /* SW Workaround for UBI Huyara PLL */
+       regmap_update_bits(regmap, 0x2501c, BIT(26), BIT(26));
+
+       clk_alpha_pll_configure(&ubi32_pll_main, regmap, &ubi32_pll_config);
+
Quoted 9 lines

drivers/clk/qcom/gcc-ipq6018.c line 4648

Quoted 6 lines
drivers/clk/qcom/gcc-ipq6018.c new file +6 -0
+       clk_alpha_pll_configure(&nss_crypto_pll_main, regmap,
+                               &nss_crypto_pll_config);
+
+       ret = qcom_cc_really_probe(pdev, &gcc_ipq6018_desc, regmap);
+
+       dev_dbg(&pdev->dev, "Registered ipq6018 clock provider");

Please remove this and just return the result of really_probe.

ok, will fix it

Regards,
Sricharan

Signature · 1 line
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#18 lore raw
In reply to Stephen Boyd

Hi Stephen,

Quoted 16 lines · Stephen Boyd

Quoting Sricharan R (2019-12-19 02:41:42)

Quoted 5 lines

The IPQ6018 is Qualcomm\u2019s 802.11ax SoC for Routers, Gateways and Access Points.

This series adds minimal board boot support for ipq6018-cp01 board.

Quoted 9 lines

[v2]
* Splitted dt bindings and driver into different patches. Added missing bindings and some style changes.
* Added ipq6018 schema
* Addressed review comments for gcc clock bindings.
* Removed all clk critical flags, removed 1/1 factor clocks, moved to new way of specifying clk parents, and addressed other review comments.
* Sorted nodes based on address, name, label. Removed unused clock nodes, Addressed other review comments.

Quoted 3 lines

Can you just send the clk and clk binding to me in a different series? I don't want to review all the other patches in the same thread.

Sure, will send separately.

Regards,
Sricharan

Signature · 1 line
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#15 lore raw

Re: [PATCH V2 6/7] arm64: dts: Add ipq6018 SoC and CP01 board support

In reply to Bjorn Andersson

Hi Bjorn,
Thanks again for the review.

Quoted 6 lines · Bjorn Andersson
Quoted 3 lines · Sricharan R

Add initial device tree support for the Qualcomm IPQ6018 SoC and CP01 evaluation board.

Quoted 9 lines

Hi Sricharan, thanks for the rework, this looks pretty good now, just some minor comments below.

Quoted 3 lines

Should this have some Co-developed-by?

hmm, should be added here as well. will add it.

Quoted 26 lines
Quoted 26 lines

---

[V2] Sorted nodes based on address, name, label.
Removed unused clock nodes.
Addressed other review comments.

 arch/arm64/boot/dts/qcom/Makefile            |   1 +
 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts |  41 +++++
 arch/arm64/boot/dts/qcom/ipq6018.dtsi        | 215 +++++++++++++++++++++++++++
 3 files changed, 257 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
 create mode 100644 arch/arm64/boot/dts/qcom/ipq6018.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 6498a1e..2b24998 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8096-db820c.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= ipq6018-cp01-c1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq8074-hk01.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-longcheer-l8150.dtb
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts +0 -0
Quoted 9 lines

arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts line 1

Quoted 6 lines

new file mode 100644
index 0000000..82a6024

arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +1 -0
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0

Please dual license as GPL+BSD

ok.

Quoted 26 lines
Quoted 26 lines
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +26 -0
+/*
+ * IPQ6018 CP01 board device tree source
+ *
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "ipq6018.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. IPQ6018/AP-CP01-C1";
+	compatible = "qcom,ipq6018-cp01", "qcom,ipq6018";
+
+	aliases {
+		serial0 = &blsp1_uart3;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		bootargs-append = " swiotlb=1";
+	};
+};
+
+&blsp1_uart3 {
+	pinctrl-0 = <&uart_pins>;
Quoted 9 lines

arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts line 33

Quoted 6 lines
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +6 -0
+	pinctrl-names = "default";
+	status = "ok";
+};
+
+&tlmm {
+	uart_pins: uart_pins {

Reference the &uart_pins directly, and please use a more specific name.

ok.

Quoted 5 lines

arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts line 34

Quoted 1 line
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +1 -0
+		mux {

I would suggest that you either flatten the "mux" subnode and define the properties directly in &uart_pins; or you split it the functional pieces of rx { } tx { }.

ok.

Quoted 5 lines

And right now you're duplicating the properties between the dtsi and the dts, either drop one of them or define the function in the dtsi and add the drive-strenght and bias-pull-down here.

ok, understand, will fix.

Quoted 43 lines
Quoted 30 lines
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts new file +7 -0
+			pins = "gpio44", "gpio45";
+			function = "blsp2_uart";
+			drive-strength = <8>;
+			bias-pull-down;
+		};
+	};
+};
arch/arm64/boot/dts/qcom/ipq6018.dtsi new file +17 -0
new file mode 100644
index 0000000..269287c
@@ -0,0 +1,215 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * IPQ6018 SoC device tree source
+ *
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/qcom,gcc-ipq6018.h>
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <2>;
+	interrupt-parent = <&intc>;
+
+	reserved-memory {
+		#address-cells = <2>;

arch/arm64/boot/dts/qcom/ipq6018.dtsi line 27

Quoted 10 lines
arch/arm64/boot/dts/qcom/ipq6018.dtsi new file +10 -0
+		#size-cells = <2>;
+		ranges;
+
+		tz: tz@48500000 {
+			reg = <0x0 0x48500000 0x0 0x00200000>;
+			no-map;
+		};
+	};
+
+	soc: soc {

soc@0

Quoted 2 lines

Shouldn't this be sorted after 'p'?

yes, will fix this as well.

Regards,
Sricharan

Signature · 1 line
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#6 lore raw

Re: [PATCH V2 2/7] pinctrl: qcom: Add ipq6018 pinctrl driver

In reply to Bjorn Andersson

Hi Bjorn,

Quoted 5 lines · Bjorn Andersson
Quoted 1 line · Sricharan R
drivers/pinctrl/qcom/pinctrl-ipq6018.c +0 -0

[..]

Quoted 1 line

+static const struct msm_function ipq6018_functions[] = {

[..]

Quoted 14 lines

drivers/pinctrl/qcom/pinctrl-ipq6018.c line 1015

Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-ipq6018.c +10 -0
+	FUNCTION(qpic_pad),
+	FUNCTION(qpic_pad0),
+	FUNCTION(qpic_pad1),
+	FUNCTION(qpic_pad2),
+	FUNCTION(qpic_pad3),
+	FUNCTION(qpic_pad4),
+	FUNCTION(qpic_pad5),
+	FUNCTION(qpic_pad6),
+	FUNCTION(qpic_pad7),
+	FUNCTION(qpic_pad8),

Shouldn't the qpic_padN entries be removed now? (Please double check the rest as well)

ok, will fix and others as well.

Regards,
Sricharan

Signature · 1 line
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#3 lore raw

Re: [PATCH V2 1/7] dt-bindings: pinctrl: qcom: Add ipq6018 pinctrl bindings

In reply to Bjorn Andersson

Hi Bjorn,

Quoted 122 lines · Bjorn Andersson
Quoted 120 lines · Sricharan R

Add device tree binding Documentation details for ipq6018 pinctrl driver.

---

[V2] Splitted dt bindings and driver into different patches. Added missing bindings,
and some style changes.

 .../bindings/pinctrl/qcom,ipq6018-pinctrl.yaml     | 172 +++++++++++++++++++++
 1 file changed, 172 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +95 -0
new file mode 100644
index 0000000..745a11e
@@ -0,0 +1,172 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,ipq6018-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. IPQ6018 TLMM block
+
+maintainers:
+  - Sricharan R <[email protected]>
+
+description: |
+  This binding describes the Top Level Mode Multiplexer block found in the
+  IPQ6018 platform.
+
+properties:
+  compatible:
+    const: qcom,ipq6018-pinctrl
+  reg:
+    maxItems: 1
+  interrupts:
+    Description: Specifies the TLMM summary IRQ
+    maxItems: 1
+  interrupt-controller: true
+  '#interrupt-cells':
+    Description:
+      Specifies the PIN numbers and Flags, as defined in defined in
+      include/dt-bindings/interrupt-controller/irq.h
+    const: 2
+  gpio-controller: true
+  '#gpio-cells':
+    Description: Specifying the pin number and flags, as defined in
+      include/dt-bindings/gpio/gpio.h
+    const: 2
+  gpio-ranges:
+    Description: Documentation/devicetree/bindings/gpio/gpio.txt
+    maxItems: 1
+
+#PIN CONFIGURATION NODES
+patternProperties:
+  '-pins$':
+    type: object
+    Description:
+      Pinctrl node's client devices use subnodes for desired pin configuration.
+      Client device subnodes use below standard properties.
+
+    Properties:
+      pins:
+        allOf:
+          $ref: /schemas/types.yaml#/definitions/string
+          enum:
+            gpio0-gpio80
+            sdc1_clk
+            sdc1_cmd
+            sdc1_data
+            sdc2_clk
+            sdc2_cmd
+            sdc2_data
+            qdsd_cmd
+            qdsd_data0
+            qdsd_data1
+            qdsd_data2
+            qdsd_data3
+        Description:
+          List of gpio pins affected by the properties specified in this
+          subnode.
+
+      function:
+        allOf:
+          $ref: /schemas/types.yaml#/definitions/string
+          enum:
+            adsp_ext, alsp_int, atest_bbrx0, atest_bbrx1, atest_char,
+            atest_char0, atest_char1, atest_char2, atest_char3, atest_combodac,
+            atest_gpsadc0, atest_gpsadc1, atest_tsens, atest_wlan0,
+            atest_wlan1, backlight_en, bimc_dte0, bimc_dte1, blsp_i2c1,
+            blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5, blsp_i2c6,  blsp_spi1,
+            blsp_spi1_cs1, blsp_spi1_cs2, blsp_spi1_cs3, blsp_spi2,
+            blsp_spi2_cs1, blsp_spi2_cs2, blsp_spi2_cs3, blsp_spi3,
+            blsp_spi3_cs1, blsp_spi3_cs2, blsp_spi3_cs3, blsp_spi4, blsp_spi5,
+            blsp_spi6, blsp_uart1, blsp_uart2, blsp_uim1, blsp_uim2, cam1_rst,
+            cam1_standby, cam_mclk0, cam_mclk1, cci_async, cci_i2c, cci_timer0,
+            cci_timer1, cci_timer2, cdc_pdm0, codec_mad, dbg_out, display_5v,
+            dmic0_clk, dmic0_data, dsi_rst, ebi0_wrcdc, euro_us, ext_lpass,
+            flash_strobe, gcc_gp1_clk_a, gcc_gp1_clk_b, gcc_gp2_clk_a,
+            gcc_gp2_clk_b, gcc_gp3_clk_a, gcc_gp3_clk_b, gpio, gsm0_tx0,
+            gsm0_tx1, gsm1_tx0, gsm1_tx1, gyro_accl, kpsns0, kpsns1, kpsns2,
+            ldo_en, ldo_update, mag_int, mdp_vsync, modem_tsync, m_voc,
+            nav_pps, nav_tsync, pa_indicator, pbs0, pbs1, pbs2, pri_mi2s,
+            pri_mi2s_ws, prng_rosc, pwr_crypto_enabled_a, pwr_crypto_enabled_b,
+            pwr_modem_enabled_a,  pwr_modem_enabled_b, pwr_nav_enabled_a,
+            pwr_nav_enabled_b, qdss_ctitrig_in_a0, qdss_ctitrig_in_a1,
+            qdss_ctitrig_in_b0, qdss_ctitrig_in_b1, qdss_ctitrig_out_a0,
+            qdss_ctitrig_out_a1, qdss_ctitrig_out_b0, qdss_ctitrig_out_b1,
+            qdss_traceclk_a, qdss_traceclk_b, qdss_tracectl_a, qdss_tracectl_b,
+            qdss_tracedata_a, qdss_tracedata_b, reset_n, sd_card, sd_write,
Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 101

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +6 -0
+            sec_mi2s, smb_int, ssbi_wtr0, ssbi_wtr1, uim1, uim2, uim3,
+            uim_batt, wcss_bt, wcss_fm, wcss_wlan, webcam1_rst
+        Description:
+          Specify the alternative function to be configured for the specified
+          pins.
+      bias-disable:

Is there any way to inherit these from some common definition?

ok, will check and if possible will inherit those.

Quoted 28 lines
Quoted 17 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +17 -0
+        type: boolean
+        Description:
+          The specified pins should be configured as no pull.
+      bias-pull-down:
+        type: boolean
+        Description:
+          The specified pins should be configured as pull down.
+      bias-pull-up:
+        type: boolean
+        Description:
+          The specified pins should be configured as pull up.
+      output-high:
+        type: boolean
+        Description:
+          The specified pins are configured in output mode, driven high.
+          This option is not available for sdc pins.
+      output-low:

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 128

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +10 -0
+        type: boolean
+        Description:
+          The specified pins are configured in output mode, driven low.
+          This option is not available for sdc pins.
+      drive-strength:
+        allOf:
+          $ref: /schemas/types.yaml#/definitions/uint32
+          enum: [2, 4, 6, 8, 10, 12, 14, 16]
+        Description:
+          elects the drive strength for the specified pins, in mA.
Quoted 2 lines

Selects?

ok will fix.

Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +14 -0
+
+    required:
+      - pins
+      - function
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-controller
+  - '#interrupt-cells'
+  - gpio-controller
+  - '#gpio-cells'
+  - gpio-ranges
Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 148

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +6 -0
+
+example:
+        tlmm: pinctrl@1000000 {
+                compatible = "qcom,ipq6018-pinctrl";
+                reg = <0x1000000 0x300000>;
+                interrupts = <0 208 0>;

<GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>

ok.

Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 154

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +6 -0
+                gpio-controller;
+                #gpio-cells = <2>;
+                interrupt-controller;
+                #interrupt-cells = <2>;
+
+                uart_pins: uart_pins {

s/_/- in the node name.

ok.

Quoted 6 lines

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml line 157

Quoted 3 lines
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml new file +3 -0
+                        mux {
+                                pins = "gpio4", "gpio5";
+                                function = "blsp_uart2";

Duplicate the function definition in tx and rx and drop the "mux" node.

ok.

Regards,
Sricharan

Signature · 1 line
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation