diff mbox series

[v2,1/3] arm64: dts: qcom: sm8250: Disable Adreno and Venus by default

Message ID 20210612192358.62602-1-konrad.dybcio@somainline.org
State Superseded
Headers show
Series [v2,1/3] arm64: dts: qcom: sm8250: Disable Adreno and Venus by default | expand

Commit Message

Konrad Dybcio June 12, 2021, 7:23 p.m. UTC
Components that rely on proprietary (not to mention signed!) firmware should
not be enabled by default, as lack of the aforementioned firmware could cause
various issues, from random errors to straight-up failing to boot.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
<no changes>

 arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 10 ++++++++++
 arch/arm64/boot/dts/qcom/sm8250-hdk.dts  | 12 ++++++++++++
 arch/arm64/boot/dts/qcom/sm8250-mtp.dts  | 10 ++++++++++
 arch/arm64/boot/dts/qcom/sm8250.dtsi     |  6 ++++++
 4 files changed, 38 insertions(+)

Comments

Bjorn Andersson June 15, 2021, 11:39 p.m. UTC | #1
On Sat 12 Jun 14:23 CDT 2021, Konrad Dybcio wrote:

> Add required pins for SDHCI2, so that the interface can work reliably.

> The configuration comes from a MTP board, which conveniently means it's

> going to be correct for the vast majority of phones (and other devices).

> 

> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>

> ---

> Changes since v1:

> - Separate this into its own patch

> 

>  arch/arm64/boot/dts/qcom/sm8250.dtsi | 32 ++++++++++++++++++++++++++++

>  1 file changed, 32 insertions(+)

> 

> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi

> index fc1049c2bb11..fe858abbff5d 100644

> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi

> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi

> @@ -8,6 +8,7 @@

>  #include <dt-bindings/clock/qcom,gcc-sm8250.h>

>  #include <dt-bindings/clock/qcom,gpucc-sm8250.h>

>  #include <dt-bindings/clock/qcom,rpmh.h>

> +#include <dt-bindings/gpio/gpio.h>

>  #include <dt-bindings/interconnect/qcom,osm-l3.h>

>  #include <dt-bindings/interconnect/qcom,sm8250.h>

>  #include <dt-bindings/mailbox/qcom-ipcc.h>

> @@ -2157,6 +2158,10 @@ sdhc_2: sdhci@8804000 {

>  			power-domains = <&rpmhpd SM8250_CX>;

>  			operating-points-v2 = <&sdhc2_opp_table>;

>  

> +			cd-gpios = <&tlmm 77 GPIO_ACTIVE_HIGH>;

> +			pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;

> +			pinctrl-names = "default";

> +

>  			status = "disabled";

>  

>  			sdhc2_opp_table: sdhc2-opp-table {

> @@ -3401,6 +3406,33 @@ ws {

>  					output-high;

>  				};

>  			};

> +

> +			sdc2_default_state: sdc2-default {

> +				clk {

> +					pins = "sdc2_clk";

> +					drive-strength = <16>;


The fact that RB5 has these as 16/10/10 seems to show that these should
be board-specific (as we typically have them). So please follow that.


(The sleep state on other hand is not going to change, so that I'm okay
with you define here for all boards to use).

Regards,
Bjorn

> +					bias-disable;

> +				};

> +

> +				cmd {

> +					pins = "sdc2_cmd";

> +					drive-strength = <16>;

> +					bias-pull-up;

> +				};

> +

> +				data {

> +					pins = "sdc2_data";

> +					drive-strength = <16>;

> +					bias-pull-up;

> +				};

> +			};

> +

> +			sdc2_card_det_n: sd-card-det-n {

> +				pins = "gpio77";

> +				function = "gpio";

> +				bias-pull-up;

> +				drive-strength = <2>;

> +			};

>  		};

>  

>  		apps_smmu: iommu@15000000 {

> -- 

> 2.32.0

>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
index 5f41de20aa22..a5b742325261 100644
--- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
+++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
@@ -552,7 +552,13 @@  &dsi0_phy {
 	vdds-supply = <&vreg_l5a_0p88>;
 };
 
+&gmu {
+	status = "okay";
+};
+
 &gpu {
+	status = "okay";
+
 	zap-shader {
 		memory-region = <&gpu_mem>;
 		firmware-name = "qcom/sm8250/a650_zap.mbn";
@@ -1352,6 +1358,10 @@  &vamacro {
 	qcom,dmic-sample-rate = <600000>;
 };
 
+&venus {
+	status = "okay";
+};
+
 /* PINCTRL - additions to nodes defined in sm8250.dtsi */
 &qup_spi0_cs_gpio {
 	drive-strength = <6>;
diff --git a/arch/arm64/boot/dts/qcom/sm8250-hdk.dts b/arch/arm64/boot/dts/qcom/sm8250-hdk.dts
index c3a2c5aa6fe9..397359ee2f85 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-hdk.dts
@@ -365,6 +365,14 @@  vreg_l7f_1p8: ldo7 {
 	};
 };
 
+&gmu {
+	status = "okay";
+};
+
+&gpu {
+	status = "okay";
+};
+
 &qupv3_id_1 {
 	status = "okay";
 };
@@ -452,3 +460,7 @@  &usb_1_dwc3 {
 &usb_2_dwc3 {
 	dr_mode = "host";
 };
+
+&venus {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
index cfc4d1febe0f..062b944be91d 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
@@ -465,7 +465,13 @@  &cdsp {
 	firmware-name = "qcom/sm8250/cdsp.mbn";
 };
 
+&gmu {
+	status = "okay";
+};
+
 &gpu {
+	status = "okay";
+
 	zap-shader {
 		memory-region = <&gpu_mem>;
 		firmware-name = "qcom/sm8250/a650_zap.mbn";
@@ -691,3 +697,7 @@  &usb_2_qmpphy {
 	vdda-phy-supply = <&vreg_l9a_1p2>;
 	vdda-pll-supply = <&vreg_l18a_0p9>;
 };
+
+&venus {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 4c0de12aaba6..fc1049c2bb11 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -1746,6 +1746,8 @@  gpu: gpu@3d00000 {
 
 			qcom,gmu = <&gmu>;
 
+			status = "disabled";
+
 			zap-shader {
 				memory-region = <&gpu_mem>;
 			};
@@ -1819,6 +1821,8 @@  gmu: gmu@3d6a000 {
 
 			operating-points-v2 = <&gmu_opp_table>;
 
+			status = "disabled";
+
 			gmu_opp_table: opp-table {
 				compatible = "operating-points-v2";
 
@@ -2323,6 +2327,8 @@  venus: video-codec@aa00000 {
 				 <&videocc VIDEO_CC_MVS0C_CLK_ARES>;
 			reset-names = "bus", "core";
 
+			status = "disabled";
+
 			video-decoder {
 				compatible = "venus-decoder";
 			};