mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
- materialized overwrites:
- `add-board-helios64.patch`
- `add-board-orangepi-r1-plus.patch`
- `add-driver-for-Motorcomm-YT85xx+PHYs.patch`
- `add-board-rk3328-roc-pc.patch`
- not touched: wifi patches, those still require work before rebase is consistent.
- `wifi-4003-uwe5622-adjust-for-rockchip.patch`
- this patch is done on top of the wifi drivers patches exclusively, and fails to apply out of tree.
- we should probably consider moving this into the wifi drivers patch harness, not in the rockchip tree.
357 lines
7.8 KiB
Diff
357 lines
7.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
|
Date: Mon, 18 Oct 2021 18:30:28 +0000
|
|
Subject: rk3318-box: add led-conf3 to support MXQ-RK3328-D4 boards with RK805
|
|
PMIC
|
|
|
|
---
|
|
arch/arm64/boot/dts/rockchip/overlay/Makefile | 1 +
|
|
arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays | 7 +
|
|
arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-led-conf3.dts | 305 ++++++++++
|
|
3 files changed, 313 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile
|
|
index c28c7a5ebd40..f11aa6d57449 100644
|
|
--- a/arch/arm64/boot/dts/rockchip/overlay/Makefile
|
|
+++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile
|
|
@@ -13,6 +13,7 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
|
rockchip-w1-gpio.dtbo \
|
|
rockchip-rk3318-box-led-conf1.dtbo \
|
|
rockchip-rk3318-box-led-conf2.dtbo \
|
|
+ rockchip-rk3318-box-led-conf3.dtbo \
|
|
rockchip-rk3318-box-emmc-ddr.dtbo \
|
|
rockchip-rk3318-box-wlan-ap6334.dtbo \
|
|
rockchip-rk3318-box-wlan-ext.dtbo \
|
|
diff --git a/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
|
|
index 4172bd73109b..27f945d38e24 100644
|
|
--- a/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
|
|
+++ b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
|
|
@@ -129,6 +129,13 @@ YX_RK3328 and clones
|
|
Activates led/gpio configuration for rk3318 tv box boards withs signature
|
|
X88_PRO_B and clones
|
|
|
|
+### rk3318-box-led-conf3
|
|
+
|
|
+This device tree overlay is suitable for MXQ-RK3328-D4_A board which
|
|
+has an integrated PMIC (RK805). The dtbo is very important to achieve
|
|
+1.3 Ghz speed for CPU and stable voltages for other parts of the
|
|
+system. Also enables gpio leds and keys.
|
|
+
|
|
### rk3318-box-emmc-ddr
|
|
|
|
Activates eMMC DDR capability for rk3318 tv box boards. Probably all the eMMC chips
|
|
diff --git a/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-led-conf3.dts b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-led-conf3.dts
|
|
new file mode 100644
|
|
index 000000000000..a0d51304db8d
|
|
--- /dev/null
|
|
+++ b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-led-conf3.dts
|
|
@@ -0,0 +1,305 @@
|
|
+/dts-v1/;
|
|
+/plugin/;
|
|
+
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
+#include <dt-bindings/input/input.h>
|
|
+#include <dt-bindings/pinctrl/rockchip.h>
|
|
+#include <dt-bindings/interrupt-controller/irq.h>
|
|
+
|
|
+&{/regulators/regulator@0} {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&{/regulators/regulator@1} {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&{/vdd-arm} {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&{/vdd-log} {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&{/xin32k} {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&i2c1 {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ clock-frequency = <1000000>;
|
|
+ i2c-scl-rising-time-ns = <83>;
|
|
+ i2c-scl-falling-time-ns = <5>;
|
|
+ status = "okay";
|
|
+
|
|
+ rk805: rk805@18 {
|
|
+ compatible = "rockchip,rk805";
|
|
+ reg = <0x18>;
|
|
+ status = "okay";
|
|
+
|
|
+ gpio-controller;
|
|
+ #gpio-cells = <2>;
|
|
+
|
|
+ interrupt-parent = <&gpio2>;
|
|
+ interrupts = <RK_PA6 IRQ_TYPE_LEVEL_LOW>;
|
|
+
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&pmic_int_l>;
|
|
+
|
|
+ rockchip,system-power-controller;
|
|
+ wakeup-source;
|
|
+
|
|
+ #clock-cells = <1>;
|
|
+ clock-output-names = "xin32k", "rk805-clkout2";
|
|
+
|
|
+ vcc1-supply = <&vcc_sys>;
|
|
+ vcc2-supply = <&vcc_sys>;
|
|
+ vcc3-supply = <&vcc_sys>;
|
|
+ vcc4-supply = <&vcc_sys>;
|
|
+ vcc5-supply = <&rk805_vcc_io>;
|
|
+ vcc6-supply = <&rk805_vcc_io>;
|
|
+
|
|
+ rtc {
|
|
+ status = "okay";
|
|
+ };
|
|
+
|
|
+ pwrkey {
|
|
+ status = "okay";
|
|
+ };
|
|
+
|
|
+ gpio {
|
|
+ status = "okay";
|
|
+ };
|
|
+
|
|
+ regulators {
|
|
+ compatible = "rk805-regulator";
|
|
+ status = "okay";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ vdd_logic: DCDC_REG1 {
|
|
+ regulator-name = "vdd_logic";
|
|
+ regulator-min-microvolt = <700000>;
|
|
+ regulator-max-microvolt = <1350000>;
|
|
+ regulator-ramp-delay = <12500>;
|
|
+ regulator-boot-on;
|
|
+ regulator-always-on;
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ regulator-suspend-microvolt = <1000000>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vdd_arm: DCDC_REG2 {
|
|
+ regulator-name = "vdd_arm";
|
|
+ regulator-min-microvolt = <700000>;
|
|
+ regulator-max-microvolt = <1350000>;
|
|
+ regulator-ramp-delay = <12500>;
|
|
+ regulator-boot-on;
|
|
+ regulator-always-on;
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ regulator-suspend-microvolt = <950000>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcc_ddr: DCDC_REG3 {
|
|
+ regulator-name = "vcc_ddr";
|
|
+ regulator-boot-on;
|
|
+ regulator-always-on;
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcc_io: rk805_vcc_io: DCDC_REG4 {
|
|
+ regulator-name = "vccio_3v3";
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ regulator-boot-on;
|
|
+ regulator-always-on;
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ regulator-suspend-microvolt = <3300000>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vdd_18: vcc_18: LDO_REG1 {
|
|
+ regulator-name = "vccio_1v8";
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <1800000>;
|
|
+ regulator-boot-on;
|
|
+ regulator-always-on;
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ regulator-suspend-microvolt = <1800000>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcc_18emmc: LDO_REG2 {
|
|
+ regulator-name = "vcc_18emmc";
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <1800000>;
|
|
+ regulator-boot-on;
|
|
+ regulator-always-on;
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ regulator-suspend-microvolt = <1800000>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vdd_11: LDO_REG3 {
|
|
+ regulator-name = "vdd_11";
|
|
+ regulator-min-microvolt = <1100000>;
|
|
+ regulator-max-microvolt = <1100000>;
|
|
+ regulator-boot-on;
|
|
+ regulator-always-on;
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ regulator-suspend-microvolt = <1100000>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+};
|
|
+
|
|
+&pinctrl {
|
|
+
|
|
+ leds {
|
|
+ ir_led: ir-led {
|
|
+ rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+};
|
|
+
|
|
+&gpio_led {
|
|
+
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&ir_led>;
|
|
+
|
|
+ working {
|
|
+ gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
|
|
+ linux,default-trigger = "mmc2";
|
|
+ default-state = "off";
|
|
+ mode = <35>;
|
|
+ };
|
|
+
|
|
+ /*
|
|
+ * These leds are described in the original dtb, but are not present on the board
|
|
+ auxiliary {
|
|
+ gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
|
|
+ linux,default-trigger = "mmc2";
|
|
+ default-state = "off";
|
|
+ mode = <5>;
|
|
+ };
|
|
+
|
|
+ ir {
|
|
+ gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_LOW>;
|
|
+ linux,default-trigger = "ir";
|
|
+ default-state = "off";
|
|
+ mode = <0>;
|
|
+ };
|
|
+ */
|
|
+
|
|
+};
|
|
+
|
|
+&io_domains {
|
|
+ vccio1-supply = <&vcc_io>;
|
|
+ vccio2-supply = <&vcc_18emmc>;
|
|
+ vccio3-supply = <&vcc_io>;
|
|
+ vccio4-supply = <&vdd_18>;
|
|
+ vccio5-supply = <&vcc_io>;
|
|
+ vccio6-supply = <&vcc_io>;
|
|
+ pmuio-supply = <&vcc_io>;
|
|
+};
|
|
+
|
|
+&{/} {
|
|
+ gpio_keys: gpio-keys {
|
|
+ compatible = "gpio-keys";
|
|
+
|
|
+ power {
|
|
+ label = "Power button";
|
|
+ linux,code = <KEY_POWER>;
|
|
+ gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&dmc {
|
|
+ center-supply = <&vdd_logic>;
|
|
+};
|
|
+
|
|
+&gpu {
|
|
+ mali-supply = <&vdd_logic>;
|
|
+};
|
|
+
|
|
+&vpu {
|
|
+ vcodec-supply = <&vdd_logic>;
|
|
+};
|
|
+
|
|
+&cpu0 {
|
|
+ cpu-supply = <&vdd_arm>;
|
|
+};
|
|
+
|
|
+&cpu1 {
|
|
+ cpu-supply = <&vdd_arm>;
|
|
+};
|
|
+
|
|
+&cpu2 {
|
|
+ cpu-supply = <&vdd_arm>;
|
|
+};
|
|
+
|
|
+&cpu3 {
|
|
+ cpu-supply = <&vdd_arm>;
|
|
+};
|
|
+
|
|
+
|
|
+&vcc_sd {
|
|
+ vin-supply = <&vcc_io>;
|
|
+};
|
|
+
|
|
+&emmc {
|
|
+ vmmc-supply = <&vcc_io>;
|
|
+ vqmmc-supply = <&vcc_18emmc>;
|
|
+};
|
|
+
|
|
+&saradc {
|
|
+ vref-supply = <&vcc_18>;
|
|
+};
|
|
+
|
|
+&pwm0 {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&pwm1 {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+/*
|
|
+ * Following section enables the sdio bus on sdmmc_ext controller
|
|
+ */
|
|
+&sdio {
|
|
+ /delete-property/ mmc-pwrseq;
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&sdio_ext {
|
|
+ rockchip,default-sample-phase = <112>; // Allows ssv6051 chips to be detected at 50 MHz
|
|
+ sd-uhs-sdr50;
|
|
+ mmc-pwrseq = <&sdio_pwrseq>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&sdmmc_ext {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&spdif {
|
|
+ pinctrl-0 = <&spdifm1_tx>;
|
|
+};
|
|
+
|
|
--
|
|
Armbian
|
|
|