Files
build/patch/kernel/archive/sm8550-6.12/0050_arm64--dts--qcom--Add-AYN-Odin2.patch
2025-03-15 10:29:56 +01:00

369 lines
8.2 KiB
Diff

diff -rupbN linux.orig/arch/arm64/boot/dts/qcom/qcs8550-ayn-odin2.dts linux/arch/arm64/boot/dts/qcom/qcs8550-ayn-odin2.dts
--- linux.orig/arch/arm64/boot/dts/qcom/qcs8550-ayn-odin2.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/qcom/qcs8550-ayn-odin2.dts 2025-02-26 13:52:56.398992835 +0000
@@ -0,0 +1,364 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2025, Teguh Sobirin.
+ * Copyright (c) 2025, ROCKNIX (https://github.com/ROCKNIX)
+ */
+
+/dts-v1/;
+
+#include "qcs8550-ayn-common.dtsi"
+
+/ {
+ model = "AYN Odin 2";
+ compatible = "ayn,odin2", "qcom,qcs8550", "qcom,sm8550";
+ qcom,msm-id = <603 0x20000>;
+ qcom,board-id = <0x1001f 0>;
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pmk8550_pwm 0 860000>;
+ brightness-levels = <1023 0>;
+ num-interpolated-steps = <1023>;
+ default-brightness-level = <600>;
+ power-supply = <&vph_pwr>;
+ enable-gpios = <&pmk8550_gpios 5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm_backlight_default>;
+ status = "okay";
+ };
+
+ vdd_disp_2v8: vdd-disp-2v8-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_disp_2v8";
+
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+
+ gpio = <&tlmm 142 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ led_left_side: led-controller-1 {
+ compatible = "pwm-leds-multicolor";
+
+ multi-led {
+ label = "left-side";
+ color = <LED_COLOR_ID_RGB>;
+ max-brightness = <255>;
+
+ led-red {
+ color = <LED_COLOR_ID_RED>;
+ pwms = <&pwm_rgb_left 0>;
+ };
+
+ led-green {
+ color = <LED_COLOR_ID_GREEN>;
+ pwms = <&pwm_rgb_left 1>;
+ };
+
+ led-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ pwms = <&pwm_rgb_left 2>;
+ };
+ };
+ };
+
+ led_left_joystick: led-controller-2 {
+ compatible = "pwm-leds-multicolor";
+
+ multi-led {
+ label = "left-joystick";
+ color = <LED_COLOR_ID_RGB>;
+ max-brightness = <255>;
+
+ led-red {
+ color = <LED_COLOR_ID_RED>;
+ pwms = <&pwm_rgb_left 6>;
+ };
+
+ led-green {
+ color = <LED_COLOR_ID_GREEN>;
+ pwms = <&pwm_rgb_left 7>;
+ };
+
+ led-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ pwms = <&pwm_rgb_left 8>;
+ };
+ };
+ };
+
+ led_right_side: led-controller-3 {
+ compatible = "pwm-leds-multicolor";
+
+ multi-led {
+ label = "right-side";
+ color = <LED_COLOR_ID_RGB>;
+ max-brightness = <255>;
+
+ led-red {
+ color = <LED_COLOR_ID_RED>;
+ pwms = <&pwm_rgb_right 0>;
+ };
+
+ led-green {
+ color = <LED_COLOR_ID_GREEN>;
+ pwms = <&pwm_rgb_right 1>;
+ };
+
+ led-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ pwms = <&pwm_rgb_right 2>;
+ };
+ };
+ };
+
+ led_right_joystick: led-controller-4 {
+ compatible = "pwm-leds-multicolor";
+
+ multi-led {
+ label = "right-joystick";
+ color = <LED_COLOR_ID_RGB>;
+ max-brightness = <255>;
+
+ led-red {
+ color = <LED_COLOR_ID_RED>;
+ pwms = <&pwm_rgb_right 6>;
+ };
+
+ led-green {
+ color = <LED_COLOR_ID_GREEN>;
+ pwms = <&pwm_rgb_right 7>;
+ };
+
+ led-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ pwms = <&pwm_rgb_right 8>;
+ };
+ };
+ };
+};
+
+&display_panel {
+ compatible = "syna,td4328";
+
+ vddio-supply = <&vreg_l12b_1p8>;
+ vdd-supply = <&vdd_disp_2v8>;
+
+ backlight = <&backlight>;
+ reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
+
+ rotation = <90>;
+};
+
+&gpu {
+ zap-shader {
+ firmware-name = "qcom/sm8550/ayn/odin2portal/a740_zap.mbn";
+ };
+};
+
+&pmk8550_gpios {
+ pmk8550_sleep_clk: sleep-clk-state {
+ pins = "gpio3";
+ function = "func1";
+ input-disable;
+ output-enable;
+ bias-disable;
+ power-source = <0>;
+ };
+
+ pwm_backlight_default: pwm-backlight-default-state {
+ pins = "gpio5";
+ function = "func3";
+ input-disable;
+ output-low;
+ output-enable;
+ bias-disable;
+ power-source = <0>;
+ qcom,drive-strength = <2>;
+ };
+};
+
+&pmk8550_pwm {
+ status = "okay";
+};
+
+&i2c0 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ pwm_rgb_left: sn3112@54 {
+ compatible = "si-en,sn3112-pwm";
+ reg = <0x54>;
+ sdb-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&vdd_mcu_3v3>;
+ #pwm-cells = <1>;
+ };
+};
+
+&i2c4 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ touchscreen@20 {
+ compatible = "syna,rmi4-i2c";
+ reg = <0x20>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts-extended = <&tlmm 25 0x2008>;
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&ts_int_default>;
+ pinctrl-1 = <&ts_int_sleep>;
+
+ vio-supply = <&vreg_l12b_1p8>;
+
+ syna,startup-delay-ms = <200>;
+ syna,reset-delay-ms = <200>;
+
+ rmi4-f01@1 {
+ syna,nosleep-mode = <0x1>;
+ reg = <0x1>;
+ };
+
+ rmi4-f12@12 {
+ reg = <0x12>;
+ syna,rezero-wait-ms = <20>;
+ syna,clip-x-low = <0>;
+ syna,clip-y-low = <0>;
+ syna,clip-x-high = <1080>;
+ syna,clip-y-high = <1920>;
+ syna,sensor-type = <1>;
+ touchscreen-inverted-x;
+ };
+ };
+};
+
+&i2c12 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ pwm_rgb_right: sn3112@54 {
+ compatible = "si-en,sn3112-pwm";
+ reg = <0x54>;
+ sdb-gpios = <&tlmm 56 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&vdd_mcu_3v3>;
+ #pwm-cells = <1>;
+ };
+};
+
+&remoteproc_adsp {
+ firmware-name = "qcom/sm8550/ayn/odin2portal/adsp.mbn",
+ "qcom/sm8550/ayn/odin2portal/adsp_dtb.mbn";
+ status = "okay";
+};
+
+&remoteproc_cdsp {
+ firmware-name = "qcom/sm8550/ayn/odin2portal/cdsp.mbn",
+ "qcom/sm8550/ayn/odin2portal/cdsp_dtb.mbn";
+ status = "okay";
+};
+
+&spk_amp_l {
+ firmware-name = "qcom/sm8550/ayn/odin2portal/aw883xx_acf.bin";
+};
+
+&spk_amp_r {
+ firmware-name = "qcom/sm8550/ayn/odin2portal/aw883xx_acf.bin";
+};
+
+&soc {
+ qcom_tzlog: qcom_tzlog {
+ status = "disabled";
+ };
+
+ arch_timer: arch_timer {
+ status = "disabled";
+ };
+};
+
+/delete-node/ &sdhc_2;
+
+&soc {
+ sdhc_2: sdhci@8804000 {
+ compatible = "qcom,sdhci-msm-v5-downstream";
+ reg = <0 0x08804000 0 0x1000>;
+ reg-names = "hc_mem";
+ interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hc_irq", "pwr_irq";
+ bus-width = <4>;
+ no-sdio;
+ no-mmc;
+ qcom,restore-after-cx-collapse;
+ qcom,uses_level_shifter;
+ qcom,dll_lock_bist_fail_wa;
+ clocks = <&gcc GCC_SDCC2_AHB_CLK>,
+ <&gcc GCC_SDCC2_APPS_CLK>;
+ clock-names = "iface", "core";
+
+ /*
+ * DLL HSR settings. Refer go/hsr - <Target> DLL settings.
+ * Note that the DLL_CONFIG_2 value is not passed from the
+ * device tree, but it is calculated in the driver.
+ */
+ qcom,dll-hsr-list = <0x0007442C 0x0 0x10
+ 0x090106C0 0x80040868>;
+
+ iommus = <&apps_smmu 0x540 0x0>;
+ dma-coherent;
+ interconnects = <&aggre2_noc MASTER_SDCC_2 0 &mc_virt SLAVE_EBI1 0>,
+ <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_SDCC_2 0>;
+ interconnect-names = "sdhc-ddr", "cpu-sdhc";
+
+ qcom,msm-bus,name = "sdhc2";
+ qcom,msm-bus,num-cases = <0x07>;
+ qcom,msm-bus,num-paths = <0x02>;
+ qcom,msm-bus,vectors-KBps = <0x00 0x00 0x00 0x00 0x416 0xc80 0x640 0x640 0xff50 0x3d090 0x186a0 0x208c8 0x1fe9e 0x3d090 0x208c8 0x208c8 0x3fd3e 0x3d090 0x249f0 0x208c8 0x3fd3e 0xc3500 0x493e0 0x493e0 0x146cc2 0x3e8000 0x146cc2 0x3e8000>;
+ qcom,bus-bw-vectors-bps = <0x00 0x61a80 0x17d7840 0x2faf080 0x5f5e100 0xbebc200 0xffffffff>;
+
+ operating-points-v2 = <&sdhc2_opp_table>;
+
+ vdd-supply = <&vreg_l9b_2p9>;
+ qcom,vdd-voltage-level = <0x2d0370 0x2d2a80>;
+ qcom,vdd-current-level = <0x00 0xc3500>;
+
+ vdd-io-supply = <&vreg_l8b_1p8>;
+ qcom,vdd-io-voltage-level = <0x1b7740 0x2d2a80>;
+ qcom,vdd-io-current-level = <0x00 0x15e0>;
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&sdc2_default &sdc2_card_det_n>;
+ pinctrl-1 = <&sdc2_sleep &sdc2_card_det_n>;
+
+ cd-gpios = <&pm8550_gpios 12 GPIO_ACTIVE_LOW>;
+ resets = <&gcc GCC_SDCC2_BCR>;
+ reset-names = "core_reset";
+
+ qos0 {
+ mask = <0xf0>;
+ vote = <0x2c>;
+ };
+
+ qos1 {
+ mask = <0x0f>;
+ vote = <0x2c>;
+ };
+
+ sdhc2_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-100000000 {
+ opp-hz = <0x00 0x5f5e100>;
+ opp-peak-kBps = <0x27100 0x186a0>;
+ opp-avg-kBps = <0xc350 0x00>;
+ };
+
+ opp-202000000 {
+ opp-hz = <0x00 0xc0a4680>;
+ opp-peak-kBps = <0x30d40 0x1d4c0>;
+ opp-avg-kBps = <0x19640 0x00>;
+ };
+ };
+ };
+};