Message ID | 20230215010914.104754-1-frattaroli.nicolas@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3299402wrn; Tue, 14 Feb 2023 17:22:54 -0800 (PST) X-Google-Smtp-Source: AK7set+5utqunqw9CrS8CbtP03GYyQiPZATAIDBF2mikOS7jSMhRIgfzY+SmW+SS4VjVU6JXo5hJ X-Received: by 2002:a17:90b:380a:b0:233:f393:f6cd with SMTP id mq10-20020a17090b380a00b00233f393f6cdmr965236pjb.5.1676424174580; Tue, 14 Feb 2023 17:22:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676424174; cv=none; d=google.com; s=arc-20160816; b=V/nff9eY+J8IDDZbiZJqF9rMjoe4/PEVoA2xaamncCjwF4FFz/FCNPqG0uJ310efzg Lr+WaB+nZKcTjDpH2LWAwu1FXThifRDYr3JDRLnwjxdfIM3utrqjT4aJlglDztzpxy6I ho+IW8VoqTHDWdZU6XEGZ0r2vBtBcfMJB1a01JnC0OH80SViZaulQz3WT/wBESKX+L9H 7zwO5xWuNMIrh2uVYCYKJ99CMn/fOoNLfgGcQ644a0k4lxzVxt8GBJiAucSiIk+hZyQ2 wZQ5jPZYK5ZHnO7eIzMruLYIOPrlIe2UcJZHSiuY+LIJPFdYyMZzzAHAuukWombGlI+w 5d+w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=6xckzojwyNuatglXQ8YBBBb8WXJgZ0AoA0JB30UI/Xs=; b=kYhZD3hwQXztk9oCOvmnAGvV8Dqt3kGJmZE+WPPA/dwcXpQvd0bQ99umusYzD9BVBe YpLvFRkwZz4pMltP41gM421w+3KqkhqlVPFT6ZUR7/nIf6Y8vR4edmIgXosGcYzeFTBL 4T8aWMWnJiyxgR3KPAcFm0UGIiHpeoRbKshxH8rMbIyaGNgP7vlvng9eZ9Zjs/4FyqWU 3LrY6vS8WlvsNeg6zwkNzZsXE/GJXxpznyhxL1p+ESr/QXokgViHvg4nAcc27N/5RHAG Q+lyFXrEQZqy+A2Yv3jUcrAiwADruvc3WQuE+XEzaZ7flIM/1hP/CGNAOOnhaGqMcgaE wYFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OgYp86eu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a17090ad34800b00230cc557396si546666pjx.73.2023.02.14.17.22.19; Tue, 14 Feb 2023 17:22:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OgYp86eu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233456AbjBOBRh (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Tue, 14 Feb 2023 20:17:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjBOBRa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Feb 2023 20:17:30 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E52B3400D; Tue, 14 Feb 2023 17:17:11 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id j17so25823882lfr.3; Tue, 14 Feb 2023 17:17:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6xckzojwyNuatglXQ8YBBBb8WXJgZ0AoA0JB30UI/Xs=; b=OgYp86eufa4KJDkPuznprFyD9bBb5XXjiNsIs6ic99AHYTTPSVR/1RXGmuIPcBnVZS S2thwIhTULgtlMFbIaDQSlEPApuegu4bG6DVC4jyz/cF6PHIm7u1Dk8yQsuOmbXZiggP T+S4q8Ma+sqAn6g5ffekiyI5OPuEZR3C0KVYxyjmE07jpiEm9Bjkx6upNOSuKv0aktoa LGl+MK4WWemu2Ghtd9I8WVd1lIc9W600tp+BIMw1myFzATAX3r5bAHzXgYnUaMzQtW1W +Pq4fPZbfDX50Utvo2d5I4SABLTUDlBdeQxaf9Gzjk4Xi1yBCOJppwI6bSfqhktn0XFv nbWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6xckzojwyNuatglXQ8YBBBb8WXJgZ0AoA0JB30UI/Xs=; b=Ajf45M47y+YR6m+y0XxwAPiMQM3ad5YHmowaXHa37i4cBiDLRveNFFrkwLtSFtP4qk IW0X0HxIdBVLMeOrUwX7d2qNZ3X67JjakidKpdnK0ikbpRtYJbxSevH7rpzgzyPLBfJY cshbAbxib8rjzMtuIHJVYz9WkOpMhfxqY7ZDFuehy2o1pK0XSn5cqK/j2MOp4jf2hJoS JfRbc3IxGpN3EuQJDYDWm7CtRg4EEEx+68TOAY38JR3lh4Y81gfockjQjD9T7fnhk7/Z sd6AdMF4E3AHDzA6HisNgzDRNxxGowZ7bmvM1WM/TBbwcGnTImpz7+Zd6K/Kwta3znNC JAtg== X-Gm-Message-State: AO0yUKVNsHm6l9VLQB/8JbwuRIgE4Uk7JQksT92EtM6bjiTIFB+s4Q+K 7jSYefSdC+PtpNCQx3pnRp5Ej47WhBOxIQ== X-Received: by 2002:adf:fece:0:b0:2c5:5ff8:6b01 with SMTP id q14-20020adffece000000b002c55ff86b01mr112414wrs.1.1676423357323; Tue, 14 Feb 2023 17:09:17 -0800 (PST) Received: from archbox.v.cablecom.net (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id v15-20020adfebcf000000b002c3f81c51b6sm14198505wrn.90.2023.02.14.17.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 17:09:16 -0800 (PST) From: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Heiko Stuebner <heiko@sntech.de>, Nicolas Frattaroli <frattaroli.nicolas@gmail.com>, Peter Geis <pgwipeout@gmail.com> Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: dts: rockchip: Always enable sd regulator on SOQuartz CM4IO Date: Wed, 15 Feb 2023 02:09:14 +0100 Message-Id: <20230215010914.104754-1-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757858154794361732?= X-GMAIL-MSGID: =?utf-8?q?1757858154794361732?= |
Series |
arm64: dts: rockchip: Always enable sd regulator on SOQuartz CM4IO
|
|
Commit Message
Nicolas Frattaroli
Feb. 15, 2023, 1:09 a.m. UTC
The 3.3V line coming from the SDMMC regulator is required for USB
on the CM4IO board. Without it, the USB mux (U13 in the CM4IO
schematic[1]) that's used likely remains unpowered, and no USB
devices show up.
The consequence of this was the behaviour of an inserted SD card
allowing USB to work, while pulling it out turned off all USB
devices.
[1]: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf
Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts")
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts | 6 ++++++
1 file changed, 6 insertions(+)
Comments
On Tue, Feb 14, 2023 at 8:09 PM Nicolas Frattaroli <frattaroli.nicolas@gmail.com> wrote: > > The 3.3V line coming from the SDMMC regulator is required for USB > on the CM4IO board. Without it, the USB mux (U13 in the CM4IO > schematic[1]) that's used likely remains unpowered, and no USB > devices show up. > > The consequence of this was the behaviour of an inserted SD card > allowing USB to work, while pulling it out turned off all USB > devices. > > [1]: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf I disagree with this. According to the datasheet u13 and half a dozen other devices are powered by 3.3v sourced from the SOM. sdmmc_pwr triggers SD_PWR_ON which serves only to provide an enable signal to u18, the regulator that powers the sdmmc slot from the same 3.3v. If you are having problems with USB working, you likely have something else going wrong here. Very Respectfully, Peter Geis > > Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts") > Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> > --- > arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts > index 263ce40770dd..88a61fa8a95c 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts > +++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts > @@ -135,6 +135,12 @@ &sdmmc0 { > }; > > &sdmmc_pwr { > + /* > + * USB also needs this regulator to work on this board, so just enable > + * it unconditionally. > + */ > + regulator-always-on; > + regulator-boot-on; > regulator-min-microvolt = <3300000>; > regulator-max-microvolt = <3300000>; > status = "okay"; > -- > 2.39.1 >
On Thursday, 23 February 2023 01:29:39 CET Peter Geis wrote: > On Tue, Feb 14, 2023 at 8:09 PM Nicolas Frattaroli > > <frattaroli.nicolas@gmail.com> wrote: > > The 3.3V line coming from the SDMMC regulator is required for USB > > on the CM4IO board. Without it, the USB mux (U13 in the CM4IO > > schematic[1]) that's used likely remains unpowered, and no USB > > devices show up. > > > > The consequence of this was the behaviour of an inserted SD card > > allowing USB to work, while pulling it out turned off all USB > > devices. > > > > [1]: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf > > I disagree with this. According to the datasheet u13 and half a dozen > other devices are powered by 3.3v sourced from the SOM. sdmmc_pwr > triggers SD_PWR_ON which serves only to provide an enable signal to > u18, the regulator that powers the sdmmc slot from the same 3.3v. If > you are having problems with USB working, you likely have something > else going wrong here. > > Very Respectfully, > Peter Geis Hello, I don't see how else the observed behaviour would be triggered. As far as I can tell, the sdmmc_pwr regulator is the name of the 3.3V regulator on the SOM, which is what powers the 3.3V on the USB mux chip. Do you have an alternate explanation for why this patch works? Kind regards, Nicolas Frattaroli > > > Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts") > > Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> > > --- > > > > arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts > > b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts index > > 263ce40770dd..88a61fa8a95c 100644 > > --- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts > > +++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts > > @@ -135,6 +135,12 @@ &sdmmc0 { > > > > }; > > > > &sdmmc_pwr { > > > > + /* > > + * USB also needs this regulator to work on this board, so just > > enable + * it unconditionally. > > + */ > > + regulator-always-on; > > + regulator-boot-on; > > > > regulator-min-microvolt = <3300000>; > > regulator-max-microvolt = <3300000>; > > status = "okay"; > > > > -- > > 2.39.1
On Thu, Feb 23, 2023 at 12:53 AM Nicolas Frattaroli <frattaroli.nicolas@gmail.com> wrote: > > On Thursday, 23 February 2023 01:29:39 CET Peter Geis wrote: > > On Tue, Feb 14, 2023 at 8:09 PM Nicolas Frattaroli > > > > <frattaroli.nicolas@gmail.com> wrote: > > > The 3.3V line coming from the SDMMC regulator is required for USB > > > on the CM4IO board. Without it, the USB mux (U13 in the CM4IO > > > schematic[1]) that's used likely remains unpowered, and no USB > > > devices show up. > > > > > > The consequence of this was the behaviour of an inserted SD card > > > allowing USB to work, while pulling it out turned off all USB > > > devices. > > > > > > [1]: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf > > > > I disagree with this. According to the datasheet u13 and half a dozen > > other devices are powered by 3.3v sourced from the SOM. sdmmc_pwr > > triggers SD_PWR_ON which serves only to provide an enable signal to > > u18, the regulator that powers the sdmmc slot from the same 3.3v. If > > you are having problems with USB working, you likely have something > > else going wrong here. > > > > Very Respectfully, > > Peter Geis > > Hello, > > I don't see how else the observed behaviour would be triggered. > As far as I can tell, the sdmmc_pwr regulator is the name of the > 3.3V regulator on the SOM, which is what powers the 3.3V on the > USB mux chip. > > Do you have an alternate explanation for why this patch works? If you have the new variant of the SoQuartz, that pin is no longer sdmmc power and now feeds nEXTRST. As the variant I built this device tree from was not the final production version and is only operated by a few individuals (such as myself) you should probably just adjust this to the production variant. On the production variant the sdmmc power pin is pulled high to 3.3v and cannot be controlled, which lead to the issues observed with the prototype model a baseboard. Very Respectfully, Peter Geis > > Kind regards, > Nicolas Frattaroli > > > > > > Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts") > > > Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> > > > --- > > > > > > arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts | 6 ++++++ > > > 1 file changed, 6 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts > > > b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts index > > > 263ce40770dd..88a61fa8a95c 100644 > > > --- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts > > > +++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts > > > @@ -135,6 +135,12 @@ &sdmmc0 { > > > > > > }; > > > > > > &sdmmc_pwr { > > > > > > + /* > > > + * USB also needs this regulator to work on this board, so just > > > enable + * it unconditionally. > > > + */ > > > + regulator-always-on; > > > + regulator-boot-on; > > > > > > regulator-min-microvolt = <3300000>; > > > regulator-max-microvolt = <3300000>; > > > status = "okay"; > > > > > > -- > > > 2.39.1 > > > >
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts index 263ce40770dd..88a61fa8a95c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts @@ -135,6 +135,12 @@ &sdmmc0 { }; &sdmmc_pwr { + /* + * USB also needs this regulator to work on this board, so just enable + * it unconditionally. + */ + regulator-always-on; + regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; status = "okay";