Message ID | 1444984751-4572-2-git-send-email-andrew-ct.chen@mediatek.com |
---|---|
State | Under Review, archived |
Headers | show |
On 16/10/15 09:39, andrew-ct.chen@mediatek.com wrote: > From: Andrew-CT Chen <andrew-ct.chen@mediatek.com> > > Add Mediatek MT8173 EFUSE Devicetree binding file > > Signed-off-by: Andrew-CT Chen <andrew-ct.chen@mediatek.com> Looks good to me, minor comment below. Will queue this for v4.5 once v4.4-rc1 is released. > --- > .../devicetree/bindings/nvmem/mtk-efuse.txt | 36 ++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > create mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > > diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > new file mode 100644 > index 0000000..92edc3d > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > @@ -0,0 +1,36 @@ > += Mediatek MTK-EFUSE device tree bindings = > + > +This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs. > + > +Required properties: > +- compatible: should be "mediatek,mt8173-efuse" or "mediatek,mt8135-efuse" Can we make the compatible more generic for mediatek socs? Like "mediatek,efuse" Or are they different in each SOC? --srini > +- reg: Should contain registers location and length > + > += Data cells = > +Are child nodes of MTK-EFUSE, bindings of which as described in > +bindings/nvmem/nvmem.txt > + > +Example: > + > + efuse: efuse@10206000 { > + compatible = "mediatek,mt8173-efuse"; > + reg = <0 0x10206000 0 0x1000>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + /* Data cells */ > + thermal_calibration: calib@528 { > + reg = <0x528 0xc>; > + }; > + }; > + > += Data consumers = > +Are device nodes which consume nvmem data cells. > + > +For example: > + > + thermal { > + ... > + nvmem-cells = <&thermal_calibration>; > + nvmem-cell-names = "calibration"; > + }; > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Oct 26, 2015 at 09:56:14AM +0000, Srinivas Kandagatla wrote: > > > On 16/10/15 09:39, andrew-ct.chen@mediatek.com wrote: > >From: Andrew-CT Chen <andrew-ct.chen@mediatek.com> > > > >Add Mediatek MT8173 EFUSE Devicetree binding file > > > >Signed-off-by: Andrew-CT Chen <andrew-ct.chen@mediatek.com> > > Looks good to me, minor comment below. > > Will queue this for v4.5 once v4.4-rc1 is released. > > > >--- > > .../devicetree/bindings/nvmem/mtk-efuse.txt | 36 ++++++++++++++++++++++ > > 1 file changed, 36 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > > > >diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > >new file mode 100644 > >index 0000000..92edc3d > >--- /dev/null > >+++ b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > >@@ -0,0 +1,36 @@ > >+= Mediatek MTK-EFUSE device tree bindings = > >+ > >+This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs. > >+ > >+Required properties: > >+- compatible: should be "mediatek,mt8173-efuse" or "mediatek,mt8135-efuse" > > Can we make the compatible more generic for mediatek socs? Like > "mediatek,efuse" Or are they different in each SOC? While we can add an additional "mediatek,efuse" compatible we should always add the most specific compatible first. Otherwise we cannot differentiate between SoCs later without changing the device tree. Sascha
On 26/10/15 10:23, Sascha Hauer wrote: > On Mon, Oct 26, 2015 at 09:56:14AM +0000, Srinivas Kandagatla wrote: >> >> >> On 16/10/15 09:39, andrew-ct.chen@mediatek.com wrote: >>> From: Andrew-CT Chen <andrew-ct.chen@mediatek.com> >>> >>> Add Mediatek MT8173 EFUSE Devicetree binding file >>> >>> Signed-off-by: Andrew-CT Chen <andrew-ct.chen@mediatek.com> >> >> Looks good to me, minor comment below. >> >> Will queue this for v4.5 once v4.4-rc1 is released. >> >> >>> --- >>> .../devicetree/bindings/nvmem/mtk-efuse.txt | 36 ++++++++++++++++++++++ >>> 1 file changed, 36 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt >>> >>> diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt >>> new file mode 100644 >>> index 0000000..92edc3d >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt >>> @@ -0,0 +1,36 @@ >>> += Mediatek MTK-EFUSE device tree bindings = >>> + >>> +This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs. >>> + >>> +Required properties: >>> +- compatible: should be "mediatek,mt8173-efuse" or "mediatek,mt8135-efuse" >> >> Can we make the compatible more generic for mediatek socs? Like >> "mediatek,efuse" Or are they different in each SOC? > > While we can add an additional "mediatek,efuse" compatible we should > always add the most specific compatible first. Otherwise we cannot > differentiate between SoCs later without changing the device tree. Yes, that’s correct. AFAIK, Ideally the driver should have more generic compatible string unless there is any SOC specific thing, and DT can still use the order of specific, generic compatible strings. If not we would end up adding compatible strings into the driver for every new SOC. --srini > > Sascha > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 2015-10-26 at 10:55 +0000, Srinivas Kandagatla wrote: > > On 26/10/15 10:23, Sascha Hauer wrote: > > On Mon, Oct 26, 2015 at 09:56:14AM +0000, Srinivas Kandagatla wrote: > >> > >> > >> On 16/10/15 09:39, andrew-ct.chen@mediatek.com wrote: > >>> From: Andrew-CT Chen <andrew-ct.chen@mediatek.com> > >>> > >>> Add Mediatek MT8173 EFUSE Devicetree binding file > >>> > >>> Signed-off-by: Andrew-CT Chen <andrew-ct.chen@mediatek.com> > >> > >> Looks good to me, minor comment below. > >> > >> Will queue this for v4.5 once v4.4-rc1 is released. > >> > >> > >>> --- > >>> .../devicetree/bindings/nvmem/mtk-efuse.txt | 36 ++++++++++++++++++++++ > >>> 1 file changed, 36 insertions(+) > >>> create mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > >>> > >>> diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > >>> new file mode 100644 > >>> index 0000000..92edc3d > >>> --- /dev/null > >>> +++ b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > >>> @@ -0,0 +1,36 @@ > >>> += Mediatek MTK-EFUSE device tree bindings = > >>> + > >>> +This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs. > >>> + > >>> +Required properties: > >>> +- compatible: should be "mediatek,mt8173-efuse" or "mediatek,mt8135-efuse" > >> > >> Can we make the compatible more generic for mediatek socs? Like > >> "mediatek,efuse" Or are they different in each SOC? > > > > While we can add an additional "mediatek,efuse" compatible we should > > always add the most specific compatible first. Otherwise we cannot > > differentiate between SoCs later without changing the device tree. > Yes, that’s correct. > > AFAIK, Ideally the driver should have more generic compatible string > unless there is any SOC specific thing, and DT can still use the order > of specific, generic compatible strings. If not we would end up adding > compatible strings into the driver for every new SOC. We will modify for generic compatible string like "mediatek,efuse" and rebase it to v4.4-rc1. > > --srini > > > > > Sascha > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 2015-10-27 at 13:32 +0800, andrew-ct chen wrote: > On Mon, 2015-10-26 at 10:55 +0000, Srinivas Kandagatla wrote: > > > > On 26/10/15 10:23, Sascha Hauer wrote: > > > On Mon, Oct 26, 2015 at 09:56:14AM +0000, Srinivas Kandagatla wrote: > > >> > > >> > > >> On 16/10/15 09:39, andrew-ct.chen@mediatek.com wrote: > > >>> From: Andrew-CT Chen <andrew-ct.chen@mediatek.com> > > >>> > > >>> Add Mediatek MT8173 EFUSE Devicetree binding file > > >>> > > >>> Signed-off-by: Andrew-CT Chen <andrew-ct.chen@mediatek.com> > > >> > > >> Looks good to me, minor comment below. > > >> > > >> Will queue this for v4.5 once v4.4-rc1 is released. > > >> > > >> > > >>> --- > > >>> .../devicetree/bindings/nvmem/mtk-efuse.txt | 36 ++++++++++++++++++++++ > > >>> 1 file changed, 36 insertions(+) > > >>> create mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > > >>> > > >>> diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > > >>> new file mode 100644 > > >>> index 0000000..92edc3d > > >>> --- /dev/null > > >>> +++ b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt > > >>> @@ -0,0 +1,36 @@ > > >>> += Mediatek MTK-EFUSE device tree bindings = > > >>> + > > >>> +This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs. > > >>> + > > >>> +Required properties: > > >>> +- compatible: should be "mediatek,mt8173-efuse" or "mediatek,mt8135-efuse" > > >> > > >> Can we make the compatible more generic for mediatek socs? Like > > >> "mediatek,efuse" Or are they different in each SOC? > > > > > > While we can add an additional "mediatek,efuse" compatible we should > > > always add the most specific compatible first. Otherwise we cannot > > > differentiate between SoCs later without changing the device tree. > > Yes, that’s correct. > > > > AFAIK, Ideally the driver should have more generic compatible string > > unless there is any SOC specific thing, and DT can still use the order > > of specific, generic compatible strings. If not we would end up adding > > compatible strings into the driver for every new SOC. > > We will modify for generic compatible string like "mediatek,efuse" and > rebase it to v4.4-rc1. For more clearly, we will modify the compatible string to "mediatek,mt8173-efuse" and "mediatek,efuse". > > > > > --srini > > > > > > > > Sascha > > > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt new file mode 100644 index 0000000..92edc3d --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt @@ -0,0 +1,36 @@ += Mediatek MTK-EFUSE device tree bindings = + +This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs. + +Required properties: +- compatible: should be "mediatek,mt8173-efuse" or "mediatek,mt8135-efuse" +- reg: Should contain registers location and length + += Data cells = +Are child nodes of MTK-EFUSE, bindings of which as described in +bindings/nvmem/nvmem.txt + +Example: + + efuse: efuse@10206000 { + compatible = "mediatek,mt8173-efuse"; + reg = <0 0x10206000 0 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + + /* Data cells */ + thermal_calibration: calib@528 { + reg = <0x528 0xc>; + }; + }; + += Data consumers = +Are device nodes which consume nvmem data cells. + +For example: + + thermal { + ... + nvmem-cells = <&thermal_calibration>; + nvmem-cell-names = "calibration"; + };