From e2a6cbe702df5ad611e7b84e4d0cbf11ba493284 Mon Sep 17 00:00:00 2001 From: Ken Wang Date: Tue, 7 Nov 2023 19:47:56 +0800 Subject: [PATCH 1/2] linux: stable: add radxa s0 support Signed-off-by: Ken Wang --- .../0001-arm64-dts-add-radxa-s0.patch | 433 ++++++++++++++++++ linux/stable/fork.conf | 1 + 2 files changed, 434 insertions(+) create mode 100644 linux/stable/0025-radxa-s0/0001-arm64-dts-add-radxa-s0.patch diff --git a/linux/stable/0025-radxa-s0/0001-arm64-dts-add-radxa-s0.patch b/linux/stable/0025-radxa-s0/0001-arm64-dts-add-radxa-s0.patch new file mode 100644 index 00000000..e8cb5dd1 --- /dev/null +++ b/linux/stable/0025-radxa-s0/0001-arm64-dts-add-radxa-s0.patch @@ -0,0 +1,433 @@ +From d3f06c7748a71926c52f4f9e55dc39b623ab2a3a Mon Sep 17 00:00:00 2001 +From: bsp +Date: Tue, 7 Nov 2023 17:08:35 +0800 +Subject: [PATCH] arm64: dts: add radxa s0 + +Signed-off-by: bsp + +diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile +index dbb2d29ebe..58d2bd2a1e 100644 +--- a/arch/arm64/boot/dts/rockchip/Makefile ++++ b/arch/arm64/boot/dts/rockchip/Makefile +@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-engicam-px30-core-ctouch2.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-engicam-px30-core-ctouch2-of10.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-engicam-px30-core-edimm2.2.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-radxa-s0.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb +diff --git a/arch/arm64/boot/dts/rockchip/rk3308-radxa-s0.dts b/arch/arm64/boot/dts/rockchip/rk3308-radxa-s0.dts +new file mode 100644 +index 0000000000..f07543e072 +--- /dev/null ++++ b/arch/arm64/boot/dts/rockchip/rk3308-radxa-s0.dts +@@ -0,0 +1,405 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (c) 2019 Akash Gajjar ++ * Copyright (c) 2019 Jagan Teki ++ * Revised: 2022 Brent Roman ++ */ ++ ++/dts-v1/; ++#include "rk3308.dtsi" ++ ++/ { ++ model = "Radxa S0"; ++ compatible = "radxa,s0", "rockchip,rk3308"; ++ ++ chosen { ++ stdout-path = "serial0:1500000n8"; ++ }; ++ ++ aliases { ++ mmc0 = &emmc; ++ mmc1 = &sdmmc; ++ mmc2 = &sdio; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&green_led_gio>; ++ ++ green-led { ++ label = "rockpis:green:power"; ++ gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ default-state = "on"; ++ }; ++ }; ++ ++ codec: 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 = <&acodec>; ++ }; ++ }; ++ ++ 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>; ++ }; ++ ++ vcc5v0_sys: vcc5v0-sys { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc5v0_sys"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ }; ++ ++ vdd_core: vdd-core { ++ compatible = "pwm-regulator"; ++ pwms = <&pwm0 0 5000 1>; ++ regulator-name = "vdd_core"; ++ regulator-min-microvolt = <827000>; ++ regulator-max-microvolt = <1340000>; ++ regulator-init-microvolt = <1015000>; ++ regulator-settling-time-up-us = <250>; ++ regulator-always-on; ++ regulator-boot-on; ++ pwm-supply = <&vcc5v0_sys>; ++ }; ++ ++ 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>; ++ }; ++ ++ 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>; ++ }; ++ ++ vcc_1v8: vcc-1v8 { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_1v8"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ vin-supply = <&vcc_io>; ++ }; ++ ++ vcc_io: vcc-io { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_io"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ vin-supply = <&vcc5v0_sys>; ++ }; ++ ++ vccio_sd: vccio-sd { ++ compatible = "regulator-gpio"; ++ regulator-name = "vccio_sd"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ states = <1800000 0x0 ++ 3300000 0x1>; ++ }; ++ ++ vcc_sd: vcc-sd { ++ compatible = "regulator-fixed"; ++ gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>; ++ regulator-name = "vcc_sd"; ++ enable-active-low; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ ++ vcc_phy: vcc-phy-regulator { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_phy"; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vcc5v0_otg: vcc5v0-otg { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc5v0_otg"; ++ regulator-always-on; ++ gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&otg_vbus_drv>; ++ 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"; ++ regulator-name = "board_antenna"; ++ }; ++}; ++ ++&uart4 { ++ dma-names = "tx", "rx"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart4_xfer &uart4_cts &uart4_rts>; ++ status = "okay"; ++ ++ bluetooth { ++ compatible = "brcm,bcm43430a1-bt"; ++ clocks = <&cru SCLK_RTC32K>; ++ clock-names = "lpo"; ++ device-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; ++ host-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>; ++ shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>; ++ vbat-supply = <&vcc_io>; ++ vddio-supply = <&vcc_1v8>; ++ }; ++}; ++ ++&acodec { ++ status = "okay"; ++ #sound-dai-cells = <0>; ++}; ++ ++&cpu0 { ++ cpu-supply = <&vdd_core>; ++}; ++ ++&emmc { ++ bus-width = <8>; ++ cap-mmc-highspeed; ++ non-removable; ++ status = "okay"; ++}; ++ ++&sdmmc { ++ supports-sd; ++ bus-width = <4>; ++ cap-mmc-highspeed; ++ cap-sd-highspeed; ++ num-slots = <1>; ++ vmmc-supply = <&vcc_sd>; ++ vqmmc-supply = <&vccio_sd>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>; ++ card-detect-delay = <800>; ++ status = "okay"; ++}; ++ ++&sdio { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ bus-width = <4>; ++ cap-sd-highspeed; ++ cap-sdio-irq; ++ keep-power-in-suspend; ++ mmc-pwrseq = <&sdio_pwrseq>; ++ non-removable; ++ sd-uhs-sdr104; ++ status = "okay"; ++ ++ wifi@1 { ++ compatible = "brcm,bcm4329-fmac"; ++ reg = <1>; ++ interrupt-parent = <&gpio0>; ++ interrupts = ; ++ interrupt-names = "host-wake"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wifi_host_wake>; ++ }; ++}; ++ ++&gmac { ++ phy-supply = <&vcc_phy>; ++ 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"; ++}; ++ ++&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>; ++}; ++ ++&pinctrl { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rtc_32k>; ++ ++ bluetooth { ++ bt_host_wake_l: bt-host-wake-l { ++ rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ bt_enable_h: bt-enable-h { ++ rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ bt_wake_l: bt-wake-host-l { ++ rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ leds { ++ green_led_gio: green-led-gpio { ++ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ usb { ++ otg_vbus_drv: otg-vbus-drv { ++ rockchip,pins = <0 RK_PC5 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_host_wake: wifi-host-wake { ++ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ antenna { ++ ant_1: ant-1 { ++ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>; ++ }; ++ }; ++}; ++ ++&pwm0 { ++ status = "okay"; ++ pinctrl-0 = <&pwm0_pin_pull_down>; ++}; ++ ++&saradc { ++ vref-supply = <&vcc_1v8>; ++ status = "okay"; ++}; ++ ++&tsadc { ++ rockchip,hw-tshut-mode = <0>; /* 0:CRU */ ++ rockchip,hw-tshut-polarity = <1>; /* 1:HIGH */ ++ status = "okay"; ++}; ++ ++&i2c1 { ++ status = "okay"; ++}; ++ ++&spi2 { ++// status = "okay"; //conflicts with UART2 ++ max-freq = <10000000>; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; ++ ++&uart2 { ++ status = "okay"; ++}; ++ ++&u2phy { ++ status = "okay"; ++ ++ u2phy_host: host-port { ++ phy-supply = <&vcc5v0_otg>; ++ status = "okay"; ++ }; ++ ++ u2phy_otg: otg-port { ++ status = "okay"; ++ }; ++}; ++ ++&usb20_otg { ++ status = "okay"; ++}; ++ ++&usb_host_ehci { ++ status = "okay"; ++}; ++ ++&usb_host_ohci{ ++ status = "okay"; ++}; +-- +2.25.1 + diff --git a/linux/stable/fork.conf b/linux/stable/fork.conf index a0d021e4..5baf5e0f 100644 --- a/linux/stable/fork.conf +++ b/linux/stable/fork.conf @@ -5,6 +5,7 @@ SUPPORTED_BOARDS=("stable" #"radxa-cm3-io-stable" "radxa-cm3-sodimm-io-stable" "radxa-e25-stable" #"rock-4c-plus-stable" #"rock-pi-4b-stable" "rock-pi-4c-stable" +"radxa-s0" "rock-pi-n10" "rock-pi-e" "rock-pi-s" From 822e329e7918f745558f7e347a7d93beff65ae84 Mon Sep 17 00:00:00 2001 From: Ken Wang Date: Wed, 8 Nov 2023 19:16:02 +0800 Subject: [PATCH 2/2] linux: stable: 0100-vendor: update 0001-VENDOR-Add-Radxa-overlays.patch To support overlay for radxa s0 Signed-off-by: Ken Wang --- linux/stable/0100-vendor/0001-VENDOR-Add-Radxa-overlays.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/stable/0100-vendor/0001-VENDOR-Add-Radxa-overlays.patch b/linux/stable/0100-vendor/0001-VENDOR-Add-Radxa-overlays.patch index d2d87ff1..e6968674 100644 --- a/linux/stable/0100-vendor/0001-VENDOR-Add-Radxa-overlays.patch +++ b/linux/stable/0100-vendor/0001-VENDOR-Add-Radxa-overlays.patch @@ -28,7 +28,8 @@ diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchi index 971b1f0ae..66aba816d 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile -@@ -1,3 +1,21 @@ +@@ -1,3 +1,22 @@ ++DTC_FLAGS_rk3308-radxa-s0 := -@ +DTC_FLAGS_rk3308-rock-pi-s := -@ +DTC_FLAGS_rk3328-rock-pi-e := -@ +DTC_FLAGS_rk3399-rock-4c-plus := -@