mirror of
https://github.com/clockworkpi/DevTerm.git
synced 2025-12-12 18:28:50 +01:00
add a06 patches for armbian build
This commit is contained in:
parent
b595b311b8
commit
5465b210e4
12
Code/patch/armbian_build_a06/patch/README
Normal file
12
Code/patch/armbian_build_a06/patch/README
Normal file
@ -0,0 +1,12 @@
|
||||
cd ~
|
||||
git clone https://github.com/armbian/build.git
|
||||
git clone https://github.com/clockworkpi/DevTerm.git
|
||||
|
||||
cd build
|
||||
git apply ~/DevTerm/Code/patch/armbian_build_a06/patch/armbian.patch
|
||||
cp ~/DevTerm/Code/patch/armbian_build_a06/patch/kernel*.patch userpatches/kernel/rockchip64-current/
|
||||
cp ~/DevTerm/Code/patch/armbian_build_a06/patch/uboot*.patch userpatches/u-boot/u-boot-rockchip64-mainline/
|
||||
|
||||
#Then exec ./compile.sh under armbian build
|
||||
cd ~/build && ./compile.sh
|
||||
|
||||
61
Code/patch/armbian_build_a06/patch/armbian.patch
Normal file
61
Code/patch/armbian_build_a06/patch/armbian.patch
Normal file
@ -0,0 +1,61 @@
|
||||
diff --git a/config/boards/clockworkpi-a06.conf b/config/boards/clockworkpi-a06.conf
|
||||
new file mode 100644
|
||||
index 000000000..cb914d1c0
|
||||
--- /dev/null
|
||||
+++ b/config/boards/clockworkpi-a06.conf
|
||||
@@ -0,0 +1,7 @@
|
||||
+# Rockchip RK3399 hexa core 4GB RAM SoC WiFi/BT
|
||||
+BOARD_NAME="Clockworkpi A06"
|
||||
+BOARDFAMILY="rk3399"
|
||||
+BOOTCONFIG="clockworkpi-a06-rk3399_defconfig"
|
||||
+KERNEL_TARGET="legacy,current,edge"
|
||||
+FULL_DESKTOP="yes"
|
||||
+BOOT_LOGO="desktop"
|
||||
diff --git a/config/kernel/linux-rockchip64-current.config b/config/kernel/linux-rockchip64-current.config
|
||||
index a777730db..891a37384 100644
|
||||
--- a/config/kernel/linux-rockchip64-current.config
|
||||
+++ b/config/kernel/linux-rockchip64-current.config
|
||||
@@ -4405,8 +4405,8 @@ CONFIG_MFD_AAT2870_CORE=y
|
||||
# CONFIG_MFD_BCM590XX is not set
|
||||
# CONFIG_MFD_BD9571MWV is not set
|
||||
CONFIG_MFD_AC100=m
|
||||
-CONFIG_MFD_AXP20X=m
|
||||
-# CONFIG_MFD_AXP20X_I2C is not set
|
||||
+CONFIG_MFD_AXP20X=y
|
||||
+CONFIG_MFD_AXP20X_I2C=y
|
||||
CONFIG_MFD_AXP20X_RSB=m
|
||||
CONFIG_MFD_CROS_EC_DEV=y
|
||||
# CONFIG_MFD_MADERA is not set
|
||||
@@ -4521,7 +4521,7 @@ CONFIG_REGULATOR_88PG86X=m
|
||||
CONFIG_REGULATOR_AAT2870=m
|
||||
CONFIG_REGULATOR_AS3711=m
|
||||
CONFIG_REGULATOR_AS3722=m
|
||||
-CONFIG_REGULATOR_AXP20X=m
|
||||
+CONFIG_REGULATOR_AXP20X=y
|
||||
CONFIG_REGULATOR_BD70528=m
|
||||
CONFIG_REGULATOR_BD71828=m
|
||||
# CONFIG_REGULATOR_CROS_EC is not set
|
||||
@@ -5470,6 +5470,7 @@ CONFIG_DRM_PANEL_TPO_TPG110=m
|
||||
CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m
|
||||
# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set
|
||||
CONFIG_DRM_PANEL_XINPENG_XPP055C272=m
|
||||
+CONFIG_DRM_PANEL_CWD686=m
|
||||
# end of Display Panels
|
||||
|
||||
CONFIG_DRM_BRIDGE=y
|
||||
@@ -5645,6 +5646,7 @@ CONFIG_BACKLIGHT_GPIO=m
|
||||
# CONFIG_BACKLIGHT_ARCXCNN is not set
|
||||
CONFIG_BACKLIGHT_RAVE_SP=m
|
||||
CONFIG_BACKLIGHT_LED=m
|
||||
+CONFIG_BACKLIGHT_OCP8178=m
|
||||
# end of Backlight & LCD device support
|
||||
|
||||
CONFIG_VIDEOMODE_HELPERS=y
|
||||
@@ -5939,6 +5941,7 @@ CONFIG_SND_SOC_HDMI_CODEC=m
|
||||
CONFIG_SND_SOC_ES7134=m
|
||||
CONFIG_SND_SOC_ES7241=m
|
||||
CONFIG_SND_SOC_ES8316=m
|
||||
+CONFIG_SND_SOC_ES8323=m
|
||||
CONFIG_SND_SOC_ES8328=m
|
||||
CONFIG_SND_SOC_ES8328_I2C=m
|
||||
CONFIG_SND_SOC_ES8328_SPI=m
|
||||
7
Code/patch/armbian_build_a06/patch/clockworkpi-a06.conf
Normal file
7
Code/patch/armbian_build_a06/patch/clockworkpi-a06.conf
Normal file
@ -0,0 +1,7 @@
|
||||
# Rockchip RK3399 hexa core 4GB RAM SoC WiFi/BT
|
||||
BOARD_NAME="Clockworkpi A06"
|
||||
BOARDFAMILY="rk3399"
|
||||
BOOTCONFIG="clockworkpi-a06-rk3399_defconfig"
|
||||
KERNEL_TARGET="legacy,current,edge"
|
||||
FULL_DESKTOP="yes"
|
||||
BOOT_LOGO="desktop"
|
||||
952
Code/patch/armbian_build_a06/patch/kernel-001-a06-dts.patch
Normal file
952
Code/patch/armbian_build_a06/patch/kernel-001-a06-dts.patch
Normal file
@ -0,0 +1,952 @@
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
index 67e09e88f..5212a625f 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lion-haikou.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-orion-r68-meta.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-px5-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-clockworkpi-a06.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-ficus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-clockworkpi-a06.dts b/arch/arm64/boot/dts/rockchip/rk3399-clockworkpi-a06.dts
|
||||
new file mode 100644
|
||||
index 000000000..1c8fb451a
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-clockworkpi-a06.dts
|
||||
@@ -0,0 +1,934 @@
|
||||
+/*
|
||||
+ * SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
|
||||
+ * Copyright (c) 2018 Akash Gajjar <Akash_Gajjar@mentor.com>
|
||||
+ * Copyright (c) 2020 Armbian (chwe17, piter75)
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+#include <dt-bindings/pwm/pwm.h>
|
||||
+#include <dt-bindings/usb/pd.h>
|
||||
+//#include <dt-bindings/leds/common.h>
|
||||
+#include "rk3399.dtsi"
|
||||
+#include "rk3399-opp.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Clockworkpi A06";
|
||||
+ compatible = "clockwork,devterm-a06", "rockchip,rk3399";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ aliases {
|
||||
+ spi1 = &spi1;
|
||||
+ };
|
||||
+
|
||||
+ usb_vbus: usb-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb_vbus";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb3_vbus: usb3-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb3_vbus";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v0_sd: vcc3v0-sd {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc0_pwr_h>;
|
||||
+ regulator-name = "vcc3v0_sd";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc5v0-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_sys: vcc-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ vdd_log: vdd-log {
|
||||
+ compatible = "pwm-regulator";
|
||||
+ pwms = <&pwm2 0 25000 1>;
|
||||
+ regulator-name = "vdd_log";
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1400000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+ };
|
||||
+
|
||||
+ dw_hdmi_audio: dw-hdmi-audio {
|
||||
+ status = "disable";
|
||||
+ compatible = "rockchip,dw-hdmi-audio";
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi_sound: hdmi-sound {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ sdio_pwrseq: sdio-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rk808 1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_enable_h>;
|
||||
+
|
||||
+ /*
|
||||
+ * On the module itself this is one of these (depending
|
||||
+ * on the actual card populated):
|
||||
+ * - SDIO_RESET_L_WL_REG_ON
|
||||
+ * - PDN (power down when low)
|
||||
+ */
|
||||
+ reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */
|
||||
+ };
|
||||
+
|
||||
+ es8323-sound {
|
||||
+ status = "okay";
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "rockchip,es8323-codec";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s0>;
|
||||
+ system-clock-frequency = <11289600>;
|
||||
+ };
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&es8323>;
|
||||
+ system-clock-frequency = <11289600>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ battery: battery@0 {
|
||||
+ compatible = "simple-battery";
|
||||
+ constant-charge-current-max-microamp = <2100000>;
|
||||
+ voltage-min-design-microvolt = <3300000>;
|
||||
+ };
|
||||
+
|
||||
+ ocp8178_backlight: backlight@0 {
|
||||
+ compatible = "ocp8178-backlight";
|
||||
+ backlight-control-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ default-brightness = <5>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&backlight_control>;
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&cpu_l0 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l1 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l2 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l3 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b0 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b1 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu {
|
||||
+ status = "okay";
|
||||
+ /* 0 means ion, 1 means drm */
|
||||
+ //allocator = <0>;
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ status = "okay";
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+};
|
||||
+
|
||||
+&rga {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&hdmi_in_vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_in_vopl {
|
||||
+ status = "disable";
|
||||
+};
|
||||
+
|
||||
+&mipi_in_vopb {
|
||||
+ status = "disable";
|
||||
+};
|
||||
+
|
||||
+&mipi_in_vopl {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ /* remove the hdmi_i2c_xfer */
|
||||
+ pinctrl-0 = <&hdmi_cec>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ status = "okay";
|
||||
+ ddc-i2c-bus = <&i2c3>;
|
||||
+ rockchip,defaultmode = <16>; /* CEA 1920x1080@60Hz */
|
||||
+};
|
||||
+
|
||||
+&mipi_dsi {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ mipi_out: port@1 {
|
||||
+ reg = <1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ mipi_dsi_out: endpoint {
|
||||
+ remote-endpoint = <&panel_in>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dsi_panel: panel {
|
||||
+ compatible = "cw,cwd686";
|
||||
+ reg = <0>;
|
||||
+ backlight = <&ocp8178_backlight>;
|
||||
+ reset-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
|
||||
+ dsi,lanes = <4>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&panel_reset>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port {
|
||||
+ panel_in: endpoint {
|
||||
+ remote-endpoint = <&mipi_dsi_out>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "brcm,bcm4345c5";
|
||||
+ clocks = <&rk808 1>;
|
||||
+ clock-names = "lpo";
|
||||
+ device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
+ shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
+ max-speed = <1500000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&bt_host_wake &bt_wake &bt_reset>;
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+*/
|
||||
+
|
||||
+&i2c0 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ i2c-scl-rising-time-ns = <168>;
|
||||
+ i2c-scl-falling-time-ns = <4>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rk808: pmic@1b {
|
||||
+ compatible = "rockchip,rk808";
|
||||
+ reg = <0x1b>;
|
||||
+ interrupt-parent = <&gpio1>;
|
||||
+ interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-output-names = "xin32k", "rk808-clkout2";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+ vcc10-supply = <&vcc3v3_sys>;
|
||||
+ vcc11-supply = <&vcc3v3_sys>;
|
||||
+ vcc12-supply = <&vcc3v3_sys>;
|
||||
+ vcc13-supply = <&vcc3v3_sys>;
|
||||
+ vcc14-supply = <&vcc3v3_sys>;
|
||||
+ vddio-supply = <&vcc_3v0>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_center: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_center";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_l: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_cpu_l";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8: vcc1v8_s3: vcca1v8_s3: DCDC_REG4 {
|
||||
+ regulator-name = "vcc1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8_dvp: LDO_REG1 {
|
||||
+ regulator-name = "vcc1v8_dvp";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v0_touch: LDO_REG2 {
|
||||
+ regulator-name = "vcc3v0_touch";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vcc1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_sdio: LDO_REG4 {
|
||||
+ regulator-name = "vcc_sdio";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-init-microvolt = <3000000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca3v0_codec: LDO_REG5 {
|
||||
+ regulator-name = "vcca3v0_codec";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v5: LDO_REG6 {
|
||||
+ regulator-name = "vcc_1v5";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1500000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_codec: LDO_REG7 {
|
||||
+ regulator-name = "vcca1v8_codec";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v0: LDO_REG8 {
|
||||
+ regulator-name = "vcc_3v0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s3: vcc_lan: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc3v3_s3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s0: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_b: regulator@40 {
|
||||
+ compatible = "silergy,syr827";
|
||||
+ reg = <0x40>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vsel1_gpio>;
|
||||
+ vsel-gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
+ regulator-compatible = "fan53555-reg";
|
||||
+ regulator-name = "vdd_cpu_b";
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: regulator@41 {
|
||||
+ compatible = "silergy,syr828";
|
||||
+ reg = <0x41>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vsel2_gpio>;
|
||||
+ vsel-gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
+ regulator-compatible = "fan53555-reg";
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+ i2c-scl-rising-time-ns = <300>;
|
||||
+ i2c-scl-falling-time-ns = <15>;
|
||||
+
|
||||
+ es8323: es8323@11 {
|
||||
+ compatible = "everest,es8323";
|
||||
+ status = "okay";
|
||||
+ reg = <0x11>;
|
||||
+ audio-switch-gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
|
||||
+ hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
|
||||
+ spk-ctl-gpio = <&gpio3 9 GPIO_ACTIVE_HIGH>;
|
||||
+ clock-names = "mclk";
|
||||
+ clocks = <&cru SCLK_I2S_8CH_OUT>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&audio_switch &hp_det>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c5 {
|
||||
+ status = "okay";
|
||||
+ i2c-scl-rising-time-ns = <300>;
|
||||
+ i2c-scl-falling-time-ns = <15>;
|
||||
+
|
||||
+ axp22x: pmic@34 {
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <1>;
|
||||
+ compatible = "x-powers,axp221";
|
||||
+ reg = <0x34>;
|
||||
+ interrupt-parent = <&gpio3>;
|
||||
+ interrupts = <8 8>;
|
||||
+ irq-gpios = <&gpio3 8 0>;
|
||||
+
|
||||
+ regulators {
|
||||
+
|
||||
+ x-powers,dcdc-freq = <3000>;
|
||||
+
|
||||
+ reg_aldo1: aldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "audio-vdd";
|
||||
+ };
|
||||
+
|
||||
+ reg_aldo2: aldo2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "display-vcc";
|
||||
+ };
|
||||
+
|
||||
+ reg_aldo3: aldo3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "wifi-vdd";
|
||||
+ };
|
||||
+
|
||||
+ reg_dldo1: dldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "wifi-vcc1";
|
||||
+ };
|
||||
+
|
||||
+ reg_dldo2: dldo2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "dldo2";
|
||||
+ };
|
||||
+
|
||||
+ reg_dldo3: dldo3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "dldo3";
|
||||
+ };
|
||||
+
|
||||
+ reg_dldo4: dldo4 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "dldo4";
|
||||
+ };
|
||||
+
|
||||
+ reg_eldo1: eldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "wifi-vcc2";
|
||||
+ };
|
||||
+
|
||||
+ reg_eldo2: eldo2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "wifi-vcc3";
|
||||
+ };
|
||||
+
|
||||
+ reg_eldo3: eldo3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "wifi-vcc4";
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ battery_power_supply: battery-power-supply {
|
||||
+ compatible = "x-powers,axp221-battery-power-supply";
|
||||
+ monitored-battery = <&battery>;
|
||||
+ };
|
||||
+
|
||||
+ ac_power_supply: ac_power_supply {
|
||||
+ compatible = "x-powers,axp221-ac-power-supply";
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi4 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi4_clk &spi4_tx>;
|
||||
+
|
||||
+ spidev0: spidev@0 {
|
||||
+ compatible = "rockchip,spidev";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <10000000>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2s0 {
|
||||
+ rockchip,i2s-broken-burst-len;
|
||||
+ rockchip,playback-channels = <8>;
|
||||
+ rockchip,capture-channels = <8>;
|
||||
+ pinctrl-0 = <&i2s0_2ch_bus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s1 {
|
||||
+ assigned-clocks = <&cru SCLK_I2SOUT_SRC>;
|
||||
+ assigned-clock-parents = <&cru SCLK_I2S1_8CH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2s1_2ch_bus>;
|
||||
+ rockchip,playback-channels = <2>;
|
||||
+ rockchip,capture-channels = <2>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s2 {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ bt656-supply = <&vcc1v8_dvp>; /* bt656_gpio2ab_ms */
|
||||
+ audio-supply = <&vcca1v8_codec>; /* audio_gpio3d4a_ms */
|
||||
+ sdmmc-supply = <&vcc_sdio>; /* sdmmc_gpio4b_ms */
|
||||
+ gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ status = "okay";
|
||||
+ pmu1830-supply = <&vcc_3v0>;
|
||||
+};
|
||||
+
|
||||
+&sdio0 {
|
||||
+ clock-frequency = <50000000>;
|
||||
+ clock-freq-min-max = <200000 50000000>;
|
||||
+ supports-sdio;
|
||||
+ bus-width = <4>;
|
||||
+ disable-wp;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-sdio-irq;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-pwrseq = <&sdio_pwrseq>;
|
||||
+ non-removable;
|
||||
+ num-slots = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ max-frequency = <150000000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc0_det_l>;
|
||||
+// sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc3v0_sd>;
|
||||
+ vqmmc-supply = <&vcc_sdio>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ /* tshut mode 0:CRU 1:GPIO */
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ /* tshut polarity 0:LOW 1:HIGH */
|
||||
+ rockchip,hw-tshut-polarity = <1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tcphy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tcphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ u2phy0_otg: otg-port {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ u2phy0_host: host-port {
|
||||
+ phy-supply = <&usb3_vbus>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ u2phy1_otg: otg-port {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ u2phy1_host: host-port {
|
||||
+ phy-supply = <&usb_vbus>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_1 {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+
|
||||
+ hdmi {
|
||||
+ /delete-node/ hdmi-i2c-xfer;
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ vsel1_gpio: vsel1-gpio {
|
||||
+ rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ vsel2_gpio: vsel2-gpio {
|
||||
+ rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdmmc {
|
||||
+ sdmmc0_det_l: sdmmc0-det-l {
|
||||
+ rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc0_pwr_h: sdmmc0-pwr-h {
|
||||
+ rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdio-pwrseq {
|
||||
+ wifi_enable_h: wifi-enable-h {
|
||||
+ rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wireless-bluetooth {
|
||||
+ uart0_gpios: uart0-gpios {
|
||||
+ rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rockchip-key {
|
||||
+ power_key: power-key {
|
||||
+ rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spi1 {
|
||||
+ spi1_gpio: spi1-gpio {
|
||||
+ rockchip,pins =
|
||||
+ <1 7 RK_FUNC_GPIO &pcfg_output_low>,
|
||||
+ <1 8 RK_FUNC_GPIO &pcfg_output_low>,
|
||||
+ <1 9 RK_FUNC_GPIO &pcfg_output_low>,
|
||||
+ <1 10 RK_FUNC_GPIO &pcfg_output_low>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ bt {
|
||||
+ bt_host_wake: bt-host-wake {
|
||||
+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_reset: bt-reset {
|
||||
+ rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_wake: bt-wake {
|
||||
+ rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ panel {
|
||||
+ panel_reset: panel-reset {
|
||||
+ rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_output_low>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ backlight {
|
||||
+ backlight_control: backlight-control {
|
||||
+ rockchip,pins = <4 30 RK_FUNC_GPIO &pcfg_output_low>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ audio {
|
||||
+ audio_switch: audio-switch {
|
||||
+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_output_high>;
|
||||
+ };
|
||||
+ hp_det: hp-det {
|
||||
+ rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
124
Code/patch/armbian_build_a06/patch/kernel-002-power.patch
Normal file
124
Code/patch/armbian_build_a06/patch/kernel-002-power.patch
Normal file
@ -0,0 +1,124 @@
|
||||
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
|
||||
index aa59496e4..45b09ce38 100644
|
||||
--- a/drivers/mfd/axp20x.c
|
||||
+++ b/drivers/mfd/axp20x.c
|
||||
@@ -976,6 +976,7 @@ int axp20x_device_probe(struct axp20x_dev *axp20x)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ pm_power_off = 0;
|
||||
if (!pm_power_off) {
|
||||
axp20x_pm_power_off = axp20x;
|
||||
pm_power_off = axp20x_power_off;
|
||||
diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
|
||||
index d90c45cd5..c2707fd00 100644
|
||||
--- a/drivers/mfd/rk808.c
|
||||
+++ b/drivers/mfd/rk808.c
|
||||
@@ -475,6 +475,12 @@ static void rk808_pm_power_off(void)
|
||||
dev_err(&rk808_i2c_client->dev, "Failed to shutdown device!\n");
|
||||
}
|
||||
|
||||
+static void rk808_pm_power_off_prepare(void)
|
||||
+{
|
||||
+ struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
|
||||
+ regmap_update_bits(rk808->regmap, RK808_LDO_EN_REG, 0x08, 0x00);
|
||||
+}
|
||||
+
|
||||
static void rk8xx_shutdown(struct i2c_client *client)
|
||||
{
|
||||
struct rk808 *rk808 = i2c_get_clientdata(client);
|
||||
@@ -641,9 +647,10 @@ static int rk808_probe(struct i2c_client *client,
|
||||
}
|
||||
|
||||
if (of_property_read_bool(np, "rockchip,system-power-controller")) {
|
||||
- rk808_i2c_client = client;
|
||||
pm_power_off = rk808_pm_power_off;
|
||||
}
|
||||
+ rk808_i2c_client = client;
|
||||
+ pm_power_off_prepare = rk808_pm_power_off_prepare;
|
||||
|
||||
return 0;
|
||||
|
||||
diff --git a/drivers/power/supply/axp20x_ac_power.c b/drivers/power/supply/axp20x_ac_power.c
|
||||
index ac360016b..c11024f3c 100644
|
||||
--- a/drivers/power/supply/axp20x_ac_power.c
|
||||
+++ b/drivers/power/supply/axp20x_ac_power.c
|
||||
@@ -53,6 +53,9 @@ static irqreturn_t axp20x_ac_power_irq(int irq, void *devid)
|
||||
{
|
||||
struct axp20x_ac_power *power = devid;
|
||||
|
||||
+ regmap_update_bits(power->regmap, AXP20X_VBUS_IPSOUT_MGMT, 0x03, 0x00);
|
||||
+ regmap_update_bits(power->regmap, AXP20X_VBUS_IPSOUT_MGMT, 0x03, 0x03);
|
||||
+
|
||||
power_supply_changed(power->supply);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
|
||||
index e84b6e4da..b62c361e2 100644
|
||||
--- a/drivers/power/supply/axp20x_battery.c
|
||||
+++ b/drivers/power/supply/axp20x_battery.c
|
||||
@@ -326,6 +326,42 @@ static int axp20x_battery_get_prop(struct power_supply *psy,
|
||||
val->intval *= 1000;
|
||||
break;
|
||||
|
||||
+ case POWER_SUPPLY_PROP_ENERGY_FULL:
|
||||
+ case POWER_SUPPLY_PROP_ENERGY_NOW:
|
||||
+ /* When no battery is present, return 0 */
|
||||
+ ret = regmap_read(axp20x_batt->regmap, AXP20X_PWR_OP_MODE,
|
||||
+ ®);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (!(reg & AXP20X_PWR_OP_BATT_PRESENT)) {
|
||||
+ val->intval = 0;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if(psp == POWER_SUPPLY_PROP_ENERGY_FULL) {
|
||||
+ val->intval = 8000000;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ ret = regmap_read(axp20x_batt->regmap, AXP20X_FG_RES, ®);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (axp20x_batt->data->has_fg_valid && !(reg & AXP22X_FG_VALID))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ val1 = reg & AXP209_FG_PERCENT;
|
||||
+ if (val1 > 90)
|
||||
+ val1= 80;
|
||||
+ else if (val1 < 10)
|
||||
+ val1 = 0;
|
||||
+ else
|
||||
+ val1 -= 10;
|
||||
+
|
||||
+ val->intval = val1 * 100000;
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -486,6 +522,8 @@ static enum power_supply_property axp20x_battery_props[] = {
|
||||
POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
|
||||
POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
|
||||
POWER_SUPPLY_PROP_CAPACITY,
|
||||
+ POWER_SUPPLY_PROP_ENERGY_FULL,
|
||||
+ POWER_SUPPLY_PROP_ENERGY_NOW,
|
||||
};
|
||||
|
||||
static int axp20x_battery_prop_writeable(struct power_supply *psy,
|
||||
@@ -630,6 +668,12 @@ static int axp20x_power_probe(struct platform_device *pdev)
|
||||
axp20x_get_constant_charge_current(axp20x_batt,
|
||||
&axp20x_batt->max_ccc);
|
||||
|
||||
+ regmap_update_bits(axp20x_batt->regmap, AXP20X_VBUS_IPSOUT_MGMT, 0x03, 0x03);
|
||||
+ regmap_update_bits(axp20x_batt->regmap, AXP20X_OFF_CTRL, 0x08, 0x08);
|
||||
+ regmap_update_bits(axp20x_batt->regmap, AXP20X_CHRG_CTRL2, 0x30, 0x20);
|
||||
+ regmap_update_bits(axp20x_batt->regmap, AXP20X_PEK_KEY, 0x0f, 0x0b);
|
||||
+ regmap_update_bits(axp20x_batt->regmap, AXP20X_GPIO0_CTRL, 0x07, 0x00);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
1326
Code/patch/armbian_build_a06/patch/kernel-003-audio.patch
Normal file
1326
Code/patch/armbian_build_a06/patch/kernel-003-audio.patch
Normal file
File diff suppressed because it is too large
Load Diff
385
Code/patch/armbian_build_a06/patch/kernel-004-panel.patch
Normal file
385
Code/patch/armbian_build_a06/patch/kernel-004-panel.patch
Normal file
@ -0,0 +1,385 @@
|
||||
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
|
||||
index b9dbedf8f..9a18418d8 100644
|
||||
--- a/drivers/gpu/drm/panel/Kconfig
|
||||
+++ b/drivers/gpu/drm/panel/Kconfig
|
||||
@@ -499,4 +499,17 @@ config DRM_PANEL_XINPENG_XPP055C272
|
||||
Say Y here if you want to enable support for the Xinpeng
|
||||
XPP055C272 controller for 720x1280 LCD panels with MIPI/RGB/SPI
|
||||
system interfaces.
|
||||
+
|
||||
+config DRM_PANEL_CWD686
|
||||
+ tristate "CWD686 panel"
|
||||
+ depends on OF
|
||||
+ depends on DRM_MIPI_DSI
|
||||
+ depends on BACKLIGHT_CLASS_DEVICE
|
||||
+ help
|
||||
+ Say Y here if you want to enable support for CWD686 panel.
|
||||
+ The panel has a 480x1280 resolution and uses 24 bit RGB per pixel.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the module
|
||||
+ will be called panel-cwd686.
|
||||
+
|
||||
endmenu
|
||||
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
|
||||
index 2ba560bca..80d40a803 100644
|
||||
--- a/drivers/gpu/drm/panel/Makefile
|
||||
+++ b/drivers/gpu/drm/panel/Makefile
|
||||
@@ -53,3 +53,5 @@ obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o
|
||||
obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o
|
||||
obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o
|
||||
obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o
|
||||
+obj-$(CONFIG_DRM_PANEL_CWD686) += panel-cwd686.o
|
||||
+
|
||||
diff --git a/drivers/gpu/drm/panel/panel-cwd686.c b/drivers/gpu/drm/panel/panel-cwd686.c
|
||||
new file mode 100644
|
||||
index 000000000..6a0eabf92
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpu/drm/panel/panel-cwd686.c
|
||||
@@ -0,0 +1,283 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+
|
||||
+#include <drm/drm_modes.h>
|
||||
+#include <drm/drm_mipi_dsi.h>
|
||||
+#include <drm/drm_panel.h>
|
||||
+#include <linux/backlight.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+struct cwd686 {
|
||||
+ struct device *dev;
|
||||
+ struct drm_panel panel;
|
||||
+ struct regulator *supply;
|
||||
+ struct gpio_desc *enable_gpio;
|
||||
+ struct gpio_desc *reset_gpio;
|
||||
+ struct backlight_device *backlight;
|
||||
+ bool prepared;
|
||||
+ bool enabled;
|
||||
+};
|
||||
+
|
||||
+static const struct drm_display_mode default_mode = {
|
||||
+ .clock = 54465,
|
||||
+ .hdisplay = 480,
|
||||
+ .hsync_start = 480 + 150,
|
||||
+ .hsync_end = 480 + 150 + 24,
|
||||
+ .htotal = 480 + 150 + 24 + 40,
|
||||
+ .vdisplay = 1280,
|
||||
+ .vsync_start = 1280 + 12,
|
||||
+ .vsync_end = 1280 + 12+ 6,
|
||||
+ .vtotal = 1280 + 12 + 6 + 10,
|
||||
+};
|
||||
+
|
||||
+static inline struct cwd686 *panel_to_cwd686(struct drm_panel *panel)
|
||||
+{
|
||||
+ return container_of(panel, struct cwd686, panel);
|
||||
+}
|
||||
+
|
||||
+#define dcs_write_seq(seq...) \
|
||||
+({ \
|
||||
+ static const u8 d[] = { seq }; \
|
||||
+ mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d)); \
|
||||
+})
|
||||
+
|
||||
+static void cwd686_init_sequence(struct cwd686 *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+
|
||||
+ dcs_write_seq(0xF0,0x5A,0x5A);
|
||||
+ dcs_write_seq(0xF1,0xA5,0xA5);
|
||||
+ dcs_write_seq(0xB6,0x0D,0x0D);
|
||||
+ dcs_write_seq(0xB4,0x0A,0x08,0x12,0x10,0x0E,0x0C,0x00,0x00,0x00,0x03,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x06);
|
||||
+ dcs_write_seq(0xB3,0x0B,0x09,0x13,0x11,0x0F,0x0D,0x00,0x00,0x00,0x03,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x05,0x07);
|
||||
+ dcs_write_seq(0xB0,0x54,0x32,0x23,0x45,0x44,0x44,0x44,0x44,0x90,0x01,0x90,0x01);
|
||||
+ dcs_write_seq(0xB1,0x32,0x84,0x02,0x83,0x30,0x01,0x6B,0x01);
|
||||
+ dcs_write_seq(0xB2,0x73);
|
||||
+ dcs_write_seq(0xBD,0x4E,0x0E,0x50,0x50,0x26,0x1D,0x00,0x14,0x42,0x03);
|
||||
+ dcs_write_seq(0xB7,0x01,0x01,0x09,0x11,0x0D,0x55,0x19,0x19,0x21,0x1D,0x00,0x00,0x00,0x00,0x02,0xFF,0x3C);
|
||||
+ dcs_write_seq(0xB8,0x23,0x01,0x30,0x34,0x63);
|
||||
+ dcs_write_seq(0xB9,0xA0,0x22,0x00,0x44);
|
||||
+ dcs_write_seq(0xBA,0x12,0x63);
|
||||
+ dcs_write_seq(0xC1,0x0C,0x16,0x04,0x0C,0x10,0x04);
|
||||
+ dcs_write_seq(0xC2,0x11,0x41);
|
||||
+ dcs_write_seq(0xC3,0x22,0x31,0x04);
|
||||
+ dcs_write_seq(0xC7,0x05,0x23,0x6B,0x49,0x00);
|
||||
+ dcs_write_seq(0xC5,0x00);
|
||||
+ dcs_write_seq(0xD0,0x37,0xFF,0xFF);
|
||||
+ dcs_write_seq(0xD2,0x63,0x0B,0x08,0x88);
|
||||
+ dcs_write_seq(0xD3,0x01,0x00,0x00,0x01,0x01,0x37,0x25,0x38,0x31,0x06,0x07);
|
||||
+ dcs_write_seq(0xC8,0x7C,0x6A,0x5D,0x53,0x53,0x45,0x4B,0x35,0x4D,0x4A,0x49,0x66,0x53,0x57,0x4A,0x48,0x3B,0x2A,0x06,0x7C,0x6A,0x5D,0x53,0x53,0x45,0x4B,0x35,0x4D,0x4A,0x49,0x66,0x53,0x57,0x4A,0x48,0x3B,0x2A,0x06);//GAMMA2.2
|
||||
+ dcs_write_seq(0xC6,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00);
|
||||
+ dcs_write_seq(0xF4,0x08,0x77);
|
||||
+ dcs_write_seq(0x36,0x14);
|
||||
+ dcs_write_seq(0x35,0x00);
|
||||
+ dcs_write_seq(0xF1,0x5A,0x5A);
|
||||
+ dcs_write_seq(0xF0,0xA5,0xA5);
|
||||
+}
|
||||
+
|
||||
+static int cwd686_disable(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct cwd686 *ctx = panel_to_cwd686(panel);
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!ctx->enabled)
|
||||
+ return 0;
|
||||
+
|
||||
+ backlight_disable(ctx->backlight);
|
||||
+
|
||||
+ ctx->enabled = false;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int cwd686_unprepare(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct cwd686 *ctx = panel_to_cwd686(panel);
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+ int ret;
|
||||
+
|
||||
+#if 0
|
||||
+ if (!ctx->prepared)
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = mipi_dsi_dcs_set_display_off(dsi);
|
||||
+ if (ret) {
|
||||
+ dev_err(ctx->dev, "failed to turn display off (%d)\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
|
||||
+ if (ret) {
|
||||
+ dev_err(ctx->dev, "failed to enter sleep mode (%d)\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 0);
|
||||
+
|
||||
+ ctx->prepared = false;
|
||||
+#endif
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int cwd686_prepare(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct cwd686 *ctx = panel_to_cwd686(panel);
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+ int ret;
|
||||
+
|
||||
+ if (ctx->prepared)
|
||||
+ return 0;
|
||||
+
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 0);
|
||||
+ msleep(10);
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
+ msleep(120);
|
||||
+
|
||||
+ /* Enabe tearing mode: send TE (tearing effect) at VBLANK */
|
||||
+ ret = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
|
||||
+ if (ret) {
|
||||
+ dev_err(ctx->dev, "failed to enable vblank TE (%d)\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ /* Exit sleep mode and power on */
|
||||
+
|
||||
+ cwd686_init_sequence(ctx);
|
||||
+
|
||||
+ ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
+ if (ret) {
|
||||
+ dev_err(ctx->dev, "failed to exit sleep mode (%d)\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ msleep(120);
|
||||
+
|
||||
+ ret = mipi_dsi_dcs_set_display_on(dsi);
|
||||
+ if (ret) {
|
||||
+ dev_err(ctx->dev, "failed to turn display on (%d)\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ msleep(20);
|
||||
+
|
||||
+ ctx->prepared = true;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int cwd686_enable(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct cwd686 *ctx = panel_to_cwd686(panel);
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+ int ret;
|
||||
+
|
||||
+ if (ctx->enabled)
|
||||
+ return 0;
|
||||
+
|
||||
+ backlight_enable(ctx->backlight);
|
||||
+
|
||||
+ ctx->enabled = true;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int cwd686_get_modes(struct drm_panel *panel, struct drm_connector *connector)
|
||||
+{
|
||||
+ struct drm_display_mode *mode;
|
||||
+
|
||||
+ mode = drm_mode_duplicate(connector->dev, &default_mode);
|
||||
+ if (!mode) {
|
||||
+ dev_err(panel->dev, "bad mode or failed to add mode\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ drm_mode_set_name(mode);
|
||||
+ mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
|
||||
+
|
||||
+ connector->display_info.width_mm = mode->width_mm;
|
||||
+ connector->display_info.height_mm = mode->height_mm;
|
||||
+
|
||||
+ drm_mode_probed_add(connector, mode);
|
||||
+
|
||||
+ return 1; /* Number of modes */
|
||||
+}
|
||||
+
|
||||
+static const struct drm_panel_funcs cwd686_drm_funcs = {
|
||||
+ .disable = cwd686_disable,
|
||||
+ .unprepare = cwd686_unprepare,
|
||||
+ .prepare = cwd686_prepare,
|
||||
+ .enable = cwd686_enable,
|
||||
+ .get_modes = cwd686_get_modes,
|
||||
+};
|
||||
+
|
||||
+static int cwd686_probe(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct device *dev = &dsi->dev;
|
||||
+ struct cwd686 *ctx;
|
||||
+ int ret;
|
||||
+
|
||||
+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
|
||||
+ if (!ctx)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ mipi_dsi_set_drvdata(dsi, ctx);
|
||||
+ ctx->dev = dev;
|
||||
+
|
||||
+ dsi->lanes = 4;
|
||||
+ dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
|
||||
+
|
||||
+ ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
|
||||
+ if (IS_ERR(ctx->reset_gpio)) {
|
||||
+ ret = PTR_ERR(ctx->reset_gpio);
|
||||
+ if (ret != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "failed to request GPIO (%d)\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ctx->backlight = devm_of_find_backlight(dev);
|
||||
+ if (IS_ERR(ctx->backlight))
|
||||
+ return PTR_ERR(ctx->backlight);
|
||||
+
|
||||
+ drm_panel_init(&ctx->panel, dev, &cwd686_drm_funcs, DRM_MODE_CONNECTOR_DSI);
|
||||
+
|
||||
+ drm_panel_add(&ctx->panel);
|
||||
+
|
||||
+ ret = mipi_dsi_attach(dsi);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(dev, "mipi_dsi_attach() failed: %d\n", ret);
|
||||
+ drm_panel_remove(&ctx->panel);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int cwd686_remove(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct cwd686 *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
+
|
||||
+ mipi_dsi_detach(dsi);
|
||||
+ drm_panel_remove(&ctx->panel);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id cwd686_of_match[] = {
|
||||
+ { .compatible = "cw,cwd686" },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, cwd686_of_match);
|
||||
+
|
||||
+static struct mipi_dsi_driver cwd686_driver = {
|
||||
+ .probe = cwd686_probe,
|
||||
+ .remove = cwd686_remove,
|
||||
+ .driver = {
|
||||
+ .name = "panel-cwd686",
|
||||
+ .of_match_table = cwd686_of_match,
|
||||
+ },
|
||||
+};
|
||||
+module_mipi_dsi_driver(cwd686_driver);
|
||||
+
|
||||
+MODULE_DESCRIPTION("DRM Driver for cwd686 MIPI DSI panel");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
|
||||
index 542dcf7ed..342a05834 100644
|
||||
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
|
||||
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
|
||||
@@ -692,13 +692,8 @@ static const struct dw_mipi_dsi_phy_ops dw_mipi_dsi_rockchip_phy_ops = {
|
||||
.get_timing = dw_mipi_dsi_phy_get_timing,
|
||||
};
|
||||
|
||||
-static void dw_mipi_dsi_rockchip_config(struct dw_mipi_dsi_rockchip *dsi,
|
||||
- int mux)
|
||||
+static void dw_mipi_dsi_rockchip_config(struct dw_mipi_dsi_rockchip *dsi)
|
||||
{
|
||||
- if (dsi->cdata->lcdsel_grf_reg)
|
||||
- regmap_write(dsi->grf_regmap, dsi->cdata->lcdsel_grf_reg,
|
||||
- mux ? dsi->cdata->lcdsel_lit : dsi->cdata->lcdsel_big);
|
||||
-
|
||||
if (dsi->cdata->lanecfg1_grf_reg)
|
||||
regmap_write(dsi->grf_regmap, dsi->cdata->lanecfg1_grf_reg,
|
||||
dsi->cdata->lanecfg1);
|
||||
@@ -712,6 +707,13 @@ static void dw_mipi_dsi_rockchip_config(struct dw_mipi_dsi_rockchip *dsi,
|
||||
dsi->cdata->enable);
|
||||
}
|
||||
|
||||
+static void dw_mipi_dsi_rockchip_set_lcdsel(struct dw_mipi_dsi_rockchip *dsi,
|
||||
+ int mux)
|
||||
+{
|
||||
+ regmap_write(dsi->grf_regmap, dsi->cdata->lcdsel_grf_reg,
|
||||
+ mux ? dsi->cdata->lcdsel_lit : dsi->cdata->lcdsel_big);
|
||||
+}
|
||||
+
|
||||
static int
|
||||
dw_mipi_dsi_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
struct drm_crtc_state *crtc_state,
|
||||
@@ -767,9 +769,9 @@ static void dw_mipi_dsi_encoder_enable(struct drm_encoder *encoder)
|
||||
return;
|
||||
}
|
||||
|
||||
- dw_mipi_dsi_rockchip_config(dsi, mux);
|
||||
+ dw_mipi_dsi_rockchip_set_lcdsel(dsi, mux);
|
||||
if (dsi->slave)
|
||||
- dw_mipi_dsi_rockchip_config(dsi->slave, mux);
|
||||
+ dw_mipi_dsi_rockchip_set_lcdsel(dsi->slave, mux);
|
||||
|
||||
clk_disable_unprepare(dsi->grf_clk);
|
||||
}
|
||||
@@ -923,6 +925,18 @@ static int dw_mipi_dsi_rockchip_bind(struct device *dev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ ret = clk_prepare_enable(dsi->grf_clk);
|
||||
+ if (ret) {
|
||||
+ DRM_DEV_ERROR(dsi->dev, "Failed to enable grf_clk: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ dw_mipi_dsi_rockchip_config(dsi);
|
||||
+ if (dsi->slave)
|
||||
+ dw_mipi_dsi_rockchip_config(dsi->slave);
|
||||
+
|
||||
+ clk_disable_unprepare(dsi->grf_clk);
|
||||
+
|
||||
ret = rockchip_dsi_drm_create_encoder(dsi, drm_dev);
|
||||
if (ret) {
|
||||
DRM_DEV_ERROR(dev, "Failed to create drm encoder\n");
|
||||
309
Code/patch/armbian_build_a06/patch/kernel-005-backlight.patch
Normal file
309
Code/patch/armbian_build_a06/patch/kernel-005-backlight.patch
Normal file
@ -0,0 +1,309 @@
|
||||
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
|
||||
index d83c87b90..2f1b6105e 100644
|
||||
--- a/drivers/video/backlight/Kconfig
|
||||
+++ b/drivers/video/backlight/Kconfig
|
||||
@@ -456,6 +456,12 @@ config BACKLIGHT_LED
|
||||
If you have a LCD backlight adjustable by LED class driver, say Y
|
||||
to enable this driver.
|
||||
|
||||
+config BACKLIGHT_OCP8178
|
||||
+ tristate "OCP8178 Backlight Driver"
|
||||
+ depends on GPIOLIB
|
||||
+ help
|
||||
+ If you have an OCP8178, say Y to enable the backlight driver.
|
||||
+
|
||||
endif # BACKLIGHT_CLASS_DEVICE
|
||||
|
||||
endmenu
|
||||
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
|
||||
index 685f3f1ca..f1160d626 100644
|
||||
--- a/drivers/video/backlight/Makefile
|
||||
+++ b/drivers/video/backlight/Makefile
|
||||
@@ -57,3 +57,4 @@ obj-$(CONFIG_BACKLIGHT_WM831X) += wm831x_bl.o
|
||||
obj-$(CONFIG_BACKLIGHT_ARCXCNN) += arcxcnn_bl.o
|
||||
obj-$(CONFIG_BACKLIGHT_RAVE_SP) += rave-sp-backlight.o
|
||||
obj-$(CONFIG_BACKLIGHT_LED) += led_bl.o
|
||||
+obj-$(CONFIG_BACKLIGHT_OCP8178) += ocp8178_bl.o
|
||||
diff --git a/drivers/video/backlight/ocp8178_bl.c b/drivers/video/backlight/ocp8178_bl.c
|
||||
new file mode 100644
|
||||
index 000000000..db8db1771
|
||||
--- /dev/null
|
||||
+++ b/drivers/video/backlight/ocp8178_bl.c
|
||||
@@ -0,0 +1,277 @@
|
||||
+/*
|
||||
+ * ocp8178_bl.c - ocp8178 backlight driver
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/backlight.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/fb.h>
|
||||
+#include <linux/gpio.h> /* Only for legacy support */
|
||||
+#include <linux/gpio/consumer.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_gpio.h>
|
||||
+#include <linux/platform_data/gpio_backlight.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/timer.h>
|
||||
+#include <linux/poll.h>
|
||||
+#include <linux/proc_fs.h>
|
||||
+#include <linux/seq_file.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/irq.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/clk.h>
|
||||
+
|
||||
+struct ocp8178_backlight {
|
||||
+ struct device *dev;
|
||||
+ struct device *fbdev;
|
||||
+
|
||||
+ struct gpio_desc *gpiod;
|
||||
+ int def_value;
|
||||
+ int current_value;
|
||||
+};
|
||||
+
|
||||
+#define DETECT_DELAY 200
|
||||
+#define DETECT_TIME 500
|
||||
+#define DETECT_WINDOW_TIME 1000
|
||||
+#define START_TIME 10
|
||||
+#define END_TIME 10
|
||||
+#define SHUTDOWN_TIME 3000
|
||||
+#define LOW_BIT_HIGH_TIME 10
|
||||
+#define LOW_BIT_LOW_TIME 50
|
||||
+#define HIGH_BIT_HIGH_TIME 50
|
||||
+#define HIGH_BIT_LOW_TIME 10
|
||||
+#define MAX_BRIGHTNESS_VALUE 9
|
||||
+
|
||||
+static void entry_1wire_mode(struct ocp8178_backlight *gbl)
|
||||
+{
|
||||
+ unsigned long flags = 0;
|
||||
+ local_irq_save(flags);
|
||||
+ gpiod_set_value(gbl->gpiod, 0);
|
||||
+ mdelay(SHUTDOWN_TIME/1000);
|
||||
+ gpiod_set_value(gbl->gpiod, 1);
|
||||
+ udelay(DETECT_DELAY);
|
||||
+ gpiod_set_value(gbl->gpiod, 0);
|
||||
+ udelay(DETECT_TIME);
|
||||
+ gpiod_set_value(gbl->gpiod, 1);
|
||||
+ udelay(DETECT_WINDOW_TIME);
|
||||
+ local_irq_restore(flags);
|
||||
+}
|
||||
+
|
||||
+static inline void write_bit(struct ocp8178_backlight *gbl, int bit)
|
||||
+{
|
||||
+ if (bit) {
|
||||
+ gpiod_set_value(gbl->gpiod, 0);
|
||||
+ udelay(HIGH_BIT_LOW_TIME);
|
||||
+ gpiod_set_value(gbl->gpiod, 1);
|
||||
+ udelay(HIGH_BIT_HIGH_TIME);
|
||||
+ } else {
|
||||
+ gpiod_set_value(gbl->gpiod, 0);
|
||||
+ udelay(LOW_BIT_LOW_TIME);
|
||||
+ gpiod_set_value(gbl->gpiod, 1);
|
||||
+ udelay(LOW_BIT_HIGH_TIME);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void write_byte(struct ocp8178_backlight *gbl, int byte)
|
||||
+{
|
||||
+ unsigned long flags = 0;
|
||||
+ unsigned char data = 0x72;
|
||||
+ int i;
|
||||
+
|
||||
+ local_irq_save(flags);
|
||||
+
|
||||
+ gpiod_set_value(gbl->gpiod, 1);
|
||||
+ udelay(START_TIME);
|
||||
+ for(i = 0; i < 8; i++) {
|
||||
+ if(data & 0x80) {
|
||||
+ write_bit(gbl, 1);
|
||||
+ } else {
|
||||
+ write_bit(gbl, 0);
|
||||
+ }
|
||||
+ data <<= 1;
|
||||
+ }
|
||||
+ gpiod_set_value(gbl->gpiod, 0);
|
||||
+ udelay(END_TIME);
|
||||
+
|
||||
+ data = byte & 0x1f;
|
||||
+
|
||||
+ gpiod_set_value(gbl->gpiod, 1);
|
||||
+ udelay(START_TIME);
|
||||
+ for(i = 0; i < 8; i++) {
|
||||
+ if(data & 0x80) {
|
||||
+ write_bit(gbl, 1);
|
||||
+ } else {
|
||||
+ write_bit(gbl, 0);
|
||||
+ }
|
||||
+ data <<= 1;
|
||||
+ }
|
||||
+ gpiod_set_value(gbl->gpiod, 0);
|
||||
+ udelay(END_TIME);
|
||||
+ gpiod_set_value(gbl->gpiod, 1);
|
||||
+
|
||||
+ local_irq_restore(flags);
|
||||
+}
|
||||
+
|
||||
+unsigned char ocp8178_bl_table[MAX_BRIGHTNESS_VALUE+1] = {0, 1, 4, 8, 12, 16, 20, 24, 28, 31};
|
||||
+
|
||||
+static int ocp8178_update_status(struct backlight_device *bl)
|
||||
+{
|
||||
+ struct ocp8178_backlight *gbl = bl_get_data(bl);
|
||||
+ int brightness = bl->props.brightness, i;
|
||||
+
|
||||
+ if (bl->props.power != FB_BLANK_UNBLANK ||
|
||||
+ bl->props.fb_blank != FB_BLANK_UNBLANK ||
|
||||
+ bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
|
||||
+ brightness = 0;
|
||||
+
|
||||
+ if(brightness > MAX_BRIGHTNESS_VALUE)
|
||||
+ brightness = MAX_BRIGHTNESS_VALUE;
|
||||
+
|
||||
+ for(i = 0; i < 2; i++) {
|
||||
+ entry_1wire_mode(gbl);
|
||||
+ write_byte(gbl, ocp8178_bl_table[brightness]);
|
||||
+ }
|
||||
+ gbl->current_value = brightness;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ocp8178_get_brightness(struct backlight_device *bl)
|
||||
+{
|
||||
+ struct ocp8178_backlight *gbl = bl_get_data(bl);
|
||||
+ return gbl->current_value;
|
||||
+}
|
||||
+
|
||||
+static int ocp8178_check_fb(struct backlight_device *bl,
|
||||
+ struct fb_info *info)
|
||||
+{
|
||||
+ struct ocp8178_backlight *gbl = bl_get_data(bl);
|
||||
+ return gbl->fbdev == NULL || gbl->fbdev == info->dev;
|
||||
+}
|
||||
+
|
||||
+static const struct backlight_ops ocp8178_backlight_ops = {
|
||||
+ .options = BL_CORE_SUSPENDRESUME,
|
||||
+ .update_status = ocp8178_update_status,
|
||||
+ .get_brightness = ocp8178_get_brightness,
|
||||
+ .check_fb = ocp8178_check_fb,
|
||||
+};
|
||||
+
|
||||
+static int ocp8178_probe_dt(struct platform_device *pdev,
|
||||
+ struct ocp8178_backlight *gbl)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct device_node *np = dev->of_node;
|
||||
+ enum gpiod_flags flags;
|
||||
+ int ret = 0;
|
||||
+ u32 value32;
|
||||
+
|
||||
+ of_property_read_u32(np, "default-brightness", &value32);
|
||||
+ if(value32 > MAX_BRIGHTNESS_VALUE)
|
||||
+ gbl->def_value = MAX_BRIGHTNESS_VALUE;
|
||||
+ else
|
||||
+ gbl->def_value = value32;
|
||||
+ flags = gbl->def_value ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
|
||||
+
|
||||
+ gbl->gpiod = devm_gpiod_get(dev, "backlight-control", flags);
|
||||
+ if (IS_ERR(gbl->gpiod)) {
|
||||
+ ret = PTR_ERR(gbl->gpiod);
|
||||
+
|
||||
+ if (ret != -EPROBE_DEFER) {
|
||||
+ dev_err(dev,
|
||||
+ "Error: The gpios parameter is missing or invalid.\n");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static struct backlight_device *backlight;
|
||||
+
|
||||
+static int ocp8178_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct backlight_properties props;
|
||||
+ struct backlight_device *bl;
|
||||
+ struct ocp8178_backlight *gbl;
|
||||
+ struct device_node *np = pdev->dev.of_node;
|
||||
+ int ret;
|
||||
+
|
||||
+ if ( !np) {
|
||||
+ dev_err(&pdev->dev,
|
||||
+ "failed to find platform data or device tree node.\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ gbl = devm_kzalloc(&pdev->dev, sizeof(*gbl), GFP_KERNEL);
|
||||
+ if (gbl == NULL)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ gbl->dev = &pdev->dev;
|
||||
+
|
||||
+ ret = ocp8178_probe_dt(pdev, gbl);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ gbl->current_value = gbl->def_value;
|
||||
+
|
||||
+ memset(&props, 0, sizeof(props));
|
||||
+ props.type = BACKLIGHT_RAW;
|
||||
+ props.max_brightness = MAX_BRIGHTNESS_VALUE;
|
||||
+ bl = devm_backlight_device_register(&pdev->dev, dev_name(&pdev->dev),
|
||||
+ &pdev->dev, gbl, &ocp8178_backlight_ops,
|
||||
+ &props);
|
||||
+ if (IS_ERR(bl)) {
|
||||
+ dev_err(&pdev->dev, "failed to register backlight\n");
|
||||
+ return PTR_ERR(bl);
|
||||
+ }
|
||||
+
|
||||
+// entry_1wire_mode(gbl);
|
||||
+
|
||||
+ bl->props.brightness = gbl->def_value;
|
||||
+ backlight_update_status(bl);
|
||||
+
|
||||
+ platform_set_drvdata(pdev, bl);
|
||||
+
|
||||
+ backlight = bl;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ocp8178_suspend(struct platform_device *pdev, pm_message_t state)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ocp8178_resume(struct platform_device *pdev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct of_device_id ocp8178_of_match[] = {
|
||||
+ { .compatible = "ocp8178-backlight" },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+
|
||||
+MODULE_DEVICE_TABLE(of, ocp8178_of_match);
|
||||
+
|
||||
+static struct platform_driver ocp8178_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "ocp8178-backlight",
|
||||
+ .of_match_table = of_match_ptr(ocp8178_of_match),
|
||||
+ },
|
||||
+ .probe = ocp8178_probe,
|
||||
+ .suspend = ocp8178_suspend,
|
||||
+ .resume = ocp8178_resume,
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(ocp8178_driver);
|
||||
+
|
||||
+MODULE_DESCRIPTION("OCP8178 Driver");
|
||||
+MODULE_LICENSE("GPL");
|
||||
9199
Code/patch/armbian_build_a06/patch/linux-rockchip64-current.config
Normal file
9199
Code/patch/armbian_build_a06/patch/linux-rockchip64-current.config
Normal file
File diff suppressed because it is too large
Load Diff
242
Code/patch/armbian_build_a06/patch/uboot-clockworkpi-a06.patch
Normal file
242
Code/patch/armbian_build_a06/patch/uboot-clockworkpi-a06.patch
Normal file
@ -0,0 +1,242 @@
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index f8f52943..a56b820a 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -119,6 +119,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \
|
||||
rk3368-px5-evb.dtb \
|
||||
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
+ rk3399-clockworkpi-a06.dtb \
|
||||
rk3399-evb.dtb \
|
||||
rk3399-ficus.dtb \
|
||||
rk3399-firefly.dtb \
|
||||
diff --git a/arch/arm/dts/rk3399-clockworkpi-a06.dts b/arch/arm/dts/rk3399-clockworkpi-a06.dts
|
||||
new file mode 100644
|
||||
index 00000000..9717c1c7
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-clockworkpi-a06.dts
|
||||
@@ -0,0 +1,165 @@
|
||||
+/*
|
||||
+ * (C) Copyright 2016 Rockchip Electronics Co., Ltd
|
||||
+ *
|
||||
+ * SPDX-License-Identifier: GPL-2.0+
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/pwm/pwm.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include "rk3399.dtsi"
|
||||
+#include "rk3399-opp.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Clockworkpi A06";
|
||||
+ compatible = "clockwork,devterm-a06", "rockchip,rk3399";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ vdd_center: vdd-center {
|
||||
+ compatible = "pwm-regulator";
|
||||
+ pwms = <&pwm3 0 25000 1>;
|
||||
+ regulator-name = "vdd_center";
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1400000>;
|
||||
+ regulator-init-microvolt = <950000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ vccsys: vccsys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vccsys";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_phy: vcc-phy-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc_phy";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_host: vcc5v0-host-en {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_host";
|
||||
+ gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_typec0: vcc5v0-typec0-en {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_typec0";
|
||||
+ gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_typec1: vcc5v0-typec1-en {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_typec1";
|
||||
+ gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ clkin_gmac: external-gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "clkin_gmac";
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ mmc-hs400-1_8v;
|
||||
+ mmc-hs400-enhanced-strobe;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <400000>;
|
||||
+ i2c-scl-falling-time-ns = <50>;
|
||||
+ i2c-scl-rising-time-ns = <100>;
|
||||
+ u-boot,dm-pre-reloc;
|
||||
+
|
||||
+ rk808: pmic@1b {
|
||||
+ compatible = "rockchip,rk808";
|
||||
+ clock-output-names = "xin32k", "wifibt_32kin";
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ reg = <0x1b>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ #clock-cells = <1>;
|
||||
+ u-boot,dm-pre-reloc;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vcc12-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vcc33_lcd: SWITCH_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc33_lcd";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins =
|
||||
+ <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ pmic_dvs2: pmic-dvs2 {
|
||||
+ rockchip,pins =
|
||||
+ <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
diff --git a/configs/clockworkpi-a06-rk3399_defconfig b/configs/clockworkpi-a06-rk3399_defconfig
|
||||
new file mode 100644
|
||||
index 00000000..d2003073
|
||||
--- /dev/null
|
||||
+++ b/configs/clockworkpi-a06-rk3399_defconfig
|
||||
@@ -0,0 +1,53 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_ROCKCHIP_RK3399=y
|
||||
+CONFIG_TARGET_EVB_RK3399=y
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-clockworkpi-a06"
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-clockworkpi-a06.dtb"
|
||||
+CONFIG_MISC_INIT_R=y
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
|
||||
+CONFIG_TPL=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_RAM_RK3399_LPDDR4=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSRESET=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_DWC3=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_USB_KEYBOARD=y
|
||||
+CONFIG_DM_VIDEO=y
|
||||
+CONFIG_DISPLAY=y
|
||||
+CONFIG_VIDEO_ROCKCHIP=y
|
||||
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
Loading…
x
Reference in New Issue
Block a user