1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2022, Linaro Limited
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
12 #include "sa8540p.dtsi"
13 #include "sa8540p-pmics.dtsi"
16 model = "Qualcomm SA8540P Ride";
17 compatible = "qcom,sa8540p-ride", "qcom,sa8540p";
29 stdout-path = "serial0:115200n8";
35 compatible = "qcom,pm8150-rpmh-regulators";
39 regulator-name = "vreg_l3a";
40 regulator-min-microvolt = <1200000>;
41 regulator-max-microvolt = <1208000>;
42 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
46 regulator-name = "vreg_l5a";
47 regulator-min-microvolt = <912000>;
48 regulator-max-microvolt = <912000>;
49 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
53 regulator-name = "vreg_l7a";
54 regulator-min-microvolt = <1800000>;
55 regulator-max-microvolt = <1800000>;
56 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
60 regulator-name = "vreg_l11a";
61 regulator-min-microvolt = <880000>;
62 regulator-max-microvolt = <880000>;
63 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
67 regulator-name = "vreg_l13a";
68 regulator-min-microvolt = <3072000>;
69 regulator-max-microvolt = <3072000>;
70 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
75 compatible = "qcom,pm8150-rpmh-regulators";
79 regulator-name = "vreg_l1c";
80 regulator-min-microvolt = <912000>;
81 regulator-max-microvolt = <912000>;
82 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
86 regulator-name = "vreg_l2c";
87 regulator-min-microvolt = <3072000>;
88 regulator-max-microvolt = <3072000>;
89 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
93 regulator-name = "vreg_l4c";
94 regulator-min-microvolt = <1200000>;
95 regulator-max-microvolt = <1208000>;
96 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
100 regulator-name = "vreg_l6c";
101 regulator-min-microvolt = <1200000>;
102 regulator-max-microvolt = <1200000>;
103 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
104 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
105 RPMH_REGULATOR_MODE_HPM>;
106 regulator-allow-set-load;
110 regulator-name = "vreg_l7c";
111 regulator-min-microvolt = <1800000>;
112 regulator-max-microvolt = <1800000>;
113 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
117 regulator-name = "vreg_l17c";
118 regulator-min-microvolt = <2504000>;
119 regulator-max-microvolt = <2504000>;
120 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
121 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
122 RPMH_REGULATOR_MODE_HPM>;
123 regulator-allow-set-load;
128 compatible = "qcom,pm8150-rpmh-regulators";
132 regulator-name = "vreg_l3g";
133 regulator-min-microvolt = <1200000>;
134 regulator-max-microvolt = <1200000>;
135 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
139 regulator-name = "vreg_l7g";
140 regulator-min-microvolt = <1800000>;
141 regulator-max-microvolt = <1800000>;
142 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
146 regulator-name = "vreg_l8g";
147 regulator-min-microvolt = <880000>;
148 regulator-max-microvolt = <880000>;
149 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
155 snps,mtl-rx-config = <ðernet0_mtl_rx_setup>;
156 snps,mtl-tx-config = <ðernet0_mtl_tx_setup>;
159 phy-handle = <&rgmii_phy>;
160 phy-mode = "rgmii-txid";
162 pinctrl-names = "default";
163 pinctrl-0 = <ðernet0_default>;
168 compatible = "snps,dwmac-mdio";
169 #address-cells = <1>;
172 /* Marvell 88EA1512 */
174 compatible = "ethernet-phy-id0141.0dd4";
177 interrupts-extended = <&tlmm 127 IRQ_TYPE_EDGE_FALLING>;
179 reset-gpios = <&pmm8540c_gpios 1 GPIO_ACTIVE_LOW>;
180 reset-assert-us = <11000>;
181 reset-deassert-us = <70000>;
183 device_type = "ethernet-phy";
185 /* Set to RGMII_SGMII mode and soft reset. Turn off auto-negotiation
186 * from userspace to talk to the switch on the SGMII side of things
189 /* Set MODE[2:0] to RGMII_SGMII */
190 <0x12 0x14 0xfff8 0x4>,
191 /* Soft reset required after changing MODE[2:0] */
192 <0x12 0x14 0x7fff 0x8000>;
196 ethernet0_mtl_rx_setup: rx-queues-config {
197 snps,rx-queues-to-use = <1>;
202 snps,map-to-dma-channel = <0x0>;
204 snps,priority = <0x1>;
209 snps,map-to-dma-channel = <0x1>;
215 snps,map-to-dma-channel = <0x2>;
221 snps,map-to-dma-channel = <0x3>;
222 snps,priority = <0xc>;
226 ethernet0_mtl_tx_setup: tx-queues-config {
227 snps,tx-queues-to-use = <1>;
240 snps,send_slope = <0x1000>;
241 snps,idle_slope = <0x1000>;
242 snps,high_credit = <0x3e800>;
243 snps,low_credit = <0xffc18000>;
248 snps,send_slope = <0x1000>;
249 snps,idle_slope = <0x1000>;
250 snps,high_credit = <0x3e800>;
251 snps,low_credit = <0xffc18000>;
257 snps,mtl-rx-config = <ðernet1_mtl_rx_setup>;
258 snps,mtl-tx-config = <ðernet1_mtl_tx_setup>;
261 phy-mode = "rgmii-txid";
263 pinctrl-names = "default";
264 pinctrl-0 = <ðernet1_default>;
273 ethernet1_mtl_rx_setup: rx-queues-config {
274 snps,rx-queues-to-use = <1>;
279 snps,map-to-dma-channel = <0x0>;
281 snps,priority = <0x1>;
286 snps,map-to-dma-channel = <0x1>;
292 snps,map-to-dma-channel = <0x2>;
298 snps,map-to-dma-channel = <0x3>;
299 snps,priority = <0xc>;
303 ethernet1_mtl_tx_setup: tx-queues-config {
304 snps,tx-queues-to-use = <1>;
317 snps,send_slope = <0x1000>;
318 snps,idle_slope = <0x1000>;
319 snps,high_credit = <0x3e800>;
320 snps,low_credit = <0xffc18000>;
325 snps,send_slope = <0x1000>;
326 snps,idle_slope = <0x1000>;
327 snps,high_credit = <0x3e800>;
328 snps,low_credit = <0xffc18000>;
334 pinctrl-names = "default";
335 pinctrl-0 = <&i2c0_default>;
341 pinctrl-names = "default";
342 pinctrl-0 = <&i2c1_default>;
348 pinctrl-names = "default";
349 pinctrl-0 = <&i2c12_default>;
355 pinctrl-names = "default";
356 pinctrl-0 = <&i2c15_default>;
362 pinctrl-names = "default";
363 pinctrl-0 = <&i2c18_default>;
369 ranges = <0x01000000 0x0 0x3c200000 0x0 0x3c200000 0x0 0x100000>,
370 <0x02000000 0x0 0x3c300000 0x0 0x3c300000 0x0 0x1d00000>,
371 <0x03000000 0x5 0x00000000 0x5 0x00000000 0x1 0x00000000>;
373 perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>;
374 wake-gpios = <&tlmm 145 GPIO_ACTIVE_HIGH>;
376 pinctrl-names = "default";
377 pinctrl-0 = <&pcie2a_default>;
383 vdda-phy-supply = <&vreg_l11a>;
384 vdda-pll-supply = <&vreg_l3a>;
390 ranges = <0x01000000 0x0 0x40200000 0x0 0x40200000 0x0 0x100000>,
391 <0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x20000000>,
392 <0x03000000 0x6 0x00000000 0x6 0x00000000 0x2 0x00000000>;
394 perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>;
395 wake-gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>;
397 pinctrl-names = "default";
398 pinctrl-0 = <&pcie3a_default>;
404 vdda-phy-supply = <&vreg_l11a>;
405 vdda-pll-supply = <&vreg_l3a>;
411 nvmem-cells = <&rtc_offset>;
412 nvmem-cell-names = "offset";
420 rtc_offset: rtc-offset@a0 {
438 firmware-name = "qcom/sa8540p/cdsp0.mbn";
443 firmware-name = "qcom/sa8540p/cdsp1.mbn";
448 compatible = "qcom,geni-debug-uart";
453 reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>;
455 vcc-supply = <&vreg_l17c>;
456 vccq-supply = <&vreg_l6c>;
462 vdda-phy-supply = <&vreg_l8g>;
463 vdda-pll-supply = <&vreg_l3g>;
473 dr_mode = "peripheral";
477 vdda-pll-supply = <&vreg_l5a>;
478 vdda18-supply = <&vreg_l7a>;
479 vdda33-supply = <&vreg_l13a>;
485 vdda-phy-supply = <&vreg_l3a>;
486 vdda-pll-supply = <&vreg_l5a>;
492 vdda-pll-supply = <&vreg_l5a>;
493 vdda18-supply = <&vreg_l7g>;
494 vdda33-supply = <&vreg_l13a>;
500 vdda-phy-supply = <&vreg_l3a>;
501 vdda-pll-supply = <&vreg_l5a>;
507 clock-frequency = <38400000>;
513 ethernet0_default: ethernet0-default-state {
516 function = "rgmii_0";
517 drive-strength = <16>;
523 function = "rgmii_0";
524 drive-strength = <16>;
529 pins = "gpio183", "gpio184", "gpio185", "gpio186", "gpio187", "gpio188";
530 function = "rgmii_0";
531 drive-strength = <16>;
536 pins = "gpio177", "gpio178", "gpio179", "gpio180", "gpio181", "gpio182";
537 function = "rgmii_0";
538 drive-strength = <16>;
543 ethernet1_default: ethernet1-default-state {
546 function = "rgmii_1";
547 drive-strength = <16>;
553 function = "rgmii_1";
554 drive-strength = <16>;
559 pins = "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110";
560 function = "rgmii_1";
561 drive-strength = <16>;
566 pins = "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104";
567 function = "rgmii_1";
568 drive-strength = <16>;
573 i2c0_default: i2c0-default-state {
574 /* To USB7002T-I/KDXVA0 USB hub (SIP1 only) */
575 pins = "gpio135", "gpio136";
577 drive-strength = <2>;
581 i2c1_default: i2c1-default-state {
582 /* To PM40028B-F3EI PCIe switch */
583 pins = "gpio158", "gpio159";
585 drive-strength = <2>;
589 i2c12_default: i2c12-default-state {
590 /* To Maxim max20411 */
591 pins = "gpio0", "gpio1";
593 drive-strength = <2>;
597 i2c15_default: i2c15-default-state {
598 /* To display connector (SIP1 only) */
599 pins = "gpio36", "gpio37";
601 drive-strength = <2>;
605 i2c18_default: i2c18-default-state {
606 /* To ASM330LHH IMU (SIP1 only) */
607 pins = "gpio66", "gpio67";
609 drive-strength = <2>;
613 pcie2a_default: pcie2a-default-state {
617 drive-strength = <2>;
623 function = "pcie2a_clkreq";
624 drive-strength = <2>;
631 drive-strength = <2>;
636 pcie3a_default: pcie3a-default-state {
640 drive-strength = <2>;
646 function = "pcie3a_clkreq";
647 drive-strength = <2>;
654 drive-strength = <2>;