-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: reset: Add generic reset MMIO driver #87501
base: main
Are you sure you want to change the base?
Conversation
|
||
description: MMIO Reset | ||
|
||
compatible: "zephyr,reset-mmio" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't Zephyr-specific?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I wasn't sure how to give this a generic name in zephyr, do you have a suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If @henrikbrixandersen doesn't have a better idea, I don't either
required: true | ||
num_resets: | ||
type: int | ||
default: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defaults need to be described in the textual description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not resolved. The description needs to say why the value chosen, and not just restate the value. Please read https://docs.zephyrproject.org/latest/build/dts/bindings-upstream.html#rules-for-default-values and update this PR accordingly. (Hint: if you can't come up with a justification that follows the rules, consider making this required instead.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I don't have a good justification for setting the default to 1 so changed this to a required property.
bb7af4c
to
850cc9e
Compare
drivers/reset/Kconfig.mmio
Outdated
|
||
config RESET_MMIO | ||
bool "Generic MMIO reset driver" | ||
default n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be default y
+ depends on DT_HAS_your_compatible_goes_here_ENABLED
. Search the tree for other drivers for examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
required: true | ||
num_resets: | ||
type: int | ||
default: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not resolved. The description needs to say why the value chosen, and not just restate the value. Please read https://docs.zephyrproject.org/latest/build/dts/bindings-upstream.html#rules-for-default-values and update this PR accordingly. (Hint: if you can't come up with a justification that follows the rules, consider making this required instead.)
@@ -0,0 +1,10 @@ | |||
# Copyright (c) 2025 Google LLC | |||
# SPDX-License-Identifier: Apache-2.0 | |||
set(BOARD qemu_x86) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't hard-code the board here. This prevents people from testing this on other platforms that might actually have real hardware.
Follow the platform_allow / integration_platforms pattern in tests/drivers/gpio/gpio_reserved_ranges/testcase.yaml instead. See the twister documentation for more details if you need them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update!
A few more things from my side, otherwise I don't see any blockers.
description: Number of resets controlled by the register. Can be in the | ||
range [1, 31]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This style isn't permitted upstream -- see https://docs.zephyrproject.org/latest/build/dts/bindings-upstream.html#descriptions and please fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
description: MMIO Reset | ||
|
||
compatible: "zephyr,reset-mmio" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If @henrikbrixandersen doesn't have a better idea, I don't either
properties: | ||
reg: | ||
required: true | ||
num_resets: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
required: true | ||
description: Number of resets controlled by the register. Can be in the | ||
range [1, 31]. | ||
active_low: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
active-low
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Introduce a generic reset MMIO driver to be used for devices with a single memory mapped reset bit required to take them out of reset. Signed-off-by: Mohith Potluri <saimohith@google.com>
Introduce a generic reset MMIO driver to be used for devices with a single memory mapped reset bit required to take them out of reset.