xref: /linux/scripts/dtc/include-prefixes/arm64/qcom/ipq9574-rdp-common.dtsi (revision ec71f661a572a770d7c861cd52a50cbbb0e1a8d1)
10e8527d0SAnusha Rao// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
20e8527d0SAnusha Rao/*
30e8527d0SAnusha Rao * IPQ9574 RDP board common device tree source
40e8527d0SAnusha Rao *
50e8527d0SAnusha Rao * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
6758aa2d7SLuo Jie * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
70e8527d0SAnusha Rao */
80e8527d0SAnusha Rao
90e8527d0SAnusha Rao/dts-v1/;
100e8527d0SAnusha Rao
110e2f2c50SAnusha Rao#include <dt-bindings/gpio/gpio.h>
120e2f2c50SAnusha Rao#include <dt-bindings/input/input.h>
132928212bSKathiravan Thirumoorthy#include <dt-bindings/leds/common.h>
140e8527d0SAnusha Rao#include "ipq9574.dtsi"
150e8527d0SAnusha Rao
160e8527d0SAnusha Rao/ {
170e8527d0SAnusha Rao	aliases {
180e8527d0SAnusha Rao		serial0 = &blsp1_uart2;
190e8527d0SAnusha Rao	};
200e8527d0SAnusha Rao
210e8527d0SAnusha Rao	chosen {
220e8527d0SAnusha Rao		stdout-path = "serial0:115200n8";
230e8527d0SAnusha Rao	};
240e8527d0SAnusha Rao
250e8527d0SAnusha Rao	regulator_fixed_3p3: s3300 {
260e8527d0SAnusha Rao		compatible = "regulator-fixed";
270e8527d0SAnusha Rao		regulator-min-microvolt = <3300000>;
280e8527d0SAnusha Rao		regulator-max-microvolt = <3300000>;
290e8527d0SAnusha Rao		regulator-boot-on;
300e8527d0SAnusha Rao		regulator-always-on;
310e8527d0SAnusha Rao		regulator-name = "fixed_3p3";
320e8527d0SAnusha Rao	};
330e8527d0SAnusha Rao
340e8527d0SAnusha Rao	regulator_fixed_0p925: s0925 {
350e8527d0SAnusha Rao		compatible = "regulator-fixed";
360e8527d0SAnusha Rao		regulator-min-microvolt = <925000>;
370e8527d0SAnusha Rao		regulator-max-microvolt = <925000>;
380e8527d0SAnusha Rao		regulator-boot-on;
390e8527d0SAnusha Rao		regulator-always-on;
400e8527d0SAnusha Rao		regulator-name = "fixed_0p925";
410e8527d0SAnusha Rao	};
420e2f2c50SAnusha Rao
430e2f2c50SAnusha Rao	gpio-keys {
440e2f2c50SAnusha Rao		compatible = "gpio-keys";
450e2f2c50SAnusha Rao		pinctrl-0 = <&gpio_keys_default>;
460e2f2c50SAnusha Rao		pinctrl-names = "default";
470e2f2c50SAnusha Rao
480e2f2c50SAnusha Rao		button-wps {
490e2f2c50SAnusha Rao			label = "wps";
500e2f2c50SAnusha Rao			linux,code = <KEY_WPS_BUTTON>;
510e2f2c50SAnusha Rao			gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
520e2f2c50SAnusha Rao			debounce-interval = <60>;
530e2f2c50SAnusha Rao		};
540e2f2c50SAnusha Rao	};
552928212bSKathiravan Thirumoorthy
562928212bSKathiravan Thirumoorthy	leds {
572928212bSKathiravan Thirumoorthy		compatible = "gpio-leds";
582928212bSKathiravan Thirumoorthy		pinctrl-0 = <&gpio_leds_default>;
592928212bSKathiravan Thirumoorthy		pinctrl-names = "default";
602928212bSKathiravan Thirumoorthy
612928212bSKathiravan Thirumoorthy		led-0 {
622928212bSKathiravan Thirumoorthy			color = <LED_COLOR_ID_GREEN>;
632928212bSKathiravan Thirumoorthy			function = LED_FUNCTION_WLAN;
642928212bSKathiravan Thirumoorthy			gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
652928212bSKathiravan Thirumoorthy			linux,default-trigger = "phy0tx";
662928212bSKathiravan Thirumoorthy			default-state = "off";
672928212bSKathiravan Thirumoorthy		};
682928212bSKathiravan Thirumoorthy	};
690e8527d0SAnusha Rao};
700e8527d0SAnusha Rao
710e8527d0SAnusha Rao&blsp1_spi0 {
720e8527d0SAnusha Rao	pinctrl-0 = <&spi_0_pins>;
730e8527d0SAnusha Rao	pinctrl-names = "default";
740e8527d0SAnusha Rao	status = "okay";
750e8527d0SAnusha Rao
760e8527d0SAnusha Rao	flash@0 {
770e8527d0SAnusha Rao		compatible = "micron,n25q128a11", "jedec,spi-nor";
780e8527d0SAnusha Rao		reg = <0>;
790e8527d0SAnusha Rao		#address-cells = <1>;
800e8527d0SAnusha Rao		#size-cells = <1>;
810e8527d0SAnusha Rao		spi-max-frequency = <50000000>;
820e8527d0SAnusha Rao	};
830e8527d0SAnusha Rao};
840e8527d0SAnusha Rao
850e8527d0SAnusha Rao&blsp1_uart2 {
860e8527d0SAnusha Rao	pinctrl-0 = <&uart2_pins>;
870e8527d0SAnusha Rao	pinctrl-names = "default";
880e8527d0SAnusha Rao	status = "okay";
890e8527d0SAnusha Rao};
900e8527d0SAnusha Rao
910e8527d0SAnusha Rao&rpm_requests {
920e8527d0SAnusha Rao	regulators {
930e8527d0SAnusha Rao		compatible = "qcom,rpm-mp5496-regulators";
940e8527d0SAnusha Rao
950e8527d0SAnusha Rao		ipq9574_s1: s1 {
960e8527d0SAnusha Rao		/*
970e8527d0SAnusha Rao		 * During kernel bootup, the SoC runs at 800MHz with 875mV set by the bootloaders.
980e8527d0SAnusha Rao		 * During regulator registration, kernel not knowing the initial voltage,
990e8527d0SAnusha Rao		 * considers it as zero and brings up the regulators with minimum supported voltage.
1000e8527d0SAnusha Rao		 * Update the regulator-min-microvolt with SVS voltage of 725mV so that
1010e8527d0SAnusha Rao		 * the regulators are brought up with 725mV which is sufficient for all the
1020e8527d0SAnusha Rao		 * corner parts to operate at 800MHz
1030e8527d0SAnusha Rao		 */
1040e8527d0SAnusha Rao			regulator-min-microvolt = <725000>;
1050e8527d0SAnusha Rao			regulator-max-microvolt = <1075000>;
1060e8527d0SAnusha Rao		};
1070e8527d0SAnusha Rao
1080e8527d0SAnusha Rao		mp5496_l2: l2 {
1090e8527d0SAnusha Rao			regulator-min-microvolt = <1800000>;
1100e8527d0SAnusha Rao			regulator-max-microvolt = <1800000>;
1110e8527d0SAnusha Rao			regulator-always-on;
1120e8527d0SAnusha Rao			regulator-boot-on;
1130e8527d0SAnusha Rao		};
114*4f4c905eSVaradarajan Narayanan
115*4f4c905eSVaradarajan Narayanan		mp5496_l5: l5 {
116*4f4c905eSVaradarajan Narayanan			regulator-min-microvolt = <1800000>;
117*4f4c905eSVaradarajan Narayanan			regulator-max-microvolt = <1800000>;
118*4f4c905eSVaradarajan Narayanan			regulator-always-on;
119*4f4c905eSVaradarajan Narayanan			regulator-boot-on;
120*4f4c905eSVaradarajan Narayanan		};
1210e8527d0SAnusha Rao	};
1220e8527d0SAnusha Rao};
1230e8527d0SAnusha Rao
1240e8527d0SAnusha Rao&sleep_clk {
1250e8527d0SAnusha Rao	clock-frequency = <32000>;
1260e8527d0SAnusha Rao};
1270e8527d0SAnusha Rao
1280e8527d0SAnusha Rao&tlmm {
1290e8527d0SAnusha Rao	spi_0_pins: spi-0-state {
1300e8527d0SAnusha Rao		pins = "gpio11", "gpio12", "gpio13", "gpio14";
1310e8527d0SAnusha Rao		function = "blsp0_spi";
1320e8527d0SAnusha Rao		drive-strength = <8>;
1330e8527d0SAnusha Rao		bias-disable;
1340e8527d0SAnusha Rao	};
1350e2f2c50SAnusha Rao
1360e2f2c50SAnusha Rao	gpio_keys_default: gpio-keys-default-state {
1370e2f2c50SAnusha Rao		pins = "gpio37";
1380e2f2c50SAnusha Rao		function = "gpio";
1390e2f2c50SAnusha Rao		drive-strength = <8>;
1400e2f2c50SAnusha Rao		bias-pull-up;
1410e2f2c50SAnusha Rao	};
1422928212bSKathiravan Thirumoorthy
1432928212bSKathiravan Thirumoorthy	gpio_leds_default: gpio-leds-default-state {
1442928212bSKathiravan Thirumoorthy		pins = "gpio64";
1452928212bSKathiravan Thirumoorthy		function = "gpio";
1462928212bSKathiravan Thirumoorthy		drive-strength = <8>;
1472928212bSKathiravan Thirumoorthy		bias-pull-up;
1482928212bSKathiravan Thirumoorthy	};
1492f24e13cSMd Sadre Alam
1502f24e13cSMd Sadre Alam	qpic_snand_default_state: qpic-snand-default-state {
1512f24e13cSMd Sadre Alam		clock-pins {
1522f24e13cSMd Sadre Alam			pins = "gpio5";
1532f24e13cSMd Sadre Alam			function = "qspi_clk";
1542f24e13cSMd Sadre Alam			drive-strength = <8>;
1552f24e13cSMd Sadre Alam			bias-disable;
1562f24e13cSMd Sadre Alam		};
1572f24e13cSMd Sadre Alam
1582f24e13cSMd Sadre Alam		cs-pins {
1592f24e13cSMd Sadre Alam			pins = "gpio4";
1602f24e13cSMd Sadre Alam			function = "qspi_cs";
1612f24e13cSMd Sadre Alam			drive-strength = <8>;
1622f24e13cSMd Sadre Alam			bias-disable;
1632f24e13cSMd Sadre Alam		};
1642f24e13cSMd Sadre Alam
1652f24e13cSMd Sadre Alam		data-pins {
1662f24e13cSMd Sadre Alam			pins = "gpio0", "gpio1", "gpio2", "gpio3";
1672f24e13cSMd Sadre Alam			function = "qspi_data";
1682f24e13cSMd Sadre Alam			drive-strength = <8>;
1692f24e13cSMd Sadre Alam			bias-disable;
1702f24e13cSMd Sadre Alam		};
1712f24e13cSMd Sadre Alam	};
1722f24e13cSMd Sadre Alam};
1732f24e13cSMd Sadre Alam
1742f24e13cSMd Sadre Alam&qpic_bam {
1752f24e13cSMd Sadre Alam	status = "okay";
1762f24e13cSMd Sadre Alam};
1772f24e13cSMd Sadre Alam
1782f24e13cSMd Sadre Alam&qpic_nand {
1792f24e13cSMd Sadre Alam	pinctrl-0 = <&qpic_snand_default_state>;
1802f24e13cSMd Sadre Alam	pinctrl-names = "default";
1812f24e13cSMd Sadre Alam
1822f24e13cSMd Sadre Alam	status = "okay";
1832f24e13cSMd Sadre Alam
1842f24e13cSMd Sadre Alam	flash@0 {
1852f24e13cSMd Sadre Alam		compatible = "spi-nand";
1862f24e13cSMd Sadre Alam		reg = <0>;
1872f24e13cSMd Sadre Alam		#address-cells = <1>;
1882f24e13cSMd Sadre Alam		#size-cells = <1>;
1892f24e13cSMd Sadre Alam		nand-ecc-engine = <&qpic_nand>;
1902f24e13cSMd Sadre Alam		nand-ecc-strength = <4>;
1912f24e13cSMd Sadre Alam		nand-ecc-step-size = <512>;
1922f24e13cSMd Sadre Alam	};
1930e8527d0SAnusha Rao};
1940e8527d0SAnusha Rao
1950e8527d0SAnusha Rao&usb_0_dwc3 {
1960e8527d0SAnusha Rao	dr_mode = "host";
1970e8527d0SAnusha Rao};
1980e8527d0SAnusha Rao
1990e8527d0SAnusha Rao&usb_0_qmpphy {
200*4f4c905eSVaradarajan Narayanan	vdda-pll-supply = <&mp5496_l5>;
2010e8527d0SAnusha Rao	vdda-phy-supply = <&regulator_fixed_0p925>;
2020e8527d0SAnusha Rao
2030e8527d0SAnusha Rao	status = "okay";
2040e8527d0SAnusha Rao};
2050e8527d0SAnusha Rao
2060e8527d0SAnusha Rao&usb_0_qusbphy {
2070e8527d0SAnusha Rao	vdd-supply = <&regulator_fixed_0p925>;
208*4f4c905eSVaradarajan Narayanan	vdda-pll-supply = <&mp5496_l5>;
2090e8527d0SAnusha Rao	vdda-phy-dpdm-supply = <&regulator_fixed_3p3>;
2100e8527d0SAnusha Rao
2110e8527d0SAnusha Rao	status = "okay";
2120e8527d0SAnusha Rao};
2130e8527d0SAnusha Rao
2140e8527d0SAnusha Rao&usb3 {
2150e8527d0SAnusha Rao	status = "okay";
2160e8527d0SAnusha Rao};
2170e8527d0SAnusha Rao
218758aa2d7SLuo Jie/*
219758aa2d7SLuo Jie * The bootstrap pins for the board select the XO clock frequency
220758aa2d7SLuo Jie * (48 MHZ or 96 MHZ used for different RDP type board). This setting
221758aa2d7SLuo Jie * automatically enables the right dividers, to ensure the reference
222758aa2d7SLuo Jie * clock output from WiFi to the CMN PLL is 48 MHZ.
223758aa2d7SLuo Jie */
224758aa2d7SLuo Jie&ref_48mhz_clk {
225758aa2d7SLuo Jie	clock-div = <1>;
226758aa2d7SLuo Jie	clock-mult = <1>;
227758aa2d7SLuo Jie};
228758aa2d7SLuo Jie
229050b3126SLuo Jie/*
230050b3126SLuo Jie * The frequency of xo_board_clk is fixed to 24 MHZ, which is routed
231050b3126SLuo Jie * from WiFi output clock 48 MHZ divided by 2.
232050b3126SLuo Jie */
2330e8527d0SAnusha Rao&xo_board_clk {
234050b3126SLuo Jie	clock-div = <2>;
235050b3126SLuo Jie	clock-mult = <1>;
2360e8527d0SAnusha Rao};
237758aa2d7SLuo Jie
238758aa2d7SLuo Jie&xo_clk {
239758aa2d7SLuo Jie	clock-frequency = <48000000>;
240758aa2d7SLuo Jie};
241