arm64: dts: r8a77965: add I2C support
Subsystems (2)
--- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 99 ++++++++++++++++++++--- 1 file changed, 90 insertions(+), 9 deletions(-)
Hi Simon,
I have only tested i2c4 and the adv7482 which is connected there. But it seemed silly to post this patch without enable all i2c as they are according to the datasheet are the same as on H3 and M3-W.
// Niklas
arch/arm64/boot/dts/renesas/r8a77965.dtsi +90 -9
@@ -20,6 +20,13 @@ #size-cells = <2>; aliases { + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; + i2c3 = &i2c3; + i2c4 = &i2c4; + i2c5 = &i2c5; + i2c6 = &i2c6; i2c7 = &i2c_dvfs; };
@@ -314,44 +321,118 @@ }; i2c0: i2c@e6500000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a77965", + "renesas,rcar-gen3-i2c"; reg = <0 0xe6500000 0 0x40>; - /* placeholder */ + interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 931>; + power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; + resets = <&cpg 931>; + dmas = <&dmac1 0x91>, <&dmac1 0x90>, + <&dmac2 0x91>, <&dmac2 0x90>; + dma-names = "tx", "rx", "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + status = "disabled"; }; i2c1: i2c@e6508000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a77965", + "renesas,rcar-gen3-i2c"; reg = <0 0xe6508000 0 0x40>; - /* placeholder */ + interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 930>; + power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; + resets = <&cpg 930>; + dmas = <&dmac1 0x93>, <&dmac1 0x92>, + <&dmac2 0x93>, <&dmac2 0x92>; + dma-names = "tx", "rx", "tx", "rx"; + i2c-scl-internal-delay-ns = <6>; + status = "disabled"; }; i2c2: i2c@e6510000 { #address-cells = <1>; #size-cells = <0>; - + compatible = "renesas,i2c-r8a77965", + "renesas,rcar-gen3-i2c"; reg = <0 0xe6510000 0 0x40>; - /* placeholder */ + interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 929>; + power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; + resets = <&cpg 929>; + dmas = <&dmac1 0x95>, <&dmac1 0x94>, + <&dmac2 0x95>, <&dmac2 0x94>; + dma-names = "tx", "rx", "tx", "rx"; + i2c-scl-internal-delay-ns = <6>; + status = "disabled"; }; i2c3: i2c@e66d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a77965", + "renesas,rcar-gen3-i2c"; reg = <0 0xe66d0000 0 0x40>; - /* placeholder */ + interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 928>; + power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; + resets = <&cpg 928>; + dmas = <&dmac0 0x97>, <&dmac0 0x96>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + status = "disabled"; }; i2c4: i2c@e66d8000 { #address-cells = <1>; #size-cells = <0>; - + compatible = "renesas,i2c-r8a77965", + "renesas,rcar-gen3-i2c"; reg = <0 0xe66d8000 0 0x40>; - /* placeholder */ + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 927>; + power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; + resets = <&cpg 927>; + dmas = <&dmac0 0x99>, <&dmac0 0x98>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + status = "disabled"; }; i2c5: i2c@e66e0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a77965", + "renesas,rcar-gen3-i2c"; reg = <0 0xe66e0000 0 0x40>; - /* placeholder */ + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 919>; + power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; + resets = <&cpg 919>; + dmas = <&dmac0 0x9b>, <&dmac0 0x9a>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + status = "disabled"; }; i2c6: i2c@e66e8000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a77965", + "renesas,rcar-gen3-i2c"; reg = <0 0xe66e8000 0 0x40>; - /* placeholder */ + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 918>; + power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; + resets = <&cpg 918>; + dmas = <&dmac0 0x9d>, <&dmac0 0x9c>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <6>; + status = "disabled"; }; i2c_dvfs: i2c@e60b0000 {
Signature · 1 line
2.17.0
Quoted 10 lines · Niklas Söderlund
Signed-off-by Niklas Söderlund <[email protected]>--- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 99 ++++++++++++++++++++--- 1 file changed, 90 insertions(+), 9 deletions(-)Hi Simon,
I have only tested i2c4 and the adv7482 which is connected there. But it seemed silly to post this patch without enable all i2c as they are according to the datasheet are the same as on H3 and M3-W.
Thanks Niklas,
I agree this makes sense. Do we have any way to test those nodes? If not I'm inclined to accept the patch without testing.
Hi Simon,
Quoted 8 lines · Simon Horman
Quoted 7 lines · Niklas S�derlund
Signed-off-by Niklas S�derlund <[email protected]>--- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 99 ++++++++++++++++++++--- 1 file changed, 90 insertions(+), 9 deletions(-)Hi Simon,
Quoted 7 lines
Quoted 3 lines
I have only tested i2c4 and the adv7482 which is connected there. But it seemed silly to post this patch without enable all i2c as they are according to the datasheet are the same as on H3 and M3-W.
Thanks Niklas,
I agree this makes sense. Do we have any way to test those nodes?
Looking at the DT for M3-N the i2c busses used are i2c2 and i2c4. I already verified i2c4 and for i2c2 it turned out some PFC parts where missing, I just sent a patch for that [1]. Using that patch i2c2 also successfully finds the devices described in DT.
Quoted 1 line
If not I'm inclined to accept the patch without testing.
I also think it would be OK for you to pickup this patch without testing all the buses.
1. [PATCH] pinctrl: sh-pfc: r8a77965: Add I2C pin support
Signature · 2 lines
Regards, Niklas S�derlund
Simon Horman
AppliedQuoted 24 lines · Niklas Söderlund
Hi Simon,
Quoted 8 lines · Simon Horman
Quoted 7 lines · Niklas Söderlund
Signed-off-by Niklas Söderlund <[email protected]>--- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 99 ++++++++++++++++++++--- 1 file changed, 90 insertions(+), 9 deletions(-)Hi Simon,
Quoted 7 lines
Quoted 3 lines
I have only tested i2c4 and the adv7482 which is connected there. But it seemed silly to post this patch without enable all i2c as they are according to the datasheet are the same as on H3 and M3-W.
Thanks Niklas,
I agree this makes sense. Do we have any way to test those nodes?
Looking at the DT for M3-N the i2c busses used are i2c2 and i2c4. I already verified i2c4 and for i2c2 it turned out some PFC parts where missing, I just sent a patch for that [1]. Using that patch i2c2 also successfully finds the devices described in DT.
Quoted 6 lines
Quoted 1 line
If not I'm inclined to accept the patch without testing.
I also think it would be OK for you to pickup this patch without testing all the buses.
1. [PATCH] pinctrl: sh-pfc: r8a77965: Add I2C pin support
Thanks, applied.