mirror of
https://github.com/Fishwaldo/build.git
synced 2025-04-17 19:41:37 +00:00
Removed default-sample-phase property for base rk322x-box device tree Enabled spdif out for rk322x-current and -dev flavours Removed reserved node in device tree, u-boot v2020.10 and OPTEE autoconfigure reserved zones automatically
269 lines
5.1 KiB
Diff
269 lines
5.1 KiB
Diff
diff --git a/arch/arm/boot/dts/rk322x-box.dts b/arch/arm/boot/dts/rk322x-box.dts
|
|
new file mode 100644
|
|
index 000000000..432c7b69e
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/rk322x-box.dts
|
|
@@ -0,0 +1,263 @@
|
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
+
|
|
+/dts-v1/;
|
|
+
|
|
+#include "rk3228a-box.dtsi"
|
|
+
|
|
+/ {
|
|
+
|
|
+ model = "Generic RK322x Tv Box board";
|
|
+
|
|
+ /delete-node/ leds;
|
|
+
|
|
+ /*
|
|
+ No need to reserve memory manually as long as u-boot v2020.10 and
|
|
+ OPTEE autoconfigure the reserved zones
|
|
+ */
|
|
+ /delete-node/ reserved-memory;
|
|
+
|
|
+ gpio_leds: gpio-leds {
|
|
+
|
|
+ compatible = "gpio-leds";
|
|
+
|
|
+ /*
|
|
+ * Working led, available on all boards
|
|
+ */
|
|
+ working {
|
|
+ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
|
+ label = "working";
|
|
+ default-state = "on";
|
|
+ linux,default-trigger = "timer";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&gpio_led_working>;
|
|
+ };
|
|
+
|
|
+ };
|
|
+
|
|
+ gpio_keys: gpio-keys {
|
|
+
|
|
+ compatible = "gpio-keys";
|
|
+
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ };
|
|
+
|
|
+ spdif_out: spdif-out {
|
|
+ status = "okay";
|
|
+ compatible = "linux,spdif-dit";
|
|
+ #sound-dai-cells = <0>;
|
|
+ };
|
|
+
|
|
+ spdif-sound {
|
|
+ status = "okay";
|
|
+ compatible = "simple-audio-card";
|
|
+ simple-audio-card,name = "SPDIF";
|
|
+ simple-audio-card,cpu {
|
|
+ sound-dai = <&spdif>;
|
|
+ };
|
|
+ simple-audio-card,codec {
|
|
+ sound-dai = <&spdif_out>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+};
|
|
+
|
|
+&emmc {
|
|
+ status = "okay";
|
|
+ /delete-property/ mmc-ddr-1_8v;
|
|
+ /delete-property/ pinctrl-names;
|
|
+ /delete-property/ pinctrl-0;
|
|
+ /delete-property/ rockchip,default-sample-phase;
|
|
+};
|
|
+
|
|
+&gmac {
|
|
+ tx_delay = <0x26>;
|
|
+ rx_delay = <0x11>;
|
|
+};
|
|
+
|
|
+&ir_receiver {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&power_key {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&usb_otg {
|
|
+ dr_mode = "host";
|
|
+};
|
|
+
|
|
+&sdio {
|
|
+ mmc-pwrseq = <&sdio_pwrseq>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&sdmmc {
|
|
+ cd-gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_LOW>;
|
|
+ cd-debounce-delay-ms = <500>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&spdif {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+/** Integration to pin controller */
|
|
+&pinctrl {
|
|
+
|
|
+ pcfg_pull_up_12ma: pcfg-pull-up-12ma {
|
|
+ drive-strength = <12>;
|
|
+ bias-pull-up;
|
|
+ };
|
|
+
|
|
+ pcfg_pull_down_12ma: pcfg-pull-down-12ma {
|
|
+ drive-strength = <12>;
|
|
+ bias-pull-down;
|
|
+ };
|
|
+
|
|
+ pcfg_pull_none_12ma: pcfg-pull-none-12ma {
|
|
+ drive-strength = <12>;
|
|
+ bias-disable;
|
|
+ };
|
|
+
|
|
+ pcfg_pull_up_8ma: pcfg-pull-up-8ma {
|
|
+ drive-strength = <8>;
|
|
+ bias-pull-up;
|
|
+ };
|
|
+
|
|
+ pcfg_pull_down_8ma: pcfg-pull-down-8ma {
|
|
+ drive-strength = <8>;
|
|
+ bias-pull-down;
|
|
+ };
|
|
+
|
|
+ pcfg_pull_none_8ma: pcfg-pull-none-8ma {
|
|
+ drive-strength = <8>;
|
|
+ bias-disable;
|
|
+ };
|
|
+
|
|
+ pcfg_pull_up_2ma: pcfg-pull-up-2ma {
|
|
+ drive-strength = <2>;
|
|
+ bias-pull-up;
|
|
+ };
|
|
+
|
|
+ pcfg_pull_down_2ma: pcfg-pull-down-2ma {
|
|
+ drive-strength = <2>;
|
|
+ bias-pull-down;
|
|
+ };
|
|
+
|
|
+ pcfg_pull_none_2ma: pcfg-pull-none-2ma {
|
|
+ drive-strength = <2>;
|
|
+ bias-disable;
|
|
+ };
|
|
+
|
|
+ /*
|
|
+ * Some rk322x electrical schemes report this kind of pull-up/down
|
|
+ * pin configurations. We set them here, but we don't use it in this
|
|
+ * device tree. These instead are useful for overlays, because they seem
|
|
+ * to increase stability on at least one board I got here
|
|
+ */
|
|
+ sdmmc {
|
|
+ sdmmc_clk: sdmmc-clk {
|
|
+ rockchip,pins = <1 16 1 &pcfg_pull_down>;
|
|
+ };
|
|
+
|
|
+ sdmmc_cmd: sdmmc-cmd {
|
|
+ rockchip,pins = <1 15 1 &pcfg_pull_up>;
|
|
+ };
|
|
+
|
|
+ sdmmc_bus4: sdmmc-bus4 {
|
|
+ rockchip,pins = <1 18 1 &pcfg_pull_up>,
|
|
+ <1 19 1 &pcfg_pull_up>,
|
|
+ <1 20 1 &pcfg_pull_up>,
|
|
+ <1 21 1 &pcfg_pull_up>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ /*
|
|
+ * Same as above, decreasing strength of SDIO pins seems to be benefical
|
|
+ * to stability
|
|
+ */
|
|
+ sdio {
|
|
+ sdio_clk: sdio-clk {
|
|
+ rockchip,pins = <3 0 1 &pcfg_pull_down_2ma>;
|
|
+ };
|
|
+
|
|
+ sdio_cmd: sdio-cmd {
|
|
+ rockchip,pins = <3 1 1 &pcfg_pull_up_2ma>;
|
|
+ };
|
|
+
|
|
+ sdio_bus4: sdio-bus4 {
|
|
+ rockchip,pins = <3 2 1 &pcfg_pull_up_2ma>,
|
|
+ <3 3 1 &pcfg_pull_up_2ma>,
|
|
+ <3 4 1 &pcfg_pull_up_2ma>,
|
|
+ <3 5 1 &pcfg_pull_up_2ma>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ /*
|
|
+ * Same drill as above, electrical schemes also report this pull-up/down
|
|
+ * configurations.
|
|
+ */
|
|
+ emmc {
|
|
+ emmc_clk: emmc-clk {
|
|
+ rockchip,pins = <2 7 2 &pcfg_pull_up>;
|
|
+ };
|
|
+
|
|
+ emmc_cmd: emmc-cmd {
|
|
+ rockchip,pins = <1 22 2 &pcfg_pull_up>;
|
|
+ };
|
|
+
|
|
+ emmc_bus8: emmc-bus8 {
|
|
+ rockchip,pins = <1 24 2 &pcfg_pull_up>,
|
|
+ <1 25 2 &pcfg_pull_up>,
|
|
+ <1 26 2 &pcfg_pull_up>,
|
|
+ <1 27 2 &pcfg_pull_up>,
|
|
+ <1 28 2 &pcfg_pull_up>,
|
|
+ <1 29 2 &pcfg_pull_up>,
|
|
+ <1 30 2 &pcfg_pull_up>,
|
|
+ <1 31 2 &pcfg_pull_up>;
|
|
+ };
|
|
+
|
|
+ emmc_pwr: emmc-pwr {
|
|
+ rockchip,pins = <2 RK_PA5 2 &pcfg_pull_down>;
|
|
+ };
|
|
+
|
|
+ emmc_rst: emmc-rst {
|
|
+ rockchip,pins = <1 RK_PC7 2 &pcfg_pull_up>;
|
|
+ };
|
|
+
|
|
+ };
|
|
+
|
|
+
|
|
+ gpio {
|
|
+ gpio_led_working: gpio-led-working {
|
|
+ rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ ir {
|
|
+ ir_int: ir-int {
|
|
+ rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ keys {
|
|
+ pwr_key: pwr-key {
|
|
+ rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ sdio-pwrseq {
|
|
+ wifi_enable_h: wifi-enable-h {
|
|
+ rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ gpio {
|
|
+ gpio_led_working: gpio-led-working {
|
|
+ rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+};
|