Re: [PATCH v3] rockchip: rv1108: Convert to OF_UPSTREAM

2024-05-07 Thread Kever Yang



On 2024/4/24 22:18, Fabio Estevam wrote:

Instead of using the local rv1108 devicetree copies from U-Boot,
let's convert the rv1108 boards to OF_UPSTREAM so that the upstream kernel
devicetrees can be used instead.

Tested on a rv1108-elgin-r1 board.

Signed-off-by: Fabio Estevam 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Changes since v2:
- Also removed the arch/arm/dts/Makefile entries.

  arch/arm/dts/Makefile|   4 -
  arch/arm/dts/rv1108-elgin-r1.dts |  59 
  arch/arm/dts/rv1108-evb.dts  |  79 -
  arch/arm/dts/rv1108.dtsi | 581 ---
  arch/arm/mach-rockchip/Kconfig   |   1 +
  configs/elgin-rv1108_defconfig   |   2 +-
  configs/evb-rv1108_defconfig |   2 +-
  7 files changed, 3 insertions(+), 725 deletions(-)
  delete mode 100644 arch/arm/dts/rv1108-elgin-r1.dts
  delete mode 100644 arch/arm/dts/rv1108-evb.dts
  delete mode 100644 arch/arm/dts/rv1108.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index b1c9c6222e5d..e600f9c6ed25 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -182,10 +182,6 @@ dtb-$(CONFIG_ROCKCHIP_RK3588) += \
rk3588-rock-5b.dtb \
rk3588-turing-rk1.dtb
  
-dtb-$(CONFIG_ROCKCHIP_RV1108) += \

-   rv1108-elgin-r1.dtb \
-   rv1108-evb.dtb
-
  dtb-$(CONFIG_ROCKCHIP_RV1126) += \
rv1126-edgeble-neu2-io.dtb
  
diff --git a/arch/arm/dts/rv1108-elgin-r1.dts b/arch/arm/dts/rv1108-elgin-r1.dts

deleted file mode 100644
index 83e8b3183847..
--- a/arch/arm/dts/rv1108-elgin-r1.dts
+++ /dev/null
@@ -1,59 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Elgin RV1108 R1 board";
-   compatible = "elgin,rv1108-elgin", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_clk _cmd _bus8>;
-   bus-width = <8>;
-   cap-mmc-highspeed;
-   disable-wp;
-   non-removable;
-   status = "okay";
-};
-
- {
-   status = "okay";
-
-   u2phy_otg: otg-port {
-   status = "okay";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_xfer_pullup>;
-   status = "okay";
-};
-
-_otg {
-   status = "okay";
-};
-
- {
-   uart2m0 {
-   uart2m0_xfer_pullup: uart2m0-xfer-pullup {
-   rockchip,pins = <2 RK_PD2 RK_FUNC_1 
_pull_up_drv_8ma>,
-   <2 RK_PD1 RK_FUNC_1 
_pull_up_drv_8ma>;
-   };
-   };
-};
diff --git a/arch/arm/dts/rv1108-evb.dts b/arch/arm/dts/rv1108-evb.dts
deleted file mode 100644
index c91776bc106e..
--- a/arch/arm/dts/rv1108-evb.dts
+++ /dev/null
@@ -1,79 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Rockchip RV1108 Evaluation board";
-   compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-
-   vcc5v0_otg: vcc5v0-otg-drv {
-   compatible = "regulator-fixed";
-   enable-active-high;
-   regulator-name = "vcc5v0_otg";
-   gpio = < RK_PB0 GPIO_ACTIVE_HIGH>;
-   regulator-min-microvolt = <500>;
-   regulator-max-microvolt = <500>;
-   };
-};
-
- {
-   status = "okay";
-   clock_in_out = <0>;
-   snps,reset-active-low;
-   snps,reset-delays-us = <0 1 100>;
-   snps,reset-gpio = < RK_PC1 GPIO_ACTIVE_LOW>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-   flash@0 {
-   compatible = "gd25q256","jedec,spi-nor";
-   reg = <0>;
-   spi-tx-bus-width = <1>;
-   spi-rx-bus-width = <1>;
-   spi-max-frequency = <9600>;
-   };
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
-_otg {
-   vbus-supply = <_otg>;
-   status = "okay";
-};
-
-_host_ehci {
-   status = "okay";
-};
-
-_host_ohci {
-   status = "okay";
-};
diff --git a/arch/arm/dts/rv1108.dtsi b/arch/arm/dts/rv1108.dtsi
deleted file mode 100644
index 215d88522587..
--- a/arch/arm/dts/rv1108.dtsi
+++ /dev/null
@@ -1,581 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-/ {
-   #address-cells = <1>;
-   #size-cells = <1>;
-
-   compatible = 

Re: [PATCH v3] rockchip: rv1108: Convert to OF_UPSTREAM

2024-04-24 Thread Otavio Salvador
Reviewed-by: Otavio Salvador 
Tested-by: Otavio Salvador 

Em qua., 24 de abr. de 2024 às 11:18, Fabio Estevam 
escreveu:

> Instead of using the local rv1108 devicetree copies from U-Boot,
> let's convert the rv1108 boards to OF_UPSTREAM so that the upstream kernel
> devicetrees can be used instead.
>
> Tested on a rv1108-elgin-r1 board.
>
> Signed-off-by: Fabio Estevam 
> ---
> Changes since v2:
> - Also removed the arch/arm/dts/Makefile entries.
>
>  arch/arm/dts/Makefile|   4 -
>  arch/arm/dts/rv1108-elgin-r1.dts |  59 
>  arch/arm/dts/rv1108-evb.dts  |  79 -
>  arch/arm/dts/rv1108.dtsi | 581 ---
>  arch/arm/mach-rockchip/Kconfig   |   1 +
>  configs/elgin-rv1108_defconfig   |   2 +-
>  configs/evb-rv1108_defconfig |   2 +-
>  7 files changed, 3 insertions(+), 725 deletions(-)
>  delete mode 100644 arch/arm/dts/rv1108-elgin-r1.dts
>  delete mode 100644 arch/arm/dts/rv1108-evb.dts
>  delete mode 100644 arch/arm/dts/rv1108.dtsi
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index b1c9c6222e5d..e600f9c6ed25 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -182,10 +182,6 @@ dtb-$(CONFIG_ROCKCHIP_RK3588) += \
> rk3588-rock-5b.dtb \
> rk3588-turing-rk1.dtb
>
> -dtb-$(CONFIG_ROCKCHIP_RV1108) += \
> -   rv1108-elgin-r1.dtb \
> -   rv1108-evb.dtb
> -
>  dtb-$(CONFIG_ROCKCHIP_RV1126) += \
> rv1126-edgeble-neu2-io.dtb
>
> diff --git a/arch/arm/dts/rv1108-elgin-r1.dts
> b/arch/arm/dts/rv1108-elgin-r1.dts
> deleted file mode 100644
> index 83e8b3183847..
> --- a/arch/arm/dts/rv1108-elgin-r1.dts
> +++ /dev/null
> @@ -1,59 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0+
> -/*
> - * (C) Copyright 2016 Rockchip Electronics Co., Ltd
> - */
> -
> -/dts-v1/;
> -
> -#include "rv1108.dtsi"
> -
> -/ {
> -   model = "Elgin RV1108 R1 board";
> -   compatible = "elgin,rv1108-elgin", "rockchip,rv1108";
> -
> -   memory@6000 {
> -   device_type = "memory";
> -   reg = <0x6000 0x0800>;
> -   };
> -
> -   chosen {
> -   stdout-path = "serial2:150n8";
> -   };
> -};
> -
> - {
> -   pinctrl-names = "default";
> -   pinctrl-0 = <_clk _cmd _bus8>;
> -   bus-width = <8>;
> -   cap-mmc-highspeed;
> -   disable-wp;
> -   non-removable;
> -   status = "okay";
> -};
> -
> - {
> -   status = "okay";
> -
> -   u2phy_otg: otg-port {
> -   status = "okay";
> -   };
> -};
> -
> - {
> -   pinctrl-names = "default";
> -   pinctrl-0 = <_xfer_pullup>;
> -   status = "okay";
> -};
> -
> -_otg {
> -   status = "okay";
> -};
> -
> - {
> -   uart2m0 {
> -   uart2m0_xfer_pullup: uart2m0-xfer-pullup {
> -   rockchip,pins = <2 RK_PD2 RK_FUNC_1
> _pull_up_drv_8ma>,
> -   <2 RK_PD1 RK_FUNC_1
> _pull_up_drv_8ma>;
> -   };
> -   };
> -};
> diff --git a/arch/arm/dts/rv1108-evb.dts b/arch/arm/dts/rv1108-evb.dts
> deleted file mode 100644
> index c91776bc106e..
> --- a/arch/arm/dts/rv1108-evb.dts
> +++ /dev/null
> @@ -1,79 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0+
> -/*
> - * (C) Copyright 2016 Rockchip Electronics Co., Ltd
> - */
> -
> -/dts-v1/;
> -
> -#include "rv1108.dtsi"
> -
> -/ {
> -   model = "Rockchip RV1108 Evaluation board";
> -   compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
> -
> -   memory@6000 {
> -   device_type = "memory";
> -   reg = <0x6000 0x0800>;
> -   };
> -
> -   chosen {
> -   stdout-path = "serial2:150n8";
> -   };
> -
> -   vcc5v0_otg: vcc5v0-otg-drv {
> -   compatible = "regulator-fixed";
> -   enable-active-high;
> -   regulator-name = "vcc5v0_otg";
> -   gpio = < RK_PB0 GPIO_ACTIVE_HIGH>;
> -   regulator-min-microvolt = <500>;
> -   regulator-max-microvolt = <500>;
> -   };
> -};
> -
> - {
> -   status = "okay";
> -   clock_in_out = <0>;
> -   snps,reset-active-low;
> -   snps,reset-delays-us = <0 1 100>;
> -   snps,reset-gpio = < RK_PC1 GPIO_ACTIVE_LOW>;
> -};
> -
> - {
> -   status = "okay";
> -};
> -
> - {
> -   status = "okay";
> -   flash@0 {
> -   compatible = "gd25q256","jedec,spi-nor";
> -   reg = <0>;
> -   spi-tx-bus-width = <1>;
> -   spi-rx-bus-width = <1>;
> -   spi-max-frequency = <9600>;
> -   };
> -};
> -
> - {
> -   status = "okay";
> -};
> -
> - {
> -   status = "okay";
> -};
> -
> - {
> -   status = "okay";
> -};
> -
> -_otg {
> -   vbus-supply = <_otg>;
> -   status = "okay";
> -};
> -
> -_host_ehci {
> -   status = "okay";
> -};
> -
> -_host_ohci {
> -   status = "okay";
> -};
> diff --git a/arch/arm/dts/rv1108.dtsi 

[PATCH v3] rockchip: rv1108: Convert to OF_UPSTREAM

2024-04-24 Thread Fabio Estevam
Instead of using the local rv1108 devicetree copies from U-Boot,
let's convert the rv1108 boards to OF_UPSTREAM so that the upstream kernel
devicetrees can be used instead.

Tested on a rv1108-elgin-r1 board.

Signed-off-by: Fabio Estevam 
---
Changes since v2:
- Also removed the arch/arm/dts/Makefile entries.

 arch/arm/dts/Makefile|   4 -
 arch/arm/dts/rv1108-elgin-r1.dts |  59 
 arch/arm/dts/rv1108-evb.dts  |  79 -
 arch/arm/dts/rv1108.dtsi | 581 ---
 arch/arm/mach-rockchip/Kconfig   |   1 +
 configs/elgin-rv1108_defconfig   |   2 +-
 configs/evb-rv1108_defconfig |   2 +-
 7 files changed, 3 insertions(+), 725 deletions(-)
 delete mode 100644 arch/arm/dts/rv1108-elgin-r1.dts
 delete mode 100644 arch/arm/dts/rv1108-evb.dts
 delete mode 100644 arch/arm/dts/rv1108.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index b1c9c6222e5d..e600f9c6ed25 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -182,10 +182,6 @@ dtb-$(CONFIG_ROCKCHIP_RK3588) += \
rk3588-rock-5b.dtb \
rk3588-turing-rk1.dtb
 
-dtb-$(CONFIG_ROCKCHIP_RV1108) += \
-   rv1108-elgin-r1.dtb \
-   rv1108-evb.dtb
-
 dtb-$(CONFIG_ROCKCHIP_RV1126) += \
rv1126-edgeble-neu2-io.dtb
 
diff --git a/arch/arm/dts/rv1108-elgin-r1.dts b/arch/arm/dts/rv1108-elgin-r1.dts
deleted file mode 100644
index 83e8b3183847..
--- a/arch/arm/dts/rv1108-elgin-r1.dts
+++ /dev/null
@@ -1,59 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Elgin RV1108 R1 board";
-   compatible = "elgin,rv1108-elgin", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_clk _cmd _bus8>;
-   bus-width = <8>;
-   cap-mmc-highspeed;
-   disable-wp;
-   non-removable;
-   status = "okay";
-};
-
- {
-   status = "okay";
-
-   u2phy_otg: otg-port {
-   status = "okay";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_xfer_pullup>;
-   status = "okay";
-};
-
-_otg {
-   status = "okay";
-};
-
- {
-   uart2m0 {
-   uart2m0_xfer_pullup: uart2m0-xfer-pullup {
-   rockchip,pins = <2 RK_PD2 RK_FUNC_1 
_pull_up_drv_8ma>,
-   <2 RK_PD1 RK_FUNC_1 
_pull_up_drv_8ma>;
-   };
-   };
-};
diff --git a/arch/arm/dts/rv1108-evb.dts b/arch/arm/dts/rv1108-evb.dts
deleted file mode 100644
index c91776bc106e..
--- a/arch/arm/dts/rv1108-evb.dts
+++ /dev/null
@@ -1,79 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Rockchip RV1108 Evaluation board";
-   compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-
-   vcc5v0_otg: vcc5v0-otg-drv {
-   compatible = "regulator-fixed";
-   enable-active-high;
-   regulator-name = "vcc5v0_otg";
-   gpio = < RK_PB0 GPIO_ACTIVE_HIGH>;
-   regulator-min-microvolt = <500>;
-   regulator-max-microvolt = <500>;
-   };
-};
-
- {
-   status = "okay";
-   clock_in_out = <0>;
-   snps,reset-active-low;
-   snps,reset-delays-us = <0 1 100>;
-   snps,reset-gpio = < RK_PC1 GPIO_ACTIVE_LOW>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-   flash@0 {
-   compatible = "gd25q256","jedec,spi-nor";
-   reg = <0>;
-   spi-tx-bus-width = <1>;
-   spi-rx-bus-width = <1>;
-   spi-max-frequency = <9600>;
-   };
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
-_otg {
-   vbus-supply = <_otg>;
-   status = "okay";
-};
-
-_host_ehci {
-   status = "okay";
-};
-
-_host_ohci {
-   status = "okay";
-};
diff --git a/arch/arm/dts/rv1108.dtsi b/arch/arm/dts/rv1108.dtsi
deleted file mode 100644
index 215d88522587..
--- a/arch/arm/dts/rv1108.dtsi
+++ /dev/null
@@ -1,581 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-/ {
-   #address-cells = <1>;
-   #size-cells = <1>;
-
-   compatible = "rockchip,rv1108";
-
-   interrupt-parent = <>;
-
-   aliases {
-   serial0 = 
-