diff mbox series

[v4,13/16] dt-bindings: ufs: exynos-ufs: add io-coherency property

Message ID 20211007080934.108804-14-chanho61.park@samsung.com (mailing list archive)
State Not Applicable
Headers show
Series introduce exynosauto v9 ufs driver | expand

Commit Message

Chanho Park Oct. 7, 2021, 8:09 a.m. UTC
Add "samsung,sysreg" regmap and the offset to the ufs shareaibility
register for setting io coherency of the samsung ufs. "dma-coherent"
property is also required because the driver code needs to know.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
 .../devicetree/bindings/ufs/samsung,exynos-ufs.yaml   | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Rob Herring Oct. 15, 2021, 1:50 p.m. UTC | #1
On Thu, Oct 07, 2021 at 05:09:31PM +0900, Chanho Park wrote:
> Add "samsung,sysreg" regmap and the offset to the ufs shareaibility
> register for setting io coherency of the samsung ufs. "dma-coherent"
> property is also required because the driver code needs to know.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
>  .../devicetree/bindings/ufs/samsung,exynos-ufs.yaml   | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
> index b9ca8ef4f2be..d9b7535b872f 100644
> --- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
> +++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
> @@ -54,6 +54,17 @@ properties:
>    phy-names:
>      const: ufs-phy
>  
> +  samsung,sysreg:
> +    $ref: '/schemas/types.yaml#/definitions/phandle'
> +    description: phandle for FSYSx sysreg interface, used to control
> +                 sysreg register bit for UFS IO Coherency
> +
> +  samsung,ufs-shareability-reg-offset:
> +    $ref: '/schemas/types.yaml#/definitions/uint32'
> +    description: Offset to the shareability register for io-coherency

Make these a single property: <phandle offset>

> +
> +  dma-coherent: true
> +
>  required:
>    - compatible
>    - reg
> -- 
> 2.33.0
> 
>
Chanho Park Oct. 18, 2021, 12:26 a.m. UTC | #2
> > +  samsung,sysreg:
> > +    $ref: '/schemas/types.yaml#/definitions/phandle'
> > +    description: phandle for FSYSx sysreg interface, used to control
> > +                 sysreg register bit for UFS IO Coherency
> > +
> > +  samsung,ufs-shareability-reg-offset:
> > +    $ref: '/schemas/types.yaml#/definitions/uint32'
> > +    description: Offset to the shareability register for io-coherency
> 
> Make these a single property: <phandle offset>

As I already mentioned previous e-mail [1], I need to support two ufs
instances for exynosauto v9 soc.

syscon_fsys2: syscon@17c20000 {
	compatible = "samsung,exynosautov9-sysreg", "syscon";
	reg = <0x17c20000 0x1000>;
};

ufs_0: ufs0@17e00000 {
	<snip>
	samsung,sysreg = <&syscon_fsys2>;
	samsung,ufs-shareability-reg-offset = <0x710>;
};

To be added ufs_1 like below
ufs_1: ufs0@17f00000 {
	<snip>
	samsung,sysreg = <&syscon_fsys2>;
	samsung,ufs-shareability-reg-offset = <0x714>;
};

[1]:
https://lore.kernel.org/linux-scsi/000901d7b0e0$e618b220$b24a1660$@samsung.c
om/

If you prefer them to be separated sysreg phandles which directly pointing
the register, I'm able to change it.
But, the syscon_fsys2 can be used for other IPs as well such as ethernet.

Best Regards,
Chanho Park
Chanho Park Oct. 18, 2021, 11:07 a.m. UTC | #3
> > > +  samsung,sysreg:
> > > +    $ref: '/schemas/types.yaml#/definitions/phandle'
> > > +    description: phandle for FSYSx sysreg interface, used to control
> > > +                 sysreg register bit for UFS IO Coherency
> > > +
> > > +  samsung,ufs-shareability-reg-offset:
> > > +    $ref: '/schemas/types.yaml#/definitions/uint32'
> > > +    description: Offset to the shareability register for
> > > + io-coherency
> >
> > Make these a single property: <phandle offset>
> 
> As I already mentioned previous e-mail [1], I need to support two ufs
> instances for exynosauto v9 soc.
> 
> syscon_fsys2: syscon@17c20000 {
> 	compatible = "samsung,exynosautov9-sysreg", "syscon";
> 	reg = <0x17c20000 0x1000>;
> };
> 
> ufs_0: ufs0@17e00000 {
> 	<snip>
> 	samsung,sysreg = <&syscon_fsys2>;
> 	samsung,ufs-shareability-reg-offset = <0x710>; };
> 
> To be added ufs_1 like below
> ufs_1: ufs0@17f00000 {
> 	<snip>
> 	samsung,sysreg = <&syscon_fsys2>;
> 	samsung,ufs-shareability-reg-offset = <0x714>; };
> 
> [1]: https://lore.kernel.org/linux-
> scsi/000901d7b0e0$e618b220$b24a1660$@samsung.com/
> 
> If you prefer them to be separated sysreg phandles which directly pointing
> the register, I'm able to change it.
> But, the syscon_fsys2 can be used for other IPs as well such as ethernet.

Finally, I got your point. You want me to drop
"samsung,ufs-shareability-reg-offset" and put the offset like below.

ufs_0: ufs0@17e00000 {
 	<snip>
 	samsung,sysreg = <&syscon_fsys2 0x710>;

To be added ufs_1 like below
ufs_1: ufs0@17f00000 {
 	<snip>
 	samsung,sysreg = <&syscon_fsys2 0x714>;

I'll resend the patch with your suggestion.

Krzysztof, could you please hold below on? Or Do I need to make an
additional patch?
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git/commit/?h=nex
t/dt64&id=31bbac5263aa63dfc8bfed2180bb6a5a3c531681

Best Regards,
Chanho Park
Rob Herring Oct. 18, 2021, 1:23 p.m. UTC | #4
On Sun, Oct 17, 2021 at 7:27 PM Chanho Park <chanho61.park@samsung.com> wrote:
>
> > > +  samsung,sysreg:
> > > +    $ref: '/schemas/types.yaml#/definitions/phandle'
> > > +    description: phandle for FSYSx sysreg interface, used to control
> > > +                 sysreg register bit for UFS IO Coherency
> > > +
> > > +  samsung,ufs-shareability-reg-offset:
> > > +    $ref: '/schemas/types.yaml#/definitions/uint32'
> > > +    description: Offset to the shareability register for io-coherency
> >
> > Make these a single property: <phandle offset>
>
> As I already mentioned previous e-mail [1], I need to support two ufs
> instances for exynosauto v9 soc.

Don't expect me to remember. That was 100s of reviews ago.

>
> syscon_fsys2: syscon@17c20000 {
>         compatible = "samsung,exynosautov9-sysreg", "syscon";
>         reg = <0x17c20000 0x1000>;
> };
>
> ufs_0: ufs0@17e00000 {
>         <snip>
>         samsung,sysreg = <&syscon_fsys2>;
>         samsung,ufs-shareability-reg-offset = <0x710>;

samsung,ufs-shareability-reg = <&syscon_fsys2 0x710>;

> };
>
> To be added ufs_1 like below
> ufs_1: ufs0@17f00000 {
>         <snip>
>         samsung,sysreg = <&syscon_fsys2>;
>         samsung,ufs-shareability-reg-offset = <0x714>;

samsung,ufs-shareability-reg = <&syscon_fsys2 0x714>;

I still don't see what's the problem?

> };
>
> [1]:
> https://lore.kernel.org/linux-scsi/000901d7b0e0$e618b220$b24a1660$@samsung.c
> om/
>
> If you prefer them to be separated sysreg phandles which directly pointing
> the register, I'm able to change it.
> But, the syscon_fsys2 can be used for other IPs as well such as ethernet.
>
> Best Regards,
> Chanho Park
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
index b9ca8ef4f2be..d9b7535b872f 100644
--- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
@@ -54,6 +54,17 @@  properties:
   phy-names:
     const: ufs-phy
 
+  samsung,sysreg:
+    $ref: '/schemas/types.yaml#/definitions/phandle'
+    description: phandle for FSYSx sysreg interface, used to control
+                 sysreg register bit for UFS IO Coherency
+
+  samsung,ufs-shareability-reg-offset:
+    $ref: '/schemas/types.yaml#/definitions/uint32'
+    description: Offset to the shareability register for io-coherency
+
+  dma-coherent: true
+
 required:
   - compatible
   - reg