* [PATCH v3 05/17] dt-bindings: ufs: exynos-ufs: add sysreg regmap property
[not found] ` <CGME20210917065523epcas2p3ff66daa15c8c782f839422756c388d93@epcas2p3.samsung.com>
@ 2021-09-17 6:54 ` Chanho Park
2021-09-22 19:57 ` Rob Herring
0 siblings, 1 reply; 7+ messages in thread
From: Chanho Park @ 2021-09-17 6:54 UTC (permalink / raw)
To: Alim Akhtar, Avri Altman, James E . J . Bottomley,
Martin K . Petersen, Krzysztof Kozlowski
Cc: Bean Huo, Bart Van Assche, Adrian Hunter, Christoph Hellwig,
Can Guo, Jaegeuk Kim, Gyunghoon Kwon, linux-samsung-soc,
linux-scsi, Chanho Park, Rob Herring, devicetree
Add "sysreg" regmap phandle property to control io coherency setting.
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 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
index b9ca8ef4f2be..c3f14f81d4b7 100644
--- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
@@ -54,6 +54,11 @@ properties:
phy-names:
const: ufs-phy
+ sysreg:
+ $ref: '/schemas/types.yaml#/definitions/phandle'
+ description: phandle for FSYS sysreg interface, used to control
+ sysreg register bit for UFS IO Coherency
+
required:
- compatible
- reg
--
2.33.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 17/17] dt-bindings: ufs: exynos-ufs: add exynosautov9 compatible
[not found] ` <CGME20210917065524epcas2p455b2900227b6a20994bec4816248f2bf@epcas2p4.samsung.com>
@ 2021-09-17 6:54 ` Chanho Park
2021-09-22 19:58 ` Rob Herring
0 siblings, 1 reply; 7+ messages in thread
From: Chanho Park @ 2021-09-17 6:54 UTC (permalink / raw)
To: Alim Akhtar, Avri Altman, James E . J . Bottomley,
Martin K . Petersen, Krzysztof Kozlowski
Cc: Bean Huo, Bart Van Assche, Adrian Hunter, Christoph Hellwig,
Can Guo, Jaegeuk Kim, Gyunghoon Kwon, linux-samsung-soc,
linux-scsi, Chanho Park, Rob Herring, devicetree
Below two compatibles can be used for exynosautov9 SoC UFS controller.
- samsung,exynosautov9-ufs: ExynosAutov9 UFS Physical Host
- samsung,exynosautov9-ufs-vh: ExynosAutov9 UFS Virtual Host
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
index c3f14f81d4b7..832f0770433e 100644
--- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
@@ -20,6 +20,8 @@ properties:
compatible:
enum:
- samsung,exynos7-ufs
+ - samsung,exynosautov9-ufs
+ - samsung,exynosautov9-ufs-vh
reg:
items:
--
2.33.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 05/17] dt-bindings: ufs: exynos-ufs: add sysreg regmap property
2021-09-17 6:54 ` [PATCH v3 05/17] dt-bindings: ufs: exynos-ufs: add sysreg regmap property Chanho Park
@ 2021-09-22 19:57 ` Rob Herring
2021-09-23 0:47 ` Chanho Park
0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2021-09-22 19:57 UTC (permalink / raw)
To: Chanho Park
Cc: Alim Akhtar, Avri Altman, James E . J . Bottomley,
Martin K . Petersen, Krzysztof Kozlowski, Bean Huo,
Bart Van Assche, Adrian Hunter, Christoph Hellwig, Can Guo,
Jaegeuk Kim, Gyunghoon Kwon, linux-samsung-soc, linux-scsi,
devicetree
On Fri, Sep 17, 2021 at 03:54:24PM +0900, Chanho Park wrote:
> Add "sysreg" regmap phandle property to control io coherency setting.
>
> 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 | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
> index b9ca8ef4f2be..c3f14f81d4b7 100644
> --- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
> +++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
> @@ -54,6 +54,11 @@ properties:
> phy-names:
> const: ufs-phy
>
> + sysreg:
Needs a vendor prefix.
> + $ref: '/schemas/types.yaml#/definitions/phandle'
> + description: phandle for FSYS sysreg interface, used to control
> + sysreg register bit for UFS IO Coherency
Is there more than 1 FSYS? If not, you can just get the node by its
compatible.
Also, what about 'dma-coherent' property? The driver core needs to know.
> +
> required:
> - compatible
> - reg
> --
> 2.33.0
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 17/17] dt-bindings: ufs: exynos-ufs: add exynosautov9 compatible
2021-09-17 6:54 ` [PATCH v3 17/17] dt-bindings: ufs: exynos-ufs: add exynosautov9 compatible Chanho Park
@ 2021-09-22 19:58 ` Rob Herring
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2021-09-22 19:58 UTC (permalink / raw)
To: Chanho Park
Cc: devicetree, Bean Huo, James E . J . Bottomley, Avri Altman,
Christoph Hellwig, Gyunghoon Kwon, Rob Herring, Bart Van Assche,
Jaegeuk Kim, Krzysztof Kozlowski, Alim Akhtar, linux-scsi,
Can Guo, Adrian Hunter, linux-samsung-soc, Martin K . Petersen
On Fri, 17 Sep 2021 15:54:36 +0900, Chanho Park wrote:
> Below two compatibles can be used for exynosautov9 SoC UFS controller.
>
> - samsung,exynosautov9-ufs: ExynosAutov9 UFS Physical Host
> - samsung,exynosautov9-ufs-vh: ExynosAutov9 UFS Virtual Host
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
> Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v3 05/17] dt-bindings: ufs: exynos-ufs: add sysreg regmap property
2021-09-22 19:57 ` Rob Herring
@ 2021-09-23 0:47 ` Chanho Park
2021-09-23 12:39 ` Rob Herring
0 siblings, 1 reply; 7+ messages in thread
From: Chanho Park @ 2021-09-23 0:47 UTC (permalink / raw)
To: 'Rob Herring'
Cc: 'Alim Akhtar', 'Avri Altman',
'James E . J . Bottomley', 'Martin K . Petersen',
'Krzysztof Kozlowski', 'Bean Huo',
'Bart Van Assche', 'Adrian Hunter',
'Christoph Hellwig', 'Can Guo',
'Jaegeuk Kim', 'Gyunghoon Kwon',
linux-samsung-soc, linux-scsi, devicetree
> > + sysreg:
>
> Needs a vendor prefix.
Thanks. I'll use "samsung,sysreg-phandle".
>
> > + $ref: '/schemas/types.yaml#/definitions/phandle'
> > + description: phandle for FSYS sysreg interface, used to control
> > + sysreg register bit for UFS IO Coherency
>
> Is there more than 1 FSYS? If not, you can just get the node by its
> compatible.
The phandle can be differed each exynos SoCs, AFAIK. I think other exynos
SoCs since exnos7 will need this but not upstreamed yet...
>
> Also, what about 'dma-coherent' property? The driver core needs to know.
Yes. 'dma-coherent' should be listed as well.
Best Regards,
Chanho Park
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 05/17] dt-bindings: ufs: exynos-ufs: add sysreg regmap property
2021-09-23 0:47 ` Chanho Park
@ 2021-09-23 12:39 ` Rob Herring
2021-09-24 1:10 ` Chanho Park
0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2021-09-23 12:39 UTC (permalink / raw)
To: Chanho Park
Cc: 'Alim Akhtar', 'Avri Altman',
'James E . J . Bottomley', 'Martin K . Petersen',
'Krzysztof Kozlowski', 'Bean Huo',
'Bart Van Assche', 'Adrian Hunter',
'Christoph Hellwig', 'Can Guo',
'Jaegeuk Kim', 'Gyunghoon Kwon',
linux-samsung-soc, linux-scsi, devicetree
On Thu, Sep 23, 2021 at 09:47:44AM +0900, Chanho Park wrote:
> > > + sysreg:
> >
> > Needs a vendor prefix.
>
> Thanks. I'll use "samsung,sysreg-phandle".
No '-phandle'.
>
> >
> > > + $ref: '/schemas/types.yaml#/definitions/phandle'
> > > + description: phandle for FSYS sysreg interface, used to control
> > > + sysreg register bit for UFS IO Coherency
> >
> > Is there more than 1 FSYS? If not, you can just get the node by its
> > compatible.
>
> The phandle can be differed each exynos SoCs, AFAIK. I think other exynos
> SoCs since exnos7 will need this but not upstreamed yet...
That's still fine. You really only need a phandle if there is more than
1 instance on a given platform.
Of course you could end up with multiple compatible strings to deal
with, but you might need that anyway as the registers are likely to be
different. That can sometimes be mitigated by putting register offsets
into the DT property (something to consider here). This is the problem
with drivers directly twiddling bits in other h/w blocks and why we
have common interfaces for clocks, resets, etc.
I leave it to you to decide how you want to do it.
BTW, If you want to see another way to handle the same problem, see
highbank_platform_notifier(). Notifiers aren't great either, but it
keeps some SoC specifics out of the driver.
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v3 05/17] dt-bindings: ufs: exynos-ufs: add sysreg regmap property
2021-09-23 12:39 ` Rob Herring
@ 2021-09-24 1:10 ` Chanho Park
0 siblings, 0 replies; 7+ messages in thread
From: Chanho Park @ 2021-09-24 1:10 UTC (permalink / raw)
To: 'Rob Herring'
Cc: 'Alim Akhtar', 'Avri Altman',
'James E . J . Bottomley', 'Martin K . Petersen',
'Krzysztof Kozlowski', 'Bean Huo',
'Bart Van Assche', 'Adrian Hunter',
'Christoph Hellwig', 'Can Guo',
'Jaegeuk Kim', 'Gyunghoon Kwon',
linux-samsung-soc, linux-scsi, devicetree
> > > > + sysreg:
> > >
> > > Needs a vendor prefix.
> >
> > Thanks. I'll use "samsung,sysreg-phandle".
>
> No '-phandle'.
Will use "samsung,sysreg" next patch series.
>
> >
> > >
> > > > + $ref: '/schemas/types.yaml#/definitions/phandle'
> > > > + description: phandle for FSYS sysreg interface, used to control
> > > > + sysreg register bit for UFS IO Coherency
> > >
> > > Is there more than 1 FSYS? If not, you can just get the node by its
> > > compatible.
> >
> > The phandle can be differed each exynos SoCs, AFAIK. I think other
> > exynos SoCs since exnos7 will need this but not upstreamed yet...
>
> That's still fine. You really only need a phandle if there is more than
> 1 instance on a given platform.
>
> Of course you could end up with multiple compatible strings to deal with,
> but you might need that anyway as the registers are likely to be
different.
> That can sometimes be mitigated by putting register offsets into the DT
> property (something to consider here). This is the problem with drivers
> directly twiddling bits in other h/w blocks and why we have common
> interfaces for clocks, resets, etc.
Regarding ufs-exynos, it can have multiple instances (ufs_0/1/22). I'm also
preparing to support ufs_1 for exynosautov9 SoC but not yet finished due to
ufs phy control. Each instances has their own sysreg offset. To support
secondary ufs, I need to rework this patch and add the offset field as DT
propery.
+#define UFS_SHAREABILITY_OFFSET 0x710
For UFS1, this should be 0x714.
>
> I leave it to you to decide how you want to do it.
>
> BTW, If you want to see another way to handle the same problem, see
> highbank_platform_notifier(). Notifiers aren't great either, but it keeps
> some SoC specifics out of the driver.
>
I checked highbank_platform_notifier() implementation but I need to keep
this way to have further support multiple ufs instances and can be used for
exynos8/9 SoCs as well.
Best Regards,
Chanho Park
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-09-24 1:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210917065436.145629-1-chanho61.park@samsung.com>
[not found] ` <CGME20210917065523epcas2p3ff66daa15c8c782f839422756c388d93@epcas2p3.samsung.com>
2021-09-17 6:54 ` [PATCH v3 05/17] dt-bindings: ufs: exynos-ufs: add sysreg regmap property Chanho Park
2021-09-22 19:57 ` Rob Herring
2021-09-23 0:47 ` Chanho Park
2021-09-23 12:39 ` Rob Herring
2021-09-24 1:10 ` Chanho Park
[not found] ` <CGME20210917065524epcas2p455b2900227b6a20994bec4816248f2bf@epcas2p4.samsung.com>
2021-09-17 6:54 ` [PATCH v3 17/17] dt-bindings: ufs: exynos-ufs: add exynosautov9 compatible Chanho Park
2021-09-22 19:58 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).