Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8491728ybi; Thu, 6 Jun 2019 13:18:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTtVjqiYGwyjlvrTZXiEITIFKh5eHq55gGC+L+ymtp4kFNnfG164QVUsvQqH4ykvcvHa4z X-Received: by 2002:a62:61c2:: with SMTP id v185mr39447060pfb.0.1559852312402; Thu, 06 Jun 2019 13:18:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559852312; cv=none; d=google.com; s=arc-20160816; b=FFn/xdGQwnOKdvr6+ee6DcCLCCv0j8RliqBllepIY/UnQ6VeDrPseOKZAFv7K2KU1f Qub5KpuZbCWvhBL4I1/3K3lXprwBRy55n15SyD3KQs1iPmuEyFeeFrDLRhjHSHJI/RRX HILQPN8YzBQyBxPGvxSfwb2625yVo6VzFElDUL2A4ETTNG19I5q+ngaNINhtFjaHHVjp aQHCjveolRQV/W+28dVvB2h/MfD5Zkh2bz6jOG8iaFG8L+peXPljc36E3/pWmsH/cLph av8Cuv2TANB8yyxQjmXCSL2Aukg+c9KXSlqnLi3TqgV3p6wmPtgVrPn/j6Lz8XOxhmYv Ce7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wGZZja4pj4ztNwQ9lR3/UUwJOv78Qh9P9Xjpyh0RQ78=; b=T9GfEJDtNsKGO/mu5c8zDkG3X7KkAiLe+rbdVpMq7MvdzPzCQHnfoRUGsvN/4sAOMn 9rO9iT0QVCQ1fdKobhLAM6qBYBmvSdziGhmZ9ZXJzqwfRtQeiGwHItsnmzivgmfQhbIM sFwQ/4LyiqXp7rOXa4q4pcFB9t0BK0tf5VUH0JO9h67TqO3IC+dTp5isSPmHrf26UZST KVnbPYOg/v79v3vJuK+O4S7FMSPxh6lDxgjgcC1eEeL9SXwvKt2zURCPmRH+L8XBNi+u 7noW1LWxE/rDeY47HnlOeTEDc8lDAJBd06lJjINe8ODk2ohgVkinFL+eSjHoCEcFX0vI CBtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=MlguHHFV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p19si62568plq.47.2019.06.06.13.18.16; Thu, 06 Jun 2019 13:18:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=MlguHHFV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728970AbfFFTQt (ORCPT + 99 others); Thu, 6 Jun 2019 15:16:49 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:33865 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728504AbfFFTQt (ORCPT ); Thu, 6 Jun 2019 15:16:49 -0400 Received: by mail-oi1-f196.google.com with SMTP id u64so2431795oib.1; Thu, 06 Jun 2019 12:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wGZZja4pj4ztNwQ9lR3/UUwJOv78Qh9P9Xjpyh0RQ78=; b=MlguHHFVeVF5g8EuutoY2+4e4/Pw0Jksvx2WO+YX4EXH/vrWpw8vSrRkHDsQ5pCprF VOOrYSbElvFQPDJ1pyFaOT1ZJsULnLmMJqy1IsxnVZdQ2TX7jIHv0e0ss70lh5ntGrCr 9h5SGrKKopTt92DtlXKrgLixrRZN3HTlEp/DsazX5SMtFLNu/HDahe78SQy0E27BH+bd RxBmkb4hwXMColZk5JNlqwaiHmrUdxk+iPbBcJNiYM0JuHJkuGRnqrkSb2EDhX3CPXFR 5vgsiGzCykpZt901hiOso3ha0jcf1ibamJ27d0TLyi7mkiDkAOrclJVHjLg6ZD6sw/qp a+1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wGZZja4pj4ztNwQ9lR3/UUwJOv78Qh9P9Xjpyh0RQ78=; b=fHE53kWwp2M1AzeSg+QyuS5oCN8RL/wxiFyWqbL1Jjejw2/1uuXXlncvLX7JdWjhX8 vMnLS+YP5J26ZWxAygTXaos5vjhpoMKIVhb31F4NX+82rmcLbBb7lPmLBLwtRdQV23CY fRD62P1AzCIMUAzF9aN8eJGZSdlYk8JzCzFJ7cJtuqEoeijrFWYyz+CpHsmtRmOx4FRe era8uIjj3pG8UiN2my5OLsCotTj11G4a3KL0bx/XSYUYpzF1uuBy21/1uEYjqLeSerGr 5G4iQH2biJFyTCiQwvd7nJz331G5Y/3MJOO7+L3X/geF2l5J4HxZ6r3+NHotqIXETwxq vzbg== X-Gm-Message-State: APjAAAXzEEZMYcU73JLCaV1dm5SU4GUn8PJr1G1slm/CrqBIVO1bE41S W+qrRVvWRDOcFpvWuq0V7fr8VQbGzmyTbejIq07weLQN X-Received: by 2002:aca:3545:: with SMTP id c66mr1176682oia.129.1559848608679; Thu, 06 Jun 2019 12:16:48 -0700 (PDT) MIME-Version: 1.0 References: <20190604144714.2009-1-glaroque@baylibre.com> <20190604144714.2009-2-glaroque@baylibre.com> In-Reply-To: <20190604144714.2009-2-glaroque@baylibre.com> From: Martin Blumenstingl Date: Thu, 6 Jun 2019 21:16:37 +0200 Message-ID: Subject: Re: [PATCH 1/3] Documentation: dt-bindings: add the Amlogic Meson Temperature Sensor To: Guillaume La Roque Cc: jic23@kernel.org, khilman@baylibre.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guillaume, thank you for working on this! On Tue, Jun 4, 2019 at 4:47 PM Guillaume La Roque wrote: > > This adds the devicetree binding documentation for the Temperature > Sensor found in the Amlogic Meson G12 SoCs. > Currently only the G12A SoCs are supported. so G12B is not supported (yet)? > Signed-off-by: Guillaume La Roque > --- > .../iio/temperature/amlogic,meson-tsensor.txt | 31 +++++++++++++++++++ > 1 file changed, 31 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/temperature/amlogic,meson-tsensor.txt > > diff --git a/Documentation/devicetree/bindings/iio/temperature/amlogic,meson-tsensor.txt b/Documentation/devicetree/bindings/iio/temperature/amlogic,meson-tsensor.txt > new file mode 100644 > index 000000000000..d064db0e9cac > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/temperature/amlogic,meson-tsensor.txt > @@ -0,0 +1,31 @@ > +* Amlogic Meson Temperature Sensor > + > +Required properties: > +- compatible: depending on the SoC and the position of the sensor, > + this should be one of: > + - "amlogic,meson-g12a-cpu-tsensor" for the CPU G12A SoC sensor > + - "amlogic,meson-g12a-ddr-tsensor" for the DDR G12A SoC sensor > + followed by the common : > + - "amlogic,meson-g12a-tsensor" for G12A SoC family > +- reg: the physical base address and length of the registers > +- interrupts: the interrupt indicating end of sampling > +- clocks: phandle identifier for the reference clock of temperature sensor > +- #io-channel-cells: must be 1, see ../iio-bindings.txt have you considered using the thermal framework [0] instead of the iio framework (see below)? > +- amlogic,ao-secure: phandle to the ao-secure syscon the driver has some "u_efuse_off" access. do we need to get some calibration values from the AO syscon or can we also fetch it from the eFuse? you can look at arch/arm/boot/dts/meson8.dtsi where I'm passing the temperature sensor calibration data to the SAR ADC (there's no dedicated temperature sensor IP block prior to G12A) while reading the data from the eFuse > +Optional properties: > +- amlogic,critical-temperature: temperature value in milli degrees Celsius > + to set automatic reboot on too high temperature as far as I can tell the thermal framework supports multiple trip points. I'm seeing this as a benefit because the hardware can raise interrupts at four different temperatures (defined by the driver) > +Example: > + cpu_temp: temperature-sensor@ff634800 { > + compatible = "amlogic,meson-g12a-cpu-tsensor", > + "amlogic,meson-g12a-tsensor"; > + reg = <0x0 0xff634800 0x0 0x50>; > + interrupts = ; > + clocks = <&clkc CLKID_TS>; > + status = "okay"; as far as I know the dt-bindings should not have a status property in the examples Martin