Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1385702rdh; Mon, 25 Sep 2023 11:04:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwlqSc7iiMTEpxwDIe/Mw8Hzlo1cbvDLxRk6eNoT8qbjHffjy/p6xF/vviudY/kFWuYXgv X-Received: by 2002:a05:6a20:9152:b0:15e:2d9f:cae0 with SMTP id x18-20020a056a20915200b0015e2d9fcae0mr5250413pzc.10.1695665072824; Mon, 25 Sep 2023 11:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695665072; cv=none; d=google.com; s=arc-20160816; b=pKABgCCPNl7/YKuX4YP3RBBRGfBuEwtBYpxbGqw2sWMbncupw4mC+2s/tnNSH2car7 HkrCh/nNdF1cP8ZYLPf/8LhhARi9NBTqUTzmUUtmGiTFJkYaLvG3OiklE2xvyhw2wY1w +fbg7aspKb4jB1AASzNvCQc8K4apclIwPvi556f/hDFG6MMocNIzP8UkMAmFzALNMtPf QuFHGA8ESN5yRRQ2QJDPCiLQ8hPKYl1gqH83j38ChQ7U64mJM8/EUFw+kVAYroaFzqeP HKMQi6i0M9jxp75f45SPPpRlXwQ7KfZ9PSZD0H+QJmIWY5wa90lx2TmTyOI72B6mtEco LuLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=6SN9NivOTsc8sakMicg9i+/IJk/H+78dC/BCTYdELmg=; fh=KeJLBOEidrPwBQjSOh6EAJ/6Onmk41lVyyQYTL9VDxo=; b=Xnv3MKyju3XNPnLZXEQ8pekg0FfStoKL+OYTp364Jf88mjLv+ism7G1yCHSjCwlPzC Jp1XZSHbIQjpPR0p9mPZtgL0ql5MzHewR5uo3sjWuWb6RDoI/J9CW6V3QQmFQ+0Ev/ih PUPQaJUQchzH3O32Ipb89YX1JfDHEXRCISVamXsDbnYo94HsweftlakgashYFtYCENj+ 40FG90DOSHWCmhXje1Z2OXSYY4ybUJZoDkC3Zcx+LfgoCn4576f5ILplOhk6TukhLBNo RC03tK7Klo38RGofmmfk2ookhQLStL6VbsyXA9gvwahSAv7hKhrADSTB414DfBX8/0q2 /BJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id x26-20020a63171a000000b0057cbd803b37si8382402pgl.463.2023.09.25.11.04.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 11:04:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 4AB9480203DF; Mon, 25 Sep 2023 11:03:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232165AbjIYSDH (ORCPT + 99 others); Mon, 25 Sep 2023 14:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbjIYSDG (ORCPT ); Mon, 25 Sep 2023 14:03:06 -0400 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a02:c205:3004:2154::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DA6510D; Mon, 25 Sep 2023 11:02:58 -0700 (PDT) Received: from pd9e2f713.dip0.t-ipconnect.de ([217.226.247.19] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qkpuo-004At7-Ci; Mon, 25 Sep 2023 20:02:38 +0200 Date: Mon, 25 Sep 2023 20:02:36 +0200 From: Andreas Kemnade To: Jonathan Cameron Cc: Krzysztof Kozlowski , , , , , , , , , , , , , , Subject: Re: [PATCH 1/3] dt-bindings: iio: imu: mpu6050: Add level shifter Message-ID: <20230925200236.55fe2db7@aktux> In-Reply-To: <20230925142157.00000914@Huawei.com> References: <20230924222559.2038721-1-andreas@kemnade.info> <20230924222559.2038721-2-andreas@kemnade.info> <6db5b758-2ae6-46fb-a699-d73a2b98b4c2@linaro.org> <20230925112852.00007d34@Huawei.com> <20230925130225.55fe6fd4@aktux> <3b81a9a7-69a3-4fd6-875f-7a5170c5c872@linaro.org> <20230925142157.00000914@Huawei.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 25 Sep 2023 11:03:25 -0700 (PDT) On Mon, 25 Sep 2023 14:21:57 +0100 Jonathan Cameron wrote: > On Mon, 25 Sep 2023 14:24:32 +0200 > Krzysztof Kozlowski wrote: > > > On 25/09/2023 13:02, Andreas Kemnade wrote: > > > On Mon, 25 Sep 2023 11:28:52 +0100 > > > Jonathan Cameron wrote: > > > > > >> On Mon, 25 Sep 2023 08:54:08 +0200 > > >> Krzysztof Kozlowski wrote: > > >> > > >>> On 25/09/2023 00:25, Andreas Kemnade wrote: > > >>>> Found in ancient platform data struct: > > >>>> level_shifter: 0: VLogic, 1: VDD > > >>>> > > >>>> Signed-off-by: Andreas Kemnade > > >>>> --- > > >>>> .../devicetree/bindings/iio/imu/invensense,mpu6050.yaml | 2 ++ > > >>>> 1 file changed, 2 insertions(+) > > >>>> > > >>>> diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml > > >>>> index 1db6952ddca5e..6aae2272fa15c 100644 > > >>>> --- a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml > > >>>> +++ b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml > > >>>> @@ -48,6 +48,8 @@ properties: > > >>>> > > >>>> mount-matrix: true > > >>>> > > >>>> + invensense,level-shifter: true > > >>> > > >>> It does not look like you tested the bindings, at least after quick > > >>> look. Please run `make dt_binding_check` (see > > >>> Documentation/devicetree/bindings/writing-schema.rst for instructions). > > >>> Maybe you need to update your dtschema and yamllint. > > >>> > > >>> Best regards, > > >>> Krzysztof > > >>> > > >>> > > >> > > >> Also this one isn't obvious - give it a description in the binding doc. > > >> > > >> I'm not sure of the arguement for calling it level shift in general. > > >> > > > I have no more descrption than the old source (see the citation from there) citation = line from ancient pdata struct comment cited in the commit message. > > > https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-9150-Register-Map.pdf > > > > I could not find any reference to level shift in this manual. To which > > page and part do you refer? > > > > > > > > does not list it. But that bit is needed to get things to work what also does the > > > vendor kernel do. > > > > > > What could be a better descrption? > > > > I don't know, but something reasonable to you should be put there. > > The text you have in the commit log seems better than nothing. > I suspect it's internally wiring VDD to VDDIO. Normally people just > connect both power supplies to same supply if they want to do that, > but maybe there was a chip variant that didn't have enough pins? > > If you have the device, can you see it actually matches the packaging > types in the manual? > packaging matches. It is just as usual. I think VLogic (=VDDIO) would be 1.8V while VDD needs to be something higher, so I guess here it might be 3.3V. There are some slight hints about level shifting here: https://product.tdk.com/system/files/dam/doc/product/sensor/mortion-inertial/imu/data_sheet/mpu-9150-datasheet.pdf page 37. The aux i2c bus seem to run at levels till VDD. But here, there seems to be nothing at the aux i2c bus besides that internal magnetometer. Regards, Andreas