Skip to contentSkip to conversation

New boards support: db845c and qcs404-evb

PATCH Superseded Sumit Garg 3 participants 23 messages Jul 8, 2022 – Jul 12, 2022

Subsystems (7)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Sumit Garg

author
#0 lore raw

v2 cover New boards support: db845c and qcs404-evb

Add support for two new boards db845c and qcs404-evb:
- db845c is a 96boards compliant platform aka RB3 based on Qualcomm SDM845 SoC.
- qcs404-evb is an evaluation board from Qualcomm based on QCS404 SoC.

Both these platforms have one thing in common that u-boot is chain-loaded in 64-bit mode via Android Boot Loader (ABL) which is an EFI application. For further details on chain-loading refer to platform specific documentation:
- doc/board/qualcomm/sdm845.rst
- doc/board/qualcomm/qcs404.rst

Changes in v2:
- Added patch #1 to fix DT node overrides in starqltechn-uboot.dtsi.
- Updated patch #2 commit description.
- Fixed a typo (s/96Board/96Boards/) in patch #5.

Sumit Garg (9):
board: starqltechn: Align DT node overrides with sdm845.dtsi
arm64: dts: sdm845: Remove redundant u-boot DT properties
clocks: sdm845: Import qcom,gcc-sdm845.h
uart: sdm845: Fix debug UART pinmux
board: qualcomm: Add support for dragonboard845c
mmc: msm_sdhci: Add SDCC version 5.0.0 support
pinctrl: qcom: Add pinctrl driver for QCS404 SoC
clocks: qcom: Add clock driver for QCS404 SoC
board: qualcomm: Add support for QCS404 EVB

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++
 arch/arm/dts/dragonboard845c.dts              |  44 ++++
 arch/arm/dts/qcs404-evb-uboot.dtsi            |  24 ++
 arch/arm/dts/qcs404-evb.dts                   |  81 ++++++
 arch/arm/dts/sdm845.dtsi                      |   8 +-
 arch/arm/dts/starqltechn-uboot.dtsi           |  18 +-
 arch/arm/dts/starqltechn.dts                  |   2 +-
 arch/arm/mach-snapdragon/Kconfig              |  25 ++
 arch/arm/mach-snapdragon/Makefile             |   3 +
 arch/arm/mach-snapdragon/clock-qcs404.c       |  30 +++
 arch/arm/mach-snapdragon/clock-sdm845.c       |   3 +-
 arch/arm/mach-snapdragon/clock-snapdragon.c   |   1 +
 .../include/mach/sysmap-qcs404.h              |  13 +
 arch/arm/mach-snapdragon/pinctrl-qcs404.c     |  55 ++++
 arch/arm/mach-snapdragon/pinctrl-snapdragon.c |   1 +
 arch/arm/mach-snapdragon/pinctrl-snapdragon.h |   1 +
 arch/arm/mach-snapdragon/sysmap-qcs404.c      |  31 +++
 board/qualcomm/dragonboard845c/Kconfig        |  12 +
 board/qualcomm/dragonboard845c/MAINTAINERS    |   6 +
 board/qualcomm/dragonboard845c/Makefile       |   9 +
 board/qualcomm/dragonboard845c/db845c.its     |  63 +++++
 .../dragonboard845c/dragonboard845c.c         |   9 +
 board/qualcomm/qcs404-evb/Kconfig             |  15 ++
 board/qualcomm/qcs404-evb/MAINTAINERS         |   6 +
 board/qualcomm/qcs404-evb/Makefile            |   6 +
 board/qualcomm/qcs404-evb/qcs404-evb.c        |  33 +++
 board/qualcomm/qcs404-evb/qcs404-evb.its      |  64 +++++
 configs/dragonboard845c_defconfig             |  28 ++
 configs/qcs404evb_defconfig                   |  39 +++
 doc/board/qualcomm/index.rst                  |   1 +
 doc/board/qualcomm/qcs404.rst                 |  79 ++++++
 doc/board/qualcomm/sdm845.rst                 | 100 ++++++-
 drivers/mmc/msm_sdhci.c                       |  96 ++++---
 include/configs/dragonboard845c.h             |  28 ++
 include/configs/qcs404-evb.h                  |  27 ++
 include/dt-bindings/clock/qcom,gcc-qcs404.h   | 180 +++++++++++++
 include/dt-bindings/clock/qcom,gcc-sdm845.h   | 246 ++++++++++++++++++
 38 files changed, 1363 insertions(+), 62 deletions(-)
 create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
 create mode 100644 arch/arm/dts/dragonboard845c.dts
 create mode 100644 arch/arm/dts/qcs404-evb-uboot.dtsi
 create mode 100644 arch/arm/dts/qcs404-evb.dts
 create mode 100644 arch/arm/mach-snapdragon/clock-qcs404.c
 create mode 100644 arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h
 create mode 100644 arch/arm/mach-snapdragon/pinctrl-qcs404.c
 create mode 100644 arch/arm/mach-snapdragon/sysmap-qcs404.c
 create mode 100644 board/qualcomm/dragonboard845c/Kconfig
 create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
 create mode 100644 board/qualcomm/dragonboard845c/Makefile
 create mode 100644 board/qualcomm/dragonboard845c/db845c.its
 create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
 create mode 100644 board/qualcomm/qcs404-evb/Kconfig
 create mode 100644 board/qualcomm/qcs404-evb/MAINTAINERS
 create mode 100644 board/qualcomm/qcs404-evb/Makefile
 create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.c
 create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.its
 create mode 100644 configs/dragonboard845c_defconfig
 create mode 100644 configs/qcs404evb_defconfig
 create mode 100644 doc/board/qualcomm/qcs404.rst
 create mode 100644 include/configs/dragonboard845c.h
 create mode 100644 include/configs/qcs404-evb.h
 create mode 100644 include/dt-bindings/clock/qcom,gcc-qcs404.h
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sdm845.h
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v2 1/9 board: starqltechn: Align DT node overrides with sdm845.dtsi

Currently there is a mismatch among DT node overrides in starqltechn board DTS file and the actual DT nodes in the sdm845.dtsi. So fix that to align with DT nodes in sdm845.dtsi.

---
 arch/arm/dts/starqltechn-uboot.dtsi | 18 ++++++++----------
 arch/arm/dts/starqltechn.dts        |  2 +-
 2 files changed, 9 insertions(+), 11 deletions(-)
arch/arm/dts/starqltechn-uboot.dtsi +8 -10
index b55cccfe14..8d5d09c3a5 100644
@@ -16,16 +16,14 @@
 		serial@a84000 {
 			u-boot,dm-pre-reloc;
 		};
-		gcc {
-			clock-controller@100000 {
-				u-boot,dm-pre-reloc;
-			};
-			gpio_north@3900000 {
-				u-boot,dm-pre-reloc;
-			};
-			pinctrl@3900000 {
-				u-boot,dm-pre-reloc;
-			};
+		clock-controller@100000 {
+			u-boot,dm-pre-reloc;
+		};
+		gpio_north@3900000 {
+			u-boot,dm-pre-reloc;
+		};
+		pinctrl_north@3900000 {
+			u-boot,dm-pre-reloc;
 		};
 	};
 };
arch/arm/dts/starqltechn.dts +1 -1
index 0261388319..34a4f59cbd 100644
@@ -48,7 +48,7 @@
 			status = "okay";
 		};
 
-		pinctrl@3900000 {
+		pinctrl_north@3900000 {
 			muic_i2c: muic_i2c {
 				pins = "GPIO_33", "GPIO_34";
 				drive-strength = <0x2>;
Signature · 1 line
2.25.1
Reviewed-by on v2 1/9
#2 lore raw

Re: [PATCH v2 1/9] board: starqltechn: Align DT node overrides with sdm845.dtsi

Quoted 54 lines · Sumit Garg

Currently there is a mismatch among DT node overrides in starqltechn board DTS file and the actual DT nodes in the sdm845.dtsi. So fix that to align with DT nodes in sdm845.dtsi.

---
 arch/arm/dts/starqltechn-uboot.dtsi | 18 ++++++++----------
 arch/arm/dts/starqltechn.dts        |  2 +-
 2 files changed, 9 insertions(+), 11 deletions(-)
arch/arm/dts/starqltechn-uboot.dtsi +8 -10
index b55cccfe14..8d5d09c3a5 100644
@@ -16,16 +16,14 @@
                serial@a84000 {
                        u-boot,dm-pre-reloc;
                };
-               gcc {
-                       clock-controller@100000 {
-                               u-boot,dm-pre-reloc;
-                       };
-                       gpio_north@3900000 {
-                               u-boot,dm-pre-reloc;
-                       };
-                       pinctrl@3900000 {
-                               u-boot,dm-pre-reloc;
-                       };
+               clock-controller@100000 {
+                       u-boot,dm-pre-reloc;
+               };
+               gpio_north@3900000 {
+                       u-boot,dm-pre-reloc;
+               };
+               pinctrl_north@3900000 {
+                       u-boot,dm-pre-reloc;
                };
        };
 };
arch/arm/dts/starqltechn.dts +1 -2
index 0261388319..34a4f59cbd 100644
@@ -48,7 +48,7 @@
                        status = "okay";
                };
 
-               pinctrl@3900000 {
+               pinctrl_north@3900000 {
                        muic_i2c: muic_i2c {
                                pins = "GPIO_33", "GPIO_34";
                                drive-strength = <0x2>;
--
Quoted 2 lines

2.25.1

author
#3 lore raw

PATCH v2 2/9 arm64: dts: sdm845: Remove redundant u-boot DT properties

In reply to Sumit Garg

According to u-boot DT recomendation, u-boot specific DT properties belong to *-uboot.dtsi. Also for starqltechn board (which is the only current consumer of sdm845.dtsi), the properties are already included in starqltechn-uboot.dtsi, so remove corresponding redundant properties.

---
 arch/arm/dts/sdm845.dtsi | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/dts/sdm845.dtsi +0 -3
index 6f2fb20d68..88030156d9 100644
@@ -18,7 +18,6 @@
 		compatible = "simple-bus";
 
 		gcc: clock-controller@100000 {
-			u-boot,dm-pre-reloc;
 			compatible = "qcom,gcc-sdm845";
 			reg = <0x100000 0x1f0000>;
 			#clock-cells = <1>;
@@ -27,7 +26,6 @@
 		};
 
 		gpio_north: gpio_north@3900000 {
-			u-boot,dm-pre-reloc;
 			#gpio-cells = <2>;
 			compatible = "qcom,sdm845-pinctrl";
 			reg = <0x3900000 0x400000>;
@@ -38,7 +36,6 @@
 		};
 
 		tlmm_north: pinctrl_north@3900000 {
-			u-boot,dm-pre-reloc;
 			compatible = "qcom,tlmm-sdm845";
 			reg = <0x3900000 0x400000>;
 			gpio-count = <150>;
Signature · 1 line
2.25.1
Reviewed-by on v2 2/9
#4 lore raw

Re: [PATCH v2 2/9] arm64: dts: sdm845: Remove redundant u-boot DT properties

Quoted 40 lines · Sumit Garg

According to u-boot DT recomendation, u-boot specific DT properties belong to *-uboot.dtsi. Also for starqltechn board (which is the only current consumer of sdm845.dtsi), the properties are already included in starqltechn-uboot.dtsi, so remove corresponding redundant properties.

---
 arch/arm/dts/sdm845.dtsi | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/dts/sdm845.dtsi +0 -4
index 6f2fb20d68..88030156d9 100644
@@ -18,7 +18,6 @@
                compatible = "simple-bus";
 
                gcc: clock-controller@100000 {
-                       u-boot,dm-pre-reloc;
                        compatible = "qcom,gcc-sdm845";
                        reg = <0x100000 0x1f0000>;
                        #clock-cells = <1>;
@@ -27,7 +26,6 @@
                };
 
                gpio_north: gpio_north@3900000 {
-                       u-boot,dm-pre-reloc;
                        #gpio-cells = <2>;
                        compatible = "qcom,sdm845-pinctrl";
                        reg = <0x3900000 0x400000>;
@@ -38,7 +36,6 @@
                };
 
                tlmm_north: pinctrl_north@3900000 {
-                       u-boot,dm-pre-reloc;
                        compatible = "qcom,tlmm-sdm845";
                        reg = <0x3900000 0x400000>;
                        gpio-count = <150>;
--
Quoted 2 lines

2.25.1

author
#5 lore raw

PATCH v2 3/9 clocks: sdm845: Import qcom,gcc-sdm845.h

In reply to Sumit Garg

Rather than using magic numbers as clock ids for peripherals import qcom,gcc-sdm845.h from Linux to be used standard macros for clock ids. So start using corresponding clk-id macro for debug UART.

---
 arch/arm/dts/sdm845.dtsi                    |   3 +-
 arch/arm/mach-snapdragon/clock-sdm845.c     |   3 +-
 include/dt-bindings/clock/qcom,gcc-sdm845.h | 246 ++++++++++++++++++++
 3 files changed, 250 insertions(+), 2 deletions(-)
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sdm845.h
arch/arm/dts/sdm845.dtsi +2 -1
index 88030156d9..b9506f1297 100644
@@ -8,6 +8,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/clock/qcom,gcc-sdm845.h>
 #include "skeleton64.dtsi"
 
 / {
@@ -55,7 +56,7 @@
 			reg = <0xa84000 0x4000>;
 			reg-names = "se_phys";
 			clock-names = "se-clk";
-			clocks = <&gcc 0x58>;
+			clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&qup_uart9>;
 			qcom,wrapper-core = <0x8a>;
arch/arm/mach-snapdragon/clock-sdm845.c +2 -1
index 9572639238..f69be80898 100644
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <dt-bindings/clock/qcom,gcc-sdm845.h>
 #include "clock-snapdragon.h"
 
 #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
@@ -84,7 +85,7 @@ ulong msm_set_rate(struct clk *clk, ulong rate)
 	struct msm_clk_priv *priv = dev_get_priv(clk->dev);
 
 	switch (clk->id) {
-	case 0x58: /*UART2*/
+	case GCC_QUPV3_WRAP1_S1_CLK: /*UART2*/
 		return clk_init_uart(priv, rate);
 	default:
 		return 0;
include/dt-bindings/clock/qcom,gcc-sdm845.h new file +246 -0

246 lines not on this page · raw message

Signature · 1 line
2.25.1
Reviewed-by on v2 3/9
#6 lore raw

Re: [PATCH v2 3/9] clocks: sdm845: Import qcom,gcc-sdm845.h

Quoted 308 lines · Sumit Garg

Rather than using magic numbers as clock ids for peripherals import qcom,gcc-sdm845.h from Linux to be used standard macros for clock ids. So start using corresponding clk-id macro for debug UART.

---
 arch/arm/dts/sdm845.dtsi                    |   3 +-
 arch/arm/mach-snapdragon/clock-sdm845.c     |   3 +-
 include/dt-bindings/clock/qcom,gcc-sdm845.h | 246 ++++++++++++++++++++
 3 files changed, 250 insertions(+), 2 deletions(-)
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sdm845.h
arch/arm/dts/sdm845.dtsi +2 -1
index 88030156d9..b9506f1297 100644
@@ -8,6 +8,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/clock/qcom,gcc-sdm845.h>
 #include "skeleton64.dtsi"
 
 / {
@@ -55,7 +56,7 @@
                        reg = <0xa84000 0x4000>;
                        reg-names = "se_phys";
                        clock-names = "se-clk";
-                       clocks = <&gcc 0x58>;
+                       clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&qup_uart9>;
                        qcom,wrapper-core = <0x8a>;
arch/arm/mach-snapdragon/clock-sdm845.c +2 -1
index 9572639238..f69be80898 100644
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <dt-bindings/clock/qcom,gcc-sdm845.h>
 #include "clock-snapdragon.h"
 
 #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
@@ -84,7 +85,7 @@ ulong msm_set_rate(struct clk *clk, ulong rate)
        struct msm_clk_priv *priv = dev_get_priv(clk->dev);
 
        switch (clk->id) {
-       case 0x58: /*UART2*/
+       case GCC_QUPV3_WRAP1_S1_CLK: /*UART2*/
                return clk_init_uart(priv, rate);
        default:
                return 0;
include/dt-bindings/clock/qcom,gcc-sdm845.h new file +246 -1
new file mode 100644
index 0000000000..968fa65b9c
@@ -0,0 +1,246 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_SDM_GCC_SDM845_H
+#define _DT_BINDINGS_CLK_SDM_GCC_SDM845_H
+
+/* GCC clock registers */
+#define GCC_AGGRE_NOC_PCIE_TBU_CLK                             0
+#define GCC_AGGRE_UFS_CARD_AXI_CLK                             1
+#define GCC_AGGRE_UFS_PHY_AXI_CLK                              2
+#define GCC_AGGRE_USB3_PRIM_AXI_CLK                            3
+#define GCC_AGGRE_USB3_SEC_AXI_CLK                             4
+#define GCC_BOOT_ROM_AHB_CLK                                   5
+#define GCC_CAMERA_AHB_CLK                                     6
+#define GCC_CAMERA_AXI_CLK                                     7
+#define GCC_CAMERA_XO_CLK                                      8
+#define GCC_CE1_AHB_CLK                                                9
+#define GCC_CE1_AXI_CLK                                                10
+#define GCC_CE1_CLK                                            11
+#define GCC_CFG_NOC_USB3_PRIM_AXI_CLK                          12
+#define GCC_CFG_NOC_USB3_SEC_AXI_CLK                           13
+#define GCC_CPUSS_AHB_CLK                                      14
+#define GCC_CPUSS_AHB_CLK_SRC                                  15
+#define GCC_CPUSS_RBCPR_CLK                                    16
+#define GCC_CPUSS_RBCPR_CLK_SRC                                        17
+#define GCC_DDRSS_GPU_AXI_CLK                                  18
+#define GCC_DISP_AHB_CLK                                       19
+#define GCC_DISP_AXI_CLK                                       20
+#define GCC_DISP_GPLL0_CLK_SRC                                 21
+#define GCC_DISP_GPLL0_DIV_CLK_SRC                             22
+#define GCC_DISP_XO_CLK                                                23
+#define GCC_GP1_CLK                                            24
+#define GCC_GP1_CLK_SRC                                                25
+#define GCC_GP2_CLK                                            26
+#define GCC_GP2_CLK_SRC                                                27
+#define GCC_GP3_CLK                                            28
+#define GCC_GP3_CLK_SRC                                                29
+#define GCC_GPU_CFG_AHB_CLK                                    30
+#define GCC_GPU_GPLL0_CLK_SRC                                  31
+#define GCC_GPU_GPLL0_DIV_CLK_SRC                              32
+#define GCC_GPU_MEMNOC_GFX_CLK                                 33
+#define GCC_GPU_SNOC_DVM_GFX_CLK                               34
+#define GCC_MSS_AXIS2_CLK                                      35
+#define GCC_MSS_CFG_AHB_CLK                                    36
+#define GCC_MSS_GPLL0_DIV_CLK_SRC                              37
+#define GCC_MSS_MFAB_AXIS_CLK                                  38
+#define GCC_MSS_Q6_MEMNOC_AXI_CLK                              39
+#define GCC_MSS_SNOC_AXI_CLK                                   40
+#define GCC_PCIE_0_AUX_CLK                                     41
+#define GCC_PCIE_0_AUX_CLK_SRC                                 42
+#define GCC_PCIE_0_CFG_AHB_CLK                                 43
+#define GCC_PCIE_0_CLKREF_CLK                                  44
+#define GCC_PCIE_0_MSTR_AXI_CLK                                        45
+#define GCC_PCIE_0_PIPE_CLK                                    46
+#define GCC_PCIE_0_SLV_AXI_CLK                                 47
+#define GCC_PCIE_0_SLV_Q2A_AXI_CLK                             48
+#define GCC_PCIE_1_AUX_CLK                                     49
+#define GCC_PCIE_1_AUX_CLK_SRC                                 50
+#define GCC_PCIE_1_CFG_AHB_CLK                                 51
+#define GCC_PCIE_1_CLKREF_CLK                                  52
+#define GCC_PCIE_1_MSTR_AXI_CLK                                        53
+#define GCC_PCIE_1_PIPE_CLK                                    54
+#define GCC_PCIE_1_SLV_AXI_CLK                                 55
+#define GCC_PCIE_1_SLV_Q2A_AXI_CLK                             56
+#define GCC_PCIE_PHY_AUX_CLK                                   57
+#define GCC_PCIE_PHY_REFGEN_CLK                                        58
+#define GCC_PCIE_PHY_REFGEN_CLK_SRC                            59
+#define GCC_PDM2_CLK                                           60
+#define GCC_PDM2_CLK_SRC                                       61
+#define GCC_PDM_AHB_CLK                                                62
+#define GCC_PDM_XO4_CLK                                                63
+#define GCC_PRNG_AHB_CLK                                       64
+#define GCC_QMIP_CAMERA_AHB_CLK                                        65
+#define GCC_QMIP_DISP_AHB_CLK                                  66
+#define GCC_QMIP_VIDEO_AHB_CLK                                 67
+#define GCC_QUPV3_WRAP0_S0_CLK                                 68
+#define GCC_QUPV3_WRAP0_S0_CLK_SRC                             69
+#define GCC_QUPV3_WRAP0_S1_CLK                                 70
+#define GCC_QUPV3_WRAP0_S1_CLK_SRC                             71
+#define GCC_QUPV3_WRAP0_S2_CLK                                 72
+#define GCC_QUPV3_WRAP0_S2_CLK_SRC                             73
+#define GCC_QUPV3_WRAP0_S3_CLK                                 74
+#define GCC_QUPV3_WRAP0_S3_CLK_SRC                             75
+#define GCC_QUPV3_WRAP0_S4_CLK                                 76
+#define GCC_QUPV3_WRAP0_S4_CLK_SRC                             77
+#define GCC_QUPV3_WRAP0_S5_CLK                                 78
+#define GCC_QUPV3_WRAP0_S5_CLK_SRC                             79
+#define GCC_QUPV3_WRAP0_S6_CLK                                 80
+#define GCC_QUPV3_WRAP0_S6_CLK_SRC                             81
+#define GCC_QUPV3_WRAP0_S7_CLK                                 82
+#define GCC_QUPV3_WRAP0_S7_CLK_SRC                             83
+#define GCC_QUPV3_WRAP1_S0_CLK                                 84
+#define GCC_QUPV3_WRAP1_S0_CLK_SRC                             85
+#define GCC_QUPV3_WRAP1_S1_CLK                                 86
+#define GCC_QUPV3_WRAP1_S1_CLK_SRC                             87
+#define GCC_QUPV3_WRAP1_S2_CLK                                 88
+#define GCC_QUPV3_WRAP1_S2_CLK_SRC                             89
+#define GCC_QUPV3_WRAP1_S3_CLK                                 90
+#define GCC_QUPV3_WRAP1_S3_CLK_SRC                             91
+#define GCC_QUPV3_WRAP1_S4_CLK                                 92
+#define GCC_QUPV3_WRAP1_S4_CLK_SRC                             93
+#define GCC_QUPV3_WRAP1_S5_CLK                                 94
+#define GCC_QUPV3_WRAP1_S5_CLK_SRC                             95
+#define GCC_QUPV3_WRAP1_S6_CLK                                 96
+#define GCC_QUPV3_WRAP1_S6_CLK_SRC                             97
+#define GCC_QUPV3_WRAP1_S7_CLK                                 98
+#define GCC_QUPV3_WRAP1_S7_CLK_SRC                             99
+#define GCC_QUPV3_WRAP_0_M_AHB_CLK                             100
+#define GCC_QUPV3_WRAP_0_S_AHB_CLK                             101
+#define GCC_QUPV3_WRAP_1_M_AHB_CLK                             102
+#define GCC_QUPV3_WRAP_1_S_AHB_CLK                             103
+#define GCC_SDCC2_AHB_CLK                                      104
+#define GCC_SDCC2_APPS_CLK                                     105
+#define GCC_SDCC2_APPS_CLK_SRC                                 106
+#define GCC_SDCC4_AHB_CLK                                      107
+#define GCC_SDCC4_APPS_CLK                                     108
+#define GCC_SDCC4_APPS_CLK_SRC                                 109
+#define GCC_SYS_NOC_CPUSS_AHB_CLK                              110
+#define GCC_TSIF_AHB_CLK                                       111
+#define GCC_TSIF_INACTIVITY_TIMERS_CLK                         112
+#define GCC_TSIF_REF_CLK                                       113
+#define GCC_TSIF_REF_CLK_SRC                                   114
+#define GCC_UFS_CARD_AHB_CLK                                   115
+#define GCC_UFS_CARD_AXI_CLK                                   116
+#define GCC_UFS_CARD_AXI_CLK_SRC                               117
+#define GCC_UFS_CARD_CLKREF_CLK                                        118
+#define GCC_UFS_CARD_ICE_CORE_CLK                              119
+#define GCC_UFS_CARD_ICE_CORE_CLK_SRC                          120
+#define GCC_UFS_CARD_PHY_AUX_CLK                               121
+#define GCC_UFS_CARD_PHY_AUX_CLK_SRC                           122
+#define GCC_UFS_CARD_RX_SYMBOL_0_CLK                           123
+#define GCC_UFS_CARD_RX_SYMBOL_1_CLK                           124
+#define GCC_UFS_CARD_TX_SYMBOL_0_CLK                           125
+#define GCC_UFS_CARD_UNIPRO_CORE_CLK                           126
+#define GCC_UFS_CARD_UNIPRO_CORE_CLK_SRC                       127
+#define GCC_UFS_MEM_CLKREF_CLK                                 128
+#define GCC_UFS_PHY_AHB_CLK                                    129
+#define GCC_UFS_PHY_AXI_CLK                                    130
+#define GCC_UFS_PHY_AXI_CLK_SRC                                        131
+#define GCC_UFS_PHY_ICE_CORE_CLK                               132
+#define GCC_UFS_PHY_ICE_CORE_CLK_SRC                           133
+#define GCC_UFS_PHY_PHY_AUX_CLK                                        134
+#define GCC_UFS_PHY_PHY_AUX_CLK_SRC                            135
+#define GCC_UFS_PHY_RX_SYMBOL_0_CLK                            136
+#define GCC_UFS_PHY_RX_SYMBOL_1_CLK                            137
+#define GCC_UFS_PHY_TX_SYMBOL_0_CLK                            138
+#define GCC_UFS_PHY_UNIPRO_CORE_CLK                            139
+#define GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC                                140
+#define GCC_USB30_PRIM_MASTER_CLK                              141
+#define GCC_USB30_PRIM_MASTER_CLK_SRC                          142
+#define GCC_USB30_PRIM_MOCK_UTMI_CLK                           143
+#define GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC                       144
+#define GCC_USB30_PRIM_SLEEP_CLK                               145
+#define GCC_USB30_SEC_MASTER_CLK                               146
+#define GCC_USB30_SEC_MASTER_CLK_SRC                           147
+#define GCC_USB30_SEC_MOCK_UTMI_CLK                            148
+#define GCC_USB30_SEC_MOCK_UTMI_CLK_SRC                                149
+#define GCC_USB30_SEC_SLEEP_CLK                                        150
+#define GCC_USB3_PRIM_CLKREF_CLK                               151
+#define GCC_USB3_PRIM_PHY_AUX_CLK                              152
+#define GCC_USB3_PRIM_PHY_AUX_CLK_SRC                          153
+#define GCC_USB3_PRIM_PHY_COM_AUX_CLK                          154
+#define GCC_USB3_PRIM_PHY_PIPE_CLK                             155
+#define GCC_USB3_SEC_CLKREF_CLK                                        156
+#define GCC_USB3_SEC_PHY_AUX_CLK                               157
+#define GCC_USB3_SEC_PHY_AUX_CLK_SRC                           158
+#define GCC_USB3_SEC_PHY_PIPE_CLK                              159
+#define GCC_USB3_SEC_PHY_COM_AUX_CLK                           160
+#define GCC_USB_PHY_CFG_AHB2PHY_CLK                            161
+#define GCC_VIDEO_AHB_CLK                                      162
+#define GCC_VIDEO_AXI_CLK                                      163
+#define GCC_VIDEO_XO_CLK                                       164
+#define GPLL0                                                  165
+#define GPLL0_OUT_EVEN                                         166
+#define GPLL0_OUT_MAIN                                         167
+#define GCC_GPU_IREF_CLK                                       168
+#define GCC_SDCC1_AHB_CLK                                      169
+#define GCC_SDCC1_APPS_CLK                                     170
+#define GCC_SDCC1_ICE_CORE_CLK                                 171
+#define GCC_SDCC1_APPS_CLK_SRC                                 172
+#define GCC_SDCC1_ICE_CORE_CLK_SRC                             173
+#define GCC_APC_VS_CLK                                         174
+#define GCC_GPU_VS_CLK                                         175
+#define GCC_MSS_VS_CLK                                         176
+#define GCC_VDDA_VS_CLK                                                177
+#define GCC_VDDCX_VS_CLK                                       178
+#define GCC_VDDMX_VS_CLK                                       179
+#define GCC_VS_CTRL_AHB_CLK                                    180
+#define GCC_VS_CTRL_CLK                                                181
+#define GCC_VS_CTRL_CLK_SRC                                    182
+#define GCC_VSENSOR_CLK_SRC                                    183
+#define GPLL4                                                  184
+#define GCC_CPUSS_DVM_BUS_CLK                                  185
+#define GCC_CPUSS_GNOC_CLK                                     186
+#define GCC_QSPI_CORE_CLK_SRC                                  187
+#define GCC_QSPI_CORE_CLK                                      188
+#define GCC_QSPI_CNOC_PERIPH_AHB_CLK                           189
+#define GCC_LPASS_Q6_AXI_CLK                                   190
+#define GCC_LPASS_SWAY_CLK                                     191
+
+/* GCC Resets */
+#define GCC_MMSS_BCR                                           0
+#define GCC_PCIE_0_BCR                                         1
+#define GCC_PCIE_1_BCR                                         2
+#define GCC_PCIE_PHY_BCR                                       3
+#define GCC_PDM_BCR                                            4
+#define GCC_PRNG_BCR                                           5
+#define GCC_QUPV3_WRAPPER_0_BCR                                        6
+#define GCC_QUPV3_WRAPPER_1_BCR                                        7
+#define GCC_QUSB2PHY_PRIM_BCR                                  8
+#define GCC_QUSB2PHY_SEC_BCR                                   9
+#define GCC_SDCC2_BCR                                          10
+#define GCC_SDCC4_BCR                                          11
+#define GCC_TSIF_BCR                                           12
+#define GCC_UFS_CARD_BCR                                       13
+#define GCC_UFS_PHY_BCR                                                14
+#define GCC_USB30_PRIM_BCR                                     15
+#define GCC_USB30_SEC_BCR                                      16
+#define GCC_USB3_PHY_PRIM_BCR                                  17
+#define GCC_USB3PHY_PHY_PRIM_BCR                               18
+#define GCC_USB3_DP_PHY_PRIM_BCR                               19
+#define GCC_USB3_PHY_SEC_BCR                                   20
+#define GCC_USB3PHY_PHY_SEC_BCR                                        21
+#define GCC_USB3_DP_PHY_SEC_BCR                                        22
+#define GCC_USB_PHY_CFG_AHB2PHY_BCR                            23
+#define GCC_PCIE_0_PHY_BCR                                     24
+#define GCC_PCIE_1_PHY_BCR                                     25
+
+/* GCC GDSCRs */
+#define PCIE_0_GDSC                                            0
+#define PCIE_1_GDSC                                            1
+#define UFS_CARD_GDSC                                          2
+#define UFS_PHY_GDSC                                           3
+#define USB30_PRIM_GDSC                                                4
+#define USB30_SEC_GDSC                                         5
+#define HLOS1_VOTE_AGGRE_NOC_MMU_AUDIO_TBU_GDSC                        6
+#define HLOS1_VOTE_AGGRE_NOC_MMU_PCIE_TBU_GDSC                 7
+#define HLOS1_VOTE_AGGRE_NOC_MMU_TBU1_GDSC                     8
+#define HLOS1_VOTE_AGGRE_NOC_MMU_TBU2_GDSC                     9
+#define HLOS1_VOTE_MMNOC_MMU_TBU_HF0_GDSC                      10
+#define HLOS1_VOTE_MMNOC_MMU_TBU_HF1_GDSC                      11
+#define HLOS1_VOTE_MMNOC_MMU_TBU_SF_GDSC                       12
+
+#endif
--
Quoted 2 lines

2.25.1

author
#7 lore raw

PATCH v2 4/9 uart: sdm845: Fix debug UART pinmux

In reply to Sumit Garg

Configure debug UART pins as function: "qup9" rather than being regular gpios. It fixes a hang seen during pinmux setting.

---
 arch/arm/dts/sdm845.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/sdm845.dtsi +1 -1
index b9506f1297..df5b6dfcfc 100644
@@ -47,7 +47,7 @@
 			/* DEBUG UART */
 			qup_uart9: qup-uart9-default {
 				pins = "GPIO_4", "GPIO_5";
-				function = "gpio";
+				function = "qup9";
 			};
 		};
 
Signature · 1 line
2.25.1
Reviewed-by on v2 4/9
#8 lore raw

Re: [PATCH v2 4/9] uart: sdm845: Fix debug UART pinmux

Quoted 23 lines · Sumit Garg

Configure debug UART pins as function: "qup9" rather than being regular gpios. It fixes a hang seen during pinmux setting.

---
 arch/arm/dts/sdm845.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/sdm845.dtsi +1 -2
index b9506f1297..df5b6dfcfc 100644
@@ -47,7 +47,7 @@
                        /* DEBUG UART */
                        qup_uart9: qup-uart9-default {
                                pins = "GPIO_4", "GPIO_5";
-                               function = "gpio";
+                               function = "qup9";
                        };
                };
 
--
Quoted 2 lines

2.25.1

author
#9 lore raw

PATCH v2 5/9 board: qualcomm: Add support for dragonboard845c

In reply to Sumit Garg

Add support for 96Boards Dragonboard 845C aka Robotics RB3 development platform. This board complies with 96Boards Open Platform Specifications.

Features:
- Qualcomm Snapdragon SDA845 SoC
- 4GiB RAM
- 64GiB UFS drive

U-boot is chain loaded by ABL in 64-bit mode as part of boot.img. For detailed build and boot instructions, refer to doc/board/qualcomm/sdm845.rst, board: dragonboard845c.

---
 arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
 arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
 arch/arm/mach-snapdragon/Kconfig              |  14 +++
 board/qualcomm/dragonboard845c/Kconfig        |  12 +++
 board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
 board/qualcomm/dragonboard845c/Makefile       |   9 ++
 board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
 .../dragonboard845c/dragonboard845c.c         |   9 ++
 configs/dragonboard845c_defconfig             |  28 +++++
 doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
 include/configs/dragonboard845c.h             |  28 +++++
 11 files changed, 337 insertions(+), 13 deletions(-)
 create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
 create mode 100644 arch/arm/dts/dragonboard845c.dts
 create mode 100644 board/qualcomm/dragonboard845c/Kconfig
 create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
 create mode 100644 board/qualcomm/dragonboard845c/Makefile
 create mode 100644 board/qualcomm/dragonboard845c/db845c.its
 create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
 create mode 100644 configs/dragonboard845c_defconfig
 create mode 100644 include/configs/dragonboard845c.h
arch/arm/dts/dragonboard845c-uboot.dtsi new file +37 -0
new file mode 100644
index 0000000000..8b5a7ee573
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * U-Boot addition to handle Qualcomm Robotics RB3 Development Platform
+ * (dragonboard845c) pins
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+/
+{
+	soc {
+		u-boot,dm-pre-reloc;
+
+		serial@a84000 {
+			u-boot,dm-pre-reloc;
+		};
+
+		clock-controller@100000 {
+			u-boot,dm-pre-reloc;
+		};
+
+		pinctrl_north@3900000 {
+			u-boot,dm-pre-reloc;
+		};
+	};
+};
+
+&pm8998_pon {
+	key_vol_down {
+		gpios = <&pm8998_pon 1 0>;
+		label = "key_vol_down";
+	};
+	key_power {
+		gpios = <&pm8998_pon 0 0>;
+		label = "key_power";
+	};
+};
arch/arm/dts/dragonboard845c.dts new file +44 -0

44 lines not on this page · raw message

arch/arm/mach-snapdragon/Kconfig +14 -0
index 12cf02a56a..cb53dc8901 100644
@@ -44,6 +44,19 @@ config TARGET_DRAGONBOARD820C
 	  - 3GiB RAM
 	  - 32GiB UFS drive
 
+config TARGET_DRAGONBOARD845C
+	bool "96Boards Dragonboard 845C"
+	help
+	  Support for 96Boards Dragonboard 845C aka Robotics RB3 Development
+	  Platform. This board complies with 96Boards Open Platform
+	  Specifications. Features:
+	  - Qualcomm Snapdragon SDA845 SoC
+	  - 4GiB RAM
+	  - 64GiB UFS drive
+	select MISC_INIT_R
+	select SDM845
+	select DM_ETH if NET
+
 config TARGET_STARQLTECHN
 	bool "Samsung S9 SM-G9600(starqltechn)"
 	help
@@ -60,6 +73,7 @@ endchoice
 
 source "board/qualcomm/dragonboard410c/Kconfig"
 source "board/qualcomm/dragonboard820c/Kconfig"
+source "board/qualcomm/dragonboard845c/Kconfig"
 source "board/samsung/starqltechn/Kconfig"
 
 endif
board/qualcomm/dragonboard845c/Kconfig new file +12 -0
new file mode 100644
index 0000000000..52fdff288d
@@ -0,0 +1,12 @@
+if TARGET_DRAGONBOARD845C
+
+config SYS_BOARD
+	default "dragonboard845c"
+
+config SYS_CONFIG_NAME
+	default "dragonboard845c"
+
+config SYS_VENDOR
+	default "qualcomm"
+
+endif
board/qualcomm/dragonboard845c/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000..e555953df6
@@ -0,0 +1,6 @@
+Qualcomm Robotics RB3 Development Platform (dragonboard845c)
+M:	Sumit Garg <[email protected]>
+S:	Maintained
+F:	board/qualcomm/dragonboard845c/
+F:	include/configs/dragonboard845c.h
+F:	configs/dragonboard845c_defconfig
board/qualcomm/dragonboard845c/Makefile new file +9 -0
new file mode 100644
index 0000000000..0abefdaf36
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2022 Sumit Garg <[email protected]>
+#
+# This empty file prevents make error.
+# Board logic defined in board/qualcomm/common/sdm845.c, no custom logic for dragonboard845c so far.
+#
+
+obj-y += dragonboard845c.o
board/qualcomm/dragonboard845c/db845c.its new file +63 -0

63 lines not on this page · raw message

board/qualcomm/dragonboard845c/dragonboard845c.c new file +9 -0
new file mode 100644
index 0000000000..c7685de306
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * This empty file prevents make linking error.
+ * No custom logic for dragonboard845c so far.
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+void noop(void) {}
configs/dragonboard845c_defconfig new file +28 -0
new file mode 100644
index 0000000000..a19e46a74b
@@ -0,0 +1,28 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_COUNTER_FREQUENCY=19000000
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_SNAPDRAGON=y
+CONFIG_DEFAULT_DEVICE_TREE="dragonboard845c"
+CONFIG_TARGET_DRAGONBOARD845C=y
+CONFIG_IDENT_STRING="\nQualcomm-DragonBoard 845C"
+CONFIG_SYS_LOAD_ADDR=0x80000000
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_BOOTDELAY=5
+CONFIG_SAVE_PREV_BL_FDT_ADDR=y
+CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_BMP=y
+# CONFIG_NET is not set
+CONFIG_CLK=y
+CONFIG_MSM_GPIO=y
+CONFIG_PM8916_GPIO=y
+CONFIG_PINCTRL=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_PM8916=y
+CONFIG_MSM_GENI_SERIAL=y
+CONFIG_SPMI_MSM=y
+CONFIG_LMB_MAX_REGIONS=64
doc/board/qualcomm/sdm845.rst +87 -13

122 lines not on this page · raw message

include/configs/dragonboard845c.h new file +28 -0
new file mode 100644
index 0000000000..108dde199b
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration file for Dragonboard 845c, based on Qualcomm SDA845 chip
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+#ifndef __CONFIGS_SDM845_H
+#define __CONFIGS_SDM845_H
+
+#include <linux/sizes.h>
+#include <asm/arch/sysmap-sdm845.h>
+
+#define CONFIG_SYS_BAUDRATE_TABLE	{ 115200, 230400, 460800, 921600 }
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"bootm_size=0x5000000\0"	\
+	"bootm_low=0x80000000\0"	\
+	"bootcmd=bootm $prevbl_initrd_start_addr\0"
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_BOOTM_LEN	SZ_64M
+
+/* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE	512
+#define CONFIG_SYS_MAXARGS	64
+
+#endif
Signature · 1 line
2.25.1
Reviewed-by on v2 5/9
#10 lore raw

Re: [PATCH v2 5/9] board: qualcomm: Add support for dragonboard845c

Quoted 489 lines · Sumit Garg

Add support for 96Boards Dragonboard 845C aka Robotics RB3 development platform. This board complies with 96Boards Open Platform Specifications.

Features:
- Qualcomm Snapdragon SDA845 SoC
- 4GiB RAM
- 64GiB UFS drive

U-boot is chain loaded by ABL in 64-bit mode as part of boot.img. For detailed build and boot instructions, refer to doc/board/qualcomm/sdm845.rst, board: dragonboard845c.

---
 arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
 arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
 arch/arm/mach-snapdragon/Kconfig              |  14 +++
 board/qualcomm/dragonboard845c/Kconfig        |  12 +++
 board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
 board/qualcomm/dragonboard845c/Makefile       |   9 ++
 board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
 .../dragonboard845c/dragonboard845c.c         |   9 ++
 configs/dragonboard845c_defconfig             |  28 +++++
 doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
 include/configs/dragonboard845c.h             |  28 +++++
 11 files changed, 337 insertions(+), 13 deletions(-)
 create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
 create mode 100644 arch/arm/dts/dragonboard845c.dts
 create mode 100644 board/qualcomm/dragonboard845c/Kconfig
 create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
 create mode 100644 board/qualcomm/dragonboard845c/Makefile
 create mode 100644 board/qualcomm/dragonboard845c/db845c.its
 create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
 create mode 100644 configs/dragonboard845c_defconfig
 create mode 100644 include/configs/dragonboard845c.h
arch/arm/dts/dragonboard845c-uboot.dtsi new file +37 -0
new file mode 100644
index 0000000000..8b5a7ee573
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * U-Boot addition to handle Qualcomm Robotics RB3 Development Platform
+ * (dragonboard845c) pins
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+/
+{
+       soc {
+               u-boot,dm-pre-reloc;
+
+               serial@a84000 {
+                       u-boot,dm-pre-reloc;
+               };
+
+               clock-controller@100000 {
+                       u-boot,dm-pre-reloc;
+               };
+
+               pinctrl_north@3900000 {
+                       u-boot,dm-pre-reloc;
+               };
+       };
+};
+
+&pm8998_pon {
+       key_vol_down {
+               gpios = <&pm8998_pon 1 0>;
+               label = "key_vol_down";
+       };
+       key_power {
+               gpios = <&pm8998_pon 0 0>;
+               label = "key_power";
+       };
+};
arch/arm/dts/dragonboard845c.dts new file +44 -0
new file mode 100644
index 0000000000..1722dce33f
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Qualcomm Robotics RB3 Development (dragonboard845c) board device
+ * tree source
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "sdm845.dtsi"
+
+/ {
+       model = "Thundercomm Dragonboard 845c";
+       compatible = "thundercomm,db845c", "qcom,sdm845";
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       aliases {
+               serial0 = &debug_uart;
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0 0x80000000 0 0xfdfa0000>;
+       };
+
+       psci {
+               compatible = "arm,psci-1.0";
+               method = "smc";
+       };
+
+       soc: soc {
+               serial@a84000 {
+                       status = "okay";
+               };
+       };
+};
+
+#include "dragonboard845c-uboot.dtsi"
arch/arm/mach-snapdragon/Kconfig +14 -0
index 12cf02a56a..cb53dc8901 100644
@@ -44,6 +44,19 @@ config TARGET_DRAGONBOARD820C
          - 3GiB RAM
          - 32GiB UFS drive
 
+config TARGET_DRAGONBOARD845C
+       bool "96Boards Dragonboard 845C"
+       help
+         Support for 96Boards Dragonboard 845C aka Robotics RB3 Development
+         Platform. This board complies with 96Boards Open Platform
+         Specifications. Features:
+         - Qualcomm Snapdragon SDA845 SoC
+         - 4GiB RAM
+         - 64GiB UFS drive
+       select MISC_INIT_R
+       select SDM845
+       select DM_ETH if NET
+
 config TARGET_STARQLTECHN
        bool "Samsung S9 SM-G9600(starqltechn)"
        help
@@ -60,6 +73,7 @@ endchoice
 
 source "board/qualcomm/dragonboard410c/Kconfig"
 source "board/qualcomm/dragonboard820c/Kconfig"
+source "board/qualcomm/dragonboard845c/Kconfig"
 source "board/samsung/starqltechn/Kconfig"
 
 endif
board/qualcomm/dragonboard845c/Kconfig new file +12 -0
new file mode 100644
index 0000000000..52fdff288d
@@ -0,0 +1,12 @@
+if TARGET_DRAGONBOARD845C
+
+config SYS_BOARD
+       default "dragonboard845c"
+
+config SYS_CONFIG_NAME
+       default "dragonboard845c"
+
+config SYS_VENDOR
+       default "qualcomm"
+
+endif
board/qualcomm/dragonboard845c/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000..e555953df6
@@ -0,0 +1,6 @@
+Qualcomm Robotics RB3 Development Platform (dragonboard845c)
+M:     Sumit Garg <[email protected]>
+S:     Maintained
+F:     board/qualcomm/dragonboard845c/
+F:     include/configs/dragonboard845c.h
+F:     configs/dragonboard845c_defconfig
board/qualcomm/dragonboard845c/Makefile new file +9 -0
new file mode 100644
index 0000000000..0abefdaf36
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2022 Sumit Garg <[email protected]>
+#
+# This empty file prevents make error.
+# Board logic defined in board/qualcomm/common/sdm845.c, no custom logic for dragonboard845c so far.
+#
+
+obj-y += dragonboard845c.o
board/qualcomm/dragonboard845c/db845c.its new file +63 -0
new file mode 100644
index 0000000000..a2621340d1
@@ -0,0 +1,63 @@
+/*
+ * U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs
+ */
+
+/dts-v1/;
+
+/ {
+       description = "Various kernels, ramdisks and FDT blobs";
+       #address-cells = <1>;
+
+       images {
+               kernel-1 {
+                       description = "5.15.0-qcomlt-arm64";
+                       data = /incbin/("./db845c_imgs/Image.gz--5.15-r0-dragonboard-845c-20211218193034-511.bin");
+                       type = "kernel";
+                       arch = "arm64";
+                       os = "linux";
+                       compression = "gzip";
+                       load = <0x80000000>;
+                       entry = <0x80000000>;
+                       hash-1 {
+                               algo = "sha1";
+                       };
+               };
+
+               ramdisk-1 {
+                       description = "initramfs-test-full-image-dragonboard-845c";
+                       data = /incbin/("./db845c_imgs/initramfs-test-full-image-dragonboard-845c-20211218193034-511.rootfs.cpio.gz");
+                       type = "ramdisk";
+                       arch = "arm64";
+                       os = "linux";
+                       compression = "gzip";
+                       load = <00000000>;
+                       entry = <00000000>;
+                       hash-1 {
+                               algo = "sha1";
+                       };
+               };
+
+               fdt-1 {
+                       description = "sdm845-db845c-fdt";
+                       data = /incbin/("./db845c_imgs/sdm845-db845c--5.15-r0-dragonboard-845c-20211218193034.dtb");
+                       type = "flat_dt";
+                       arch = "arm64";
+                       compression = "none";
+                       hash-1 {
+                               algo = "sha1";
+                       };
+               };
+
+       };
+
+       configurations {
+               default = "config-1";
+
+               config-1 {
+                       description = "db845c kernel-5.15.0 configuration";
+                       kernel = "kernel-1";
+                       ramdisk = "ramdisk-1";
+                       fdt = "fdt-1";
+               };
+       };
+};
board/qualcomm/dragonboard845c/dragonboard845c.c new file +9 -0
new file mode 100644
index 0000000000..c7685de306
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * This empty file prevents make linking error.
+ * No custom logic for dragonboard845c so far.
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+void noop(void) {}
configs/dragonboard845c_defconfig new file +28 -0
new file mode 100644
index 0000000000..a19e46a74b
@@ -0,0 +1,28 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_COUNTER_FREQUENCY=19000000
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_SNAPDRAGON=y
+CONFIG_DEFAULT_DEVICE_TREE="dragonboard845c"
+CONFIG_TARGET_DRAGONBOARD845C=y
+CONFIG_IDENT_STRING="\nQualcomm-DragonBoard 845C"
+CONFIG_SYS_LOAD_ADDR=0x80000000
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_BOOTDELAY=5
+CONFIG_SAVE_PREV_BL_FDT_ADDR=y
+CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_BMP=y
+# CONFIG_NET is not set
+CONFIG_CLK=y
+CONFIG_MSM_GPIO=y
+CONFIG_PM8916_GPIO=y
+CONFIG_PINCTRL=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_PM8916=y
+CONFIG_MSM_GENI_SERIAL=y
+CONFIG_SPMI_MSM=y
+CONFIG_LMB_MAX_REGIONS=64
doc/board/qualcomm/sdm845.rst +87 -13
index b6642c9579..8ef4749287 100644
@@ -35,9 +35,25 @@ Pack android boot image
 ^^^^^^^^^^^^^^^^^^^^^^^
 We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
 and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
-with appended dtb, so let's mimic linux to satisfy stock bootloader:
+with appended dtb, so let's mimic linux to satisfy stock bootloader.
 
-- create dump dtb::
+Boards
+------------
+starqlte
+^^^^^^^^^^^^
+
+The starqltechn is a production board for Samsung S9 (SM-G9600) phone,
+based on the Qualcomm SDM845 SoC.
+
+Steps:
+
+- Build u-boot::
+
+       $ export CROSS_COMPILE=<aarch64 toolchain prefix>
+       $ make starqltechn_defconfig
+       $ make
+
+- Create dump dtb::
 
        workdir=/tmp/prepare_payload
        mkdir -p "$workdir"
@@ -56,10 +72,15 @@ with appended dtb, so let's mimic linux to satisfy stock bootloader:
        };
        EOF
 
-- gzip u-boot ``gzip u-boot.bin``
-- append dtb to gzipped u-boot: ``cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb``
+- gzip u-boot::
+
+       gzip u-boot.bin
 
-Now we've got everything to build android boot image:::
+- Append dtb to gzipped u-boot::
+
+       cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
+
+- Now we've got everything to build android boot image::
 
        mkbootimg --base 0x0 --kernel_offset 0x00008000 \
        --ramdisk_offset 0x02000000 --tags_offset 0x01e00000 \
@@ -68,16 +89,69 @@ Now we've got everything to build android boot image:::
        --kernel u-boot.bin.gz-dtb \
        -o boot.img
 
-Flash image with your phone's flashing method.
+- Flash image with your phone's flashing method.
 
-Boards
-------------
-starqlte
-^^^^^^^^^^^^
+More information can be found on the `Samsung S9 page`_.
 
-The starqltechn is a production board for Samsung S9 (SM-G9600) phone,
-based on the Qualcomm SDM845 SoC.
+dragonboard845c
+^^^^^^^^^^^^^^^
 
-More information can be found on the `Samsung S9 page`_.
+The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
+the Qualcomm SDM845 SoC.
+
+Steps:
+
+- Build u-boot::
+
+       $ export CROSS_COMPILE=<aarch64 toolchain prefix>
+       $ make dragonboard845c_defconfig
+       $ make
+
+- Create dummy dtb::
+
+       workdir=/tmp/prepare_payload
+       mkdir -p "$workdir"
+       mock_dtb="$workdir"/payload_mock.dtb
+
+       dtc -I dts -O dtb -o "$mock_dtb" << EOF
+       /dts-v1/;
+       / {
+               #address-cells = <2>;
+               #size-cells = <2>;
+
+               memory@80000000 {
+                       device_type = "memory";
+                       /* We expect the bootloader to fill in the size */
+                       reg = <0 0x80000000 0 0>;
+               };
+
+               chosen { };
+       };
+       EOF
+
+- gzip u-boot::
+
+       gzip u-boot.bin
+
+- Append dtb to gzipped u-boot::
+
+        cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
+
+- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
+  directory. It expects a folder as ``db845c_imgs/`` in the main directory
+  containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
+  for full path to images::
+
+       mkimage -f db845c.its db845c.itb
+
+- Now we've got everything to build android boot image::
+
+       mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
+       --output boot.img --pagesize 4096 --base 0x80000000
+
+- Flash boot.img using db845c fastboot method.
+
+More information can be found on the `DragonBoard 845c page`_.
 
 .. _Samsung S9 page: https://en.wikipedia.org/wiki/Samsung_Galaxy_S9
+.. _DragonBoard 845c page: https://www.96boards.org/product/rb3-platform/
include/configs/dragonboard845c.h new file +28 -1
new file mode 100644
index 0000000000..108dde199b
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration file for Dragonboard 845c, based on Qualcomm SDA845 chip
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+#ifndef __CONFIGS_SDM845_H
+#define __CONFIGS_SDM845_H
+
+#include <linux/sizes.h>
+#include <asm/arch/sysmap-sdm845.h>
+
+#define CONFIG_SYS_BAUDRATE_TABLE      { 115200, 230400, 460800, 921600 }
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+       "bootm_size=0x5000000\0"        \
+       "bootm_low=0x80000000\0"        \
+       "bootcmd=bootm $prevbl_initrd_start_addr\0"
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_BOOTM_LEN   SZ_64M
+
+/* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE      512
+#define CONFIG_SYS_MAXARGS     64
+
+#endif
--
Quoted 2 lines

2.25.1

author
#11 lore raw

PATCH v2 6/9 mmc: msm_sdhci: Add SDCC version 5.0.0 support

In reply to Sumit Garg

For SDCC version 5.0.0, MCI registers are removed from SDCC interface and some registers are moved to HC. So add support to use the new compatible string "qcom,sdhci-msm-v5". Based on this new msm variant, pick the relevant variant data and use it to detect MCI presence thereby configuring register read/write to msm specific registers.

---
 drivers/mmc/msm_sdhci.c | 96 +++++++++++++++++++++++++++--------------
 1 file changed, 64 insertions(+), 32 deletions(-)
drivers/mmc/msm_sdhci.c +64 -32
index d63d7b3a2c..604f9c3ff9 100644
@@ -22,18 +22,17 @@
 #define SDCC_MCI_POWER_SW_RST BIT(7)
 
 /* This is undocumented register */
-#define SDCC_MCI_VERSION             0x50
-#define SDCC_MCI_VERSION_MAJOR_SHIFT 28
-#define SDCC_MCI_VERSION_MAJOR_MASK  (0xf << SDCC_MCI_VERSION_MAJOR_SHIFT)
-#define SDCC_MCI_VERSION_MINOR_MASK  0xff
+#define SDCC_MCI_VERSION		0x50
+#define SDCC_V5_VERSION			0x318
+
+#define SDCC_VERSION_MAJOR_SHIFT	28
+#define SDCC_VERSION_MAJOR_MASK		(0xf << SDCC_VERSION_MAJOR_SHIFT)
+#define SDCC_VERSION_MINOR_MASK		0xff
 
 #define SDCC_MCI_STATUS2 0x6C
 #define SDCC_MCI_STATUS2_MCI_ACT 0x1
 #define SDCC_MCI_HC_MODE 0x78
 
-/* Offset to SDHCI registers */
-#define SDCC_SDHCI_OFFSET 0x900
-
 /* Non standard (?) SDHCI register */
 #define SDHCI_VENDOR_SPEC_CAPABILITIES0  0x11c
 
@@ -47,6 +46,10 @@ struct msm_sdhc {
 	void *base;
 };
 
+struct msm_sdhc_variant_info {
+	bool mci_removed;
+};
+
 DECLARE_GLOBAL_DATA_PTR;
 
 static int msm_sdc_clk_init(struct udevice *dev)
@@ -85,25 +88,8 @@ static int msm_sdc_clk_init(struct udevice *dev)
 	return 0;
 }
 
-static int msm_sdc_probe(struct udevice *dev)
+static int msm_sdc_mci_init(struct msm_sdhc *prv)
 {
-	struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
-	struct msm_sdhc_plat *plat = dev_get_plat(dev);
-	struct msm_sdhc *prv = dev_get_priv(dev);
-	struct sdhci_host *host = &prv->host;
-	u32 core_version, core_minor, core_major;
-	u32 caps;
-	int ret;
-
-	host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_BROKEN_R1B;
-
-	host->max_clk = 0;
-
-	/* Init clocks */
-	ret = msm_sdc_clk_init(dev);
-	if (ret)
-		return ret;
-
 	/* Reset the core and Enable SDHC mode */
 	writel(readl(prv->base + SDCC_MCI_POWER) | SDCC_MCI_POWER_SW_RST,
 	       prv->base + SDCC_MCI_POWER);
@@ -126,12 +112,45 @@ static int msm_sdc_probe(struct udevice *dev)
 	/* Enable host-controller mode */
 	writel(1, prv->base + SDCC_MCI_HC_MODE);
 
-	core_version = readl(prv->base + SDCC_MCI_VERSION);
+	return 0;
+}
 
-	core_major = (core_version & SDCC_MCI_VERSION_MAJOR_MASK);
-	core_major >>= SDCC_MCI_VERSION_MAJOR_SHIFT;
+static int msm_sdc_probe(struct udevice *dev)
+{
+	struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+	struct msm_sdhc_plat *plat = dev_get_plat(dev);
+	struct msm_sdhc *prv = dev_get_priv(dev);
+	const struct msm_sdhc_variant_info *var_info;
+	struct sdhci_host *host = &prv->host;
+	u32 core_version, core_minor, core_major;
+	u32 caps;
+	int ret;
 
-	core_minor = core_version & SDCC_MCI_VERSION_MINOR_MASK;
+	host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_BROKEN_R1B;
+
+	host->max_clk = 0;
+
+	/* Init clocks */
+	ret = msm_sdc_clk_init(dev);
+	if (ret)
+		return ret;
+
+	var_info = (void *)dev_get_driver_data(dev);
+	if (!var_info->mci_removed) {
+		ret = msm_sdc_mci_init(prv);
+		if (ret)
+			return ret;
+	}
+
+	if (!var_info->mci_removed)
+		core_version = readl(prv->base + SDCC_MCI_VERSION);
+	else
+		core_version = readl(host->ioaddr + SDCC_V5_VERSION);
+
+	core_major = (core_version & SDCC_VERSION_MAJOR_MASK);
+	core_major >>= SDCC_VERSION_MAJOR_SHIFT;
+
+	core_minor = core_version & SDCC_VERSION_MINOR_MASK;
 
 	/*
 	 * Support for some capabilities is not advertised by newer
@@ -161,9 +180,13 @@ static int msm_sdc_probe(struct udevice *dev)
 static int msm_sdc_remove(struct udevice *dev)
 {
 	struct msm_sdhc *priv = dev_get_priv(dev);
+	const struct msm_sdhc_variant_info *var_info;
+
+	var_info = (void *)dev_get_driver_data(dev);
 
-	 /* Disable host-controller mode */
-	writel(0, priv->base + SDCC_MCI_HC_MODE);
+	/* Disable host-controller mode */
+	if (!var_info->mci_removed)
+		writel(0, priv->base + SDCC_MCI_HC_MODE);
 
 	return 0;
 }
@@ -195,8 +218,17 @@ static int msm_sdc_bind(struct udevice *dev)
 	return sdhci_bind(dev, &plat->mmc, &plat->cfg);
 }
 
+static const struct msm_sdhc_variant_info msm_sdhc_mci_var = {
+	.mci_removed = false,
+};
+
+static const struct msm_sdhc_variant_info msm_sdhc_v5_var = {
+	.mci_removed = true,
+};
+
 static const struct udevice_id msm_mmc_ids[] = {
-	{ .compatible = "qcom,sdhci-msm-v4" },
+	{ .compatible = "qcom,sdhci-msm-v4", .data = (ulong)&msm_sdhc_mci_var },
+	{ .compatible = "qcom,sdhci-msm-v5", .data = (ulong)&msm_sdhc_v5_var },
 	{ }
 };
 
Signature · 1 line
2.25.1
Reviewed-by on v2 6/9
#12 lore raw

Re: [PATCH v2 6/9] mmc: msm_sdhci: Add SDCC version 5.0.0 support

Quoted 165 lines · Sumit Garg

For SDCC version 5.0.0, MCI registers are removed from SDCC interface and some registers are moved to HC. So add support to use the new compatible string "qcom,sdhci-msm-v5". Based on this new msm variant, pick the relevant variant data and use it to detect MCI presence thereby configuring register read/write to msm specific registers.

---
 drivers/mmc/msm_sdhci.c | 96 +++++++++++++++++++++++++++--------------
 1 file changed, 64 insertions(+), 32 deletions(-)
drivers/mmc/msm_sdhci.c +64 -33
index d63d7b3a2c..604f9c3ff9 100644
@@ -22,18 +22,17 @@
 #define SDCC_MCI_POWER_SW_RST BIT(7)
 
 /* This is undocumented register */
-#define SDCC_MCI_VERSION             0x50
-#define SDCC_MCI_VERSION_MAJOR_SHIFT 28
-#define SDCC_MCI_VERSION_MAJOR_MASK  (0xf << SDCC_MCI_VERSION_MAJOR_SHIFT)
-#define SDCC_MCI_VERSION_MINOR_MASK  0xff
+#define SDCC_MCI_VERSION               0x50
+#define SDCC_V5_VERSION                        0x318
+
+#define SDCC_VERSION_MAJOR_SHIFT       28
+#define SDCC_VERSION_MAJOR_MASK                (0xf << SDCC_VERSION_MAJOR_SHIFT)
+#define SDCC_VERSION_MINOR_MASK                0xff
 
 #define SDCC_MCI_STATUS2 0x6C
 #define SDCC_MCI_STATUS2_MCI_ACT 0x1
 #define SDCC_MCI_HC_MODE 0x78
 
-/* Offset to SDHCI registers */
-#define SDCC_SDHCI_OFFSET 0x900
-
 /* Non standard (?) SDHCI register */
 #define SDHCI_VENDOR_SPEC_CAPABILITIES0  0x11c
 
@@ -47,6 +46,10 @@ struct msm_sdhc {
        void *base;
 };
 
+struct msm_sdhc_variant_info {
+       bool mci_removed;
+};
+
 DECLARE_GLOBAL_DATA_PTR;
 
 static int msm_sdc_clk_init(struct udevice *dev)
@@ -85,25 +88,8 @@ static int msm_sdc_clk_init(struct udevice *dev)
        return 0;
 }
 
-static int msm_sdc_probe(struct udevice *dev)
+static int msm_sdc_mci_init(struct msm_sdhc *prv)
 {
-       struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
-       struct msm_sdhc_plat *plat = dev_get_plat(dev);
-       struct msm_sdhc *prv = dev_get_priv(dev);
-       struct sdhci_host *host = &prv->host;
-       u32 core_version, core_minor, core_major;
-       u32 caps;
-       int ret;
-
-       host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_BROKEN_R1B;
-
-       host->max_clk = 0;
-
-       /* Init clocks */
-       ret = msm_sdc_clk_init(dev);
-       if (ret)
-               return ret;
-
        /* Reset the core and Enable SDHC mode */
        writel(readl(prv->base + SDCC_MCI_POWER) | SDCC_MCI_POWER_SW_RST,
               prv->base + SDCC_MCI_POWER);
@@ -126,12 +112,45 @@ static int msm_sdc_probe(struct udevice *dev)
        /* Enable host-controller mode */
        writel(1, prv->base + SDCC_MCI_HC_MODE);
 
-       core_version = readl(prv->base + SDCC_MCI_VERSION);
+       return 0;
+}
 
-       core_major = (core_version & SDCC_MCI_VERSION_MAJOR_MASK);
-       core_major >>= SDCC_MCI_VERSION_MAJOR_SHIFT;
+static int msm_sdc_probe(struct udevice *dev)
+{
+       struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+       struct msm_sdhc_plat *plat = dev_get_plat(dev);
+       struct msm_sdhc *prv = dev_get_priv(dev);
+       const struct msm_sdhc_variant_info *var_info;
+       struct sdhci_host *host = &prv->host;
+       u32 core_version, core_minor, core_major;
+       u32 caps;
+       int ret;
 
-       core_minor = core_version & SDCC_MCI_VERSION_MINOR_MASK;
+       host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_BROKEN_R1B;
+
+       host->max_clk = 0;
+
+       /* Init clocks */
+       ret = msm_sdc_clk_init(dev);
+       if (ret)
+               return ret;
+
+       var_info = (void *)dev_get_driver_data(dev);
+       if (!var_info->mci_removed) {
+               ret = msm_sdc_mci_init(prv);
+               if (ret)
+                       return ret;
+       }
+
+       if (!var_info->mci_removed)
+               core_version = readl(prv->base + SDCC_MCI_VERSION);
+       else
+               core_version = readl(host->ioaddr + SDCC_V5_VERSION);
+
+       core_major = (core_version & SDCC_VERSION_MAJOR_MASK);
+       core_major >>= SDCC_VERSION_MAJOR_SHIFT;
+
+       core_minor = core_version & SDCC_VERSION_MINOR_MASK;
 
        /*
         * Support for some capabilities is not advertised by newer
@@ -161,9 +180,13 @@ static int msm_sdc_probe(struct udevice *dev)
 static int msm_sdc_remove(struct udevice *dev)
 {
        struct msm_sdhc *priv = dev_get_priv(dev);
+       const struct msm_sdhc_variant_info *var_info;
+
+       var_info = (void *)dev_get_driver_data(dev);
 
-        /* Disable host-controller mode */
-       writel(0, priv->base + SDCC_MCI_HC_MODE);
+       /* Disable host-controller mode */
+       if (!var_info->mci_removed)
+               writel(0, priv->base + SDCC_MCI_HC_MODE);
 
        return 0;
 }
@@ -195,8 +218,17 @@ static int msm_sdc_bind(struct udevice *dev)
        return sdhci_bind(dev, &plat->mmc, &plat->cfg);
 }
 
+static const struct msm_sdhc_variant_info msm_sdhc_mci_var = {
+       .mci_removed = false,
+};
+
+static const struct msm_sdhc_variant_info msm_sdhc_v5_var = {
+       .mci_removed = true,
+};
+
 static const struct udevice_id msm_mmc_ids[] = {
-       { .compatible = "qcom,sdhci-msm-v4" },
+       { .compatible = "qcom,sdhci-msm-v4", .data = (ulong)&msm_sdhc_mci_var },
+       { .compatible = "qcom,sdhci-msm-v5", .data = (ulong)&msm_sdhc_v5_var },
        { }
 };
 
--
Quoted 2 lines

2.25.1

author
#13 lore raw

PATCH v2 7/9 pinctrl: qcom: Add pinctrl driver for QCS404 SoC

In reply to Sumit Garg

Currently this pinctrl driver only supports BLSP UART2 specific pin configuration.

---
 arch/arm/mach-snapdragon/Makefile             |  1 +
 arch/arm/mach-snapdragon/pinctrl-qcs404.c     | 55 +++++++++++++++++++
 arch/arm/mach-snapdragon/pinctrl-snapdragon.c |  1 +
 arch/arm/mach-snapdragon/pinctrl-snapdragon.h |  1 +
 4 files changed, 58 insertions(+)
 create mode 100644 arch/arm/mach-snapdragon/pinctrl-qcs404.c
arch/arm/mach-snapdragon/Makefile +1 -0
index 962855eb8c..cb8c1aa8d2 100644
@@ -15,4 +15,5 @@ obj-y += dram.o
 obj-y += pinctrl-snapdragon.o
 obj-y += pinctrl-apq8016.o
 obj-y += pinctrl-apq8096.o
+obj-y += pinctrl-qcs404.o
 obj-$(CONFIG_SDM845) += pinctrl-sdm845.o
arch/arm/mach-snapdragon/pinctrl-qcs404.c new file +55 -0

55 lines not on this page · raw message

arch/arm/mach-snapdragon/pinctrl-snapdragon.c +1 -0
index d1c560dd40..c2148a5d0a 100644
@@ -119,6 +119,7 @@ static const struct udevice_id msm_pinctrl_ids[] = {
 #ifdef CONFIG_SDM845
 	{ .compatible = "qcom,tlmm-sdm845", .data = (ulong)&sdm845_data },
 #endif
+	{ .compatible = "qcom,tlmm-qcs404", .data = (ulong)&qcs404_data },
 	{ }
 };
 
arch/arm/mach-snapdragon/pinctrl-snapdragon.h +1 -0
index ea524312a0..178ee01a41 100644
@@ -28,5 +28,6 @@ struct pinctrl_function {
 extern struct msm_pinctrl_data apq8016_data;
 extern struct msm_pinctrl_data apq8096_data;
 extern struct msm_pinctrl_data sdm845_data;
+extern struct msm_pinctrl_data qcs404_data;
 
 #endif
Signature · 1 line
2.25.1
Reviewed-by on v2 7/9
#14 lore raw

Re: [PATCH v2 7/9] pinctrl: qcom: Add pinctrl driver for QCS404 SoC

Quoted 108 lines · Sumit Garg

Currently this pinctrl driver only supports BLSP UART2 specific pin configuration.

---
 arch/arm/mach-snapdragon/Makefile             |  1 +
 arch/arm/mach-snapdragon/pinctrl-qcs404.c     | 55 +++++++++++++++++++
 arch/arm/mach-snapdragon/pinctrl-snapdragon.c |  1 +
 arch/arm/mach-snapdragon/pinctrl-snapdragon.h |  1 +
 4 files changed, 58 insertions(+)
 create mode 100644 arch/arm/mach-snapdragon/pinctrl-qcs404.c
arch/arm/mach-snapdragon/Makefile +1 -0
index 962855eb8c..cb8c1aa8d2 100644
@@ -15,4 +15,5 @@ obj-y += dram.o
 obj-y += pinctrl-snapdragon.o
 obj-y += pinctrl-apq8016.o
 obj-y += pinctrl-apq8096.o
+obj-y += pinctrl-qcs404.o
 obj-$(CONFIG_SDM845) += pinctrl-sdm845.o
arch/arm/mach-snapdragon/pinctrl-qcs404.c new file +55 -0
new file mode 100644
index 0000000000..889ead0f57
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Qualcomm QCS404 pinctrl
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+#include "pinctrl-snapdragon.h"
+#include <common.h>
+
+#define MAX_PIN_NAME_LEN 32
+static char pin_name[MAX_PIN_NAME_LEN] __section(".data");
+static const char * const msm_pinctrl_pins[] = {
+       "SDC1_RCLK",
+       "SDC1_CLK",
+       "SDC1_CMD",
+       "SDC1_DATA",
+       "SDC2_CLK",
+       "SDC2_CMD",
+       "SDC2_DATA",
+};
+
+static const struct pinctrl_function msm_pinctrl_functions[] = {
+       {"blsp_uart2", 1},
+};
+
+static const char *qcs404_get_function_name(struct udevice *dev,
+                                           unsigned int selector)
+{
+       return msm_pinctrl_functions[selector].name;
+}
+
+static const char *qcs404_get_pin_name(struct udevice *dev,
+                                      unsigned int selector)
+{
+       if (selector < 120) {
+               snprintf(pin_name, MAX_PIN_NAME_LEN, "GPIO_%u", selector);
+               return pin_name;
+       } else {
+               return msm_pinctrl_pins[selector - 120];
+       }
+}
+
+static unsigned int qcs404_get_function_mux(unsigned int selector)
+{
+       return msm_pinctrl_functions[selector].val;
+}
+
+struct msm_pinctrl_data qcs404_data = {
+       .pin_count = 126,
+       .functions_count = ARRAY_SIZE(msm_pinctrl_functions),
+       .get_function_name = qcs404_get_function_name,
+       .get_function_mux = qcs404_get_function_mux,
+       .get_pin_name = qcs404_get_pin_name,
+};
arch/arm/mach-snapdragon/pinctrl-snapdragon.c +1 -0
index d1c560dd40..c2148a5d0a 100644
@@ -119,6 +119,7 @@ static const struct udevice_id msm_pinctrl_ids[] = {
 #ifdef CONFIG_SDM845
        { .compatible = "qcom,tlmm-sdm845", .data = (ulong)&sdm845_data },
 #endif
+       { .compatible = "qcom,tlmm-qcs404", .data = (ulong)&qcs404_data },
        { }
 };
 
arch/arm/mach-snapdragon/pinctrl-snapdragon.h +1 -1
index ea524312a0..178ee01a41 100644
@@ -28,5 +28,6 @@ struct pinctrl_function {
 extern struct msm_pinctrl_data apq8016_data;
 extern struct msm_pinctrl_data apq8096_data;
 extern struct msm_pinctrl_data sdm845_data;
+extern struct msm_pinctrl_data qcs404_data;
 
 #endif
--
Quoted 2 lines

2.25.1

author
#15 lore raw

PATCH v2 8/9 clocks: qcom: Add clock driver for QCS404 SoC

In reply to Sumit Garg

Currently its a dummy clock driver as clocks for UART and eMMC have been already enabled by ABL. Along with this import "qcom,gcc-qcs404.h" header from Linux mainline to support DT bindings.

---
 arch/arm/mach-snapdragon/clock-qcs404.c     |  30 ++++
 arch/arm/mach-snapdragon/clock-snapdragon.c |   1 +
 include/dt-bindings/clock/qcom,gcc-qcs404.h | 180 ++++++++++++++++++++
 3 files changed, 211 insertions(+)
 create mode 100644 arch/arm/mach-snapdragon/clock-qcs404.c
 create mode 100644 include/dt-bindings/clock/qcom,gcc-qcs404.h
arch/arm/mach-snapdragon/clock-qcs404.c new file +30 -0
new file mode 100644
index 0000000000..0471adf0ba
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Clock drivers for Qualcomm QCS404
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+#include <common.h>
+#include <clk-uclass.h>
+#include <dm.h>
+#include <errno.h>
+#include <asm/io.h>
+#include <linux/bitops.h>
+#include "clock-snapdragon.h"
+
+#include <dt-bindings/clock/qcom,gcc-qcs404.h>
+
+ulong msm_set_rate(struct clk *clk, ulong rate)
+{
+	switch (clk->id) {
+	default:
+		/*
+		 * Clocks for UART and eMMC enabled in u-boot are already
+		 * initialized by ABL. In case any peripheral requires special
+		 * clock handling then that should be handled as a separate
+		 * case above.
+		 */
+		return 0;
+	}
+}
arch/arm/mach-snapdragon/clock-snapdragon.c +1 -0
index 3deb08ac4a..5652d2fa36 100644
@@ -136,6 +136,7 @@ static const struct udevice_id msm_clk_ids[] = {
 	{ .compatible = "qcom,gcc-msm8996" },
 	{ .compatible = "qcom,gcc-apq8096" },
 	{ .compatible = "qcom,gcc-sdm845" },
+	{ .compatible = "qcom,gcc-qcs404" },
 	{ }
 };
 
include/dt-bindings/clock/qcom,gcc-qcs404.h new file +180 -0

180 lines not on this page · raw message

Signature · 1 line
2.25.1
#16 lore raw

Re: [PATCH v2 8/9] clocks: qcom: Add clock driver for QCS404 SoC

Quoted 4 lines · Sumit Garg

Currently its a dummy clock driver as clocks for UART and eMMC have been already enabled by ABL. Along with this import "qcom,gcc-qcs404.h" header from Linux mainline to support DT bindings.

I think it's better to initialize the clocks also here, this will allow the u-boot to be used
instead of ABL. If it's a simple clock configuration, it's not a problem to re-init it after ABL already did.

author
#17 lore raw

Re: [PATCH v2 8/9] clocks: qcom: Add clock driver for QCS404 SoC

Hi Ramon,

Thanks for your review.

Quoted 9 lines · Ramon Fried
Quoted 4 lines · Sumit Garg

Currently its a dummy clock driver as clocks for UART and eMMC have been already enabled by ABL. Along with this import "qcom,gcc-qcs404.h" header from Linux mainline to support DT bindings.

I think it's better to initialize the clocks also here, this will allow the u-boot to be used
instead of ABL.

Actually, ABL is just an EFI application that is dependent on the EFI API exposed from XBL which is essentially an edk2 based implementation. The XBL source code is proprietary and its a signed locked down bootloader which isn't replaceable. Although it may be possible to run u-boot as an EFI application in the future then it could be a replacement for ABL but still for driver backends it will rely on XBL exposed EFI API.

Quoted 2 lines

If it's a simple clock configuration, it's not a
problem to re-init it after ABL already did.

Yeah it's simple enough configuration to be done but earlier I was looking for a use-case. So nevertheless it's better for clarity at least that we aren't relying on a blackbox implementation underneath. I will add it in the next version.

-Sumit

author
#18 lore raw

PATCH v2 9/9 board: qualcomm: Add support for QCS404 EVB

In reply to Sumit Garg

Add support for Qualcomm QCS404 SoC based evaluation board.

Features:
- Qualcomm Snapdragon QCS404 SoC
- 1GiB RAM
- 8GiB eMMC, uSD slot

U-boot is chain loaded by ABL in 64-bit mode as part of boot.img. For detailed build and boot instructions, refer to doc/board/qualcomm/qcs404.rst.

---
 arch/arm/dts/Makefile                         |  1 +
 arch/arm/dts/qcs404-evb-uboot.dtsi            | 24 ++++++
 arch/arm/dts/qcs404-evb.dts                   | 81 +++++++++++++++++++
 arch/arm/mach-snapdragon/Kconfig              | 11 +++
 arch/arm/mach-snapdragon/Makefile             |  2 +
 .../include/mach/sysmap-qcs404.h              | 13 +++
 arch/arm/mach-snapdragon/sysmap-qcs404.c      | 31 +++++++
 board/qualcomm/qcs404-evb/Kconfig             | 15 ++++
 board/qualcomm/qcs404-evb/MAINTAINERS         |  6 ++
 board/qualcomm/qcs404-evb/Makefile            |  6 ++
 board/qualcomm/qcs404-evb/qcs404-evb.c        | 33 ++++++++
 board/qualcomm/qcs404-evb/qcs404-evb.its      | 64 +++++++++++++++
 configs/qcs404evb_defconfig                   | 39 +++++++++
 doc/board/qualcomm/index.rst                  |  1 +
 doc/board/qualcomm/qcs404.rst                 | 79 ++++++++++++++++++
 include/configs/qcs404-evb.h                  | 27 +++++++
 16 files changed, 433 insertions(+)
 create mode 100644 arch/arm/dts/qcs404-evb-uboot.dtsi
 create mode 100644 arch/arm/dts/qcs404-evb.dts
 create mode 100644 arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h
 create mode 100644 arch/arm/mach-snapdragon/sysmap-qcs404.c
 create mode 100644 board/qualcomm/qcs404-evb/Kconfig
 create mode 100644 board/qualcomm/qcs404-evb/MAINTAINERS
 create mode 100644 board/qualcomm/qcs404-evb/Makefile
 create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.c
 create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.its
 create mode 100644 configs/qcs404evb_defconfig
 create mode 100644 doc/board/qualcomm/qcs404.rst
 create mode 100644 include/configs/qcs404-evb.h
arch/arm/dts/Makefile +1 -0
index a7e0d9f6c0..a561b28cef 100644
@@ -502,6 +502,7 @@ dtb-$(CONFIG_TARGET_TEN64) += fsl-ls1088a-ten64.dtb
 dtb-$(CONFIG_TARGET_DRAGONBOARD410C) += dragonboard410c.dtb
 dtb-$(CONFIG_TARGET_DRAGONBOARD820C) += dragonboard820c.dtb
 dtb-$(CONFIG_TARGET_STARQLTECHN) += starqltechn.dtb
+dtb-$(CONFIG_TARGET_QCS404EVB) += qcs404-evb.dtb
 
 dtb-$(CONFIG_TARGET_STEMMY) += ste-ux500-samsung-stemmy.dtb
 
arch/arm/dts/qcs404-evb-uboot.dtsi new file +24 -0
new file mode 100644
index 0000000000..c18080a483
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * U-Boot addition to handle QCS404 EVB pre-relocation devices
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+/ {
+	soc {
+		u-boot,dm-pre-reloc;
+
+		pinctrl_north@1300000 {
+			u-boot,dm-pre-reloc;
+		};
+
+		clock-controller@1800000 {
+			u-boot,dm-pre-reloc;
+		};
+
+		serial@78b1000 {
+			u-boot,dm-pre-reloc;
+		};
+	};
+};
arch/arm/dts/qcs404-evb.dts new file +81 -0

81 lines not on this page · raw message

arch/arm/mach-snapdragon/Kconfig +11 -0
index cb53dc8901..0927333306 100644
@@ -69,11 +69,22 @@ config TARGET_STARQLTECHN
 	select SDM845
 	select DM_ETH if NET
 
+config TARGET_QCS404EVB
+	bool "Qualcomm Technologies, Inc. QCS404 EVB"
+	select LINUX_KERNEL_IMAGE_HEADER
+	help
+	  Support for Qualcomm Technologies, Inc. QCS404 evaluation board.
+	  Features:
+	  - Qualcomm Snapdragon QCS404 SoC
+	  - 1GiB RAM
+	  - 8GiB eMMC, uSD slot
+
 endchoice
 
 source "board/qualcomm/dragonboard410c/Kconfig"
 source "board/qualcomm/dragonboard820c/Kconfig"
 source "board/qualcomm/dragonboard845c/Kconfig"
 source "board/samsung/starqltechn/Kconfig"
+source "board/qualcomm/qcs404-evb/Kconfig"
 
 endif
arch/arm/mach-snapdragon/Makefile +2 -0
index cb8c1aa8d2..0d31f10f68 100644
@@ -17,3 +17,5 @@ obj-y += pinctrl-apq8016.o
 obj-y += pinctrl-apq8096.o
 obj-y += pinctrl-qcs404.o
 obj-$(CONFIG_SDM845) += pinctrl-sdm845.o
+obj-$(CONFIG_TARGET_QCS404EVB) += clock-qcs404.o
+obj-$(CONFIG_TARGET_QCS404EVB) += sysmap-qcs404.o
arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h new file +13 -0
new file mode 100644
index 0000000000..c495f43a6b
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Qualcomm QCS404 sysmap
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+#ifndef _MACH_SYSMAP_QCS404_H
+#define _MACH_SYSMAP_QCS404_H
+
+#define GICD_BASE			(0x0b000000)
+#define GICC_BASE			(0x0b002000)
+
+#endif
arch/arm/mach-snapdragon/sysmap-qcs404.c new file +31 -0
new file mode 100644
index 0000000000..b7409031a0
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Qualcomm QCS404 memory map
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+#include <common.h>
+#include <asm/armv8/mmu.h>
+
+static struct mm_region qcs404_mem_map[] = {
+	{
+		.virt = 0x0UL, /* Peripheral block */
+		.phys = 0x0UL, /* Peripheral block */
+		.size = 0x8000000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+			 PTE_BLOCK_NON_SHARE |
+			 PTE_BLOCK_PXN | PTE_BLOCK_UXN
+	}, {
+		.virt = 0x80000000UL, /* DDR */
+		.phys = 0x80000000UL, /* DDR */
+		.size = 0x40000000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+			 PTE_BLOCK_INNER_SHARE
+	}, {
+		/* List terminator */
+		0,
+	}
+};
+
+struct mm_region *mem_map = qcs404_mem_map;
board/qualcomm/qcs404-evb/Kconfig new file +15 -0
new file mode 100644
index 0000000000..32657c7d5e
@@ -0,0 +1,15 @@
+if TARGET_QCS404EVB
+
+config SYS_BOARD
+	default "qcs404-evb"
+
+config SYS_VENDOR
+	default "qualcomm"
+
+config SYS_SOC
+	default "qcs404"
+
+config SYS_CONFIG_NAME
+	default "qcs404-evb"
+
+endif
board/qualcomm/qcs404-evb/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000..0a2e194ff6
@@ -0,0 +1,6 @@
+Qualcomm Technologies, Inc. QCS404 evaluation board
+M:	Sumit Garg <[email protected]>
+S:	Maintained
+F:	board/qualcomm/qcs404-evb/
+F:	include/configs/qcs404-evb.h
+F:	configs/qcs404evb_defconfig
board/qualcomm/qcs404-evb/Makefile new file +6 -0
new file mode 100644
index 0000000000..4665827e08
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2022 Sumit Garg <[email protected]>
+#
+
+obj-y += qcs404-evb.o
board/qualcomm/qcs404-evb/qcs404-evb.c new file +33 -0
new file mode 100644
index 0000000000..f1e6e7f7eb
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Board init file for QCS404-EVB
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+#include <common.h>
+#include <cpu_func.h>
+#include <dm.h>
+#include <env.h>
+#include <init.h>
+#include <asm/cache.h>
+#include <asm/global_data.h>
+#include <fdt_support.h>
+#include <asm/arch/dram.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+	return fdtdec_setup_mem_size_base();
+}
+
+int board_init(void)
+{
+	return 0;
+}
+
+void reset_cpu(void)
+{
+	psci_system_reset();
+}
board/qualcomm/qcs404-evb/qcs404-evb.its new file +64 -0

64 lines not on this page · raw message

configs/qcs404evb_defconfig new file +39 -0
new file mode 100644
index 0000000000..7c76e8353e
@@ -0,0 +1,39 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_COUNTER_FREQUENCY=19000000
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_SNAPDRAGON=y
+CONFIG_DEFAULT_DEVICE_TREE="qcs404-evb"
+CONFIG_TARGET_QCS404EVB=y
+CONFIG_IDENT_STRING="\nQualcomm QCS404-EVB"
+CONFIG_SYS_TEXT_BASE=0x0
+CONFIG_SYS_LOAD_ADDR=0x80000000
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_BOOTDELAY=5
+CONFIG_SAVE_PREV_BL_FDT_ADDR=y
+CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_BMP=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+# CONFIG_NET is not set
+CONFIG_CLK=y
+CONFIG_PINCTRL=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ADMA=y
+CONFIG_MMC_SDHCI_MSM=y
+CONFIG_MMC_HS400_SUPPORT=y
+CONFIG_MSM_SERIAL=y
+CONFIG_LMB_MAX_REGIONS=64
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="earlycon ignore_loglevel root= clk_ignore_unused"
doc/board/qualcomm/index.rst +1 -0
index 10b98214e9..0f9c429956 100644
@@ -8,3 +8,4 @@ Qualcomm
 
    dragonboard410c
    sdm845
+   qcs404
doc/board/qualcomm/qcs404.rst new file +79 -0

79 lines not on this page · raw message

include/configs/qcs404-evb.h new file +27 -0
new file mode 100644
index 0000000000..a7f645b613
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration file for QCS404 evaluation board
+ *
+ * (C) Copyright 2022 Sumit Garg <[email protected]>
+ */
+
+#ifndef __CONFIGS_QCS404EVB_H
+#define __CONFIGS_QCS404EVB_H
+
+#include <linux/sizes.h>
+#include <asm/arch/sysmap-qcs404.h>
+
+#define CONFIG_SYS_BAUDRATE_TABLE	{ 115200, 230400, 460800, 921600 }
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"bootm_size=0x5000000\0"	\
+	"bootm_low=0x80000000\0"	\
+	"bootcmd=bootm $prevbl_initrd_start_addr\0"
+
+#define CONFIG_SYS_BOOTM_LEN	SZ_64M
+
+/* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE	512
+#define CONFIG_SYS_MAXARGS	64
+
+#endif
Signature · 1 line
2.25.1
#19 lore raw
In reply to Sumit Garg
Quoted 8 lines · Sumit Garg

Add support for two new boards db845c and qcs404-evb:
- db845c is a 96boards compliant platform aka RB3 based on Qualcomm SDM845 SoC.
- qcs404-evb is an evaluation board from Qualcomm based on QCS404 SoC.

Both these platforms have one thing in common that u-boot is chain-loaded in 64-bit mode via Android Boot Loader (ABL) which is an EFI application. For further details on chain-loading refer to platform specific

Just curious about the flow:
ABL(an EFI applicaiton)->load U-Boot->start U-Boot? or you mean U-Boot run as EFI application?

THanks,
Peng.

Quoted 85 lines

documentation:
- doc/board/qualcomm/sdm845.rst
- doc/board/qualcomm/qcs404.rst

Changes in v2:
- Added patch #1 to fix DT node overrides in starqltechn-uboot.dtsi.
- Updated patch #2 commit description.
- Fixed a typo (s/96Board/96Boards/) in patch #5.

Sumit Garg (9):
board: starqltechn: Align DT node overrides with sdm845.dtsi
arm64: dts: sdm845: Remove redundant u-boot DT properties
clocks: sdm845: Import qcom,gcc-sdm845.h
uart: sdm845: Fix debug UART pinmux
board: qualcomm: Add support for dragonboard845c
mmc: msm_sdhci: Add SDCC version 5.0.0 support
pinctrl: qcom: Add pinctrl driver for QCS404 SoC
clocks: qcom: Add clock driver for QCS404 SoC
board: qualcomm: Add support for QCS404 EVB

  arch/arm/dts/Makefile                         |   1 +
  arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++
  arch/arm/dts/dragonboard845c.dts              |  44 ++++
  arch/arm/dts/qcs404-evb-uboot.dtsi            |  24 ++
  arch/arm/dts/qcs404-evb.dts                   |  81 ++++++
  arch/arm/dts/sdm845.dtsi                      |   8 +-
  arch/arm/dts/starqltechn-uboot.dtsi           |  18 +-
  arch/arm/dts/starqltechn.dts                  |   2 +-
  arch/arm/mach-snapdragon/Kconfig              |  25 ++
  arch/arm/mach-snapdragon/Makefile             |   3 +
  arch/arm/mach-snapdragon/clock-qcs404.c       |  30 +++
  arch/arm/mach-snapdragon/clock-sdm845.c       |   3 +-
  arch/arm/mach-snapdragon/clock-snapdragon.c   |   1 +
  .../include/mach/sysmap-qcs404.h              |  13 +
  arch/arm/mach-snapdragon/pinctrl-qcs404.c     |  55 ++++
  arch/arm/mach-snapdragon/pinctrl-snapdragon.c |   1 +
  arch/arm/mach-snapdragon/pinctrl-snapdragon.h |   1 +
  arch/arm/mach-snapdragon/sysmap-qcs404.c      |  31 +++
  board/qualcomm/dragonboard845c/Kconfig        |  12 +
  board/qualcomm/dragonboard845c/MAINTAINERS    |   6 +
  board/qualcomm/dragonboard845c/Makefile       |   9 +
  board/qualcomm/dragonboard845c/db845c.its     |  63 +++++
  .../dragonboard845c/dragonboard845c.c         |   9 +
  board/qualcomm/qcs404-evb/Kconfig             |  15 ++
  board/qualcomm/qcs404-evb/MAINTAINERS         |   6 +
  board/qualcomm/qcs404-evb/Makefile            |   6 +
  board/qualcomm/qcs404-evb/qcs404-evb.c        |  33 +++
  board/qualcomm/qcs404-evb/qcs404-evb.its      |  64 +++++
  configs/dragonboard845c_defconfig             |  28 ++
  configs/qcs404evb_defconfig                   |  39 +++
  doc/board/qualcomm/index.rst                  |   1 +
  doc/board/qualcomm/qcs404.rst                 |  79 ++++++
  doc/board/qualcomm/sdm845.rst                 | 100 ++++++-
  drivers/mmc/msm_sdhci.c                       |  96 ++++---
  include/configs/dragonboard845c.h             |  28 ++
  include/configs/qcs404-evb.h                  |  27 ++
  include/dt-bindings/clock/qcom,gcc-qcs404.h   | 180 +++++++++++++
  include/dt-bindings/clock/qcom,gcc-sdm845.h   | 246 ++++++++++++++++++
  38 files changed, 1363 insertions(+), 62 deletions(-)

create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi create mode 100644 arch/arm/dts/dragonboard845c.dts
create mode 100644 arch/arm/dts/qcs404-evb-uboot.dtsi
create mode 100644 arch/arm/dts/qcs404-evb.dts
create mode 100644 arch/arm/mach-snapdragon/clock-qcs404.c create mode 100644 arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h create mode 100644 arch/arm/mach-snapdragon/pinctrl-qcs404.c create mode 100644 arch/arm/mach-snapdragon/sysmap-qcs404.c create mode 100644 board/qualcomm/dragonboard845c/Kconfig create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS create mode 100644 board/qualcomm/dragonboard845c/Makefile create mode 100644 board/qualcomm/dragonboard845c/db845c.its create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c create mode 100644 board/qualcomm/qcs404-evb/Kconfig
create mode 100644 board/qualcomm/qcs404-evb/MAINTAINERS create mode 100644 board/qualcomm/qcs404-evb/Makefile
create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.c create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.its create mode 100644 configs/dragonboard845c_defconfig
create mode 100644 configs/qcs404evb_defconfig
create mode 100644 doc/board/qualcomm/qcs404.rst
create mode 100644 include/configs/dragonboard845c.h
create mode 100644 include/configs/qcs404-evb.h
create mode 100644 include/dt-bindings/clock/qcom,gcc-qcs404.h create mode 100644 include/dt-bindings/clock/qcom,gcc-sdm845.h

author
#20 lore raw

Hi Peng,

Quoted 9 lines · Peng Fan
Quoted 5 lines · Sumit Garg

Add support for two new boards db845c and qcs404-evb:
- db845c is a 96boards compliant platform aka RB3 based on Qualcomm SDM845 SoC.
- qcs404-evb is an evaluation board from Qualcomm based on QCS404 SoC.

Quoted 8 lines
Quoted 3 lines

Both these platforms have one thing in common that u-boot is chain-loaded in 64-bit mode via Android Boot Loader (ABL) which is an EFI application. For further details on chain-loading refer to platform specific

Just curious about the flow:
ABL(an EFI applicaiton)->load U-Boot->start U-Boot? or you mean U-Boot run as EFI application?

Here you can think of u-boot as just a replacement of the kernel image within the boot.img. U-boot already has a provision for LINUX_KERNEL_IMAGE_HEADER [1] which makes it look like a kernel image. Boot chain:

XBL (edk2 proprietary source code) -> ABL(an EFI applicaiton) -> U-boot (part of boot.img as a replacement of kernel) -> FIT image (part of boot.img as a replacement of ramdisk)

Also, the final stage is configurable as u-boot allows interactions with various media (eMMC, USB (WIP), network (WIP) etc.)

[1] https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/Kconfig#L82

-Sumit

Quoted 88 lines

THanks,
Peng.

Quoted 85 lines

documentation:
- doc/board/qualcomm/sdm845.rst
- doc/board/qualcomm/qcs404.rst

Changes in v2:
- Added patch #1 to fix DT node overrides in starqltechn-uboot.dtsi.
- Updated patch #2 commit description.
- Fixed a typo (s/96Board/96Boards/) in patch #5.

Sumit Garg (9):
board: starqltechn: Align DT node overrides with sdm845.dtsi
arm64: dts: sdm845: Remove redundant u-boot DT properties
clocks: sdm845: Import qcom,gcc-sdm845.h
uart: sdm845: Fix debug UART pinmux
board: qualcomm: Add support for dragonboard845c
mmc: msm_sdhci: Add SDCC version 5.0.0 support
pinctrl: qcom: Add pinctrl driver for QCS404 SoC
clocks: qcom: Add clock driver for QCS404 SoC
board: qualcomm: Add support for QCS404 EVB

  arch/arm/dts/Makefile                         |   1 +
  arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++
  arch/arm/dts/dragonboard845c.dts              |  44 ++++
  arch/arm/dts/qcs404-evb-uboot.dtsi            |  24 ++
  arch/arm/dts/qcs404-evb.dts                   |  81 ++++++
  arch/arm/dts/sdm845.dtsi                      |   8 +-
  arch/arm/dts/starqltechn-uboot.dtsi           |  18 +-
  arch/arm/dts/starqltechn.dts                  |   2 +-
  arch/arm/mach-snapdragon/Kconfig              |  25 ++
  arch/arm/mach-snapdragon/Makefile             |   3 +
  arch/arm/mach-snapdragon/clock-qcs404.c       |  30 +++
  arch/arm/mach-snapdragon/clock-sdm845.c       |   3 +-
  arch/arm/mach-snapdragon/clock-snapdragon.c   |   1 +
  .../include/mach/sysmap-qcs404.h              |  13 +
  arch/arm/mach-snapdragon/pinctrl-qcs404.c     |  55 ++++
  arch/arm/mach-snapdragon/pinctrl-snapdragon.c |   1 +
  arch/arm/mach-snapdragon/pinctrl-snapdragon.h |   1 +
  arch/arm/mach-snapdragon/sysmap-qcs404.c      |  31 +++
  board/qualcomm/dragonboard845c/Kconfig        |  12 +
  board/qualcomm/dragonboard845c/MAINTAINERS    |   6 +
  board/qualcomm/dragonboard845c/Makefile       |   9 +
  board/qualcomm/dragonboard845c/db845c.its     |  63 +++++
  .../dragonboard845c/dragonboard845c.c         |   9 +
  board/qualcomm/qcs404-evb/Kconfig             |  15 ++
  board/qualcomm/qcs404-evb/MAINTAINERS         |   6 +
  board/qualcomm/qcs404-evb/Makefile            |   6 +
  board/qualcomm/qcs404-evb/qcs404-evb.c        |  33 +++
  board/qualcomm/qcs404-evb/qcs404-evb.its      |  64 +++++
  configs/dragonboard845c_defconfig             |  28 ++
  configs/qcs404evb_defconfig                   |  39 +++
  doc/board/qualcomm/index.rst                  |   1 +
  doc/board/qualcomm/qcs404.rst                 |  79 ++++++
  doc/board/qualcomm/sdm845.rst                 | 100 ++++++-
  drivers/mmc/msm_sdhci.c                       |  96 ++++---
  include/configs/dragonboard845c.h             |  28 ++
  include/configs/qcs404-evb.h                  |  27 ++
  include/dt-bindings/clock/qcom,gcc-qcs404.h   | 180 +++++++++++++
  include/dt-bindings/clock/qcom,gcc-sdm845.h   | 246 ++++++++++++++++++
  38 files changed, 1363 insertions(+), 62 deletions(-)

create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi create mode 100644 arch/arm/dts/dragonboard845c.dts
create mode 100644 arch/arm/dts/qcs404-evb-uboot.dtsi
create mode 100644 arch/arm/dts/qcs404-evb.dts
create mode 100644 arch/arm/mach-snapdragon/clock-qcs404.c create mode 100644 arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h create mode 100644 arch/arm/mach-snapdragon/pinctrl-qcs404.c create mode 100644 arch/arm/mach-snapdragon/sysmap-qcs404.c create mode 100644 board/qualcomm/dragonboard845c/Kconfig create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS create mode 100644 board/qualcomm/dragonboard845c/Makefile create mode 100644 board/qualcomm/dragonboard845c/db845c.its create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c create mode 100644 board/qualcomm/qcs404-evb/Kconfig
create mode 100644 board/qualcomm/qcs404-evb/MAINTAINERS create mode 100644 board/qualcomm/qcs404-evb/Makefile
create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.c create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.its create mode 100644 configs/dragonboard845c_defconfig
create mode 100644 configs/qcs404evb_defconfig
create mode 100644 doc/board/qualcomm/qcs404.rst
create mode 100644 include/configs/dragonboard845c.h
create mode 100644 include/configs/qcs404-evb.h
create mode 100644 include/dt-bindings/clock/qcom,gcc-qcs404.h create mode 100644 include/dt-bindings/clock/qcom,gcc-sdm845.h

#21 lore raw
Quoted 21 lines · Sumit Garg

Hi Peng,

Quoted 9 lines · Peng Fan
Quoted 5 lines · Sumit Garg

Add support for two new boards db845c and qcs404-evb:
- db845c is a 96boards compliant platform aka RB3 based on Qualcomm

    SDM845 SoC.

- qcs404-evb is an evaluation board from Qualcomm based on QCS404 SoC.

Quoted 8 lines
Quoted 3 lines

Both these platforms have one thing in common that u-boot is chain-loaded in 64-bit mode via Android Boot Loader (ABL) which is an EFI application. For further details on chain-loading refer to platform specific

Just curious about the flow:
ABL(an EFI applicaiton)->load U-Boot->start U-Boot? or you mean U-Boot run as EFI application?

Quoted 8 lines

Here you can think of u-boot as just a replacement of the kernel image within the boot.img. U-boot already has a provision for LINUX_KERNEL_IMAGE_HEADER [1] which makes it look like a kernel image. Boot chain:

XBL (edk2 proprietary source code) -> ABL(an EFI applicaiton) -> U-boot (part of boot.img as a replacement of kernel) -> FIT image (part of boot.img as a replacement of ramdisk)

Oh. This is complicated boot flow. Just guess this is easy to support Windows ARM and Android both.

Quoted 3 lines

Also, the final stage is configurable as u-boot allows interactions with various media (eMMC, USB (WIP), network (WIP) etc.)

U-Boot through XBL to access the various media or directly access. I guess it is as U-Boot runs as EFI application, through XBL to access the various media.

Thanks,
Peng.

Quoted 93 lines

[1] https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/Kconfig#L82

-Sumit

Quoted 88 lines

THanks,
Peng.

Quoted 85 lines

documentation:
- doc/board/qualcomm/sdm845.rst
- doc/board/qualcomm/qcs404.rst

Changes in v2:
- Added patch #1 to fix DT node overrides in starqltechn-uboot.dtsi.
- Updated patch #2 commit description.
- Fixed a typo (s/96Board/96Boards/) in patch #5.

Sumit Garg (9):
board: starqltechn: Align DT node overrides with sdm845.dtsi
arm64: dts: sdm845: Remove redundant u-boot DT properties
clocks: sdm845: Import qcom,gcc-sdm845.h
uart: sdm845: Fix debug UART pinmux
board: qualcomm: Add support for dragonboard845c
mmc: msm_sdhci: Add SDCC version 5.0.0 support
pinctrl: qcom: Add pinctrl driver for QCS404 SoC
clocks: qcom: Add clock driver for QCS404 SoC
board: qualcomm: Add support for QCS404 EVB

   arch/arm/dts/Makefile                         |   1 +
   arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++
   arch/arm/dts/dragonboard845c.dts              |  44 ++++
   arch/arm/dts/qcs404-evb-uboot.dtsi            |  24 ++
   arch/arm/dts/qcs404-evb.dts                   |  81 ++++++
   arch/arm/dts/sdm845.dtsi                      |   8 +-
   arch/arm/dts/starqltechn-uboot.dtsi           |  18 +-
   arch/arm/dts/starqltechn.dts                  |   2 +-
   arch/arm/mach-snapdragon/Kconfig              |  25 ++
   arch/arm/mach-snapdragon/Makefile             |   3 +
   arch/arm/mach-snapdragon/clock-qcs404.c       |  30 +++
   arch/arm/mach-snapdragon/clock-sdm845.c       |   3 +-
   arch/arm/mach-snapdragon/clock-snapdragon.c   |   1 +
   .../include/mach/sysmap-qcs404.h              |  13 +
   arch/arm/mach-snapdragon/pinctrl-qcs404.c     |  55 ++++
   arch/arm/mach-snapdragon/pinctrl-snapdragon.c |   1 +
   arch/arm/mach-snapdragon/pinctrl-snapdragon.h |   1 +
   arch/arm/mach-snapdragon/sysmap-qcs404.c      |  31 +++
   board/qualcomm/dragonboard845c/Kconfig        |  12 +
   board/qualcomm/dragonboard845c/MAINTAINERS    |   6 +
   board/qualcomm/dragonboard845c/Makefile       |   9 +
   board/qualcomm/dragonboard845c/db845c.its     |  63 +++++
   .../dragonboard845c/dragonboard845c.c         |   9 +
   board/qualcomm/qcs404-evb/Kconfig             |  15 ++
   board/qualcomm/qcs404-evb/MAINTAINERS         |   6 +
   board/qualcomm/qcs404-evb/Makefile            |   6 +
   board/qualcomm/qcs404-evb/qcs404-evb.c        |  33 +++
   board/qualcomm/qcs404-evb/qcs404-evb.its      |  64 +++++
   configs/dragonboard845c_defconfig             |  28 ++
   configs/qcs404evb_defconfig                   |  39 +++
   doc/board/qualcomm/index.rst                  |   1 +
   doc/board/qualcomm/qcs404.rst                 |  79 ++++++
   doc/board/qualcomm/sdm845.rst                 | 100 ++++++-
   drivers/mmc/msm_sdhci.c                       |  96 ++++---
   include/configs/dragonboard845c.h             |  28 ++
   include/configs/qcs404-evb.h                  |  27 ++
   include/dt-bindings/clock/qcom,gcc-qcs404.h   | 180 +++++++++++++
   include/dt-bindings/clock/qcom,gcc-sdm845.h   | 246 ++++++++++++++++++
   38 files changed, 1363 insertions(+), 62 deletions(-)

create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi create mode 100644 arch/arm/dts/dragonboard845c.dts
create mode 100644 arch/arm/dts/qcs404-evb-uboot.dtsi
create mode 100644 arch/arm/dts/qcs404-evb.dts
create mode 100644 arch/arm/mach-snapdragon/clock-qcs404.c create mode 100644 arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h create mode 100644 arch/arm/mach-snapdragon/pinctrl-qcs404.c create mode 100644 arch/arm/mach-snapdragon/sysmap-qcs404.c create mode 100644 board/qualcomm/dragonboard845c/Kconfig create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS create mode 100644 board/qualcomm/dragonboard845c/Makefile create mode 100644 board/qualcomm/dragonboard845c/db845c.its create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c create mode 100644 board/qualcomm/qcs404-evb/Kconfig
create mode 100644 board/qualcomm/qcs404-evb/MAINTAINERS create mode 100644 board/qualcomm/qcs404-evb/Makefile
create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.c create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.its create mode 100644 configs/dragonboard845c_defconfig
create mode 100644 configs/qcs404evb_defconfig
create mode 100644 doc/board/qualcomm/qcs404.rst
create mode 100644 include/configs/dragonboard845c.h
create mode 100644 include/configs/qcs404-evb.h
create mode 100644 include/dt-bindings/clock/qcom,gcc-qcs404.h create mode 100644 include/dt-bindings/clock/qcom,gcc-sdm845.h

author
#22 lore raw
Quoted 30 lines · Peng Fan
Quoted 26 lines · Sumit Garg

Hi Peng,

Quoted 9 lines · Peng Fan
Quoted 5 lines · Sumit Garg

Add support for two new boards db845c and qcs404-evb:
- db845c is a 96boards compliant platform aka RB3 based on Qualcomm

    SDM845 SoC.

- qcs404-evb is an evaluation board from Qualcomm based on QCS404 SoC.

Quoted 8 lines
Quoted 3 lines

Both these platforms have one thing in common that u-boot is chain-loaded in 64-bit mode via Android Boot Loader (ABL) which is an EFI application. For further details on chain-loading refer to platform specific

Just curious about the flow:
ABL(an EFI applicaiton)->load U-Boot->start U-Boot? or you mean U-Boot run as EFI application?

Here you can think of u-boot as just a replacement of the kernel image within the boot.img. U-boot already has a provision for LINUX_KERNEL_IMAGE_HEADER [1] which makes it look like a kernel image. Boot chain:

Quoted 7 lines
Quoted 3 lines

XBL (edk2 proprietary source code) -> ABL(an EFI applicaiton) -> U-boot (part of boot.img as a replacement of kernel) -> FIT image (part of boot.img as a replacement of ramdisk)

Oh. This is complicated boot flow. Just guess this is easy to support Windows ARM and Android both.

Currently this u-boot port is targeted for embedded use-cases.

Quoted 7 lines
Quoted 3 lines

Also, the final stage is configurable as u-boot allows interactions with various media (eMMC, USB (WIP), network (WIP) etc.)

U-Boot through XBL to access the various media or directly access. I guess it is as U-Boot runs as EFI application, through XBL to access the various media.

No currently u-boot is loaded by ABL (EFI application). So it's a direct access to the various media.

-Sumit

Quoted 97 lines

Thanks,
Peng.

Quoted 93 lines

[1] https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/Kconfig#L82

-Sumit

Quoted 88 lines

THanks,
Peng.

Quoted 85 lines

documentation:
- doc/board/qualcomm/sdm845.rst
- doc/board/qualcomm/qcs404.rst

Changes in v2:
- Added patch #1 to fix DT node overrides in starqltechn-uboot.dtsi.
- Updated patch #2 commit description.
- Fixed a typo (s/96Board/96Boards/) in patch #5.

Sumit Garg (9):
board: starqltechn: Align DT node overrides with sdm845.dtsi
arm64: dts: sdm845: Remove redundant u-boot DT properties
clocks: sdm845: Import qcom,gcc-sdm845.h
uart: sdm845: Fix debug UART pinmux
board: qualcomm: Add support for dragonboard845c
mmc: msm_sdhci: Add SDCC version 5.0.0 support
pinctrl: qcom: Add pinctrl driver for QCS404 SoC
clocks: qcom: Add clock driver for QCS404 SoC
board: qualcomm: Add support for QCS404 EVB

   arch/arm/dts/Makefile                         |   1 +
   arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++
   arch/arm/dts/dragonboard845c.dts              |  44 ++++
   arch/arm/dts/qcs404-evb-uboot.dtsi            |  24 ++
   arch/arm/dts/qcs404-evb.dts                   |  81 ++++++
   arch/arm/dts/sdm845.dtsi                      |   8 +-
   arch/arm/dts/starqltechn-uboot.dtsi           |  18 +-
   arch/arm/dts/starqltechn.dts                  |   2 +-
   arch/arm/mach-snapdragon/Kconfig              |  25 ++
   arch/arm/mach-snapdragon/Makefile             |   3 +
   arch/arm/mach-snapdragon/clock-qcs404.c       |  30 +++
   arch/arm/mach-snapdragon/clock-sdm845.c       |   3 +-
   arch/arm/mach-snapdragon/clock-snapdragon.c   |   1 +
   .../include/mach/sysmap-qcs404.h              |  13 +
   arch/arm/mach-snapdragon/pinctrl-qcs404.c     |  55 ++++
   arch/arm/mach-snapdragon/pinctrl-snapdragon.c |   1 +
   arch/arm/mach-snapdragon/pinctrl-snapdragon.h |   1 +
   arch/arm/mach-snapdragon/sysmap-qcs404.c      |  31 +++
   board/qualcomm/dragonboard845c/Kconfig        |  12 +
   board/qualcomm/dragonboard845c/MAINTAINERS    |   6 +
   board/qualcomm/dragonboard845c/Makefile       |   9 +
   board/qualcomm/dragonboard845c/db845c.its     |  63 +++++
   .../dragonboard845c/dragonboard845c.c         |   9 +
   board/qualcomm/qcs404-evb/Kconfig             |  15 ++
   board/qualcomm/qcs404-evb/MAINTAINERS         |   6 +
   board/qualcomm/qcs404-evb/Makefile            |   6 +
   board/qualcomm/qcs404-evb/qcs404-evb.c        |  33 +++
   board/qualcomm/qcs404-evb/qcs404-evb.its      |  64 +++++
   configs/dragonboard845c_defconfig             |  28 ++
   configs/qcs404evb_defconfig                   |  39 +++
   doc/board/qualcomm/index.rst                  |   1 +
   doc/board/qualcomm/qcs404.rst                 |  79 ++++++
   doc/board/qualcomm/sdm845.rst                 | 100 ++++++-
   drivers/mmc/msm_sdhci.c                       |  96 ++++---
   include/configs/dragonboard845c.h             |  28 ++
   include/configs/qcs404-evb.h                  |  27 ++
   include/dt-bindings/clock/qcom,gcc-qcs404.h   | 180 +++++++++++++
   include/dt-bindings/clock/qcom,gcc-sdm845.h   | 246 ++++++++++++++++++
   38 files changed, 1363 insertions(+), 62 deletions(-)

create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi create mode 100644 arch/arm/dts/dragonboard845c.dts
create mode 100644 arch/arm/dts/qcs404-evb-uboot.dtsi
create mode 100644 arch/arm/dts/qcs404-evb.dts
create mode 100644 arch/arm/mach-snapdragon/clock-qcs404.c create mode 100644 arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h create mode 100644 arch/arm/mach-snapdragon/pinctrl-qcs404.c create mode 100644 arch/arm/mach-snapdragon/sysmap-qcs404.c create mode 100644 board/qualcomm/dragonboard845c/Kconfig create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS create mode 100644 board/qualcomm/dragonboard845c/Makefile create mode 100644 board/qualcomm/dragonboard845c/db845c.its create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c create mode 100644 board/qualcomm/qcs404-evb/Kconfig
create mode 100644 board/qualcomm/qcs404-evb/MAINTAINERS create mode 100644 board/qualcomm/qcs404-evb/Makefile
create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.c create mode 100644 board/qualcomm/qcs404-evb/qcs404-evb.its create mode 100644 configs/dragonboard845c_defconfig
create mode 100644 configs/qcs404evb_defconfig
create mode 100644 doc/board/qualcomm/qcs404.rst
create mode 100644 include/configs/dragonboard845c.h
create mode 100644 include/configs/qcs404-evb.h
create mode 100644 include/dt-bindings/clock/qcom,gcc-qcs404.h create mode 100644 include/dt-bindings/clock/qcom,gcc-sdm845.h