Message ID | 20220830192212.28570-15-farbere@amazon.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Variety of fixes and new features for mr75203 driver | expand |
On Di, 2022-08-30 at 19:22 +0000, Eliav Farber wrote: > Add optional "moortec,ts-series" property to define the temperature > equation and coefficients that shall be used to convert the digital > output to value in milli-Celsius. > Supported series: 5 (default) and 6. Is this the difference between mr75xxx and mr76xxx series? If so, should be a compatible "moortec,mr76006" instead? If the temperature equation could be derived from the compatible, this property would not be necessary. regards Philipp
On 8/31/2022 11:23 AM, Philipp Zabel wrote: > On Di, 2022-08-30 at 19:22 +0000, Eliav Farber wrote: >> Add optional "moortec,ts-series" property to define the temperature >> equation and coefficients that shall be used to convert the digital >> output to value in milli-Celsius. >> Supported series: 5 (default) and 6. > > Is this the difference between mr75xxx and mr76xxx series? > If so, should be a compatible "moortec,mr76006" instead? > If the temperature equation could be derived from the compatible, this > property would not be necessary. The PVT (Process, Voltage, Temperature) monitoring logic can be constructed from many different sub-blocks: *) CONTROLLER (mr75203) - controlling TS, PD and VM. *) TS (mr74137) - for measuring temperature in ring. *) PD (mr74139) - for measuring IO based transistors. *) VM (mr74138) - for measuring voltage rails across the SoC. *) Ring oscillators (mr76007/mr76008) *) Pre-scalers (mr76006) Besides mr75203 which is digital all other IPs are analog. There is a single mr75203 and there can be several or none of the other units. The kernel driver is only for the controller (mr75203). The series 5 or 6 is relevant for the TS (mr74137) and not for the controller (mr75203). Each of the analog units can have a different series number (for example we use series 3 of the VM). That is why I didn't change the compatible of mr75203, and instead added a TS-series parameter. -- Regards, Eliav
On Mi, 2022-08-31 at 12:23 +0300, Farber, Eliav wrote: > On 8/31/2022 11:23 AM, Philipp Zabel wrote: > > On Di, 2022-08-30 at 19:22 +0000, Eliav Farber wrote: > > > Add optional "moortec,ts-series" property to define the temperature > > > equation and coefficients that shall be used to convert the digital > > > output to value in milli-Celsius. > > > Supported series: 5 (default) and 6. > > > > Is this the difference between mr75xxx and mr76xxx series? > > If so, should be a compatible "moortec,mr76006" instead? > > If the temperature equation could be derived from the compatible, this > > property would not be necessary. > The PVT (Process, Voltage, Temperature) monitoring logic can be > constructed from many different sub-blocks: > *) CONTROLLER (mr75203) - controlling TS, PD and VM. > *) TS (mr74137) - for measuring temperature in ring. > *) PD (mr74139) - for measuring IO based transistors. > *) VM (mr74138) - for measuring voltage rails across the SoC. > *) Ring oscillators (mr76007/mr76008) > *) Pre-scalers (mr76006) > > Besides mr75203 which is digital all other IPs are analog. > There is a single mr75203 and there can be several or none of the other > units. Thank you for the explanation, I think this information would be nice to have in a description in moortec,mr75203.yaml. > The kernel driver is only for the controller (mr75203). > The series 5 or 6 is relevant for the TS (mr74137) and not for the > controller (mr75203). > Each of the analog units can have a different series number (for example > we use series 3 of the VM). > > That is why I didn't change the compatible of mr75203, and instead added > a TS-series parameter. I see, I mistakenly assumed mr76006 referred to a new controller version. This also invalidates my comment on patch 4. regards Philipp
On 8/31/2022 12:42 PM, Philipp Zabel wrote: > On Mi, 2022-08-31 at 12:23 +0300, Farber, Eliav wrote: >> On 8/31/2022 11:23 AM, Philipp Zabel wrote: >> > On Di, 2022-08-30 at 19:22 +0000, Eliav Farber wrote: >> > > Add optional "moortec,ts-series" property to define the temperature >> > > equation and coefficients that shall be used to convert the digital >> > > output to value in milli-Celsius. >> > > Supported series: 5 (default) and 6. >> > >> > Is this the difference between mr75xxx and mr76xxx series? >> > If so, should be a compatible "moortec,mr76006" instead? >> > If the temperature equation could be derived from the compatible, this >> > property would not be necessary. >> The PVT (Process, Voltage, Temperature) monitoring logic can be >> constructed from many different sub-blocks: >> *) CONTROLLER (mr75203) - controlling TS, PD and VM. >> *) TS (mr74137) - for measuring temperature in ring. >> *) PD (mr74139) - for measuring IO based transistors. >> *) VM (mr74138) - for measuring voltage rails across the SoC. >> *) Ring oscillators (mr76007/mr76008) >> *) Pre-scalers (mr76006) >> >> Besides mr75203 which is digital all other IPs are analog. >> There is a single mr75203 and there can be several or none of the other >> units. > > Thank you for the explanation, I think this information would be nice > to have in a description in moortec,mr75203.yaml. For v4 I added a new patch which adds this description in moortec,mr75203.yaml: description: | A Moortec PVT (Process, Voltage, Temperature) monitoring logic design can include many different units. Such a design will usually consists of several Moortec's embedded analog IPs, and a single Moortec controller to configure and control the IPs. Some of the Moortec's analog hard IPs that can be used in a design: *) Temperature Sensor (TS) - used to monitor core temperature (e.g. mr74137). *) Voltage Monitor (VM) - used to monitor voltage levels (e.g. mr74138). *) Process Detector (PD) - used to assess silicon speed (e.g. mr74139). *) Delay Chain - ring oscillator connected to the PD, used to measure IO based transistors (e.g. mr76008 ring oscillator at 1.1V, mr76007 ring oscillator at 1.8V). *) Pre Scaler - provides divide-by-X scaling of input voltage, which can then be presented for VM for measurement within its range (e.g. mr76006 - divide by 2 pre-scaler). TS, VM & PD also include a digital interface, which consists of configuration inputs and measurement outputs. The mr75203 binding describes configuration for the controller unit, but also for some of the analog IPs. -- Regards, Eliav
On Tue, Aug 30, 2022 at 07:22:07PM +0000, Eliav Farber wrote: > Add optional "moortec,ts-series" property to define the temperature > equation and coefficients that shall be used to convert the digital > output to value in milli-Celsius. > Supported series: 5 (default) and 6. > > Series 5: > T = G + H * (n / cal5 - 0.5) + J * F > Where: G = 60, H = 200, cal5 = 4094, J = -0.1, F = frequency clock in MHz > > Series 6: > T = G + H * (n / cal5 - 0.5) > Where: G = 57.4, H = 249.4, cal5 = 4096 > > Signed-off-by: Eliav Farber <farbere@amazon.com> > --- > V3 -> V2: > - New patch to introduce "moortec,ts-series" property. > > .../devicetree/bindings/hwmon/moortec,mr75203.yaml | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml > index 4c983d8f8fe7..ec2dbe7da9c2 100644 > --- a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml > +++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml > @@ -64,6 +64,16 @@ properties: > default: 1 > $ref: /schemas/types.yaml#definitions/uint8-array > > + moortec,ts-series: > + description: > + moortec,ts-series defines the temperature equation and coefficients that > + shall be used to convert the digital output to value in milli-Celsius. > + Supported series are 5 and 6. No need to state constraints in free-form text descriptions. > + minimum: 5 > + maximum: 6 > + default: 5 > + $ref: /schemas/types.yaml#definitions/uint32 > + > required: > - compatible > - reg > -- > 2.37.1 > >
On 9/2/2022 10:59 PM, Rob Herring wrote: > On Tue, Aug 30, 2022 at 07:22:07PM +0000, Eliav Farber wrote: >> Add optional "moortec,ts-series" property to define the temperature >> equation and coefficients that shall be used to convert the digital >> output to value in milli-Celsius. >> Supported series: 5 (default) and 6. >> >> Series 5: >> T = G + H * (n / cal5 - 0.5) + J * F >> Where: G = 60, H = 200, cal5 = 4094, J = -0.1, F = frequency clock in >> MHz >> >> Series 6: >> T = G + H * (n / cal5 - 0.5) >> Where: G = 57.4, H = 249.4, cal5 = 4096 >> >> Signed-off-by: Eliav Farber <farbere@amazon.com> >> --- >> V3 -> V2: >> - New patch to introduce "moortec,ts-series" property. >> >> .../devicetree/bindings/hwmon/moortec,mr75203.yaml | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git >> a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml >> b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml >> index 4c983d8f8fe7..ec2dbe7da9c2 100644 >> --- a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml >> +++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml >> @@ -64,6 +64,16 @@ properties: >> default: 1 >> $ref: /schemas/types.yaml#definitions/uint8-array >> >> + moortec,ts-series: >> + description: >> + moortec,ts-series defines the temperature equation and >> coefficients that >> + shall be used to convert the digital output to value in >> milli-Celsius. >> + Supported series are 5 and 6. > > No need to state constraints in free-form text descriptions. Fixed in v4.
diff --git a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml index 4c983d8f8fe7..ec2dbe7da9c2 100644 --- a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml +++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml @@ -64,6 +64,16 @@ properties: default: 1 $ref: /schemas/types.yaml#definitions/uint8-array + moortec,ts-series: + description: + moortec,ts-series defines the temperature equation and coefficients that + shall be used to convert the digital output to value in milli-Celsius. + Supported series are 5 and 6. + minimum: 5 + maximum: 6 + default: 5 + $ref: /schemas/types.yaml#definitions/uint32 + required: - compatible - reg
Add optional "moortec,ts-series" property to define the temperature equation and coefficients that shall be used to convert the digital output to value in milli-Celsius. Supported series: 5 (default) and 6. Series 5: T = G + H * (n / cal5 - 0.5) + J * F Where: G = 60, H = 200, cal5 = 4094, J = -0.1, F = frequency clock in MHz Series 6: T = G + H * (n / cal5 - 0.5) Where: G = 57.4, H = 249.4, cal5 = 4096 Signed-off-by: Eliav Farber <farbere@amazon.com> --- V3 -> V2: - New patch to introduce "moortec,ts-series" property. .../devicetree/bindings/hwmon/moortec,mr75203.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+)