* nct7802 mode selection for RTD1,2,3 via device tree?
@ 2021-09-09 0:39 Oskar Senft
2021-09-09 17:02 ` Guenter Roeck
0 siblings, 1 reply; 5+ messages in thread
From: Oskar Senft @ 2021-09-09 0:39 UTC (permalink / raw)
To: linux-hwmon; +Cc: Guenter Roeck, Jean Delvare
Hi everyone
We're successfully using the nct7802 driver on a TYAN S7106 mainboard
connected to an Aspeed AST2500 BMC running OpenBMC. However, on this
board the NCT7802Y has 3 thermistors connected. For that to work, we
reconfigured the "Mode Selection Register" (0x22) to have RTD1_MD,
RTD2_MD and RTD3_MD set as 0x2 (Thermistor mode). So far we simply had
a one line patch in our internal kernel repo, but we'd like to
upstream it and make it configurable.
We explicitly reference the nct7802 in our device tree. Example:
&i2c0 {
status = "okay";
/* Hardware monitor with temperature sensors */
nct7802@28 {
compatible = "nuvoton,nct7802";
reg = <0x28>;
};
};
Note that the DTS validator complains about not knowing about
"nuvoton,nct7802". Is that because the driver doesn't specify a
MODULE_DEVICE_TABLE of type "struct of_device_id"? I'd be happy to fix
that, too!
Anyway, I was wondering if there would be a nice way to set the
configuration for RTD1,2,3 from the device tree. I'll be happy to make
the necessary changes (there are plenty of examples), but I wanted to
check with the community and maintainers before going down any such
road.
Thanks
Oskar.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nct7802 mode selection for RTD1,2,3 via device tree?
2021-09-09 0:39 nct7802 mode selection for RTD1,2,3 via device tree? Oskar Senft
@ 2021-09-09 17:02 ` Guenter Roeck
2021-09-10 13:09 ` Oskar Senft
0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2021-09-09 17:02 UTC (permalink / raw)
To: Oskar Senft; +Cc: linux-hwmon, Jean Delvare
On Wed, Sep 08, 2021 at 08:39:23PM -0400, Oskar Senft wrote:
> Hi everyone
>
> We're successfully using the nct7802 driver on a TYAN S7106 mainboard
> connected to an Aspeed AST2500 BMC running OpenBMC. However, on this
> board the NCT7802Y has 3 thermistors connected. For that to work, we
> reconfigured the "Mode Selection Register" (0x22) to have RTD1_MD,
> RTD2_MD and RTD3_MD set as 0x2 (Thermistor mode). So far we simply had
> a one line patch in our internal kernel repo, but we'd like to
> upstream it and make it configurable.
>
> We explicitly reference the nct7802 in our device tree. Example:
>
> &i2c0 {
> status = "okay";
>
> /* Hardware monitor with temperature sensors */
> nct7802@28 {
> compatible = "nuvoton,nct7802";
> reg = <0x28>;
> };
> };
>
> Note that the DTS validator complains about not knowing about
> "nuvoton,nct7802". Is that because the driver doesn't specify a
> MODULE_DEVICE_TABLE of type "struct of_device_id"? I'd be happy to fix
> that, too!
>
The message is seen because there is no .yaml file for nct7802,
and it is not in trivial_devices either.
> Anyway, I was wondering if there would be a nice way to set the
> configuration for RTD1,2,3 from the device tree. I'll be happy to make
> the necessary changes (there are plenty of examples), but I wanted to
> check with the community and maintainers before going down any such
> road.
>
Sure, all you need to do is to define the bindings and get them approved.
From there I'll be happy to accept the necessary patch(es).
Guenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nct7802 mode selection for RTD1,2,3 via device tree?
2021-09-09 17:02 ` Guenter Roeck
@ 2021-09-10 13:09 ` Oskar Senft
2021-09-10 15:36 ` Guenter Roeck
0 siblings, 1 reply; 5+ messages in thread
From: Oskar Senft @ 2021-09-10 13:09 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-hwmon, Jean Delvare
Hi Guenter
> Sure, all you need to do is to define the bindings and get them approved.
> From there I'll be happy to accept the necessary patch(es).
I just sent two separate patches, one to add the device tree bindings
and an independent patch to add the RTD modes configuration.
I hope that was right?
Thanks
OSkar.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nct7802 mode selection for RTD1,2,3 via device tree?
2021-09-10 13:09 ` Oskar Senft
@ 2021-09-10 15:36 ` Guenter Roeck
2021-09-10 15:54 ` Oskar Senft
0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2021-09-10 15:36 UTC (permalink / raw)
To: Oskar Senft; +Cc: linux-hwmon, Jean Delvare
On 9/10/21 6:09 AM, Oskar Senft wrote:
> Hi Guenter
>
>> Sure, all you need to do is to define the bindings and get them approved.
>> From there I'll be happy to accept the necessary patch(es).
> I just sent two separate patches, one to add the device tree bindings
> and an independent patch to add the RTD modes configuration.
>
> I hope that was right?
>
Kind of. In the future please send such patch series as series.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nct7802 mode selection for RTD1,2,3 via device tree?
2021-09-10 15:36 ` Guenter Roeck
@ 2021-09-10 15:54 ` Oskar Senft
0 siblings, 0 replies; 5+ messages in thread
From: Oskar Senft @ 2021-09-10 15:54 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-hwmon, Jean Delvare
> > I just sent two separate patches, one to add the device tree bindings
> > and an independent patch to add the RTD modes configuration.
> > I hope that was right?
> Kind of. In the future please send such patch series as series.
Argh, I'm sorry. I wasn't sure if a series would be better, since
there is a slightly different set of maintainers. But I guess people
can just filter out what doesn't apply to them. Next time! (or in a V2
patch if needed)
Thanks
Oskar.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-10 15:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 0:39 nct7802 mode selection for RTD1,2,3 via device tree? Oskar Senft
2021-09-09 17:02 ` Guenter Roeck
2021-09-10 13:09 ` Oskar Senft
2021-09-10 15:36 ` Guenter Roeck
2021-09-10 15:54 ` Oskar Senft
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.