linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Enable SD crd slot on msm8998 MTP
@ 2018-11-15 17:18 Jeffrey Hugo
  2018-11-15 17:18 ` [PATCH 1/4] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Jeffrey Hugo @ 2018-11-15 17:18 UTC (permalink / raw)
  To: andy.gross, david.brown
  Cc: bjorn.andersson, robh+dt, mark.rutland, linux-arm-msm, linux-soc,
	devicetree, linux-kernel, Jeffrey Hugo

A short series to enable the SD card slot on the msm8998 MTP so that there
is some storage media to play with.

Jeffrey Hugo (4):
  arm64: dts: qcom: msm8998: correct xo clock name
  arm64: dts: qcom: msm8998: Add SDCC2
  arm64: dts: qcom: msm8998: Add SDC2 control pins
  arm64: dts: qcom: msm8998-mtp: Add external SD

 arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi  | 13 +++++
 arch/arm64/boot/dts/qcom/msm8998-pins.dtsi | 78 ++++++++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/msm8998.dtsi      | 22 ++++++++-
 3 files changed, 112 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8998-pins.dtsi

-- 
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.


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

* [PATCH 1/4] arm64: dts: qcom: msm8998: correct xo clock name
  2018-11-15 17:18 [PATCH 0/4] Enable SD crd slot on msm8998 MTP Jeffrey Hugo
@ 2018-11-15 17:18 ` Jeffrey Hugo
  2018-11-15 18:26   ` Bjorn Andersson
  2018-11-15 17:18 ` [PATCH 2/4] arm64: dts: qcom: msm8998: Add SDCC2 Jeffrey Hugo
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Jeffrey Hugo @ 2018-11-15 17:18 UTC (permalink / raw)
  To: andy.gross, david.brown
  Cc: bjorn.andersson, robh+dt, mark.rutland, linux-arm-msm, linux-soc,
	devicetree, linux-kernel, Jeffrey Hugo

The root parent clock of most msm8998 clock is the "xo" clock.  The DT node
is incorrectly named "xo_board", which prevents Linux from correctly
parsing the clock tree, resulting in most clocks being unparented and
unable to be manipulated.  The end result is that we can't turn on clocks
for peripherals like SD, so init usually fails.

Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support)
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 78227cc..a948d4b 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -53,7 +53,7 @@
 	};
 
 	clocks {
-		xo_board {
+		xo {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <19200000>;
-- 
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.


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

* [PATCH 2/4] arm64: dts: qcom: msm8998: Add SDCC2
  2018-11-15 17:18 [PATCH 0/4] Enable SD crd slot on msm8998 MTP Jeffrey Hugo
  2018-11-15 17:18 ` [PATCH 1/4] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo
@ 2018-11-15 17:18 ` Jeffrey Hugo
  2018-11-15 18:26   ` Bjorn Andersson
  2018-11-15 17:18 ` [PATCH 3/4] arm64: dts: qcom: msm8998: Add SDC2 control pins Jeffrey Hugo
  2018-11-15 17:18 ` [PATCH 4/4] arm64: dts: qcom: msm8998-mtp: Add external SD Jeffrey Hugo
  3 siblings, 1 reply; 12+ messages in thread
From: Jeffrey Hugo @ 2018-11-15 17:18 UTC (permalink / raw)
  To: andy.gross, david.brown
  Cc: bjorn.andersson, robh+dt, mark.rutland, linux-arm-msm, linux-soc,
	devicetree, linux-kernel, Jeffrey Hugo

SDCC2 is typically used as the controller for an external SD card slot.

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/msm8998.dtsi | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index a948d4b..09deee0 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -53,7 +53,7 @@
 	};
 
 	clocks {
-		xo {
+		xo: xo {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <19200000>;
@@ -605,6 +605,23 @@
 			#mbox-cells = <1>;
 		};
 
+		sdhc2: sdhci@c0a4900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xc0a4900 0x314>, <0xc0a4000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+
+			interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hc_irq", "pwr_irq";
+
+			clock-names = "iface", "core", "xo";
+			clocks = <&gcc GCC_SDCC2_AHB_CLK>,
+				 <&gcc GCC_SDCC2_APPS_CLK>,
+				 <&xo>;
+			bus-width = <4>;
+			status = "disabled";
+		};
+
 		blsp2_uart1: serial@c1b0000 {
 			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
 			reg = <0xc1b0000 0x1000>;
-- 
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.


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

* [PATCH 3/4] arm64: dts: qcom: msm8998: Add SDC2 control pins
  2018-11-15 17:18 [PATCH 0/4] Enable SD crd slot on msm8998 MTP Jeffrey Hugo
  2018-11-15 17:18 ` [PATCH 1/4] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo
  2018-11-15 17:18 ` [PATCH 2/4] arm64: dts: qcom: msm8998: Add SDCC2 Jeffrey Hugo
@ 2018-11-15 17:18 ` Jeffrey Hugo
  2018-11-15 19:16   ` Bjorn Andersson
  2018-11-15 17:18 ` [PATCH 4/4] arm64: dts: qcom: msm8998-mtp: Add external SD Jeffrey Hugo
  3 siblings, 1 reply; 12+ messages in thread
From: Jeffrey Hugo @ 2018-11-15 17:18 UTC (permalink / raw)
  To: andy.gross, david.brown
  Cc: bjorn.andersson, robh+dt, mark.rutland, linux-arm-msm, linux-soc,
	devicetree, linux-kernel, Jeffrey Hugo

The SDC2 control pins are typically used to manage sleep.

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/msm8998-pins.dtsi | 78 ++++++++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/msm8998.dtsi      |  2 +
 2 files changed, 80 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8998-pins.dtsi

diff --git a/arch/arm64/boot/dts/qcom/msm8998-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8998-pins.dtsi
new file mode 100644
index 0000000..a22abf9
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8998-pins.dtsi
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright (c) 2018, The Linux Foundation. All rights reserved. */
+
+&tlmm {
+	sdc2_clk_on: sdc2_clk_on {
+		config {
+			pins = "sdc2_clk";
+			bias-disable;           /* NO pull */
+			drive-strength = <16>;  /* 16 MA */
+		};
+	};
+
+	sdc2_clk_off: sdc2_clk_off {
+		config {
+			pins = "sdc2_clk";
+			bias-disable;           /* NO pull */
+			drive-strength = <2>;   /* 2 MA */
+		};
+	};
+
+	sdc2_cmd_on: sdc2_cmd_on {
+		config {
+			pins = "sdc2_cmd";
+			bias-pull-up;           /* pull up */
+			drive-strength = <10>;  /* 10 MA */
+		};
+	};
+
+	sdc2_cmd_off: sdc2_cmd_off {
+		config {
+			pins = "sdc2_cmd";
+			bias-pull-up;           /* pull up */
+			drive-strength = <2>;   /* 2 MA */
+		};
+	};
+
+	sdc2_data_on: sdc2_data_on {
+		config {
+			pins = "sdc2_data";
+			bias-pull-up;           /* pull up */
+			drive-strength = <10>;  /* 10 MA */
+		};
+	};
+
+	sdc2_data_off: sdc2_data_off {
+		config {
+			pins = "sdc2_data";
+			bias-pull-up;           /* pull up */
+			drive-strength = <2>;   /* 2 MA */
+		};
+	};
+
+	sdc2_cd_on: sdc2_cd_on {
+		mux {
+			pins = "gpio95";
+			function = "gpio";
+		};
+
+		config {
+			pins = "gpio95";
+			bias-pull-up;           /* pull up */
+			drive-strength = <2>;   /* 2 MA */
+		};
+	};
+
+	sdc2_cd_off: sdc2_cd_off {
+		mux {
+			pins = "gpio95";
+			function = "gpio";
+		};
+
+		config {
+			pins = "gpio95";
+			bias-pull-up;           /* pull up */
+			drive-strength = <2>;   /* 2 MA */
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 09deee0..94827f4 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -705,3 +705,5 @@
 		};
 	};
 };
+
+#include "msm8998-pins.dtsi"
-- 
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.


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

* [PATCH 4/4] arm64: dts: qcom: msm8998-mtp: Add external SD
  2018-11-15 17:18 [PATCH 0/4] Enable SD crd slot on msm8998 MTP Jeffrey Hugo
                   ` (2 preceding siblings ...)
  2018-11-15 17:18 ` [PATCH 3/4] arm64: dts: qcom: msm8998: Add SDC2 control pins Jeffrey Hugo
@ 2018-11-15 17:18 ` Jeffrey Hugo
  2018-11-15 19:05   ` Andy Gross
  2018-11-15 19:20   ` Bjorn Andersson
  3 siblings, 2 replies; 12+ messages in thread
From: Jeffrey Hugo @ 2018-11-15 17:18 UTC (permalink / raw)
  To: andy.gross, david.brown
  Cc: bjorn.andersson, robh+dt, mark.rutland, linux-arm-msm, linux-soc,
	devicetree, linux-kernel, Jeffrey Hugo

The externally accessible SD card slot on the MTP is driven by SDCC2.
Wire it up for use.

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/qcom/msm8998.dtsi     |  1 +
 2 files changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
index b4276da..a90b427 100644
--- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
@@ -241,3 +241,16 @@
 		};
 	};
 };
+
+&sdhc2 {
+	status = "okay";
+        cd-gpios = <&tlmm 95 GPIO_ACTIVE_LOW>;
+
+        vmmc-supply = <&vreg_l21a_2p95>;
+        vqmmc-supply = <&vreg_l13a_2p95>;
+
+        pinctrl-names = "default", "sleep";
+        pinctrl-0 = <&sdc2_clk_on  &sdc2_cmd_on  &sdc2_data_on  &sdc2_cd_on>;
+        pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
+};
+
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 94827f4..8e7d788 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -3,6 +3,7 @@
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-msm8998.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	interrupt-parent = <&intc>;
-- 
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.


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

* Re: [PATCH 1/4] arm64: dts: qcom: msm8998: correct xo clock name
  2018-11-15 17:18 ` [PATCH 1/4] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo
@ 2018-11-15 18:26   ` Bjorn Andersson
  0 siblings, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2018-11-15 18:26 UTC (permalink / raw)
  To: Jeffrey Hugo
  Cc: andy.gross, david.brown, robh+dt, mark.rutland, linux-arm-msm,
	linux-soc, devicetree, linux-kernel

On Thu 15 Nov 09:18 PST 2018, Jeffrey Hugo wrote:

> The root parent clock of most msm8998 clock is the "xo" clock.  The DT node
> is incorrectly named "xo_board", which prevents Linux from correctly
> parsing the clock tree, resulting in most clocks being unparented and
> unable to be manipulated.  The end result is that we can't turn on clocks
> for peripherals like SD, so init usually fails.
> 
> Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support)
> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

>  arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> index 78227cc..a948d4b 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> @@ -53,7 +53,7 @@
>  	};
>  
>  	clocks {
> -		xo_board {
> +		xo {

You could have taken the opportunity and added the label here...

>  			compatible = "fixed-clock";
>  			#clock-cells = <0>;
>  			clock-frequency = <19200000>;

Regards,
Bjorn

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

* Re: [PATCH 2/4] arm64: dts: qcom: msm8998: Add SDCC2
  2018-11-15 17:18 ` [PATCH 2/4] arm64: dts: qcom: msm8998: Add SDCC2 Jeffrey Hugo
@ 2018-11-15 18:26   ` Bjorn Andersson
  0 siblings, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2018-11-15 18:26 UTC (permalink / raw)
  To: Jeffrey Hugo
  Cc: andy.gross, david.brown, robh+dt, mark.rutland, linux-arm-msm,
	linux-soc, devicetree, linux-kernel

On Thu 15 Nov 09:18 PST 2018, Jeffrey Hugo wrote:

> SDCC2 is typically used as the controller for an external SD card slot.
> 
> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

>  arch/arm64/boot/dts/qcom/msm8998.dtsi | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> index a948d4b..09deee0 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> @@ -53,7 +53,7 @@
>  	};
>  
>  	clocks {
> -		xo {
> +		xo: xo {
>  			compatible = "fixed-clock";
>  			#clock-cells = <0>;
>  			clock-frequency = <19200000>;
> @@ -605,6 +605,23 @@
>  			#mbox-cells = <1>;
>  		};
>  
> +		sdhc2: sdhci@c0a4900 {
> +			compatible = "qcom,sdhci-msm-v4";
> +			reg = <0xc0a4900 0x314>, <0xc0a4000 0x800>;
> +			reg-names = "hc_mem", "core_mem";
> +
> +			interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "hc_irq", "pwr_irq";
> +
> +			clock-names = "iface", "core", "xo";
> +			clocks = <&gcc GCC_SDCC2_AHB_CLK>,
> +				 <&gcc GCC_SDCC2_APPS_CLK>,
> +				 <&xo>;
> +			bus-width = <4>;
> +			status = "disabled";
> +		};
> +
>  		blsp2_uart1: serial@c1b0000 {
>  			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
>  			reg = <0xc1b0000 0x1000>;
> -- 
> Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
> Qualcomm Technologies, Inc. is a member of the
> Code Aurora Forum, a Linux Foundation Collaborative Project.
> 

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

* Re: [PATCH 4/4] arm64: dts: qcom: msm8998-mtp: Add external SD
  2018-11-15 17:18 ` [PATCH 4/4] arm64: dts: qcom: msm8998-mtp: Add external SD Jeffrey Hugo
@ 2018-11-15 19:05   ` Andy Gross
  2018-11-15 20:11     ` Jeffrey Hugo
  2018-11-15 19:20   ` Bjorn Andersson
  1 sibling, 1 reply; 12+ messages in thread
From: Andy Gross @ 2018-11-15 19:05 UTC (permalink / raw)
  To: Jeffrey Hugo
  Cc: david.brown, bjorn.andersson, robh+dt, mark.rutland,
	linux-arm-msm, linux-soc, devicetree, linux-kernel

On Thu, Nov 15, 2018 at 10:18:11AM -0700, Jeffrey Hugo wrote:
> The externally accessible SD card slot on the MTP is driven by SDCC2.
> Wire it up for use.
> 
> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 13 +++++++++++++
>  arch/arm64/boot/dts/qcom/msm8998.dtsi     |  1 +
>  2 files changed, 14 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> index b4276da..a90b427 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> @@ -241,3 +241,16 @@
>  		};
>  	};
>  };
> +
> +&sdhc2 {
> +	status = "okay";
> +        cd-gpios = <&tlmm 95 GPIO_ACTIVE_LOW>;
> +
> +        vmmc-supply = <&vreg_l21a_2p95>;
> +        vqmmc-supply = <&vreg_l13a_2p95>;
> +
> +        pinctrl-names = "default", "sleep";
> +        pinctrl-0 = <&sdc2_clk_on  &sdc2_cmd_on  &sdc2_data_on  &sdc2_cd_on>;
> +        pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;

Fix to use tabs instead of spaces.


Regards,
Andy

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

* Re: [PATCH 3/4] arm64: dts: qcom: msm8998: Add SDC2 control pins
  2018-11-15 17:18 ` [PATCH 3/4] arm64: dts: qcom: msm8998: Add SDC2 control pins Jeffrey Hugo
@ 2018-11-15 19:16   ` Bjorn Andersson
  2018-11-15 20:15     ` Jeffrey Hugo
  0 siblings, 1 reply; 12+ messages in thread
From: Bjorn Andersson @ 2018-11-15 19:16 UTC (permalink / raw)
  To: Jeffrey Hugo
  Cc: andy.gross, david.brown, robh+dt, mark.rutland, linux-arm-msm,
	linux-soc, devicetree, linux-kernel

On Thu 15 Nov 09:18 PST 2018, Jeffrey Hugo wrote:

> The SDC2 control pins are typically used to manage sleep.
> 
> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/msm8998-pins.dtsi | 78 ++++++++++++++++++++++++++++++

Rather than adding a -pins file, add the pinctrl states the individual
dts(i) directly.

>  arch/arm64/boot/dts/qcom/msm8998.dtsi      |  2 +
>  2 files changed, 80 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/msm8998-pins.dtsi
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8998-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8998-pins.dtsi
> new file mode 100644
> index 0000000..a22abf9
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8998-pins.dtsi
> @@ -0,0 +1,78 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/* Copyright (c) 2018, The Linux Foundation. All rights reserved. */
> +
> +&tlmm {
> +	sdc2_clk_on: sdc2_clk_on {

Use _ in labels, - in node names.

> +		config {

You don't have to put the pinctrl state properties in an additional
subnode anymore, so feel free to remove the extra subnode level.

> +			pins = "sdc2_clk";
> +			bias-disable;           /* NO pull */
> +			drive-strength = <16>;  /* 16 MA */

Please push electrical properties to the board dts instead of the
platform one, as they might be board specific.

> +		};
> +	};

Apart from this the patch loogs good.

Regards,
Bjorn

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

* Re: [PATCH 4/4] arm64: dts: qcom: msm8998-mtp: Add external SD
  2018-11-15 17:18 ` [PATCH 4/4] arm64: dts: qcom: msm8998-mtp: Add external SD Jeffrey Hugo
  2018-11-15 19:05   ` Andy Gross
@ 2018-11-15 19:20   ` Bjorn Andersson
  1 sibling, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2018-11-15 19:20 UTC (permalink / raw)
  To: Jeffrey Hugo
  Cc: andy.gross, david.brown, robh+dt, mark.rutland, linux-arm-msm,
	linux-soc, devicetree, linux-kernel

On Thu 15 Nov 09:18 PST 2018, Jeffrey Hugo wrote:

> The externally accessible SD card slot on the MTP is driven by SDCC2.
> Wire it up for use.
> 
> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 13 +++++++++++++
>  arch/arm64/boot/dts/qcom/msm8998.dtsi     |  1 +
>  2 files changed, 14 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> index b4276da..a90b427 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> @@ -241,3 +241,16 @@
>  		};
>  	};
>  };
> +
> +&sdhc2 {
> +	status = "okay";

Please fix the indentation of the rest of the properties in this block.

> +        cd-gpios = <&tlmm 95 GPIO_ACTIVE_LOW>;
> +
> +        vmmc-supply = <&vreg_l21a_2p95>;
> +        vqmmc-supply = <&vreg_l13a_2p95>;
> +
> +        pinctrl-names = "default", "sleep";
> +        pinctrl-0 = <&sdc2_clk_on  &sdc2_cmd_on  &sdc2_data_on  &sdc2_cd_on>;
> +        pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
> +};

With that,

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

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

* Re: [PATCH 4/4] arm64: dts: qcom: msm8998-mtp: Add external SD
  2018-11-15 19:05   ` Andy Gross
@ 2018-11-15 20:11     ` Jeffrey Hugo
  0 siblings, 0 replies; 12+ messages in thread
From: Jeffrey Hugo @ 2018-11-15 20:11 UTC (permalink / raw)
  To: Andy Gross
  Cc: david.brown, bjorn.andersson, robh+dt, mark.rutland,
	linux-arm-msm, linux-soc, devicetree, linux-kernel

On 11/15/2018 12:05 PM, Andy Gross wrote:
> On Thu, Nov 15, 2018 at 10:18:11AM -0700, Jeffrey Hugo wrote:
>> The externally accessible SD card slot on the MTP is driven by SDCC2.
>> Wire it up for use.
>>
>> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
>> ---
>>   arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 13 +++++++++++++
>>   arch/arm64/boot/dts/qcom/msm8998.dtsi     |  1 +
>>   2 files changed, 14 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
>> index b4276da..a90b427 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
>> @@ -241,3 +241,16 @@
>>   		};
>>   	};
>>   };
>> +
>> +&sdhc2 {
>> +	status = "okay";
>> +        cd-gpios = <&tlmm 95 GPIO_ACTIVE_LOW>;
>> +
>> +        vmmc-supply = <&vreg_l21a_2p95>;
>> +        vqmmc-supply = <&vreg_l13a_2p95>;
>> +
>> +        pinctrl-names = "default", "sleep";
>> +        pinctrl-0 = <&sdc2_clk_on  &sdc2_cmd_on  &sdc2_data_on  &sdc2_cd_on>;
>> +        pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
> 
> Fix to use tabs instead of spaces.

Doh.  Nice catch.  I see I didn't commit that change in my tree.
I'll send out a V2 with this and any other fixes folks comment on.


-- 
Jeffrey Hugo
Qualcomm Datacenter Technologies as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

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

* Re: [PATCH 3/4] arm64: dts: qcom: msm8998: Add SDC2 control pins
  2018-11-15 19:16   ` Bjorn Andersson
@ 2018-11-15 20:15     ` Jeffrey Hugo
  0 siblings, 0 replies; 12+ messages in thread
From: Jeffrey Hugo @ 2018-11-15 20:15 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: andy.gross, david.brown, robh+dt, mark.rutland, linux-arm-msm,
	linux-soc, devicetree, linux-kernel

On 11/15/2018 12:16 PM, Bjorn Andersson wrote:
> On Thu 15 Nov 09:18 PST 2018, Jeffrey Hugo wrote:
> 
>> The SDC2 control pins are typically used to manage sleep.
>>
>> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
>> ---
>>   arch/arm64/boot/dts/qcom/msm8998-pins.dtsi | 78 ++++++++++++++++++++++++++++++
> 
> Rather than adding a -pins file, add the pinctrl states the individual
> dts(i) directly.
> 
>>   arch/arm64/boot/dts/qcom/msm8998.dtsi      |  2 +
>>   2 files changed, 80 insertions(+)
>>   create mode 100644 arch/arm64/boot/dts/qcom/msm8998-pins.dtsi
>>
>> diff --git a/arch/arm64/boot/dts/qcom/msm8998-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8998-pins.dtsi
>> new file mode 100644
>> index 0000000..a22abf9
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/qcom/msm8998-pins.dtsi
>> @@ -0,0 +1,78 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/* Copyright (c) 2018, The Linux Foundation. All rights reserved. */
>> +
>> +&tlmm {
>> +	sdc2_clk_on: sdc2_clk_on {
> 
> Use _ in labels, - in node names.
> 
>> +		config {
> 
> You don't have to put the pinctrl state properties in an additional
> subnode anymore, so feel free to remove the extra subnode level.
> 
>> +			pins = "sdc2_clk";
>> +			bias-disable;           /* NO pull */
>> +			drive-strength = <16>;  /* 16 MA */
> 
> Please push electrical properties to the board dts instead of the
> platform one, as they might be board specific.
> 
>> +		};
>> +	};
> 
> Apart from this the patch loogs good.
> 

Thanks for the guidance.  This all makes sense to me.  I'll roll this 
all into v2.

-- 
Jeffrey Hugo
Qualcomm Datacenter Technologies as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

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

end of thread, other threads:[~2018-11-15 20:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 17:18 [PATCH 0/4] Enable SD crd slot on msm8998 MTP Jeffrey Hugo
2018-11-15 17:18 ` [PATCH 1/4] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo
2018-11-15 18:26   ` Bjorn Andersson
2018-11-15 17:18 ` [PATCH 2/4] arm64: dts: qcom: msm8998: Add SDCC2 Jeffrey Hugo
2018-11-15 18:26   ` Bjorn Andersson
2018-11-15 17:18 ` [PATCH 3/4] arm64: dts: qcom: msm8998: Add SDC2 control pins Jeffrey Hugo
2018-11-15 19:16   ` Bjorn Andersson
2018-11-15 20:15     ` Jeffrey Hugo
2018-11-15 17:18 ` [PATCH 4/4] arm64: dts: qcom: msm8998-mtp: Add external SD Jeffrey Hugo
2018-11-15 19:05   ` Andy Gross
2018-11-15 20:11     ` Jeffrey Hugo
2018-11-15 19:20   ` Bjorn Andersson

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