2019-11-11 03:07:13

by Andreas Färber

[permalink] [raw]
Subject: [PATCH 0/7] arm64: dts: Initial RTD1395 and BPi-M4 support

Hello,

This patch series adds initial Device Trees for Realtek RTD1395 SoC and
Banana Pi BPI-M4 SBC.

It is based on my RTD1195 series and James' pending RTD1619 DT bindings patch.

It starts with some refactorings to align the various SoCs and to demonstrate
to James what I meant with the r-bus node and GIC mask in RTD1619 DT v1 review.

RTD1395 family seems pretty similar to RTD1295 family, but allows for more RAM
and therefore uses #address-cells of 2 vs. 1, and it uses a different reserved
memory region for RPC. RTD1295 resets appear sufficiently compatible for now.

More details at:
https://en.opensuse.org/HCL:BananaPi_M4

Latest experimental patches at:
https://github.com/afaerber/linux/commits/rtd1295-next

Have a lot of fun!

Cheers,
Andreas

Cc: [email protected]
Cc: Rob Herring <[email protected]>
Cc: James Tai <[email protected]>

Andreas Färber (7):
arm64: dts: realtek: rtd129x: Fix GIC CPU masks for RTD1293
arm64: dts: realtek: rtd129x: Use reserved-memory for RPC regions
arm64: dts: realtek: rtd129x: Introduce r-bus
ARM: dts: rtd1195: Fix GIC CPU mask
ARM: dts: rtd1195: Introduce r-bus
dt-bindings: arm: realtek: Add RTD1395 and Banana Pi BPI-M4
arm64: dts: realtek: Add RTD1395 and BPi-M4

Documentation/devicetree/bindings/arm/realtek.yaml | 6 +
arch/arm/boot/dts/rtd1195.dtsi | 60 ++++----
arch/arm64/boot/dts/realtek/Makefile | 2 +
arch/arm64/boot/dts/realtek/rtd1293.dtsi | 12 +-
arch/arm64/boot/dts/realtek/rtd1295.dtsi | 21 +--
arch/arm64/boot/dts/realtek/rtd1296.dtsi | 8 +-
arch/arm64/boot/dts/realtek/rtd129x.dtsi | 159 ++++++++++++---------
arch/arm64/boot/dts/realtek/rtd1395-bpi-m4.dts | 30 ++++
arch/arm64/boot/dts/realtek/rtd1395.dtsi | 65 +++++++++
arch/arm64/boot/dts/realtek/rtd139x.dtsi | 141 ++++++++++++++++++
10 files changed, 387 insertions(+), 117 deletions(-)
create mode 100644 arch/arm64/boot/dts/realtek/rtd1395-bpi-m4.dts
create mode 100644 arch/arm64/boot/dts/realtek/rtd1395.dtsi
create mode 100644 arch/arm64/boot/dts/realtek/rtd139x.dtsi

--
2.16.4


2019-11-11 03:07:47

by Andreas Färber

[permalink] [raw]
Subject: [PATCH 2/7] arm64: dts: realtek: rtd129x: Use reserved-memory for RPC regions

Move /reserved-memory node from RTD1295 to RTD129x DT.
Convert RPC /memreserve/s into /reserved-memory nodes.

Signed-off-by: Andreas Färber <[email protected]>
---
arch/arm64/boot/dts/realtek/rtd1295.dtsi | 13 +------------
arch/arm64/boot/dts/realtek/rtd129x.dtsi | 23 ++++++++++++++++++++---
2 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/arch/arm64/boot/dts/realtek/rtd1295.dtsi b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
index 34f6cc6f16fe..1402abe80ea1 100644
--- a/arch/arm64/boot/dts/realtek/rtd1295.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
@@ -2,7 +2,7 @@
/*
* Realtek RTD1295 SoC
*
- * Copyright (c) 2016-2017 Andreas Färber
+ * Copyright (c) 2016-2019 Andreas Färber
*/

#include "rtd129x.dtsi"
@@ -47,17 +47,6 @@
};
};

- reserved-memory {
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- tee@10100000 {
- reg = <0x10100000 0xf00000>;
- no-map;
- };
- };
-
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13
diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
index 4433114476f5..8d80cca945bc 100644
--- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
@@ -2,14 +2,12 @@
/*
* Realtek RTD1293/RTD1295/RTD1296 SoC
*
- * Copyright (c) 2016-2017 Andreas Färber
+ * Copyright (c) 2016-2019 Andreas Färber
*/

/memreserve/ 0x0000000000000000 0x0000000000030000;
-/memreserve/ 0x000000000001f000 0x0000000000001000;
/memreserve/ 0x0000000000030000 0x00000000000d0000;
/memreserve/ 0x0000000001b00000 0x00000000004be000;
-/memreserve/ 0x0000000001ffe000 0x0000000000004000;

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/realtek,rtd1295.h>
@@ -19,6 +17,25 @@
#address-cells = <1>;
#size-cells = <1>;

+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ rpc_comm: rpc@1f000 {
+ reg = <0x1f000 0x1000>;
+ };
+
+ rpc_ringbuf: rpc@1ffe000 {
+ reg = <0x1ffe000 0x4000>;
+ };
+
+ tee: tee@10100000 {
+ reg = <0x10100000 0xf00000>;
+ no-map;
+ };
+ };
+
arm_pmu: arm-pmu {
compatible = "arm,cortex-a53-pmu";
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
--
2.16.4

2019-12-02 08:19:53

by Andreas Färber

[permalink] [raw]
Subject: Re: [PATCH 2/7] arm64: dts: realtek: rtd129x: Use reserved-memory for RPC regions

Hi James and Realtek colleagues,

Am 11.11.19 um 04:04 schrieb Andreas Färber:
> Move /reserved-memory node from RTD1295 to RTD129x DT.
> Convert RPC /memreserve/s into /reserved-memory nodes.
>
> Signed-off-by: Andreas Färber <[email protected]>
> ---
> arch/arm64/boot/dts/realtek/rtd1295.dtsi | 13 +------------
> arch/arm64/boot/dts/realtek/rtd129x.dtsi | 23 ++++++++++++++++++++---
> 2 files changed, 21 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/realtek/rtd1295.dtsi b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
> index 34f6cc6f16fe..1402abe80ea1 100644
> --- a/arch/arm64/boot/dts/realtek/rtd1295.dtsi
> +++ b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
> @@ -2,7 +2,7 @@
> /*
> * Realtek RTD1295 SoC
> *
> - * Copyright (c) 2016-2017 Andreas Färber
> + * Copyright (c) 2016-2019 Andreas Färber
> */
>
> #include "rtd129x.dtsi"
> @@ -47,17 +47,6 @@
> };
> };
>
> - reserved-memory {
> - #address-cells = <1>;
> - #size-cells = <1>;
> - ranges;
> -
> - tee@10100000 {
> - reg = <0x10100000 0xf00000>;
> - no-map;
> - };
> - };
> -
> timer {
> compatible = "arm,armv8-timer";
> interrupts = <GIC_PPI 13
> diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
> index 4433114476f5..8d80cca945bc 100644
> --- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi
> +++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
> @@ -2,14 +2,12 @@
> /*
> * Realtek RTD1293/RTD1295/RTD1296 SoC
> *
> - * Copyright (c) 2016-2017 Andreas Färber
> + * Copyright (c) 2016-2019 Andreas Färber
> */
>
> /memreserve/ 0x0000000000000000 0x0000000000030000;
> -/memreserve/ 0x000000000001f000 0x0000000000001000;
> /memreserve/ 0x0000000000030000 0x00000000000d0000;
> /memreserve/ 0x0000000001b00000 0x00000000004be000;
> -/memreserve/ 0x0000000001ffe000 0x0000000000004000;
>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/reset/realtek,rtd1295.h>
> @@ -19,6 +17,25 @@
> #address-cells = <1>;
> #size-cells = <1>;
>
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + rpc_comm: rpc@1f000 {
> + reg = <0x1f000 0x1000>;
> + };
> +
> + rpc_ringbuf: rpc@1ffe000 {
> + reg = <0x1ffe000 0x4000>;
> + };

Have you reviewed this patch to be correct? I.e., are the above two
regions reserved RAM (assumption above), or is this rather MMIO
shadowing RAM? (then we would need to update the /memory reg and /soc
ranges properties)

That also affects RTD1619, which currently has neither.

Thanks,
Andreas

> +
> + tee: tee@10100000 {
> + reg = <0x10100000 0xf00000>;
> + no-map;
> + };
> + };
> +
> arm_pmu: arm-pmu {
> compatible = "arm,cortex-a53-pmu";
> interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;

--
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

2019-12-02 09:56:27

by James Tai [戴志峰]

[permalink] [raw]
Subject: RE: [PATCH 2/7] arm64: dts: realtek: rtd129x: Use reserved-memory for RPC regions

Hi Andreas,

> > /memreserve/ 0x0000000000000000 0x0000000000030000;
> > -/memreserve/ 0x000000000001f000 0x0000000000001000;
> > /memreserve/ 0x0000000000030000 0x00000000000d0000;
> > /memreserve/ 0x0000000001b00000 0x00000000004be000;
> > -/memreserve/ 0x0000000001ffe000 0x0000000000004000;
> >

> > #include <dt-bindings/interrupt-controller/arm-gic.h>
> > #include <dt-bindings/reset/realtek,rtd1295.h>
> > @@ -19,6 +17,25 @@
> > #address-cells = <1>;
> > #size-cells = <1>;
> >
> > + reserved-memory {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + ranges;
> > +
> > + rpc_comm: rpc@1f000 {
> > + reg = <0x1f000 0x1000>;
> > + };
> > +
> > + rpc_ringbuf: rpc@1ffe000 {
> > + reg = <0x1ffe000 0x4000>;
> > + };
>
> Have you reviewed this patch to be correct? I.e., are the above two regions
> reserved RAM (assumption above), or is this rather MMIO shadowing RAM?
> (then we would need to update the /memory reg and /soc ranges properties)
>
> That also affects RTD1619, which currently has neither.
>
The RPC common buffer and RPC ring buffer address is correct.


Regards,
James