[xt-q8l-v10] fixed act8846 regulator against kernel 5.4, enabled eMMC DDR mode (#1778)

* Added ALSA configuration bits for rk3288 HDMI and SPDIF to allow
pulseaudio show proper sound device/profile/mapping names instead of
just "Built-in Audio" for all of them

* Added ALSA device description in asound.conf to provide correct labels for PulseAudio for RK3288 devices when SPDIF and DW-I2S-HDMI simple audio cards are exposed
Removed unnecessary ALSA configuration files previously added from rockchip.conf

* Fixed cpu operating points tables and raised a bit (+5°C) cooling for non-critical temperatures for xt-q8l-v10 in dev and next kernel flavours

* Fixed again cpu opp table

* Removed whole cpu opp table and retouch only necessary operating points

* Enabled gpiomem driver for xt-q8l-v10 in next kernel flavour

* Added debounce delay and card detect gpio pins for sdmmc card holder for xt-q8l-v10 board

* Added card-detect and debounce delay for sdmmc for xt-q8l-v10 board in next kernel flavour too

* Fixed missing comment in xt-q8l-v10 device tree patch

* Added gpiomem to xt-q8l-v10 board for dev kernel

* Fixed FAN53555/Silergy patches to accomodate changes in u-boot v2019.04

* Changed property property flags for USB regulators in u-boot and kernel: kernel is now informed that bootloader is going to turn the USB power on

* Fixed indentation in rk3288-xt-q8l-v10.dts, raised debounce delay to sdmmc, added vbus-supply to USB host, removed some unneeded properties

* Added working DDR52 mode for eMMC on xt-q8l-v10

* Removed regulator-off-in-suspend for some xt-q8l-v10 regulators due to changed in act8865.c driver which causes the regulators to be misconfigured

* Adjusted targets for xt-q8l-v10 (provides bionic desktop + buster server)

* Removed all regular-state-mem nodes in xt-q8l-v10 device tree because the change in act8865.c affects also non-off entries

* Brought xt-q8l-v10 device tree from rockchip-current to rockchip-dev
This commit is contained in:
Paolo 2020-02-05 00:37:02 +01:00 committed by GitHub
parent a186fd4984
commit 008f3fd47c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 416 additions and 254 deletions

View file

@ -620,10 +620,8 @@ tritium-h5 current bionic cli stable yes
# xt-q8l-v10 # xt-q8l-v10
xt-q8l-v10 legacy buster cli stable yes xt-q8l-v10 current bionic desktop stable yes
xt-q8l-v10 legacy bionic desktop stable yes xt-q8l-v10 current buster minimal stable yes
xt-q8l-v10 current bionic minimal stable yes
xt-q8l-v10 current bullseye minimal stable yes
# Z28 pro # Z28 pro

View file

@ -1,6 +1,9 @@
diff --git a/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts b/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts
new file mode 100644
index 000000000..539e445b4
--- /dev/null --- /dev/null
+++ b/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts 2019-08-03 13:55:48.719992666 +0000 +++ b/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts
@@ -0,0 +1,982 @@ @@ -0,0 +1,1061 @@
+/* +/*
+ * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com> + * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
+ * 2018 Paolo Sabatino <paolo.sabatino@gm**l.com> + * 2018 Paolo Sabatino <paolo.sabatino@gm**l.com>
@ -53,7 +56,7 @@
+ model = "XT-Q8L-V10-RK3288"; + model = "XT-Q8L-V10-RK3288";
+ compatible = "generic,xt-q8l-v10-rk3288", "rockchip,rk3288"; + compatible = "generic,xt-q8l-v10-rk3288", "rockchip,rk3288";
+ +
+ memory { + memory@0 {
+ reg = <0x0 0x0 0x0 0x80000000>; + reg = <0x0 0x0 0x0 0x80000000>;
+ device_type = "memory"; + device_type = "memory";
+ }; + };
@ -162,7 +165,12 @@
+ regulator-name = "vcc_flash"; + regulator-name = "vcc_flash";
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>; + regulator-max-microvolt = <1800000>;
+ /*gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
+ states = <1800000 0>,
+ <3300000 1>;
+ */
+ vin-supply = <&vcc_io>; + vin-supply = <&vcc_io>;
+ startup-delay-us = <100000>;
+ }; + };
+ +
+ vcc_host_5v: usb-host-regulator { + vcc_host_5v: usb-host-regulator {
@ -200,6 +208,13 @@
+ post-power-on-delay-ms = <100>; + post-power-on-delay-ms = <100>;
+ }; + };
+ +
+ emmc_pwrseq: emmc-pwrseq {
+ compatible = "mmc-pwrseq-emmc";
+ pinctrl-0 = <&emmc_reset>;
+ pinctrl-names = "default";
+ reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
+ };
+
+ /* + /*
+ * Sound taken from tinkerboard device tree, adapted to q8. + * Sound taken from tinkerboard device tree, adapted to q8.
+ */ + */
@ -360,9 +375,12 @@
+ regulator-min-microvolt = <1200000>; + regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>; + regulator-max-microvolt = <1200000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -374,9 +392,12 @@
+ regulator-min-microvolt = <3300000>; + regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>; + regulator-max-microvolt = <3300000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -390,9 +411,12 @@
+ regulator-min-microvolt = <1100000>; + regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>; + regulator-max-microvolt = <1100000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -405,9 +429,12 @@
+ regulator-min-microvolt = <2000000>; + regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>; + regulator-max-microvolt = <2000000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -419,10 +446,13 @@
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>; + regulator-max-microvolt = <3300000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>; + regulator-suspend-microvolt = <3300000>;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -434,9 +464,12 @@
+ regulator-min-microvolt = <1000000>; + regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>; + regulator-max-microvolt = <1000000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -449,9 +482,14 @@
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>; + regulator-max-microvolt = <1800000>;
+ regulator-always-on; + regulator-always-on;
+
+ /*
+ The regulator can be set off in suspend, but kernel 5.4 modifications
+ to enable suspend for ACT8865 device break the ACT8846
+ regulator-state-mem { + regulator-state-mem {
+ regulator-off-in-suspend; + regulator-off-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -463,9 +501,14 @@
+ regulator-min-microvolt = <3300000>; + regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>; + regulator-max-microvolt = <3300000>;
+ regulator-always-on; // Turn this on to get SPDIF! + regulator-always-on; // Turn this on to get SPDIF!
+
+ /*
+ The regulator can be set off in suspend, but kernel 5.4 modifications
+ to enable suspend for ACT8865 device break the ACT8846
+ regulator-state-mem { + regulator-state-mem {
+ regulator-off-in-suspend; + regulator-off-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -475,9 +518,13 @@
+ regulator-name = "vcc_lan"; + regulator-name = "vcc_lan";
+ regulator-min-microvolt = <3300000>; + regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>; + regulator-max-microvolt = <3300000>;
+
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -489,9 +536,13 @@
+ regulator-min-microvolt = <1000000>; + regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>; + regulator-max-microvolt = <1000000>;
+ regulator-always-on; + regulator-always-on;
+
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -503,9 +554,13 @@
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>; + regulator-max-microvolt = <1800000>;
+ regulator-always-on; + regulator-always-on;
+
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -518,9 +573,14 @@
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>; + regulator-max-microvolt = <1800000>;
+ regulator-always-on; + regulator-always-on;
+
+ /*
+ The regulator can be set off in suspend, but kernel 5.4 modifications
+ to enable suspend for ACT8865 device break the ACT8846
+ regulator-state-mem { + regulator-state-mem {
+ regulator-off-in-suspend; + regulator-off-in-suspend;
+ }; + };
+ */
+ }; + };
+ }; + };
+ }; + };
@ -709,6 +769,14 @@
+ }; + };
+ }; + };
+ +
+ emmc {
+
+ emmc_reset: emmc-reset {
+ rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ };
+
+}; +};
+ +
+&saradc { +&saradc {
@ -719,22 +787,32 @@
+&emmc { +&emmc {
+ +
+ /* + /*
+ * eMMC seems to be 52Mhz device on q8 devices, so set it here + * eMMC is a 52Mhz DDR device on q8 devices, so set it here.
+ * vmmc-supply and vqmmc-supply are removed because they hang + * Setting default-sample-rate to 180 degrees is very important,
+ * u-boot >= v2018.03 + * otherwise the eMMC is not stable and may not be able to negotiate
+ * From the original q8l firmware and eMMC datasheet it also should + * the right clock.
+ * support DDR highspeed mode, but using mmc-ddr-3_3v or mmc-ddr-1_8v + * Despite the code already seems to use 180 degree phase when
+ * properties are not working + * MMC + 8bit bus is set, we need to set default phase here too.
+ *
+ * Huge hint came from this patch:
+ * https://patchwork.kernel.org/patch/11129183/
+ *
+ */ + */
+ clock-frequency = <50000000>;
+
+ broken-cd; + broken-cd;
+ bus-width = <8>; + bus-width = <8>;
+ cap-mmc-highspeed; + cap-mmc-highspeed;
+
+ disable-wp; + disable-wp;
+ non-removable; + non-removable;
+ pinctrl-names = "default"; + pinctrl-names = "default";
+ pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>; + pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
+
+ vmmc-supply = <&vcc_io>;
+ vqmmc-supply = <&vcc_flash>;
+
+ mmc-pwrseq = <&emmc_pwrseq>;
+ mmc-ddr-1_8v;
+ rockchip,default-sample-phase = <180>;
+ +
+ status = "okay"; + status = "okay";
+}; +};
@ -746,9 +824,7 @@
+ cap-mmc-highspeed; + cap-mmc-highspeed;
+ cap-sd-highspeed; + cap-sd-highspeed;
+ cd-gpios = <&gpio6 RK_PC6 GPIO_ACTIVE_LOW>; + cd-gpios = <&gpio6 RK_PC6 GPIO_ACTIVE_LOW>;
+ cd-debounce-delay-ms = <200>; + cd-debounce-delay-ms = <500>;
+ post-power-on-delay-ms = <50>;
+ supports-cqe;
+ disable-wp; + disable-wp;
+ pinctrl-names = "default"; + pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; + pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
@ -774,8 +850,8 @@
+ vqmmc-supply = <&vcc_18>; // This must be the same as in io_domains, + vqmmc-supply = <&vcc_18>; // This must be the same as in io_domains,
+ // otherwise the mmc1 device won't be detected properly + // otherwise the mmc1 device won't be detected properly
+ +
+// clock-frequency = <50000000>; + // clock-frequency = <50000000>;
+// max-frequency = <50000000>; + // max-frequency = <50000000>;
+ +
+ pinctrl-names = "default"; + pinctrl-names = "default";
+ pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
@ -879,14 +955,6 @@
+ status = "okay"; + status = "okay";
+}; +};
+ +
+&usbphy0 {
+ vbus-supply = <&vcc_otg_5v>;
+};
+
+&usbphy2 {
+ vbus-supply = <&vcc_host_5v>;
+};
+
+&usb_host0_ehci { +&usb_host0_ehci {
+ dr_mode = "host"; + dr_mode = "host";
+ reg = <0x0 0xff500000 0x0 0x20000>; + reg = <0x0 0xff500000 0x0 0x20000>;
@ -894,10 +962,12 @@
+}; +};
+ +
+&usb_host1 { +&usb_host1 {
+ vbus-supply = <&vcc_host_5v>;
+ status = "okay"; + status = "okay";
+}; +};
+ +
+&usb_otg { +&usb_otg {
+ vbus-supply = <&vcc_otg_5v>;
+ status = "okay"; + status = "okay";
+}; +};
+ +
@ -924,18 +994,10 @@
+ status = "okay"; + status = "okay";
+}; +};
+ +
+//&vpu_service {
+// status = "okay";
+//};
+
+&hevc_mmu { +&hevc_mmu {
+ status = "okay"; + status = "okay";
+}; +};
+ +
+//&hevc_service {
+// status = "okay";
+//};
+
+&wdt { +&wdt {
+ status = "okay"; + status = "okay";
+}; +};
@ -978,6 +1040,26 @@
+ opp-1608000000 { + opp-1608000000 {
+ opp-microvolt = <1300000>; + opp-microvolt = <1300000>;
+ }; + };
+
+ /*
+ Remove the overclocking/turbo frequencies
+ */
+ /delete-node/ opp@1704000000;
+ /delete-node/ opp@1800000000;
+ /delete-node/ opp@1896000000;
+ /delete-node/ opp@1920000000;
+ /delete-node/ opp@1992000000;
+ /delete-node/ opp@2016000000;
+ /delete-node/ opp@2040000000;
+ /delete-node/ opp@2064000000;
+ /delete-node/ opp@2088000000;
+ /delete-node/ opp@2112000000;
+ /delete-node/ opp@2136000000;
+ /delete-node/ opp@2160000000;
+ /delete-node/ opp@2184000000;
+ /delete-node/ opp@2208000000;
+
+
+}; +};
+ +
+&gpiomem { +&gpiomem {

View file

@ -1,6 +1,9 @@
diff --git a/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts b/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts
new file mode 100644
index 000000000..539e445b4
--- /dev/null --- /dev/null
+++ b/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts 2019-08-03 13:55:48.719992666 +0000 +++ b/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts
@@ -0,0 +1,982 @@ @@ -0,0 +1,1061 @@
+/* +/*
+ * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com> + * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
+ * 2018 Paolo Sabatino <paolo.sabatino@gm**l.com> + * 2018 Paolo Sabatino <paolo.sabatino@gm**l.com>
@ -53,7 +56,7 @@
+ model = "XT-Q8L-V10-RK3288"; + model = "XT-Q8L-V10-RK3288";
+ compatible = "generic,xt-q8l-v10-rk3288", "rockchip,rk3288"; + compatible = "generic,xt-q8l-v10-rk3288", "rockchip,rk3288";
+ +
+ memory { + memory@0 {
+ reg = <0x0 0x0 0x0 0x80000000>; + reg = <0x0 0x0 0x0 0x80000000>;
+ device_type = "memory"; + device_type = "memory";
+ }; + };
@ -162,7 +165,12 @@
+ regulator-name = "vcc_flash"; + regulator-name = "vcc_flash";
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>; + regulator-max-microvolt = <1800000>;
+ /*gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
+ states = <1800000 0>,
+ <3300000 1>;
+ */
+ vin-supply = <&vcc_io>; + vin-supply = <&vcc_io>;
+ startup-delay-us = <100000>;
+ }; + };
+ +
+ vcc_host_5v: usb-host-regulator { + vcc_host_5v: usb-host-regulator {
@ -200,6 +208,13 @@
+ post-power-on-delay-ms = <100>; + post-power-on-delay-ms = <100>;
+ }; + };
+ +
+ emmc_pwrseq: emmc-pwrseq {
+ compatible = "mmc-pwrseq-emmc";
+ pinctrl-0 = <&emmc_reset>;
+ pinctrl-names = "default";
+ reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
+ };
+
+ /* + /*
+ * Sound taken from tinkerboard device tree, adapted to q8. + * Sound taken from tinkerboard device tree, adapted to q8.
+ */ + */
@ -360,9 +375,12 @@
+ regulator-min-microvolt = <1200000>; + regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>; + regulator-max-microvolt = <1200000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -374,9 +392,12 @@
+ regulator-min-microvolt = <3300000>; + regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>; + regulator-max-microvolt = <3300000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -390,9 +411,12 @@
+ regulator-min-microvolt = <1100000>; + regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>; + regulator-max-microvolt = <1100000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -405,9 +429,12 @@
+ regulator-min-microvolt = <2000000>; + regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>; + regulator-max-microvolt = <2000000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -419,10 +446,13 @@
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>; + regulator-max-microvolt = <3300000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>; + regulator-suspend-microvolt = <3300000>;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -434,9 +464,12 @@
+ regulator-min-microvolt = <1000000>; + regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>; + regulator-max-microvolt = <1000000>;
+ regulator-always-on; + regulator-always-on;
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -449,9 +482,14 @@
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>; + regulator-max-microvolt = <1800000>;
+ regulator-always-on; + regulator-always-on;
+
+ /*
+ The regulator can be set off in suspend, but kernel 5.4 modifications
+ to enable suspend for ACT8865 device break the ACT8846
+ regulator-state-mem { + regulator-state-mem {
+ regulator-off-in-suspend; + regulator-off-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -463,9 +501,14 @@
+ regulator-min-microvolt = <3300000>; + regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>; + regulator-max-microvolt = <3300000>;
+ regulator-always-on; // Turn this on to get SPDIF! + regulator-always-on; // Turn this on to get SPDIF!
+
+ /*
+ The regulator can be set off in suspend, but kernel 5.4 modifications
+ to enable suspend for ACT8865 device break the ACT8846
+ regulator-state-mem { + regulator-state-mem {
+ regulator-off-in-suspend; + regulator-off-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -475,9 +518,13 @@
+ regulator-name = "vcc_lan"; + regulator-name = "vcc_lan";
+ regulator-min-microvolt = <3300000>; + regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>; + regulator-max-microvolt = <3300000>;
+
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -489,9 +536,13 @@
+ regulator-min-microvolt = <1000000>; + regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>; + regulator-max-microvolt = <1000000>;
+ regulator-always-on; + regulator-always-on;
+
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -503,9 +554,13 @@
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>; + regulator-max-microvolt = <1800000>;
+ regulator-always-on; + regulator-always-on;
+
+ /*
+ * Broken in kernel 5.4
+ regulator-state-mem { + regulator-state-mem {
+ regulator-on-in-suspend; + regulator-on-in-suspend;
+ }; + };
+ */
+ }; + };
+ +
+ /* + /*
@ -518,9 +573,14 @@
+ regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>; + regulator-max-microvolt = <1800000>;
+ regulator-always-on; + regulator-always-on;
+
+ /*
+ The regulator can be set off in suspend, but kernel 5.4 modifications
+ to enable suspend for ACT8865 device break the ACT8846
+ regulator-state-mem { + regulator-state-mem {
+ regulator-off-in-suspend; + regulator-off-in-suspend;
+ }; + };
+ */
+ }; + };
+ }; + };
+ }; + };
@ -709,6 +769,14 @@
+ }; + };
+ }; + };
+ +
+ emmc {
+
+ emmc_reset: emmc-reset {
+ rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ };
+
+}; +};
+ +
+&saradc { +&saradc {
@ -719,22 +787,32 @@
+&emmc { +&emmc {
+ +
+ /* + /*
+ * eMMC seems to be 52Mhz device on q8 devices, so set it here + * eMMC is a 52Mhz DDR device on q8 devices, so set it here.
+ * vmmc-supply and vqmmc-supply are removed because they hang + * Setting default-sample-rate to 180 degrees is very important,
+ * u-boot >= v2018.03 + * otherwise the eMMC is not stable and may not be able to negotiate
+ * From the original q8l firmware and eMMC datasheet it also should + * the right clock.
+ * support DDR highspeed mode, but using mmc-ddr-3_3v or mmc-ddr-1_8v + * Despite the code already seems to use 180 degree phase when
+ * properties are not working + * MMC + 8bit bus is set, we need to set default phase here too.
+ *
+ * Huge hint came from this patch:
+ * https://patchwork.kernel.org/patch/11129183/
+ *
+ */ + */
+ clock-frequency = <50000000>;
+
+ broken-cd; + broken-cd;
+ bus-width = <8>; + bus-width = <8>;
+ cap-mmc-highspeed; + cap-mmc-highspeed;
+
+ disable-wp; + disable-wp;
+ non-removable; + non-removable;
+ pinctrl-names = "default"; + pinctrl-names = "default";
+ pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>; + pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
+
+ vmmc-supply = <&vcc_io>;
+ vqmmc-supply = <&vcc_flash>;
+
+ mmc-pwrseq = <&emmc_pwrseq>;
+ mmc-ddr-1_8v;
+ rockchip,default-sample-phase = <180>;
+ +
+ status = "okay"; + status = "okay";
+}; +};
@ -746,9 +824,7 @@
+ cap-mmc-highspeed; + cap-mmc-highspeed;
+ cap-sd-highspeed; + cap-sd-highspeed;
+ cd-gpios = <&gpio6 RK_PC6 GPIO_ACTIVE_LOW>; + cd-gpios = <&gpio6 RK_PC6 GPIO_ACTIVE_LOW>;
+ cd-debounce-delay-ms = <200>; + cd-debounce-delay-ms = <500>;
+ post-power-on-delay-ms = <50>;
+ supports-cqe;
+ disable-wp; + disable-wp;
+ pinctrl-names = "default"; + pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; + pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
@ -774,8 +850,8 @@
+ vqmmc-supply = <&vcc_18>; // This must be the same as in io_domains, + vqmmc-supply = <&vcc_18>; // This must be the same as in io_domains,
+ // otherwise the mmc1 device won't be detected properly + // otherwise the mmc1 device won't be detected properly
+ +
+// clock-frequency = <50000000>; + // clock-frequency = <50000000>;
+// max-frequency = <50000000>; + // max-frequency = <50000000>;
+ +
+ pinctrl-names = "default"; + pinctrl-names = "default";
+ pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
@ -879,14 +955,6 @@
+ status = "okay"; + status = "okay";
+}; +};
+ +
+&usbphy0 {
+ vbus-supply = <&vcc_otg_5v>;
+};
+
+&usbphy2 {
+ vbus-supply = <&vcc_host_5v>;
+};
+
+&usb_host0_ehci { +&usb_host0_ehci {
+ dr_mode = "host"; + dr_mode = "host";
+ reg = <0x0 0xff500000 0x0 0x20000>; + reg = <0x0 0xff500000 0x0 0x20000>;
@ -894,10 +962,12 @@
+}; +};
+ +
+&usb_host1 { +&usb_host1 {
+ vbus-supply = <&vcc_host_5v>;
+ status = "okay"; + status = "okay";
+}; +};
+ +
+&usb_otg { +&usb_otg {
+ vbus-supply = <&vcc_otg_5v>;
+ status = "okay"; + status = "okay";
+}; +};
+ +
@ -924,18 +994,10 @@
+ status = "okay"; + status = "okay";
+}; +};
+ +
+//&vpu_service {
+// status = "okay";
+//};
+
+&hevc_mmu { +&hevc_mmu {
+ status = "okay"; + status = "okay";
+}; +};
+ +
+//&hevc_service {
+// status = "okay";
+//};
+
+&wdt { +&wdt {
+ status = "okay"; + status = "okay";
+}; +};
@ -978,6 +1040,26 @@
+ opp-1608000000 { + opp-1608000000 {
+ opp-microvolt = <1300000>; + opp-microvolt = <1300000>;
+ }; + };
+
+ /*
+ Remove the overclocking/turbo frequencies
+ */
+ /delete-node/ opp@1704000000;
+ /delete-node/ opp@1800000000;
+ /delete-node/ opp@1896000000;
+ /delete-node/ opp@1920000000;
+ /delete-node/ opp@1992000000;
+ /delete-node/ opp@2016000000;
+ /delete-node/ opp@2040000000;
+ /delete-node/ opp@2064000000;
+ /delete-node/ opp@2088000000;
+ /delete-node/ opp@2112000000;
+ /delete-node/ opp@2136000000;
+ /delete-node/ opp@2160000000;
+ /delete-node/ opp@2184000000;
+ /delete-node/ opp@2208000000;
+
+
+}; +};
+ +
+&gpiomem { +&gpiomem {