From patchwork Fri Jul 7 10:50:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Feng X-Patchwork-Id: 1804861 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QyCN5530Jz20Nq for ; Fri, 7 Jul 2023 22:27:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D2059861E6; Fri, 7 Jul 2023 14:27:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id E1F09863ED; Fri, 7 Jul 2023 12:50:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by phobos.denx.de (Postfix) with ESMTP id 1D0A9863E4 for ; Fri, 7 Jul 2023 12:50:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=hal.feng@starfivetech.com Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 724C724E24F; Fri, 7 Jul 2023 18:50:12 +0800 (CST) Received: from EXMBX172.cuchost.com (172.16.6.92) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 7 Jul 2023 18:50:12 +0800 Received: from ubuntu.localdomain (113.72.145.114) by EXMBX172.cuchost.com (172.16.6.92) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 7 Jul 2023 18:50:11 +0800 From: Hal Feng To: Lukasz Majewski , Sean Anderson , "Rick Chen" , Leo , Torsten Duwe , Conor Dooley , Yanhong Wang , Emil Renner Berthing , Xingyu Wu , Hal Feng CC: Subject: [PATCH v1 0/5] Make the clock dt-bindings and DT nodes consistent with Linux Date: Fri, 7 Jul 2023 18:50:06 +0800 Message-ID: <20230707105011.129241-1-hal.feng@starfivetech.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Originating-IP: [113.72.145.114] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX172.cuchost.com (172.16.6.92) X-YovoleRuleAgent: yovoleflag X-Mailman-Approved-At: Fri, 07 Jul 2023 14:27:05 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The clock dt-bindings and DT nodes are not consistent with Linux now. Let's sync them with Linux, so the same dtb can work for Linux & U-Boot. To achieve this goal, the PLL clock driver is separated and some clock IDs conversion is needed in clock drivers. For the motivation, please see the discussion in the link below. [1] https://patchwork.kernel.org/project/linux-riscv/patch/20230512022036.97987-2-xingyu.wu@starfivetech.com/ Xingyu Wu (5): clk: starfive: jh7110: Separate the PLL driver riscv: dts: jh7110: Add PLL clock controller node riscv: dts: jh7110: Add clock source from PLL dt-bindings: clock: jh7110: Modify clock id to be same with Linux clk: starfive: jh7110: Add of_xlate ops and macros for clock id conversion .../dts/jh7110-starfive-visionfive-2.dtsi | 6 +- arch/riscv/dts/jh7110-u-boot.dtsi | 1 - arch/riscv/dts/jh7110.dtsi | 16 +- drivers/clk/starfive/clk-jh7110-pll.c | 103 +++++- drivers/clk/starfive/clk-jh7110.c | 306 +++++++++++------- drivers/clk/starfive/clk.h | 58 +--- .../dt-bindings/clock/starfive,jh7110-crg.h | 101 +++--- 7 files changed, 365 insertions(+), 226 deletions(-) base-commit: e1bebc16e1d9aa0ddd56c53c0b781f7186dce557 Reviewed-by: Torsten Duwe