build/patch/kernel/archive/odroidxu4-5.15/0054-ODROID-N2-arm64-dts-update-device-tree-after-v5.13.patch

465 lines
11 KiB
Diff
Raw Normal View History

From f0143d5043621933d98e4adf5c93713239e23edf Mon Sep 17 00:00:00 2001
From: Dongjin Kim <tobetter@gmail.com>
Date: Thu, 1 Jul 2021 05:40:25 +0900
Subject: [PATCH 54/75] ODROID-N2: arm64/dts: update device tree after v5.13
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Ife61a927258300b5310e68e7b0acae3a74230135
---
.../boot/dts/amlogic/meson64_odroidn2.dts | 2 +
.../boot/dts/amlogic/meson64_odroidn2.dtsi | 291 ++++++++++++++++++
.../dts/amlogic/meson64_odroidn2_plus.dts | 123 +++++++-
3 files changed, 415 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/amlogic/meson64_odroidn2.dtsi
diff --git a/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dts b/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dts
index 913b85baf6ea..799c8409b371 100644
--- a/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dts
@@ -11,8 +11,10 @@
#include <dt-bindings/sound/meson-g12a-toacodec.h>
#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
+#include <dt-bindings/pwm/pwm.h>
#include "meson-g12b-odroid-n2.dts"
+#include "meson64_odroidn2.dtsi"
/ {
model = "Hardkernel ODROID-N2";
diff --git a/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dtsi b/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dtsi
new file mode 100644
index 000000000000..ea28368eb93b
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dtsi
@@ -0,0 +1,291 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Dongjin Kim <tobetter@gmail.com>
+ *
+ */
+
+#include <dt-bindings/clock/axg-audio-clkc.h>
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
+#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
+#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+ aliases {
+ mmc0 = &sd_emmc_c; /* eMMC */
+ mmc1 = &sd_emmc_b; /* SD card */
+ mmc2 = &sd_emmc_a; /* SDIO */
+ };
+
+ reboot: odroid-reboot {
+ compatible = "odroid,reboot";
+ sys_reset = <0x84000009>;
+ sys_poweroff = <0x84000008>;
+
+ sd-vqsw = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
+ sd-vmmc = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
+ };
+
+ dio2133: audio-amplifier-0 {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+ VCC-supply = <&vcc_5v>;
+ sound-name-prefix = "AMP";
+ };
+
+ spdif_dit: audio-codec-1 {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ status = "okay";
+ sound-name-prefix = "DIT";
+ };
+
+ sound {
+ compatible = "amlogic,axg-sound-card";
+ model = "G12B-ODROID-N2";
+ audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&dio2133>;
+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
+ "TDMOUT_B IN 1", "FRDDR_B OUT 1",
+ "TDMOUT_B IN 2", "FRDDR_C OUT 1",
+ "TDM_B Playback", "TDMOUT_B OUT",
+ "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+ "TDMOUT_C IN 1", "FRDDR_B OUT 2",
+ "TDMOUT_C IN 2", "FRDDR_C OUT 2",
+ "TDM_C Playback", "TDMOUT_C OUT",
+ "SPDIFOUT IN 0", "FRDDR_A OUT 3",
+ "SPDIFOUT IN 1", "FRDDR_B OUT 3",
+ "SPDIFOUT IN 2", "FRDDR_C OUT 3",
+ "AMP INL", "ACODEC LOLP",
+ "AMP INR", "ACODEC LORP";
+
+ assigned-clocks = <&clkc CLKID_HIFI_PLL>,
+ <&clkc CLKID_MPLL0>,
+ <&clkc CLKID_MPLL1>;
+ assigned-clock-parents = <0>, <0>, <0>;
+ assigned-clock-rates = <589824000>,
+ <270950400>,
+ <393216000>;
+
+ status = "okay";
+
+ dai-link-0 {
+ sound-dai = <&frddr_a>;
+ };
+
+ dai-link-1 {
+ sound-dai = <&frddr_b>;
+ };
+
+ dai-link-2 {
+ sound-dai = <&frddr_c>;
+ };
+
+ /* 8ch hdmi interface */
+ dai-link-3 {
+ sound-dai = <&tdmif_b>;
+ dai-format = "i2s";
+ dai-tdm-slot-tx-mask-0 = <1 1>;
+ dai-tdm-slot-tx-mask-1 = <1 1>;
+ dai-tdm-slot-tx-mask-2 = <1 1>;
+ dai-tdm-slot-tx-mask-3 = <1 1>;
+ mclk-fs = <256>;
+
+ codec {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
+ };
+ };
+
+ dai-link-4 {
+ sound-dai = <&tdmif_c>;
+ dai-format = "i2s";
+ dai-tdm-slot-tx-mask-0 = <1 1>;
+ mclk-fs = <256>;
+
+ codec {
+ sound-dai = <&toacodec TOACODEC_IN_C>;
+ };
+ };
+
+ dai-link-5 {
+ sound-dai = <&spdifout>;
+
+ codec {
+ sound-dai = <&spdif_dit>;
+ };
+ };
+
+ dai-link-6 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
+
+ codec {
+ sound-dai = <&hdmi_tx>;
+ };
+ };
+
+ dai-link-7 {
+ sound-dai = <&toacodec TOACODEC_OUT>;
+
+ codec {
+ sound-dai = <&acodec>;
+ };
+ };
+ };
+
+ pwmgpio:pwmgpio {
+ compatible = "pwm-gpio";
+ #pwm-cells = <3>;
+ pwm-gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
+ pwmfan:pwm-fan {
+ compatible = "pwm-fan";
+ pwms = <&pwmgpio 0 40000 PWM_POLARITY_INVERTED>;
+ cooling-min-state = <0>;
+ cooling-max-state = <3>;
+ #cooling-cells = <2>;
+ cooling-levels = <0 120 170 220>;
+ };
+};
+
+&cpu_thermal {
+ trips {
+ fan_0: trip-point@0 {
+ temperature = <65000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+ fan_1: trip-point@1 {
+ temperature = <75000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+ };
+ cooling-maps {
+ fan_cooling_map0 {
+ trip = <&fan_0>;
+ cooling-device = <&pwmfan THERMAL_NO_LIMIT 2>;
+ };
+ fan_cooling_map1 {
+ trip = <&fan_1>;
+ cooling-device = <&pwmfan 2 THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
+&sd_emmc_b {
+ max-frequency = <200000000>;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+};
+
+&ethmac {
+ /delete-property/ resets;
+ /delete-property/ reset-names;
+};
+
+&gpio {
+ gpio-line-names =
+ /* GPIOZ */
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ /* GPIOH */
+ "", "", "", "", "", "", "", "",
+ "",
+ /* BOOT */
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ /* GPIOC */
+ "", "", "", "", "", "", "", "",
+ /* GPIOA */
+ "PIN_44", /* GPIOA_0 */
+ "PIN_46", /* GPIOA_1 */
+ "PIN_45", /* GPIOA_2 */
+ "PIN_47", /* GPIOA_3 */
+ "PIN_26", /* GPIOA_4 */
+ "", "", "", "", "", "",
+ "PIN_42", /* GPIOA_11 */
+ "PIN_32", /* GPIOA_12 */
+ "PIN_7", /* GPIOA_13 */
+ "PIN_27", /* GPIOA_14 */
+ "PIN_28", /* GPIOA_15 */
+ /* GPIOX */
+ "PIN_16", /* GPIOX_0 */
+ "PIN_18", /* GPIOX_1 */
+ "PIN_22", /* GPIOX_2 */
+ "PIN_11", /* GPIOX_3 */
+ "PIN_13", /* GPIOX_4 */
+ "PIN_33", /* GPIOX_5 */
+ "PIN_35", /* GPIOX_6 */
+ "PIN_15", /* GPIOX_7 */
+ "PIN_19", /* GPIOX_8 */
+ "PIN_21", /* GPIOX_9 */
+ "PIN_24", /* GPIOX_10 */
+ "PIN_23", /* GPIOX_11 */
+ "PIN_8", /* GPIOX_12 */
+ "PIN_10", /* GPIOX_13 */
+ "PIN_29", /* GPIOX_14 */
+ "PIN_31", /* GPIOX_15 */
+ "PIN_12", /* GPIOX_16 */
+ "PIN_3", /* GPIOX_17 */
+ "PIN_5", /* GPIOX_18 */
+ "PIN_36"; /* GPIOX_19 */
+};
+
+&gpu_opp_table {
+ opp-999999984 {
+ opp-hz = /bits/ 64 <999999984>;
+ opp-microvolt = <800000>;
+ };
+};
+
+&spdifout {
+ pinctrl-0 = <&spdif_out_a13_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&tdmif_b {
+ pinctrl-0 = <&mclk0_a_pins>, <&tdm_b_fs_pins>, <&tdm_b_sclk_pins>,
+ <&tdm_b_dout0_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ assigned-clocks = <&clkc_audio AUD_CLKID_TDM_MCLK_PAD0>,
+ <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>,
+ <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>;
+ assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
+ assigned-clock-rates = <0>, <0>, <0>;
+};
+
+&tdmif_c {
+ status = "okay";
+ assigned-clocks = <&clkc_audio AUD_CLKID_TDM_MCLK_PAD1>,
+ <&clkc_audio AUD_CLKID_TDM_SCLK_PAD2>,
+ <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD2>;
+ assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
+ <&clkc_audio AUD_CLKID_MST_C_SCLK>,
+ <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
+ assigned-clock-rates = <0>, <0>, <0>;
+};
+
+&tdmout_c {
+ status = "okay";
+};
+
+&acodec {
+ status = "okay";
+};
+
+&toacodec {
+ status = "okay";
+};
+
+&gpio {
+ /delete-node/ hog-0;
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson64_odroidn2_plus.dts b/arch/arm64/boot/dts/amlogic/meson64_odroidn2_plus.dts
index 061938ff870f..da9c35557767 100644
--- a/arch/arm64/boot/dts/amlogic/meson64_odroidn2_plus.dts
+++ b/arch/arm64/boot/dts/amlogic/meson64_odroidn2_plus.dts
@@ -6,8 +6,129 @@
/dts-v1/;
-#include "meson64_odroidn2.dts"
+#include "meson-g12b-odroid-n2-plus.dts"
+#include "meson64_odroidn2.dtsi"
/ {
model = "Hardkernel ODROID-N2Plus";
};
+
+&reboot {
+ sd-vqen = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+};
+
+&vddcpu_a {
+ regulator-min-microvolt = <680000>;
+ regulator-max-microvolt = <1040000>;
+
+ pwms = <&pwm_ab 0 1500 0>;
+};
+
+&vddcpu_b {
+ regulator-min-microvolt = <680000>;
+ regulator-max-microvolt = <1040000>;
+
+ pwms = <&pwm_AO_cd 1 1500 0>;
+};
+
+&cpu_opp_table_0 {
+ /delete-node/ opp-100000000;
+ /delete-node/ opp-250000000;
+ /delete-node/ opp-500000000;
+ /delete-node/ opp-667000000;
+ opp-1000000000 {
+ opp-hz = /bits/ 64 <1000000000>;
+ opp-microvolt = <760000>;
+ };
+ opp-1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <780000>;
+ };
+ opp-1398000000 {
+ opp-hz = /bits/ 64 <1398000000>;
+ opp-microvolt = <810000>;
+ };
+ opp-1512000000 {
+ opp-hz = /bits/ 64 <1512000000>;
+ opp-microvolt = <860000>;
+ };
+ opp-1608000000 {
+ opp-hz = /bits/ 64 <1608000000>;
+ opp-microvolt = <900000>;
+ };
+ opp-1704000000 {
+ opp-hz = /bits/ 64 <1704000000>;
+ opp-microvolt = <960000>;
+ };
+ opp-1800000000 {
+ opp-hz = /bits/ 64 <1800000000>;
+ opp-microvolt = <1020000>;
+ };
+ opp-1908000000 {
+ opp-hz = /bits/ 64 <1908000000>;
+ opp-microvolt = <1030000>;
+ };
+ opp-2016000000 {
+ opp-hz = /bits/ 64 <2016000000>;
+ opp-microvolt = <1040000>;
+ };
+};
+
+&cpub_opp_table_1 {
+ /delete-node/ opp-100000000;
+ /delete-node/ opp-250000000;
+ /delete-node/ opp-500000000;
+ /delete-node/ opp-667000000;
+ opp-1000000000 {
+ opp-hz = /bits/ 64 <1000000000>;
+ opp-microvolt = <730000>;
+ };
+ opp-1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <750000>;
+ };
+ opp-1398000000 {
+ opp-hz = /bits/ 64 <1398000000>;
+ opp-microvolt = <770000>;
+ };
+ opp-1512000000 {
+ opp-hz = /bits/ 64 <1512000000>;
+ opp-microvolt = <770000>;
+ };
+ opp-1608000000 {
+ opp-hz = /bits/ 64 <1608000000>;
+ opp-microvolt = <780000>;
+ };
+ opp-1704000000 {
+ opp-hz = /bits/ 64 <1704000000>;
+ opp-microvolt = <790000>;
+ };
+ opp-1800000000 {
+ opp-hz = /bits/ 64 <1800000000>;
+ opp-microvolt = <830000>;
+ };
+ opp-1908000000 {
+ opp-hz = /bits/ 64 <1908000000>;
+ opp-microvolt = <860000>;
+ };
+ opp-2016000000 {
+ opp-hz = /bits/ 64 <2016000000>;
+ opp-microvolt = <910000>;
+ };
+ opp-2100000000 {
+ opp-hz = /bits/ 64 <2100000000>;
+ opp-microvolt = <960000>;
+ };
+ opp-2208000000 {
+ opp-hz = /bits/ 64 <2208000000>;
+ opp-microvolt = <1030000>;
+ };
+ opp-2304000000 {
+ opp-hz = /bits/ 64 <2304000000>;
+ opp-microvolt = <1030000>;
+ };
+ opp-2400000000 {
+ opp-hz = /bits/ 64 <2400000000>;
+ opp-microvolt = <1040000>;
+ };
+};
--
2.25.1