Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: BSD-3-Clause
0002 /*
0003  * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
0004  */
0005 
0006 #include "sm8350.dtsi"
0007 #include "pm8350.dtsi"
0008 #include "pm8350b.dtsi"
0009 #include "pm8350c.dtsi"
0010 #include "pmk8350.dtsi"
0011 #include "pmr735a.dtsi"
0012 #include "pmr735b.dtsi"
0013 
0014 / {
0015         /*
0016          * Yes, you are correct, there is NO MORE {msm,board,pmic}-id on SM8350!
0017          * Adding it will cause the bootloader to go crazy and randomly crash
0018          * shortly after closing UEFI boot services.. Perhaps that has something
0019          * to do with the OS running inside a VM now..?
0020          */
0021 
0022         chassis-type = "handset";
0023 
0024         chosen {
0025                 #address-cells = <2>;
0026                 #size-cells = <2>;
0027                 ranges;
0028 
0029                 framebuffer: framebuffer@e1000000 {
0030                         compatible = "simple-framebuffer";
0031                         reg = <0 0xe1000000 0 0x2300000>;
0032 
0033                         /* The display, even though it's 4K, initializes at 1080-ish p */
0034                         width = <1096>;
0035                         height = <2560>;
0036                         stride = <(1096 * 4)>;
0037                         format = "a8r8g8b8";
0038                         /*
0039                          * That's (going to be) a lot of clocks, but it's necessary due
0040                          * to unused clk cleanup & no panel driver yet
0041                          */
0042                         clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
0043                                  <&gcc GCC_DISP_SF_AXI_CLK>;
0044                 };
0045         };
0046 
0047         gpio-keys {
0048                 compatible = "gpio-keys";
0049 
0050                 /* For reasons still unknown, GAssist key and Camera Focus/Shutter don't work.. */
0051 
0052                 key-vol-down {
0053                         label = "Volume Down";
0054                         linux,code = <KEY_VOLUMEDOWN>;
0055                         gpios = <&pmk8350_gpios 3 GPIO_ACTIVE_LOW>;
0056                         debounce-interval = <15>;
0057                         linux,can-disable;
0058                         gpio-key,wakeup;
0059                 };
0060         };
0061 
0062         reserved-memory {
0063                 cont_splash_mem: memory@e1000000 {
0064                         reg = <0 0xe1000000 0 0x2300000>;
0065                         no-map;
0066                 };
0067 
0068                 ramoops@ffc00000 {
0069                         compatible = "ramoops";
0070                         reg = <0 0xffc00000 0 0x100000>;
0071                         console-size = <0x40000>;
0072                         record-size = <0x1000>;
0073                         no-map;
0074                 };
0075         };
0076 };
0077 
0078 &adsp {
0079         status = "okay";
0080         firmware-name = "qcom/adsp.mbn";
0081 };
0082 
0083 &cdsp {
0084         status = "okay";
0085         firmware-name = "qcom/cdsp.mbn";
0086 };
0087 
0088 &i2c1 {
0089         status = "okay";
0090         clock-frequency = <1000000>;
0091 
0092         /* Some subset of SONY IMX663 camera sensor @ 38 */
0093 };
0094 
0095 &i2c2 {
0096         status = "okay";
0097         clock-frequency = <400000>;
0098 
0099         /* Richwave RTC6226 FM Radio Receiver @ 64 */
0100 };
0101 
0102 &i2c4 {
0103         status = "okay";
0104         clock-frequency = <400000>;
0105 
0106         /* Samsung Touchscreen (needs I2C GPI DMA) @ 48 */
0107 };
0108 
0109 &i2c11 {
0110         status = "okay";
0111         clock-frequency = <1000000>;
0112 
0113         cs35l41_l: cs35l41@40 {
0114                 compatible = "cirrus,cs35l41";
0115                 reg = <0x40>;
0116                 interrupt-parent = <&tlmm>;
0117                 interrupts = <36 IRQ_TYPE_LEVEL_LOW>;
0118                 reset-gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
0119                 cirrus,boost-peak-milliamp = <4000>;
0120                 cirrus,boost-ind-nanohenry = <1000>;
0121                 cirrus,boost-cap-microfarad = <15>;
0122                 cirrus,asp-sdout-hiz = <3>;
0123                 cirrus,gpio2-src-select = <2>;
0124                 cirrus,gpio2-output-enable;
0125                 #sound-dai-cells = <1>;
0126         };
0127 
0128         cs35l41_r: cs35l41@41 {
0129                 compatible = "cirrus,cs35l41";
0130                 reg = <0x41>;
0131                 interrupt-parent = <&tlmm>;
0132                 interrupts = <36 IRQ_TYPE_LEVEL_LOW>;
0133                 reset-gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
0134                 cirrus,boost-peak-milliamp = <4000>;
0135                 cirrus,boost-ind-nanohenry = <1000>;
0136                 cirrus,boost-cap-microfarad = <15>;
0137                 cirrus,asp-sdout-hiz = <3>;
0138                 cirrus,gpio2-src-select = <2>;
0139                 cirrus,gpio2-output-enable;
0140                 #sound-dai-cells = <1>;
0141         };
0142 };
0143 
0144 &i2c12 {
0145         status = "okay";
0146         /* Clock frequency was not specified downstream, let's park it to 100 KHz */
0147         clock-frequency = <100000>;
0148 
0149         /* AMS TCS3490 RGB+IR color sensor @ 72 */
0150 };
0151 
0152 &i2c13 {
0153         status = "okay";
0154         /* Clock frequency was not specified downstream, let's park it to 100 KHz */
0155         clock-frequency = <100000>;
0156 
0157         /* Qualcomm PM8008i/PM8008j (?) @ 8, 9, c, d */
0158         /* Dialog SLG51000 CMIC @ 75 */
0159 };
0160 
0161 &i2c15 {
0162         status = "okay";
0163         clock-frequency = <400000>;
0164 
0165         /* NXP SN1X0 NFC @ 28 */
0166 };
0167 
0168 &i2c17 {
0169         status = "okay";
0170         clock-frequency = <1000000>;
0171 
0172         /* Cirrus Logic CS40L25A boosted haptics driver @ 40 */
0173 };
0174 
0175 &ipa {
0176         status = "okay";
0177         memory-region = <&pil_ipa_fw_mem>;
0178         firmware-name = "qcom/ipa_fws.mbn";
0179 };
0180 
0181 &mpss {
0182         status = "okay";
0183         firmware-name = "qcom/modem.mbn";
0184 };
0185 
0186 &pmk8350_rtc {
0187         status = "okay";
0188 };
0189 
0190 &pon_pwrkey {
0191         status = "okay";
0192 };
0193 
0194 &pon_resin {
0195         status = "okay";
0196         linux,code = <KEY_VOLUMEUP>;
0197 };
0198 
0199 &qupv3_id_0 {
0200         status = "okay";
0201 };
0202 
0203 &qupv3_id_1 {
0204         status = "okay";
0205 };
0206 
0207 &qupv3_id_2 {
0208         status = "okay";
0209 };
0210 
0211 &slpi {
0212         status = "okay";
0213         firmware-name = "qcom/slpi.mbn";
0214 };
0215 
0216 &spi14 {
0217         status = "okay";
0218 
0219         /* NXP SN1X0 NFC Secure Element @ 0 */
0220 };
0221 
0222 &tlmm {
0223         gpio-reserved-ranges = <44 4>;
0224 
0225         ts_int_default: ts-int-default {
0226                 pin = "gpio23";
0227                 function = "gpio";
0228                 drive-strength = <2>;
0229                 bias-disable;
0230                 input-enable;
0231         };
0232 };
0233 
0234 /* BIG WARNING! DO NOT TOUCH UFS, YOUR DEVICE WILL DIE! */
0235 &ufs_mem_hc { status = "disabled"; };
0236 &ufs_mem_phy { status = "disabled"; };
0237 
0238 /* TODO: Make USB3 work (perhaps needs regulators for higher-current operation?) */
0239 &usb_1 {
0240         status = "okay";
0241 
0242         qcom,select-utmi-as-pipe-clk;
0243 };
0244 
0245 &usb_1_dwc3 {
0246         dr_mode = "peripheral";
0247 
0248         maximum-speed = "high-speed";
0249         phys = <&usb_1_hsphy>;
0250         phy-names = "usb2-phy";
0251 };
0252 
0253 &usb_1_hsphy {
0254         status = "okay";
0255 };
0256 
0257 &usb_1_qmpphy {
0258         status = "okay";
0259 };