Дерево устройств приведено к виду, с которым собиралось крайний раз (выполнен бэкап от ВВ).

This commit is contained in:
tolst0v 2025-03-17 15:46:28 +04:00
parent 18d4f9a581
commit 9e56b6d9e1
2 changed files with 253 additions and 94 deletions

View file

@ -1,4 +1,6 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// based on the dts, which is:
// Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
// Copyright (C) 2019 Ondřej Jirman <megous@megous.com>
/dts-v1/;
@ -11,17 +13,22 @@
/ {
model = "Repka-Pi4-Optimal";
repka-freq = "1.968 GHz";
repka-pinout = "repka-pi4-pinout-1";
compatible = "rbs,repka-pi4", "allwinner,sun50i-h6";
aliases {
ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &r_uart;
serial3 = &uart3;
spi0 = &spi1;
i2c1 = &i2c0;
i2c2 = &i2c2;
i2c3 = &i2c1;
i2c4 = &i2c3;
};
@ -66,24 +73,14 @@
regulator-always-on;
};
reg_gmac_3v3: gmac-3v3 {
compatible = "regulator-fixed";
regulator-name = "vcc-gmac-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_vcc33_wifi: vcc33-wifi {
/* Always on 3.3V regulator for WiFi and BT */
compatible = "regulator-fixed";
regulator-name = "vcc33-wifi";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpio = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
regulator-always-on;
vin-supply = <&reg_vcc5v>;
};
reg_vcc_wifi_io: vcc-wifi-io {
@ -105,6 +102,15 @@
};
};
&ac200_codec {
avcc-supply = <&reg_aldo2>;
status = "okay";
};
&ac200_pwm_clk {
status = "okay";
};
&cpu0 {
cpu-supply = <&reg_dcdca>;
};
@ -125,6 +131,14 @@
status = "okay";
};
&ohci0 {
status = "okay";
};
&ohci3 {
status = "okay";
};
&gpu {
mali-supply = <&reg_dcdcc>;
status = "okay";
@ -140,6 +154,18 @@
};
};
&sound_hdmi {
status = "okay";
};
&i2s1 {
status = "okay";
};
&i2s3 {
status = "okay"; /* нужно для ac200 */
};
&mmc0 {
vmmc-supply = <&reg_cldo1>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
@ -173,40 +199,24 @@
status = "okay";
};
&ohci0 {
status = "okay";
};
&ohci3 {
status = "okay";
};
&pcie {
vcc-supply = <&reg_bldo2>;
vdd-supply = <&reg_dcdcd>;
slot-supply = <&reg_vcc33_wifi>;
perst-gpio = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
/* clkreq-gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; */
/* wake-gpio = <&r_pio 0 4 0>; */
status = "okay";
};
&i2c0 {
status = "okay"; /* PD25, PD26 - альт uart3 rts, cts pins */
};
&pio {
vcc-pc-supply = <&reg_bldo2>;
vcc-pd-supply = <&reg_cldo1>;
vcc-pg-supply = <&reg_vcc_wifi_io>;
spi1_cs1: spi1_cs1 {
pins = "PH2";
function = "gpio_out";
output-high;
};
};
&r_rsb {
&r_i2c {
status = "okay";
axp805: pmic@745 {
axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
reg = <0x745>;
reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@ -307,8 +317,8 @@
reg_dcdcd: dcdcd {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>;
regulator-min-microvolt = <960000>;
regulator-max-microvolt = <960000>;
regulator-name = "vdd-sys";
};
@ -319,26 +329,17 @@
};
};
&pwm {
status = "okay";
};
&r_ir {
status = "okay";
};
&rtc {
clocks = <&ext_osc32k>;
};
/delete-node/ &spi0;
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_ph_pins>;
status = "okay";
};
/* There's the BT part of the AP6256 connected to that UART */
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
@ -368,3 +369,93 @@
&usb3phy {
status = "okay";
};
&i2c3 {
status = "okay"; /* нужно для ac200 */
};
&ac200_ephy_ctl {
x-powers,led-polarity = <GPIO_ACTIVE_HIGH>;
phy-address = <1>;
status = "okay";
};
&emac {
pinctrl-names = "default";
pinctrl-0 = <&ext_rmii_pins>;
phy-mode = "rmii";
phy-handle = <&ext_rmii_phy>;
status = "okay";
};
&mdio {
ext_rmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-id0044.1400",
"ethernet-phy-ieee802.3-c22";
reg = <1>;
resets = <&ac200_ephy_ctl>;
reset-names = "phy";
clocks = <&ac200_ephy_ctl>;
};
};
&pwm {
status = "okay";
};
&i2c2 {
status = "okay"; /* PD23, PD24 - альт uart3 tx, rx pins */
};
&i2c1 {
status = "disabled"; /* PH5,PH6 -OK только когда не используется SPI1 */
};
&i2c0 {
status = "okay"; /* PD25, PD26 - альт uart3 rts, cts pins */
};
&spi1 {
pinctrl-names = "default", "default";
pinctrl-1 = <&spi1_cs1>;
cs-gpios = <0>, <&pio 7 2 0>; /* PH2 */
status = "okay";
spidev@0 {
compatible = "rohm,dh2228fv";
status = "okay";
reg = <0>;
spi-max-frequency = <1000000>;
};
spidev@1 {
compatible = "rohm,dh2228fv";
status = "okay";
reg = <1>;
spi-max-frequency = <1000000>;
};
};
&pwm {
pinctrl-names = "default";
pinctrl-0 = <&pwm_pin>;
status = "okay";
};
&r_pwm {
pinctrl-names = "default";
pinctrl-0 = <&r_pwm_pin>;
status = "okay";
};
&r_uart {
pinctrl-names = "default";
pinctrl-0 = <&r_uart_pins>; /* PL2, PL3 */
status = "okay"; /* почемуто когда включен пропадает вывод UART0 */
};
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>; /* PD23, PD24 */
status = "disabled";
};

View file

@ -110,6 +110,13 @@
clock-output-names = "osc24M";
};
ext_osc32k: ext_osc32k_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <32768>;
clock-output-names = "ext_osc32k";
};
pmu {
compatible = "arm,cortex-a53-pmu";
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
@ -124,6 +131,13 @@
method = "smc";
};
scpi_protocol: scpi {
compatible = "arm,scpi";
mboxes = <&msgbox 2>, <&msgbox 3>;
mbox-names = "tx", "rx";
shmem = <&scpi_sram>;
};
sound_hdmi: sound_hdmi {
compatible = "allwinner,sun9i-a80-hdmi-audio",
"allwinner,sun50i-h6-hdmi-audio";
@ -138,13 +152,6 @@
};
};
scpi_protocol: scpi {
compatible = "arm,scpi";
mboxes = <&msgbox 2>, <&msgbox 3>;
mbox-names = "tx", "rx";
shmem = <&scpi_sram>;
};
timer {
compatible = "arm,armv8-timer";
arm,no-tick-in-suspend;
@ -158,7 +165,6 @@
(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
};
soc {
compatible = "simple-bus";
#address-cells = <1>;
@ -221,6 +227,18 @@
iommus = <&iommu 5>;
};
deinterlace: deinterlace@1420000 {
compatible = "allwinner,sun50i-h6-deinterlace";
reg = <0x01420000 0x2000>;
clocks = <&ccu CLK_BUS_DEINTERLACE>,
<&ccu CLK_DEINTERLACE>,
<&ccu CLK_MBUS_DEINTERLACE>;
clock-names = "bus", "mod", "ram";
resets = <&ccu RST_BUS_DEINTERLACE>;
interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
iommus = <&iommu 2>;
};
video-codec@1c0e000 {
compatible = "allwinner,sun50i-h6-video-engine";
reg = <0x01c0e000 0x2000>;
@ -230,7 +248,7 @@
resets = <&ccu RST_BUS_VE>;
interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
allwinner,sram = <&ve_sram 1>;
iommus = <&iommu 3>;
iommus = <&iommu 1>, <&iommu 3>;
};
gpu: gpu@1800000 {
@ -496,6 +514,11 @@
function = "pwm1";
};
pwm_pin: pwm-pin {
pins = "PD22";
function = "pwm";
};
/omit-if-no-ref/
spi0_pins: spi0-pins {
pins = "PC0", "PC2", "PC3";
@ -561,6 +584,11 @@
pins = "PD25", "PD26";
function = "uart3";
};
i2s2_pins: i2s2-pins {
pins = "PG10", "PG11", "PG12", "PG13";
function = "i2s2";
};
};
iommu: iommu@30f0000 {
@ -820,6 +848,19 @@
status = "disabled";
};
i2s2: i2s@5092000 {
#sound-dai-cells = <0>;
compatible = "allwinner,sun50i-h6-i2s";
reg = <0x05092000 0x1000>;
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;
clock-names = "apb", "mod";
dmas = <&dma 5>, <&dma 5>;
resets = <&ccu RST_BUS_I2S2>;
dma-names = "rx", "tx";
status = "disabled";
};
i2s1: i2s@5091000 {
#sound-dai-cells = <0>;
compatible = "allwinner,sun50i-h6-i2s";
@ -1156,6 +1197,7 @@
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
clock-output-names = "osc32k", "osc32k-out", "iosc";
clocks = <&ext_osc32k>;
#clock-cells = <1>;
};
@ -1186,6 +1228,16 @@
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
};
r_pwm: pwm@7020C00 {
compatible = "allwinner,sun50i-h6-pwm";
reg = <0x07020C00 0x400>;
clocks = <&osc24M>, <&ccu CLK_R_APB1_PWM>;
clock-names = "mod", "bus";
resets = <&ccu RST_R_APB1_PWM>;
#pwm-cells = <3>;
status = "disabled";
};
r_pio: pinctrl@7022000 {
compatible = "allwinner,sun50i-h6-r-pinctrl";
reg = <0x07022000 0x400>;
@ -1219,6 +1271,12 @@
pins = "PL2", "PL3";
function = "s_uart";
};
r_pwm_pin: r-pwm-pin {
pins = "PL8";
function = "s_pwm";
};
};
r_ir: ir@7040000 {
@ -1303,37 +1361,67 @@
trips {
cpu_warm: cpu_warm {
temperature = <75000>;
temperature = <70000>;
hysteresis = <2000>;
type = "passive";
};
cpu_hot_pre: cpu_hot_pre {
cpu_hot0: cpu_hot0 {
temperature = <74000>;
hysteresis = <2000>;
type = "passive";
};
cpu_hot1: cpu_hot1 {
temperature = <76000>;
hysteresis = <2000>;
type = "passive";
};
cpu_very_hot0: cpu_very_hot0 {
temperature = <78000>;
hysteresis = <2000>;
type = "passive";
};
cpu_very_hot1: cpu_very_hot1 {
temperature = <80000>;
hysteresis = <2000>;
type = "passive";
};
cpu_hot: cpu_hot {
temperature = <85000>;
cpu_very_hot2: cpu_very_hot2 {
temperature = <82000>;
hysteresis = <2000>;
type = "passive";
};
cpu_very_hot_pre: cpu_very_hot_pre {
cpu_very_hot3: cpu_very_hot3 {
temperature = <84000>;
hysteresis = <2000>;
type = "passive";
};
cpu_very_hot4: cpu_very_hot4 {
temperature = <86000>;
hysteresis = <2000>;
type = "passive";
};
cpu_very_hot5: cpu_very_hot5 {
temperature = <88000>;
hysteresis = <2000>;
type = "passive";
};
cpu_very_hot6: cpu_very_hot6 {
temperature = <90000>;
hysteresis = <2000>;
type = "passive";
};
cpu_very_hot: cpu_very_hot {
temperature = <95000>;
hysteresis = <2000>;
type = "passive";
};
cpu_crit: cpu_crit {
temperature = <105000>;
temperature = <97000>;
hysteresis = <2000>;
type = "critical";
};
@ -1342,29 +1430,9 @@
cooling-maps {
cpu_warm_limit_cpu {
trip = <&cpu_warm>;
cooling-device = <&cpu0 THERMAL_NO_LIMIT 2>;
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
cpu_hot_pre_limit_cpu {
trip = <&cpu_hot_pre>;
cooling-device = <&cpu0 2 3>;
};
cpu_hot_limit_cpu {
trip = <&cpu_hot>;
cooling-device = <&cpu0 3 4>;
};
cpu_very_hot_pre_limit_cpu {
trip = <&cpu_very_hot_pre>;
cooling-device = <&cpu0 5 6>;
};
cpu_very_hot_limit_cpu {
trip = <&cpu_very_hot>;
cooling-device = <&cpu0 7 THERMAL_NO_LIMIT>;
};
};
};
};
gpu-thermal {