From: Xingyu Wu <xingyu.wu@starfivetech.com> To: <linux-riscv@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-watchdog@vger.kernel.org>, Wim Van Sebroeck <wim@linux-watchdog.org>, Guenter Roeck <linux@roeck-us.net>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Emil Renner Berthing <kernel@esmil.dk>, Conor Dooley <conor@kernel.org> Cc: Rob Herring <robh+dt@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Philipp Zabel <p.zabel@pengutronix.de>, Xingyu Wu <xingyu.wu@starfivetech.com>, Samin Guo <samin.guo@starfivetech.com>, <linux-kernel@vger.kernel.org> Subject: [PATCH v5 0/3] Add watchdog driver for StarFive JH7100/JH7110 RISC-V SoCs Date: Tue, 14 Mar 2023 21:24:34 +0800 [thread overview] Message-ID: <20230314132437.121534-1-xingyu.wu@starfivetech.com> (raw) This patch serises are to add watchdog driver for the StarFive JH7100 and JH7110 RISC-V SoCs. The first patch adds docunmentation to describe device tree bindings. The subsequent patch adds watchdog driver and support JH7100/JH7110 SoCs. And the last patch adds watchdog node in the JH7100 dts. And the addition of JH7110 device tree node will be submitted after the JH7110 dts merge. This patchset is based on 6.3-rc1. The watchdog driver has been tested on the VisionFive 1 and VisionFive 2 boards which equip with JH7100 and JH7110 SoCs respectively and both works normally. Changes since v4: Patch 2: - Dropped the struct device. - Renamed the struct watchdog_device. - Modified the struct reset_control to be local variable. - Fixed the exit error with spinlock. - Dropped the function of starfive_wdt_is_locked(). - Changed the macro name of 'OPTIONS'. - Changed the order in probe to do less work if return '-EPROBE_DEFER'. - Fixed some function that ignored return value. Patch 3: - Dropped the label of watchdog node. Changes since v3: - Modified the dt-binding, driver and dts to support JH7100 watchdog. - Modified the register comments. - Changed the return value and order when getting clock rate. - Used dev_err_probe() when getting clocks and resets. - Improved the codes of setting default timeout. - Moved the watchdog_register_device() after setting WDOG_HW_RUNNING. - Changed 'SOC_STARFIVE' to 'ARCH_STARFIVE' in Kconfig file. - Dropped the struct of platform_device_id. - Used new functions to enable or disable clock. Changes since v2: - Added watchdog.yaml and unevaluatedProperties in the dt-binding. - Removed some unnecessary include files. - Changed the 'module_param' name and dropped 'soft_noboot'. - Rrmoved 'CONFIG_OF'. - Added a check if clock rate is 0. - Modified the max_timeout calculation formula. - Removed restart function. - Removed duplicate checks on the upper and lower bounds of 'count'. - Removed 'started' variable. - Added pm_runtime_get_sync() and pm_runtime_put_sync(). - Removed 'firmware_version = 0' variable. - Drop the device tree node commit. Changes since v1: - Renamed the dt-binding 'starfive,wdt.yaml' to 'starfive,jh7110-wdt.yaml'. - Dropped the '_clk' and 'rst_' about the 'clock-names' and 'reset-names' in the dt-binding. - Updated the example context in the dt-binding 'starfive,jh7110-wdt.yaml' to be independent of other patchset. - Deleted unused macros like 'JH7110_WDOG_INT_EN'. - Changed the type of 'freq' in the struct from u64 to u32. - Used 'devm_clk_get_enabled()' instead of 'devm_clk_get()' and 'clk_prepare_enable()'. - Removed the operation to get the frequency from the device tree. - Added watchdog_stop_on_unregister() and watchdog_stop_on_reboot(). - Removed any operations about interrupt. v4: --- https://lore.kernel.org/all/20230308034036.99213-1-xingyu.wu@starfivetech.com/ v3: --- https://lore.kernel.org/all/20230220081926.267695-1-xingyu.wu@starfivetech.com/ v2: --- https://lore.kernel.org/all/20221219094233.179153-1-xingyu.wu@starfivetech.com/ v1: --- https://lore.kernel.org/all/20221202093943.149674-1-xingyu.wu@starfivetech.com/ Xingyu Wu (3): dt-bindings: watchdog: Add watchdog for StarFive JH7100 and JH7110 drivers: watchdog: Add StarFive Watchdog driver riscv: dts: starfive: jh7100: Add watchdog node .../watchdog/starfive,jh7100-wdt.yaml | 71 ++ MAINTAINERS | 7 + arch/riscv/boot/dts/starfive/jh7100.dtsi | 10 + drivers/watchdog/Kconfig | 11 + drivers/watchdog/Makefile | 3 + drivers/watchdog/starfive-wdt.c | 606 ++++++++++++++++++ 6 files changed, 708 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml create mode 100644 drivers/watchdog/starfive-wdt.c base-commit: 8ca09d5fa3549d142c2080a72a4c70ce389163cd prerequisite-patch-id: 558a5b43260d13a6f5229b139ccd45f737a4f686 -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Xingyu Wu <xingyu.wu@starfivetech.com> To: <linux-riscv@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-watchdog@vger.kernel.org>, Wim Van Sebroeck <wim@linux-watchdog.org>, Guenter Roeck <linux@roeck-us.net>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Emil Renner Berthing <kernel@esmil.dk>, Conor Dooley <conor@kernel.org> Cc: Rob Herring <robh+dt@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Philipp Zabel <p.zabel@pengutronix.de>, Xingyu Wu <xingyu.wu@starfivetech.com>, Samin Guo <samin.guo@starfivetech.com>, <linux-kernel@vger.kernel.org> Subject: [PATCH v5 0/3] Add watchdog driver for StarFive JH7100/JH7110 RISC-V SoCs Date: Tue, 14 Mar 2023 21:24:34 +0800 [thread overview] Message-ID: <20230314132437.121534-1-xingyu.wu@starfivetech.com> (raw) This patch serises are to add watchdog driver for the StarFive JH7100 and JH7110 RISC-V SoCs. The first patch adds docunmentation to describe device tree bindings. The subsequent patch adds watchdog driver and support JH7100/JH7110 SoCs. And the last patch adds watchdog node in the JH7100 dts. And the addition of JH7110 device tree node will be submitted after the JH7110 dts merge. This patchset is based on 6.3-rc1. The watchdog driver has been tested on the VisionFive 1 and VisionFive 2 boards which equip with JH7100 and JH7110 SoCs respectively and both works normally. Changes since v4: Patch 2: - Dropped the struct device. - Renamed the struct watchdog_device. - Modified the struct reset_control to be local variable. - Fixed the exit error with spinlock. - Dropped the function of starfive_wdt_is_locked(). - Changed the macro name of 'OPTIONS'. - Changed the order in probe to do less work if return '-EPROBE_DEFER'. - Fixed some function that ignored return value. Patch 3: - Dropped the label of watchdog node. Changes since v3: - Modified the dt-binding, driver and dts to support JH7100 watchdog. - Modified the register comments. - Changed the return value and order when getting clock rate. - Used dev_err_probe() when getting clocks and resets. - Improved the codes of setting default timeout. - Moved the watchdog_register_device() after setting WDOG_HW_RUNNING. - Changed 'SOC_STARFIVE' to 'ARCH_STARFIVE' in Kconfig file. - Dropped the struct of platform_device_id. - Used new functions to enable or disable clock. Changes since v2: - Added watchdog.yaml and unevaluatedProperties in the dt-binding. - Removed some unnecessary include files. - Changed the 'module_param' name and dropped 'soft_noboot'. - Rrmoved 'CONFIG_OF'. - Added a check if clock rate is 0. - Modified the max_timeout calculation formula. - Removed restart function. - Removed duplicate checks on the upper and lower bounds of 'count'. - Removed 'started' variable. - Added pm_runtime_get_sync() and pm_runtime_put_sync(). - Removed 'firmware_version = 0' variable. - Drop the device tree node commit. Changes since v1: - Renamed the dt-binding 'starfive,wdt.yaml' to 'starfive,jh7110-wdt.yaml'. - Dropped the '_clk' and 'rst_' about the 'clock-names' and 'reset-names' in the dt-binding. - Updated the example context in the dt-binding 'starfive,jh7110-wdt.yaml' to be independent of other patchset. - Deleted unused macros like 'JH7110_WDOG_INT_EN'. - Changed the type of 'freq' in the struct from u64 to u32. - Used 'devm_clk_get_enabled()' instead of 'devm_clk_get()' and 'clk_prepare_enable()'. - Removed the operation to get the frequency from the device tree. - Added watchdog_stop_on_unregister() and watchdog_stop_on_reboot(). - Removed any operations about interrupt. v4: --- https://lore.kernel.org/all/20230308034036.99213-1-xingyu.wu@starfivetech.com/ v3: --- https://lore.kernel.org/all/20230220081926.267695-1-xingyu.wu@starfivetech.com/ v2: --- https://lore.kernel.org/all/20221219094233.179153-1-xingyu.wu@starfivetech.com/ v1: --- https://lore.kernel.org/all/20221202093943.149674-1-xingyu.wu@starfivetech.com/ Xingyu Wu (3): dt-bindings: watchdog: Add watchdog for StarFive JH7100 and JH7110 drivers: watchdog: Add StarFive Watchdog driver riscv: dts: starfive: jh7100: Add watchdog node .../watchdog/starfive,jh7100-wdt.yaml | 71 ++ MAINTAINERS | 7 + arch/riscv/boot/dts/starfive/jh7100.dtsi | 10 + drivers/watchdog/Kconfig | 11 + drivers/watchdog/Makefile | 3 + drivers/watchdog/starfive-wdt.c | 606 ++++++++++++++++++ 6 files changed, 708 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml create mode 100644 drivers/watchdog/starfive-wdt.c base-commit: 8ca09d5fa3549d142c2080a72a4c70ce389163cd prerequisite-patch-id: 558a5b43260d13a6f5229b139ccd45f737a4f686 -- 2.25.1
next reply other threads:[~2023-03-14 13:25 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-14 13:24 Xingyu Wu [this message] 2023-03-14 13:24 ` [PATCH v5 0/3] Add watchdog driver for StarFive JH7100/JH7110 RISC-V SoCs Xingyu Wu 2023-03-14 13:24 ` [PATCH v5 1/3] dt-bindings: watchdog: Add watchdog for StarFive JH7100 and JH7110 Xingyu Wu 2023-03-14 13:24 ` Xingyu Wu 2023-04-16 15:54 ` Guenter Roeck 2023-04-16 15:54 ` Guenter Roeck 2023-03-14 13:24 ` [PATCH v5 2/3] drivers: watchdog: Add StarFive Watchdog driver Xingyu Wu 2023-03-14 13:24 ` Xingyu Wu 2023-03-29 16:16 ` Emil Renner Berthing 2023-03-29 16:16 ` Emil Renner Berthing 2023-04-04 9:54 ` Xingyu Wu 2023-04-04 9:54 ` Xingyu Wu 2023-04-16 15:54 ` Guenter Roeck 2023-04-16 15:54 ` Guenter Roeck 2023-03-14 13:24 ` [PATCH v5 3/3] riscv: dts: starfive: jh7100: Add watchdog node Xingyu Wu 2023-03-14 13:24 ` Xingyu Wu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230314132437.121534-1-xingyu.wu@starfivetech.com \ --to=xingyu.wu@starfivetech.com \ --cc=aou@eecs.berkeley.edu \ --cc=conor@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=kernel@esmil.dk \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=linux-watchdog@vger.kernel.org \ --cc=linux@roeck-us.net \ --cc=p.zabel@pengutronix.de \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ --cc=robh+dt@kernel.org \ --cc=samin.guo@starfivetech.com \ --cc=wim@linux-watchdog.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.