consolidation for rock-s0 board patches
* remove the patches that are shredding upstream device tree * consolidation into single patch that apply over upstream dt * add pcm5102a device tree overlay for handy usage
This commit is contained in:
parent
a1ab66c690
commit
68284de329
@ -1,64 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Pecovnik <igor@armbian.com>
|
||||
Date: Sat, 8 Feb 2025 17:54:03 +0100
|
||||
Subject: Revert "arm64: dts: rockchip: Fix sdmmc access on rk3308-rock-s0 v1.1
|
||||
boards"
|
||||
|
||||
This reverts commit 8810a8368b6075595715c4231322ca906a6b2f6f.
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts | 25 +---------
|
||||
1 file changed, 1 insertion(+), 24 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts b/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts
|
||||
@@ -74,23 +74,6 @@ vcc_io: regulator-3v3-vcc-io {
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
- /*
|
||||
- * HW revision prior to v1.2 must pull GPIO4_D6 low to access sdmmc.
|
||||
- * This is modeled as an always-on active low fixed regulator.
|
||||
- */
|
||||
- vcc_sd: regulator-3v3-vcc-sd {
|
||||
- compatible = "regulator-fixed";
|
||||
- gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&sdmmc_2030>;
|
||||
- regulator-name = "vcc_sd";
|
||||
- regulator-always-on;
|
||||
- regulator-boot-on;
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- vin-supply = <&vcc_io>;
|
||||
- };
|
||||
-
|
||||
vcc5v0_sys: regulator-5v0-vcc-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
@@ -198,12 +181,6 @@ pwr_led: pwr-led {
|
||||
};
|
||||
};
|
||||
|
||||
- sdmmc {
|
||||
- sdmmc_2030: sdmmc-2030 {
|
||||
- rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
wifi {
|
||||
wifi_reg_on: wifi-reg-on {
|
||||
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@@ -256,7 +233,7 @@ &sdmmc {
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
- vmmc-supply = <&vcc_sd>;
|
||||
+ vmmc-supply = <&vcc_io>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
--
|
||||
Armbian
|
||||
|
||||
@ -1,506 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brent Roman <genosenosor@gmail.com>
|
||||
Date: Wed, 7 Feb 2024 18:02:07 -0800
|
||||
Subject: Added Linux device tree for Rock S0
|
||||
|
||||
Signed-off-by: Brent Roman <genosenosor@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts | 346 ++++++----
|
||||
1 file changed, 200 insertions(+), 146 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts b/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts
|
||||
@@ -1,21 +1,17 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2019 Akash Gajjar <akash@openedev.com>
|
||||
+ * Copyright (c) 2019 Jagan Teki <jagan@openedev.com>
|
||||
+ * Revised: 2024 Brent Roman <brent@mbari.org>
|
||||
+ */
|
||||
|
||||
/dts-v1/;
|
||||
-
|
||||
-#include <dt-bindings/leds/common.h>
|
||||
#include "rk3308.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Radxa ROCK S0";
|
||||
compatible = "radxa,rock-s0", "rockchip,rk3308";
|
||||
|
||||
- aliases {
|
||||
- ethernet0 = &gmac;
|
||||
- mmc0 = &emmc;
|
||||
- mmc1 = &sdmmc;
|
||||
- mmc2 = &sdio;
|
||||
- };
|
||||
-
|
||||
chosen {
|
||||
stdout-path = "serial0:1500000n8";
|
||||
};
|
||||
@@ -23,38 +19,70 @@ chosen {
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pwr_led>;
|
||||
+ pinctrl-0 = <&green_led_gio>;
|
||||
|
||||
- led-green {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- default-state = "on";
|
||||
- function = LED_FUNCTION_HEARTBEAT;
|
||||
+ green-led {
|
||||
+ label = "rock-s0:green:power";
|
||||
gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
+ default-state = "on";
|
||||
};
|
||||
};
|
||||
|
||||
- vdd_log: regulator-1v04-vdd-log {
|
||||
- compatible = "regulator-fixed";
|
||||
- regulator-name = "vdd_log";
|
||||
- regulator-always-on;
|
||||
- regulator-boot-on;
|
||||
- regulator-min-microvolt = <1040000>;
|
||||
- regulator-max-microvolt = <1040000>;
|
||||
- vin-supply = <&vcc5v0_sys>;
|
||||
+ acodec-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "rockchip,rk3308-acodec";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ simple-audio-card,codec-hp-det;
|
||||
+ simple-audio-card,widgets =
|
||||
+ "Headphone", "Headphones";
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s_8ch_2>;
|
||||
+ };
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&codec>;
|
||||
+ };
|
||||
};
|
||||
|
||||
- vcc_ddr: regulator-1v5-vcc-ddr {
|
||||
- compatible = "regulator-fixed";
|
||||
- regulator-name = "vcc_ddr";
|
||||
- regulator-always-on;
|
||||
- regulator-boot-on;
|
||||
- regulator-min-microvolt = <1500000>;
|
||||
- regulator-max-microvolt = <1500000>;
|
||||
- vin-supply = <&vcc5v0_sys>;
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ simple-audio-card,name = "i2s_8ch_0";
|
||||
+
|
||||
+ simple-audio-card,dai-link@1 {
|
||||
+ format = "i2s";
|
||||
+ cpu {
|
||||
+ sound-dai = <&i2s_8ch_0>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&pcm5102a>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcm5102a: pcm5102a {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "ti,pcm5102a";
|
||||
+ pcm510x,format = "i2s";
|
||||
+ };
|
||||
+
|
||||
+ sdio_pwrseq: sdio-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ pinctrl-0 = <&wifi_enable_h>;
|
||||
+ pinctrl-names = "default";
|
||||
+ /*
|
||||
+ * On the module itself this is one of these (depending
|
||||
+ * on the actual card populated):
|
||||
+ * - SDIO_RESET_L_WL_REG_ON
|
||||
+ * - PDN (power down when low)
|
||||
+ */
|
||||
+ reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
- vcc_1v8: regulator-1v8-vcc {
|
||||
+ vcc_1v8: vcc-1v8 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v8";
|
||||
regulator-always-on;
|
||||
@@ -64,7 +92,7 @@ vcc_1v8: regulator-1v8-vcc {
|
||||
vin-supply = <&vcc_io>;
|
||||
};
|
||||
|
||||
- vcc_io: regulator-3v3-vcc-io {
|
||||
+ vcc_io: vcc-io {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_io";
|
||||
regulator-always-on;
|
||||
@@ -74,7 +102,28 @@ vcc_io: regulator-3v3-vcc-io {
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
- vcc5v0_sys: regulator-5v0-vcc-sys {
|
||||
+ vcc_ddr: vcc-ddr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_otg: vcc5v0-otg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&otg_vbus_drv>;
|
||||
+ regulator-name = "vcc5v0_otg";
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc5v0-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
@@ -83,119 +132,150 @@ vcc5v0_sys: regulator-5v0-vcc-sys {
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
- vdd_core: regulator-vdd-core {
|
||||
+ vdd_core: vdd-core {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm0 0 5000 1>;
|
||||
pwm-supply = <&vcc5v0_sys>;
|
||||
regulator-name = "vdd_core";
|
||||
- regulator-always-on;
|
||||
- regulator-boot-on;
|
||||
regulator-min-microvolt = <827000>;
|
||||
regulator-max-microvolt = <1340000>;
|
||||
+ regulator-init-microvolt = <1015000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
};
|
||||
|
||||
- sdio_pwrseq: sdio-pwrseq {
|
||||
- compatible = "mmc-pwrseq-simple";
|
||||
+ vdd_log: vdd-log {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vdd_log";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1050000>;
|
||||
+ regulator-max-microvolt = <1050000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ board_antenna: board-antenna {
|
||||
+ status = "okay";
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-low;
|
||||
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ pinctrl-0 = <&ant_1>;
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&wifi_reg_on>;
|
||||
- reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-name = "board_antenna";
|
||||
};
|
||||
};
|
||||
|
||||
+&codec {
|
||||
+ status = "okay";
|
||||
+ #sound-dai-cells = <0>;
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_core>;
|
||||
};
|
||||
|
||||
&emmc {
|
||||
cap-mmc-highspeed;
|
||||
- no-sd;
|
||||
- no-sdio;
|
||||
+ mmc-hs200-1_8v;
|
||||
non-removable;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_pwren>;
|
||||
- vmmc-supply = <&vcc_io>;
|
||||
+ vmmc-supply = <&vcc_io>; //was vin-supply
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-sd-highspeed;
|
||||
+ disable-wp;
|
||||
+ card-detect-delay = <800>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&sdio {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-sdio-irq;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-pwrseq = <&sdio_pwrseq>;
|
||||
+ non-removable;
|
||||
+ no-mmc;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ AP6212: wifi@1 {
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ reg = <1>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "host-wake";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_host_wake>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&gmac {
|
||||
- clock_in_out = "output";
|
||||
- phy-handle = <&rtl8201f>;
|
||||
phy-supply = <&vcc_io>;
|
||||
+ clock_in_out = "output";
|
||||
+ assigned-clocks = <&cru SCLK_MAC>;
|
||||
+ assigned-clock-parents = <&cru SCLK_MAC_SRC>;
|
||||
+ snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
+ snps,reset-active-low;
|
||||
+ snps,reset-delays-us = <0 50000 50000>;
|
||||
status = "okay";
|
||||
+};
|
||||
|
||||
- mdio {
|
||||
- compatible = "snps,dwmac-mdio";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- rtl8201f: ethernet-phy@1 {
|
||||
- compatible = "ethernet-phy-ieee802.3-c22";
|
||||
- reg = <1>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&mac_rst>;
|
||||
- reset-assert-us = <20000>;
|
||||
- reset-deassert-us = <50000>;
|
||||
- reset-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
- };
|
||||
- };
|
||||
+&i2s_8ch_0 {
|
||||
+ assigned-clocks = <&cru SCLK_I2S0_8CH_RX>;
|
||||
+ assigned-clock-parents = <&cru SCLK_I2S0_8CH_TX_MUX>;
|
||||
+ rockchip,clk-trcm = <1>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
};
|
||||
|
||||
-&io_domains {
|
||||
- vccio0-supply = <&vcc_io>;
|
||||
- vccio1-supply = <&vcc_io>;
|
||||
- vccio2-supply = <&vcc_io>;
|
||||
- vccio3-supply = <&vcc_io>;
|
||||
- vccio4-supply = <&vcc_1v8>;
|
||||
- vccio5-supply = <&vcc_io>;
|
||||
+&i2s_8ch_2 {
|
||||
status = "okay";
|
||||
+ #sound-dai-cells = <0>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rtc_32k>;
|
||||
|
||||
- bluetooth {
|
||||
- bt_reg_on: bt-reg-on {
|
||||
- rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
- };
|
||||
-
|
||||
- bt_wake_host: bt-wake-host {
|
||||
- rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
- };
|
||||
-
|
||||
- host_wake_bt: host-wake-bt {
|
||||
- rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ leds {
|
||||
+ green_led_gio: green-led-gpio {
|
||||
+ rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
- gmac {
|
||||
- mac_rst: mac-rst {
|
||||
- rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ usb {
|
||||
+ otg_vbus_drv: otg-vbus-drv {
|
||||
+ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
- leds {
|
||||
- pwr_led: pwr-led {
|
||||
- rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ sdio-pwrseq {
|
||||
+ wifi_enable_h: wifi-enable-h {
|
||||
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
wifi {
|
||||
- wifi_reg_on: wifi-reg-on {
|
||||
- rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ wifi_host_wake: wifi-host-wake {
|
||||
+ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
- wifi_wake_host: wifi-wake-host {
|
||||
- rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ antenna {
|
||||
+ ant_1: ant-1 {
|
||||
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pwm0_pin_pull_down>;
|
||||
status = "okay";
|
||||
+ pinctrl-0 = <&pwm0_pin_pull_down>;
|
||||
};
|
||||
|
||||
&saradc {
|
||||
@@ -203,91 +283,65 @@ &saradc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&sdio {
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- cap-sd-highspeed;
|
||||
- cap-sdio-irq;
|
||||
- keep-power-in-suspend;
|
||||
- max-frequency = <50000000>;
|
||||
- mmc-pwrseq = <&sdio_pwrseq>;
|
||||
- no-mmc;
|
||||
- no-sd;
|
||||
- non-removable;
|
||||
- vmmc-supply = <&vcc_io>;
|
||||
- vqmmc-supply = <&vcc_1v8>;
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <0>; /* 0:CRU */
|
||||
+ rockchip,hw-tshut-polarity = <1>; /* 1:HIGH */
|
||||
status = "okay";
|
||||
-
|
||||
- brcmf: wifi@1 {
|
||||
- compatible = "brcm,bcm43430a1-fmac", "brcm,bcm4329-fmac";
|
||||
- reg = <1>;
|
||||
- interrupt-parent = <&gpio0>;
|
||||
- interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- interrupt-names = "host-wake";
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&wifi_wake_host>;
|
||||
- };
|
||||
};
|
||||
|
||||
-&sdmmc {
|
||||
- cap-mmc-highspeed;
|
||||
- cap-sd-highspeed;
|
||||
- disable-wp;
|
||||
- vmmc-supply = <&vcc_io>;
|
||||
+&i2c1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&u2phy {
|
||||
- status = "okay";
|
||||
+&spi2 {
|
||||
+// status = "okay"; //conflicts with UART2
|
||||
+ max-freq = <10000000>;
|
||||
};
|
||||
|
||||
-&u2phy_host {
|
||||
+&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&u2phy_otg {
|
||||
+&uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&uart0 {
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&uart0_xfer>;
|
||||
+&uart4 {
|
||||
status = "okay";
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "realtek,rtl8723bs-bt";
|
||||
+ device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||
+ host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
};
|
||||
|
||||
-&uart4 {
|
||||
- uart-has-rtscts;
|
||||
+&u2phy {
|
||||
status = "okay";
|
||||
|
||||
- bluetooth {
|
||||
- compatible = "brcm,bcm43430a1-bt";
|
||||
- clocks = <&cru SCLK_RTC32K>;
|
||||
- clock-names = "lpo";
|
||||
- interrupt-parent = <&gpio4>;
|
||||
- interrupts = <RK_PB4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- interrupt-names = "host-wakeup";
|
||||
- device-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
|
||||
- shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&bt_reg_on &bt_wake_host &host_wake_bt>;
|
||||
- vbat-supply = <&vcc_io>;
|
||||
- vddio-supply = <&vcc_1v8>;
|
||||
+ u2phy_host: host-port {
|
||||
+ phy-supply = <&vcc5v0_otg>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ u2phy_otg: otg-port {
|
||||
+ status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
-&usb_host_ehci {
|
||||
+&usb20_otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&usb_host_ohci {
|
||||
+&usb_host_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&usb20_otg {
|
||||
- dr_mode = "peripheral";
|
||||
+&usb_host_ohci{
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
--
|
||||
Armbian
|
||||
|
||||
176
patch/kernel/archive/rockchip64-6.15/board-rocks0.patch
Normal file
176
patch/kernel/archive/rockchip64-6.15/board-rocks0.patch
Normal file
@ -0,0 +1,176 @@
|
||||
From b6bb3bd96fa150019d6f6a6adb602359596ce361 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Sat, 5 Apr 2025 17:59:02 +0200
|
||||
Subject: [PATCH] Add some missing nodes in rk3308-rock-so device tree
|
||||
|
||||
This is the consolidation of these two legacy patches:
|
||||
* https://github.com/paolosabatino/armbian-build/blob/935149d2822cd2a2c63891ca6614563f5538b706/patch/kernel/archive/rockchip64-6.12/board-rocks0-0001-deviceTree.patch
|
||||
* https://github.com/paolosabatino/armbian-build/blob/935149d2822cd2a2c63891ca6614563f5538b706/patch/kernel/archive/rockchip64-6.12/board-rocks0-0002-Revert-arm64-dts-rockchip-Fix-sdmmc-access-on-rk3308.patch
|
||||
---
|
||||
.../boot/dts/rockchip/rk3308-rock-s0.dts | 76 ++++++++++++++++++-
|
||||
1 file changed, 74 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts b/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts
|
||||
index 8311af4c8689..2d102c482e3a 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts
|
||||
@@ -34,6 +34,22 @@ led-green {
|
||||
};
|
||||
};
|
||||
|
||||
+ acodec-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "rockchip,rk3308-acodec";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ simple-audio-card,codec-hp-det;
|
||||
+ simple-audio-card,widgets =
|
||||
+ "Headphone", "Headphones";
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s_8ch_2>;
|
||||
+ };
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&codec>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
vdd_log: regulator-1v04-vdd-log {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vdd_log";
|
||||
@@ -74,10 +90,24 @@ vcc_io: regulator-3v3-vcc-io {
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
+ vcc5v0_otg: vcc5v0-otg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&otg_vbus_drv>;
|
||||
+ regulator-name = "vcc5v0_otg";
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
/*
|
||||
* HW revision prior to v1.2 must pull GPIO4_D6 low to access sdmmc.
|
||||
* This is modeled as an always-on active low fixed regulator.
|
||||
*/
|
||||
+ /*
|
||||
+ * Armbian: this has been commented out due to consolidation of this patch:
|
||||
+ * https://github.com/paolosabatino/armbian-build/blob/935149d2822cd2a2c63891ca6614563f5538b706/patch/kernel/archive/rockchip64-6.12/board-rocks0-0002-Revert-arm64-dts-rockchip-Fix-sdmmc-access-on-rk3308.patch
|
||||
vcc_sd: regulator-3v3-vcc-sd {
|
||||
compatible = "regulator-fixed";
|
||||
gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>;
|
||||
@@ -90,6 +120,7 @@ vcc_sd: regulator-3v3-vcc-sd {
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_io>;
|
||||
};
|
||||
+ */
|
||||
|
||||
vcc5v0_sys: regulator-5v0-vcc-sys {
|
||||
compatible = "regulator-fixed";
|
||||
@@ -120,6 +151,11 @@ sdio_pwrseq: sdio-pwrseq {
|
||||
};
|
||||
};
|
||||
|
||||
+&codec {
|
||||
+ status = "okay";
|
||||
+ #sound-dai-cells = <0>;
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_core>;
|
||||
};
|
||||
@@ -158,6 +194,22 @@ rtl8201f: ethernet-phy@1 {
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s_8ch_0 {
|
||||
+ assigned-clocks = <&cru SCLK_I2S0_8CH_RX>;
|
||||
+ assigned-clock-parents = <&cru SCLK_I2S0_8CH_TX_MUX>;
|
||||
+ rockchip,clk-trcm = <1>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+};
|
||||
+
|
||||
+&i2s_8ch_2 {
|
||||
+ status = "okay";
|
||||
+ #sound-dai-cells = <0>;
|
||||
+};
|
||||
+
|
||||
&io_domains {
|
||||
vccio0-supply = <&vcc_io>;
|
||||
vccio1-supply = <&vcc_io>;
|
||||
@@ -172,6 +224,12 @@ &pinctrl {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rtc_32k>;
|
||||
|
||||
+ antenna {
|
||||
+ antenna_power: antenna-power {
|
||||
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
bluetooth {
|
||||
bt_reg_on: bt-reg-on {
|
||||
rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@@ -204,6 +262,12 @@ sdmmc_2030: sdmmc-2030 {
|
||||
};
|
||||
};
|
||||
|
||||
+ usb {
|
||||
+ otg_vbus_drv: otg-vbus-drv {
|
||||
+ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
wifi {
|
||||
wifi_reg_on: wifi-reg-on {
|
||||
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@@ -213,6 +277,7 @@ wifi_wake_host: wifi-wake-host {
|
||||
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
+
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
@@ -248,7 +313,7 @@ brcmf: wifi@1 {
|
||||
interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "host-wake";
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&wifi_wake_host>;
|
||||
+ pinctrl-0 = <&wifi_wake_host>, <&antenna_power>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -256,7 +321,13 @@ &sdmmc {
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
- vmmc-supply = <&vcc_sd>;
|
||||
+ vmmc-supply = <&vcc_io>; // See comment @vcc_sd node
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <0>; /* 0:CRU */
|
||||
+ rockchip,hw-tshut-polarity = <1>; /* 1:HIGH */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -265,6 +336,7 @@ &u2phy {
|
||||
};
|
||||
|
||||
&u2phy_host {
|
||||
+ phy-supply = <&vcc5v0_otg>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -5,6 +5,7 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rk3308-b@1.3ghz.dtbo \
|
||||
rk3308-bs.dtbo rk3308-bs@1.3ghz.dtbo \
|
||||
rk3308-emmc.dtbo \
|
||||
rk3308-pcm5102a.dtbo \
|
||||
rk3308-sdio@10mhz.dtbo rk3308-sdio@4mhz.dtbo \
|
||||
rockchip-sakurapi-rk3308b-ws2812.dtbo \
|
||||
rockchip-rockpi4cplus-usb-host.dtbo \
|
||||
|
||||
@ -261,3 +261,6 @@ overlay enables (overclocked) operation at 1.3ghz
|
||||
1.3Ghz operation appears stable on the two boards I've tested.
|
||||
|
||||
The legacy kernel is not supported on the Rock S0
|
||||
|
||||
Enable pcm5102a analog codec connected to i2s0 bus:
|
||||
### rk3308-pcm5102a
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
// Enable PCM510x
|
||||
|
||||
#include <dt-bindings/clock/rk3308-cru.h>
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
&{/} {
|
||||
pcm5102_sound: pcm5102-sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,format = "i2s";
|
||||
simple-audio-card,mclk-fs = <256>;
|
||||
simple-audio-card,name = "i2s_8ch_0";
|
||||
|
||||
simple-audio-card,dai-link@1 {
|
||||
format = "i2s";
|
||||
cpu {
|
||||
sound-dai = <&i2s_8ch_0>;
|
||||
};
|
||||
|
||||
codec {
|
||||
sound-dai = <&pcm5102a>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pcm5102a: pcm5102a {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "ti,pcm5102a";
|
||||
pcm510x,format = "i2s";
|
||||
};
|
||||
};
|
||||
|
||||
&i2s_8ch_0 {
|
||||
assigned-clocks = <&cru SCLK_I2S0_8CH_RX>;
|
||||
assigned-clock-parents = <&cru SCLK_I2S0_8CH_TX_MUX>;
|
||||
rockchip,clk-trcm = <1>;
|
||||
#sound-dai-cells = <0>;
|
||||
status = "okay";
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user