diff mbox series

[1/2] ARM: dts: renesas: add proper node names to (L)BSC devices

Message ID 20240926075724.6161-5-wsa+renesas@sang-engineering.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series ARM: dts: renesas: fix BSC nodes | expand

Commit Message

Wolfram Sang Sept. 26, 2024, 7:57 a.m. UTC
(L)BSC should have a "bus" node name together with its register set [1].
Add the missing names, and change one with a wrong address not matching
the register space.

[1] lbsc: $nodename:0: 'lbsc' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 arch/arm/boot/dts/renesas/r7s72100.dtsi | 2 +-
 arch/arm/boot/dts/renesas/r8a7778.dtsi  | 2 +-
 arch/arm/boot/dts/renesas/r8a7779.dtsi  | 2 +-
 arch/arm/boot/dts/renesas/r8a7792.dtsi  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Comments

Geert Uytterhoeven Sept. 26, 2024, 8:25 a.m. UTC | #1
Hi Wolfram,

On Thu, Sep 26, 2024 at 9:58 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> (L)BSC should have a "bus" node name together with its register set [1].
> Add the missing names, and change one with a wrong address not matching
> the register space.

Thanks for your patch!

> [1] lbsc: $nodename:0: 'lbsc' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'

The "@<unit-address>" part is optional.

> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  arch/arm/boot/dts/renesas/r7s72100.dtsi | 2 +-
>  arch/arm/boot/dts/renesas/r8a7778.dtsi  | 2 +-
>  arch/arm/boot/dts/renesas/r8a7779.dtsi  | 2 +-
>  arch/arm/boot/dts/renesas/r8a7792.dtsi  | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/renesas/r7s72100.dtsi b/arch/arm/boot/dts/renesas/r7s72100.dtsi
> index 07ffd9ec96cc..a460a9092c43 100644
> --- a/arch/arm/boot/dts/renesas/r7s72100.dtsi
> +++ b/arch/arm/boot/dts/renesas/r7s72100.dtsi
> @@ -36,7 +36,7 @@ b_clk: b {
>                 clock-div = <3>;
>         };
>
> -       bsc: bsc {
> +       bsc: bus@3fffc000 {

In the absence of a "reg" property, shouldn't the unit-address match the
"ranges" property?

Actually, I cannot find that in the DT spec, only:

   "If the node has no reg property, the @unit-address must be omitted".

>                 compatible = "simple-bus";
>                 #address-cells = <1>;
>                 #size-cells = <1>;
> diff --git a/arch/arm/boot/dts/renesas/r8a7778.dtsi b/arch/arm/boot/dts/renesas/r8a7778.dtsi
> index b80e832c9277..ab0b76eacd3c 100644
> --- a/arch/arm/boot/dts/renesas/r8a7778.dtsi
> +++ b/arch/arm/boot/dts/renesas/r8a7778.dtsi
> @@ -40,7 +40,7 @@ aliases {
>                 spi2 = &hspi2;
>         };
>
> -       bsc: bus@1c000000 {
> +       bsc: bus@ff800000 {

"ranges" says 0x1c000000, so the former was correct?

>                 compatible = "simple-bus";
>                 #address-cells = <1>;
>                 #size-cells = <1>;
> diff --git a/arch/arm/boot/dts/renesas/r8a7779.dtsi b/arch/arm/boot/dts/renesas/r8a7779.dtsi
> index 1944703cba4f..3c5746dbe639 100644
> --- a/arch/arm/boot/dts/renesas/r8a7779.dtsi
> +++ b/arch/arm/boot/dts/renesas/r8a7779.dtsi
> @@ -704,7 +704,7 @@ R8A7779_CLK_MMC1 R8A7779_CLK_MMC0
>                 };
>         };
>
> -       lbsc: lbsc {
> +       lbsc: bus@ff800000 {

0x1c000000 according to "ranges".

>                 compatible = "simple-bus";
>                 #address-cells = <1>;
>                 #size-cells = <1>;
> diff --git a/arch/arm/boot/dts/renesas/r8a7792.dtsi b/arch/arm/boot/dts/renesas/r8a7792.dtsi
> index dd3bc32668b7..471a2913e51e 100644
> --- a/arch/arm/boot/dts/renesas/r8a7792.dtsi
> +++ b/arch/arm/boot/dts/renesas/r8a7792.dtsi
> @@ -84,7 +84,7 @@ extal_clk: extal {
>                 clock-frequency = <0>;
>         };
>
> -       lbsc: lbsc {
> +       lbsc: bus@fec00000 {

0x1c000000 according to "ranges".

>                 compatible = "simple-bus";
>                 #address-cells = <1>;
>                 #size-cells = <1>;

Gr{oetje,eeting}s,

                        Geert
Wolfram Sang Sept. 26, 2024, 10:04 a.m. UTC | #2
Hi Geert,

thanks for the review!

> The "@<unit-address>" part is optional.

Ah! Then, I actually prefer dropping the unit address.

> Actually, I cannot find that in the DT spec, only:
> 
>    "If the node has no reg property, the @unit-address must be omitted".

Sounds good to me. However, sh73a0 and r8a73a4 are still a bit strange.
They have a unit-address because they have a reg-property which is
documented for renesas,bsc. However, there is no driver for the BSC.
AFAICS, this could work as well with "simple-pm-bus" and we could drop
the renesas,bsc bindings? This probably is a separate issue, though.

Happy hacking,

   Wolfram
Geert Uytterhoeven Sept. 26, 2024, 10:09 a.m. UTC | #3
Hi Wolfram,

On Thu, Sep 26, 2024 at 12:04 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > The "@<unit-address>" part is optional.
>
> Ah! Then, I actually prefer dropping the unit address.

Fine for me!

> > Actually, I cannot find that in the DT spec, only:
> >
> >    "If the node has no reg property, the @unit-address must be omitted".
>
> Sounds good to me. However, sh73a0 and r8a73a4 are still a bit strange.
> They have a unit-address because they have a reg-property which is
> documented for renesas,bsc. However, there is no driver for the BSC.
> AFAICS, this could work as well with "simple-pm-bus" and we could drop
> the renesas,bsc bindings? This probably is a separate issue, though.

You can have DT bindings without a (full) driver.

Probably the other (L)BSC variants could be extended with a register
block and interrupts, too, but so far we didn't have a need to
describe them fully.

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/renesas/r7s72100.dtsi b/arch/arm/boot/dts/renesas/r7s72100.dtsi
index 07ffd9ec96cc..a460a9092c43 100644
--- a/arch/arm/boot/dts/renesas/r7s72100.dtsi
+++ b/arch/arm/boot/dts/renesas/r7s72100.dtsi
@@ -36,7 +36,7 @@  b_clk: b {
 		clock-div = <3>;
 	};
 
-	bsc: bsc {
+	bsc: bus@3fffc000 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
diff --git a/arch/arm/boot/dts/renesas/r8a7778.dtsi b/arch/arm/boot/dts/renesas/r8a7778.dtsi
index b80e832c9277..ab0b76eacd3c 100644
--- a/arch/arm/boot/dts/renesas/r8a7778.dtsi
+++ b/arch/arm/boot/dts/renesas/r8a7778.dtsi
@@ -40,7 +40,7 @@  aliases {
 		spi2 = &hspi2;
 	};
 
-	bsc: bus@1c000000 {
+	bsc: bus@ff800000 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
diff --git a/arch/arm/boot/dts/renesas/r8a7779.dtsi b/arch/arm/boot/dts/renesas/r8a7779.dtsi
index 1944703cba4f..3c5746dbe639 100644
--- a/arch/arm/boot/dts/renesas/r8a7779.dtsi
+++ b/arch/arm/boot/dts/renesas/r8a7779.dtsi
@@ -704,7 +704,7 @@  R8A7779_CLK_MMC1 R8A7779_CLK_MMC0
 		};
 	};
 
-	lbsc: lbsc {
+	lbsc: bus@ff800000 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
diff --git a/arch/arm/boot/dts/renesas/r8a7792.dtsi b/arch/arm/boot/dts/renesas/r8a7792.dtsi
index dd3bc32668b7..471a2913e51e 100644
--- a/arch/arm/boot/dts/renesas/r8a7792.dtsi
+++ b/arch/arm/boot/dts/renesas/r8a7792.dtsi
@@ -84,7 +84,7 @@  extal_clk: extal {
 		clock-frequency = <0>;
 	};
 
-	lbsc: lbsc {
+	lbsc: bus@fec00000 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;