mbox series

[RFC,0/5] ARM: dts: realtek: SB2 semaphores

Message ID 20191202220535.6208-1-afaerber@suse.de
Headers show
Series ARM: dts: realtek: SB2 semaphores | expand

Message

Andreas Färber Dec. 2, 2019, 10:05 p.m. UTC
Hello,

This patch series implements hardware semaphores found in SB2 bridge.

Downstream BSP code assigns the same first semaphore to both CRT and Iso nodes,
which seems inefficient in light of nine semaphore registers and is therefore
deferred in this initial RFC.

This series is based on my syscon series [1].

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

Have a lot of fun!

Cheers,
Andreas

[1] https://patchwork.kernel.org/cover/11269453/

Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Cheng-Yu Lee <cylee12@realtek.com>

Andreas Färber (5):
  dt-bindings: hwlock: Add Realtek RTD1195 SB2
  hwspinlock: Add Realtek RTD1195 SB2
  ARM: dts: rtd1195: Add SB2 sem nodes
  arm64: dts: realtek: rtd129x: Add SB2 sem nodes
  arm64: dts: realtek: rtd139x: Add SB2 sem nodes

 .../bindings/hwlock/realtek,rtd1195-sb2-sem.yaml   |  42 +++++++++
 arch/arm/boot/dts/rtd1195.dtsi                     |  14 +++
 arch/arm64/boot/dts/realtek/rtd129x.dtsi           |  14 +++
 arch/arm64/boot/dts/realtek/rtd139x.dtsi           |  14 +++
 drivers/hwspinlock/Kconfig                         |  11 +++
 drivers/hwspinlock/Makefile                        |   1 +
 drivers/hwspinlock/rtd1195_sb2_sem.c               | 101 +++++++++++++++++++++
 7 files changed, 197 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwlock/realtek,rtd1195-sb2-sem.yaml
 create mode 100644 drivers/hwspinlock/rtd1195_sb2_sem.c

Comments

Andreas Färber Dec. 2, 2019, 11:12 p.m. UTC | #1
Am 02.12.19 um 23:05 schrieb Andreas Färber:
> Add DT nodes to SB2 for hardware semaphores in RTD1395 SoC family.
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  arch/arm64/boot/dts/realtek/rtd139x.dtsi | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/realtek/rtd139x.dtsi b/arch/arm64/boot/dts/realtek/rtd139x.dtsi
> index a3c10ceeb586..586b05350274 100644
> --- a/arch/arm64/boot/dts/realtek/rtd139x.dtsi
> +++ b/arch/arm64/boot/dts/realtek/rtd139x.dtsi
> @@ -191,3 +191,17 @@
>  		status = "disabled";
>  	};
>  };
> +
> +&sb2 {
> +	sb2_hd_sem: hwspinlock@0 {
> +		compatible = "realtek,rtd1195-sb2-sem";
> +		reg = <0x0 0x4>;
> +		#hwlock-cells = <0>;
> +	};
> +
> +	sb2_hd_sem_new: hwspinlock@620 {
> +		compatible = "realtek,rtd1195-sb2-sem";
> +		reg = <0x620 0x20>;
> +		#hwlock-cells = <1>;
> +	};

Forgot to mention: These last 8 registers (0x20) are a guess, untested.
@Realtek: Can someone please check whether RTD1395 has the same nine sem
registers as RTD1295?

Similarly, this series is lacking a patch for RTD1619 because - same as
for RTD1295/RTD1395 - BSP DT only shows the first one (cf. coverletter).
Same issue for RTD1319 while at it.

Thanks,
Andreas

> +};