Skip to contentSkip to conversation

arm64: dts: r8a77990-ebisu: small fixes for VIN

PATCH Applied Niklas Söderlund 5 participants 12 messages Feb 16, 2019 – Mar 6, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: r8a77990-ebisu: small fixes for VIN

Hi,

This series corrects two minor issues in the Ebisu's device tree related to video capture. 1/2 aligns how other Renesas device trees represent register addresses for the ports in the adv7482 node while 2/2 enables VIN5 which is usable on the SoC but was disabled.

Patches are only compile tested and verified using the datasheets/schematics as I have no access to boards to test them on.

Takeshi Kihara (2):
arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address
arm64: dts: r8a77990-ebisu: Enable VIN5

 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/2 arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address

From: Takeshi Kihara <[email protected]>

The register address used for the reg property of the adv7482 node in other Renesas device trees are decimal not hex, change this for Ebisu to align it with the others.

[Niklas: rewrite commit message]
---
 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +1 -1
index 62bdddcbbae7d9e9..23914c2b83965621 100644
@@ -383,7 +383,7 @@
 		};
 
 		port@a {
-			reg = <0xa>;
+			reg = <10>;
 
 			adv7482_txa: endpoint {
 				clock-lanes = <0>;
Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH 1/2] arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address

Hi Niklas, Takeshi,

Quoted 18 lines · Niklas Söderlund

From: Takeshi Kihara <[email protected]>

The register address used for the reg property of the adv7482 node in other Renesas device trees are decimal not hex, change this for Ebisu to align it with the others.

[Niklas: rewrite commit message]
---
 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +0 -0
index 62bdddcbbae7d9e9..23914c2b83965621 100644

arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts line 386

Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +1 -1
@@ -383,7 +383,7 @@
 		};
 
 		port@a {
-			reg = <0xa>;
+			reg = <10>;

From the discussions on this before, we converted the port number to be hex.

I really dislike that we have port@a, but reg=<10>;

However as long as the value is written by the DTC as 'ten' and correctly interpreted as decimal this is still correct.

I guess it doesn't hurt to have a decimal representation as that will then match the bindings port descriptions. It's a shame this can't be the 'port@10' for comprehension though.

My only hesitation on providing either an RB/or AB tag here is whether perhaps we should instead convert the salvator-common to use hex so that they match that way instead?

--
Regards

Kieran

Quoted 4 lines
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +0 -0
 			adv7482_txa: endpoint {
 				clock-lanes = <0>;
 
Signature · 3 lines
Regards
--
Kieran
#3 lore raw

Re: [PATCH 1/2] arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address

Hi Kieran,

Quoted 32 lines · Kieran Bingham
Quoted 18 lines · Niklas Söderlund

From: Takeshi Kihara <[email protected]>

The register address used for the reg property of the adv7482 node in other Renesas device trees are decimal not hex, change this for Ebisu to align it with the others.

[Niklas: rewrite commit message]
---
 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +0 -0
index 62bdddcbbae7d9e9..23914c2b83965621 100644

arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts line 386

Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +1 -1
@@ -383,7 +383,7 @@
              };
 
              port@a {
-                     reg = <0xa>;
+                     reg = <10>;

From the discussions on this before, we converted the port number to be hex.

I really dislike that we have port@a, but reg=<10>;

However as long as the value is written by the DTC as 'ten' and correctly interpreted as decimal this is still correct.

Quoted 7 lines

I guess it doesn't hurt to have a decimal representation as that will then match the bindings port descriptions. It's a shame this can't be the 'port@10' for comprehension though.

My only hesitation on providing either an RB/or AB tag here is whether perhaps we should instead convert the salvator-common to use hex so that they match that way instead?

(More rationale, which may be considered bikeshedding ;-)

I believe we tend to use decimal for small numbers, and hex for large numbers. Exceptions are values where the meaning of the individual bits is important, and hex is thus more suitable (e.g. rohm,ddr-backup-power = <0xf>).

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#4 lore raw

Re: [PATCH 1/2] arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address

Hi Geert,

Quoted 40 lines · Geert Uytterhoeven

Hi Kieran,

Quoted 36 lines · Kieran Bingham
Quoted 18 lines · Niklas Söderlund

From: Takeshi Kihara <[email protected]>

The register address used for the reg property of the adv7482 node in other Renesas device trees are decimal not hex, change this for Ebisu to align it with the others.

[Niklas: rewrite commit message]
---
 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +0 -0
index 62bdddcbbae7d9e9..23914c2b83965621 100644

arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts line 386

Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +1 -1
@@ -383,7 +383,7 @@
              };
 
              port@a {
-                     reg = <0xa>;
+                     reg = <10>;

From the discussions on this before, we converted the port number to be hex.

I really dislike that we have port@a, but reg=<10>;

However as long as the value is written by the DTC as 'ten' and correctly interpreted as decimal this is still correct.

I guess it doesn't hurt to have a decimal representation as that will then match the bindings port descriptions. It's a shame this can't be the 'port@10' for comprehension though.

Quoted 5 lines
Quoted 3 lines

My only hesitation on providing either an RB/or AB tag here is whether perhaps we should instead convert the salvator-common to use hex so that they match that way instead?

(More rationale, which may be considered bikeshedding ;-)

All input here is helpful :)

Quoted 3 lines

I believe we tend to use decimal for small numbers, and hex for large numbers. Exceptions are values where the meaning of the individual bits is important, and hex is thus more suitable (e.g. rohm,ddr-backup-power = <0xf>).

I believe without the 0x prefix in the reg <> the value is taken as decimal, so keeping decimal will still function correctly.

I think my issue only stems from the fact that the @N value is 'hex' without the prefix which causes the difference.

I'll stop fussing over this. The value is interpreted correctly, and as I said above - having a place where the port number is listed in decimal helps to match to the bindings table. It's just not in the place I'd like it to be - but I have no control over that.

So, lets get this patch in and at least unify the current users ...

Quoted 4 lines

Gr{oetje,eeting}s,

Geert

Signature · 3 lines
Regards
--
Kieran
Applied
#5 lore raw

Re: [PATCH 1/2] arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address

Quoted 63 lines · Kieran Bingham

Hi Geert,

Quoted 40 lines · Geert Uytterhoeven

Hi Kieran,

Quoted 36 lines · Kieran Bingham
Quoted 18 lines · Niklas Söderlund

From: Takeshi Kihara <[email protected]>

The register address used for the reg property of the adv7482 node in other Renesas device trees are decimal not hex, change this for Ebisu to align it with the others.

[Niklas: rewrite commit message]
---
 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +0 -0
index 62bdddcbbae7d9e9..23914c2b83965621 100644

arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts line 386

Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +1 -1
@@ -383,7 +383,7 @@
              };
 
              port@a {
-                     reg = <0xa>;
+                     reg = <10>;

From the discussions on this before, we converted the port number to be hex.

I really dislike that we have port@a, but reg=<10>;

However as long as the value is written by the DTC as 'ten' and correctly interpreted as decimal this is still correct.

I guess it doesn't hurt to have a decimal representation as that will then match the bindings port descriptions. It's a shame this can't be the 'port@10' for comprehension though.

Quoted 5 lines
Quoted 3 lines

My only hesitation on providing either an RB/or AB tag here is whether perhaps we should instead convert the salvator-common to use hex so that they match that way instead?

(More rationale, which may be considered bikeshedding ;-)

All input here is helpful :)

Quoted 3 lines

I believe we tend to use decimal for small numbers, and hex for large numbers. Exceptions are values where the meaning of the individual bits is important, and hex is thus more suitable (e.g. rohm,ddr-backup-power = <0xf>).

I believe without the 0x prefix in the reg <> the value is taken as decimal, so keeping decimal will still function correctly.

I think my issue only stems from the fact that the @N value is 'hex' without the prefix which causes the difference.

Quoted 8 lines

I'll stop fussing over this. The value is interpreted correctly, and as I said above - having a place where the port number is listed in decimal helps to match to the bindings table. It's just not in the place I'd like it to be - but I have no control over that.

So, lets get this patch in and at least unify the current users ...

Thanks, applied with the subject prefix updated to

"arm64: dts: renesas: ebisu:"

#6 lore raw

Re: [PATCH 1/2] arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address

Hi Simon,

On 2019-02-25 11:09:54 +0100, Simon Horman wrote:
[snip]

Quoted 3 lines

Thanks, applied with the subject prefix updated to

"arm64: dts: renesas: ebisu:"

You took patch 1/2 from this series but not 2/2. Was that intentional?

Signature · 2 lines
Regards,
Niklas Söderlund
#7 lore raw

Re: [PATCH 1/2] arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address

Quoted 9 lines · Niklas Söderlund

Hi Simon,

On 2019-02-25 11:09:54 +0100, Simon Horman wrote:
[snip]

Quoted 3 lines

Thanks, applied with the subject prefix updated to

"arm64: dts: renesas: ebisu:"

You took patch 1/2 from this series but not 2/2. Was that intentional?

Thanks, that was an oversight. I now have 2/2 too.

#8 lore raw

Re: [PATCH 1/2] arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address

Quoted 5 lines · Simon Horman
Quoted 4 lines · Niklas Söderlund

Hi Simon,

On 2019-02-25 11:09:54 +0100, Simon Horman wrote:
[snip]

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Thanks, applied with the subject prefix updated to

"arm64: dts: renesas: ebisu:"

You took patch 1/2 from this series but not 2/2. Was that intentional?

Thanks, that was an oversight. I now have 2/2 too.

Thanks!

Signature · 2 lines
Regards,
Niklas Söderlund
#9 lore raw

PATCH 2/2 arm64: dts: r8a77990-ebisu: Enable VIN5

In reply to Niklas Söderlund

From: Takeshi Kihara <[email protected]>

Both VIN4 and VIN5 are connected to CSI40 and can be configured at runtime to use the single video source connected to CSI40. Enable VIN5 to allow it to be used in this fashion.

[Niklas: rewrite commit message]
---
 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +4 -0
index 23914c2b83965621..2c4d1cbe05acad37 100644
@@ -635,6 +635,10 @@
 	status = "okay";
 };
 
+&vin5 {
+	status = "okay";
+};
+
 &xhci0 {
 	pinctrl-0 = <&usb30_pins>;
 	pinctrl-names = "default";
Signature · 1 line
2.20.1
Reviewed-by on v1 2/2
#10 lore raw

Re: [PATCH 2/2] arm64: dts: r8a77990-ebisu: Enable VIN5

Hi Niklas, Takeshi,

Quoted 9 lines · Niklas Söderlund

From: Takeshi Kihara <[email protected]>

Both VIN4 and VIN5 are connected to CSI40 and can be configured at runtime to use the single video source connected to CSI40. Enable VIN5 to allow it to be used in this fashion.

[Niklas: rewrite commit message]
Quoted 20 lines
---
 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +4 -0
index 23914c2b83965621..2c4d1cbe05acad37 100644
@@ -635,6 +635,10 @@
 	status = "okay";
 };
 
+&vin5 {
+	status = "okay";
+};
+
 &xhci0 {
 	pinctrl-0 = <&usb30_pins>;
 	pinctrl-names = "default";
Signature · 3 lines
Regards
--
Kieran
#11 lore raw

Re: [PATCH 2/2] arm64: dts: r8a77990-ebisu: Enable VIN5

Quoted 9 lines · Kieran Bingham

Hi Niklas, Takeshi,

Quoted 6 lines · Niklas Söderlund

From: Takeshi Kihara <[email protected]>

Both VIN4 and VIN5 are connected to CSI40 and can be configured at runtime to use the single video source connected to CSI40. Enable VIN5 to allow it to be used in this fashion.

Quoted 5 lines
Quoted 3 lines
[Niklas: rewrite commit message]

Thanks,

applied for v5.2 with subject updated to:

arm64: dts: renesas: ebisu: Enable VIN5