Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2711440rdh; Sun, 26 Nov 2023 16:58:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHo+8u8CSl2jeEOCyK3GFtmTKvO25COSnBd040AR9u99RgtDxuynAYmM8Zmf/sBVgB4+wWv X-Received: by 2002:a17:90b:1d90:b0:285:b6be:d89c with SMTP id pf16-20020a17090b1d9000b00285b6bed89cmr4795220pjb.7.1701046723960; Sun, 26 Nov 2023 16:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701046723; cv=none; d=google.com; s=arc-20160816; b=Nn6FqDjAGaa1Rs3R/ew+7+iCAadmK0w9gUH1XXh1He0Ic9YR37kzc8RLPcb6V1aRnu 5k9LxSTKPnendUtqI157TceKt7N0fVVUbmw2C3be6GepwGT89dZ5B9rxP8xjXoOcolLc B8330irB4L+tmAGOMTm9wcgfrr3bbWCK7oakzj+yLWvtjd5d/nKfvBcvoJjSCjPq9OFa xK01mc25rhvm4vvQnVmINKYN87XjT6HxKjh8gscd3JCISmREow0zKgkIbHOx3Zz5UYWR VwZR2qeuHqJ/ZFV2uFbVA8pLKVgR634X9jhNWo/kN9vy0cNJxQx2rNGE5KujBF9Uvad6 r5Fw== 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=anuKUTT2qQ23MO72ERy79Xb3CqrQxY2OTkF5ssDc4FA=; fh=KH8xm6lWnQmjdwi1VtR18ptPhMUvoKU3JPF7cI3jXZo=; b=gZD7OH2JL/fYUkAfGxkeArs7DADOmUt0+VaozfL1dUXh5HPARG3tnpNbk4fnVPjsi3 Ex529nOeIm2N4uUagWFV9xHVTj9OCpgT9LdWygpPvl7p7/WGU4VIQN/Qukbbsd/gf1Om mqBZyWnuGZ0d9mwSKoc5K4lgzQyWDOt98Z5poToLiOGd+SGO9aRXLQc3ichLXHRG6kRn Qil8+Yn5P0PIeqxRIEuqqO8e5gDCESZxw20gRXS1xTAXX//CL9Jf8vgHWw3LF4DL9lZL KTWgGUQ+oXqZ8dqKaai+4ktzv6xJfrnnmk52dt6D0nGwzPC+Cr+DwkkLOBnekQsePRnj 6M3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MX7dQbbl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id nk10-20020a17090b194a00b002850de13989si8924587pjb.175.2023.11.26.16.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 16:58:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MX7dQbbl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 063D18080EEB; Sun, 26 Nov 2023 16:58:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbjK0A5o (ORCPT + 99 others); Sun, 26 Nov 2023 19:57:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231186AbjK0A5n (ORCPT ); Sun, 26 Nov 2023 19:57:43 -0500 Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B17F4111; Sun, 26 Nov 2023 16:57:49 -0800 (PST) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-1f9efd5303cso1782368fac.0; Sun, 26 Nov 2023 16:57:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701046667; x=1701651467; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=anuKUTT2qQ23MO72ERy79Xb3CqrQxY2OTkF5ssDc4FA=; b=MX7dQbblJAmUsOfb9LSbsa6T2BwyV6Zu93/IpleDM6MO3SYPxv0HRPJzxePzQdF70s IvNIP9/zBbKV4h0us6ddU51bMAIVFCWyt+u9NGnooXdKLKA8ZprUDOC/mss2x7ribj7V 75JJ/DyjJJIs3FM84bNEpzBUkRPqHUnyIrvdtgheXVYdnzgiI2i3/z71GGG+ZOb7s1gf oKu6LSRkCqRWzpX3yGziQ4njdIUtz1QrFN5Am1inYVVFnzqS3l4V4WnTxITOn8vzI4Mq cFt3zyqgAEE8WT1h+kEb/TiZ1V0UO5bhMSh482fMdo2SJVqEaWVmGwBsUmBBAFI/Qd2X johw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701046667; x=1701651467; 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=anuKUTT2qQ23MO72ERy79Xb3CqrQxY2OTkF5ssDc4FA=; b=UQS56WwXDj0zFUXpDLX0zcXcPwFWo17ja2eFItyDr68CrgMSaWSl8Cmr8gbJxEGCht 2VbK7HZXSM0/U+zqqgpBafhjf7czh7kHQ5RFJcXJvC4gGbcGVaiWBPU/0YRf79rcihM9 I6p6bN3nJGEKVJ/VtQZG9sqPxo7tNhF96GlOtVVjANxJlVJhqjr+N86utEt0ynKiL2I9 rpwCQnoceF1KTRepbQL4VVOwLQsWtWLctoIuNtWIU19PDIHVE5Sh1JbcBzE0bKVaTbE9 zideVJD8Iciscm4BIsWisvCJOVP7czmyTXa59Ql1X0uD5M5h1sdMUFNjCXyJuEyn4EBt Ptgg== X-Gm-Message-State: AOJu0YwwUFv5jXLC37iJfpFNVmRVMfzcYv1P5Jfsr/UlUrwZymB7AQom Hs9vDGLni4y2O4L5ZrQIjhs= X-Received: by 2002:a05:6870:5490:b0:1fa:2fbc:5906 with SMTP id f16-20020a056870549000b001fa2fbc5906mr5838689oan.42.1701046667393; Sun, 26 Nov 2023 16:57:47 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id pi10-20020a0568704c8a00b001f9ec4edbfbsm1651566oab.50.2023.11.26.16.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 16:57:47 -0800 (PST) From: Chen Wang To: aou@eecs.berkeley.edu, chao.wei@sophgo.com, conor@kernel.org, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, palmer@dabbelt.com, paul.walmsley@sifive.com, richardcochran@gmail.com, robh+dt@kernel.org, sboyd@kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, haijiao.liu@sophgo.com, xiaoguang.xing@sophgo.com, guoren@kernel.org, jszhang@kernel.org, inochiama@outlook.com, samuel.holland@sifive.com Cc: Chen Wang Subject: [PATCH v2 0/4] riscv: sophgo: add clock support for sg2042 Date: Mon, 27 Nov 2023 08:57:38 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Sun, 26 Nov 2023 16:58:41 -0800 (PST) From: Chen Wang This series adds clock controller support for sophgo sg2042. Thanks, Chen --- Changes in v2: The patch series is based on v6.7-rc1. You can simply review or test the patches at the link [2]. - Squashed the patch adding clock definitions with the patch adding the binding for the clock controller. - Updating dt-binding for syscon, remove oneOf for property compatible; define clock controller as child of syscon. - DTS changes: merge sg2042-clock.dtsi into sg2042.dtsi; move clock-frequency property of osc to board devicethree due to the oscillator is outside the SoC. - Fixed some bugs in driver code during testing, including removing warnings for rv32_defconfig. - Updated MAINTAINERS info. Changes in v1: The patch series is based on v6.7-rc1. You can simply review or test the patches at the link [1]. Link: https://github.com/unicornx/linux-riscv/commits/upstream-sg2042-clock-v1 [1] Link: https://github.com/unicornx/linux-riscv/commits/upstream-sg2042-clock-v2 [2] --- Chen Wang (4): dt-bindings: clock: sophgo: Add SG2042 bindings dt-bindings: soc: sophgo: Add Sophgo syscon module clk: sophgo: Add SG2042 clock generator driver riscv: dts: add clock generator for Sophgo SG2042 SoC .../clock/sophgo/sophgo,sg2042-clkgen.yaml | 42 + .../soc/sophgo/sophgo,sg2042-syscon.yaml | 58 + MAINTAINERS | 7 + .../boot/dts/sophgo/sg2042-milkv-pioneer.dts | 4 + arch/riscv/boot/dts/sophgo/sg2042.dtsi | 77 + drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/sophgo/Kconfig | 8 + drivers/clk/sophgo/Makefile | 2 + drivers/clk/sophgo/clk-sophgo-sg2042.c | 1357 +++++++++++++++++ drivers/clk/sophgo/clk-sophgo-sg2042.h | 222 +++ include/dt-bindings/clock/sophgo-sg2042-clk.h | 169 ++ 12 files changed, 1948 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/sophgo/sophgo,sg2042-clkgen.yaml create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,sg2042-syscon.yaml create mode 100644 drivers/clk/sophgo/Kconfig create mode 100644 drivers/clk/sophgo/Makefile create mode 100644 drivers/clk/sophgo/clk-sophgo-sg2042.c create mode 100644 drivers/clk/sophgo/clk-sophgo-sg2042.h create mode 100644 include/dt-bindings/clock/sophgo-sg2042-clk.h base-commit: b85ea95d086471afb4ad062012a4d73cd328fa86 -- 2.25.1