Hi Greg,
Here is final set of nvmem patches for 5.18 which includes
- Add new Sunplus nvmem provider and bindings.
- fix in qfprom to increase blow timeout.
Can you please queue them up for 5.18.
thanks for you help,
srini
Knox Chiou (1):
nvmem: qfprom: Increase fuse blow timeout to prevent write fail
Vincent Shih (2):
nvmem: Add driver for OCOTP in Sunplus SP7021
dt-bindings: nvmem: Add bindings doc for Sunplus OCOTP driver
.../bindings/nvmem/sunplus,sp7021-ocotp.yaml | 86 +++++++
MAINTAINERS | 6 +
drivers/nvmem/Kconfig | 12 +
drivers/nvmem/Makefile | 2 +
drivers/nvmem/qfprom.c | 2 +-
drivers/nvmem/sunplus-ocotp.c | 228 ++++++++++++++++++
6 files changed, 335 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml
create mode 100644 drivers/nvmem/sunplus-ocotp.c
--
2.21.0
From: Vincent Shih <[email protected]>
Add bindings doc for Sunplus OCOTP driver
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Vincent Shih <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
---
.../bindings/nvmem/sunplus,sp7021-ocotp.yaml | 86 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 87 insertions(+)
create mode 100644 Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml
diff --git a/Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml
new file mode 100644
index 000000000000..4b28f37dfb67
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) Sunplus Co., Ltd. 2021
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/sunplus,sp7021-ocotp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: On-Chip OTP Memory for Sunplus SP7021
+
+maintainers:
+ - Vincent Shih <[email protected]>
+
+allOf:
+ - $ref: "nvmem.yaml#"
+
+properties:
+ compatible:
+ const: sunplus,sp7021-ocotp
+
+ reg:
+ maxItems: 2
+
+ reg-names:
+ items:
+ - const: hb_gpio
+ - const: otprx
+
+ clocks:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+ thermal-calibration:
+ type: object
+ description: thermal calibration values
+
+ disconnect-voltage:
+ type: object
+ description: disconnect voltages of usb2 port 0 and port 1
+
+ mac-address0:
+ type: object
+ description: MAC address of ethernet port 0
+
+ mac-address1:
+ type: object
+ description: MAC address of ethernet port 1
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/sp-sp7021.h>
+
+ otp: otp@9c00af00 {
+ compatible = "sunplus,sp7021-ocotp";
+ reg = <0x9c00af00 0x34>, <0x9c00af80 0x58>;
+ reg-names = "hb_gpio", "otprx";
+ clocks = <&clks OTPRX>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ therm_calib: thermal-calibration@14 {
+ reg = <0x14 0x3>;
+ };
+ disc_vol: disconnect-voltage@18 {
+ reg = <0x18 0x2>;
+ };
+ mac_addr0: mac-address0@34 {
+ reg = <0x34 0x6>;
+ };
+ mac_addr1: mac-address1@3a {
+ reg = <0x3a 0x6>;
+ };
+ };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 534772dfc3ef..507697a11838 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18494,6 +18494,7 @@ F: drivers/rtc/rtc-sunplus.c
SUNPLUS OCOTP DRIVER
M: Vincent Shih <[email protected]>
S: Maintained
+F: Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml
F: drivers/nvmem/sunplus-ocotp.c
SUPERH
--
2.21.0
From: Knox Chiou <[email protected]>
sc7180 blow fuses got slightly chances to hit qfprom_reg_write timeout.
Current timeout is simply too low. Since blowing fuses is a
very rare operation, so the risk associated with overestimating this
number is low.
Increase fuse blow timeout from 1ms to 10ms.
Signed-off-by: Knox Chiou <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
---
drivers/nvmem/qfprom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index 061293f9136b..162132c7dab9 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -22,7 +22,7 @@
/* Amount of time required to hold charge to blow fuse in micro-seconds */
#define QFPROM_FUSE_BLOW_POLL_US 100
-#define QFPROM_FUSE_BLOW_TIMEOUT_US 1000
+#define QFPROM_FUSE_BLOW_TIMEOUT_US 10000
#define QFPROM_BLOW_STATUS_OFFSET 0x048
#define QFPROM_BLOW_STATUS_BUSY 0x1
--
2.21.0
Hi Greg,
On 23/02/2022 22:34, Srinivas Kandagatla wrote:
> Hi Greg,
>
> Here is final set of nvmem patches for 5.18 which includes
>
> - Add new Sunplus nvmem provider and bindings.
> - fix in qfprom to increase blow timeout.
>
> Can you please queue them up for 5.18.
>
> thanks for you help,
> srini
>
> Knox Chiou (1):
> nvmem: qfprom: Increase fuse blow timeout to prevent write fail
>
> Vincent Shih (2):
> nvmem: Add driver for OCOTP in Sunplus SP7021
> dt-bindings: nvmem: Add bindings doc for Sunplus OCOTP driver
Sorry for inconvenience, but can you please ignore this set if you have
not already applied them.
There seems to be a issue with yaml file which fails dt-bindings check
and there are few more patches that can go for 5.18.
I will a send new set soon.
Thanks for your help
--srini
>
> .../bindings/nvmem/sunplus,sp7021-ocotp.yaml | 86 +++++++
> MAINTAINERS | 6 +
> drivers/nvmem/Kconfig | 12 +
> drivers/nvmem/Makefile | 2 +
> drivers/nvmem/qfprom.c | 2 +-
> drivers/nvmem/sunplus-ocotp.c | 228 ++++++++++++++++++
> 6 files changed, 335 insertions(+), 1 deletion(-)
> create mode 100644 Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml
> create mode 100644 drivers/nvmem/sunplus-ocotp.c
>
On Fri, Feb 25, 2022 at 11:17:47AM +0000, Srinivas Kandagatla wrote:
>
>
> On 25/02/2022 10:52, Srinivas Kandagatla wrote:
> > Hi Greg,
> >
> > On 23/02/2022 22:34, Srinivas Kandagatla wrote:
> > > Hi Greg,
> > >
> > > Here is final set of nvmem patches for 5.18 which includes
> > >
> > > - Add new Sunplus nvmem provider and bindings.
> > > - fix in qfprom to increase blow timeout.
> > >
> > > Can you please queue them up for 5.18.
> > >
> > > thanks for you help,
> > > srini
> > >
> > > Knox Chiou (1):
> > > ?? nvmem: qfprom: Increase fuse blow timeout to prevent write fail
> > >
> > > Vincent Shih (2):
> > > ?? nvmem: Add driver for OCOTP in Sunplus SP7021
> > > ?? dt-bindings: nvmem: Add bindings doc for Sunplus OCOTP driver
> >
> > Sorry for inconvenience, but can you please ignore this set if you have
> > not already applied them.
> >
> Opps, It looks like these were just applied.
>
> I can send other patches along with fix to yaml as next set, if that works
> for you?
Yes please.
On Fri, Feb 25, 2022 at 10:52:59AM +0000, Srinivas Kandagatla wrote:
> Hi Greg,
>
> On 23/02/2022 22:34, Srinivas Kandagatla wrote:
> > Hi Greg,
> >
> > Here is final set of nvmem patches for 5.18 which includes
> >
> > - Add new Sunplus nvmem provider and bindings.
> > - fix in qfprom to increase blow timeout.
> >
> > Can you please queue them up for 5.18.
> >
> > thanks for you help,
> > srini
> >
> > Knox Chiou (1):
> > nvmem: qfprom: Increase fuse blow timeout to prevent write fail
> >
> > Vincent Shih (2):
> > nvmem: Add driver for OCOTP in Sunplus SP7021
> > dt-bindings: nvmem: Add bindings doc for Sunplus OCOTP driver
>
> Sorry for inconvenience, but can you please ignore this set if you have not
> already applied them.
I already applied them :(
> There seems to be a issue with yaml file which fails dt-bindings check and
> there are few more patches that can go for 5.18.
>
> I will a send new set soon.
Send a fixup patch?
thanks,
greg k-h
On 25/02/2022 10:52, Srinivas Kandagatla wrote:
> Hi Greg,
>
> On 23/02/2022 22:34, Srinivas Kandagatla wrote:
>> Hi Greg,
>>
>> Here is final set of nvmem patches for 5.18 which includes
>>
>> - Add new Sunplus nvmem provider and bindings.
>> - fix in qfprom to increase blow timeout.
>>
>> Can you please queue them up for 5.18.
>>
>> thanks for you help,
>> srini
>>
>> Knox Chiou (1):
>> nvmem: qfprom: Increase fuse blow timeout to prevent write fail
>>
>> Vincent Shih (2):
>> nvmem: Add driver for OCOTP in Sunplus SP7021
>> dt-bindings: nvmem: Add bindings doc for Sunplus OCOTP driver
>
> Sorry for inconvenience, but can you please ignore this set if you have
> not already applied them.
>
Opps, It looks like these were just applied.
I can send other patches along with fix to yaml as next set, if that
works for you?
thanks,
srini
> There seems to be a issue with yaml file which fails dt-bindings check
> and there are few more patches that can go for 5.18.
>
> I will a send new set soon.
>
> Thanks for your help
> --srini
>
>>
>> .../bindings/nvmem/sunplus,sp7021-ocotp.yaml | 86 +++++++
>> MAINTAINERS | 6 +
>> drivers/nvmem/Kconfig | 12 +
>> drivers/nvmem/Makefile | 2 +
>> drivers/nvmem/qfprom.c | 2 +-
>> drivers/nvmem/sunplus-ocotp.c | 228 ++++++++++++++++++
>> 6 files changed, 335 insertions(+), 1 deletion(-)
>> create mode 100644
>> Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml
>> create mode 100644 drivers/nvmem/sunplus-ocotp.c
>>