* [PATCH v2 0/3] add UniPhier efuse support @ 2017-10-06 5:02 Keiji Hayashibara 2017-10-06 5:02 ` [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse Keiji Hayashibara ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Keiji Hayashibara @ 2017-10-06 5:02 UTC (permalink / raw) To: srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, masami.hiramatsu-QSEj5FYQhm4dnm+yROfE0A, jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A, yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A, hayashi.kunihiko-uWyLwvC0a2jby3iVrkZq2A, owada.kiyoshi-uWyLwvC0a2jby3iVrkZq2A, Keiji Hayashibara This series adds support for eFuse implemented on UniPhier LD20 SoCs. The eFuse device is under soc-glue and this register implements as read only. patch V1 https://lkml.org/lkml/2017/8/31/880 Changes between V2 and V1 ========================= 1. Fix sparse warnings 2. Changed to implement without regmap 3. Convert devm_kzalloc to stack 4. Divide efuse into two areas in devicetree 5. Remove .owner settings of struct nvmem_config 6. Remove enable of CONFIG_UNIPHIER_EFUSE in defconfig 7. Other minor fixes Keiji Hayashibara (3): dt-bindings: nvmem: add description for UniPhier eFuse nvmem: uniphier: add UniPhier eFuse driver arm64: dts: uniphier: add efuse node for LD20 .../devicetree/bindings/nvmem/uniphier-efuse.txt | 49 +++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 18 ++++ drivers/nvmem/Kconfig | 11 +++ drivers/nvmem/Makefile | 2 + drivers/nvmem/uniphier-efuse.c | 97 ++++++++++++++++++++++ 5 files changed, 177 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt create mode 100644 drivers/nvmem/uniphier-efuse.c -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse 2017-10-06 5:02 [PATCH v2 0/3] add UniPhier efuse support Keiji Hayashibara @ 2017-10-06 5:02 ` Keiji Hayashibara [not found] ` <1507266180-11840-2-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> 2017-10-06 5:02 ` [PATCH v2 2/3] nvmem: uniphier: add UniPhier eFuse driver Keiji Hayashibara [not found] ` <1507266180-11840-1-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> 2 siblings, 1 reply; 11+ messages in thread From: Keiji Hayashibara @ 2017-10-06 5:02 UTC (permalink / raw) To: srinivas.kandagatla Cc: robh+dt, devicetree, linux-arm-kernel, linux-kernel, masami.hiramatsu, jaswinder.singh, yamada.masahiro, hayashi.kunihiko, owada.kiyoshi, Keiji Hayashibara Add uniphier-efuse dt-bindings documentation. Signed-off-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> --- .../devicetree/bindings/nvmem/uniphier-efuse.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt diff --git a/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt new file mode 100644 index 0000000..1a394e5 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt @@ -0,0 +1,49 @@ += UniPhier eFuse device tree bindings = + +This UniPhier eFuse must be under soc-glue. + +Required properties: +- compatible: should be "socionext,uniphier-efuse" +- reg: should contain the register location and length + += Data cells = +Are child nodes of efuse, bindings of which as described in +bindings/nvmem/nvmem.txt + +Example: + + soc-glue@5f900000 { + compatible = "socionext,uniphier-ld20-soc-glue-debug", + "simple-mfd"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x5f900000 0x2000>; + + efuse@100 { + compatible = "socionext,uniphier-efuse"; + reg = <0x100 0x28>; + }; + + efuse@200 { + compatible = "socionext,uniphier-efuse"; + reg = <0x200 0x68>; + #address-cells = <1>; + #size-cells = <1>; + + /* Data cells */ + usb_mon: usb_mon { + reg = <0x54 0xc>; + }; + }; + }; + += Data consumers = +Are device nodes which consume nvmem data cells. + +Example: + + usb { + ... + nvmem-cells = <&usb_mon>; + nvmem-cell-names = "usb_mon"; + } -- 2.7.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <1507266180-11840-2-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>]
* Re: [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse [not found] ` <1507266180-11840-2-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> @ 2017-10-13 13:49 ` Rob Herring 2017-10-13 16:04 ` Masahiro Yamada 0 siblings, 1 reply; 11+ messages in thread From: Rob Herring @ 2017-10-13 13:49 UTC (permalink / raw) To: Keiji Hayashibara Cc: srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, masami.hiramatsu-QSEj5FYQhm4dnm+yROfE0A, jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A, yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A, hayashi.kunihiko-uWyLwvC0a2jby3iVrkZq2A, owada.kiyoshi-uWyLwvC0a2jby3iVrkZq2A On Fri, Oct 06, 2017 at 02:02:58PM +0900, Keiji Hayashibara wrote: > Add uniphier-efuse dt-bindings documentation. > > Signed-off-by: Keiji Hayashibara <hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> > --- > .../devicetree/bindings/nvmem/uniphier-efuse.txt | 49 ++++++++++++++++++++++ > 1 file changed, 49 insertions(+) > create mode 100644 Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt > > diff --git a/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt > new file mode 100644 > index 0000000..1a394e5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt > @@ -0,0 +1,49 @@ > += UniPhier eFuse device tree bindings = > + > +This UniPhier eFuse must be under soc-glue. > + > +Required properties: > +- compatible: should be "socionext,uniphier-efuse" > +- reg: should contain the register location and length > + > += Data cells = > +Are child nodes of efuse, bindings of which as described in > +bindings/nvmem/nvmem.txt > + > +Example: > + > + soc-glue@5f900000 { > + compatible = "socionext,uniphier-ld20-soc-glue-debug", > + "simple-mfd"; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0x0 0x5f900000 0x2000>; > + > + efuse@100 { > + compatible = "socionext,uniphier-efuse"; > + reg = <0x100 0x28>; > + }; > + > + efuse@200 { > + compatible = "socionext,uniphier-efuse"; > + reg = <0x200 0x68>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + /* Data cells */ > + usb_mon: usb_mon { Don't use '_' and needs a unit-address. Build your dtb with W=2 option and you'll get these warnings. > + reg = <0x54 0xc>; Without ranges above, this is address 5f900054. I think you want 5f900254. You need: ranges = <0x0 0x200 0x68>; > + }; > + }; > + }; > + > += Data consumers = > +Are device nodes which consume nvmem data cells. > + > +Example: > + > + usb { > + ... > + nvmem-cells = <&usb_mon>; > + nvmem-cell-names = "usb_mon"; > + } > -- > 2.7.4 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse 2017-10-13 13:49 ` Rob Herring @ 2017-10-13 16:04 ` Masahiro Yamada [not found] ` <CAK7LNARg6G152joHq06RkPab=NoWEkFArvF+Ccc1behdXFokmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Masahiro Yamada @ 2017-10-13 16:04 UTC (permalink / raw) To: Rob Herring Cc: Keiji Hayashibara, Srinivas Kandagatla, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel, Linux Kernel Mailing List, Masami Hiramatsu, Jassi Brar, Kunihiko Hayashi, Kiyoshi Owada Hi Rob, 2017-10-13 22:49 GMT+09:00 Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>: > On Fri, Oct 06, 2017 at 02:02:58PM +0900, Keiji Hayashibara wrote: >> Add uniphier-efuse dt-bindings documentation. >> >> Signed-off-by: Keiji Hayashibara <hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> >> --- >> .../devicetree/bindings/nvmem/uniphier-efuse.txt | 49 ++++++++++++++++++++++ >> 1 file changed, 49 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt >> >> diff --git a/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt >> new file mode 100644 >> index 0000000..1a394e5 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt >> @@ -0,0 +1,49 @@ >> += UniPhier eFuse device tree bindings = >> + >> +This UniPhier eFuse must be under soc-glue. >> + >> +Required properties: >> +- compatible: should be "socionext,uniphier-efuse" >> +- reg: should contain the register location and length >> + >> += Data cells = >> +Are child nodes of efuse, bindings of which as described in >> +bindings/nvmem/nvmem.txt >> + >> +Example: >> + >> + soc-glue@5f900000 { >> + compatible = "socionext,uniphier-ld20-soc-glue-debug", >> + "simple-mfd"; >> + #address-cells = <1>; >> + #size-cells = <1>; >> + ranges = <0x0 0x5f900000 0x2000>; >> + >> + efuse@100 { >> + compatible = "socionext,uniphier-efuse"; >> + reg = <0x100 0x28>; >> + }; >> + >> + efuse@200 { >> + compatible = "socionext,uniphier-efuse"; >> + reg = <0x200 0x68>; >> + #address-cells = <1>; >> + #size-cells = <1>; >> + >> + /* Data cells */ >> + usb_mon: usb_mon { > > Don't use '_' and needs a unit-address. Build your dtb with W=2 option > and you'll get these warnings. Do you mean "usb_mon: usb-mon@54" ? DT files in kernel sprinkle tons of warnings even with W=1. I always eliminate W=1, so I agree with "@54". I do not care W=2 much. If you see arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi, yeah, I generally use '-' for node names, but I see some exceptions. You admitted -Wnode_name_chars_strict is "subjective" in commit 8654cb8d0371. If you are unhappy about it, we can fix, but I am not sure how picky we should be. >> + reg = <0x54 0xc>; > > Without ranges above, this is address 5f900054. I think you want > 5f900254. You need: > > ranges = <0x0 0x200 0x68>; I do not get it. The parent is an efuse, not any kind of bus. <0x54, 0c> just represents the offset and size within the efuse device, so this is not mapped in CPU address view. The is apparent from of_nvmem_cell_get(). Some efuse devices _may_ be directly accessed as MMIO from CPU, but it is abstracted under an efuse driver. I believe missing "ranges" is correct. >> + }; >> + }; >> + }; >> + >> += Data consumers = >> +Are device nodes which consume nvmem data cells. >> + >> +Example: >> + >> + usb { >> + ... >> + nvmem-cells = <&usb_mon>; >> + nvmem-cell-names = "usb_mon"; >> + } >> -- >> 2.7.4 >> > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <CAK7LNARg6G152joHq06RkPab=NoWEkFArvF+Ccc1behdXFokmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse [not found] ` <CAK7LNARg6G152joHq06RkPab=NoWEkFArvF+Ccc1behdXFokmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-10-13 18:42 ` Rob Herring [not found] ` <CAL_JsqJdbLFHqEU8+1e_hvA3Hd1MLJHETWAkd2pcsXpDKwONog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Rob Herring @ 2017-10-13 18:42 UTC (permalink / raw) To: Masahiro Yamada Cc: Keiji Hayashibara, Srinivas Kandagatla, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel, Linux Kernel Mailing List, Masami Hiramatsu, Jassi Brar, Kunihiko Hayashi, Kiyoshi Owada On Fri, Oct 13, 2017 at 11:04 AM, Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> wrote: > Hi Rob, > > > 2017-10-13 22:49 GMT+09:00 Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>: >> On Fri, Oct 06, 2017 at 02:02:58PM +0900, Keiji Hayashibara wrote: >>> Add uniphier-efuse dt-bindings documentation. >>> >>> Signed-off-by: Keiji Hayashibara <hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> >>> --- >>> .../devicetree/bindings/nvmem/uniphier-efuse.txt | 49 ++++++++++++++++++++++ >>> 1 file changed, 49 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt >>> >>> diff --git a/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt >>> new file mode 100644 >>> index 0000000..1a394e5 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt >>> @@ -0,0 +1,49 @@ >>> += UniPhier eFuse device tree bindings = >>> + >>> +This UniPhier eFuse must be under soc-glue. >>> + >>> +Required properties: >>> +- compatible: should be "socionext,uniphier-efuse" >>> +- reg: should contain the register location and length >>> + >>> += Data cells = >>> +Are child nodes of efuse, bindings of which as described in >>> +bindings/nvmem/nvmem.txt >>> + >>> +Example: >>> + >>> + soc-glue@5f900000 { >>> + compatible = "socionext,uniphier-ld20-soc-glue-debug", >>> + "simple-mfd"; >>> + #address-cells = <1>; >>> + #size-cells = <1>; >>> + ranges = <0x0 0x5f900000 0x2000>; >>> + >>> + efuse@100 { >>> + compatible = "socionext,uniphier-efuse"; >>> + reg = <0x100 0x28>; >>> + }; >>> + >>> + efuse@200 { >>> + compatible = "socionext,uniphier-efuse"; >>> + reg = <0x200 0x68>; >>> + #address-cells = <1>; >>> + #size-cells = <1>; >>> + >>> + /* Data cells */ >>> + usb_mon: usb_mon { >> >> Don't use '_' and needs a unit-address. Build your dtb with W=2 option >> and you'll get these warnings. > > > Do you mean "usb_mon: usb-mon@54" ? Yes. > DT files in kernel sprinkle tons of warnings even with W=1. > > I always eliminate W=1, so I agree with "@54". > > I do not care W=2 much. > If you see arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi, > yeah, I generally use '-' for node names, but I see some exceptions. > > You admitted -Wnode_name_chars_strict is "subjective" > in commit 8654cb8d0371. Yes, meaning fixing existing cases is questionable and I'd put doing so at a lower priority. I didn't mean it is up to each person to decide whether they like to use '_' or not. > If you are unhappy about it, we can fix, > but I am not sure how picky we should be. Let me put it clearly: Don't add new warnings with W=2. > > >>> + reg = <0x54 0xc>; >> >> Without ranges above, this is address 5f900054. I think you want >> 5f900254. You need: >> >> ranges = <0x0 0x200 0x68>; > > > I do not get it. > > The parent is an efuse, not any kind of bus. > > <0x54, 0c> just represents the offset and size > within the efuse device, so this is not mapped in > CPU address view. > The is apparent from of_nvmem_cell_get(). > > Some efuse devices _may_ be directly accessed > as MMIO from CPU, but it is abstracted under an efuse driver. > > I believe missing "ranges" is correct. Okay, you're right. If those are not memory mapped then it is fine. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <CAL_JsqJdbLFHqEU8+1e_hvA3Hd1MLJHETWAkd2pcsXpDKwONog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse [not found] ` <CAL_JsqJdbLFHqEU8+1e_hvA3Hd1MLJHETWAkd2pcsXpDKwONog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-10-15 8:04 ` Masahiro Yamada 2017-10-16 9:12 ` Srinivas Kandagatla 0 siblings, 1 reply; 11+ messages in thread From: Masahiro Yamada @ 2017-10-15 8:04 UTC (permalink / raw) To: Rob Herring Cc: Keiji Hayashibara, Srinivas Kandagatla, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel, Linux Kernel Mailing List, Masami Hiramatsu, Jassi Brar, Kunihiko Hayashi, Kiyoshi Owada 2017-10-14 3:42 GMT+09:00 Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>: > On Fri, Oct 13, 2017 at 11:04 AM, Masahiro Yamada > <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> wrote: >> Hi Rob, >> >> >> 2017-10-13 22:49 GMT+09:00 Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>: >>> On Fri, Oct 06, 2017 at 02:02:58PM +0900, Keiji Hayashibara wrote: >>>> Add uniphier-efuse dt-bindings documentation. >>>> >>>> Signed-off-by: Keiji Hayashibara <hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> >>>> --- >>>> .../devicetree/bindings/nvmem/uniphier-efuse.txt | 49 ++++++++++++++++++++++ >>>> 1 file changed, 49 insertions(+) >>>> create mode 100644 Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt >>>> >>>> diff --git a/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt >>>> new file mode 100644 >>>> index 0000000..1a394e5 >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/nvmem/uniphier-efuse.txt >>>> @@ -0,0 +1,49 @@ >>>> += UniPhier eFuse device tree bindings = >>>> + >>>> +This UniPhier eFuse must be under soc-glue. >>>> + >>>> +Required properties: >>>> +- compatible: should be "socionext,uniphier-efuse" >>>> +- reg: should contain the register location and length >>>> + >>>> += Data cells = >>>> +Are child nodes of efuse, bindings of which as described in >>>> +bindings/nvmem/nvmem.txt >>>> + >>>> +Example: >>>> + >>>> + soc-glue@5f900000 { >>>> + compatible = "socionext,uniphier-ld20-soc-glue-debug", >>>> + "simple-mfd"; >>>> + #address-cells = <1>; >>>> + #size-cells = <1>; >>>> + ranges = <0x0 0x5f900000 0x2000>; >>>> + >>>> + efuse@100 { >>>> + compatible = "socionext,uniphier-efuse"; >>>> + reg = <0x100 0x28>; >>>> + }; >>>> + >>>> + efuse@200 { >>>> + compatible = "socionext,uniphier-efuse"; >>>> + reg = <0x200 0x68>; >>>> + #address-cells = <1>; >>>> + #size-cells = <1>; >>>> + >>>> + /* Data cells */ >>>> + usb_mon: usb_mon { >>> >>> Don't use '_' and needs a unit-address. Build your dtb with W=2 option >>> and you'll get these warnings. >> >> >> Do you mean "usb_mon: usb-mon@54" ? > > Yes. > >> DT files in kernel sprinkle tons of warnings even with W=1. >> >> I always eliminate W=1, so I agree with "@54". >> >> I do not care W=2 much. >> If you see arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi, >> yeah, I generally use '-' for node names, but I see some exceptions. >> >> You admitted -Wnode_name_chars_strict is "subjective" >> in commit 8654cb8d0371. > > Yes, meaning fixing existing cases is questionable and I'd put doing > so at a lower priority. I didn't mean it is up to each person to > decide whether they like to use '_' or not. > >> If you are unhappy about it, we can fix, >> but I am not sure how picky we should be. > > Let me put it clearly: Don't add new warnings with W=2. OK. usb_mon: usb_mon { should be fixed. Srinivas forwarded this to Greg, but I guess Greg has not applied this yet. The author can do re-spin, or a follow-up patch will do if it is too late. -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse 2017-10-15 8:04 ` Masahiro Yamada @ 2017-10-16 9:12 ` Srinivas Kandagatla [not found] ` <370eba21-1da8-9994-65c1-b51f564343fb-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Srinivas Kandagatla @ 2017-10-16 9:12 UTC (permalink / raw) To: Masahiro Yamada, Rob Herring Cc: Keiji Hayashibara, devicetree@vger.kernel.org, linux-arm-kernel, Linux Kernel Mailing List, Masami Hiramatsu, Jassi Brar, Kunihiko Hayashi, Kiyoshi Owada On 15/10/17 09:04, Masahiro Yamada wrote: > OK. > > usb_mon: usb_mon { > > should be fixed. > > Srinivas forwarded this to Greg, > but I guess Greg has not applied this yet. > > The author can do re-spin, > or a follow-up patch will do if it is too late. Please send a patch to fix! Thanks, srini ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <370eba21-1da8-9994-65c1-b51f564343fb-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* RE: [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse [not found] ` <370eba21-1da8-9994-65c1-b51f564343fb-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2017-10-17 1:10 ` Keiji Hayashibara 0 siblings, 0 replies; 11+ messages in thread From: Keiji Hayashibara @ 2017-10-17 1:10 UTC (permalink / raw) To: 'Srinivas Kandagatla', Yamada, Masahiro/山田 真弘, Rob Herring Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel, Linux Kernel Mailing List, Masami Hiramatsu, Jassi Brar, Hayashi, Kunihiko/林 邦彦, Owada, Kiyoshi/大和田 清志 Hello Srinivas, OK. I will send fixed patch as soon as possible. Thank you. Best Regards, Keiji Hayashibara > -----Original Message----- > From: Srinivas Kandagatla [mailto:srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org] > Sent: Monday, October 16, 2017 6:12 PM > > On 15/10/17 09:04, Masahiro Yamada wrote: > > OK. > > > > usb_mon: usb_mon { > > > > should be fixed. > > > > Srinivas forwarded this to Greg, > > but I guess Greg has not applied this yet. > > > > The author can do re-spin, > > or a follow-up patch will do if it is too late. > > Please send a patch to fix! > > Thanks, > srini -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 2/3] nvmem: uniphier: add UniPhier eFuse driver 2017-10-06 5:02 [PATCH v2 0/3] add UniPhier efuse support Keiji Hayashibara 2017-10-06 5:02 ` [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse Keiji Hayashibara @ 2017-10-06 5:02 ` Keiji Hayashibara [not found] ` <1507266180-11840-1-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> 2 siblings, 0 replies; 11+ messages in thread From: Keiji Hayashibara @ 2017-10-06 5:02 UTC (permalink / raw) To: srinivas.kandagatla Cc: robh+dt, devicetree, linux-arm-kernel, linux-kernel, masami.hiramatsu, jaswinder.singh, yamada.masahiro, hayashi.kunihiko, owada.kiyoshi, Keiji Hayashibara Add eFuse driver for Socionext UniPhier series SoC. Note that eFuse device is under soc-glue and this register implements as read only. Signed-off-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> --- drivers/nvmem/Kconfig | 11 +++++ drivers/nvmem/Makefile | 2 + drivers/nvmem/uniphier-efuse.c | 97 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 drivers/nvmem/uniphier-efuse.c diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig index 101ced4..9c32cfe 100644 --- a/drivers/nvmem/Kconfig +++ b/drivers/nvmem/Kconfig @@ -123,6 +123,17 @@ config NVMEM_SUNXI_SID This driver can also be built as a module. If so, the module will be called nvmem_sunxi_sid. +config UNIPHIER_EFUSE + tristate "UniPhier SoCs eFuse support" + depends on ARCH_UNIPHIER || COMPILE_TEST + depends on HAS_IOMEM + help + This is a simple driver to dump specified values of UniPhier SoC + from eFuse. + + This driver can also be built as a module. If so, the module + will be called nvmem-uniphier-efuse. + config NVMEM_VF610_OCOTP tristate "VF610 SoC OCOTP support" depends on SOC_VF610 || COMPILE_TEST diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile index 1731406..2d07162 100644 --- a/drivers/nvmem/Makefile +++ b/drivers/nvmem/Makefile @@ -26,6 +26,8 @@ obj-$(CONFIG_ROCKCHIP_EFUSE) += nvmem_rockchip_efuse.o nvmem_rockchip_efuse-y := rockchip-efuse.o obj-$(CONFIG_NVMEM_SUNXI_SID) += nvmem_sunxi_sid.o nvmem_sunxi_sid-y := sunxi_sid.o +obj-$(CONFIG_UNIPHIER_EFUSE) += nvmem-uniphier-efuse.o +nvmem-uniphier-efuse-y := uniphier-efuse.o obj-$(CONFIG_NVMEM_VF610_OCOTP) += nvmem-vf610-ocotp.o nvmem-vf610-ocotp-y := vf610-ocotp.o obj-$(CONFIG_MESON_EFUSE) += nvmem_meson_efuse.o diff --git a/drivers/nvmem/uniphier-efuse.c b/drivers/nvmem/uniphier-efuse.c new file mode 100644 index 0000000..2bb45c4 --- /dev/null +++ b/drivers/nvmem/uniphier-efuse.c @@ -0,0 +1,97 @@ +/* + * UniPhier eFuse driver + * + * Copyright (C) 2017 Socionext Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <linux/device.h> +#include <linux/io.h> +#include <linux/module.h> +#include <linux/nvmem-provider.h> +#include <linux/platform_device.h> + +struct uniphier_efuse_priv { + void __iomem *base; +}; + +static int uniphier_reg_read(void *context, + unsigned int reg, void *_val, size_t bytes) +{ + struct uniphier_efuse_priv *priv = context; + u32 *val = _val; + int offs; + + for (offs = 0; offs < bytes; offs += sizeof(u32)) + *val++ = readl(priv->base + reg + offs); + + return 0; +} + +static int uniphier_efuse_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct resource *res; + struct nvmem_device *nvmem; + struct nvmem_config econfig ={}; + struct uniphier_efuse_priv *priv; + + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + priv->base = devm_ioremap_resource(dev, res); + if (IS_ERR(priv->base)) + return PTR_ERR(priv->base); + + econfig.stride = 4; + econfig.word_size = 4; + econfig.read_only = true; + econfig.reg_read = uniphier_reg_read; + econfig.size = resource_size(res); + econfig.priv = priv; + econfig.dev = dev; + nvmem = nvmem_register(&econfig); + if (IS_ERR(nvmem)) + return PTR_ERR(nvmem); + + platform_set_drvdata(pdev, nvmem); + + return 0; +} + +static int uniphier_efuse_remove(struct platform_device *pdev) +{ + struct nvmem_device *nvmem = platform_get_drvdata(pdev); + + return nvmem_unregister(nvmem); +} + +static const struct of_device_id uniphier_efuse_of_match[] = { + { .compatible = "socionext,uniphier-efuse",}, + {/* sentinel */}, +}; +MODULE_DEVICE_TABLE(of, uniphier_efuse_of_match); + +static struct platform_driver uniphier_efuse_driver = { + .probe = uniphier_efuse_probe, + .remove = uniphier_efuse_remove, + .driver = { + .name = "uniphier-efuse", + .of_match_table = uniphier_efuse_of_match, + }, +}; +module_platform_driver(uniphier_efuse_driver); + +MODULE_AUTHOR("Keiji Hayashibara <hayashibara.keiji@socionext.com>"); +MODULE_DESCRIPTION("UniPhier eFuse driver"); +MODULE_LICENSE("GPL v2"); -- 2.7.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <1507266180-11840-1-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>]
* [PATCH v2 3/3] arm64: dts: uniphier: add efuse node for LD20 [not found] ` <1507266180-11840-1-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> @ 2017-10-06 5:03 ` Keiji Hayashibara [not found] ` <1507266180-11840-4-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Keiji Hayashibara @ 2017-10-06 5:03 UTC (permalink / raw) To: srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, masami.hiramatsu-QSEj5FYQhm4dnm+yROfE0A, jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A, yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A, hayashi.kunihiko-uWyLwvC0a2jby3iVrkZq2A, owada.kiyoshi-uWyLwvC0a2jby3iVrkZq2A, Keiji Hayashibara Add efuse node for UniPhier LD20 SoC. This efuse node is included in soc-glue. Signed-off-by: Keiji Hayashibara <hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> --- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi index a29c279..ddefde6 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi @@ -376,6 +376,24 @@ }; }; + soc-glue@5f900000 { + compatible = "socionext,uniphier-ld20-soc-glue-debug", + "simple-mfd"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x5f900000 0x2000>; + + efuse@100 { + compatible = "socionext,uniphier-efuse"; + reg = <0x100 0x28>; + }; + + efuse@200 { + compatible = "socionext,uniphier-efuse"; + reg = <0x200 0x68>; + }; + }; + aidet: aidet@5fc20000 { compatible = "socionext,uniphier-ld20-aidet"; reg = <0x5fc20000 0x200>; -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <1507266180-11840-4-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>]
* Re: [PATCH v2 3/3] arm64: dts: uniphier: add efuse node for LD20 [not found] ` <1507266180-11840-4-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> @ 2017-10-09 14:07 ` Masahiro Yamada 0 siblings, 0 replies; 11+ messages in thread From: Masahiro Yamada @ 2017-10-09 14:07 UTC (permalink / raw) To: Keiji Hayashibara Cc: Srinivas Kandagatla, Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel, Linux Kernel Mailing List, Masami Hiramatsu, Jassi Brar, Kunihiko Hayashi, Kiyoshi Owada 2017-10-06 14:03 GMT+09:00 Keiji Hayashibara <hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>: > Add efuse node for UniPhier LD20 SoC. > This efuse node is included in soc-glue. > > Signed-off-by: Keiji Hayashibara <hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> Applied to linux-uniphier. Thanks. -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-10-17 1:10 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-06 5:02 [PATCH v2 0/3] add UniPhier efuse support Keiji Hayashibara 2017-10-06 5:02 ` [PATCH v2 1/3] dt-bindings: nvmem: add description for UniPhier eFuse Keiji Hayashibara [not found] ` <1507266180-11840-2-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> 2017-10-13 13:49 ` Rob Herring 2017-10-13 16:04 ` Masahiro Yamada [not found] ` <CAK7LNARg6G152joHq06RkPab=NoWEkFArvF+Ccc1behdXFokmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-10-13 18:42 ` Rob Herring [not found] ` <CAL_JsqJdbLFHqEU8+1e_hvA3Hd1MLJHETWAkd2pcsXpDKwONog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-10-15 8:04 ` Masahiro Yamada 2017-10-16 9:12 ` Srinivas Kandagatla [not found] ` <370eba21-1da8-9994-65c1-b51f564343fb-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2017-10-17 1:10 ` Keiji Hayashibara 2017-10-06 5:02 ` [PATCH v2 2/3] nvmem: uniphier: add UniPhier eFuse driver Keiji Hayashibara [not found] ` <1507266180-11840-1-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> 2017-10-06 5:03 ` [PATCH v2 3/3] arm64: dts: uniphier: add efuse node for LD20 Keiji Hayashibara [not found] ` <1507266180-11840-4-git-send-email-hayashibara.keiji-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> 2017-10-09 14:07 ` Masahiro Yamada
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).