Message ID | 20201210140313.258739-1-damien.lemoal@wdc.com |
---|---|
Headers | show |
Series | RISC-V Kendryte K210 support improvements | expand |
On Thu, 10 Dec 2020 23:02:59 +0900, Damien Le Moal wrote: > Document the device tree bindings of the Canaan Kendryte K210 SoC clock > driver in Documentation/devicetree/bindings/clock/canaan,k210-clk.yaml. > The header file include/dt-bindings/clock/k210-clk.h is modified to > include the complete list of IDs for all clocks of the SoC. > > Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> > --- > .../bindings/clock/canaan,k210-clk.yaml | 54 ++++++++++++++++++ > include/dt-bindings/clock/k210-clk.h | 55 +++++++++++++++---- > 2 files changed, 98 insertions(+), 11 deletions(-) > create mode 100644 Documentation/devicetree/bindings/clock/canaan,k210-clk.yaml > Reviewed-by: Rob Herring <robh@kernel.org>
On Thu, Dec 10, 2020 at 11:03:02PM +0900, Damien Le Moal wrote: > Document the device tree bindings of the Canaan Kendryte K210 SoC > system controller driver in > Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml. > > Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> > --- > .../bindings/mfd/canaan,k210-sysctl.yaml | 116 ++++++++++++++++++ > 1 file changed, 116 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml b/Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml > new file mode 100644 > index 000000000000..a61d8ea4fbec > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml > @@ -0,0 +1,116 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/canaan,k210-sysctl.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Canaan Kendryte K210 System Controller Device Tree Bindings > + > +maintainers: > + - Damien Le Moal <damien.lemoal@wdc.com> > + > +description: > + Canaan Inc. Kendryte K210 SoC system controller which provides a > + register map for controlling the clocks, reset signals and pin power > + domains of the SoC. > + > +properties: > + compatible: > + allOf: Don't need 'allOf'. > + - items: > + - const: canaan,k210-sysctl > + - const: syscon > + - const: simple-mfd > + > + clocks: > + description: > + System controller Advanced Power Bus (APB) interface clock source. How many entries? > + > + clock-names: > + maxItems: 1 Don't need maxItems as it is implied by length of 'items'. > + items: > + - const: pclk > + > + reg: > + maxItems: 1 > + description: > + Offset and length of the system controller register space. Drop. That's pretty much the description for all 'reg' entries. > + > + reg-io-width: > + const: 4 Why is this needed if always 4? > + > + clock-controller: > + # Child node > + type: object > + $ref: "../clock/canaan,k210-clk.yaml" > + description: > + Clock controller for the SoC clocks. This child node definition > + should follow the bindings specified in > + Documentation/devicetree/bindings/clock/canaan,k210-clk.yaml. > + > + reset-controller: > + # Child node > + type: object > + $ref: "../reset/canaan,k210-rst.yaml" > + description: > + Reset controller for the SoC. This child node definition > + should follow the bindings specified in > + Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml. > + > + syscon-reboot: > + # Child node > + type: object > + $ref: "../power/reset/syscon-reboot.yaml" > + description: > + Reboot method for the SoC. This child node definition > + should follow the bindings specified in > + Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml. > + > +required: > + - compatible > + - clocks > + - reg > + - clock-controller > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/clock/k210-clk.h> > + #include <dt-bindings/reset/k210-rst.h> > + > + clocks { > + in0: oscllator { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <26000000>; > + }; > + }; > + > + sysctl: syscon@50440000 { > + compatible = "canaan,k210-sysctl", > + "syscon", "simple-mfd"; > + reg = <0x50440000 0x100>; > + reg-io-width = <4>; > + clocks = <&sysclk K210_CLK_APB1>; > + clock-names = "pclk"; > + > + sysclk: clock-controller { > + #clock-cells = <1>; > + compatible = "canaan,k210-clk"; > + clocks = <&in0>; > + }; > + > + sysrst: reset-controller { > + compatible = "canaan,k210-rst"; > + #reset-cells = <1>; > + }; > + > + reboot: syscon-reboot { > + compatible = "syscon-reboot"; > + regmap = <&sysctl>; > + offset = <48>; > + mask = <1>; > + value = <1>; > + }; > + }; > -- > 2.29.2 >
Quoting Damien Le Moal (2020-12-10 06:02:51) > > Finally the last two patches updates the k210 nommu defconfig to include > the newly implemented drivers and provide a new default configuration > file enabling SD card support. > > A lot of the work on the device tree and on the K210 drivers come from > the work by Sean Anderson for the U-Boot project support of the K210 > SoC. Sean also helped with debugging many aspects of this series. > > A tree with all patches applied is available here: > https://github.com/damien-lemoal/linux, k210-sysctl-v20 branch. > A demonstration of this series used on a SiPeed MAIX Dock > board together with an I2C servo controller can be seen here: > https://damien-lemoal.github.io/linux-robot-arm/#example > > This tree was used to build userspace busybox environment image that is > then copied onto an SD card formatted with ext2: > https://github.com/damien-lemoal/buildroot > Of note is that running this userspace environment requires a revert of > commit 2217b982624680d19a80ebb4600d05c8586c4f96 introduced during the > 5.9 development cycle. Without this revert, execution of the init > process fails. A problem with the riscv port of elf2flt is suspected but > not confirmed. I am now starting to investigate this problem. > > Reviews and comments are as always much welcome. What's the merge plan for this series? I'd like to apply the clk patches but they're combined with the sysctl driver so I guess I can't?
On Sat, 2020-12-12 at 22:04 -0800, Stephen Boyd wrote: > Quoting Damien Le Moal (2020-12-10 06:02:51) > > > > Finally the last two patches updates the k210 nommu defconfig to include > > the newly implemented drivers and provide a new default configuration > > file enabling SD card support. > > > > A lot of the work on the device tree and on the K210 drivers come from > > the work by Sean Anderson for the U-Boot project support of the K210 > > SoC. Sean also helped with debugging many aspects of this series. > > > > A tree with all patches applied is available here: > > https://github.com/damien-lemoal/linux, k210-sysctl-v20 branch. > > A demonstration of this series used on a SiPeed MAIX Dock > > board together with an I2C servo controller can be seen here: > > https://damien-lemoal.github.io/linux-robot-arm/#example > > > > This tree was used to build userspace busybox environment image that is > > then copied onto an SD card formatted with ext2: > > https://github.com/damien-lemoal/buildroot > > Of note is that running this userspace environment requires a revert of > > commit 2217b982624680d19a80ebb4600d05c8586c4f96 introduced during the > > 5.9 development cycle. Without this revert, execution of the init > > process fails. A problem with the riscv port of elf2flt is suspected but > > not confirmed. I am now starting to investigate this problem. > > > > Reviews and comments are as always much welcome. > > What's the merge plan for this series? I'd like to apply the clk patches > but they're combined with the sysctl driver so I guess I can't? Not sure. Palmer ? What is your plan for this series ? Can you queue the riscv/DT pieces for 5.11 ? I will post a v9 to address Rob's comment on the sysctl and fpioa drivers binding doc, not other with v8 changes beside that. -- Damien Le Moal Western Digital
On Sun, 13 Dec 2020 00:06:22 PST (-0800), Damien Le Moal wrote: > On Sat, 2020-12-12 at 22:04 -0800, Stephen Boyd wrote: >> Quoting Damien Le Moal (2020-12-10 06:02:51) >> > >> > Finally the last two patches updates the k210 nommu defconfig to include >> > the newly implemented drivers and provide a new default configuration >> > file enabling SD card support. >> > >> > A lot of the work on the device tree and on the K210 drivers come from >> > the work by Sean Anderson for the U-Boot project support of the K210 >> > SoC. Sean also helped with debugging many aspects of this series. >> > >> > A tree with all patches applied is available here: >> > https://github.com/damien-lemoal/linux, k210-sysctl-v20 branch. >> > A demonstration of this series used on a SiPeed MAIX Dock >> > board together with an I2C servo controller can be seen here: >> > https://damien-lemoal.github.io/linux-robot-arm/#example >> > >> > This tree was used to build userspace busybox environment image that is >> > then copied onto an SD card formatted with ext2: >> > https://github.com/damien-lemoal/buildroot >> > Of note is that running this userspace environment requires a revert of >> > commit 2217b982624680d19a80ebb4600d05c8586c4f96 introduced during the >> > 5.9 development cycle. Without this revert, execution of the init >> > process fails. A problem with the riscv port of elf2flt is suspected but >> > not confirmed. I am now starting to investigate this problem. >> > >> > Reviews and comments are as always much welcome. >> >> What's the merge plan for this series? I'd like to apply the clk patches >> but they're combined with the sysctl driver so I guess I can't? > > Not sure. Palmer ? What is your plan for this series ? Can you queue the > riscv/DT pieces for 5.11 ? > > I will post a v9 to address Rob's comment on the sysctl and fpioa drivers > binding doc, not other with v8 changes beside that. I guess I got hung up on that bultin DT thing, but I've sort of decided I don't really care that much (though I guess I didn't decide enough to reply to the email...). I don't think it's 5.11 material: we were told to be stricter this time around because of the timing, and I'm trying to sort out a boot issue that's manifesting post 5.10+for-next merge so I probably won't have time to take more stuff. Also: I'm kind of trying to avoid the whole thing where I take patches that have a bunch of versions sent either right before or during the merge window, as it just makes things too hard to keep track of.
On 2020/12/16 10:43, Palmer Dabbelt wrote: > On Sun, 13 Dec 2020 00:06:22 PST (-0800), Damien Le Moal wrote: >> On Sat, 2020-12-12 at 22:04 -0800, Stephen Boyd wrote: >>> Quoting Damien Le Moal (2020-12-10 06:02:51) >>>> >>>> Finally the last two patches updates the k210 nommu defconfig to include >>>> the newly implemented drivers and provide a new default configuration >>>> file enabling SD card support. >>>> >>>> A lot of the work on the device tree and on the K210 drivers come from >>>> the work by Sean Anderson for the U-Boot project support of the K210 >>>> SoC. Sean also helped with debugging many aspects of this series. >>>> >>>> A tree with all patches applied is available here: >>>> https://github.com/damien-lemoal/linux, k210-sysctl-v20 branch. >>>> A demonstration of this series used on a SiPeed MAIX Dock >>>> board together with an I2C servo controller can be seen here: >>>> https://damien-lemoal.github.io/linux-robot-arm/#example >>>> >>>> This tree was used to build userspace busybox environment image that is >>>> then copied onto an SD card formatted with ext2: >>>> https://github.com/damien-lemoal/buildroot >>>> Of note is that running this userspace environment requires a revert of >>>> commit 2217b982624680d19a80ebb4600d05c8586c4f96 introduced during the >>>> 5.9 development cycle. Without this revert, execution of the init >>>> process fails. A problem with the riscv port of elf2flt is suspected but >>>> not confirmed. I am now starting to investigate this problem. >>>> >>>> Reviews and comments are as always much welcome. >>> >>> What's the merge plan for this series? I'd like to apply the clk patches >>> but they're combined with the sysctl driver so I guess I can't? >> >> Not sure. Palmer ? What is your plan for this series ? Can you queue the >> riscv/DT pieces for 5.11 ? >> >> I will post a v9 to address Rob's comment on the sysctl and fpioa drivers >> binding doc, not other with v8 changes beside that. > > I guess I got hung up on that bultin DT thing, but I've sort of decided I don't > really care that much (though I guess I didn't decide enough to reply to the > email...). I don't think it's 5.11 material: we were told to be stricter this > time around because of the timing, and I'm trying to sort out a boot issue > that's manifesting post 5.10+for-next merge so I probably won't have time to > take more stuff. > > Also: I'm kind of trying to avoid the whole thing where I take patches that > have a bunch of versions sent either right before or during the merge window, > as it just makes things too hard to keep track of. OK. 5.12 it is then. Please queue these in a branch as soon as possible once the merge window is done. Or do you prefer that I resend everything rebased on 5.11-rc first ? That said, I think patches 1-3 should go in 5.11. 1 & 2 are trivial and patch 3 fixes a nasty bug that exists with the current k210 support.