Couple improvements for Tegra clk driver
v4 cover Couple improvements for Tegra clk driver
This series fixes couple minor standalone problems of the Tegra clk driver.
Changelog:
v4: - Added new patch that converts DT bindings to schema.
v3: - Added acks from Thierry Reding that he gave to v2.
- Added new patch "clk: tegra: Don't allow zero clock rate for PLLs".
v2: - Added these new patches:
clk: tegra: Halve SCLK rate on Tegra20
MAINTAINERS: Hand Tegra clk driver to Jon and Thierry
v1: - Collected clk patches into a single series.
Dmitry Osipenko (7):
clk: tegra30: Use 300MHz for video decoder by default
clk: tegra: Fix refcounting of gate clocks
clk: tegra: Ensure that PLLU configuration is applied properly
clk: tegra: Halve SCLK rate on Tegra20
MAINTAINERS: Hand Tegra clk driver to Jon and Thierry
clk: tegra: Don't allow zero clock rate for PLLs
dt-bindings: clock: tegra: Convert to schema
CREDITS | 6 + .../bindings/clock/nvidia,tegra-car.yaml | 118 ++++++++++++++++++ .../bindings/clock/nvidia,tegra114-car.txt | 63 ---------- .../bindings/clock/nvidia,tegra124-car.txt | 107 ---------------- .../bindings/clock/nvidia,tegra20-car.txt | 63 ---------- .../bindings/clock/nvidia,tegra210-car.txt | 56 --------- .../bindings/clock/nvidia,tegra30-car.txt | 63 ---------- MAINTAINERS | 4 +- drivers/clk/tegra/clk-periph-gate.c | 72 +++++++---- drivers/clk/tegra/clk-periph.c | 11 ++ drivers/clk/tegra/clk-pll.c | 12 +- drivers/clk/tegra/clk-tegra20.c | 6 +- drivers/clk/tegra/clk-tegra30.c | 2 +- 13 files changed, 195 insertions(+), 388 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra-car.yaml delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra210-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
Signature · 1 line
2.29.2
PATCH v4 1/7 clk: tegra30: Use 300MHz for video decoder by default
The 600MHz is a too high clock rate for some SoC versions for the video decoder hardware and this may cause stability issues. Use 300MHz for the video decoder by default, which is supported by all hardware versions.
--- drivers/clk/tegra/clk-tegra30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/tegra/clk-tegra30.c +1 -1
@@ -1245,7 +1245,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA30_CLK_GR3D, TEGRA30_CLK_PLL_C, 300000000, 0 }, { TEGRA30_CLK_GR3D2, TEGRA30_CLK_PLL_C, 300000000, 0 }, { TEGRA30_CLK_PLL_U, TEGRA30_CLK_CLK_MAX, 480000000, 0 }, - { TEGRA30_CLK_VDE, TEGRA30_CLK_PLL_C, 600000000, 0 }, + { TEGRA30_CLK_VDE, TEGRA30_CLK_PLL_C, 300000000, 0 }, { TEGRA30_CLK_SPDIF_IN_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, { TEGRA30_CLK_I2S0_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, { TEGRA30_CLK_I2S1_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
Signature · 1 line
2.29.2
PATCH v4 2/7 clk: tegra: Fix refcounting of gate clocks
In reply to Dmitry OsipenkoThe refcounting of the gate clocks has a bug causing the enable_refcnt to underflow when unused clocks are disabled. This happens because clk provider erroneously bumps the refcount if clock is enabled at a boot time, which it shouldn't be doing, and it does this only for the gate clocks, while peripheral clocks are using the same gate ops and the peripheral clocks are missing the initial bump. Hence the refcount of the peripheral clocks is 0 when unused clocks are disabled and then the counter is decremented further by the gate ops, causing the integer underflow.
Fix this problem by removing the erroneous bump and by implementing the disable_unused() callback, which disables the unused gates properly.
The visible effect of the bug is such that the unused clocks are never gated if a loaded kernel module grabs the unused clocks and starts to use them. In practice this shouldn't cause any real problems for the drivers and boards supported by the kernel today.
--- drivers/clk/tegra/clk-periph-gate.c | 72 +++++++++++++++++++---------- drivers/clk/tegra/clk-periph.c | 11 +++++ 2 files changed, 58 insertions(+), 25 deletions(-)
drivers/clk/tegra/clk-periph-gate.c +47 -25
@@ -48,18 +48,9 @@ static int clk_periph_is_enabled(struct clk_hw *hw)return state; } -static int clk_periph_enable (struct clk_hw *hw) +static void clk_periph_enable_locked (struct clk_hw *hw) {struct tegra_clk_periph_gate *gate =to_clk_periph_gate (hw); -unsigned long flags =0 ; - -spin_lock_irqsave (&periph_ref_lock, flags); - - gate->enable_refcnt[gate->clk_num]++; -if (gate->enable_refcnt[gate->clk_num] >1 ) { -spin_unlock_irqrestore (&periph_ref_lock, flags); -return 0 ; - }write_enb_set (periph_clk_to_bit (gate), gate);udelay (2 );
@@ -78,6 +69,32 @@ static int clk_periph_enable(struct clk_hw *hw)udelay (1 );writel_relaxed (0 , gate->clk_base +LVL2_CLK_GATE_OVRE ); } +} + +static void clk_periph_disable_locked (struct clk_hw *hw) +{ +struct tegra_clk_periph_gate *gate =to_clk_periph_gate (hw); + +/* +* If peripheral is in the APB bus then read the APB bus to +* flush the write operation in apb bus. This will avoid the +* peripheral access after disabling clock +*/ +if (gate->flags &TEGRA_PERIPH_ON_APB ) +tegra_read_chipid (); + +write_enb_clr (periph_clk_to_bit (gate), gate); +} + +static int clk_periph_enable (struct clk_hw *hw) +{ +struct tegra_clk_periph_gate *gate =to_clk_periph_gate (hw); +unsigned long flags =0 ; + +spin_lock_irqsave (&periph_ref_lock, flags); + +if (!gate->enable_refcnt[gate->clk_num]++) +clk_periph_enable_locked (hw);spin_unlock_irqrestore (&periph_ref_lock, flags);
@@ -91,21 +108,28 @@ static void clk_periph_disable(struct clk_hw *hw)spin_lock_irqsave (&periph_ref_lock, flags); - gate->enable_refcnt[gate->clk_num]--; -if (gate->enable_refcnt[gate->clk_num] >0 ) { -spin_unlock_irqrestore (&periph_ref_lock, flags); -return ; - } +WARN_ON (!gate->enable_refcnt[gate->clk_num]); + +if (gate->enable_refcnt[gate->clk_num]-- ==1 ) +clk_periph_disable_locked (hw); + +spin_unlock_irqrestore (&periph_ref_lock, flags); +} + +static void clk_periph_disable_unused (struct clk_hw *hw) +{ +struct tegra_clk_periph_gate *gate =to_clk_periph_gate (hw); +unsigned long flags =0 ; + +spin_lock_irqsave (&periph_ref_lock, flags);/* -* If peripheral is in the APB bus then read the APB bus to -* flush the write operation in apb bus. This will avoid the -* peripheral access after disabling clock +* Some clocks are duplicated and some of them are marked as critical, +* like fuse and fuse_burn for example, thus the enable_refcnt will +* be non-zero here id the "unused" duplicate is disabled by CCF. */ -if (gate->flags &TEGRA_PERIPH_ON_APB ) -tegra_read_chipid (); - -write_enb_clr (periph_clk_to_bit (gate), gate); +if (!gate->enable_refcnt[gate->clk_num]) +clk_periph_disable_locked (hw);spin_unlock_irqrestore (&periph_ref_lock, flags); }
@@ -114,6 +138,7 @@ const struct clk_ops tegra_clk_periph_gate_ops = { .is_enabled = clk_periph_is_enabled, .enable = clk_periph_enable, .disable = clk_periph_disable, + .disable_unused = clk_periph_disable_unused, }; struct clk *tegra_clk_register_periph_gate(const char *name,
@@ -148,9 +173,6 @@ struct clk *tegra_clk_register_periph_gate(const char *name, gate->enable_refcnt = enable_refcnt; gate->regs = pregs; -if (read_enb (gate) &periph_clk_to_bit (gate)) - enable_refcnt[clk_num]++; -/* Data in .init is copied by clk_register(), so stack variable OK */ gate->hw.init = &init;
drivers/clk/tegra/clk-periph.c +11 -0
@@ -100,6 +100,15 @@ static void clk_periph_disable(struct clk_hw *hw) gate_ops->disable (gate_hw); } +static void clk_periph_disable_unused (struct clk_hw *hw) +{ +struct tegra_clk_periph *periph =to_clk_periph (hw); +const struct clk_ops *gate_ops = periph->gate_ops; +struct clk_hw *gate_hw = &periph->gate.hw; + + gate_ops->disable_unused (gate_hw); +} +static void clk_periph_restore_context (struct clk_hw *hw) {struct tegra_clk_periph *periph =to_clk_periph (hw);
@@ -126,6 +135,7 @@ const struct clk_ops tegra_clk_periph_ops = { .is_enabled = clk_periph_is_enabled, .enable = clk_periph_enable, .disable = clk_periph_disable, + .disable_unused = clk_periph_disable_unused, .restore_context = clk_periph_restore_context, };
@@ -135,6 +145,7 @@ static const struct clk_ops tegra_clk_periph_nodiv_ops = { .is_enabled = clk_periph_is_enabled, .enable = clk_periph_enable, .disable = clk_periph_disable, + .disable_unused = clk_periph_disable_unused, .restore_context = clk_periph_restore_context, };
Signature · 1 line
2.29.2
PATCH v4 3/7 clk: tegra: Ensure that PLLU configuration is applied properly
In reply to Dmitry OsipenkoThe PLLU (USB) consists of the PLL configuration itself and configuration of the PLLU outputs. The PLLU programming is inconsistent on T30 vs T114, where T114 immediately bails out if PLLU is enabled and T30 re-enables a potentially already enabled PLL (left after bootloader) and then fully reprograms it, which could be unsafe to do. The correct way should be to skip enabling of the PLL if it's already enabled and then apply configuration to the outputs. This patch doesn't fix any known problems, it's a minor improvement.
--- drivers/clk/tegra/clk-pll.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/clk/tegra/clk-pll.c +4 -5
@@ -1131,7 +1131,8 @@ static int clk_pllu_enable(struct clk_hw *hw)if (pll->lock)spin_lock_irqsave (pll->lock, flags); -_clk_pll_enable (hw); +if (!clk_pll_is_enabled (hw)) +_clk_pll_enable (hw); ret =clk_pll_wait_for_lock (pll);if (ret <0 )
@@ -1748,15 +1749,13 @@ static int clk_pllu_tegra114_enable(struct clk_hw *hw)return -EINVAL ; } -if (clk_pll_is_enabled (hw)) -return 0 ; - input_rate =clk_hw_get_rate (__clk_get_hw (osc));if (pll->lock)spin_lock_irqsave (pll->lock, flags); -_clk_pll_enable (hw); +if (!clk_pll_is_enabled (hw)) +_clk_pll_enable (hw); ret =clk_pll_wait_for_lock (pll);if (ret <0 )
Signature · 1 line
2.29.2
PATCH v4 4/7 clk: tegra: Halve SCLK rate on Tegra20
In reply to Dmitry OsipenkoHigher SCLK rates on Tegra20 require high core voltage. The higher clock rate may have a positive performance effect only for AHB DMA transfers and AVP CPU, but both aren't used by upstream kernel at all. Halve SCLK rate on Tegra20 in order to remove the high core voltage requirement.
--- drivers/clk/tegra/clk-tegra20.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/tegra/clk-tegra20.c +3 -3
@@ -1021,9 +1021,9 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA20_CLK_PLL_P_OUT3, TEGRA20_CLK_CLK_MAX, 72000000, 1 }, { TEGRA20_CLK_PLL_P_OUT4, TEGRA20_CLK_CLK_MAX, 24000000, 1 }, { TEGRA20_CLK_PLL_C, TEGRA20_CLK_CLK_MAX, 600000000, 0 }, - { TEGRA20_CLK_PLL_C_OUT1, TEGRA20_CLK_CLK_MAX, 240000000, 0 }, - { TEGRA20_CLK_SCLK, TEGRA20_CLK_PLL_C_OUT1, 240000000, 0 }, - { TEGRA20_CLK_HCLK, TEGRA20_CLK_CLK_MAX, 240000000, 0 }, + { TEGRA20_CLK_PLL_C_OUT1, TEGRA20_CLK_CLK_MAX, 120000000, 0 }, + { TEGRA20_CLK_SCLK, TEGRA20_CLK_PLL_C_OUT1, 120000000, 0 }, + { TEGRA20_CLK_HCLK, TEGRA20_CLK_CLK_MAX, 120000000, 0 }, { TEGRA20_CLK_PCLK, TEGRA20_CLK_CLK_MAX, 60000000, 0 }, { TEGRA20_CLK_CSITE, TEGRA20_CLK_CLK_MAX, 0, 1 }, { TEGRA20_CLK_CCLK, TEGRA20_CLK_CLK_MAX, 0, 1 },
Signature · 1 line
2.29.2
PATCH v4 5/7 MAINTAINERS: Hand Tegra clk driver to Jon and Thierry
In reply to Dmitry OsipenkoPeter and Prashant aren't actively maintaining Tegra clock driver anymore. Jonathan and Thierry will pick up maintaining of the driver from now on.
--- CREDITS | 6 ++++++ MAINTAINERS | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-)
CREDITS +6 -0
@@ -1250,6 +1250,10 @@ S: 29 Duchifat St. S: Ra'anana 4372029 S: Israel +N: Prashant Gaikwad +E: [email protected] +D: Maintained NVIDIA Tegra clock driver + N: Kumar Gala E: [email protected] D: Embedded PowerPC 6xx/7xx/74xx/82xx/83xx/85xx support
@@ -3387,7 +3391,9 @@ E: D: Macintosh IDE Driver N: Peter De Schrijver +E: [email protected] E: [email protected] +D: Maintained NVIDIA Tegra clock driver D: Mitsumi CD-ROM driver patches March version S: Molenbaan 29 S: B2240 Zandhoven
MAINTAINERS +2 -2
@@ -17627,8 +17627,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git N: [^a-z]tegra TEGRA CLOCK DRIVER -M: Peter De Schrijver <[email protected]> -M: Prashant Gaikwad <[email protected]> +M: Jonathan Hunter <[email protected]> +M: Thierry Reding <[email protected]> S: Supported F: drivers/clk/tegra/
Signature · 1 line
2.29.2
PATCH v4 6/7 clk: tegra: Don't allow zero clock rate for PLLs
In reply to Dmitry OsipenkoZero clock rate doesn't make sense for PLLs and tegra-clk driver enters into infinite loop on trying to calculate PLL parameters for zero rate. Make code to error out if requested rate is zero.
Originally this trouble was found by Robert Yang while he was trying to bring up upstream kernel on Samsung Galaxy Tab, which happened due to a bug in Tegra DRM driver that erroneously sets PLL rate to zero. This issues came over again recently during of kernel bring up on ASUS TF700T.
--- drivers/clk/tegra/clk-pll.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/clk/tegra/clk-pll.c +3 -0
@@ -558,6 +558,9 @@ static int _calc_rate(struct clk_hw *hw, struct tegra_clk_pll_freq_table *cfg,u32 p_div =0 ;int ret; +if (!rate) +return -EINVAL ; +switch (parent_rate) {case 12000000 :case 26000000 :
Signature · 1 line
2.29.2
PATCH v4 7/7 dt-bindings: clock: tegra: Convert to schema
In reply to Dmitry OsipenkoConvert NVIDIA Tegra clock bindings to schema.
--- .../bindings/clock/nvidia,tegra-car.yaml | 118 ++++++++++++++++++ .../bindings/clock/nvidia,tegra114-car.txt | 63 ---------- .../bindings/clock/nvidia,tegra124-car.txt | 107 ---------------- .../bindings/clock/nvidia,tegra20-car.txt | 63 ---------- .../bindings/clock/nvidia,tegra210-car.txt | 56 --------- .../bindings/clock/nvidia,tegra30-car.txt | 63 ---------- 6 files changed, 118 insertions(+), 352 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra-car.yaml delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra210-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
Documentation/devicetree/bindings/clock/nvidia,tegra-car.yaml new file +118 -0
@@ -0,0 +1,118 @@ +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/nvidia,tegra-car.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra Clock and Reset Controller + +maintainers: + - Jon Hunter <[email protected]> + - Thierry Reding <[email protected]> + +description: | + The Clock and Reset (CAR) is the HW module responsible for muxing and gating + Tegra's clocks, and setting their rates. It comprises CLKGEN and RSTGEN units. + + CLKGEN provides the registers to program the PLLs. It controls most of + the clock source programming and most of the clock dividers. + + CLKGEN input signals include the external clock for the reference frequency + (12 MHz, 26 MHz) and the external clock for the Real Time Clock (32.768 KHz). + + Outputs from CLKGEN are inputs clock of the h/w blocks in the Tegra system. + + RSTGEN provides the registers needed to control resetting of each block in + the Tegra system. + +properties: + compatible: + enum: + - nvidia,tegra20-car + - nvidia,tegra30-car + - nvidia,tegra114-car + - nvidia,tegra124-car + - nvidia,tegra210-car + + reg: + maxItems: 1 + + '#clock-cells': + const: 1 + + "#reset-cells": + const: 1 + + nvidia,external-memory-controller: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle of the external memory controller node + +patternProperties: + "^emc-timings-[0-9]+$": + type: object + properties: + nvidia,ram-code: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + value of the RAM_CODE field in the PMC_STRAPPING_OPT_A register that + this timing set is used for + + patternProperties: + "^timing-[0-9]+$": + type: object + properties: + clock-frequency: + description: + external memory clock rate in Hz + minimum: 1000000 + maximum: 1000000000 + + nvidia,parent-clock-frequency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + rate of parent clock in Hz + minimum: 1000000 + maximum: 1000000000 + + clocks: + items: + - description: parent clock of EMC + + clock-names: + items: + - const: emc-parent + + required: + - clock-frequency + - nvidia,parent-clock-frequency + - clocks + - clock-names + + additionalProperties: false + +required: + - compatible + - reg + - '#clock-cells' + - "#reset-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/tegra20-car.h> + + car: clock-controller@60006000 { + compatible = "nvidia,tegra20-car"; + reg = <0x60006000 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + }; + + usb-controller@c5004000 { + compatible = "nvidia,tegra20-ehci", "usb-ehci"; + reg = <0xc5004000 0x4000>; + clocks = <&car TEGRA20_CLK_USB2>; + resets = <&car TEGRA20_CLK_USB2>; + };
Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt deleted +0 -63
63 lines not on this page · raw message
Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt deleted +0 -107
107 lines not on this page · raw message
Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt deleted +0 -63
63 lines not on this page · raw message
Documentation/devicetree/bindings/clock/nvidia,tegra210-car.txt deleted +0 -56
56 lines not on this page · raw message
Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt deleted +0 -63
63 lines not on this page · raw message
Signature · 1 line
2.29.2
Rob Herring
maintainerRe: [PATCH v4 7/7] dt-bindings: clock: tegra: Convert to schema
Quoted 18 lines · Dmitry Osipenko
Convert NVIDIA Tegra clock bindings to schema.
Signed-off-by Dmitry Osipenko <[email protected]>--- .../bindings/clock/nvidia,tegra-car.yaml | 118 ++++++++++++++++++ .../bindings/clock/nvidia,tegra114-car.txt | 63 ---------- .../bindings/clock/nvidia,tegra124-car.txt | 107 ---------------- .../bindings/clock/nvidia,tegra20-car.txt | 63 ---------- .../bindings/clock/nvidia,tegra210-car.txt | 56 --------- .../bindings/clock/nvidia,tegra30-car.txt | 63 ---------- 6 files changed, 118 insertions(+), 352 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra-car.yaml delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra210-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/nvidia,tegra-car.example.dt.yaml: usb-controller@c5004000: compatible: 'oneOf' conditional failed, one must be fixed:
['nvidia,tegra20-ehci', 'usb-ehci'] is too long
Additional items are not allowed ('usb-ehci' was unexpected)
'nvidia,tegra20-ehci' is not one of ['allwinner,sun4i-a10-ehci', 'allwinner,sun50i-a64-ehci', 'allwinner,sun50i-h6-ehci', 'allwinner,sun5i-a13-ehci', 'allwinner,sun6i-a31-ehci', 'allwinner,sun7i-a20-ehci', 'allwinner,sun8i-a23-ehci', 'allwinner,sun8i-h3-ehci', 'allwinner,sun8i-r40-ehci', 'allwinner,sun9i-a80-ehci', 'aspeed,ast2400-ehci', 'aspeed,ast2500-ehci', 'aspeed,ast2600-ehci', 'brcm,bcm3384-ehci', 'brcm,bcm63268-ehci', 'brcm,bcm6328-ehci', 'brcm,bcm6358-ehci', 'brcm,bcm6362-ehci', 'brcm,bcm6368-ehci', 'brcm,bcm7125-ehci', 'brcm,bcm7346-ehci', 'brcm,bcm7358-ehci', 'brcm,bcm7360-ehci', 'brcm,bcm7362-ehci', 'brcm,bcm7420-ehci', 'brcm,bcm7425-ehci', 'brcm,bcm7435-ehci', 'ibm,476gtr-ehci', 'nxp,lpc1850-ehci', 'qca,ar7100-ehci', 'snps,hsdk-v1.0-ehci', 'socionext,uniphier-ehci'] 'nvidia,tegra20-ehci' is not one of ['cavium,octeon-6335-ehci', 'ibm,usb-ehci-440epx', 'ibm,usb-ehci-460ex', 'nintendo,hollywood-usb-ehci', 'st,spear600-ehci']
'nvidia,tegra20-ehci' is not one of ['generic-ehci', 'usb-ehci']
'generic-ehci' was expected
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/generic-ehci.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/nvidia,tegra-car.example.dt.yaml: usb-controller@c5004000: 'oneOf' conditional failed, one must be fixed:
'interrupts' is a required property
'interrupts-extended' is a required property
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/generic-ehci.yaml
See https://patchwork.ozlabs.org/patch/1452220
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit.
Rob Herring
maintainerRe: [PATCH v4 7/7] dt-bindings: clock: tegra: Convert to schema
In reply to Dmitry OsipenkoQuoted 7 lines · Dmitry Osipenko
Convert NVIDIA Tegra clock bindings to schema.
Signed-off-by Dmitry Osipenko <[email protected]>--- .../bindings/clock/nvidia,tegra-car.yaml | 118 ++++++++++++++++++ .../bindings/clock/nvidia,tegra114-car.txt | 63 ---------- .../bindings/clock/nvidia,tegra124-car.txt | 107 ----------------
Seems like this one is a bit different and should remain a separate binding?
Quoted 10 lines
.../bindings/clock/nvidia,tegra20-car.txt | 63 ---------- .../bindings/clock/nvidia,tegra210-car.txt | 56 --------- .../bindings/clock/nvidia,tegra30-car.txt | 63 ---------- 6 files changed, 118 insertions(+), 352 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra-car.yaml delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra210-car.txt delete mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
Re: [PATCH v4 7/7] dt-bindings: clock: tegra: Convert to schema
15.03.2021 18:53, Rob Herring пишет:
Quoted 11 lines · Dmitry Osipenko
Quoted 7 lines
Convert NVIDIA Tegra clock bindings to schema.
Signed-off-by Dmitry Osipenko <[email protected]>--- .../bindings/clock/nvidia,tegra-car.yaml | 118 ++++++++++++++++++ .../bindings/clock/nvidia,tegra114-car.txt | 63 ---------- .../bindings/clock/nvidia,tegra124-car.txt | 107 ----------------Seems like this one is a bit different and should remain a separate binding?
The T124 binding has optional EMC (external memory controller) clocks that aren't used by other SoCs. The T124 also shouldn't need these clocks, but that's how the binding happened to be defined historically. Since the optional properties have no effect on a non-T124 SoCs, I thought that it should be better to unify all the bindings, rather than partially duplicate them with out any real benefit.