From patchwork Thu May 4 20:06:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 90231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp598618vqo; Thu, 4 May 2023 13:49:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6V8Ti3pMmJ17Z4D+P/lCD0Fdd4kasbDil+xc450oBzH67IyE5yZi8Y57VhDiP5Yus7RkMI X-Received: by 2002:a17:902:74c1:b0:19e:ab29:1ec2 with SMTP id f1-20020a17090274c100b0019eab291ec2mr4953404plt.65.1683233393163; Thu, 04 May 2023 13:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683233393; cv=none; d=google.com; s=arc-20160816; b=XrLtYYqhCaa93jEoM4HP6Hq3aChjdEpbe+hjuljKacq/Gh5b5TRa2ZQvbks+D+Uo3x k21PD+Uu5F7fWzA60PuwW7OolC2n7JnnFgttH2AGPtndJ1OFhHfnQP84tTUvPy9YDMT2 xAp6uhc+Opjw3tCCb+0pk/06hcsgqHwTQMtbqeRwWLz2ZNw2IzmnllFXwdp79IGPg1yk Vf8RiOgm6vLU0kpPxQ5wY6vW5I9QOhXk9pNsAVFR0mGt9VW8y26GCE6CdwdvyvblYoTD dLhFZhXFiKXGqdAgW+FLsVA7GIxNi0Go721vQHfA6t5MX29C0lpiHVJN4A8QRQuQpkxE YOkQ== 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=Yhj/iaGu6miSkIO1iSWDsIvB1hOGaVWSbMbPYzmXO/0=; b=JqfMKGthx1l/J8Ro/aanv4PR0aoTfhdfGXCMMD+8O0oG+vIJinE0YZluqZjndtmIEM PLJJTvsxFnH1j1aZN8ByhGyw6kGRREmjRHHBDRLa72sNQspZXKd18WeWQsSo5wDFa5HB DJcbqFkCdRXZ/GIeGF2iZq80FD2fLgNHhTox5zj4X9YUwTMz5B/gWijzR1O/7T/C8GDC WucyxuiaOMaD2HMf2Z2FdkaRaEd54dcXSO1arofAVywK5zmOD2acp9jZoNtjw0D9InRT PgTX7748l04pojXCnI+eRLnTvlSiYTKwmABUvoS95Jq75meVnkXlXH0mZxioSt69qUX4 LJqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nYzofxzl; 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 l12-20020a170902f68c00b001a96c3b93besi31106213plg.68.2023.05.04.13.49.40; Thu, 04 May 2023 13:49:53 -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=nYzofxzl; 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 S229802AbjEDUtU (ORCPT + 99 others); Thu, 4 May 2023 16:49:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbjEDUtE (ORCPT ); Thu, 4 May 2023 16:49:04 -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 0E58C46B9; Thu, 4 May 2023 13:48:32 -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 E03A66605700; Thu, 4 May 2023 21:07:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1683230822; bh=MaX5xiMpkREv1mrGy3uq4EJmAVpURoqntpnyiSAp4pw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nYzofxzlXC5bJnckergPL6/YhJyiLjHvHA+dWpDbHjxUQU6PiBTLpJh5XmAsiipiJ cgWK9F4V9Xm2vSHp0oT2N45u3oWekNfvXLT/6wERI1Gj+FSCQshNE/ufUR3Rheuged Hkwh8HC6lL9O9YhjNqBu67KwodpU82PAgd8p0kprR1HNvP/Z6/hkpESQkSK0oLx8D0 T19DOyzLAlpHU/euxIkcPEWYSu1zMRh+5NlcbkgN8aBpFhSsz6kUht/IwDQ5PN00/b dqjQvZOW2iw9NOP+ydWdjUkEGz4jcuTiEQEoYgWiZSaW59RkvQ2YxGSagh4MqJ/a6b fxqh04rEBITMg== From: Cristian Ciocaltea To: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Philipp Zabel , Sebastian Reichel , Shreeya Patel , Kever Yang , Finley Xiao , Vincent Legoll 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 v2 2/8] dt-bindings: nvmem: rockchip,otp: Add compatible for RK3588 Date: Thu, 4 May 2023 23:06:42 +0300 Message-Id: <20230504200648.1119866-3-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230504200648.1119866-1-cristian.ciocaltea@collabora.com> References: <20230504200648.1119866-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764998138090259223?= X-GMAIL-MSGID: =?utf-8?q?1764998138090259223?= Document the OTP memory found on Rockchip RK3588 SoC. Since RK3588 uses different clocks & resets configurations than PX30 / RK3308, provide the required changes in the binding to be able to handle both variants. Signed-off-by: Cristian Ciocaltea Reviewed-by: Heiko Stuebner Reviewed-by: Krzysztof Kozlowski --- .../bindings/nvmem/rockchip,otp.yaml | 54 ++++++++++++++++--- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml b/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml index 4cd425ae2823..9c6eff788928 100644 --- a/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml +++ b/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml @@ -9,33 +9,35 @@ title: Rockchip internal OTP (One Time Programmable) memory maintainers: - Heiko Stuebner -allOf: - - $ref: nvmem.yaml# - properties: compatible: enum: - rockchip,px30-otp - rockchip,rk3308-otp + - rockchip,rk3588-otp reg: maxItems: 1 clocks: - maxItems: 3 + minItems: 3 + maxItems: 4 clock-names: + minItems: 3 items: - const: otp - const: apb_pclk - const: phy + - const: arb resets: - maxItems: 1 + minItems: 1 + maxItems: 3 reset-names: - items: - - const: phy + minItems: 1 + maxItems: 3 required: - compatible @@ -45,6 +47,44 @@ required: - resets - reset-names +allOf: + - $ref: nvmem.yaml# + + - if: + properties: + compatible: + contains: + enum: + - rockchip,px30-otp + - rockchip,rk3308-otp + then: + properties: + clocks: + maxItems: 3 + resets: + maxItems: 1 + reset-names: + items: + - const: phy + + - if: + properties: + compatible: + contains: + enum: + - rockchip,rk3588-otp + then: + properties: + clocks: + minItems: 4 + resets: + minItems: 3 + reset-names: + items: + - const: otp + - const: apb + - const: arb + unevaluatedProperties: false examples: