Message ID | IA1PR20MB49538E47932808E80B2DC781BB1F2@IA1PR20MB4953.namprd20.prod.outlook.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | riscv: sophgo: Add SG2042 external hardware monitor support | expand |
On 03/05/2024 04:20, Inochi Amaoto wrote: > Due to the design, Sophgo SG2042 use an external MCU to provide > hardware information, thermal information and reset control. > > Add bindings for this monitor device. > + > +required: > + - compatible > + - reg > + - "#thermal-sensor-cells" > + > +allOf: > + - $ref: ../thermal/thermal-sensor.yaml# Where did you find such path? Please use full path instead, so /schemas/thermal..... > + > +additionalProperties: false unevaluatedProperties: false instead (even though currently it does not matter). Best regards, Krzysztof
On Fri, May 03, 2024 at 09:09:30AM GMT, Krzysztof Kozlowski wrote: > On 03/05/2024 04:20, Inochi Amaoto wrote: > > Due to the design, Sophgo SG2042 use an external MCU to provide > > hardware information, thermal information and reset control. > > > > Add bindings for this monitor device. > > > + > > +required: > > + - compatible > > + - reg > > + - "#thermal-sensor-cells" > > + > > +allOf: > > + - $ref: ../thermal/thermal-sensor.yaml# > > Where did you find such path? Please use full path instead, so > /schemas/thermal..... Thanks. I will change it. > > > + > > +additionalProperties: false > > unevaluatedProperties: false instead (even though currently it does not > matter). > Thanks, I have checked json schema doc, using "unevaluatedProperties" is more suitable. > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml b/Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml new file mode 100644 index 000000000000..6c114f42ef03 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/sophgo,sg2042-hwmon-mcu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sophgo SG2042 onboard MCU support + +maintainers: + - Inochi Amaoto <inochiama@outlook.com> + +properties: + compatible: + const: sophgo,sg2042-hwmon-mcu + + reg: + maxItems: 1 + + "#thermal-sensor-cells": + const: 1 + +required: + - compatible + - reg + - "#thermal-sensor-cells" + +allOf: + - $ref: ../thermal/thermal-sensor.yaml# + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hwmon@17 { + compatible = "sophgo,sg2042-hwmon-mcu"; + reg = <0x17>; + #thermal-sensor-cells = <1>; + }; + };
Due to the design, Sophgo SG2042 use an external MCU to provide hardware information, thermal information and reset control. Add bindings for this monitor device. Signed-off-by: Inochi Amaoto <inochiama@outlook.com> --- .../hwmon/sophgo,sg2042-hwmon-mcu.yaml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml -- 2.45.0