xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sc7280-chrome-common.dtsi (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1c9ccf3a3SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2c9ccf3a3SEmmanuel Vadot/*
3c9ccf3a3SEmmanuel Vadot * sc7280 fragment for devices with Chrome bootloader
4c9ccf3a3SEmmanuel Vadot *
5c9ccf3a3SEmmanuel Vadot * This file mainly tries to abstract out the memory protections put into
6c9ccf3a3SEmmanuel Vadot * place by the Chrome bootloader which are different than what's put into
7c9ccf3a3SEmmanuel Vadot * place by Qualcomm's typical bootloader. It also has a smattering of other
8c9ccf3a3SEmmanuel Vadot * things that will hold true for any conceivable Chrome design
9c9ccf3a3SEmmanuel Vadot *
10c9ccf3a3SEmmanuel Vadot * Copyright 2022 Google LLC.
11c9ccf3a3SEmmanuel Vadot */
12c9ccf3a3SEmmanuel Vadot
13c9ccf3a3SEmmanuel Vadot/*
14c9ccf3a3SEmmanuel Vadot * Reserved memory changes
15c9ccf3a3SEmmanuel Vadot *
16c9ccf3a3SEmmanuel Vadot * Delete all unused memory nodes and define the peripheral memory regions
17c9ccf3a3SEmmanuel Vadot * required by the setup for Chrome boards.
18c9ccf3a3SEmmanuel Vadot */
19c9ccf3a3SEmmanuel Vadot
20*8d13bc63SEmmanuel Vadot/delete-node/ &cdsp_mem;
21*8d13bc63SEmmanuel Vadot/delete-node/ &gpu_zap_mem;
22*8d13bc63SEmmanuel Vadot/delete-node/ &gpu_zap_shader;
23c9ccf3a3SEmmanuel Vadot/delete-node/ &hyp_mem;
24c9ccf3a3SEmmanuel Vadot/delete-node/ &xbl_mem;
25c9ccf3a3SEmmanuel Vadot/delete-node/ &reserved_xbl_uefi_log;
26c9ccf3a3SEmmanuel Vadot/delete-node/ &sec_apps_mem;
27c9ccf3a3SEmmanuel Vadot
28c9ccf3a3SEmmanuel Vadot/ {
29c9ccf3a3SEmmanuel Vadot	reserved-memory {
30c9ccf3a3SEmmanuel Vadot		camera_mem: memory@8ad00000 {
31c9ccf3a3SEmmanuel Vadot			reg = <0x0 0x8ad00000 0x0 0x500000>;
32c9ccf3a3SEmmanuel Vadot			no-map;
33c9ccf3a3SEmmanuel Vadot		};
34c9ccf3a3SEmmanuel Vadot
35c9ccf3a3SEmmanuel Vadot		venus_mem: memory@8b200000 {
36c9ccf3a3SEmmanuel Vadot			reg = <0x0 0x8b200000 0x0 0x500000>;
37c9ccf3a3SEmmanuel Vadot			no-map;
38c9ccf3a3SEmmanuel Vadot		};
39c9ccf3a3SEmmanuel Vadot	};
40c9ccf3a3SEmmanuel Vadot};
41c9ccf3a3SEmmanuel Vadot
4284943d6fSEmmanuel Vadot&lpass_aon {
4384943d6fSEmmanuel Vadot	status = "okay";
4484943d6fSEmmanuel Vadot};
4584943d6fSEmmanuel Vadot
4684943d6fSEmmanuel Vadot&lpass_core {
4784943d6fSEmmanuel Vadot	status = "okay";
4884943d6fSEmmanuel Vadot};
4984943d6fSEmmanuel Vadot
5084943d6fSEmmanuel Vadot&lpass_hm {
5184943d6fSEmmanuel Vadot	status = "okay";
5284943d6fSEmmanuel Vadot};
5384943d6fSEmmanuel Vadot
5484943d6fSEmmanuel Vadot&lpasscc {
5584943d6fSEmmanuel Vadot	status = "okay";
5684943d6fSEmmanuel Vadot};
5784943d6fSEmmanuel Vadot
5884943d6fSEmmanuel Vadot&pdc_reset {
5984943d6fSEmmanuel Vadot	status = "okay";
6084943d6fSEmmanuel Vadot};
6184943d6fSEmmanuel Vadot
62c9ccf3a3SEmmanuel Vadot/* The PMIC PON code isn't compatible w/ how Chrome EC/BIOS handle things. */
63c9ccf3a3SEmmanuel Vadot&pmk8350_pon {
64c9ccf3a3SEmmanuel Vadot	status = "disabled";
65c9ccf3a3SEmmanuel Vadot};
66c9ccf3a3SEmmanuel Vadot
67c9ccf3a3SEmmanuel Vadot/*
68c9ccf3a3SEmmanuel Vadot * Chrome designs always boot from SPI flash hooked up to the qspi.
69c9ccf3a3SEmmanuel Vadot *
70c9ccf3a3SEmmanuel Vadot * It's expected that all boards will support "dual SPI" at 37.5 MHz.
71c9ccf3a3SEmmanuel Vadot * If some boards need a different speed or have a package that allows
72c9ccf3a3SEmmanuel Vadot * Quad SPI together with WP then those boards can easily override.
73c9ccf3a3SEmmanuel Vadot */
74c9ccf3a3SEmmanuel Vadot&qspi {
75c9ccf3a3SEmmanuel Vadot	status = "okay";
76fac71e4eSEmmanuel Vadot	pinctrl-names = "default", "sleep";
77fac71e4eSEmmanuel Vadot	pinctrl-0 = <&qspi_clk>, <&qspi_cs0>, <&qspi_data0>, <&qspi_data1>;
78fac71e4eSEmmanuel Vadot	pinctrl-1 = <&qspi_sleep>;
79c9ccf3a3SEmmanuel Vadot
80c9ccf3a3SEmmanuel Vadot	spi_flash: flash@0 {
81c9ccf3a3SEmmanuel Vadot		compatible = "jedec,spi-nor";
82c9ccf3a3SEmmanuel Vadot		reg = <0>;
83c9ccf3a3SEmmanuel Vadot
84c9ccf3a3SEmmanuel Vadot		spi-max-frequency = <37500000>;
85c9ccf3a3SEmmanuel Vadot		spi-tx-bus-width = <2>;
86c9ccf3a3SEmmanuel Vadot		spi-rx-bus-width = <2>;
87c9ccf3a3SEmmanuel Vadot	};
88c9ccf3a3SEmmanuel Vadot};
89c9ccf3a3SEmmanuel Vadot
90*8d13bc63SEmmanuel Vadot/* Currently not used */
91*8d13bc63SEmmanuel Vadot&remoteproc_cdsp {
92*8d13bc63SEmmanuel Vadot	/delete-property/ memory-region;
93*8d13bc63SEmmanuel Vadot};
94*8d13bc63SEmmanuel Vadot
95b97ee269SEmmanuel Vadot&remoteproc_wpss {
96*8d13bc63SEmmanuel Vadot	compatible = "qcom,sc7280-wpss-pil";
97*8d13bc63SEmmanuel Vadot	clocks = <&gcc GCC_WPSS_AHB_BDG_MST_CLK>,
98*8d13bc63SEmmanuel Vadot		 <&gcc GCC_WPSS_AHB_CLK>,
99*8d13bc63SEmmanuel Vadot		 <&gcc GCC_WPSS_RSCP_CLK>,
100*8d13bc63SEmmanuel Vadot		 <&rpmhcc RPMH_CXO_CLK>;
101*8d13bc63SEmmanuel Vadot	clock-names = "ahb_bdg",
102*8d13bc63SEmmanuel Vadot		      "ahb",
103*8d13bc63SEmmanuel Vadot		      "rscp",
104*8d13bc63SEmmanuel Vadot		      "xo";
105*8d13bc63SEmmanuel Vadot
106*8d13bc63SEmmanuel Vadot	resets = <&aoss_reset AOSS_CC_WCSS_RESTART>,
107*8d13bc63SEmmanuel Vadot		 <&pdc_reset PDC_WPSS_SYNC_RESET>;
108*8d13bc63SEmmanuel Vadot	reset-names = "restart", "pdc_sync";
109*8d13bc63SEmmanuel Vadot
110*8d13bc63SEmmanuel Vadot	qcom,halt-regs = <&tcsr_1 0x17000>;
111*8d13bc63SEmmanuel Vadot
112b97ee269SEmmanuel Vadot	firmware-name = "ath11k/WCN6750/hw1.0/wpss.mdt";
113*8d13bc63SEmmanuel Vadot
114*8d13bc63SEmmanuel Vadot	status = "okay";
115c9ccf3a3SEmmanuel Vadot};
116c9ccf3a3SEmmanuel Vadot
117fac71e4eSEmmanuel Vadot&scm {
118fac71e4eSEmmanuel Vadot	/* TF-A firmware maps memory cached so mark dma-coherent to match. */
119fac71e4eSEmmanuel Vadot	dma-coherent;
120fac71e4eSEmmanuel Vadot};
121fac71e4eSEmmanuel Vadot
12284943d6fSEmmanuel Vadot&watchdog {
12384943d6fSEmmanuel Vadot	status = "okay";
12484943d6fSEmmanuel Vadot};
12584943d6fSEmmanuel Vadot
126b97ee269SEmmanuel Vadot&wifi {
127b97ee269SEmmanuel Vadot	status = "okay";
128b97ee269SEmmanuel Vadot
129b97ee269SEmmanuel Vadot	wifi-firmware {
130b97ee269SEmmanuel Vadot		iommus = <&apps_smmu 0x1c02 0x1>;
131b97ee269SEmmanuel Vadot	};
132b97ee269SEmmanuel Vadot};
133fac71e4eSEmmanuel Vadot
134fac71e4eSEmmanuel Vadot/* PINCTRL - chrome-common pinctrl */
135fac71e4eSEmmanuel Vadot
136fac71e4eSEmmanuel Vadot&tlmm {
137fac71e4eSEmmanuel Vadot	qspi_sleep: qspi-sleep-state {
138fac71e4eSEmmanuel Vadot		pins = "gpio12", "gpio13", "gpio14", "gpio15";
139fac71e4eSEmmanuel Vadot
140fac71e4eSEmmanuel Vadot		/*
141fac71e4eSEmmanuel Vadot		 * When we're not actively transferring we want pins as GPIOs
142fac71e4eSEmmanuel Vadot		 * with output disabled so that the quad SPI IP block stops
143fac71e4eSEmmanuel Vadot		 * driving them. We rely on the normal pulls configured in
144fac71e4eSEmmanuel Vadot		 * the active state and don't redefine them here. Also note
145fac71e4eSEmmanuel Vadot		 * that we don't need the reverse (output-enable) in the
146fac71e4eSEmmanuel Vadot		 * normal mode since the "output-enable" only matters for
147fac71e4eSEmmanuel Vadot		 * GPIO function.
148fac71e4eSEmmanuel Vadot		 */
149fac71e4eSEmmanuel Vadot		function = "gpio";
150fac71e4eSEmmanuel Vadot		output-disable;
151fac71e4eSEmmanuel Vadot	};
152fac71e4eSEmmanuel Vadot};
153