[PATCH] drm: meson_drv add shutdown function

2021-03-02 Thread Artem Lapkin
Problem: random stucks on reboot stage about 1/20 stuck/reboots
// debug kernel log
[4.496660] reboot: kernel restart prepare CMD:(null)
[4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: 
shutdown begin
[4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: 
shutdown domain 0:VPU...
...STUCK...

Solution: add shutdown function to meson_drm driver 
// debug kernel log
[5.231896] reboot: kernel restart prepare CMD:(null)
[5.246135] [drm:meson_drv_shutdown]
...
[5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: 
shutdown begin
[5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: 
shutdown domain 0:VPU...
[5.338331] reboot: Restarting system
[5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null)
bl31 reboot reason: 0xd
bl31 reboot reason: 0x0
system cmd  1.
...REBOOT...

Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots
and Odroid boards, WeTek Play2 (GXBB)

Tested-by: Christian Hewitt 
Signed-off-by: Artem Lapkin 

---
 drivers/gpu/drm/meson/meson_drv.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/meson/meson_drv.c 
b/drivers/gpu/drm/meson/meson_drv.c
index 42c5d3246..693bb1293 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev,
return count;
 }
 
+static void meson_drv_shutdown(struct platform_device *pdev)
+{
+   struct meson_drm *priv = dev_get_drvdata(>dev);
+   struct drm_device *drm = priv->drm;
+
+   DRM_DEBUG_DRIVER("\n");
+   drm_kms_helper_poll_fini(drm);
+   drm_atomic_helper_shutdown(drm);
+}
+
 static int meson_drv_probe(struct platform_device *pdev)
 {
struct component_match *match = NULL;
@@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = {
 
 static struct platform_driver meson_drm_platform_driver = {
.probe  = meson_drv_probe,
+   .shutdown   = meson_drv_shutdown,
.driver = {
.name   = "meson-drm",
.of_match_table = dt_match,
-- 
2.25.1



[PATCH] arm64: dts: meson-gx: remove wrong reserved BL31 memory

2021-01-29 Thread Artem Lapkin
Kernel boot fail on Khadas VIM1 VIM2 (meson GX) boards
SOLUTION: just remove wrong mem reservation for 0x1000 0x20

 ## Booting kernel from Legacy Image at 0808 ...
   Image Name:   kernel
   Image Type:   AArch64 Linux Kernel Image (lzma compressed)
   Data Size:4657736 Bytes = 4.4 MiB
   Load Address: 0f08
   Entry Point:  0f08
   Verifying Checksum ... OK
 ## Flattened Device Tree blob at 08008000
   Booting using the fdt blob at 0x8008000
   Uncompressing Kernel Image
 ERROR: reserving fdt memory region failed (addr=1000 size=20)
   Loading Device Tree to 7bf23000, end 7bf2d3ce ... OK

 Starting kernel ...

 bl31 reboot reason: 0xd
 bl31 reboot reason: 0x0
 system cmd  1.

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 --
 1 file changed, 6 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 726b91d3a..71083b89d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -32,12 +32,6 @@ hwrom_reserved: hwrom@0 {
no-map;
};
 
-   /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
-   secmon_reserved: secmon@1000 {
-   reg = <0x0 0x1000 0x0 0x20>;
-   no-map;
-   };
-
/* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
secmon_reserved_alt: secmon@500 {
reg = <0x0 0x0500 0x0 0x30>;
-- 
2.25.1



[PATCH] ALSA: usb-audio: add usb vendor id as DSD-capable for Khadas devices

2020-11-03 Thread Artem Lapkin
Khadas audio devices ( USB_ID_VENDOR 0x3353 )
have DSD-capable implementations from XMOS
need add new usb vendor id for recognition

Signed-off-by: Artem Lapkin 
---
 sound/usb/quirks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index b4fa80ef730..c989ad8052a 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1800,6 +1800,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct 
snd_usb_audio *chip,
case 0x278b:  /* Rotel? */
case 0x292b:  /* Gustard/Ess based devices */
case 0x2ab6:  /* T+A devices */
+   case 0x3353:  /* Khadas devices */
case 0x3842:  /* EVGA */
case 0xc502:  /* HiBy devices */
if (fp->dsd_raw)
-- 
2.25.1



[PATCH v2 0/2] arm64: dts: meson: VIM2 updates

2020-09-28 Thread Artem Lapkin
small updates and fixes for Khadas VIM2 board dts

Artem Lapkin (2):
  arm64: dts: meson: rename led name on Khadas VIM2 
meson-gxm-khadas-vim2
  arm64: dts: meson: change spifc max-frequency on Khadas VIM2
meson-gxm-khadas-vim2

 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.25.1



[PATCH 1/2] arm64: dts: meson: rename led name on Khadas VIM2 meson-gxm-khadas-vim2

2020-09-28 Thread Artem Lapkin
rename led name on Khadas VIM2 meson-gxm-khadas-vim2
rename vim:red:power to vim2:white:sys

becouse this led is white system led its not power led

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index bff8ec2c1c7..624632f06b5 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -84,8 +84,8 @@ hdmi_connector_in: endpoint {
pwmleds {
compatible = "pwm-leds";
 
-   power {
-   label = "vim:red:power";
+   system {
+   label = "vim2:white:sys";
pwms = <_AO_ab 1 7812500 0>;
max-brightness = <255>;
linux,default-trigger = "default-on";
-- 
2.25.1



[PATCH 2/2] arm64: dts: meson: change spifc max-frequency on Khadas VIM2 meson-gxm-khadas-vim2

2020-09-28 Thread Artem Lapkin
change spifc max-frequency on Khadas VIM2 meson-gxm-khadas-vim2

max-frequency is 104Mhz

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index 624632f06b5..23e6c63fefa 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -341,7 +341,7 @@ w25q32: spi-flash@0 {
#size-cells = <1>;
compatible = "winbond,w25q16", "jedec,spi-nor";
reg = <0>;
-   spi-max-frequency = <300>;
+   spi-max-frequency = <1040>;
};
 };
 
-- 
2.25.1



[PATCH 6/8] arm64: dts: meson: disable vrtc for VIM3L boards meson-khadas-vim3

2020-09-24 Thread Artem Lapkin
vrtc not used for meson-khadas-vim3

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
index 3111bf35c0f..81bb88a76d5 100644
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
@@ -284,6 +284,10 @@ _ef {
 pinctrl-names = "default";
 };
 
+ {
+   status = "disabled";
+};
+
  {
status = "okay";
vref-supply = <_1v8>;
-- 
2.25.1



[PATCH 7/8] arm64: dts: meson: enable RTC for VIM1 meson-gxl-s905x-khadas-vim

2020-09-24 Thread Artem Lapkin
enable RTC for VIM1 meson-gxl-s905x-khadas-vim

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 8bcdffdf55d..354f21d4171 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -98,7 +98,7 @@ _B {
 
rtc: rtc@51 {
/* has to be enabled manually when a battery is connected: */
-   status = "disabled";
+   status = "okay";
compatible = "haoyu,hym8563";
reg = <0x51>;
#clock-cells = <0>;
-- 
2.25.1



[PATCH 4/8] arm64: dts: meson: remove fixed memory size for Khadas VIM3/VIM3L meson-khadas-vim3

2020-09-24 Thread Artem Lapkin
no need force setup memory size!
VIM3 boards have 2Gb and 4Gb variants
memory size will be automatically defined

mainline uboot works properly in any case
but old vendor uboot works not properly for 4Gb variants

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
index 7e137399257..3111bf35c0f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
@@ -20,10 +20,15 @@ chosen {
stdout-path = "serial0:115200n8";
};
 
+/*  no need force setup memory size!
+VIM3 boards have 2Gb and 4Gb variants
+memory size will be automatically defined
+
memory@0 {
device_type = "memory";
reg = <0x0 0x0 0x0 0x8000>;
};
+*/
 
adc-keys {
compatible = "adc-keys";
-- 
2.25.1



[PATCH 5/8] arm64: dts: meson: remove reset-gpios from ethernet node for VIM2 meson-gxm-khadas-vim2

2020-09-24 Thread Artem Lapkin
1) fix down/up ethernet interface - need remove reset-gpios for ethernet node

`ifconfig eth0 down && ifconfig eth0 up` # didnt works with reset-gpios

2) add max-speed 1Gbit

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index a6baf865aa2..70343da2811 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -195,7 +195,7 @@ external_phy: ethernet-phy@0 {
 
reset-assert-us = <1>;
reset-deassert-us = <3>;
-   reset-gpios = < GPIOZ_14 GPIO_ACTIVE_LOW>;
+   max-speed = <1000>;
 
interrupt-parent = <_intc>;
/* MAC_INTR on GPIOZ_15 */
-- 
2.25.1



[PATCH 8/8] arm64: dts: meson: enable RTC for VIM2 meson-gxm-khadas-vim2

2020-09-24 Thread Artem Lapkin
enable RTC for VIM2 meson-gxm-khadas-vim2

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index 70343da2811..76b7e34a9a3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -229,7 +229,7 @@ _B {
 
rtc: rtc@51 {
/* has to be enabled manually when a battery is connected: */
-   status = "disabled";
+   status = "okay";
compatible = "haoyu,hym8563";
reg = <0x51>;
#clock-cells = <0>;
-- 
2.25.1



[PATCH 1/8] arm64: dts: meson: update spifc node on Khadas VIM2 meson-gxm-khadas-vim2

2020-09-24 Thread Artem Lapkin
1) The VIM2 Boards use w25q128 spi chip only not w25q32 or w25q16
   it's not really seriously becouse have 'jedec,spi-nor' which
   have auto chips identifications

2) max-frequency is 104Mhz

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index bff8ec2c1c7..a6baf865aa2 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -336,12 +336,12 @@  {
pinctrl-0 = <_pins>;
pinctrl-names = "default";
 
-   w25q32: spi-flash@0 {
+   w25q128: spi-flash@0 {
#address-cells = <1>;
#size-cells = <1>;
-   compatible = "winbond,w25q16", "jedec,spi-nor";
+   compatible = "winbond,w25q128fw", "jedec,spi-nor";
reg = <0>;
-   spi-max-frequency = <300>;
+   spi-max-frequency = <10400>;
};
 };
 
-- 
2.25.1



[PATCH 2/8] arm64: dts: meson: update leds node on Khadas VIM3/VIM3L boards meson-khadas-vim3

2020-09-24 Thread Artem Lapkin
GPIO_ACTIVE_LOW replaced to GPIO_ACTIVE_HIGH for white and red leds

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
index 94f75b44650..73783692e30 100644
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
@@ -41,13 +41,13 @@ leds {
 
led-white {
label = "vim3:white:sys";
-   gpios = <_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
+   gpios = <_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
 
led-red {
label = "vim3:red";
-   gpios = <_expander 5 GPIO_ACTIVE_LOW>;
+   gpios = <_expander 5 GPIO_ACTIVE_HIGH>;
};
};
 
-- 
2.25.1



[PATCH 3/8] arm64: dts: meson: update leds node on Khadas VIM3/VIM3L board meson-khadas-vim3

2020-09-24 Thread Artem Lapkin
add aliases names led_white and led_red for white and red leds

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
index 73783692e30..7e137399257 100644
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
@@ -12,6 +12,8 @@ / {
aliases {
serial0 = _AO;
ethernet0 = 
+   led_red = _red;
+   led_white = _white;
};
 
chosen {
@@ -39,13 +41,13 @@ button-function {
leds {
compatible = "gpio-leds";
 
-   led-white {
+   led_white: led-white {
label = "vim3:white:sys";
gpios = <_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
 
-   led-red {
+   led_red: led-red {
label = "vim3:red";
gpios = <_expander 5 GPIO_ACTIVE_HIGH>;
};
-- 
2.25.1



[PATCH 0/8] dts updates and fixes for Khadas VIM1 VIM2 VIM3 VIML boards

2020-09-24 Thread Artem Lapkin
dts updates and fixes for Khadas VIM1 VIM2 VIM3 VIML boards

Artem Lapkin (8):
  arm64: dts: meson: update spifc node on Khadas VIM2
meson-gxm-khadas-vim2
  arm64: dts: meson: update leds node on Khadas VIM3/VIM3L boards
meson-khadas-vim3
  arm64: dts: meson: update leds node on Khadas VIM3/VIM3L board
meson-khadas-vim3
  arm64: dts: meson: remove fixed memory size for Khadas VIM3/VIM3L
meson-khadas-vim3
  arm64: dts: meson: remove reset-gpios from ethernet node for VIM2
meson-gxm-khadas-vim2
  arm64: dts: meson: disable vrtc for VIM3L boards meson-khadas-vim3
  arm64: dts: meson: enable RTC for VIM1 meson-gxl-s905x-khadas-vim
  arm64: dts: meson: enable RTC for VIM2 meson-gxm-khadas-vim2

 .../amlogic/meson-gxl-s905x-khadas-vim.dts|  2 +-
 .../dts/amlogic/meson-gxm-khadas-vim2.dts | 10 +-
 .../boot/dts/amlogic/meson-khadas-vim3.dtsi   | 19 +++
 3 files changed, 21 insertions(+), 10 deletions(-)

-- 
2.25.1



[PATCH v2 1/2] arm64: dts: rockchip: add spiflash node to rk3399-khadas-edge

2020-09-23 Thread Artem Lapkin
The Khadas Edge Boards uses winbond - w25q128 spi flash with 104Mhz

Signed-off-by: Artem Lapkin 
Tested-by: Artem Lapkin 
---
 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
index e36837c04dc..c67420578fa 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
@@ -690,6 +690,16 @@  {
status = "okay";
 };
 
+ {
+   status = "okay";
+
+   spiflash: flash@0 {
+   compatible = "winbond,w25q128fw", "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <10400>;
+   };
+};
+
  {
status = "okay";
 };
-- 
2.25.1



[PATCH v2 2/2] arm64: dts: rockchip: add ir-receiver node to rk3399-khadas-edge

2020-09-23 Thread Artem Lapkin
add missed ir-receiver and ir_rx pinctl nodes to rk3399-khadas-edge
Khadas Edge board uses gpio-ir-receiver on RK_PB6 gpio

Signed-off-by: Artem Lapkin 
Tested-by: Artem Lapkin 
---
 .../boot/dts/rockchip/rk3399-khadas-edge.dtsi  | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
index c67420578fa..e4655097f22 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
@@ -109,6 +109,14 @@ vsys_5v0: vsys-5v0 {
vin-supply = <>;
};
 
+   ir-receiver {
+   compatible = "gpio-ir-receiver";
+   gpios = < RK_PB6 GPIO_ACTIVE_LOW>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rx>;
+   linux,rc-map-name = "rc-khadas";
+   };
+
adc-keys {
compatible = "adc-keys";
io-channels = < 1>;
@@ -585,6 +593,12 @@ pwrbtn: pwrbtn {
};
};
 
+   ir {
+   ir_rx: ir-rx {
+   rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO _pull_none>;
+   };
+   };
+
leds {
sys_led_pin: sys-led-pin {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO _pull_none>;
-- 
2.25.1



[PATCH v2 0/2] arm64: dts: rockchip: add spiflash and ir-receiver nodes to rk3399-khadas-edge

2020-09-23 Thread Artem Lapkin
add missed spiflash and ir-receiver dts nodes to Khadas Edge Board

Artem Lapkin (2):
  arm64: dts: rockchip: add spiflash node to rk3399-khadas-edge
  arm64: dts: rockchip: add ir-receiver node to rk3399-khadas-edge

 .../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 24 +++
 1 file changed, 24 insertions(+)

-- 
2.25.1



[PATCH 1/2] arm64: dts: rockchip: rk3399-khadas-edge: add missed spiflash node

2020-09-23 Thread Artem Lapkin
From: Artem Lapkin 

The Khadas Edge Boards uses winbond - w25q128 spi flash with 104Mhz
---
 .../boot/dts/rockchip/rk3399-khadas-edge.dtsi  | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
index e36837c04dc..42ebbd6fa46 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
@@ -805,3 +805,17 @@  {
 _mmu {
status = "okay";
 };
+
+
+ {
+max-freq = <10400>;
+status = "okay";
+
+spiflash: flash@0 {
+u-boot,dm-pre-reloc;
+compatible = "winbond,w25q128fw", "jedec,spi-nor";
+reg = <0>;
+spi-max-frequency = <10400>;
+};
+};
+
-- 
2.25.1



[PATCH 2/2] arm64: dts: rockchip: rk3399-khadas-edge add missed ir-receiver and ir_rx pinctl nodes

2020-09-23 Thread Artem Lapkin
From: Artem Lapkin 

add missed ir receivier to Khadas Edge board
Khadas Edge uses gpio-ir-receiver on RK_PB6 gpio
---
 .../boot/dts/rockchip/rk3399-khadas-edge.dtsi| 16 
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
index 42ebbd6fa46..389ae43d869 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
@@ -109,6 +109,14 @@ vsys_5v0: vsys-5v0 {
vin-supply = <>;
};
 
+   ir-receiver {
+   compatible = "gpio-ir-receiver";
+   gpios = < RK_PB6 GPIO_ACTIVE_LOW>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rx>;
+   linux,rc-map-name = "rc-khadas";
+   };
+
adc-keys {
compatible = "adc-keys";
io-channels = < 1>;
@@ -682,6 +690,14 @@  {
status = "okay";
 };
 
+ {
+ir {
+   ir_rx: ir-rx {
+   rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO _pull_none>;
+   };
+};
+};
+
  {
bus-width = <8>;
mmc-hs400-1_8v;
-- 
2.25.1



[PATCH 0/2] arm64: dts: rockchip: rk3399-khadas-edge: missed nodes

2020-09-23 Thread Artem Lapkin
From: Artem Lapkin 

add missed spiflash and ir-receiver dts nodes to Khadas Edge Board

Artem Lapkin (2):
  arm64: dts: rockchip: rk3399-khadas-edge: add missed spiflash node
  arm64: dts: rockchip: rk3399-khadas-edge: add missed ir-recevier and
ir_rx pinctl nodes

 .../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 30 +++
 1 file changed, 30 insertions(+)

-- 
2.25.1