diff --git a/packages/bsp/rk3318/rk3318-config b/packages/bsp/rk3318/rk3318-config index cdf8a01f4..57d77694d 100755 --- a/packages/bsp/rk3318/rk3318-config +++ b/packages/bsp/rk3318/rk3318-config @@ -75,8 +75,10 @@ DT_LED_OVERLAYS+=(["rk3318-box-led-conf4"]="Generic + wifi on sdmmc-ext") DT_LED_OVERLAYS+=(["rk3318-box-led-conf2"]="X88_PRO_B boards") DT_LED_OVERLAYS+=(["rk3318-box-led-conf3"]="MXQ-RK3328-D4 boards (w/ RK805)") DT_LED_OVERLAYS+=(["rk3318-box-led-conf5"]="YX_RK3318 boards") +DT_LED_OVERLAYS+=(["rk3318-box-led-conf6"]="T98_RK3318 boards") +DT_LED_OVERLAYS+=(["rk3318-box-led-conf7"]="T9_RK3318 boards") -DT_LED_OVERLAYS_ORDER=("rk3318-box-led-conf1" "rk3318-box-led-conf4" "rk3318-box-led-conf2" "rk3318-box-led-conf3" "rk3318-box-led-conf5") +DT_LED_OVERLAYS_ORDER=("rk3318-box-led-conf1" "rk3318-box-led-conf4" "rk3318-box-led-conf2" "rk3318-box-led-conf3" "rk3318-box-led-conf5" "rk3318-box-led-conf6" "rk3318-box-led-conf7") DT_CPU_OVERLAYS+=(["rk3318-box-cpu-hs"]="RK3318 or RK3328") diff --git a/patch/kernel/archive/rockchip64-6.12/overlay/Makefile b/patch/kernel/archive/rockchip64-6.12/overlay/Makefile index a564638e5..4b7002dd6 100644 --- a/patch/kernel/archive/rockchip64-6.12/overlay/Makefile +++ b/patch/kernel/archive/rockchip64-6.12/overlay/Makefile @@ -17,6 +17,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \ rockchip-rk3318-box-led-conf3.dtbo \ rockchip-rk3318-box-led-conf4.dtbo \ rockchip-rk3318-box-led-conf5.dtbo \ + rockchip-rk3318-box-led-conf6.dtbo \ + rockchip-rk3318-box-led-conf7.dtbo \ rockchip-rk3318-box-wlan-ap6330.dtbo \ rockchip-rk3318-box-wlan-ap6334.dtbo \ rockchip-rk3318-box-wlan-ext.dtbo \ diff --git a/patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays b/patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays index 2d06c061c..8d7af4388 100644 --- a/patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays +++ b/patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays @@ -159,8 +159,8 @@ or enabling the internal pull-up ### rk3318-box-led-conf1 -Activates led/gpio configuration for rk3318 tv box boards with signature -YX_RK3328 and clones +Generic default led/gpio configuration for rk3318 tv box boards. +Does not enable any specific or peculiar hardware. ### rk3318-box-led-conf2 @@ -178,6 +178,20 @@ system. Also enables gpio leds and keys. Generic rk3318-box configuration but with sdio chip on sdmmc-ext connector +### rk3318-box-led-conf5 + +Configuration for rk3318 boards with with signature YX_RK3328 and clones. + +### rk3318-box-led-conf6 + +Configuration for rk3318 boards with with signature T98_RK3318 and clones. +Seen in commercial tv boxes like Hongtop H50. + +### rk3318-box-led-conf7 + +Configuration for rk3318 boards with with signature T9_RK3318 and clones. +Seen in commercial tv boxes like T9 Sunwell 3318. + ### rk3318-box-emmc-ddr Activates eMMC DDR capability for rk3318 tv box boards. Probably all the eMMC chips diff --git a/patch/kernel/archive/rockchip64-6.12/overlay/rockchip-rk3318-box-led-conf6.dtso b/patch/kernel/archive/rockchip64-6.12/overlay/rockchip-rk3318-box-led-conf6.dtso new file mode 100644 index 000000000..3d1e05043 --- /dev/null +++ b/patch/kernel/archive/rockchip64-6.12/overlay/rockchip-rk3318-box-led-conf6.dtso @@ -0,0 +1,57 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include + +/** + * T98_RK3318 (Hongtop H50) + */ + +&{/} { + + i2c-display { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 RK_PD1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 RK_PD0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <5>; + i2c-gpio,sda-output-only; + i2c-gpio,scl-output-only; + #address-cells = <1>; + #size-cells = <0>; + + display-controller@24 { + #address-cells = <2>; + #size-cells = <0>; + + compatible = "fdhisi,fd650"; + reg = <0x24>; + tm16xx,digits = [04 03 02 01]; + tm16xx,segment-mapping = [03 04 05 00 01 02 06]; + + led@2,1 { + reg = <1 7>; + function = LED_FUNCTION_USB; + }; + + led@2,2 { + reg = <2 7>; + function = "colon"; + }; + + led@2,3 { + reg = <3 7>; + function = LED_FUNCTION_LAN; + }; + + led@2,4 { + reg = <4 7>; + function = LED_FUNCTION_WLAN; + }; + + }; + + }; + +}; diff --git a/patch/kernel/archive/rockchip64-6.12/overlay/rockchip-rk3318-box-led-conf7.dtso b/patch/kernel/archive/rockchip64-6.12/overlay/rockchip-rk3318-box-led-conf7.dtso new file mode 100644 index 000000000..e1aa172e7 --- /dev/null +++ b/patch/kernel/archive/rockchip64-6.12/overlay/rockchip-rk3318-box-led-conf7.dtso @@ -0,0 +1,76 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include + +/** + * T9_RK3318 (T9 Sunwell 3318 version 4+32 GB) + */ + +&{/} { + + i2c_aux_display: i2c-aux-display { + + compatible = "i2c-gpio"; + sda-gpios = <&gpio2 RK_PC6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio2 RK_PC3 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <5>; + i2c-gpio,sda-output-only; + i2c-gpio,scl-output-only; + #address-cells = <1>; + #size-cells = <0>; + + display@24 { + compatible = "fdhisi,fd655"; + reg = <0x24>; + tm16xx,digits = [01 02 03 04]; + tm16xx,segment-mapping = [03 04 05 00 01 02 06]; + + leds { + #address-cells = <2>; + #size-cells = <0>; + + led@0,0 { + reg = <0 0>; + function = LED_FUNCTION_ALARM; + }; + + led@0,1 { + reg = <0 1>; + function = LED_FUNCTION_USB; + }; + + led@0,2 { + reg = <0 2>; + function = "play"; + }; + + led@0,3 { + reg = <0 3>; + function = "pause"; + }; + + led@0,4 { + reg = <0 4>; + function = "colon"; + }; + + led@0,5 { + reg = <0 5>; + function = LED_FUNCTION_LAN; + }; + + led@0,6 { + reg = <0 6>; + function = LED_FUNCTION_WLAN; + }; + + }; + + }; + + }; + +}; diff --git a/patch/kernel/archive/rockchip64-6.18/overlay/Makefile b/patch/kernel/archive/rockchip64-6.18/overlay/Makefile index 29d3f6168..5cc0851cf 100644 --- a/patch/kernel/archive/rockchip64-6.18/overlay/Makefile +++ b/patch/kernel/archive/rockchip64-6.18/overlay/Makefile @@ -18,6 +18,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \ rockchip-rk3318-box-led-conf3.dtbo \ rockchip-rk3318-box-led-conf4.dtbo \ rockchip-rk3318-box-led-conf5.dtbo \ + rockchip-rk3318-box-led-conf6.dtbo \ + rockchip-rk3318-box-led-conf7.dtbo \ rockchip-rk3318-box-wlan-ap6330.dtbo \ rockchip-rk3318-box-wlan-ap6334.dtbo \ rockchip-rk3318-box-wlan-ext.dtbo \ diff --git a/patch/kernel/archive/rockchip64-6.18/overlay/README.rockchip-overlays b/patch/kernel/archive/rockchip64-6.18/overlay/README.rockchip-overlays index 45b05f6a6..e13c3ca18 100644 --- a/patch/kernel/archive/rockchip64-6.18/overlay/README.rockchip-overlays +++ b/patch/kernel/archive/rockchip64-6.18/overlay/README.rockchip-overlays @@ -146,8 +146,8 @@ or enabling the internal pull-up ### rk3318-box-led-conf1 -Activates led/gpio configuration for rk3318 tv box boards with signature -YX_RK3328 and clones +Generic default led/gpio configuration for rk3318 tv box boards. +Does not enable any specific or peculiar hardware. ### rk3318-box-led-conf2 @@ -165,6 +165,20 @@ system. Also enables gpio leds and keys. Generic rk3318-box configuration but with sdio chip on sdmmc-ext connector +### rk3318-box-led-conf5 + +Configuration for rk3318 boards with with signature YX_RK3328 and clones. + +### rk3318-box-led-conf6 + +Configuration for rk3318 boards with with signature T98_RK3318 and clones. +Seen in commercial tv boxes like Hongtop H50. + +### rk3318-box-led-conf7 + +Configuration for rk3318 boards with with signature T9_RK3318 and clones. +Seen in commercial tv boxes like T9 Sunwell 3318. + ### rk3318-box-emmc-ddr Activates eMMC DDR capability for rk3318 tv box boards. Probably all the eMMC chips diff --git a/patch/kernel/archive/rockchip64-6.18/overlay/rockchip-rk3318-box-led-conf6.dtso b/patch/kernel/archive/rockchip64-6.18/overlay/rockchip-rk3318-box-led-conf6.dtso new file mode 100644 index 000000000..0860836d9 --- /dev/null +++ b/patch/kernel/archive/rockchip64-6.18/overlay/rockchip-rk3318-box-led-conf6.dtso @@ -0,0 +1,88 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include + +/** + * T98_RK3318 (Hongtop H50) + */ + +&{/} { + + i2c_aux_display: i2c-aux-display { + + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 RK_PD1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 RK_PD0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <5>; + i2c-gpio,sda-output-only; + i2c-gpio,scl-output-only; + #address-cells = <1>; + #size-cells = <0>; + + display@24 { + compatible = "fdhisi,fd650"; + reg = <0x24>; + + digits { + #address-cells = <1>; + #size-cells = <0>; + + digit@0 { + reg = <0>; + segments = <1 3>, <1 4>, <1 5>, <1 0>, <1 1>, <1 2>, <1 6>; + }; + + digit@1 { + reg = <1>; + segments = <2 3>, <2 4>, <2 5>, <2 0>, <2 1>, <2 2>, <2 6>; + }; + + digit@2 { + reg = <2>; + segments = <3 3>, <3 4>, <3 5>, <3 0>, <3 1>, <3 2>, <3 6>; + }; + + digit@3{ + reg = <3>; + segments = <4 3>, <4 4>, <4 5>, <4 0>, <4 1>, <4 2>, <4 6>; + }; + + }; + + leds { + #address-cells = <2>; + #size-cells = <0>; + + led@1,7 { + reg = <1 7>; + function = "usb"; + linux,default-trigger = "usb-host"; + }; + + led@2,7 { + reg = <2 7>; + function = "colon"; + }; + + led@3,7 { + reg = <3 7>; + function = LED_FUNCTION_LAN; + linux,default-trigger = "stmmac-0:00:link"; + }; + + led@4,7 { + reg = <4 7>; + function = LED_FUNCTION_WLAN; + linux,default-trigger = "mmc1"; + }; + + }; + + }; + + }; + +}; diff --git a/patch/kernel/archive/rockchip64-6.18/overlay/rockchip-rk3318-box-led-conf7.dtso b/patch/kernel/archive/rockchip64-6.18/overlay/rockchip-rk3318-box-led-conf7.dtso new file mode 100644 index 000000000..a38abec05 --- /dev/null +++ b/patch/kernel/archive/rockchip64-6.18/overlay/rockchip-rk3318-box-led-conf7.dtso @@ -0,0 +1,100 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include + +/** + * T9_RK3318 (T9 Sunwell 3318) + */ + +&{/} { + + i2c_aux_display: i2c-aux-display { + + compatible = "i2c-gpio"; + sda-gpios = <&gpio2 RK_PC6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio2 RK_PC3 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <5>; + i2c-gpio,sda-output-only; + i2c-gpio,scl-output-only; + #address-cells = <1>; + #size-cells = <0>; + + display@24 { + compatible = "fdhisi,fd655"; + reg = <0x24>; + + digits { + #address-cells = <1>; + #size-cells = <0>; + + digit@0 { + reg = <0>; + segments = <4 3>, <4 4>, <4 5>, <4 0>, <4 1>, <4 2>, <4 6>; + }; + + digit@1 { + reg = <1>; + segments = <3 3>, <3 4>, <3 5>, <3 0>, <3 1>, <3 2>, <3 6>; + }; + + digit@2 { + reg = <2>; + segments = <2 3>, <2 4>, <2 5>, <2 0>, <2 1>, <2 2>, <2 6>; + }; + + digit@3{ + reg = <3>; + segments = <1 3>, <1 4>, <1 5>, <1 0>, <1 1>, <1 2>, <1 6>; + }; + + }; + + leds { + #address-cells = <2>; + #size-cells = <0>; + + led@0,0 { + reg = <0 0>; + function = LED_FUNCTION_ALARM; + }; + + led@0,1 { + reg = <0 1>; + function = LED_FUNCTION_USB; + }; + + led@0,2 { + reg = <0 2>; + function = "play"; + }; + + led@0,3 { + reg = <0 3>; + function = "pause"; + }; + + led@0,4 { + reg = <0 4>; + function = "colon"; + }; + + led@0,5 { + reg = <0 5>; + function = LED_FUNCTION_LAN; + }; + + led@0,6 { + reg = <0 6>; + function = LED_FUNCTION_WLAN; + }; + + }; + + }; + + }; + +};