Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4869679imc; Mon, 25 Feb 2019 12:38:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IYE72oYdAXKGt4WjbRc/FsaWEFg25FyLJApGPHiGPE+qinaAbKJvBa7ApDfH6CyHdUkyZXq X-Received: by 2002:a17:902:6508:: with SMTP id b8mr22633598plk.17.1551127115915; Mon, 25 Feb 2019 12:38:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551127115; cv=none; d=google.com; s=arc-20160816; b=TQaBijOZm+WZZbNz5+XrMjIJAtRTlDcdFTlsy5ldyzpXVvH4q+pqm8wvQ3ylnVP0iy hPJr1HccQCwfi0yboWcPr5wv2+wbLNRPJx/uCSrY8gEtVG+GBxhBiM24GYsEkyx5QPrg UQKkbiM7sGVBFjOwmknxNRItyVUKn7bpJ8znHkrJQ24uh6xFDRgpoH9Pw0aufL+VLeG5 dxq3ZKA/RFZSVynl4y75ez4QIFfQK8cXOxsuVvrEG8GWJ+uKP4iSOCnSdQgBPO4i7jt1 vMadrdO2YzgNj/IUtRvIw3GtJ59YZFPg1FXCI229zKX/r3KQUOKpKPs6acl8SnE1aS8I fkZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=OlMfOERKozt0qCMopgmfdQ2h0YOTELN011HcmqzEV9s=; b=v/V00DYdDawSUKYAFWF0zm/+B3+9TNC4XGYpTahgCq4XKwoXUnNJrMtC2YtvXzSYJa 2hxdd7lT0ZxNOy5L+4herZWZsqPwoQAGBwlxYucKS5GoH22U2j6toc6aM+9ujbYM6uwO s+z38MAYkffvlr118NApCz3sjlIY1tWbU8EfIpTHBcPtwGxT9xTf/PddzJg28VGCfaxy +1LH5XVaM2f6Fh/vafR8Ag1oBau5uQVspWOV72J0DswBjdAlIxNfTqrINXzUnMatL5mR o5pw9mIFdzxrZPqpGe5U8pTw9lkJ5QdQaX8Fxtwe1pvSqjrEVxdln3bsXi7Eo4J+uDTQ c+Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o9gjqnJJ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c132si10225498pga.597.2019.02.25.12.38.20; Mon, 25 Feb 2019 12:38:35 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=o9gjqnJJ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727413AbfBYUh7 (ORCPT + 99 others); Mon, 25 Feb 2019 15:37:59 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:50488 "EHLO mail-wm1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727113AbfBYUh7 (ORCPT ); Mon, 25 Feb 2019 15:37:59 -0500 Received: by mail-wm1-f47.google.com with SMTP id x7so297263wmj.0; Mon, 25 Feb 2019 12:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OlMfOERKozt0qCMopgmfdQ2h0YOTELN011HcmqzEV9s=; b=o9gjqnJJZ7PyKFRd/AhbVmlk0ALQg6hynrw1/yZPSPoeUI/0ZgcIInuEWdt/Ws3stV IpXDfvus0eNTR20XuIJ0D1kS4a5QKEfcVua57JaAMNClSwUlheQsAIIPB8UrP5+e7zEu 6DgFn3Oc8Sa/gFKBIeCmku4UvtVXKxBVMc1aFhAz9eqPjpJ1qSKE6s5YoxCo1k3IiUMg Rmy62U77zPIICGnLkOcTks5jgYkaSFYDz/EyezLTbylcDij50GZ+iAjrFukRbPO3rSVL zoDQZ2xT/KXPDkK5YzHLaGEtnFFb3aAepxd3QDbLsA8asTAmf45Mr9GCo1N+iAXXUu+a 7NKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OlMfOERKozt0qCMopgmfdQ2h0YOTELN011HcmqzEV9s=; b=GmE8gb3YsAzFWccUHxX4RhcJPuSx20PzpmVcX16f4ciqKWbdtjqK4bs3SLwu/glFBs c3R7yJMeC8DG6DxS3fWl7PSIgu0o0ipOb5FmPY/pigZcHP9DVFb85Jik+3QnhtSs9p1H QA6iNufRQdpwTMfzcH/AWgU4abkFJ7TPvsGlt+Rbup4ieqCpM4bDETKBjNDGmnGl0uPB LWJ5gsVtdTJCgvRbq3QpElUwFv4OLcE4wVFJp1DA9KD9C7JCY87n1QqMfxDhoKW6Unr8 7IGtzgU+M6YXufW8Y46spIOLNfcSxQp++zbfbABwpfSG4F1uDUcWc7j/wIyf6cLGJM4j z96g== X-Gm-Message-State: AHQUAua7Qlxhaf1Gf5GSg/gs7Vz6MIr0FdESoxWeDswHmlhEdt4WOWlc li4bw2Ir2C3weVYkvHzejJk= X-Received: by 2002:a1c:30b:: with SMTP id 11mr380532wmd.110.1551127077093; Mon, 25 Feb 2019 12:37:57 -0800 (PST) Received: from ?IPv6:2a02:810d:340:17ec::1b62? ([2a02:810d:340:17ec::1b62]) by smtp.gmail.com with ESMTPSA id v6sm13268375wrd.88.2019.02.25.12.37.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 12:37:56 -0800 (PST) Subject: Re: Allwinner SID THS calibration data cell representation? To: Chen-Yu Tsai , Maxime Ripard Cc: Emmanuel Vadot , Rob Herring , Mark Rutland , Jonathan Cameron , Quentin Schulz , Icenowy Zheng , linux-iio@vger.kernel.org, devicetree , linux-sunxi , linux-kernel , linux-arm-kernel References: <20180830154518.29507-1-embed3d@gmail.com> <20180830154518.29507-28-embed3d@gmail.com> <20180904184623.e4386b8e6b657b1b25e90c09@bidouilliste.com> <55579dd6-625d-e71b-1482-4592dccac665@gmail.com> <20180906115114.inc6dhqhy47obo25@flea> From: Philipp Rossak Message-ID: Date: Mon, 25 Feb 2019 21:37:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.02.19 08:54, Chen-Yu Tsai wrote: > Sorry for resurrecting an old discussion, but since someone posted patches > for H5 and H6, I thought we should resolve this. I'm working on patches to > fix / replace the big-endian issue. > > On Thu, Sep 6, 2018 at 7:51 PM Maxime Ripard wrote: >> >> On Thu, Sep 06, 2018 at 01:47:47PM +0200, Philipp Rossak wrote: >>> On 04.09.2018 18:46, Emmanuel Vadot wrote: >>>>> + /* Data cells */ >>>>> + thermal_calibration: calib@234 { >>>>> + reg = <0x234 0x8>; >>>>> + }; >>>> You are declaring 8 bytes of calibration data but to my knowledge it's >>>> only 2 bytes per sensor, so 2 bytes for H3. >>>> Am I missing something ? >>>> >>>> Thanks, >>> >>> Emmanuel you are right, it is 2 bytes per Sensor and should be 2 bytes for >>> H3, but the thermal calibration data field is on all chips 64 bit wide - so >>> 8 bytes. So I'm reading here the complete calibration data field. >> >> Having one cell per channel would make more sense I guess. > > Would it? The 2 32-bit words directly map onto the registers 0x74 / 0x78 in > the THS. As far as the SID is concerned, their is just one consumer for this > data, the thermal sensor. How the thermal sensor uses that data is really not > its concern. And the thermal sensor is really just copying the data from the > e-fuses into its registers. Nothing more. Using 2 32-bit words for the THS would be also ok (from my perspective). > > Furthermore, with the register access interface, the e-fuses are read/write > 32 bits at a time. Seems to me it would make more sense to enforce a 32-bit > word size, so cells should be multiples of 32 bits. > For THS I'm ok with that. > Regards > ChenYu > Regards, Philipp