build/patch/kernel/media-edge/00160-v95-rk3568-bpi-r2pro.patch

191 lines
4.0 KiB
Diff

--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/soc/rockchip,vop2.h>
@@ -53,6 +54,14 @@
regulator-boot-on;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
+ };
+
+ fan: gpio_fan {
+ compatible = "gpio-fan";
+ gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
+ gpio-fan,speed-map = <0 0
+ 4500 1>;
+ #cooling-cells = <2>;
};
hdmi-con {
@@ -119,6 +128,28 @@
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_usb>;
};
+
+ rk809-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "Analog RK809";
+ simple-audio-card,mclk-fs = <256>;
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&rk809>;
+ };
+ };
+
+ rk_headset: rk-headset {
+ compatible = "rockchip_headset";
+ headset_gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_det>;
+ io-channels = <&saradc 2>; //HP_HOOK pin
+ };
};
&combphy0 {
@@ -134,6 +165,39 @@
&combphy2 {
/* used for SATA */
status = "okay";
+//};
+
+//&cpu0 {
+// cpu-supply = <&vdd_cpu>;
+//};
+
+//&cpu1 {
+// cpu-supply = <&vdd_cpu>;
+//};
+
+//&cpu2 {
+// cpu-supply = <&vdd_cpu>;
+//};
+
+//&cpu3 {
+// cpu-supply = <&vdd_cpu>;
+//};
+
+//&cpu_thermal {
+// trips {
+// cpu_hot: cpu_hot {
+// temperature = <55000>;
+// hysteresis = <2000>;
+// type = "active";
+// };
+// };
+
+// cooling-maps {
+// map1 {
+// trip = <&cpu_hot>;
+// cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+// };
+// };
};
&gmac0 {
@@ -216,15 +280,49 @@
&i2c0 {
status = "okay";
+
+// vdd_cpu: regulator@1c {
+// compatible = "tcs,tcs4525";
+// reg = <0x1c>;
+// vin-supply = <&vcc5v0_sys>;
+// regulator-compatible = "fan53555-reg";
+// regulator-name = "vdd_cpu";
+// regulator-min-microvolt = <712500>;
+// regulator-max-microvolt = <1390000>;
+// regulator-ramp-delay = <2300>;
+// fcs,suspend-voltage-selector = <1>;
+// regulator-boot-on;
+// regulator-always-on;
+
+// regulator-state-mem {
+// regulator-off-in-suspend;
+// };
+// };
+
rk809: pmic@20 {
compatible = "rockchip,rk809";
reg = <0x20>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+ assigned-clocks = <&cru I2S1_MCLKOUT>, <&cru I2S1_MCLK_TX_IOE>;
+ assigned-clock-rates = <12288000>;
+ assigned-clock-parents = <&cru I2S1_MCLKOUT_TX>, <&cru I2S1_MCLKOUT_TX>;
#clock-cells = <1>;
- pinctrl-names = "default";
- pinctrl-0 = <&pmic_int>;
+ clock-names = "mclk";
+ clocks = <&cru I2S1_MCLKOUT>;
+ pinctrl-names = "default", "pmic-sleep",
+ "pmic-power-off", "pmic-reset";
+ pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
+
rockchip,system-power-controller;
+ #sound-dai-cells = <0>;
+ clock-output-names = "rk808-clkout1", "rk808-clkout2";
+ //fb-inner-reg-idxs = <2>;
+ /* 1: rst regs (default in codes), 0: rst the pmic */
+ pmic-reset-func = <0>;
+ /* not save the PMIC_POWER_EN register in uboot */
+ not-save-power-en = <1>;
+
vcc1-supply = <&vcc3v3_sys>;
vcc2-supply = <&vcc3v3_sys>;
vcc3-supply = <&vcc3v3_sys>;
@@ -427,6 +525,10 @@
regulator-off-in-suspend;
};
};
+ };
+
+ codec {
+ mic-in-differential;
};
};
};
@@ -458,6 +560,18 @@
status = "okay";
};
+&i2s1_8ch {
+ /* headphone */
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1m0_sclktx
+ &i2s1m0_lrcktx
+ &i2s1m0_sdi0
+ &i2s1m0_sdo0>;
+ rockchip,trcm-sync-tx-only;
+ status = "okay";
+};
+
+
&mdio0 {
#address-cells = <1>;
#size-cells = <0>;
@@ -543,6 +657,12 @@
vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ headphone {
+ hp_det: hp-det {
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};