Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1515465rdb; Thu, 7 Dec 2023 00:57:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3TsR0tHHfJbRj5qQncKQnn1Z819ODgGDHHz4OAXqADYck22FGOoTAFzu+d+XNRpruGDps X-Received: by 2002:a05:6358:f57:b0:170:2013:c8f5 with SMTP id c23-20020a0563580f5700b001702013c8f5mr2030584rwj.53.1701939447476; Thu, 07 Dec 2023 00:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701939447; cv=none; d=google.com; s=arc-20160816; b=0vTlilcApLJJsvlhaqNF41BrSPd1aOC/n/ttHCzRxX/REK8T+A8X/Nx14nh6EOfDfl cZbLffmaxMPyjd08h4OUZ+I2+oVMXT1MOwEzQe2jh309K38h/YWq6AM3Qk1he0UhyQzz HiG72s7svIA2X/4TvFcdkAfMr3qQ+bsAJttfgkTyq/+U5PNtr1OBCQlWcnV+ywwUjxJa n8tMxvpQYWYHxl3Amm+k0WfP5a1MjZmr5V7BWnCWCPP6ka0XFPHeuaUz1WdzS5xnEqUa iKQu+9Jy1mSTajPr6FnR5kBFHaRVAu0Qy8ooJfDncCsyLxrV33Rdu3dn1BR6h0JgMpUX ZoIA== 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=P11i5JtOr3fzuVQuonrXRUS+CyP/6OsLPEuxS5gelmY=; fh=KH8xm6lWnQmjdwi1VtR18ptPhMUvoKU3JPF7cI3jXZo=; b=DB5S0e+Cjn8PZm9dNy0yijHeIkHot1RXqJ3zBQ2c1ZHd2rSPpWVI6Afhy8yE8k8awN XBALm+h8vurIYp3Lp/mnucgCgSiRPJvlnXSxhGe1Oj/FrZclhyUqyA+DFpMAodpSN964 /8vSB9nXf+qhNmfroMm7gqAtD2Rr3N9w3YpVAnRC9bT0RYyfqPkYvianrkJb/3L15W+i DBUh0NgE7CP3Ypq2mJ/g7YcGXMqshLsC6Dgdop+R9DUHKGF2yfHYZYqkWdTEXDLaujUK qkV5kyjQPxKKrvIcGLtB4ldXrn/6FMNrdpEo6yqmlllYCeTQRJ5udA/g9SAadLio/PQL 3H2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z6uW96EL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y14-20020a056a00180e00b006ce387bc2fesi878335pfa.260.2023.12.07.00.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 00:57:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z6uW96EL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 587328050FBF; Thu, 7 Dec 2023 00:57:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231439AbjLGI5P (ORCPT + 99 others); Thu, 7 Dec 2023 03:57:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231144AbjLGI5M (ORCPT ); Thu, 7 Dec 2023 03:57:12 -0500 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59E1310C8; Thu, 7 Dec 2023 00:57:18 -0800 (PST) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1fa26074783so485813fac.1; Thu, 07 Dec 2023 00:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701939437; x=1702544237; 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=P11i5JtOr3fzuVQuonrXRUS+CyP/6OsLPEuxS5gelmY=; b=Z6uW96ELdejKG/oxlqbq8xw6VHpb0BsLFo3RAEuiCTa4U1Vmc8sCAl5uP/Dk0iJkNO xH8GLs9ZQrcoHiITSrwJpCndQVkqg4hdBF2YEtJ8Eb/33Y/nusdfXZIix+o4/XqAfIIs pwHRogEqqVbhZAh7i2N7YITnEA/z5bpUvO1jhJbJ5Vd8sB+jAhHPe/MG8jrdplisd9ss 5hsIGUhgjTX8G+skY1c/5oJsyK2vSts84gpTxPS/6e+9pGIm9ChuzyyF1zpYSoRDYoZF M8O81IfGmCIJlXPPaMpHvr+rDpWEDiR33bwfBJFo96CXBKGCYvUE+0lnROEmWp+F2nBh UW+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701939437; x=1702544237; 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=P11i5JtOr3fzuVQuonrXRUS+CyP/6OsLPEuxS5gelmY=; b=vUbpKOopEpOLh7npE15dXKD6ZDWJgVqOgdE4lJ0U/WXYJxNwfkZ9xvK+fYTW480v8e k0lFtyM60Udsimj3IavahV0sAzGHTkbB6qsqV24G/xA7Vk9NUyI8bjor7f54WHBkW4Gy oIsmvUvsFUxqXYUf54TXMgLrYlntq8CC4n55dqnOfrlCUNyTgnLrH2SvYnQD91xuHxCC 6//bjwHSP9EIBOJRUbSFUdlw0Q+vhzwy+/iV4cDO0Rn5quXHdyoOTKjobzQllr5ASE7r XSx2hUzeX+GFKV7KjfvY4dhR5E2mQd+xkKzN7ejCbzXNX0kBPOn9CBmQ/wwRlemz8Ybw /83A== X-Gm-Message-State: AOJu0YzrISQH2/kJptSV8024EJjzkKp3fdlbx6qjBYHuSEKCcN9f/Woh t1L76wo9AcnRD8SDHUfn2nhRA1/Zha0= X-Received: by 2002:a05:6870:296:b0:1fa:fcd5:9ba6 with SMTP id q22-20020a056870029600b001fafcd59ba6mr2467290oaf.53.1701939437235; Thu, 07 Dec 2023 00:57:17 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id lw11-20020a0568708e0b00b001fb4aaf261csm193168oab.32.2023.12.07.00.57.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 00:57:16 -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 v5 0/4] riscv: sophgo: add clock support for sg2042 Date: Thu, 7 Dec 2023 16:57:08 +0800 Message-Id: X-Mailer: git-send-email 2.34.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_BLOCKED,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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 00:57:26 -0800 (PST) From: Chen Wang This series adds clock controller support for sophgo sg2042. Thanks, Chen --- Changes in v5: The patch series is based on v6.7-rc1. You can simply review or test the patches at the link [6]. - dt-bindings: improved yaml, such as: - add vendor prefix for system-ctrl property for clock generator. - Add explanation for system-ctrl property. - move sophgo,sg2042-clkgen.yaml to directly under clock folder. - fixed bugs for driver Makefile/Kconfig - continue cleaning-up debug print for driver code. Changes in v4: The patch series is based on v6.7-rc1. You can simply review or test the patches at the link [5]. - dt-bindings: fixed a dt_binding_check error. Changes in v3: The patch series is based on v6.7-rc1. You can simply review or test the patches at the link [3]. - DTS: don't use syscon but define sg2042 specific system control node. More background info can read [4]. - Updating minor issues in dt-bindings as per input from reviews. 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] Link: https://github.com/unicornx/linux-riscv/commits/upstream-sg2042-clock-v3 [3] Link: https://lore.kernel.org/linux-riscv/MA0P287MB03329AE180378E1A2E034374FE82A@MA0P287MB0332.INDP287.PROD.OUTLOOK.COM/ [4] Link: https://github.com/unicornx/linux-riscv/commits/upstream-sg2042-clock-v4 [5] Link: https://github.com/unicornx/linux-riscv/commits/upstream-sg2042-clock-v5 [6] --- Chen Wang (4): dt-bindings: soc: sophgo: Add Sophgo system control module dt-bindings: clock: sophgo: support SG2042 clk: sophgo: Add SG2042 clock generator driver riscv: dts: add clock generator for Sophgo SG2042 SoC .../bindings/clock/sophgo,sg2042-clkgen.yaml | 53 + .../soc/sophgo/sophgo,sg2042-sysctrl.yaml | 34 + MAINTAINERS | 7 + .../boot/dts/sophgo/sg2042-milkv-pioneer.dts | 4 + arch/riscv/boot/dts/sophgo/sg2042.dtsi | 79 + 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 | 1355 +++++++++++++++++ drivers/clk/sophgo/clk-sophgo-sg2042.h | 226 +++ .../dt-bindings/clock/sophgo,sg2042-clkgen.h | 169 ++ 12 files changed, 1939 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/sophgo,sg2042-clkgen.yaml create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,sg2042-sysctrl.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-clkgen.h base-commit: b85ea95d086471afb4ad062012a4d73cd328fa86 -- 2.25.1