Message ID | 20230501084401.765169-3-cristian.ciocaltea@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2558411vqo; Mon, 1 May 2023 01:45:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ79X8K0oAZrB86ft21zEzqi8rA5975MW3c8+nAFH+l7yudz5dyWk/cAnvVwFNXutphOy92M X-Received: by 2002:a05:6a20:c892:b0:f5:b78b:654 with SMTP id hb18-20020a056a20c89200b000f5b78b0654mr13134865pzb.15.1682930745097; Mon, 01 May 2023 01:45:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682930745; cv=none; d=google.com; s=arc-20160816; b=a45iStf7O6Hn+bjaDUZhnF0oUGMibUpybH3dMbrOLrjYN4+zK8NlO2zGMUKC2V6nkV 5ch03/scnYbc188fjaMTsnVW8JCAKu6IeHdIHnJCrOc0w6EPqnaKWmnNh2+WgD0Z8KNA auknSH88emxUnNe55zb5gQP+MtFHO0yRaYkTr/gFKuFZwHq+pzDUT6Wh5MOY6tVqu/qK 4H4pIYjORQ4OYGzRtq0UPwmWvk/NaoJZsm81j29/09rOZW7r4Vac4am7dcGudr63joK7 Cp7ISSUu34q5ifSDMMha9aPiTxctpaSW3eZuYiRbTHbu3iAnTCVJL7hRjSujSGNmKuqK 480g== 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:date:subject:cc:to:from :dkim-signature; bh=TT8MEsi5vaClOkJ7v3R27CiK4FK0J72UChiuNHVh51U=; b=DhRwceM5Tsr2j3xz3Dpx42aJNXoXbc6TUIsmDh2Zp/T5hh25x6KUyvISaYzEB9hQdx 8aqKZI8F66DeifoVKmOGoZIRsSR/Z49EyD3pbtfv2ehytaESlPktTFoW42kp6VOhezHX Na0PnYoksRrru1/rfEf1GiI64TLJkS+0498wypB+l+QSfYqS8wUzxhjxKUaGzl7vZYwj oKzEI+Qs+oSzrJQbCHtA8ZegvQ8wchij/XqtAV8o4hbdaw8cHuDKYWUnXZMeNvI5zKcS miCBDPxEEZ3lalirn3N5WzksHNiydVzkRm/ts1SxP2Pj87FY4nUowA/Sp4pvPKWuWxln t09A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dDtM4xXk; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q4-20020a634304000000b00524b2358ffcsi27302047pga.574.2023.05.01.01.45.31; Mon, 01 May 2023 01:45:45 -0700 (PDT) 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=@collabora.com header.s=mail header.b=dDtM4xXk; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232296AbjEAIoT (ORCPT <rfc822;rbbytesnap@gmail.com> + 99 others); Mon, 1 May 2023 04:44:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbjEAIoN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 1 May 2023 04:44:13 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D0B10E7; Mon, 1 May 2023 01:44:12 -0700 (PDT) Received: from localhost (unknown [188.27.34.213]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id EC90866031F8; Mon, 1 May 2023 09:44:10 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1682930651; bh=yOu4hxNG9H8E3BYZJ09jRWvIMd5u45GgHcAb3KhsBXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dDtM4xXkSvrO9zdyBpA378ZJAH4M4xhc/dBOhKHaCOt+9q5hwE0pELA34MPZ+5FYv 7jqO+uj9fguFhOi6cHFI4hkdJX3pJppxA3yD92B7JYgdPfiXahOU0yyskQch7zhtho y0Fi5zukqvta1IISIzKQWtPUIc8IaskyI6nDtLiaHC+WFb8A6K7hRNdFRVtYD8pydi twf95xDWKxcWNTw6i8HBMpHlXcAZOEZZCaZUXcbWC82fB1frbWIYFfWuUdbjpE+EG+ pBJCVYA9hYqPLOZyX7Lk6mBvjolYDh6aNl3eZ0LlapUSoJ/+X6C9TI51ZCRXl+AUu0 YWtqnDKAxOK9A== From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Heiko Stuebner <heiko@sntech.de>, Philipp Zabel <p.zabel@pengutronix.de>, Sebastian Reichel <sebastian.reichel@collabora.com>, Shreeya Patel <shreeya.patel@collabora.com>, Kever Yang <kever.yang@rock-chips.com>, Finley Xiao <finley.xiao@rock-chips.com> Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH 2/8] dt-bindings: nvmem: rockchip-otp: Add compatible for RK3588 Date: Mon, 1 May 2023 11:43:54 +0300 Message-Id: <20230501084401.765169-3-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230501084401.765169-1-cristian.ciocaltea@collabora.com> References: <20230501084401.765169-1-cristian.ciocaltea@collabora.com> 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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?1764680789165456103?= X-GMAIL-MSGID: =?utf-8?q?1764680789165456103?= |
Series |
Add RK3588 OTP memory support
|
|
Commit Message
Cristian Ciocaltea
May 1, 2023, 8:43 a.m. UTC
Document the OTP memory found on Rockchip RK3588 SoC.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
.../bindings/nvmem/rockchip-otp.yaml | 71 ++++++++++++++++---
1 file changed, 60 insertions(+), 11 deletions(-)
Comments
Hi, Am Montag, 1. Mai 2023, 10:43:54 CEST schrieb Cristian Ciocaltea: > Document the OTP memory found on Rockchip RK3588 SoC. nit: I guess the changed clock and resets configuration for rk3588 variants could be mentioned in the commit message. Reviewed-by: Heiko Stuebner <heiko@sntech.de> > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> > --- > .../bindings/nvmem/rockchip-otp.yaml | 71 ++++++++++++++++--- > 1 file changed, 60 insertions(+), 11 deletions(-) > > diff --git a/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml b/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml > index 658ceed14ee2..84a11382c6e7 100644 > --- a/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml > +++ b/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml > @@ -9,34 +9,31 @@ title: Rockchip internal OTP (One Time Programmable) memory > maintainers: > - Heiko Stuebner <heiko@sntech.de> > > -allOf: > - - $ref: nvmem.yaml# > - > properties: > compatible: > enum: > - rockchip,px30-otp > - rockchip,rk3308-otp > + - rockchip,rk3588-otp > > reg: > maxItems: 1 > > clocks: > minItems: 3 > - maxItems: 3 > + maxItems: 4 > > clock-names: > - items: > - - const: otp > - - const: apb_pclk > - - const: phy > + minItems: 3 > + maxItems: 4 > > resets: > - maxItems: 1 > + minItems: 1 > + maxItems: 3 > > reset-names: > - items: > - - const: phy > + minItems: 1 > + maxItems: 3 > > required: > - compatible > @@ -46,6 +43,58 @@ required: > - resets > - reset-names > > +allOf: > + - $ref: nvmem.yaml# > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - rockchip,px30-otp > + - rockchip,rk3308-otp > + then: > + properties: > + clocks: > + minItems: 3 > + maxItems: 3 > + clock-names: > + items: > + - const: otp > + - const: apb_pclk > + - const: phy > + resets: > + maxItems: 1 > + reset-names: > + items: > + - const: phy > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - rockchip,rk3588-otp > + then: > + properties: > + clocks: > + minItems: 4 > + maxItems: 4 > + clock-names: > + items: > + - const: otpc > + - const: apb > + - const: arb > + - const: phy > + resets: > + minItems: 1 > + maxItems: 3 > + reset-names: > + items: > + - const: otpc > + - const: apb > + - const: arb > + > unevaluatedProperties: false > > examples: >
Hello Heiko, On 5/2/23 11:42, Heiko Stübner wrote: > Hi, > > Am Montag, 1. Mai 2023, 10:43:54 CEST schrieb Cristian Ciocaltea: >> Document the OTP memory found on Rockchip RK3588 SoC. > > nit: I guess the changed clock and resets configuration for rk3588 variants > could be mentioned in the commit message. Sure, I will update the commit message if a new revision of the patch series is required. > Reviewed-by: Heiko Stuebner <heiko@sntech.de> Thanks for reviewing! Regards, Cristian
On 01/05/2023 10:43, Cristian Ciocaltea wrote: > Document the OTP memory found on Rockchip RK3588 SoC. > > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> > --- > .../bindings/nvmem/rockchip-otp.yaml | 71 ++++++++++++++++--- > 1 file changed, 60 insertions(+), 11 deletions(-) > > diff --git a/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml b/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml > index 658ceed14ee2..84a11382c6e7 100644 > --- a/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml > +++ b/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml > @@ -9,34 +9,31 @@ title: Rockchip internal OTP (One Time Programmable) memory > maintainers: > - Heiko Stuebner <heiko@sntech.de> > > -allOf: > - - $ref: nvmem.yaml# > - > properties: > compatible: > enum: > - rockchip,px30-otp > - rockchip,rk3308-otp > + - rockchip,rk3588-otp > > reg: > maxItems: 1 > > clocks: > minItems: 3 > - maxItems: 3 > + maxItems: 4 > > clock-names: > - items: > - - const: otp > - - const: apb_pclk > - - const: phy > + minItems: 3 > + maxItems: 4 > > resets: > - maxItems: 1 > + minItems: 1 > + maxItems: 3 > > reset-names: > - items: > - - const: phy > + minItems: 1 > + maxItems: 3 > > required: > - compatible > @@ -46,6 +43,58 @@ required: > - resets > - reset-names > > +allOf: > + - $ref: nvmem.yaml# > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - rockchip,px30-otp > + - rockchip,rk3308-otp > + then: > + properties: > + clocks: > + minItems: 3 > + maxItems: 3 > + clock-names: > + items: > + - const: otp > + - const: apb_pclk > + - const: phy > + resets: > + maxItems: 1 > + reset-names: > + items: > + - const: phy > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - rockchip,rk3588-otp > + then: > + properties: > + clocks: > + minItems: 4 > + maxItems: 4 > + clock-names: > + items: > + - const: otpc > + - const: apb > + - const: arb > + - const: phy Keep the same order of clocks as in older variants, so you can keep the list in top-level place and here only minItems: 4. > + resets: > + minItems: 1 > + maxItems: 3 > + reset-names: > + items: > + - const: otpc Shouldn't this be phy? Best regards, Krzysztof
On 5/3/23 09:28, Krzysztof Kozlowski wrote: > On 01/05/2023 10:43, Cristian Ciocaltea wrote: >> Document the OTP memory found on Rockchip RK3588 SoC. >> >> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> >> --- >> .../bindings/nvmem/rockchip-otp.yaml | 71 ++++++++++++++++--- >> 1 file changed, 60 insertions(+), 11 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml b/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml >> index 658ceed14ee2..84a11382c6e7 100644 >> --- a/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml >> +++ b/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml >> @@ -9,34 +9,31 @@ title: Rockchip internal OTP (One Time Programmable) memory >> maintainers: >> - Heiko Stuebner <heiko@sntech.de> >> >> -allOf: >> - - $ref: nvmem.yaml# >> - >> properties: >> compatible: >> enum: >> - rockchip,px30-otp >> - rockchip,rk3308-otp >> + - rockchip,rk3588-otp >> >> reg: >> maxItems: 1 >> >> clocks: >> minItems: 3 >> - maxItems: 3 >> + maxItems: 4 >> >> clock-names: >> - items: >> - - const: otp >> - - const: apb_pclk >> - - const: phy >> + minItems: 3 >> + maxItems: 4 >> >> resets: >> - maxItems: 1 >> + minItems: 1 >> + maxItems: 3 >> >> reset-names: >> - items: >> - - const: phy >> + minItems: 1 >> + maxItems: 3 >> >> required: >> - compatible >> @@ -46,6 +43,58 @@ required: >> - resets >> - reset-names >> >> +allOf: >> + - $ref: nvmem.yaml# >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - rockchip,px30-otp >> + - rockchip,rk3308-otp >> + then: >> + properties: >> + clocks: >> + minItems: 3 >> + maxItems: 3 >> + clock-names: >> + items: >> + - const: otp >> + - const: apb_pclk >> + - const: phy >> + resets: >> + maxItems: 1 >> + reset-names: >> + items: >> + - const: phy >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - rockchip,rk3588-otp >> + then: >> + properties: >> + clocks: >> + minItems: 4 >> + maxItems: 4 >> + clock-names: >> + items: >> + - const: otpc >> + - const: apb >> + - const: arb >> + - const: phy > > Keep the same order of clocks as in older variants, so you can keep the > list in top-level place and here only minItems: 4. > >> + resets: >> + minItems: 1 >> + maxItems: 3 >> + reset-names: >> + items: >> + - const: otpc > > Shouldn't this be phy? It seems there is no reset for PHY, or at least I couldn't find any reference in the RK3588 TRM, nor in the downstream driver implementation. Thanks for reviewing! I will prepare v2 with all the requested changes. Kind regards, Cristian
On 04/05/2023 16:14, Cristian Ciocaltea wrote: >>> + reset-names: >>> + items: >>> + - const: phy >>> + >>> + - if: >>> + properties: >>> + compatible: >>> + contains: >>> + enum: >>> + - rockchip,rk3588-otp >>> + then: >>> + properties: >>> + clocks: >>> + minItems: 4 >>> + maxItems: 4 >>> + clock-names: >>> + items: >>> + - const: otpc >>> + - const: apb >>> + - const: arb >>> + - const: phy >> >> Keep the same order of clocks as in older variants, so you can keep the >> list in top-level place and here only minItems: 4. >> >>> + resets: >>> + minItems: 1 >>> + maxItems: 3 >>> + reset-names: >>> + items: >>> + - const: otpc >> >> Shouldn't this be phy? > > It seems there is no reset for PHY, or at least I couldn't find any > reference in the RK3588 TRM, nor in the downstream driver implementation. OK, just to be sure that this is not the same reset as rk3308 just differently named in consumer. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml b/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml index 658ceed14ee2..84a11382c6e7 100644 --- a/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml +++ b/Documentation/devicetree/bindings/nvmem/rockchip-otp.yaml @@ -9,34 +9,31 @@ title: Rockchip internal OTP (One Time Programmable) memory maintainers: - Heiko Stuebner <heiko@sntech.de> -allOf: - - $ref: nvmem.yaml# - properties: compatible: enum: - rockchip,px30-otp - rockchip,rk3308-otp + - rockchip,rk3588-otp reg: maxItems: 1 clocks: minItems: 3 - maxItems: 3 + maxItems: 4 clock-names: - items: - - const: otp - - const: apb_pclk - - const: phy + minItems: 3 + maxItems: 4 resets: - maxItems: 1 + minItems: 1 + maxItems: 3 reset-names: - items: - - const: phy + minItems: 1 + maxItems: 3 required: - compatible @@ -46,6 +43,58 @@ required: - resets - reset-names +allOf: + - $ref: nvmem.yaml# + + - if: + properties: + compatible: + contains: + enum: + - rockchip,px30-otp + - rockchip,rk3308-otp + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: otp + - const: apb_pclk + - const: phy + resets: + maxItems: 1 + reset-names: + items: + - const: phy + + - if: + properties: + compatible: + contains: + enum: + - rockchip,rk3588-otp + then: + properties: + clocks: + minItems: 4 + maxItems: 4 + clock-names: + items: + - const: otpc + - const: apb + - const: arb + - const: phy + resets: + minItems: 1 + maxItems: 3 + reset-names: + items: + - const: otpc + - const: apb + - const: arb + unevaluatedProperties: false examples: