Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mekotronics: updated DT+LCD driver from blueberry_edge_patch_230617 from vendor #62

Merged
merged 6 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions arch/arm64/boot/dts/rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-blueberry-edge-v10-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-blueberry-edge-v12-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-blueberry-edge-v12-maizhuo-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-blueberry-edge-v14-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-blueberry-minipc-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-blueberry-minipc-mizhuo-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-lp4-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-lp4-v10-ipc-6x-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-lp4-v10-linux.dtb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/ {
model = "Mekotronics R58X (RK3588 EDGE LP4x V1.0 BlueBerry Board)";
compatible = "rockchip,rk3588-hugsun-edge-v10-linux", "rockchip,rk3588";
compatible = "rockchip,rk3588-blueberry-edge-v10-linux", "rockchip,rk3588";
/delete-node/ chosen;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@

&hdmi0 {
enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
cec-enable = "true" ;
status = "okay";
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/ {
model = "Mekotronics R58X-4G (RK3588 EDGE LP4x V1.2 BlueBerry Board)";
compatible = "rockchip,rk3588-hugsun-edge-v12-linux", "rockchip,rk3588";
compatible = "rockchip,rk3588-blueberry-edge-v12-linux", "rockchip,rk3588";
/delete-node/ chosen;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/

/dts-v1/;

#include "rk3588-blueberry-edge-v12.dtsi"
#include "rk3588-linux.dtsi"

/ {
model = "RK3588 EDGE LP4x V1.2 MeiZhuo BlueBerry Board";
compatible = "rockchip,rk3588-blueberry-edge-v12-linux", "rockchip,rk3588";
/delete-node/ chosen;

vk2c21_lcd {
compatible = "lcd_vk2c21";
i2c_scl = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
i2c_sda = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;

status = "okay";//"okay"; //zxLog_2022.9.20 for maozhuo time-lcd show;
};
};

&gpio_keys{
vol_up {
debounce-interval = <0>;
autorepeat = <1>;
gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_HIGH>;
label = "GPIO Key Vol+";
linux,code = <KEY_VOLUMEUP>;
wakeup-source;
};

vol_down {
debounce-interval = <0>;
autorepeat = <1>;
gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
label = "GPIO Key Vol-";
linux,code = <KEY_VOLUMEDOWN>;
wakeup-source;
};
};
44 changes: 32 additions & 12 deletions arch/arm64/boot/dts/rockchip/rk3588-blueberry-edge-v12.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@
status = "okay";
compatible = "rockchip,multicodecs-card";
rockchip,card-name = "rockchip-es8388";
hp-det-gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
io-channels = <&saradc 3>;
io-channel-names = "adc-detect";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
//hp-det-gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>;
rockchip,format = "i2s";
rockchip,mclk-fs = <256>;
rockchip,cpu = <&i2s0_8ch>;
Expand All @@ -53,11 +49,6 @@
"RINPUT2", "Headset Mic";
pinctrl-names = "default";
pinctrl-0 = <&hp_det>;
play-pause-key {
label = "playpause";
linux,code = <KEY_PLAYPAUSE>;
press-threshold-microvolt = <2000>;
};
};

rk_headset: rk-headset {
Expand Down Expand Up @@ -214,6 +205,13 @@
vin-supply = <&vcc5v0_sys>;
};

modem {
compatible = "rockchip,modem";
status = "okay";
power-on_gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
reset_gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; //GPIO_C4
};

wireless_bluetooth: wireless-bluetooth {
compatible = "bluetooth-platdata";
clocks = <&hym8563>;
Expand Down Expand Up @@ -323,6 +321,7 @@

&hdmi0 {
enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
cec-enable = "true" ;
status = "okay";
};

Expand All @@ -343,10 +342,11 @@
&hdmirx_ctrler {
status = "okay";

#sound-dai-cells = <1>;
/* Effective level used to trigger HPD: 0-low, 1-high */
hpd-trigger-level = <1>;
hdmirx-det-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; //gpio1_d5
hdmirx-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>; //gpio1_d5
pinctrl-names = "default";
pinctrl-0 = <&hdmim1_rx &hdmirx_det>;
};

&i2c0 {
Expand Down Expand Up @@ -663,6 +663,20 @@
max-frequency = <200000000>;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
full-pwr-cycle-in-suspend;
status = "okay";
};

&sdmmc {
max-frequency = <150000000>;
no-sdio;
no-mmc;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
sd-uhs-sdr104;
vqmmc-supply = <&vccio_sd_s0>;
status = "okay";
};

Expand Down Expand Up @@ -700,6 +714,12 @@
};
};

hdmi {
hdmirx_det: hdmirx-det {
rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};

headphone {
hp_det: hp-det {
rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
Expand Down
120 changes: 120 additions & 0 deletions arch/arm64/boot/dts/rockchip/rk3588-blueberry-edge-v14-linux.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/

/dts-v1/;

#include "rk3588-blueberry-edge-v14.dtsi"
#include "rk3588-linux.dtsi"

/ {
model = "RK3588 EDGE LP4x V1.4 BlueBerry Board";
compatible = "rockchip,rk3588-blueberry-edge-v14-linux", "rockchip,rk3588";
/delete-node/ chosen;
};

&pwm3 {
compatible = "rockchip,remotectl-pwm";
pinctrl-names = "default";
pinctrl-0 = <&pwm3m0_pins>;
remote_pwm_id = <3>;
handle_cpu_id = <1>;
remote_support_psci = <0>;
status = "okay";

ir_key1 { //hugsun blue remote
rockchip,usercode = <0x7f80>;
rockchip,key_table =
<0xec KEY_REPLY>,
<0xd8 KEY_BACK>,
<0xc7 KEY_UP>,
<0xbf KEY_DOWN>,
<0xc8 KEY_LEFT>,
<0xc6 KEY_RIGHT>,
<0x8c KEY_HOME>,
<0x78 KEY_VOLUMEUP>,
<0x76 KEY_VOLUMEDOWN>,
<0x7e KEY_POWER>,
<0xed KEY_POWER>, //20171123
<0x7c KEY_MENU>,
<0xb7 388>;
};

ir_key2 { //hugsun
rockchip,usercode = <0xef10>;
rockchip,key_table =
<0xa2 KEY_POWER>,
<0xe8 KEY_VOLUMEUP>,
<0xec KEY_VOLUMEDOWN>,
<0xa6 141>,//KEY_SETUP>,
<0xa5 388>,
<0xff KEY_BACK>,
<0xba KEY_UP>,
<0xf8 KEY_LEFT>,
<0xbe KEY_REPLY>,
<0xfe KEY_RIGHT>,
<0xaa KEY_DOWN>,
<0xb9 KEY_HOME>,
<0xfa KEY_MENU>,
<0xe5 KEY_REWIND>,
<0xa7 KEY_PLAYPAUSE>,
<0xe2 KEY_FASTFORWARD>,
<0xa0 77>, //@
<0xb0 KEY_0>,
<0xa1 14>,
<0xaf KEY_1>,
<0xad KEY_2>,
<0xef KEY_3>,
<0xb3 KEY_4>,
<0xb5 KEY_5>,
<0xee KEY_6>,
<0xf0 KEY_7>,
<0xb1 KEY_8>,
<0xf2 KEY_9>;
};

ir_key3 {
rockchip,usercode = <0xdf00>;
rockchip,key_table =
<0xe3 KEY_POWER>,
<0xb4 63>, //youtube
<0xfe 67>, //Media Center
<0xa2 KEY_VOLUMEUP>,
<0xb0 66>, //Netflix
<0xa0 68>, //SetupWizard
<0xa3 KEY_VOLUMEDOWN>,

<0xbd KEY_HOME>,
<0xf5 KEY_BACK>,

<0xe5 KEY_UP>,
<0xb8 KEY_LEFT>,
<0xf9 KEY_REPLY>,
<0xf8 KEY_RIGHT>,
<0xb7 KEY_DOWN>,
<0xfc 388>,
<0xe7 KEY_MENU>,

<0xab KEY_1>,
<0xe9 KEY_2>,
<0xea KEY_3>,
<0xaf KEY_4>,
<0xed KEY_5>,
<0xee KEY_6>,
<0xb3 KEY_7>,
<0xf1 KEY_8>,
<0xf2 KEY_9>,
<0xbe 227>, //Fn
<0xf3 KEY_0>,
<0xef 14>;

};

ir_key4{
rockchip,usercode = <0x4040>;
rockchip,key_table =
<0x4d KEY_POWER>; //power (for 2.4g)
};
};
Loading
Loading