* [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-15 8:43 ` Hiroshi Doyu 0 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra-u79uwXL29TY76Z2rM5mHXA Cc: pdeschrijver-DDmLM1+adcrQT0dZR+AlfA, pgaikwad-DDmLM1+adcrQT0dZR+AlfA, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Hi, With new dtc+cpp feature, we could get rid of magic numbers in dts* files. This patch replaces CLK IDs. We also plan to share those DT header files with kernel source later[1]. This series depends on: [PATCH 0/9] ARM: tegra: use new dtc+cpp feature http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149613.html [5/6] and [6/6] depend on: [PATCH v6 00/10] Tegra114 clockframework http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/148895.html v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149816.html v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149672.html [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html Hiroshi Doyu (6): ARM: tegra20: create a DT header defining CLK IDs ARM: tegra20: convert device tree files to use CLK defines ARM: tegra30: create a DT header defining CLK IDs ARM: tegra30: convert device tree files to use CLK defines ARM: tegra114: create a DT header defining CLK IDs ARM: tegra114: convert device tree files to use CLK defines .../bindings/clock/nvidia,tegra114-car.txt | 261 +------------------ .../bindings/clock/nvidia,tegra20-car.txt | 150 +---------- .../bindings/clock/nvidia,tegra30-car.txt | 207 +-------------- arch/arm/boot/dts/tegra114-car.h | 272 ++++++++++++++++++++ arch/arm/boot/dts/tegra114.dtsip | 13 +- arch/arm/boot/dts/tegra20-car.h | 158 ++++++++++++ arch/arm/boot/dts/tegra20-paz00.dtsp | 2 +- arch/arm/boot/dts/tegra20.dtsip | 85 +++--- arch/arm/boot/dts/tegra30-car.h | 218 ++++++++++++++++ arch/arm/boot/dts/tegra30.dtsip | 87 +++---- 10 files changed, 746 insertions(+), 707 deletions(-) create mode 100644 arch/arm/boot/dts/tegra114-car.h create mode 100644 arch/arm/boot/dts/tegra20-car.h create mode 100644 arch/arm/boot/dts/tegra30-car.h -- 1.7.9.5 ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-15 8:43 ` Hiroshi Doyu 0 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-arm-kernel Hi, With new dtc+cpp feature, we could get rid of magic numbers in dts* files. This patch replaces CLK IDs. We also plan to share those DT header files with kernel source later[1]. This series depends on: [PATCH 0/9] ARM: tegra: use new dtc+cpp feature http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149613.html [5/6] and [6/6] depend on: [PATCH v6 00/10] Tegra114 clockframework http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/148895.html v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149816.html v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149672.html [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html Hiroshi Doyu (6): ARM: tegra20: create a DT header defining CLK IDs ARM: tegra20: convert device tree files to use CLK defines ARM: tegra30: create a DT header defining CLK IDs ARM: tegra30: convert device tree files to use CLK defines ARM: tegra114: create a DT header defining CLK IDs ARM: tegra114: convert device tree files to use CLK defines .../bindings/clock/nvidia,tegra114-car.txt | 261 +------------------ .../bindings/clock/nvidia,tegra20-car.txt | 150 +---------- .../bindings/clock/nvidia,tegra30-car.txt | 207 +-------------- arch/arm/boot/dts/tegra114-car.h | 272 ++++++++++++++++++++ arch/arm/boot/dts/tegra114.dtsip | 13 +- arch/arm/boot/dts/tegra20-car.h | 158 ++++++++++++ arch/arm/boot/dts/tegra20-paz00.dtsp | 2 +- arch/arm/boot/dts/tegra20.dtsip | 85 +++--- arch/arm/boot/dts/tegra30-car.h | 218 ++++++++++++++++ arch/arm/boot/dts/tegra30.dtsip | 87 +++---- 10 files changed, 746 insertions(+), 707 deletions(-) create mode 100644 arch/arm/boot/dts/tegra114-car.h create mode 100644 arch/arm/boot/dts/tegra20-car.h create mode 100644 arch/arm/boot/dts/tegra30-car.h -- 1.7.9.5 ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-15 8:43 ` Hiroshi Doyu 0 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel Hi, With new dtc+cpp feature, we could get rid of magic numbers in dts* files. This patch replaces CLK IDs. We also plan to share those DT header files with kernel source later[1]. This series depends on: [PATCH 0/9] ARM: tegra: use new dtc+cpp feature http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149613.html [5/6] and [6/6] depend on: [PATCH v6 00/10] Tegra114 clockframework http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/148895.html v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149816.html v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149672.html [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html Hiroshi Doyu (6): ARM: tegra20: create a DT header defining CLK IDs ARM: tegra20: convert device tree files to use CLK defines ARM: tegra30: create a DT header defining CLK IDs ARM: tegra30: convert device tree files to use CLK defines ARM: tegra114: create a DT header defining CLK IDs ARM: tegra114: convert device tree files to use CLK defines .../bindings/clock/nvidia,tegra114-car.txt | 261 +------------------ .../bindings/clock/nvidia,tegra20-car.txt | 150 +---------- .../bindings/clock/nvidia,tegra30-car.txt | 207 +-------------- arch/arm/boot/dts/tegra114-car.h | 272 ++++++++++++++++++++ arch/arm/boot/dts/tegra114.dtsip | 13 +- arch/arm/boot/dts/tegra20-car.h | 158 ++++++++++++ arch/arm/boot/dts/tegra20-paz00.dtsp | 2 +- arch/arm/boot/dts/tegra20.dtsip | 85 +++--- arch/arm/boot/dts/tegra30-car.h | 218 ++++++++++++++++ arch/arm/boot/dts/tegra30.dtsip | 87 +++---- 10 files changed, 746 insertions(+), 707 deletions(-) create mode 100644 arch/arm/boot/dts/tegra114-car.h create mode 100644 arch/arm/boot/dts/tegra20-car.h create mode 100644 arch/arm/boot/dts/tegra30-car.h -- 1.7.9.5 ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 1/6] ARM: tegra20: create a DT header defining CLK IDs 2013-02-15 8:43 ` Hiroshi Doyu @ 2013-02-15 8:43 ` Hiroshi Doyu -1 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel To replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- arch/arm/boot/dts/tegra20-car.h | 158 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 arch/arm/boot/dts/tegra20-car.h diff --git a/arch/arm/boot/dts/tegra20-car.h b/arch/arm/boot/dts/tegra20-car.h new file mode 100644 index 0000000..5508b66 --- /dev/null +++ b/arch/arm/boot/dts/tegra20-car.h @@ -0,0 +1,158 @@ +/* + * This header provides constants for binding nvidia,tegra20-car. + * + * The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB + * registers. These IDs often match those in the CAR's RST_DEVICES registers, + * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In + * this case, those clocks are assigned IDs above 95 in order to highlight + * this issue. Implementations that interpret these clock IDs as bit values + * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to + * explicitly handle these special cases. + * + * The balance of the clocks controlled by the CAR are assigned IDs of 96 and + * above. + */ + +#ifndef _DT_TEGRA20_CAR_H +#define _DT_TEGRA20_CAR_H + +#define TEGRA20_CLK_CPU 0 +/* 1 */ +/* 2 */ +#define TEGRA20_CLK_AC97 3 +#define TEGRA20_CLK_RTC 4 +#define TEGRA20_CLK_TIMER 5 +#define TEGRA20_CLK_UARTA 6 +/* 7 */ /* register bit affects uart2 and vfir */ +#define TEGRA20_CLK_GPIO 8 +#define TEGRA20_CLK_SDMMC2 9 +/* 10 */ /* register bit affects spdif_in and spdif_out */ +#define TEGRA20_CLK_I2S1 11 +#define TEGRA20_CLK_I2C1 12 +#define TEGRA20_CLK_NDFLASH 13 +#define TEGRA20_CLK_SDMMC1 14 +#define TEGRA20_CLK_SDMMC4 15 +#define TEGRA20_CLK_TWC 16 +#define TEGRA20_CLK_PWM 17 +#define TEGRA20_CLK_I2S2 18 +#define TEGRA20_CLK_EPP 19 +/* 20 */ /* register bit affects vi and vi_sensor */ +#define TEGRA20_CLK_GR2D 21 +#define TEGRA20_CLK_USBD 22 +#define TEGRA20_CLK_ISP 23 +#define TEGRA20_CLK_GR3D 24 +#define TEGRA20_CLK_IDE 25 +#define TEGRA20_CLK_DISP2 26 +#define TEGRA20_CLK_DISP1 27 +#define TEGRA20_CLK_HOST1X 28 +#define TEGRA20_CLK_VCP 29 +/* 30 */ +#define TEGRA20_CLK_CACHE2 31 + +#define TEGRA20_CLK_MEM 32 +#define TEGRA20_CLK_AHBDMA 33 +#define TEGRA20_CLK_APBDMA 34 +/* 35 */ +#define TEGRA20_CLK_KBC 36 +#define TEGRA20_CLK_STAT_MON 37 +#define TEGRA20_CLK_PMC 38 +#define TEGRA20_CLK_FUSE 39 +#define TEGRA20_CLK_KFUSE 40 +#define TEGRA20_CLK_SBC1 41 +#define TEGRA20_CLK_NOR 42 +#define TEGRA20_CLK_SPI 43 +#define TEGRA20_CLK_SBC2 44 +#define TEGRA20_CLK_XIO 45 +#define TEGRA20_CLK_SBC3 46 +#define TEGRA20_CLK_DVC 47 +#define TEGRA20_CLK_DSI 48 +/* 49 */ /* register bit affects tvo and cve */ +#define TEGRA20_CLK_MIPI 50 +#define TEGRA20_CLK_HDMI 51 +#define TEGRA20_CLK_CSI 52 +#define TEGRA20_CLK_TVDAC 53 +#define TEGRA20_CLK_I2C2 54 +#define TEGRA20_CLK_UARTC 55 +/* 56 */ +#define TEGRA20_CLK_EMC 57 +#define TEGRA20_CLK_USB2 58 +#define TEGRA20_CLK_USB3 59 +#define TEGRA20_CLK_MPE 60 +#define TEGRA20_CLK_VDE 61 +#define TEGRA20_CLK_BSEA 62 +#define TEGRA20_CLK_BSEV 63 + +#define TEGRA20_CLK_SPEEDO 64 +#define TEGRA20_CLK_UARTD 65 +#define TEGRA20_CLK_UARTE 66 +#define TEGRA20_CLK_I2C3 67 +#define TEGRA20_CLK_SBC4 68 +#define TEGRA20_CLK_SDMMC3 69 +#define TEGRA20_CLK_PEX 70 +#define TEGRA20_CLK_OWR 71 +#define TEGRA20_CLK_AFI 72 +#define TEGRA20_CLK_CSITE 73 +#define TEGRA20_CLK_PCIE_XCLK 74 +#define TEGRA20_CLK_AVPUCQ 75 +#define TEGRA20_CLK_LA 76 +/* 77 */ +/* 78 */ +/* 79 */ +/* 80 */ +/* 81 */ +/* 82 */ +/* 83 */ +#define TEGRA20_CLK_IRAMA 84 +#define TEGRA20_CLK_IRAMB 85 +#define TEGRA20_CLK_IRAMC 86 +#define TEGRA20_CLK_IRAMD 87 +#define TEGRA20_CLK_CRAM2 88 +#define TEGRA20_CLK_AUDIO_2X 89 /* audio_2x_sync_clk */ +#define TEGRA20_CLK_D 90 +/* 91 */ +#define TEGRA20_CLK_CSUS 92 +#define TEGRA20_CLK_CDEV1 93 +#define TEGRA20_CLK_CDEV2 94 +/* 95 */ + +#define TEGRA20_CLK_UARTB 96 +#define TEGRA20_CLK_VFIR 97 +#define TEGRA20_CLK_SPDIF_IN 98 +#define TEGRA20_CLK_SPDIF_OUT 99 +#define TEGRA20_CLK_VI 100 +#define TEGRA20_CLK_VI_SENSOR 101 +#define TEGRA20_CLK_TVO 102 +#define TEGRA20_CLK_CVE 103 +#define TEGRA20_CLK_OSC 104 +#define TEGRA20_CLK_32K 105 /* clk_s */ +#define TEGRA20_CLK_M 106 +#define TEGRA20_CLK_SCLK 107 +#define TEGRA20_CLK_CCLK 108 +#define TEGRA20_CLK_HCLK 109 +#define TEGRA20_CLK_PCLK 110 +#define TEGRA20_CLK_BLINK 111 +#define TEGRA20_CLK_PLL_A 112 +#define TEGRA20_CLK_PLL_A_OUT0 113 +#define TEGRA20_CLK_PLL_C 114 +#define TEGRA20_CLK_PLL_C_OUT1 115 +#define TEGRA20_CLK_PLL_D 116 +#define TEGRA20_CLK_PLL_D_OUT0 117 +#define TEGRA20_CLK_PLL_E 118 +#define TEGRA20_CLK_PLL_M 119 +#define TEGRA20_CLK_PLL_M_OUT1 120 +#define TEGRA20_CLK_PLL_P 121 +#define TEGRA20_CLK_PLL_P_OUT1 122 +#define TEGRA20_CLK_PLL_P_OUT2 123 +#define TEGRA20_CLK_PLL_P_OUT3 124 +#define TEGRA20_CLK_PLL_P_OUT4 125 +#define TEGRA20_CLK_PLL_S 126 +#define TEGRA20_CLK_PLL_U 127 + +#define TEGRA20_CLK_PLL_X 128 +#define TEGRA20_CLK_COP 129 /* avp */ +#define TEGRA20_CLK_AUDIO 130 /* audio_sync_clk */ +#define TEGRA20_CLK_PLL_REF 131 +#define TEGRA20_CLK_TWD 132 +#define TEGRA20_CLK_MAX 133 + +#endif /* _DT_TEGRA20_CAR_H */ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [v3 1/6] ARM: tegra20: create a DT header defining CLK IDs @ 2013-02-15 8:43 ` Hiroshi Doyu 0 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel To replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- arch/arm/boot/dts/tegra20-car.h | 158 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 arch/arm/boot/dts/tegra20-car.h diff --git a/arch/arm/boot/dts/tegra20-car.h b/arch/arm/boot/dts/tegra20-car.h new file mode 100644 index 0000000..5508b66 --- /dev/null +++ b/arch/arm/boot/dts/tegra20-car.h @@ -0,0 +1,158 @@ +/* + * This header provides constants for binding nvidia,tegra20-car. + * + * The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB + * registers. These IDs often match those in the CAR's RST_DEVICES registers, + * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In + * this case, those clocks are assigned IDs above 95 in order to highlight + * this issue. Implementations that interpret these clock IDs as bit values + * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to + * explicitly handle these special cases. + * + * The balance of the clocks controlled by the CAR are assigned IDs of 96 and + * above. + */ + +#ifndef _DT_TEGRA20_CAR_H +#define _DT_TEGRA20_CAR_H + +#define TEGRA20_CLK_CPU 0 +/* 1 */ +/* 2 */ +#define TEGRA20_CLK_AC97 3 +#define TEGRA20_CLK_RTC 4 +#define TEGRA20_CLK_TIMER 5 +#define TEGRA20_CLK_UARTA 6 +/* 7 */ /* register bit affects uart2 and vfir */ +#define TEGRA20_CLK_GPIO 8 +#define TEGRA20_CLK_SDMMC2 9 +/* 10 */ /* register bit affects spdif_in and spdif_out */ +#define TEGRA20_CLK_I2S1 11 +#define TEGRA20_CLK_I2C1 12 +#define TEGRA20_CLK_NDFLASH 13 +#define TEGRA20_CLK_SDMMC1 14 +#define TEGRA20_CLK_SDMMC4 15 +#define TEGRA20_CLK_TWC 16 +#define TEGRA20_CLK_PWM 17 +#define TEGRA20_CLK_I2S2 18 +#define TEGRA20_CLK_EPP 19 +/* 20 */ /* register bit affects vi and vi_sensor */ +#define TEGRA20_CLK_GR2D 21 +#define TEGRA20_CLK_USBD 22 +#define TEGRA20_CLK_ISP 23 +#define TEGRA20_CLK_GR3D 24 +#define TEGRA20_CLK_IDE 25 +#define TEGRA20_CLK_DISP2 26 +#define TEGRA20_CLK_DISP1 27 +#define TEGRA20_CLK_HOST1X 28 +#define TEGRA20_CLK_VCP 29 +/* 30 */ +#define TEGRA20_CLK_CACHE2 31 + +#define TEGRA20_CLK_MEM 32 +#define TEGRA20_CLK_AHBDMA 33 +#define TEGRA20_CLK_APBDMA 34 +/* 35 */ +#define TEGRA20_CLK_KBC 36 +#define TEGRA20_CLK_STAT_MON 37 +#define TEGRA20_CLK_PMC 38 +#define TEGRA20_CLK_FUSE 39 +#define TEGRA20_CLK_KFUSE 40 +#define TEGRA20_CLK_SBC1 41 +#define TEGRA20_CLK_NOR 42 +#define TEGRA20_CLK_SPI 43 +#define TEGRA20_CLK_SBC2 44 +#define TEGRA20_CLK_XIO 45 +#define TEGRA20_CLK_SBC3 46 +#define TEGRA20_CLK_DVC 47 +#define TEGRA20_CLK_DSI 48 +/* 49 */ /* register bit affects tvo and cve */ +#define TEGRA20_CLK_MIPI 50 +#define TEGRA20_CLK_HDMI 51 +#define TEGRA20_CLK_CSI 52 +#define TEGRA20_CLK_TVDAC 53 +#define TEGRA20_CLK_I2C2 54 +#define TEGRA20_CLK_UARTC 55 +/* 56 */ +#define TEGRA20_CLK_EMC 57 +#define TEGRA20_CLK_USB2 58 +#define TEGRA20_CLK_USB3 59 +#define TEGRA20_CLK_MPE 60 +#define TEGRA20_CLK_VDE 61 +#define TEGRA20_CLK_BSEA 62 +#define TEGRA20_CLK_BSEV 63 + +#define TEGRA20_CLK_SPEEDO 64 +#define TEGRA20_CLK_UARTD 65 +#define TEGRA20_CLK_UARTE 66 +#define TEGRA20_CLK_I2C3 67 +#define TEGRA20_CLK_SBC4 68 +#define TEGRA20_CLK_SDMMC3 69 +#define TEGRA20_CLK_PEX 70 +#define TEGRA20_CLK_OWR 71 +#define TEGRA20_CLK_AFI 72 +#define TEGRA20_CLK_CSITE 73 +#define TEGRA20_CLK_PCIE_XCLK 74 +#define TEGRA20_CLK_AVPUCQ 75 +#define TEGRA20_CLK_LA 76 +/* 77 */ +/* 78 */ +/* 79 */ +/* 80 */ +/* 81 */ +/* 82 */ +/* 83 */ +#define TEGRA20_CLK_IRAMA 84 +#define TEGRA20_CLK_IRAMB 85 +#define TEGRA20_CLK_IRAMC 86 +#define TEGRA20_CLK_IRAMD 87 +#define TEGRA20_CLK_CRAM2 88 +#define TEGRA20_CLK_AUDIO_2X 89 /* audio_2x_sync_clk */ +#define TEGRA20_CLK_D 90 +/* 91 */ +#define TEGRA20_CLK_CSUS 92 +#define TEGRA20_CLK_CDEV1 93 +#define TEGRA20_CLK_CDEV2 94 +/* 95 */ + +#define TEGRA20_CLK_UARTB 96 +#define TEGRA20_CLK_VFIR 97 +#define TEGRA20_CLK_SPDIF_IN 98 +#define TEGRA20_CLK_SPDIF_OUT 99 +#define TEGRA20_CLK_VI 100 +#define TEGRA20_CLK_VI_SENSOR 101 +#define TEGRA20_CLK_TVO 102 +#define TEGRA20_CLK_CVE 103 +#define TEGRA20_CLK_OSC 104 +#define TEGRA20_CLK_32K 105 /* clk_s */ +#define TEGRA20_CLK_M 106 +#define TEGRA20_CLK_SCLK 107 +#define TEGRA20_CLK_CCLK 108 +#define TEGRA20_CLK_HCLK 109 +#define TEGRA20_CLK_PCLK 110 +#define TEGRA20_CLK_BLINK 111 +#define TEGRA20_CLK_PLL_A 112 +#define TEGRA20_CLK_PLL_A_OUT0 113 +#define TEGRA20_CLK_PLL_C 114 +#define TEGRA20_CLK_PLL_C_OUT1 115 +#define TEGRA20_CLK_PLL_D 116 +#define TEGRA20_CLK_PLL_D_OUT0 117 +#define TEGRA20_CLK_PLL_E 118 +#define TEGRA20_CLK_PLL_M 119 +#define TEGRA20_CLK_PLL_M_OUT1 120 +#define TEGRA20_CLK_PLL_P 121 +#define TEGRA20_CLK_PLL_P_OUT1 122 +#define TEGRA20_CLK_PLL_P_OUT2 123 +#define TEGRA20_CLK_PLL_P_OUT3 124 +#define TEGRA20_CLK_PLL_P_OUT4 125 +#define TEGRA20_CLK_PLL_S 126 +#define TEGRA20_CLK_PLL_U 127 + +#define TEGRA20_CLK_PLL_X 128 +#define TEGRA20_CLK_COP 129 /* avp */ +#define TEGRA20_CLK_AUDIO 130 /* audio_sync_clk */ +#define TEGRA20_CLK_PLL_REF 131 +#define TEGRA20_CLK_TWD 132 +#define TEGRA20_CLK_MAX 133 + +#endif /* _DT_TEGRA20_CAR_H */ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [v3 3/6] ARM: tegra30: create a DT header defining CLK IDs 2013-02-15 8:43 ` Hiroshi Doyu @ 2013-02-15 8:43 ` Hiroshi Doyu -1 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel To replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- arch/arm/boot/dts/tegra30-car.h | 218 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 arch/arm/boot/dts/tegra30-car.h diff --git a/arch/arm/boot/dts/tegra30-car.h b/arch/arm/boot/dts/tegra30-car.h new file mode 100644 index 0000000..75edf761 --- /dev/null +++ b/arch/arm/boot/dts/tegra30-car.h @@ -0,0 +1,218 @@ +/* + * This header provides constants for binding nvidia,tegra30-car. + * + * The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB + * registers. These IDs often match those in the CAR's RST_DEVICES registers, + * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In + * this case, those clocks are assigned IDs above 160 in order to highlight + * this issue. Implementations that interpret these clock IDs as bit values + * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to + * explicitly handle these special cases. + * + * The balance of the clocks controlled by the CAR are assigned IDs of 160 and + * above. + */ + +#ifndef _DT_TEGRA30_CAR_H +#define _DT_TEGRA30_CAR_H + +#define TEGRA30_CLK_CPU 0 +/* 1 */ +/* 2 */ +/* 3 */ +#define TEGRA30_CLK_RTC 4 +#define TEGRA30_CLK_TIMER 5 +#define TEGRA30_CLK_UARTA 6 +/* 7 */ /* register bit affects uartb and vfir */ +#define TEGRA30_CLK_GPIO 8 +#define TEGRA30_CLK_SDMMC2 9 +/* 10 */ /* register bit affects spdif_in and spdif_out */ +#define TEGRA30_CLK_I2S1 11 +#define TEGRA30_CLK_I2C1 12 +#define TEGRA30_CLK_NDFLASH 13 +#define TEGRA30_CLK_SDMMC1 14 +#define TEGRA30_CLK_SDMMC4 15 +/* 16 */ +#define TEGRA30_CLK_PWM 17 +#define TEGRA30_CLK_I2S2 18 +#define TEGRA30_CLK_EPP 19 +/* 20 */ /* register bit affects vi and vi_sensor */ +#define TEGRA30_CLK_GR2D 21 +#define TEGRA30_CLK_USBD 22 +#define TEGRA30_CLK_ISP 23 +#define TEGRA30_CLK_GR3D 24 +/* 25 */ +#define TEGRA30_CLK_DISP2 26 +#define TEGRA30_CLK_DISP1 27 +#define TEGRA30_CLK_HOST1X 28 +#define TEGRA30_CLK_VCP 29 +#define TEGRA30_CLK_I2S0 30 +#define TEGRA30_CLK_COP_CACHE 31 + +#define TEGRA30_CLK_MC 32 +#define TEGRA30_CLK_AHBDMA 33 +#define TEGRA30_CLK_APBDMA 34 +/* 35 */ +#define TEGRA30_CLK_KBC 36 +#define TEGRA30_CLK_STATMON 37 +#define TEGRA30_CLK_PMC 38 +/* 39 */ /* register bit affects fuse and fuse_burn */ +#define TEGRA30_CLK_KFUSE 40 +#define TEGRA30_CLK_SBC1 41 +#define TEGRA30_CLK_NOR 42 +/* 43 */ +#define TEGRA30_CLK_SBC2 44 +/* 45 */ +#define TEGRA30_CLK_SBC3 46 +#define TEGRA30_CLK_I2C5 47 +#define TEGRA30_CLK_DSIA 48 +/* 49 */ /* register bit affects cve and tvo */ +#define TEGRA30_CLK_MIPI 50 +#define TEGRA30_CLK_HDMI 51 +#define TEGRA30_CLK_CSI 52 +#define TEGRA30_CLK_TVDAC 53 +#define TEGRA30_CLK_I2C2 54 +#define TEGRA30_CLK_UARTC 55 +/* 56 */ +#define TEGRA30_CLK_EMC 57 +#define TEGRA30_CLK_USB2 58 +#define TEGRA30_CLK_USB3 59 +#define TEGRA30_CLK_MPE 60 +#define TEGRA30_CLK_VDE 61 +#define TEGRA30_CLK_BSEA 62 +#define TEGRA30_CLK_BSEV 63 + +#define TEGRA30_CLK_SPEEDO 64 +#define TEGRA30_CLK_UARTD 65 +#define TEGRA30_CLK_UARTE 66 +#define TEGRA30_CLK_I2C3 67 +#define TEGRA30_CLK_SBC4 68 +#define TEGRA30_CLK_SDMMC3 69 +#define TEGRA30_CLK_PCIE 70 +#define TEGRA30_CLK_OWR 71 +#define TEGRA30_CLK_AFI 72 +#define TEGRA30_CLK_CSITE 73 +#define TEGRA30_CLK_PCIEX 74 +#define TEGRA30_CLK_AVPUCQ 75 +#define TEGRA30_CLK_LA 76 +/* 77 */ +/* 78 */ +#define TEGRA30_CLK_DTV 79 +#define TEGRA30_CLK_NDSPEED 80 +#define TEGRA30_CLK_I2CSLOW 81 +#define TEGRA30_CLK_DSIB 82 +/* 83 */ +#define TEGRA30_CLK_IRAMA 84 +#define TEGRA30_CLK_IRAMB 85 +#define TEGRA30_CLK_IRAMC 86 +#define TEGRA30_CLK_IRAMD 87 +#define TEGRA30_CLK_CRAM2 88 +/* 89 */ +#define TEGRA30_CLK_AUDIO_2X 90 /* audio_2x_sync_clk */ +/* 91 */ +#define TEGRA30_CLK_CSUS 92 +#define TEGRA30_CLK_CDEV1 93 +#define TEGRA30_CLK_CDEV2 94 +/* 95 */ + +#define TEGRA30_CLK_CPU_G 96 +#define TEGRA30_CLK_CPU_LP 97 +#define TEGRA30_CLK_GR3D2 98 +#define TEGRA30_CLK_MSELECT 99 +#define TEGRA30_CLK_TSENSOR 100 +#define TEGRA30_CLK_I2S3 101 +#define TEGRA30_CLK_I2S4 102 +#define TEGRA30_CLK_I2C4 103 +#define TEGRA30_CLK_SBC5 104 +#define TEGRA30_CLK_SBC6 105 +#define TEGRA30_CLK_D_AUDIO 106 +#define TEGRA30_CLK_APBIF 107 +#define TEGRA30_CLK_DAM0 108 +#define TEGRA30_CLK_DAM1 109 +#define TEGRA30_CLK_DAM2 110 +#define TEGRA30_CLK_HDA2CODEC_2X 111 +#define TEGRA30_CLK_ATOMICS 112 +#define TEGRA30_CLK_AUDIO0_2X 113 +#define TEGRA30_CLK_AUDIO1_2X 114 +#define TEGRA30_CLK_AUDIO2_2X 115 +#define TEGRA30_CLK_AUDIO3_2X 116 +#define TEGRA30_CLK_AUDIO4_2X 117 +#define TEGRA30_CLK_SPDIF_2X 118 +#define TEGRA30_CLK_ACTMON 119 +#define TEGRA30_CLK_EXTERN1 120 +#define TEGRA30_CLK_EXTERN2 121 +#define TEGRA30_CLK_EXTERN3 122 +#define TEGRA30_CLK_SATA_OOB 123 +#define TEGRA30_CLK_SATA 124 +#define TEGRA30_CLK_HDA 125 +/* 126 */ +#define TEGRA30_CLK_SE 127 + +#define TEGRA30_CLK_HDA2HDMI 128 +#define TEGRA30_CLK_SATA_COLD 129 + +#define TEGRA30_CLK_UARTB 160 +#define TEGRA30_CLK_VFIR 161 +#define TEGRA30_CLK_SPDIF_IN 162 +#define TEGRA30_CLK_SPDIF_OUT 163 +#define TEGRA30_CLK_VI 164 +#define TEGRA30_CLK_VI_SENSOR 165 +#define TEGRA30_CLK_FUSE 166 +#define TEGRA30_CLK_FUSE_BURN 167 +#define TEGRA30_CLK_CVE 168 +#define TEGRA30_CLK_TVO 169 +#define TEGRA30_CLK_32K 170 +#define TEGRA30_CLK_M 171 +#define TEGRA30_CLK_M_DIV2 172 +#define TEGRA30_CLK_M_DIV4 173 +#define TEGRA30_CLK_PLL_REF 174 +#define TEGRA30_CLK_PLL_C 175 +#define TEGRA30_CLK_PLL_C_OUT1 176 +#define TEGRA30_CLK_PLL_M 177 +#define TEGRA30_CLK_PLL_M_OUT1 178 +#define TEGRA30_CLK_PLL_P 179 +#define TEGRA30_CLK_PLL_P_OUT1 180 +#define TEGRA30_CLK_PLL_P_OUT2 181 +#define TEGRA30_CLK_PLL_P_OUT3 182 +#define TEGRA30_CLK_PLL_P_OUT4 183 +#define TEGRA30_CLK_PLL_A 184 +#define TEGRA30_CLK_PLL_A_OUT0 185 +#define TEGRA30_CLK_PLL_D 186 +#define TEGRA30_CLK_PLL_D_OUT0 187 +#define TEGRA30_CLK_PLL_D2 188 +#define TEGRA30_CLK_PLL_D2_OUT0 189 +#define TEGRA30_CLK_PLL_U 190 +#define TEGRA30_CLK_PLL_X 191 + +#define TEGRA30_CLK_PLL_X_OUT0 192 +#define TEGRA30_CLK_PLL_E 193 +#define TEGRA30_CLK_SPDIF_IN_SYNC 194 +#define TEGRA30_CLK_I2S0_SYNC 195 +#define TEGRA30_CLK_I2S1_SYNC 196 +#define TEGRA30_CLK_I2S2_SYNC 197 +#define TEGRA30_CLK_I2S3_SYNC 198 +#define TEGRA30_CLK_I2S4_SYNC 199 +#define TEGRA30_CLK_VIMCLK_SYNC 200 +#define TEGRA30_CLK_AUDIO0 201 +#define TEGRA30_CLK_AUDIO1 202 +#define TEGRA30_CLK_AUDIO2 203 +#define TEGRA30_CLK_AUDIO3 204 +#define TEGRA30_CLK_AUDIO4 205 +#define TEGRA30_CLK_SPDIF 206 +#define TEGRA30_CLK_OUT_1 207 +#define TEGRA30_CLK_OUT_2 208 +#define TEGRA30_CLK_OUT_3 209 +#define TEGRA30_CLK_SCLK 210 +#define TEGRA30_CLK_BLINK 211 +#define TEGRA30_CLK_CCLK_G 212 +#define TEGRA30_CLK_CCLK_LP 213 +#define TEGRA30_CLK_TWD 214 +#define TEGRA30_CLK_CML0 215 +#define TEGRA30_CLK_CML1 216 +#define TEGRA30_CLK_HCLK 217 +#define TEGRA30_CLK_PCLK 218 + +#define TEGRA30_CLK_OUT_1_MUX 300 +#define TEGRA30_CLK_MAX 301 + +#endif /* _DT_TEGRA30_CAR_H */ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [v3 3/6] ARM: tegra30: create a DT header defining CLK IDs @ 2013-02-15 8:43 ` Hiroshi Doyu 0 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel To replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- arch/arm/boot/dts/tegra30-car.h | 218 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 arch/arm/boot/dts/tegra30-car.h diff --git a/arch/arm/boot/dts/tegra30-car.h b/arch/arm/boot/dts/tegra30-car.h new file mode 100644 index 0000000..75edf761 --- /dev/null +++ b/arch/arm/boot/dts/tegra30-car.h @@ -0,0 +1,218 @@ +/* + * This header provides constants for binding nvidia,tegra30-car. + * + * The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB + * registers. These IDs often match those in the CAR's RST_DEVICES registers, + * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In + * this case, those clocks are assigned IDs above 160 in order to highlight + * this issue. Implementations that interpret these clock IDs as bit values + * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to + * explicitly handle these special cases. + * + * The balance of the clocks controlled by the CAR are assigned IDs of 160 and + * above. + */ + +#ifndef _DT_TEGRA30_CAR_H +#define _DT_TEGRA30_CAR_H + +#define TEGRA30_CLK_CPU 0 +/* 1 */ +/* 2 */ +/* 3 */ +#define TEGRA30_CLK_RTC 4 +#define TEGRA30_CLK_TIMER 5 +#define TEGRA30_CLK_UARTA 6 +/* 7 */ /* register bit affects uartb and vfir */ +#define TEGRA30_CLK_GPIO 8 +#define TEGRA30_CLK_SDMMC2 9 +/* 10 */ /* register bit affects spdif_in and spdif_out */ +#define TEGRA30_CLK_I2S1 11 +#define TEGRA30_CLK_I2C1 12 +#define TEGRA30_CLK_NDFLASH 13 +#define TEGRA30_CLK_SDMMC1 14 +#define TEGRA30_CLK_SDMMC4 15 +/* 16 */ +#define TEGRA30_CLK_PWM 17 +#define TEGRA30_CLK_I2S2 18 +#define TEGRA30_CLK_EPP 19 +/* 20 */ /* register bit affects vi and vi_sensor */ +#define TEGRA30_CLK_GR2D 21 +#define TEGRA30_CLK_USBD 22 +#define TEGRA30_CLK_ISP 23 +#define TEGRA30_CLK_GR3D 24 +/* 25 */ +#define TEGRA30_CLK_DISP2 26 +#define TEGRA30_CLK_DISP1 27 +#define TEGRA30_CLK_HOST1X 28 +#define TEGRA30_CLK_VCP 29 +#define TEGRA30_CLK_I2S0 30 +#define TEGRA30_CLK_COP_CACHE 31 + +#define TEGRA30_CLK_MC 32 +#define TEGRA30_CLK_AHBDMA 33 +#define TEGRA30_CLK_APBDMA 34 +/* 35 */ +#define TEGRA30_CLK_KBC 36 +#define TEGRA30_CLK_STATMON 37 +#define TEGRA30_CLK_PMC 38 +/* 39 */ /* register bit affects fuse and fuse_burn */ +#define TEGRA30_CLK_KFUSE 40 +#define TEGRA30_CLK_SBC1 41 +#define TEGRA30_CLK_NOR 42 +/* 43 */ +#define TEGRA30_CLK_SBC2 44 +/* 45 */ +#define TEGRA30_CLK_SBC3 46 +#define TEGRA30_CLK_I2C5 47 +#define TEGRA30_CLK_DSIA 48 +/* 49 */ /* register bit affects cve and tvo */ +#define TEGRA30_CLK_MIPI 50 +#define TEGRA30_CLK_HDMI 51 +#define TEGRA30_CLK_CSI 52 +#define TEGRA30_CLK_TVDAC 53 +#define TEGRA30_CLK_I2C2 54 +#define TEGRA30_CLK_UARTC 55 +/* 56 */ +#define TEGRA30_CLK_EMC 57 +#define TEGRA30_CLK_USB2 58 +#define TEGRA30_CLK_USB3 59 +#define TEGRA30_CLK_MPE 60 +#define TEGRA30_CLK_VDE 61 +#define TEGRA30_CLK_BSEA 62 +#define TEGRA30_CLK_BSEV 63 + +#define TEGRA30_CLK_SPEEDO 64 +#define TEGRA30_CLK_UARTD 65 +#define TEGRA30_CLK_UARTE 66 +#define TEGRA30_CLK_I2C3 67 +#define TEGRA30_CLK_SBC4 68 +#define TEGRA30_CLK_SDMMC3 69 +#define TEGRA30_CLK_PCIE 70 +#define TEGRA30_CLK_OWR 71 +#define TEGRA30_CLK_AFI 72 +#define TEGRA30_CLK_CSITE 73 +#define TEGRA30_CLK_PCIEX 74 +#define TEGRA30_CLK_AVPUCQ 75 +#define TEGRA30_CLK_LA 76 +/* 77 */ +/* 78 */ +#define TEGRA30_CLK_DTV 79 +#define TEGRA30_CLK_NDSPEED 80 +#define TEGRA30_CLK_I2CSLOW 81 +#define TEGRA30_CLK_DSIB 82 +/* 83 */ +#define TEGRA30_CLK_IRAMA 84 +#define TEGRA30_CLK_IRAMB 85 +#define TEGRA30_CLK_IRAMC 86 +#define TEGRA30_CLK_IRAMD 87 +#define TEGRA30_CLK_CRAM2 88 +/* 89 */ +#define TEGRA30_CLK_AUDIO_2X 90 /* audio_2x_sync_clk */ +/* 91 */ +#define TEGRA30_CLK_CSUS 92 +#define TEGRA30_CLK_CDEV1 93 +#define TEGRA30_CLK_CDEV2 94 +/* 95 */ + +#define TEGRA30_CLK_CPU_G 96 +#define TEGRA30_CLK_CPU_LP 97 +#define TEGRA30_CLK_GR3D2 98 +#define TEGRA30_CLK_MSELECT 99 +#define TEGRA30_CLK_TSENSOR 100 +#define TEGRA30_CLK_I2S3 101 +#define TEGRA30_CLK_I2S4 102 +#define TEGRA30_CLK_I2C4 103 +#define TEGRA30_CLK_SBC5 104 +#define TEGRA30_CLK_SBC6 105 +#define TEGRA30_CLK_D_AUDIO 106 +#define TEGRA30_CLK_APBIF 107 +#define TEGRA30_CLK_DAM0 108 +#define TEGRA30_CLK_DAM1 109 +#define TEGRA30_CLK_DAM2 110 +#define TEGRA30_CLK_HDA2CODEC_2X 111 +#define TEGRA30_CLK_ATOMICS 112 +#define TEGRA30_CLK_AUDIO0_2X 113 +#define TEGRA30_CLK_AUDIO1_2X 114 +#define TEGRA30_CLK_AUDIO2_2X 115 +#define TEGRA30_CLK_AUDIO3_2X 116 +#define TEGRA30_CLK_AUDIO4_2X 117 +#define TEGRA30_CLK_SPDIF_2X 118 +#define TEGRA30_CLK_ACTMON 119 +#define TEGRA30_CLK_EXTERN1 120 +#define TEGRA30_CLK_EXTERN2 121 +#define TEGRA30_CLK_EXTERN3 122 +#define TEGRA30_CLK_SATA_OOB 123 +#define TEGRA30_CLK_SATA 124 +#define TEGRA30_CLK_HDA 125 +/* 126 */ +#define TEGRA30_CLK_SE 127 + +#define TEGRA30_CLK_HDA2HDMI 128 +#define TEGRA30_CLK_SATA_COLD 129 + +#define TEGRA30_CLK_UARTB 160 +#define TEGRA30_CLK_VFIR 161 +#define TEGRA30_CLK_SPDIF_IN 162 +#define TEGRA30_CLK_SPDIF_OUT 163 +#define TEGRA30_CLK_VI 164 +#define TEGRA30_CLK_VI_SENSOR 165 +#define TEGRA30_CLK_FUSE 166 +#define TEGRA30_CLK_FUSE_BURN 167 +#define TEGRA30_CLK_CVE 168 +#define TEGRA30_CLK_TVO 169 +#define TEGRA30_CLK_32K 170 +#define TEGRA30_CLK_M 171 +#define TEGRA30_CLK_M_DIV2 172 +#define TEGRA30_CLK_M_DIV4 173 +#define TEGRA30_CLK_PLL_REF 174 +#define TEGRA30_CLK_PLL_C 175 +#define TEGRA30_CLK_PLL_C_OUT1 176 +#define TEGRA30_CLK_PLL_M 177 +#define TEGRA30_CLK_PLL_M_OUT1 178 +#define TEGRA30_CLK_PLL_P 179 +#define TEGRA30_CLK_PLL_P_OUT1 180 +#define TEGRA30_CLK_PLL_P_OUT2 181 +#define TEGRA30_CLK_PLL_P_OUT3 182 +#define TEGRA30_CLK_PLL_P_OUT4 183 +#define TEGRA30_CLK_PLL_A 184 +#define TEGRA30_CLK_PLL_A_OUT0 185 +#define TEGRA30_CLK_PLL_D 186 +#define TEGRA30_CLK_PLL_D_OUT0 187 +#define TEGRA30_CLK_PLL_D2 188 +#define TEGRA30_CLK_PLL_D2_OUT0 189 +#define TEGRA30_CLK_PLL_U 190 +#define TEGRA30_CLK_PLL_X 191 + +#define TEGRA30_CLK_PLL_X_OUT0 192 +#define TEGRA30_CLK_PLL_E 193 +#define TEGRA30_CLK_SPDIF_IN_SYNC 194 +#define TEGRA30_CLK_I2S0_SYNC 195 +#define TEGRA30_CLK_I2S1_SYNC 196 +#define TEGRA30_CLK_I2S2_SYNC 197 +#define TEGRA30_CLK_I2S3_SYNC 198 +#define TEGRA30_CLK_I2S4_SYNC 199 +#define TEGRA30_CLK_VIMCLK_SYNC 200 +#define TEGRA30_CLK_AUDIO0 201 +#define TEGRA30_CLK_AUDIO1 202 +#define TEGRA30_CLK_AUDIO2 203 +#define TEGRA30_CLK_AUDIO3 204 +#define TEGRA30_CLK_AUDIO4 205 +#define TEGRA30_CLK_SPDIF 206 +#define TEGRA30_CLK_OUT_1 207 +#define TEGRA30_CLK_OUT_2 208 +#define TEGRA30_CLK_OUT_3 209 +#define TEGRA30_CLK_SCLK 210 +#define TEGRA30_CLK_BLINK 211 +#define TEGRA30_CLK_CCLK_G 212 +#define TEGRA30_CLK_CCLK_LP 213 +#define TEGRA30_CLK_TWD 214 +#define TEGRA30_CLK_CML0 215 +#define TEGRA30_CLK_CML1 216 +#define TEGRA30_CLK_HCLK 217 +#define TEGRA30_CLK_PCLK 218 + +#define TEGRA30_CLK_OUT_1_MUX 300 +#define TEGRA30_CLK_MAX 301 + +#endif /* _DT_TEGRA30_CAR_H */ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [v3 5/6] ARM: tegra114: create a DT header defining CLK IDs 2013-02-15 8:43 ` Hiroshi Doyu @ 2013-02-15 8:43 ` Hiroshi Doyu -1 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel To replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- arch/arm/boot/dts/tegra114-car.h | 272 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 arch/arm/boot/dts/tegra114-car.h diff --git a/arch/arm/boot/dts/tegra114-car.h b/arch/arm/boot/dts/tegra114-car.h new file mode 100644 index 0000000..1fa425a --- /dev/null +++ b/arch/arm/boot/dts/tegra114-car.h @@ -0,0 +1,272 @@ +/* + * This header provides constants for binding nvidia,tegra114-car. + * + * The first 160 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB + * registers. These IDs often match those in the CAR's RST_DEVICES registers, + * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In + * this case, those clocks are assigned IDs above 160 in order to highlight + * this issue. Implementations that interpret these clock IDs as bit values + * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to + * explicitly handle these special cases. + * + * The balance of the clocks controlled by the CAR are assigned IDs of 160 and + * above. + */ + +#ifndef _DT_TEGRA114_CAR_H +#define _DT_TEGRA114_CAR_H + +#define TEGRA114_CLK_CPU 0 +/* 1 */ +/* 2 */ +/* 3 */ +#define TEGRA114_CLK_RTC 4 +#define TEGRA114_CLK_TIMER 5 +#define TEGRA114_CLK_UARTA 6 +/* 7 */ /* register bit affects uartb and vfir */ +/* 8 */ +#define TEGRA114_CLK_SDMMC2 9 +/* 10 */ /* register bit affects spdif_in and spdif_out */ +#define TEGRA114_CLK_I2S1 11 +#define TEGRA114_CLK_I2C1 12 +#define TEGRA114_CLK_NDFLASH 13 +#define TEGRA114_CLK_SDMMC1 14 +#define TEGRA114_CLK_SDMMC4 15 +/* 16 */ +#define TEGRA114_CLK_PWM 17 +#define TEGRA114_CLK_I2S2 18 +#define TEGRA114_CLK_EPP 19 +/* 20 */ /* register bit affects vi and vi_sensor */ +#define TEGRA114_CLK_GR_2D 21 +#define TEGRA114_CLK_USBD 22 +#define TEGRA114_CLK_ISP 23 +#define TEGRA114_CLK_GR_3D 24 +/* 25 */ +#define TEGRA114_CLK_DISP2 26 +#define TEGRA114_CLK_DISP1 27 +#define TEGRA114_CLK_HOST1X 28 +#define TEGRA114_CLK_VCP 29 +#define TEGRA114_CLK_I2S0 30 +/* 31 */ + +/* 32 */ +/* 33 */ +#define TEGRA114_CLK_APBDMA 34 +/* 35 */ +#define TEGRA114_CLK_KBC 36 +/* 37 */ +/* 38 */ +/* 39 */ +#define TEGRA114_CLK_KFUSE 40 +#define TEGRA114_CLK_SBC1 41 +#define TEGRA114_CLK_NOR 42 +/* 43 */ +#define TEGRA114_CLK_SBC2 44 +/* 45 */ +#define TEGRA114_CLK_SBC3 46 +#define TEGRA114_CLK_I2C5 47 +#define TEGRA114_CLK_DSIA 48 +/* 49 */ +#define TEGRA114_CLK_MIPI 50 +#define TEGRA114_CLK_HDMI 51 +#define TEGRA114_CLK_CSI 52 +/* 53 */ +#define TEGRA114_CLK_I2C2 54 +#define TEGRA114_CLK_UARTC 55 +#define TEGRA114_CLK_MIPI_CAL 56 +/* 57 */ +#define TEGRA114_CLK_USB2 58 +#define TEGRA114_CLK_USB3 59 +/* 60 */ +#define TEGRA114_CLK_VDE 61 +#define TEGRA114_CLK_BSEA 62 +#define TEGRA114_CLK_BSEV 63 + +/* 64 */ +#define TEGRA114_CLK_UARTD 65 +#define TEGRA114_CLK_UARTE 66 +#define TEGRA114_CLK_I2C3 67 +#define TEGRA114_CLK_SBC4 68 +#define TEGRA114_CLK_SDMMC3 69 +/* 70 */ +#define TEGRA114_CLK_OWR 71 +/* 72 */ +#define TEGRA114_CLK_CSITE 73 +/* 74 */ +/* 75 */ +#define TEGRA114_CLK_LA 76 +#define TEGRA114_CLK_TRACE 77 +#define TEGRA114_CLK_SOC_THERM 78 +#define TEGRA114_CLK_DTV 79 +#define TEGRA114_CLK_NDSPEED 80 +#define TEGRA114_CLK_I2CSLOW 81 +#define TEGRA114_CLK_DSIB 82 +#define TEGRA114_CLK_TSEC 83 +/* 84 */ +/* 85 */ +/* 86 */ +/* 87 */ +/* 88 */ +#define TEGRA114_CLK_XUSB_HOST 89 +/* 90 */ +#define TEGRA114_CLK_MSENC 91 +#define TEGRA114_CLK_CSUS 92 +/* 93 */ +/* 94 */ +/* 95 */ /* bit affects xusb_dev and xusb_dev_src */ + +/* 96 */ +/* 97 */ +/* 98 */ +#define TEGRA114_CLK_MSELECT 99 +#define TEGRA114_CLK_TSENSOR 100 +#define TEGRA114_CLK_I2S3 101 +#define TEGRA114_CLK_I2S4 102 +#define TEGRA114_CLK_I2C4 103 +#define TEGRA114_CLK_SBC5 104 +#define TEGRA114_CLK_SBC6 105 +#define TEGRA114_CLK_D_AUDIO 106 +#define TEGRA114_CLK_APBIF 107 +#define TEGRA114_CLK_DAM0 108 +#define TEGRA114_CLK_DAM1 109 +#define TEGRA114_CLK_DAM2 110 +#define TEGRA114_CLK_HDA2CODEC_2X 111 +/* 112 */ +#define TEGRA114_CLK_AUDIO0_2X 113 +#define TEGRA114_CLK_AUDIO1_2X 114 +#define TEGRA114_CLK_AUDIO2_2X 115 +#define TEGRA114_CLK_AUDIO3_2X 116 +#define TEGRA114_CLK_AUDIO4_2X 117 +#define TEGRA114_CLK_SPDIF_2X 118 +#define TEGRA114_CLK_ACTMON 119 +#define TEGRA114_CLK_EXTERN1 120 +#define TEGRA114_CLK_EXTERN2 121 +#define TEGRA114_CLK_EXTERN3 122 +/* 123 */ +/* 124 */ +#define TEGRA114_CLK_HDA 125 +/* 126 */ +#define TEGRA114_CLK_SE 127 + +#define TEGRA114_CLK_HDA2HDMI 128 +/* 129 */ +/* 130 */ +/* 131 */ +/* 132 */ +/* 133 */ +/* 134 */ +/* 135 */ +/* 136 */ +/* 137 */ +/* 138 */ +/* 139 */ +/* 140 */ +/* 141 */ +/* 142 */ +/* 143 */ /* bit affects xusb_falcon_src, xusb_fs_src, xusb_host_src and xusb_ss_src */ +#define TEGRA114_CLK_CILAB 144 +#define TEGRA114_CLK_CILCD 145 +#define TEGRA114_CLK_CILE 146 +#define TEGRA114_CLK_DSIALP 147 +#define TEGRA114_CLK_DSIBLP 148 +/* 149 */ +#define TEGRA114_CLK_DDS 150 +/* 151 */ +#define TEGRA114_CLK_DP2 152 +#define TEGRA114_CLK_AMX 153 +#define TEGRA114_CLK_ADX 154 +/* 155 */ +#define TEGRA114_CLK_XUSB_SS 156 +/* 157 */ +/* 158 */ +/* 159 */ + +#define TEGRA114_CLK_UARTB 192 +#define TEGRA114_CLK_VFIR 193 +#define TEGRA114_CLK_SPDIF_IN 194 +#define TEGRA114_CLK_SPDIF_OUT 195 +#define TEGRA114_CLK_VI 196 +#define TEGRA114_CLK_VI_SENSOR 197 +#define TEGRA114_CLK_FUSE 198 +#define TEGRA114_CLK_FUSE_BURN 199 +#define TEGRA114_CLK_32K 200 +#define TEGRA114_CLK_M 201 +#define TEGRA114_CLK_M_DIV2 202 +#define TEGRA114_CLK_M_DIV4 203 +#define TEGRA114_CLK_PLL_REF 204 +#define TEGRA114_CLK_PLL_C 205 +#define TEGRA114_CLK_PLL_C_OUT1 206 +#define TEGRA114_CLK_PLL_C2 207 +#define TEGRA114_CLK_PLL_C3 208 +#define TEGRA114_CLK_PLL_M 209 +#define TEGRA114_CLK_PLL_M_OUT1 210 +#define TEGRA114_CLK_PLL_P 211 +#define TEGRA114_CLK_PLL_P_OUT1 212 +#define TEGRA114_CLK_PLL_P_OUT2 213 +#define TEGRA114_CLK_PLL_P_OUT3 214 +#define TEGRA114_CLK_PLL_P_OUT4 215 +#define TEGRA114_CLK_PLL_A 216 +#define TEGRA114_CLK_PLL_A_OUT0 217 +#define TEGRA114_CLK_PLL_D 218 +#define TEGRA114_CLK_PLL_D_OUT0 219 +#define TEGRA114_CLK_PLL_D2 220 +#define TEGRA114_CLK_PLL_D2_OUT0 221 +#define TEGRA114_CLK_PLL_U 222 +#define TEGRA114_CLK_PLL_U_480M 223 + +#define TEGRA114_CLK_PLL_U_60M 224 +#define TEGRA114_CLK_PLL_U_48M 225 +#define TEGRA114_CLK_PLL_U_12M 226 +#define TEGRA114_CLK_PLL_X 227 +#define TEGRA114_CLK_PLL_X_OUT0 228 +#define TEGRA114_CLK_PLL_RE_VCO 229 +#define TEGRA114_CLK_PLL_RE_OUT 230 +#define TEGRA114_CLK_PLL_E_OUT0 231 +#define TEGRA114_CLK_SPDIF_IN_SYNC 232 +#define TEGRA114_CLK_I2S0_SYNC 233 +#define TEGRA114_CLK_I2S1_SYNC 234 +#define TEGRA114_CLK_I2S2_SYNC 235 +#define TEGRA114_CLK_I2S3_SYNC 236 +#define TEGRA114_CLK_I2S4_SYNC 237 +#define TEGRA114_CLK_VIMCLK_SYNC 238 +#define TEGRA114_CLK_AUDIO0 239 +#define TEGRA114_CLK_AUDIO1 240 +#define TEGRA114_CLK_AUDIO2 241 +#define TEGRA114_CLK_AUDIO3 242 +#define TEGRA114_CLK_AUDIO4 243 +#define TEGRA114_CLK_SPDIF 244 +#define TEGRA114_CLK_OUT_1 245 +#define TEGRA114_CLK_OUT_2 246 +#define TEGRA114_CLK_OUT_3 247 +#define TEGRA114_CLK_BLINK 248 +#define TEGRA114_CLK_MIPI_CAL_FAST 214 +#define TEGRA114_CLK_DSI1_FIXED 214 +#define TEGRA114_CLK_DSI2_FIXED 214 +#define TEGRA114_CLK_XUSB_HOST_SRC 215 +#define TEGRA114_CLK_XUSB_FALCON_SRC 216 +#define TEGRA114_CLK_XUSB_FS_SRC 217 +#define TEGRA114_CLK_XUSB_SS_SRC 218 +#define TEGRA114_CLK_XUSB_DEV_SRC 219 +#define TEGRA114_CLK_XUSB_DEV 220 +#define TEGRA114_CLK_XUSB_HS_SRC 221 +#define TEGRA114_CLK_SCLK 222 +#define TEGRA114_CLK_HCLK 223 + +#define TEGRA114_CLK_PCLK 224 +#define TEGRA114_CLK_CCLK_G 225 +#define TEGRA114_CLK_CCLK_LP 226 + +#define TEGRA114_CLK_AUDIO0_MUX 300 /* Mux clocks */ +#define TEGRA114_CLK_AUDIO1_MUX 301 +#define TEGRA114_CLK_AUDIO2_MUX 302 +#define TEGRA114_CLK_AUDIO3_MUX 303 +#define TEGRA114_CLK_AUDIO4_MUX 304 +#define TEGRA114_CLK_SPDIF_MUX 305 +#define TEGRA114_CLK_OUT_1_MUX 306 +#define TEGRA114_CLK_OUT_2_MUX 307 +#define TEGRA114_CLK_OUT_3_MUX 308 +#define TEGRA114_CLK_DSIA_MUX 309 +#define TEGRA114_CLK_DSIB_MUX 310 +#define TEGRA114_CLK_MAX 311 + +#endif /* _DT_TEGRA114_CAR_H */ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [v3 5/6] ARM: tegra114: create a DT header defining CLK IDs @ 2013-02-15 8:43 ` Hiroshi Doyu 0 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel To replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- arch/arm/boot/dts/tegra114-car.h | 272 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 arch/arm/boot/dts/tegra114-car.h diff --git a/arch/arm/boot/dts/tegra114-car.h b/arch/arm/boot/dts/tegra114-car.h new file mode 100644 index 0000000..1fa425a --- /dev/null +++ b/arch/arm/boot/dts/tegra114-car.h @@ -0,0 +1,272 @@ +/* + * This header provides constants for binding nvidia,tegra114-car. + * + * The first 160 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB + * registers. These IDs often match those in the CAR's RST_DEVICES registers, + * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In + * this case, those clocks are assigned IDs above 160 in order to highlight + * this issue. Implementations that interpret these clock IDs as bit values + * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to + * explicitly handle these special cases. + * + * The balance of the clocks controlled by the CAR are assigned IDs of 160 and + * above. + */ + +#ifndef _DT_TEGRA114_CAR_H +#define _DT_TEGRA114_CAR_H + +#define TEGRA114_CLK_CPU 0 +/* 1 */ +/* 2 */ +/* 3 */ +#define TEGRA114_CLK_RTC 4 +#define TEGRA114_CLK_TIMER 5 +#define TEGRA114_CLK_UARTA 6 +/* 7 */ /* register bit affects uartb and vfir */ +/* 8 */ +#define TEGRA114_CLK_SDMMC2 9 +/* 10 */ /* register bit affects spdif_in and spdif_out */ +#define TEGRA114_CLK_I2S1 11 +#define TEGRA114_CLK_I2C1 12 +#define TEGRA114_CLK_NDFLASH 13 +#define TEGRA114_CLK_SDMMC1 14 +#define TEGRA114_CLK_SDMMC4 15 +/* 16 */ +#define TEGRA114_CLK_PWM 17 +#define TEGRA114_CLK_I2S2 18 +#define TEGRA114_CLK_EPP 19 +/* 20 */ /* register bit affects vi and vi_sensor */ +#define TEGRA114_CLK_GR_2D 21 +#define TEGRA114_CLK_USBD 22 +#define TEGRA114_CLK_ISP 23 +#define TEGRA114_CLK_GR_3D 24 +/* 25 */ +#define TEGRA114_CLK_DISP2 26 +#define TEGRA114_CLK_DISP1 27 +#define TEGRA114_CLK_HOST1X 28 +#define TEGRA114_CLK_VCP 29 +#define TEGRA114_CLK_I2S0 30 +/* 31 */ + +/* 32 */ +/* 33 */ +#define TEGRA114_CLK_APBDMA 34 +/* 35 */ +#define TEGRA114_CLK_KBC 36 +/* 37 */ +/* 38 */ +/* 39 */ +#define TEGRA114_CLK_KFUSE 40 +#define TEGRA114_CLK_SBC1 41 +#define TEGRA114_CLK_NOR 42 +/* 43 */ +#define TEGRA114_CLK_SBC2 44 +/* 45 */ +#define TEGRA114_CLK_SBC3 46 +#define TEGRA114_CLK_I2C5 47 +#define TEGRA114_CLK_DSIA 48 +/* 49 */ +#define TEGRA114_CLK_MIPI 50 +#define TEGRA114_CLK_HDMI 51 +#define TEGRA114_CLK_CSI 52 +/* 53 */ +#define TEGRA114_CLK_I2C2 54 +#define TEGRA114_CLK_UARTC 55 +#define TEGRA114_CLK_MIPI_CAL 56 +/* 57 */ +#define TEGRA114_CLK_USB2 58 +#define TEGRA114_CLK_USB3 59 +/* 60 */ +#define TEGRA114_CLK_VDE 61 +#define TEGRA114_CLK_BSEA 62 +#define TEGRA114_CLK_BSEV 63 + +/* 64 */ +#define TEGRA114_CLK_UARTD 65 +#define TEGRA114_CLK_UARTE 66 +#define TEGRA114_CLK_I2C3 67 +#define TEGRA114_CLK_SBC4 68 +#define TEGRA114_CLK_SDMMC3 69 +/* 70 */ +#define TEGRA114_CLK_OWR 71 +/* 72 */ +#define TEGRA114_CLK_CSITE 73 +/* 74 */ +/* 75 */ +#define TEGRA114_CLK_LA 76 +#define TEGRA114_CLK_TRACE 77 +#define TEGRA114_CLK_SOC_THERM 78 +#define TEGRA114_CLK_DTV 79 +#define TEGRA114_CLK_NDSPEED 80 +#define TEGRA114_CLK_I2CSLOW 81 +#define TEGRA114_CLK_DSIB 82 +#define TEGRA114_CLK_TSEC 83 +/* 84 */ +/* 85 */ +/* 86 */ +/* 87 */ +/* 88 */ +#define TEGRA114_CLK_XUSB_HOST 89 +/* 90 */ +#define TEGRA114_CLK_MSENC 91 +#define TEGRA114_CLK_CSUS 92 +/* 93 */ +/* 94 */ +/* 95 */ /* bit affects xusb_dev and xusb_dev_src */ + +/* 96 */ +/* 97 */ +/* 98 */ +#define TEGRA114_CLK_MSELECT 99 +#define TEGRA114_CLK_TSENSOR 100 +#define TEGRA114_CLK_I2S3 101 +#define TEGRA114_CLK_I2S4 102 +#define TEGRA114_CLK_I2C4 103 +#define TEGRA114_CLK_SBC5 104 +#define TEGRA114_CLK_SBC6 105 +#define TEGRA114_CLK_D_AUDIO 106 +#define TEGRA114_CLK_APBIF 107 +#define TEGRA114_CLK_DAM0 108 +#define TEGRA114_CLK_DAM1 109 +#define TEGRA114_CLK_DAM2 110 +#define TEGRA114_CLK_HDA2CODEC_2X 111 +/* 112 */ +#define TEGRA114_CLK_AUDIO0_2X 113 +#define TEGRA114_CLK_AUDIO1_2X 114 +#define TEGRA114_CLK_AUDIO2_2X 115 +#define TEGRA114_CLK_AUDIO3_2X 116 +#define TEGRA114_CLK_AUDIO4_2X 117 +#define TEGRA114_CLK_SPDIF_2X 118 +#define TEGRA114_CLK_ACTMON 119 +#define TEGRA114_CLK_EXTERN1 120 +#define TEGRA114_CLK_EXTERN2 121 +#define TEGRA114_CLK_EXTERN3 122 +/* 123 */ +/* 124 */ +#define TEGRA114_CLK_HDA 125 +/* 126 */ +#define TEGRA114_CLK_SE 127 + +#define TEGRA114_CLK_HDA2HDMI 128 +/* 129 */ +/* 130 */ +/* 131 */ +/* 132 */ +/* 133 */ +/* 134 */ +/* 135 */ +/* 136 */ +/* 137 */ +/* 138 */ +/* 139 */ +/* 140 */ +/* 141 */ +/* 142 */ +/* 143 */ /* bit affects xusb_falcon_src, xusb_fs_src, xusb_host_src and xusb_ss_src */ +#define TEGRA114_CLK_CILAB 144 +#define TEGRA114_CLK_CILCD 145 +#define TEGRA114_CLK_CILE 146 +#define TEGRA114_CLK_DSIALP 147 +#define TEGRA114_CLK_DSIBLP 148 +/* 149 */ +#define TEGRA114_CLK_DDS 150 +/* 151 */ +#define TEGRA114_CLK_DP2 152 +#define TEGRA114_CLK_AMX 153 +#define TEGRA114_CLK_ADX 154 +/* 155 */ +#define TEGRA114_CLK_XUSB_SS 156 +/* 157 */ +/* 158 */ +/* 159 */ + +#define TEGRA114_CLK_UARTB 192 +#define TEGRA114_CLK_VFIR 193 +#define TEGRA114_CLK_SPDIF_IN 194 +#define TEGRA114_CLK_SPDIF_OUT 195 +#define TEGRA114_CLK_VI 196 +#define TEGRA114_CLK_VI_SENSOR 197 +#define TEGRA114_CLK_FUSE 198 +#define TEGRA114_CLK_FUSE_BURN 199 +#define TEGRA114_CLK_32K 200 +#define TEGRA114_CLK_M 201 +#define TEGRA114_CLK_M_DIV2 202 +#define TEGRA114_CLK_M_DIV4 203 +#define TEGRA114_CLK_PLL_REF 204 +#define TEGRA114_CLK_PLL_C 205 +#define TEGRA114_CLK_PLL_C_OUT1 206 +#define TEGRA114_CLK_PLL_C2 207 +#define TEGRA114_CLK_PLL_C3 208 +#define TEGRA114_CLK_PLL_M 209 +#define TEGRA114_CLK_PLL_M_OUT1 210 +#define TEGRA114_CLK_PLL_P 211 +#define TEGRA114_CLK_PLL_P_OUT1 212 +#define TEGRA114_CLK_PLL_P_OUT2 213 +#define TEGRA114_CLK_PLL_P_OUT3 214 +#define TEGRA114_CLK_PLL_P_OUT4 215 +#define TEGRA114_CLK_PLL_A 216 +#define TEGRA114_CLK_PLL_A_OUT0 217 +#define TEGRA114_CLK_PLL_D 218 +#define TEGRA114_CLK_PLL_D_OUT0 219 +#define TEGRA114_CLK_PLL_D2 220 +#define TEGRA114_CLK_PLL_D2_OUT0 221 +#define TEGRA114_CLK_PLL_U 222 +#define TEGRA114_CLK_PLL_U_480M 223 + +#define TEGRA114_CLK_PLL_U_60M 224 +#define TEGRA114_CLK_PLL_U_48M 225 +#define TEGRA114_CLK_PLL_U_12M 226 +#define TEGRA114_CLK_PLL_X 227 +#define TEGRA114_CLK_PLL_X_OUT0 228 +#define TEGRA114_CLK_PLL_RE_VCO 229 +#define TEGRA114_CLK_PLL_RE_OUT 230 +#define TEGRA114_CLK_PLL_E_OUT0 231 +#define TEGRA114_CLK_SPDIF_IN_SYNC 232 +#define TEGRA114_CLK_I2S0_SYNC 233 +#define TEGRA114_CLK_I2S1_SYNC 234 +#define TEGRA114_CLK_I2S2_SYNC 235 +#define TEGRA114_CLK_I2S3_SYNC 236 +#define TEGRA114_CLK_I2S4_SYNC 237 +#define TEGRA114_CLK_VIMCLK_SYNC 238 +#define TEGRA114_CLK_AUDIO0 239 +#define TEGRA114_CLK_AUDIO1 240 +#define TEGRA114_CLK_AUDIO2 241 +#define TEGRA114_CLK_AUDIO3 242 +#define TEGRA114_CLK_AUDIO4 243 +#define TEGRA114_CLK_SPDIF 244 +#define TEGRA114_CLK_OUT_1 245 +#define TEGRA114_CLK_OUT_2 246 +#define TEGRA114_CLK_OUT_3 247 +#define TEGRA114_CLK_BLINK 248 +#define TEGRA114_CLK_MIPI_CAL_FAST 214 +#define TEGRA114_CLK_DSI1_FIXED 214 +#define TEGRA114_CLK_DSI2_FIXED 214 +#define TEGRA114_CLK_XUSB_HOST_SRC 215 +#define TEGRA114_CLK_XUSB_FALCON_SRC 216 +#define TEGRA114_CLK_XUSB_FS_SRC 217 +#define TEGRA114_CLK_XUSB_SS_SRC 218 +#define TEGRA114_CLK_XUSB_DEV_SRC 219 +#define TEGRA114_CLK_XUSB_DEV 220 +#define TEGRA114_CLK_XUSB_HS_SRC 221 +#define TEGRA114_CLK_SCLK 222 +#define TEGRA114_CLK_HCLK 223 + +#define TEGRA114_CLK_PCLK 224 +#define TEGRA114_CLK_CCLK_G 225 +#define TEGRA114_CLK_CCLK_LP 226 + +#define TEGRA114_CLK_AUDIO0_MUX 300 /* Mux clocks */ +#define TEGRA114_CLK_AUDIO1_MUX 301 +#define TEGRA114_CLK_AUDIO2_MUX 302 +#define TEGRA114_CLK_AUDIO3_MUX 303 +#define TEGRA114_CLK_AUDIO4_MUX 304 +#define TEGRA114_CLK_SPDIF_MUX 305 +#define TEGRA114_CLK_OUT_1_MUX 306 +#define TEGRA114_CLK_OUT_2_MUX 307 +#define TEGRA114_CLK_OUT_3_MUX 308 +#define TEGRA114_CLK_DSIA_MUX 309 +#define TEGRA114_CLK_DSIB_MUX 310 +#define TEGRA114_CLK_MAX 311 + +#endif /* _DT_TEGRA114_CAR_H */ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
[parent not found: <1360917814-27236-6-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [v3 5/6] ARM: tegra114: create a DT header defining CLK IDs 2013-02-15 8:43 ` Hiroshi Doyu (?) @ 2013-02-15 16:43 ` Stephen Warren -1 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-15 16:43 UTC (permalink / raw) To: Hiroshi Doyu Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, pdeschrijver-DDmLM1+adcrQT0dZR+AlfA, pgaikwad-DDmLM1+adcrQT0dZR+AlfA, Grant Likely, Rob Herring, Rob Landley, Russell King, Simon Glass, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 02/15/2013 01:43 AM, Hiroshi Doyu wrote: > To replace magic number in tegra_car: > > - clocks = <&tegra_car 28>; > + clocks = <&tegra_car CLK_HOST1X>; Since the Tegra114-related files don't actually exist yet and hence can't be applied, I think Peter should roll these patches into his Tegra114 CCF series. But perhaps hold off on that until Grant has a chance to ack/nak the concept of doing this, and we've finalized on include path settings etc., so there's no churn. ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 5/6] ARM: tegra114: create a DT header defining CLK IDs @ 2013-02-15 16:43 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-15 16:43 UTC (permalink / raw) To: linux-arm-kernel On 02/15/2013 01:43 AM, Hiroshi Doyu wrote: > To replace magic number in tegra_car: > > - clocks = <&tegra_car 28>; > + clocks = <&tegra_car CLK_HOST1X>; Since the Tegra114-related files don't actually exist yet and hence can't be applied, I think Peter should roll these patches into his Tegra114 CCF series. But perhaps hold off on that until Grant has a chance to ack/nak the concept of doing this, and we've finalized on include path settings etc., so there's no churn. ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 5/6] ARM: tegra114: create a DT header defining CLK IDs @ 2013-02-15 16:43 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-15 16:43 UTC (permalink / raw) To: Hiroshi Doyu Cc: linux-tegra, pdeschrijver, pgaikwad, Grant Likely, Rob Herring, Rob Landley, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel On 02/15/2013 01:43 AM, Hiroshi Doyu wrote: > To replace magic number in tegra_car: > > - clocks = <&tegra_car 28>; > + clocks = <&tegra_car CLK_HOST1X>; Since the Tegra114-related files don't actually exist yet and hence can't be applied, I think Peter should roll these patches into his Tegra114 CCF series. But perhaps hold off on that until Grant has a chance to ack/nak the concept of doing this, and we've finalized on include path settings etc., so there's no churn. ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 6/6] ARM: tegra114: convert device tree files to use CLK defines 2013-02-15 8:43 ` Hiroshi Doyu @ 2013-02-15 8:43 ` Hiroshi Doyu -1 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel Replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- .../bindings/clock/nvidia,tegra114-car.txt | 261 +------------------- arch/arm/boot/dts/tegra114.dtsip | 13 +- 2 files changed, 8 insertions(+), 266 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt index 25e088d..c8956ed 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt @@ -14,265 +14,6 @@ Required properties : - #clock-cells : Should be 1. In clock consumers, this cell represents the clock ID exposed by the CAR. - The first 160 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 160 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 160 and - above. - - 0 cpu - 1 unassigned - 2 unassigned - 3 unassigned - 4 rtc - 5 timer - 6 uarta - 7 unassigned (register bit affects uartb and vfir) - 8 unassigned - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 unassigned - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 unassigned - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 i2s0 - 31 unassigned - - 32 unassigned - 33 unassigned - 34 apbdma - 35 unassigned - 36 kbc - 37 unassigned - 38 unassigned - 39 unassigned (register bit affects fuse and fuse_burn) - 40 kfuse - 41 sbc1 - 42 nor - 43 unassigned - 44 sbc2 - 45 unassigned - 46 sbc3 - 47 i2c5 - 48 dsia - 49 unassigned - 50 mipi - 51 hdmi - 52 csi - 53 unassigned - 54 i2c2 - 55 uartc - 56 mipi-cal - 57 unassigned - 58 usb2 - 59 usb3 - 60 msenc - 61 vde - 62 bsea - 63 bsev - - 64 unassigned - 65 uartd - 66 unassigned - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 unassigned - 71 owr - 72 afi - 73 csite - 74 unassigned - 75 unassigned - 76 la - 77 trace - 78 soc_therm - 79 dtv - 80 ndspeed - 81 i2cslow - 82 dsib - 83 tsec - 84 unassigned - 85 unassigned - 86 unassigned - 87 unassigned - 88 unassigned - 89 xusb_host - 90 unassigned - 91 msenc - 92 csus - 93 unassigned - 94 unassigned - 95 unassigned (bit affects xusb_dev and xusb_dev_src) - - 96 unassigned - 97 unassigned - 98 unassigned - 99 mselect - 100 tsensor - 101 i2s3 - 102 i2s4 - 103 i2c4 - 104 sbc5 - 105 sbc6 - 106 d_audio - 107 apbif - 108 dam0 - 109 dam1 - 110 dam2 - 111 hda2codec_2x - 112 unassigned - 113 audio0_2x - 114 audio1_2x - 115 audio2_2x - 116 audio3_2x - 117 audio4_2x - 118 spdif_2x - 119 actmon - 120 extern1 - 121 extern2 - 122 extern3 - 123 unassigned - 124 unassigned - 125 hda - 126 unassigned - 127 se - - 128 hda2hdmi - 129 unassigned - 130 unassigned - 131 unassigned - 132 unassigned - 133 unassigned - 134 unassigned - 135 unassigned - 136 unassigned - 137 unassigned - 138 unassigned - 139 unassigned - 140 unassigned - 141 unassigned - 142 unassigned - 143 unassigned (bit affects xusb_falcon_src, xusb_fs_src, - xusb_host_src and xusb_ss_src) - 144 cilab - 145 cilcd - 146 cile - 147 dsialp - 148 dsiblp - 149 unassigned - 150 dds - 151 unassigned - 152 dp2 - 153 amx - 154 adx - 155 unassigned - 156 xusb_ss - - 192 uartb - 193 vfir - 194 spdif_in - 195 spdif_out - 196 vi - 197 vi_sensor - 198 fuse - 199 fuse_burn - 200 clk_32k - 201 clk_m - 202 clk_m_div2 - 203 clk_m_div4 - 204 pll_ref - 205 pll_c - 206 pll_c_out1 - 207 pll_c2 - 208 pll_c3 - 209 pll_m - 210 pll_m_out1 - 211 pll_p - 212 pll_p_out1 - 213 pll_p_out2 - 214 pll_p_out3 - 214 mipi_cal_fast - 214 dsi1_fixed - 214 dsi2_fixed - 215 pll_p_out4 - 216 pll_a - 217 pll_a_out1 - 218 pll_d - 219 pll_d_out0 - 220 pll_d2 - 221 pll_d2_out0 - 222 pll_u - 223 pll_u_480M - 224 pll_u_60M - 225 pll_u_48M - 226 pll_u_12M - 227 pll_x - 228 pll_x_out0 - 229 pll_re_vco - 230 pll_re_out - 231 pll_e_out0 - 232 spdif_in_sync - 233 i2s0_sync - 234 i2s1_sync - 235 i2s2_sync - 236 i2s3_sync - 237 i2s4_sync - 238 vimclk_sync - 239 audio0 - 240 audio1 - 241 audio2 - 242 audio3 - 243 audio4 - 244 spdif - 245 clk_out_1 - 246 clk_out_2 - 247 clk_out_3 - 248 blink - 252 xusb_host_src - 253 xusb_falcon_src - 254 xusb_fs_src - 255 xusb_ss_src - 256 xusb_dev_src - 257 xusb_dev - 258 xusb_hs_src - 259 sclk - 260 hclk - 261 pclk - 262 cclk_g - 263 cclk_lp - -Mux clocks - - 300 audio0_mux - 301 audio1_mux - 302 audio2_mux - 303 audio3_mux - 304 audio4_mux - 305 spdif_mux - 306 clk_out_1_mux - 307 clk_out_2_mux - 308 clk_out_3_mux - Example SoC include file: / { @@ -283,7 +24,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA114_CLK_USB2>; }; }; diff --git a/arch/arm/boot/dts/tegra114.dtsip b/arch/arm/boot/dts/tegra114.dtsip index df01b15..8308196 100644 --- a/arch/arm/boot/dts/tegra114.dtsip +++ b/arch/arm/boot/dts/tegra114.dtsip @@ -1,6 +1,7 @@ #include "skeleton.dtsi" #include "tegra-gpio.h" #include "arm-gic.h" +#include "tegra114-car.h" / { compatible = "nvidia,tegra114"; @@ -27,7 +28,7 @@ <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 5>; + clocks = <&tegra_car TEGRA114_CLK_TIMER>; }; tegra_car: clock { @@ -70,7 +71,7 @@ reg-shift = <2>; interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; - clocks = <&tegra_car 6>; + clocks = <&tegra_car TEGRA114_CLK_UARTA>; }; serial@70006040 { @@ -79,7 +80,7 @@ reg-shift = <2>; interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; - clocks = <&tegra_car 192>; + clocks = <&tegra_car TEGRA114_CLK_UARTB>; }; serial@70006200 { @@ -88,7 +89,7 @@ reg-shift = <2>; interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; - clocks = <&tegra_car 55>; + clocks = <&tegra_car TEGRA114_CLK_UARTC>; }; serial@70006300 { @@ -97,14 +98,14 @@ reg-shift = <2>; interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; - clocks = <&tegra_car 65>; + clocks = <&tegra_car TEGRA114_CLK_UARTD>; }; rtc { compatible = "nvidia,tegra114-rtc", "nvidia,tegra20-rtc"; reg = <0x7000e000 0x100>; interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 4>; + clocks = <&tegra_car TEGRA114_CLK_RTC>; }; pmc { -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [v3 6/6] ARM: tegra114: convert device tree files to use CLK defines @ 2013-02-15 8:43 ` Hiroshi Doyu 0 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel Replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- .../bindings/clock/nvidia,tegra114-car.txt | 261 +------------------- arch/arm/boot/dts/tegra114.dtsip | 13 +- 2 files changed, 8 insertions(+), 266 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt index 25e088d..c8956ed 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt @@ -14,265 +14,6 @@ Required properties : - #clock-cells : Should be 1. In clock consumers, this cell represents the clock ID exposed by the CAR. - The first 160 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 160 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 160 and - above. - - 0 cpu - 1 unassigned - 2 unassigned - 3 unassigned - 4 rtc - 5 timer - 6 uarta - 7 unassigned (register bit affects uartb and vfir) - 8 unassigned - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 unassigned - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 unassigned - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 i2s0 - 31 unassigned - - 32 unassigned - 33 unassigned - 34 apbdma - 35 unassigned - 36 kbc - 37 unassigned - 38 unassigned - 39 unassigned (register bit affects fuse and fuse_burn) - 40 kfuse - 41 sbc1 - 42 nor - 43 unassigned - 44 sbc2 - 45 unassigned - 46 sbc3 - 47 i2c5 - 48 dsia - 49 unassigned - 50 mipi - 51 hdmi - 52 csi - 53 unassigned - 54 i2c2 - 55 uartc - 56 mipi-cal - 57 unassigned - 58 usb2 - 59 usb3 - 60 msenc - 61 vde - 62 bsea - 63 bsev - - 64 unassigned - 65 uartd - 66 unassigned - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 unassigned - 71 owr - 72 afi - 73 csite - 74 unassigned - 75 unassigned - 76 la - 77 trace - 78 soc_therm - 79 dtv - 80 ndspeed - 81 i2cslow - 82 dsib - 83 tsec - 84 unassigned - 85 unassigned - 86 unassigned - 87 unassigned - 88 unassigned - 89 xusb_host - 90 unassigned - 91 msenc - 92 csus - 93 unassigned - 94 unassigned - 95 unassigned (bit affects xusb_dev and xusb_dev_src) - - 96 unassigned - 97 unassigned - 98 unassigned - 99 mselect - 100 tsensor - 101 i2s3 - 102 i2s4 - 103 i2c4 - 104 sbc5 - 105 sbc6 - 106 d_audio - 107 apbif - 108 dam0 - 109 dam1 - 110 dam2 - 111 hda2codec_2x - 112 unassigned - 113 audio0_2x - 114 audio1_2x - 115 audio2_2x - 116 audio3_2x - 117 audio4_2x - 118 spdif_2x - 119 actmon - 120 extern1 - 121 extern2 - 122 extern3 - 123 unassigned - 124 unassigned - 125 hda - 126 unassigned - 127 se - - 128 hda2hdmi - 129 unassigned - 130 unassigned - 131 unassigned - 132 unassigned - 133 unassigned - 134 unassigned - 135 unassigned - 136 unassigned - 137 unassigned - 138 unassigned - 139 unassigned - 140 unassigned - 141 unassigned - 142 unassigned - 143 unassigned (bit affects xusb_falcon_src, xusb_fs_src, - xusb_host_src and xusb_ss_src) - 144 cilab - 145 cilcd - 146 cile - 147 dsialp - 148 dsiblp - 149 unassigned - 150 dds - 151 unassigned - 152 dp2 - 153 amx - 154 adx - 155 unassigned - 156 xusb_ss - - 192 uartb - 193 vfir - 194 spdif_in - 195 spdif_out - 196 vi - 197 vi_sensor - 198 fuse - 199 fuse_burn - 200 clk_32k - 201 clk_m - 202 clk_m_div2 - 203 clk_m_div4 - 204 pll_ref - 205 pll_c - 206 pll_c_out1 - 207 pll_c2 - 208 pll_c3 - 209 pll_m - 210 pll_m_out1 - 211 pll_p - 212 pll_p_out1 - 213 pll_p_out2 - 214 pll_p_out3 - 214 mipi_cal_fast - 214 dsi1_fixed - 214 dsi2_fixed - 215 pll_p_out4 - 216 pll_a - 217 pll_a_out1 - 218 pll_d - 219 pll_d_out0 - 220 pll_d2 - 221 pll_d2_out0 - 222 pll_u - 223 pll_u_480M - 224 pll_u_60M - 225 pll_u_48M - 226 pll_u_12M - 227 pll_x - 228 pll_x_out0 - 229 pll_re_vco - 230 pll_re_out - 231 pll_e_out0 - 232 spdif_in_sync - 233 i2s0_sync - 234 i2s1_sync - 235 i2s2_sync - 236 i2s3_sync - 237 i2s4_sync - 238 vimclk_sync - 239 audio0 - 240 audio1 - 241 audio2 - 242 audio3 - 243 audio4 - 244 spdif - 245 clk_out_1 - 246 clk_out_2 - 247 clk_out_3 - 248 blink - 252 xusb_host_src - 253 xusb_falcon_src - 254 xusb_fs_src - 255 xusb_ss_src - 256 xusb_dev_src - 257 xusb_dev - 258 xusb_hs_src - 259 sclk - 260 hclk - 261 pclk - 262 cclk_g - 263 cclk_lp - -Mux clocks - - 300 audio0_mux - 301 audio1_mux - 302 audio2_mux - 303 audio3_mux - 304 audio4_mux - 305 spdif_mux - 306 clk_out_1_mux - 307 clk_out_2_mux - 308 clk_out_3_mux - Example SoC include file: / { @@ -283,7 +24,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA114_CLK_USB2>; }; }; diff --git a/arch/arm/boot/dts/tegra114.dtsip b/arch/arm/boot/dts/tegra114.dtsip index df01b15..8308196 100644 --- a/arch/arm/boot/dts/tegra114.dtsip +++ b/arch/arm/boot/dts/tegra114.dtsip @@ -1,6 +1,7 @@ #include "skeleton.dtsi" #include "tegra-gpio.h" #include "arm-gic.h" +#include "tegra114-car.h" / { compatible = "nvidia,tegra114"; @@ -27,7 +28,7 @@ <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 5>; + clocks = <&tegra_car TEGRA114_CLK_TIMER>; }; tegra_car: clock { @@ -70,7 +71,7 @@ reg-shift = <2>; interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; - clocks = <&tegra_car 6>; + clocks = <&tegra_car TEGRA114_CLK_UARTA>; }; serial@70006040 { @@ -79,7 +80,7 @@ reg-shift = <2>; interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; - clocks = <&tegra_car 192>; + clocks = <&tegra_car TEGRA114_CLK_UARTB>; }; serial@70006200 { @@ -88,7 +89,7 @@ reg-shift = <2>; interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; - clocks = <&tegra_car 55>; + clocks = <&tegra_car TEGRA114_CLK_UARTC>; }; serial@70006300 { @@ -97,14 +98,14 @@ reg-shift = <2>; interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; - clocks = <&tegra_car 65>; + clocks = <&tegra_car TEGRA114_CLK_UARTD>; }; rtc { compatible = "nvidia,tegra114-rtc", "nvidia,tegra20-rtc"; reg = <0x7000e000 0x100>; interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 4>; + clocks = <&tegra_car TEGRA114_CLK_RTC>; }; pmc { -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
[parent not found: <1360917814-27236-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* [v3 2/6] ARM: tegra20: convert device tree files to use CLK defines 2013-02-15 8:43 ` Hiroshi Doyu @ 2013-02-15 8:43 ` Hiroshi Doyu -1 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra-u79uwXL29TY76Z2rM5mHXA Cc: pdeschrijver-DDmLM1+adcrQT0dZR+AlfA, pgaikwad-DDmLM1+adcrQT0dZR+AlfA, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- .../bindings/clock/nvidia,tegra20-car.txt | 150 +------------------- arch/arm/boot/dts/tegra20-paz00.dtsp | 2 +- arch/arm/boot/dts/tegra20.dtsip | 85 +++++------ 3 files changed, 45 insertions(+), 192 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt index 0921fac..18eda44 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt @@ -14,154 +14,6 @@ Required properties : - #clock-cells : Should be 1. In clock consumers, this cell represents the clock ID exposed by the CAR. - The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 95 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 96 and - above. - - 0 cpu - 1 unassigned - 2 unassigned - 3 ac97 - 4 rtc - 5 tmr - 6 uart1 - 7 unassigned (register bit affects uart2 and vfir) - 8 gpio - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 twc - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 ide - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 unassigned - 31 cache2 - - 32 mem - 33 ahbdma - 34 apbdma - 35 unassigned - 36 kbc - 37 stat_mon - 38 pmc - 39 fuse - 40 kfuse - 41 sbc1 - 42 snor - 43 spi1 - 44 sbc2 - 45 xio - 46 sbc3 - 47 dvc - 48 dsi - 49 unassigned (register bit affects tvo and cve) - 50 mipi - 51 hdmi - 52 csi - 53 tvdac - 54 i2c2 - 55 uart3 - 56 unassigned - 57 emc - 58 usb2 - 59 usb3 - 60 mpe - 61 vde - 62 bsea - 63 bsev - - 64 speedo - 65 uart4 - 66 uart5 - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 pcie - 71 owr - 72 afi - 73 csite - 74 unassigned - 75 avpucq - 76 la - 77 unassigned - 78 unassigned - 79 unassigned - 80 unassigned - 81 unassigned - 82 unassigned - 83 unassigned - 84 irama - 85 iramb - 86 iramc - 87 iramd - 88 cram2 - 89 audio_2x a/k/a audio_2x_sync_clk - 90 clk_d - 91 unassigned - 92 sus - 93 cdev1 - 94 cdev2 - 95 unassigned - - 96 uart2 - 97 vfir - 98 spdif_in - 99 spdif_out - 100 vi - 101 vi_sensor - 102 tvo - 103 cve - 104 osc - 105 clk_32k a/k/a clk_s - 106 clk_m - 107 sclk - 108 cclk - 109 hclk - 110 pclk - 111 blink - 112 pll_a - 113 pll_a_out0 - 114 pll_c - 115 pll_c_out1 - 116 pll_d - 117 pll_d_out0 - 118 pll_e - 119 pll_m - 120 pll_m_out1 - 121 pll_p - 122 pll_p_out1 - 123 pll_p_out2 - 124 pll_p_out3 - 125 pll_p_out4 - 126 pll_s - 127 pll_u - 128 pll_x - 129 cop a/k/a avp - 130 audio a/k/a audio_sync_clk - 131 pll_ref - 132 twd - Example SoC include file: / { @@ -172,7 +24,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA20_CLK_USB2>; }; }; diff --git a/arch/arm/boot/dts/tegra20-paz00.dtsp b/arch/arm/boot/dts/tegra20-paz00.dtsp index e63473b..3aa9f7a 100644 --- a/arch/arm/boot/dts/tegra20-paz00.dtsp +++ b/arch/arm/boot/dts/tegra20-paz00.dtsp @@ -277,7 +277,7 @@ clock-frequency = <80000>; request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>; slave-addr = <138>; - clocks = <&tegra_car 67>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_I2C3>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; }; diff --git a/arch/arm/boot/dts/tegra20.dtsip b/arch/arm/boot/dts/tegra20.dtsip index 7b05f53..db118ec 100644 --- a/arch/arm/boot/dts/tegra20.dtsip +++ b/arch/arm/boot/dts/tegra20.dtsip @@ -1,6 +1,7 @@ #include "skeleton.dtsi" #include "tegra-gpio.h" #include "arm-gic.h" +#include "tegra20-car.h" / { compatible = "nvidia,tegra20"; @@ -19,7 +20,7 @@ reg = <0x50000000 0x00024000>; interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ - clocks = <&tegra_car 28>; + clocks = <&tegra_car TEGRA20_CLK_HOST1X>; #address-cells = <1>; #size-cells = <1>; @@ -30,48 +31,48 @@ compatible = "nvidia,tegra20-mpe"; reg = <0x54040000 0x00040000>; interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 60>; + clocks = <&tegra_car TEGRA20_CLK_MPE>; }; vi { compatible = "nvidia,tegra20-vi"; reg = <0x54080000 0x00040000>; interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 100>; + clocks = <&tegra_car TEGRA20_CLK_VI>; }; epp { compatible = "nvidia,tegra20-epp"; reg = <0x540c0000 0x00040000>; interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 19>; + clocks = <&tegra_car TEGRA20_CLK_EPP>; }; isp { compatible = "nvidia,tegra20-isp"; reg = <0x54100000 0x00040000>; interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 23>; + clocks = <&tegra_car TEGRA20_CLK_ISP>; }; gr2d { compatible = "nvidia,tegra20-gr2d"; reg = <0x54140000 0x00040000>; interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 21>; + clocks = <&tegra_car TEGRA20_CLK_GR2D>; }; gr3d { compatible = "nvidia,tegra20-gr3d"; reg = <0x54180000 0x00040000>; - clocks = <&tegra_car 24>; + clocks = <&tegra_car TEGRA20_CLK_GR3D>; }; dc@54200000 { compatible = "nvidia,tegra20-dc"; reg = <0x54200000 0x00040000>; interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 27>, <&tegra_car 121>; + clocks = <&tegra_car TEGRA20_CLK_DISP1>, <&tegra_car TEGRA20_CLK_PLL_P>; clock-names = "disp1", "parent"; rgb { @@ -83,7 +84,7 @@ compatible = "nvidia,tegra20-dc"; reg = <0x54240000 0x00040000>; interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 26>, <&tegra_car 121>; + clocks = <&tegra_car TEGRA20_CLK_DISP2>, <&tegra_car TEGRA20_CLK_PLL_P>; clock-names = "disp2", "parent"; rgb { @@ -95,7 +96,7 @@ compatible = "nvidia,tegra20-hdmi"; reg = <0x54280000 0x00040000>; interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 51>, <&tegra_car 117>; + clocks = <&tegra_car TEGRA20_CLK_HDMI>, <&tegra_car TEGRA20_CLK_PLL_D_OUT0>; clock-names = "hdmi", "parent"; status = "disabled"; }; @@ -104,14 +105,14 @@ compatible = "nvidia,tegra20-tvo"; reg = <0x542c0000 0x00040000>; interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 102>; + clocks = <&tegra_car TEGRA20_CLK_TVO>; status = "disabled"; }; dsi { compatible = "nvidia,tegra20-dsi"; reg = <0x54300000 0x00040000>; - clocks = <&tegra_car 48>; + clocks = <&tegra_car TEGRA20_CLK_DSI>; status = "disabled"; }; }; @@ -174,7 +175,7 @@ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 34>; + clocks = <&tegra_car TEGRA20_CLK_APBDMA>; }; ahb { @@ -216,7 +217,7 @@ reg = <0x70002000 0x200>; interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 12>; - clocks = <&tegra_car 3>; + clocks = <&tegra_car TEGRA20_CLK_AC97>; status = "disabled"; }; @@ -225,7 +226,7 @@ reg = <0x70002800 0x200>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 2>; - clocks = <&tegra_car 11>; + clocks = <&tegra_car TEGRA20_CLK_I2S1>; status = "disabled"; }; @@ -234,7 +235,7 @@ reg = <0x70002a00 0x200>; interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 1>; - clocks = <&tegra_car 18>; + clocks = <&tegra_car TEGRA20_CLK_I2S2>; status = "disabled"; }; @@ -252,7 +253,7 @@ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 8>; - clocks = <&tegra_car 6>; + clocks = <&tegra_car TEGRA20_CLK_UARTA>; status = "disabled"; }; @@ -263,7 +264,7 @@ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 9>; - clocks = <&tegra_car 96>; + clocks = <&tegra_car TEGRA20_CLK_UARTB>; status = "disabled"; }; @@ -274,7 +275,7 @@ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 10>; - clocks = <&tegra_car 55>; + clocks = <&tegra_car TEGRA20_CLK_UARTC>; status = "disabled"; }; @@ -285,7 +286,7 @@ interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 19>; - clocks = <&tegra_car 65>; + clocks = <&tegra_car TEGRA20_CLK_UARTD>; status = "disabled"; }; @@ -296,7 +297,7 @@ interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 20>; - clocks = <&tegra_car 66>; + clocks = <&tegra_car TEGRA20_CLK_UARTE>; status = "disabled"; }; @@ -304,7 +305,7 @@ compatible = "nvidia,tegra20-pwm"; reg = <0x7000a000 0x100>; #pwm-cells = <2>; - clocks = <&tegra_car 17>; + clocks = <&tegra_car TEGRA20_CLK_PWM>; }; rtc { @@ -319,7 +320,7 @@ interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 12>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_I2C1>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -331,7 +332,7 @@ nvidia,dma-request-selector = <&apbdma 11>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 43>; + clocks = <&tegra_car TEGRA20_CLK_SPI>; status = "disabled"; }; @@ -341,7 +342,7 @@ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 54>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_I2C2>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -352,7 +353,7 @@ interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 67>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_I2C3>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -363,7 +364,7 @@ interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 47>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_DVC>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -375,7 +376,7 @@ nvidia,dma-request-selector = <&apbdma 15>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 41>; + clocks = <&tegra_car TEGRA20_CLK_SBC1>; status = "disabled"; }; @@ -386,7 +387,7 @@ nvidia,dma-request-selector = <&apbdma 16>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 44>; + clocks = <&tegra_car TEGRA20_CLK_SBC2>; status = "disabled"; }; @@ -397,7 +398,7 @@ nvidia,dma-request-selector = <&apbdma 17>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 46>; + clocks = <&tegra_car TEGRA20_CLK_SBC3>; status = "disabled"; }; @@ -408,7 +409,7 @@ nvidia,dma-request-selector = <&apbdma 18>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 68>; + clocks = <&tegra_car TEGRA20_CLK_SBC4>; status = "disabled"; }; @@ -416,7 +417,7 @@ compatible = "nvidia,tegra20-kbc"; reg = <0x7000e200 0x100>; interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 36>; + clocks = <&tegra_car TEGRA20_CLK_KBC>; status = "disabled"; }; @@ -451,7 +452,7 @@ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; phy_type = "utmi"; nvidia,has-legacy-mode; - clocks = <&tegra_car 22>; + clocks = <&tegra_car TEGRA20_CLK_USBD>; nvidia,needs-double-reset; nvidia,phy = <&phy1>; status = "disabled"; @@ -462,7 +463,7 @@ reg = <0xc5000400 0x3c00>; phy_type = "utmi"; nvidia,has-legacy-mode; - clocks = <&tegra_car 22>, <&tegra_car 127>; + clocks = <&tegra_car TEGRA20_CLK_USBD>, <&tegra_car TEGRA20_CLK_PLL_U>; clock-names = "phy", "pll_u"; }; @@ -471,7 +472,7 @@ reg = <0xc5004000 0x4000>; interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; phy_type = "ulpi"; - clocks = <&tegra_car 58>; + clocks = <&tegra_car TEGRA20_CLK_USB2>; nvidia,phy = <&phy2>; status = "disabled"; }; @@ -480,7 +481,7 @@ compatible = "nvidia,tegra20-usb-phy"; reg = <0xc5004400 0x3c00>; phy_type = "ulpi"; - clocks = <&tegra_car 94>, <&tegra_car 127>; + clocks = <&tegra_car TEGRA20_CLK_CDEV2>, <&tegra_car TEGRA20_CLK_PLL_U>; clock-names = "phy", "pll_u"; }; @@ -489,7 +490,7 @@ reg = <0xc5008000 0x4000>; interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; phy_type = "utmi"; - clocks = <&tegra_car 59>; + clocks = <&tegra_car TEGRA20_CLK_USB3>; nvidia,phy = <&phy3>; status = "disabled"; }; @@ -498,7 +499,7 @@ compatible = "nvidia,tegra20-usb-phy"; reg = <0xc5008400 0x3c00>; phy_type = "utmi"; - clocks = <&tegra_car 22>, <&tegra_car 127>; + clocks = <&tegra_car TEGRA20_CLK_USBD>, <&tegra_car TEGRA20_CLK_PLL_U>; clock-names = "phy", "pll_u"; }; @@ -506,7 +507,7 @@ compatible = "nvidia,tegra20-sdhci"; reg = <0xc8000000 0x200>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 14>; + clocks = <&tegra_car TEGRA20_CLK_SDMMC1>; status = "disabled"; }; @@ -514,7 +515,7 @@ compatible = "nvidia,tegra20-sdhci"; reg = <0xc8000200 0x200>; interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 9>; + clocks = <&tegra_car TEGRA20_CLK_SDMMC2>; status = "disabled"; }; @@ -522,7 +523,7 @@ compatible = "nvidia,tegra20-sdhci"; reg = <0xc8000400 0x200>; interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 69>; + clocks = <&tegra_car TEGRA20_CLK_SDMMC3>; status = "disabled"; }; @@ -530,7 +531,7 @@ compatible = "nvidia,tegra20-sdhci"; reg = <0xc8000600 0x200>; interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 15>; + clocks = <&tegra_car TEGRA20_CLK_SDMMC4>; status = "disabled"; }; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [v3 2/6] ARM: tegra20: convert device tree files to use CLK defines @ 2013-02-15 8:43 ` Hiroshi Doyu 0 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel Replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- .../bindings/clock/nvidia,tegra20-car.txt | 150 +------------------- arch/arm/boot/dts/tegra20-paz00.dtsp | 2 +- arch/arm/boot/dts/tegra20.dtsip | 85 +++++------ 3 files changed, 45 insertions(+), 192 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt index 0921fac..18eda44 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt @@ -14,154 +14,6 @@ Required properties : - #clock-cells : Should be 1. In clock consumers, this cell represents the clock ID exposed by the CAR. - The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 95 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 96 and - above. - - 0 cpu - 1 unassigned - 2 unassigned - 3 ac97 - 4 rtc - 5 tmr - 6 uart1 - 7 unassigned (register bit affects uart2 and vfir) - 8 gpio - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 twc - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 ide - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 unassigned - 31 cache2 - - 32 mem - 33 ahbdma - 34 apbdma - 35 unassigned - 36 kbc - 37 stat_mon - 38 pmc - 39 fuse - 40 kfuse - 41 sbc1 - 42 snor - 43 spi1 - 44 sbc2 - 45 xio - 46 sbc3 - 47 dvc - 48 dsi - 49 unassigned (register bit affects tvo and cve) - 50 mipi - 51 hdmi - 52 csi - 53 tvdac - 54 i2c2 - 55 uart3 - 56 unassigned - 57 emc - 58 usb2 - 59 usb3 - 60 mpe - 61 vde - 62 bsea - 63 bsev - - 64 speedo - 65 uart4 - 66 uart5 - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 pcie - 71 owr - 72 afi - 73 csite - 74 unassigned - 75 avpucq - 76 la - 77 unassigned - 78 unassigned - 79 unassigned - 80 unassigned - 81 unassigned - 82 unassigned - 83 unassigned - 84 irama - 85 iramb - 86 iramc - 87 iramd - 88 cram2 - 89 audio_2x a/k/a audio_2x_sync_clk - 90 clk_d - 91 unassigned - 92 sus - 93 cdev1 - 94 cdev2 - 95 unassigned - - 96 uart2 - 97 vfir - 98 spdif_in - 99 spdif_out - 100 vi - 101 vi_sensor - 102 tvo - 103 cve - 104 osc - 105 clk_32k a/k/a clk_s - 106 clk_m - 107 sclk - 108 cclk - 109 hclk - 110 pclk - 111 blink - 112 pll_a - 113 pll_a_out0 - 114 pll_c - 115 pll_c_out1 - 116 pll_d - 117 pll_d_out0 - 118 pll_e - 119 pll_m - 120 pll_m_out1 - 121 pll_p - 122 pll_p_out1 - 123 pll_p_out2 - 124 pll_p_out3 - 125 pll_p_out4 - 126 pll_s - 127 pll_u - 128 pll_x - 129 cop a/k/a avp - 130 audio a/k/a audio_sync_clk - 131 pll_ref - 132 twd - Example SoC include file: / { @@ -172,7 +24,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA20_CLK_USB2>; }; }; diff --git a/arch/arm/boot/dts/tegra20-paz00.dtsp b/arch/arm/boot/dts/tegra20-paz00.dtsp index e63473b..3aa9f7a 100644 --- a/arch/arm/boot/dts/tegra20-paz00.dtsp +++ b/arch/arm/boot/dts/tegra20-paz00.dtsp @@ -277,7 +277,7 @@ clock-frequency = <80000>; request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>; slave-addr = <138>; - clocks = <&tegra_car 67>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_I2C3>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; }; diff --git a/arch/arm/boot/dts/tegra20.dtsip b/arch/arm/boot/dts/tegra20.dtsip index 7b05f53..db118ec 100644 --- a/arch/arm/boot/dts/tegra20.dtsip +++ b/arch/arm/boot/dts/tegra20.dtsip @@ -1,6 +1,7 @@ #include "skeleton.dtsi" #include "tegra-gpio.h" #include "arm-gic.h" +#include "tegra20-car.h" / { compatible = "nvidia,tegra20"; @@ -19,7 +20,7 @@ reg = <0x50000000 0x00024000>; interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ - clocks = <&tegra_car 28>; + clocks = <&tegra_car TEGRA20_CLK_HOST1X>; #address-cells = <1>; #size-cells = <1>; @@ -30,48 +31,48 @@ compatible = "nvidia,tegra20-mpe"; reg = <0x54040000 0x00040000>; interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 60>; + clocks = <&tegra_car TEGRA20_CLK_MPE>; }; vi { compatible = "nvidia,tegra20-vi"; reg = <0x54080000 0x00040000>; interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 100>; + clocks = <&tegra_car TEGRA20_CLK_VI>; }; epp { compatible = "nvidia,tegra20-epp"; reg = <0x540c0000 0x00040000>; interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 19>; + clocks = <&tegra_car TEGRA20_CLK_EPP>; }; isp { compatible = "nvidia,tegra20-isp"; reg = <0x54100000 0x00040000>; interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 23>; + clocks = <&tegra_car TEGRA20_CLK_ISP>; }; gr2d { compatible = "nvidia,tegra20-gr2d"; reg = <0x54140000 0x00040000>; interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 21>; + clocks = <&tegra_car TEGRA20_CLK_GR2D>; }; gr3d { compatible = "nvidia,tegra20-gr3d"; reg = <0x54180000 0x00040000>; - clocks = <&tegra_car 24>; + clocks = <&tegra_car TEGRA20_CLK_GR3D>; }; dc@54200000 { compatible = "nvidia,tegra20-dc"; reg = <0x54200000 0x00040000>; interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 27>, <&tegra_car 121>; + clocks = <&tegra_car TEGRA20_CLK_DISP1>, <&tegra_car TEGRA20_CLK_PLL_P>; clock-names = "disp1", "parent"; rgb { @@ -83,7 +84,7 @@ compatible = "nvidia,tegra20-dc"; reg = <0x54240000 0x00040000>; interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 26>, <&tegra_car 121>; + clocks = <&tegra_car TEGRA20_CLK_DISP2>, <&tegra_car TEGRA20_CLK_PLL_P>; clock-names = "disp2", "parent"; rgb { @@ -95,7 +96,7 @@ compatible = "nvidia,tegra20-hdmi"; reg = <0x54280000 0x00040000>; interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 51>, <&tegra_car 117>; + clocks = <&tegra_car TEGRA20_CLK_HDMI>, <&tegra_car TEGRA20_CLK_PLL_D_OUT0>; clock-names = "hdmi", "parent"; status = "disabled"; }; @@ -104,14 +105,14 @@ compatible = "nvidia,tegra20-tvo"; reg = <0x542c0000 0x00040000>; interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 102>; + clocks = <&tegra_car TEGRA20_CLK_TVO>; status = "disabled"; }; dsi { compatible = "nvidia,tegra20-dsi"; reg = <0x54300000 0x00040000>; - clocks = <&tegra_car 48>; + clocks = <&tegra_car TEGRA20_CLK_DSI>; status = "disabled"; }; }; @@ -174,7 +175,7 @@ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 34>; + clocks = <&tegra_car TEGRA20_CLK_APBDMA>; }; ahb { @@ -216,7 +217,7 @@ reg = <0x70002000 0x200>; interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 12>; - clocks = <&tegra_car 3>; + clocks = <&tegra_car TEGRA20_CLK_AC97>; status = "disabled"; }; @@ -225,7 +226,7 @@ reg = <0x70002800 0x200>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 2>; - clocks = <&tegra_car 11>; + clocks = <&tegra_car TEGRA20_CLK_I2S1>; status = "disabled"; }; @@ -234,7 +235,7 @@ reg = <0x70002a00 0x200>; interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 1>; - clocks = <&tegra_car 18>; + clocks = <&tegra_car TEGRA20_CLK_I2S2>; status = "disabled"; }; @@ -252,7 +253,7 @@ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 8>; - clocks = <&tegra_car 6>; + clocks = <&tegra_car TEGRA20_CLK_UARTA>; status = "disabled"; }; @@ -263,7 +264,7 @@ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 9>; - clocks = <&tegra_car 96>; + clocks = <&tegra_car TEGRA20_CLK_UARTB>; status = "disabled"; }; @@ -274,7 +275,7 @@ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 10>; - clocks = <&tegra_car 55>; + clocks = <&tegra_car TEGRA20_CLK_UARTC>; status = "disabled"; }; @@ -285,7 +286,7 @@ interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 19>; - clocks = <&tegra_car 65>; + clocks = <&tegra_car TEGRA20_CLK_UARTD>; status = "disabled"; }; @@ -296,7 +297,7 @@ interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <216000000>; nvidia,dma-request-selector = <&apbdma 20>; - clocks = <&tegra_car 66>; + clocks = <&tegra_car TEGRA20_CLK_UARTE>; status = "disabled"; }; @@ -304,7 +305,7 @@ compatible = "nvidia,tegra20-pwm"; reg = <0x7000a000 0x100>; #pwm-cells = <2>; - clocks = <&tegra_car 17>; + clocks = <&tegra_car TEGRA20_CLK_PWM>; }; rtc { @@ -319,7 +320,7 @@ interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 12>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_I2C1>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -331,7 +332,7 @@ nvidia,dma-request-selector = <&apbdma 11>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 43>; + clocks = <&tegra_car TEGRA20_CLK_SPI>; status = "disabled"; }; @@ -341,7 +342,7 @@ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 54>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_I2C2>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -352,7 +353,7 @@ interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 67>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_I2C3>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -363,7 +364,7 @@ interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 47>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_DVC>, <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -375,7 +376,7 @@ nvidia,dma-request-selector = <&apbdma 15>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 41>; + clocks = <&tegra_car TEGRA20_CLK_SBC1>; status = "disabled"; }; @@ -386,7 +387,7 @@ nvidia,dma-request-selector = <&apbdma 16>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 44>; + clocks = <&tegra_car TEGRA20_CLK_SBC2>; status = "disabled"; }; @@ -397,7 +398,7 @@ nvidia,dma-request-selector = <&apbdma 17>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 46>; + clocks = <&tegra_car TEGRA20_CLK_SBC3>; status = "disabled"; }; @@ -408,7 +409,7 @@ nvidia,dma-request-selector = <&apbdma 18>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 68>; + clocks = <&tegra_car TEGRA20_CLK_SBC4>; status = "disabled"; }; @@ -416,7 +417,7 @@ compatible = "nvidia,tegra20-kbc"; reg = <0x7000e200 0x100>; interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 36>; + clocks = <&tegra_car TEGRA20_CLK_KBC>; status = "disabled"; }; @@ -451,7 +452,7 @@ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; phy_type = "utmi"; nvidia,has-legacy-mode; - clocks = <&tegra_car 22>; + clocks = <&tegra_car TEGRA20_CLK_USBD>; nvidia,needs-double-reset; nvidia,phy = <&phy1>; status = "disabled"; @@ -462,7 +463,7 @@ reg = <0xc5000400 0x3c00>; phy_type = "utmi"; nvidia,has-legacy-mode; - clocks = <&tegra_car 22>, <&tegra_car 127>; + clocks = <&tegra_car TEGRA20_CLK_USBD>, <&tegra_car TEGRA20_CLK_PLL_U>; clock-names = "phy", "pll_u"; }; @@ -471,7 +472,7 @@ reg = <0xc5004000 0x4000>; interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; phy_type = "ulpi"; - clocks = <&tegra_car 58>; + clocks = <&tegra_car TEGRA20_CLK_USB2>; nvidia,phy = <&phy2>; status = "disabled"; }; @@ -480,7 +481,7 @@ compatible = "nvidia,tegra20-usb-phy"; reg = <0xc5004400 0x3c00>; phy_type = "ulpi"; - clocks = <&tegra_car 94>, <&tegra_car 127>; + clocks = <&tegra_car TEGRA20_CLK_CDEV2>, <&tegra_car TEGRA20_CLK_PLL_U>; clock-names = "phy", "pll_u"; }; @@ -489,7 +490,7 @@ reg = <0xc5008000 0x4000>; interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; phy_type = "utmi"; - clocks = <&tegra_car 59>; + clocks = <&tegra_car TEGRA20_CLK_USB3>; nvidia,phy = <&phy3>; status = "disabled"; }; @@ -498,7 +499,7 @@ compatible = "nvidia,tegra20-usb-phy"; reg = <0xc5008400 0x3c00>; phy_type = "utmi"; - clocks = <&tegra_car 22>, <&tegra_car 127>; + clocks = <&tegra_car TEGRA20_CLK_USBD>, <&tegra_car TEGRA20_CLK_PLL_U>; clock-names = "phy", "pll_u"; }; @@ -506,7 +507,7 @@ compatible = "nvidia,tegra20-sdhci"; reg = <0xc8000000 0x200>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 14>; + clocks = <&tegra_car TEGRA20_CLK_SDMMC1>; status = "disabled"; }; @@ -514,7 +515,7 @@ compatible = "nvidia,tegra20-sdhci"; reg = <0xc8000200 0x200>; interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 9>; + clocks = <&tegra_car TEGRA20_CLK_SDMMC2>; status = "disabled"; }; @@ -522,7 +523,7 @@ compatible = "nvidia,tegra20-sdhci"; reg = <0xc8000400 0x200>; interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 69>; + clocks = <&tegra_car TEGRA20_CLK_SDMMC3>; status = "disabled"; }; @@ -530,7 +531,7 @@ compatible = "nvidia,tegra20-sdhci"; reg = <0xc8000600 0x200>; interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 15>; + clocks = <&tegra_car TEGRA20_CLK_SDMMC4>; status = "disabled"; }; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
[parent not found: <1360917814-27236-3-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [v3 2/6] ARM: tegra20: convert device tree files to use CLK defines 2013-02-15 8:43 ` Hiroshi Doyu (?) @ 2013-02-15 16:41 ` Stephen Warren -1 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-15 16:41 UTC (permalink / raw) To: Hiroshi Doyu Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, pdeschrijver-DDmLM1+adcrQT0dZR+AlfA, pgaikwad-DDmLM1+adcrQT0dZR+AlfA, Grant Likely, Rob Herring, Rob Landley, Russell King, Simon Glass, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 02/15/2013 01:43 AM, Hiroshi Doyu wrote: > Replace magic number in tegra_car: > > - clocks = <&tegra_car 28>; > + clocks = <&tegra_car CLK_HOST1X>; > > Signed-off-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > --- > .../bindings/clock/nvidia,tegra20-car.txt | 150 +------------------- The edits to the binding are logically part of patch 1. ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 2/6] ARM: tegra20: convert device tree files to use CLK defines @ 2013-02-15 16:41 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-15 16:41 UTC (permalink / raw) To: linux-arm-kernel On 02/15/2013 01:43 AM, Hiroshi Doyu wrote: > Replace magic number in tegra_car: > > - clocks = <&tegra_car 28>; > + clocks = <&tegra_car CLK_HOST1X>; > > Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> > --- > .../bindings/clock/nvidia,tegra20-car.txt | 150 +------------------- The edits to the binding are logically part of patch 1. ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 2/6] ARM: tegra20: convert device tree files to use CLK defines @ 2013-02-15 16:41 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-15 16:41 UTC (permalink / raw) To: Hiroshi Doyu Cc: linux-tegra, pdeschrijver, pgaikwad, Grant Likely, Rob Herring, Rob Landley, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel On 02/15/2013 01:43 AM, Hiroshi Doyu wrote: > Replace magic number in tegra_car: > > - clocks = <&tegra_car 28>; > + clocks = <&tegra_car CLK_HOST1X>; > > Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> > --- > .../bindings/clock/nvidia,tegra20-car.txt | 150 +------------------- The edits to the binding are logically part of patch 1. ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 4/6] ARM: tegra30: convert device tree files to use CLK defines 2013-02-15 8:43 ` Hiroshi Doyu @ 2013-02-15 8:43 ` Hiroshi Doyu -1 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra-u79uwXL29TY76Z2rM5mHXA Cc: Russell King, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rob Herring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Hiroshi Doyu Replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- .../bindings/clock/nvidia,tegra30-car.txt | 207 +------------------- arch/arm/boot/dts/tegra30.dtsip | 87 ++++---- 2 files changed, 45 insertions(+), 249 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt index f3da3be..ac5797b 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt @@ -14,211 +14,6 @@ Required properties : - #clock-cells : Should be 1. In clock consumers, this cell represents the clock ID exposed by the CAR. - The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 160 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 160 and - above. - - 0 cpu - 1 unassigned - 2 unassigned - 3 unassigned - 4 rtc - 5 timer - 6 uarta - 7 unassigned (register bit affects uartb and vfir) - 8 gpio - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 unassigned - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 unassigned - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 i2s0 - 31 cop_cache - - 32 mc - 33 ahbdma - 34 apbdma - 35 unassigned - 36 kbc - 37 statmon - 38 pmc - 39 unassigned (register bit affects fuse and fuse_burn) - 40 kfuse - 41 sbc1 - 42 nor - 43 unassigned - 44 sbc2 - 45 unassigned - 46 sbc3 - 47 i2c5 - 48 dsia - 49 unassigned (register bit affects cve and tvo) - 50 mipi - 51 hdmi - 52 csi - 53 tvdac - 54 i2c2 - 55 uartc - 56 unassigned - 57 emc - 58 usb2 - 59 usb3 - 60 mpe - 61 vde - 62 bsea - 63 bsev - - 64 speedo - 65 uartd - 66 uarte - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 pcie - 71 owr - 72 afi - 73 csite - 74 pciex - 75 avpucq - 76 la - 77 unassigned - 78 unassigned - 79 dtv - 80 ndspeed - 81 i2cslow - 82 dsib - 83 unassigned - 84 irama - 85 iramb - 86 iramc - 87 iramd - 88 cram2 - 89 unassigned - 90 audio_2x a/k/a audio_2x_sync_clk - 91 unassigned - 92 csus - 93 cdev2 - 94 cdev1 - 95 unassigned - - 96 cpu_g - 97 cpu_lp - 98 3d2 - 99 mselect - 100 tsensor - 101 i2s3 - 102 i2s4 - 103 i2c4 - 104 sbc5 - 105 sbc6 - 106 d_audio - 107 apbif - 108 dam0 - 109 dam1 - 110 dam2 - 111 hda2codec_2x - 112 atomics - 113 audio0_2x - 114 audio1_2x - 115 audio2_2x - 116 audio3_2x - 117 audio4_2x - 118 audio5_2x - 119 actmon - 120 extern1 - 121 extern2 - 122 extern3 - 123 sata_oob - 124 sata - 125 hda - 127 se - 128 hda2hdmi - 129 sata_cold - - 160 uartb - 161 vfir - 162 spdif_in - 163 spdif_out - 164 vi - 165 vi_sensor - 166 fuse - 167 fuse_burn - 168 cve - 169 tvo - - 170 clk_32k - 171 clk_m - 172 clk_m_div2 - 173 clk_m_div4 - 174 pll_ref - 175 pll_c - 176 pll_c_out1 - 177 pll_m - 178 pll_m_out1 - 179 pll_p - 180 pll_p_out1 - 181 pll_p_out2 - 182 pll_p_out3 - 183 pll_p_out4 - 184 pll_a - 185 pll_a_out0 - 186 pll_d - 187 pll_d_out0 - 188 pll_d2 - 189 pll_d2_out0 - 190 pll_u - 191 pll_x - 192 pll_x_out0 - 193 pll_e - 194 spdif_in_sync - 195 i2s0_sync - 196 i2s1_sync - 197 i2s2_sync - 198 i2s3_sync - 199 i2s4_sync - 200 vimclk - 201 audio0 - 202 audio1 - 203 audio2 - 204 audio3 - 205 audio4 - 206 audio5 - 207 clk_out_1 (extern1) - 208 clk_out_2 (extern2) - 209 clk_out_3 (extern3) - 210 sclk - 211 blink - 212 cclk_g - 213 cclk_lp - 214 twd - 215 cml0 - 216 cml1 - 217 hclk - 218 pclk - Example SoC include file: / { @@ -229,7 +24,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA30_CLK_USB2>; }; }; diff --git a/arch/arm/boot/dts/tegra30.dtsip b/arch/arm/boot/dts/tegra30.dtsip index 0148459..3c87b71 100644 --- a/arch/arm/boot/dts/tegra30.dtsip +++ b/arch/arm/boot/dts/tegra30.dtsip @@ -1,6 +1,7 @@ #include "skeleton.dtsi" #include "tegra-gpio.h" #include "arm-gic.h" +#include "tegra30-car.h" / { compatible = "nvidia,tegra30"; @@ -19,7 +20,7 @@ reg = <0x50000000 0x00024000>; interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ - clocks = <&tegra_car 28>; + clocks = <&tegra_car TEGRA30_CLK_HOST1X>; #address-cells = <1>; #size-cells = <1>; @@ -30,35 +31,35 @@ compatible = "nvidia,tegra30-mpe"; reg = <0x54040000 0x00040000>; interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 60>; + clocks = <&tegra_car TEGRA30_CLK_MPE>; }; vi { compatible = "nvidia,tegra30-vi"; reg = <0x54080000 0x00040000>; interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 164>; + clocks = <&tegra_car TEGRA30_CLK_VI>; }; epp { compatible = "nvidia,tegra30-epp"; reg = <0x540c0000 0x00040000>; interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 19>; + clocks = <&tegra_car TEGRA30_CLK_EPP>; }; isp { compatible = "nvidia,tegra30-isp"; reg = <0x54100000 0x00040000>; interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 23>; + clocks = <&tegra_car TEGRA30_CLK_ISP>; }; gr2d { compatible = "nvidia,tegra30-gr2d"; reg = <0x54140000 0x00040000>; interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 21>; + clocks = <&tegra_car TEGRA30_CLK_GR2D>; }; gr3d { @@ -72,7 +73,7 @@ compatible = "nvidia,tegra30-dc"; reg = <0x54200000 0x00040000>; interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 27>, <&tegra_car 179>; + clocks = <&tegra_car TEGRA30_CLK_DISP1>, <&tegra_car TEGRA30_CLK_PLL_P>; clock-names = "disp1", "parent"; rgb { @@ -84,7 +85,7 @@ compatible = "nvidia,tegra30-dc"; reg = <0x54240000 0x00040000>; interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 26>, <&tegra_car 179>; + clocks = <&tegra_car TEGRA30_CLK_DISP2>, <&tegra_car TEGRA30_CLK_PLL_P>; clock-names = "disp2", "parent"; rgb { @@ -96,7 +97,7 @@ compatible = "nvidia,tegra30-hdmi"; reg = <0x54280000 0x00040000>; interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 51>, <&tegra_car 189>; + clocks = <&tegra_car TEGRA30_CLK_HDMI>, <&tegra_car TEGRA30_CLK_PLL_D2_OUT0>; clock-names = "hdmi", "parent"; status = "disabled"; }; @@ -105,14 +106,14 @@ compatible = "nvidia,tegra30-tvo"; reg = <0x542c0000 0x00040000>; interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 169>; + clocks = <&tegra_car TEGRA30_CLK_TVO>; status = "disabled"; }; dsi { compatible = "nvidia,tegra30-dsi"; reg = <0x54300000 0x00040000>; - clocks = <&tegra_car 48>; + clocks = <&tegra_car TEGRA30_CLK_DSIA>; status = "disabled"; }; }; @@ -193,7 +194,7 @@ <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 34>; + clocks = <&tegra_car TEGRA30_CLK_APBDMA>; }; ahb: ahb { @@ -239,7 +240,7 @@ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <408000000>; nvidia,dma-request-selector = <&apbdma 8>; - clocks = <&tegra_car 6>; + clocks = <&tegra_car TEGRA30_CLK_UARTA>; status = "disabled"; }; @@ -250,7 +251,7 @@ clock-frequency = <408000000>; interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 9>; - clocks = <&tegra_car 160>; + clocks = <&tegra_car TEGRA30_CLK_UARTB>; status = "disabled"; }; @@ -261,7 +262,7 @@ clock-frequency = <408000000>; interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 10>; - clocks = <&tegra_car 55>; + clocks = <&tegra_car TEGRA30_CLK_UARTC>; status = "disabled"; }; @@ -272,7 +273,7 @@ clock-frequency = <408000000>; interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 19>; - clocks = <&tegra_car 65>; + clocks = <&tegra_car TEGRA30_CLK_UARTD>; status = "disabled"; }; @@ -283,7 +284,7 @@ clock-frequency = <408000000>; interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 20>; - clocks = <&tegra_car 66>; + clocks = <&tegra_car TEGRA30_CLK_UARTE>; status = "disabled"; }; @@ -291,7 +292,7 @@ compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm"; reg = <0x7000a000 0x100>; #pwm-cells = <2>; - clocks = <&tegra_car 17>; + clocks = <&tegra_car TEGRA30_CLK_PWM>; }; rtc { @@ -306,7 +307,7 @@ interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 12>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C1>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -317,7 +318,7 @@ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 54>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C2>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -328,7 +329,7 @@ interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 67>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C3>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -339,7 +340,7 @@ interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 103>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C4>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -350,7 +351,7 @@ interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 47>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C5>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -362,7 +363,7 @@ nvidia,dma-request-selector = <&apbdma 15>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 41>; + clocks = <&tegra_car TEGRA30_CLK_SBC1>; status = "disabled"; }; @@ -373,7 +374,7 @@ nvidia,dma-request-selector = <&apbdma 16>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 44>; + clocks = <&tegra_car TEGRA30_CLK_SBC2>; status = "disabled"; }; @@ -384,7 +385,7 @@ nvidia,dma-request-selector = <&apbdma 17>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 46>; + clocks = <&tegra_car TEGRA30_CLK_SBC3>; status = "disabled"; }; @@ -395,7 +396,7 @@ nvidia,dma-request-selector = <&apbdma 18>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 68>; + clocks = <&tegra_car TEGRA30_CLK_SBC4>; status = "disabled"; }; @@ -406,7 +407,7 @@ nvidia,dma-request-selector = <&apbdma 27>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 104>; + clocks = <&tegra_car TEGRA30_CLK_SBC5>; status = "disabled"; }; @@ -417,7 +418,7 @@ nvidia,dma-request-selector = <&apbdma 28>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 105>; + clocks = <&tegra_car TEGRA30_CLK_SBC6>; status = "disabled"; }; @@ -425,7 +426,7 @@ compatible = "nvidia,tegra30-kbc", "nvidia,tegra20-kbc"; reg = <0x7000e200 0x100>; interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 36>; + clocks = <&tegra_car TEGRA30_CLK_KBC>; status = "disabled"; }; @@ -459,10 +460,10 @@ 0x70080200 0x100>; interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 1>; - clocks = <&tegra_car 106>, <&tegra_car 107>, <&tegra_car 30>, - <&tegra_car 11>, <&tegra_car 18>, <&tegra_car 101>, - <&tegra_car 102>, <&tegra_car 108>, <&tegra_car 109>, - <&tegra_car 110>, <&tegra_car 162>; + clocks = <&tegra_car TEGRA30_CLK_D_AUDIO>, <&tegra_car TEGRA30_CLK_APBIF>, <&tegra_car TEGRA30_CLK_I2S0>, + <&tegra_car TEGRA30_CLK_I2S1>, <&tegra_car TEGRA30_CLK_I2S2>, <&tegra_car TEGRA30_CLK_I2S3>, + <&tegra_car TEGRA30_CLK_I2S4>, <&tegra_car TEGRA30_CLK_DAM0>, <&tegra_car TEGRA30_CLK_DAM1>, + <&tegra_car TEGRA30_CLK_DAM2>, <&tegra_car TEGRA30_CLK_SPDIF_IN>; clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", "i2s3", "i2s4", "dam0", "dam1", "dam2", "spdif_in"; @@ -474,7 +475,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080300 0x100>; nvidia,ahub-cif-ids = <4 4>; - clocks = <&tegra_car 30>; + clocks = <&tegra_car TEGRA30_CLK_I2S0>; status = "disabled"; }; @@ -482,7 +483,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080400 0x100>; nvidia,ahub-cif-ids = <5 5>; - clocks = <&tegra_car 11>; + clocks = <&tegra_car TEGRA30_CLK_I2S1>; status = "disabled"; }; @@ -490,7 +491,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080500 0x100>; nvidia,ahub-cif-ids = <6 6>; - clocks = <&tegra_car 18>; + clocks = <&tegra_car TEGRA30_CLK_I2S2>; status = "disabled"; }; @@ -498,7 +499,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080600 0x100>; nvidia,ahub-cif-ids = <7 7>; - clocks = <&tegra_car 101>; + clocks = <&tegra_car TEGRA30_CLK_I2S3>; status = "disabled"; }; @@ -506,7 +507,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080700 0x100>; nvidia,ahub-cif-ids = <8 8>; - clocks = <&tegra_car 102>; + clocks = <&tegra_car TEGRA30_CLK_I2S4>; status = "disabled"; }; }; @@ -515,7 +516,7 @@ compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; reg = <0x78000000 0x200>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 14>; + clocks = <&tegra_car TEGRA30_CLK_SDMMC1>; status = "disabled"; }; @@ -523,7 +524,7 @@ compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; reg = <0x78000200 0x200>; interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 9>; + clocks = <&tegra_car TEGRA30_CLK_SDMMC2>; status = "disabled"; }; @@ -531,7 +532,7 @@ compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; reg = <0x78000400 0x200>; interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 69>; + clocks = <&tegra_car TEGRA30_CLK_SDMMC3>; status = "disabled"; }; @@ -539,7 +540,7 @@ compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; reg = <0x78000600 0x200>; interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 15>; + clocks = <&tegra_car TEGRA30_CLK_SDMMC4>; status = "disabled"; }; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [v3 4/6] ARM: tegra30: convert device tree files to use CLK defines @ 2013-02-15 8:43 ` Hiroshi Doyu 0 siblings, 0 replies; 41+ messages in thread From: Hiroshi Doyu @ 2013-02-15 8:43 UTC (permalink / raw) To: linux-tegra Cc: pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel Replace magic number in tegra_car: - clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>; Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> --- .../bindings/clock/nvidia,tegra30-car.txt | 207 +------------------- arch/arm/boot/dts/tegra30.dtsip | 87 ++++---- 2 files changed, 45 insertions(+), 249 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt index f3da3be..ac5797b 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt @@ -14,211 +14,6 @@ Required properties : - #clock-cells : Should be 1. In clock consumers, this cell represents the clock ID exposed by the CAR. - The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 160 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 160 and - above. - - 0 cpu - 1 unassigned - 2 unassigned - 3 unassigned - 4 rtc - 5 timer - 6 uarta - 7 unassigned (register bit affects uartb and vfir) - 8 gpio - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 unassigned - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 unassigned - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 i2s0 - 31 cop_cache - - 32 mc - 33 ahbdma - 34 apbdma - 35 unassigned - 36 kbc - 37 statmon - 38 pmc - 39 unassigned (register bit affects fuse and fuse_burn) - 40 kfuse - 41 sbc1 - 42 nor - 43 unassigned - 44 sbc2 - 45 unassigned - 46 sbc3 - 47 i2c5 - 48 dsia - 49 unassigned (register bit affects cve and tvo) - 50 mipi - 51 hdmi - 52 csi - 53 tvdac - 54 i2c2 - 55 uartc - 56 unassigned - 57 emc - 58 usb2 - 59 usb3 - 60 mpe - 61 vde - 62 bsea - 63 bsev - - 64 speedo - 65 uartd - 66 uarte - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 pcie - 71 owr - 72 afi - 73 csite - 74 pciex - 75 avpucq - 76 la - 77 unassigned - 78 unassigned - 79 dtv - 80 ndspeed - 81 i2cslow - 82 dsib - 83 unassigned - 84 irama - 85 iramb - 86 iramc - 87 iramd - 88 cram2 - 89 unassigned - 90 audio_2x a/k/a audio_2x_sync_clk - 91 unassigned - 92 csus - 93 cdev2 - 94 cdev1 - 95 unassigned - - 96 cpu_g - 97 cpu_lp - 98 3d2 - 99 mselect - 100 tsensor - 101 i2s3 - 102 i2s4 - 103 i2c4 - 104 sbc5 - 105 sbc6 - 106 d_audio - 107 apbif - 108 dam0 - 109 dam1 - 110 dam2 - 111 hda2codec_2x - 112 atomics - 113 audio0_2x - 114 audio1_2x - 115 audio2_2x - 116 audio3_2x - 117 audio4_2x - 118 audio5_2x - 119 actmon - 120 extern1 - 121 extern2 - 122 extern3 - 123 sata_oob - 124 sata - 125 hda - 127 se - 128 hda2hdmi - 129 sata_cold - - 160 uartb - 161 vfir - 162 spdif_in - 163 spdif_out - 164 vi - 165 vi_sensor - 166 fuse - 167 fuse_burn - 168 cve - 169 tvo - - 170 clk_32k - 171 clk_m - 172 clk_m_div2 - 173 clk_m_div4 - 174 pll_ref - 175 pll_c - 176 pll_c_out1 - 177 pll_m - 178 pll_m_out1 - 179 pll_p - 180 pll_p_out1 - 181 pll_p_out2 - 182 pll_p_out3 - 183 pll_p_out4 - 184 pll_a - 185 pll_a_out0 - 186 pll_d - 187 pll_d_out0 - 188 pll_d2 - 189 pll_d2_out0 - 190 pll_u - 191 pll_x - 192 pll_x_out0 - 193 pll_e - 194 spdif_in_sync - 195 i2s0_sync - 196 i2s1_sync - 197 i2s2_sync - 198 i2s3_sync - 199 i2s4_sync - 200 vimclk - 201 audio0 - 202 audio1 - 203 audio2 - 204 audio3 - 205 audio4 - 206 audio5 - 207 clk_out_1 (extern1) - 208 clk_out_2 (extern2) - 209 clk_out_3 (extern3) - 210 sclk - 211 blink - 212 cclk_g - 213 cclk_lp - 214 twd - 215 cml0 - 216 cml1 - 217 hclk - 218 pclk - Example SoC include file: / { @@ -229,7 +24,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA30_CLK_USB2>; }; }; diff --git a/arch/arm/boot/dts/tegra30.dtsip b/arch/arm/boot/dts/tegra30.dtsip index 0148459..3c87b71 100644 --- a/arch/arm/boot/dts/tegra30.dtsip +++ b/arch/arm/boot/dts/tegra30.dtsip @@ -1,6 +1,7 @@ #include "skeleton.dtsi" #include "tegra-gpio.h" #include "arm-gic.h" +#include "tegra30-car.h" / { compatible = "nvidia,tegra30"; @@ -19,7 +20,7 @@ reg = <0x50000000 0x00024000>; interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ - clocks = <&tegra_car 28>; + clocks = <&tegra_car TEGRA30_CLK_HOST1X>; #address-cells = <1>; #size-cells = <1>; @@ -30,35 +31,35 @@ compatible = "nvidia,tegra30-mpe"; reg = <0x54040000 0x00040000>; interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 60>; + clocks = <&tegra_car TEGRA30_CLK_MPE>; }; vi { compatible = "nvidia,tegra30-vi"; reg = <0x54080000 0x00040000>; interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 164>; + clocks = <&tegra_car TEGRA30_CLK_VI>; }; epp { compatible = "nvidia,tegra30-epp"; reg = <0x540c0000 0x00040000>; interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 19>; + clocks = <&tegra_car TEGRA30_CLK_EPP>; }; isp { compatible = "nvidia,tegra30-isp"; reg = <0x54100000 0x00040000>; interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 23>; + clocks = <&tegra_car TEGRA30_CLK_ISP>; }; gr2d { compatible = "nvidia,tegra30-gr2d"; reg = <0x54140000 0x00040000>; interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 21>; + clocks = <&tegra_car TEGRA30_CLK_GR2D>; }; gr3d { @@ -72,7 +73,7 @@ compatible = "nvidia,tegra30-dc"; reg = <0x54200000 0x00040000>; interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 27>, <&tegra_car 179>; + clocks = <&tegra_car TEGRA30_CLK_DISP1>, <&tegra_car TEGRA30_CLK_PLL_P>; clock-names = "disp1", "parent"; rgb { @@ -84,7 +85,7 @@ compatible = "nvidia,tegra30-dc"; reg = <0x54240000 0x00040000>; interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 26>, <&tegra_car 179>; + clocks = <&tegra_car TEGRA30_CLK_DISP2>, <&tegra_car TEGRA30_CLK_PLL_P>; clock-names = "disp2", "parent"; rgb { @@ -96,7 +97,7 @@ compatible = "nvidia,tegra30-hdmi"; reg = <0x54280000 0x00040000>; interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 51>, <&tegra_car 189>; + clocks = <&tegra_car TEGRA30_CLK_HDMI>, <&tegra_car TEGRA30_CLK_PLL_D2_OUT0>; clock-names = "hdmi", "parent"; status = "disabled"; }; @@ -105,14 +106,14 @@ compatible = "nvidia,tegra30-tvo"; reg = <0x542c0000 0x00040000>; interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 169>; + clocks = <&tegra_car TEGRA30_CLK_TVO>; status = "disabled"; }; dsi { compatible = "nvidia,tegra30-dsi"; reg = <0x54300000 0x00040000>; - clocks = <&tegra_car 48>; + clocks = <&tegra_car TEGRA30_CLK_DSIA>; status = "disabled"; }; }; @@ -193,7 +194,7 @@ <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 34>; + clocks = <&tegra_car TEGRA30_CLK_APBDMA>; }; ahb: ahb { @@ -239,7 +240,7 @@ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <408000000>; nvidia,dma-request-selector = <&apbdma 8>; - clocks = <&tegra_car 6>; + clocks = <&tegra_car TEGRA30_CLK_UARTA>; status = "disabled"; }; @@ -250,7 +251,7 @@ clock-frequency = <408000000>; interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 9>; - clocks = <&tegra_car 160>; + clocks = <&tegra_car TEGRA30_CLK_UARTB>; status = "disabled"; }; @@ -261,7 +262,7 @@ clock-frequency = <408000000>; interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 10>; - clocks = <&tegra_car 55>; + clocks = <&tegra_car TEGRA30_CLK_UARTC>; status = "disabled"; }; @@ -272,7 +273,7 @@ clock-frequency = <408000000>; interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 19>; - clocks = <&tegra_car 65>; + clocks = <&tegra_car TEGRA30_CLK_UARTD>; status = "disabled"; }; @@ -283,7 +284,7 @@ clock-frequency = <408000000>; interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 20>; - clocks = <&tegra_car 66>; + clocks = <&tegra_car TEGRA30_CLK_UARTE>; status = "disabled"; }; @@ -291,7 +292,7 @@ compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm"; reg = <0x7000a000 0x100>; #pwm-cells = <2>; - clocks = <&tegra_car 17>; + clocks = <&tegra_car TEGRA30_CLK_PWM>; }; rtc { @@ -306,7 +307,7 @@ interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 12>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C1>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -317,7 +318,7 @@ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 54>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C2>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -328,7 +329,7 @@ interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 67>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C3>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -339,7 +340,7 @@ interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 103>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C4>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -350,7 +351,7 @@ interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 47>, <&tegra_car 182>; + clocks = <&tegra_car TEGRA30_CLK_I2C5>, <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; status = "disabled"; }; @@ -362,7 +363,7 @@ nvidia,dma-request-selector = <&apbdma 15>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 41>; + clocks = <&tegra_car TEGRA30_CLK_SBC1>; status = "disabled"; }; @@ -373,7 +374,7 @@ nvidia,dma-request-selector = <&apbdma 16>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 44>; + clocks = <&tegra_car TEGRA30_CLK_SBC2>; status = "disabled"; }; @@ -384,7 +385,7 @@ nvidia,dma-request-selector = <&apbdma 17>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 46>; + clocks = <&tegra_car TEGRA30_CLK_SBC3>; status = "disabled"; }; @@ -395,7 +396,7 @@ nvidia,dma-request-selector = <&apbdma 18>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 68>; + clocks = <&tegra_car TEGRA30_CLK_SBC4>; status = "disabled"; }; @@ -406,7 +407,7 @@ nvidia,dma-request-selector = <&apbdma 27>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 104>; + clocks = <&tegra_car TEGRA30_CLK_SBC5>; status = "disabled"; }; @@ -417,7 +418,7 @@ nvidia,dma-request-selector = <&apbdma 28>; #address-cells = <1>; #size-cells = <0>; - clocks = <&tegra_car 105>; + clocks = <&tegra_car TEGRA30_CLK_SBC6>; status = "disabled"; }; @@ -425,7 +426,7 @@ compatible = "nvidia,tegra30-kbc", "nvidia,tegra20-kbc"; reg = <0x7000e200 0x100>; interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 36>; + clocks = <&tegra_car TEGRA30_CLK_KBC>; status = "disabled"; }; @@ -459,10 +460,10 @@ 0x70080200 0x100>; interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; nvidia,dma-request-selector = <&apbdma 1>; - clocks = <&tegra_car 106>, <&tegra_car 107>, <&tegra_car 30>, - <&tegra_car 11>, <&tegra_car 18>, <&tegra_car 101>, - <&tegra_car 102>, <&tegra_car 108>, <&tegra_car 109>, - <&tegra_car 110>, <&tegra_car 162>; + clocks = <&tegra_car TEGRA30_CLK_D_AUDIO>, <&tegra_car TEGRA30_CLK_APBIF>, <&tegra_car TEGRA30_CLK_I2S0>, + <&tegra_car TEGRA30_CLK_I2S1>, <&tegra_car TEGRA30_CLK_I2S2>, <&tegra_car TEGRA30_CLK_I2S3>, + <&tegra_car TEGRA30_CLK_I2S4>, <&tegra_car TEGRA30_CLK_DAM0>, <&tegra_car TEGRA30_CLK_DAM1>, + <&tegra_car TEGRA30_CLK_DAM2>, <&tegra_car TEGRA30_CLK_SPDIF_IN>; clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", "i2s3", "i2s4", "dam0", "dam1", "dam2", "spdif_in"; @@ -474,7 +475,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080300 0x100>; nvidia,ahub-cif-ids = <4 4>; - clocks = <&tegra_car 30>; + clocks = <&tegra_car TEGRA30_CLK_I2S0>; status = "disabled"; }; @@ -482,7 +483,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080400 0x100>; nvidia,ahub-cif-ids = <5 5>; - clocks = <&tegra_car 11>; + clocks = <&tegra_car TEGRA30_CLK_I2S1>; status = "disabled"; }; @@ -490,7 +491,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080500 0x100>; nvidia,ahub-cif-ids = <6 6>; - clocks = <&tegra_car 18>; + clocks = <&tegra_car TEGRA30_CLK_I2S2>; status = "disabled"; }; @@ -498,7 +499,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080600 0x100>; nvidia,ahub-cif-ids = <7 7>; - clocks = <&tegra_car 101>; + clocks = <&tegra_car TEGRA30_CLK_I2S3>; status = "disabled"; }; @@ -506,7 +507,7 @@ compatible = "nvidia,tegra30-i2s"; reg = <0x70080700 0x100>; nvidia,ahub-cif-ids = <8 8>; - clocks = <&tegra_car 102>; + clocks = <&tegra_car TEGRA30_CLK_I2S4>; status = "disabled"; }; }; @@ -515,7 +516,7 @@ compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; reg = <0x78000000 0x200>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 14>; + clocks = <&tegra_car TEGRA30_CLK_SDMMC1>; status = "disabled"; }; @@ -523,7 +524,7 @@ compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; reg = <0x78000200 0x200>; interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 9>; + clocks = <&tegra_car TEGRA30_CLK_SDMMC2>; status = "disabled"; }; @@ -531,7 +532,7 @@ compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; reg = <0x78000400 0x200>; interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 69>; + clocks = <&tegra_car TEGRA30_CLK_SDMMC3>; status = "disabled"; }; @@ -539,7 +540,7 @@ compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; reg = <0x78000600 0x200>; interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car 15>; + clocks = <&tegra_car TEGRA30_CLK_SDMMC4>; status = "disabled"; }; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines 2013-02-15 8:43 ` Hiroshi Doyu (?) @ 2013-02-17 22:05 ` Rob Landley -1 siblings, 0 replies; 41+ messages in thread From: Rob Landley @ 2013-02-17 22:05 UTC (permalink / raw) Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, pdeschrijver-DDmLM1+adcrQT0dZR+AlfA, pgaikwad-DDmLM1+adcrQT0dZR+AlfA, Hiroshi Doyu, Grant Likely, Rob Herring, Stephen Warren, Russell King, Simon Glass, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: > Hi, > > With new dtc+cpp feature, we could get rid of magic numbers in dts* > files. This patch replaces CLK IDs. > > We also plan to share those DT header files with kernel source > later[1]. ... > [1] > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html This really smells like documentation should be updated, probably booting-without-of.txt or similar. Alas, I'm not capable of writing such an update... Rob-- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-17 22:05 ` Rob Landley 0 siblings, 0 replies; 41+ messages in thread From: Rob Landley @ 2013-02-17 22:05 UTC (permalink / raw) To: linux-arm-kernel On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: > Hi, > > With new dtc+cpp feature, we could get rid of magic numbers in dts* > files. This patch replaces CLK IDs. > > We also plan to share those DT header files with kernel source > later[1]. ... > [1] > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html This really smells like documentation should be updated, probably booting-without-of.txt or similar. Alas, I'm not capable of writing such an update... Rob ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-17 22:05 ` Rob Landley 0 siblings, 0 replies; 41+ messages in thread From: Rob Landley @ 2013-02-17 22:05 UTC (permalink / raw) To: Hiroshi Doyu Cc: linux-tegra, pdeschrijver, pgaikwad, Hiroshi Doyu, Grant Likely, Rob Herring, Stephen Warren, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: > Hi, > > With new dtc+cpp feature, we could get rid of magic numbers in dts* > files. This patch replaces CLK IDs. > > We also plan to share those DT header files with kernel source > later[1]. ... > [1] > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html This really smells like documentation should be updated, probably booting-without-of.txt or similar. Alas, I'm not capable of writing such an update... Rob ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines 2013-02-17 22:05 ` Rob Landley (?) @ 2013-02-19 17:10 ` Stephen Warren -1 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-19 17:10 UTC (permalink / raw) To: Rob Landley Cc: Russell King, linux-doc-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Hiroshi Doyu On 02/17/2013 03:05 PM, Rob Landley wrote: > On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: >> Hi, >> >> With new dtc+cpp feature, we could get rid of magic numbers in dts* >> files. This patch replaces CLK IDs. >> >> We also plan to share those DT header files with kernel source >> later[1]. > ... >> [1] >> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html >> > > This really smells like documentation should be updated, probably > booting-without-of.txt or similar. Alas, I'm not capable of writing such > an update... I'm not sure what documentation would be updated nor why. Can you describe that? This patch is (or should be) editing the device tree binding documentation to (include by) reference the header file that is being added in this patch. I don't believe there's any more general documentation that is affected by this series. ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-19 17:10 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-19 17:10 UTC (permalink / raw) To: linux-arm-kernel On 02/17/2013 03:05 PM, Rob Landley wrote: > On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: >> Hi, >> >> With new dtc+cpp feature, we could get rid of magic numbers in dts* >> files. This patch replaces CLK IDs. >> >> We also plan to share those DT header files with kernel source >> later[1]. > ... >> [1] >> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html >> > > This really smells like documentation should be updated, probably > booting-without-of.txt or similar. Alas, I'm not capable of writing such > an update... I'm not sure what documentation would be updated nor why. Can you describe that? This patch is (or should be) editing the device tree binding documentation to (include by) reference the header file that is being added in this patch. I don't believe there's any more general documentation that is affected by this series. ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-19 17:10 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-19 17:10 UTC (permalink / raw) To: Rob Landley Cc: Hiroshi Doyu, linux-tegra, pdeschrijver, pgaikwad, Grant Likely, Rob Herring, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel On 02/17/2013 03:05 PM, Rob Landley wrote: > On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: >> Hi, >> >> With new dtc+cpp feature, we could get rid of magic numbers in dts* >> files. This patch replaces CLK IDs. >> >> We also plan to share those DT header files with kernel source >> later[1]. > ... >> [1] >> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html >> > > This really smells like documentation should be updated, probably > booting-without-of.txt or similar. Alas, I'm not capable of writing such > an update... I'm not sure what documentation would be updated nor why. Can you describe that? This patch is (or should be) editing the device tree binding documentation to (include by) reference the header file that is being added in this patch. I don't believe there's any more general documentation that is affected by this series. ^ permalink raw reply [flat|nested] 41+ messages in thread
[parent not found: <5123B1F8.4040102-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines 2013-02-19 17:10 ` Stephen Warren (?) @ 2013-02-23 19:51 ` Rob Landley -1 siblings, 0 replies; 41+ messages in thread From: Rob Landley @ 2013-02-23 19:51 UTC (permalink / raw) To: Stephen Warren Cc: Russell King, linux-doc-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Hiroshi Doyu On 02/19/2013 11:10:16 AM, Stephen Warren wrote: > On 02/17/2013 03:05 PM, Rob Landley wrote: > > On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: > >> Hi, > >> > >> With new dtc+cpp feature, we could get rid of magic numbers in dts* > >> files. This patch replaces CLK IDs. > >> > >> We also plan to share those DT header files with kernel source > >> later[1]. > > ... > >> [1] > >> > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html > >> > > > > This really smells like documentation should be updated, probably > > booting-without-of.txt or similar. Alas, I'm not capable of writing > such > > an update... > > I'm not sure what documentation would be updated nor why. Can you > describe that? "When writing new device tree files, please do not include magic numbers. Here's how to avoid them." Does something in Documentation already say this somewhere? Rob ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-23 19:51 ` Rob Landley 0 siblings, 0 replies; 41+ messages in thread From: Rob Landley @ 2013-02-23 19:51 UTC (permalink / raw) To: linux-arm-kernel On 02/19/2013 11:10:16 AM, Stephen Warren wrote: > On 02/17/2013 03:05 PM, Rob Landley wrote: > > On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: > >> Hi, > >> > >> With new dtc+cpp feature, we could get rid of magic numbers in dts* > >> files. This patch replaces CLK IDs. > >> > >> We also plan to share those DT header files with kernel source > >> later[1]. > > ... > >> [1] > >> > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html > >> > > > > This really smells like documentation should be updated, probably > > booting-without-of.txt or similar. Alas, I'm not capable of writing > such > > an update... > > I'm not sure what documentation would be updated nor why. Can you > describe that? "When writing new device tree files, please do not include magic numbers. Here's how to avoid them." Does something in Documentation already say this somewhere? Rob ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-23 19:51 ` Rob Landley 0 siblings, 0 replies; 41+ messages in thread From: Rob Landley @ 2013-02-23 19:51 UTC (permalink / raw) To: Stephen Warren Cc: Hiroshi Doyu, linux-tegra, pdeschrijver, pgaikwad, Grant Likely, Rob Herring, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel On 02/19/2013 11:10:16 AM, Stephen Warren wrote: > On 02/17/2013 03:05 PM, Rob Landley wrote: > > On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: > >> Hi, > >> > >> With new dtc+cpp feature, we could get rid of magic numbers in dts* > >> files. This patch replaces CLK IDs. > >> > >> We also plan to share those DT header files with kernel source > >> later[1]. > > ... > >> [1] > >> > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html > >> > > > > This really smells like documentation should be updated, probably > > booting-without-of.txt or similar. Alas, I'm not capable of writing > such > > an update... > > I'm not sure what documentation would be updated nor why. Can you > describe that? "When writing new device tree files, please do not include magic numbers. Here's how to avoid them." Does something in Documentation already say this somewhere? Rob ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines 2013-02-23 19:51 ` Rob Landley (?) @ 2013-02-23 23:52 ` Stephen Warren -1 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-23 23:52 UTC (permalink / raw) To: Rob Landley Cc: Hiroshi Doyu, linux-tegra-u79uwXL29TY76Z2rM5mHXA, pdeschrijver-DDmLM1+adcrQT0dZR+AlfA, pgaikwad-DDmLM1+adcrQT0dZR+AlfA, Grant Likely, Rob Herring, Russell King, Simon Glass, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 02/23/2013 12:51 PM, Rob Landley wrote: > On 02/19/2013 11:10:16 AM, Stephen Warren wrote: >> On 02/17/2013 03:05 PM, Rob Landley wrote: >> > On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: >> >> Hi, >> >> >> >> With new dtc+cpp feature, we could get rid of magic numbers in dts* >> >> files. This patch replaces CLK IDs. >> >> >> >> We also plan to share those DT header files with kernel source >> >> later[1]. >> > ... >> >> [1] >> >> >> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html >> >> >> >> > >> > This really smells like documentation should be updated, probably >> > booting-without-of.txt or similar. Alas, I'm not capable of writing >> such >> > an update... >> >> I'm not sure what documentation would be updated nor why. Can you >> describe that? > > "When writing new device tree files, please do not include magic > numbers. Here's how to avoid them." > > Does something in Documentation already say this somewhere? This seems rather basic and not worth documenting. The technique is identical to the use of header files in C/assembly/... code. I suppose if we document that, then there would be an argument for documenting this. ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-23 23:52 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-23 23:52 UTC (permalink / raw) To: linux-arm-kernel On 02/23/2013 12:51 PM, Rob Landley wrote: > On 02/19/2013 11:10:16 AM, Stephen Warren wrote: >> On 02/17/2013 03:05 PM, Rob Landley wrote: >> > On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: >> >> Hi, >> >> >> >> With new dtc+cpp feature, we could get rid of magic numbers in dts* >> >> files. This patch replaces CLK IDs. >> >> >> >> We also plan to share those DT header files with kernel source >> >> later[1]. >> > ... >> >> [1] >> >> >> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html >> >> >> >> > >> > This really smells like documentation should be updated, probably >> > booting-without-of.txt or similar. Alas, I'm not capable of writing >> such >> > an update... >> >> I'm not sure what documentation would be updated nor why. Can you >> describe that? > > "When writing new device tree files, please do not include magic > numbers. Here's how to avoid them." > > Does something in Documentation already say this somewhere? This seems rather basic and not worth documenting. The technique is identical to the use of header files in C/assembly/... code. I suppose if we document that, then there would be an argument for documenting this. ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-23 23:52 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-23 23:52 UTC (permalink / raw) To: Rob Landley Cc: Hiroshi Doyu, linux-tegra, pdeschrijver, pgaikwad, Grant Likely, Rob Herring, Russell King, Simon Glass, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel On 02/23/2013 12:51 PM, Rob Landley wrote: > On 02/19/2013 11:10:16 AM, Stephen Warren wrote: >> On 02/17/2013 03:05 PM, Rob Landley wrote: >> > On 02/15/2013 02:43:11 AM, Hiroshi Doyu wrote: >> >> Hi, >> >> >> >> With new dtc+cpp feature, we could get rid of magic numbers in dts* >> >> files. This patch replaces CLK IDs. >> >> >> >> We also plan to share those DT header files with kernel source >> >> later[1]. >> > ... >> >> [1] >> >> >> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html >> >> >> >> > >> > This really smells like documentation should be updated, probably >> > booting-without-of.txt or similar. Alas, I'm not capable of writing >> such >> > an update... >> >> I'm not sure what documentation would be updated nor why. Can you >> describe that? > > "When writing new device tree files, please do not include magic > numbers. Here's how to avoid them." > > Does something in Documentation already say this somewhere? This seems rather basic and not worth documenting. The technique is identical to the use of header files in C/assembly/... code. I suppose if we document that, then there would be an argument for documenting this. ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines 2013-02-15 8:43 ` Hiroshi Doyu (?) @ 2013-02-17 22:20 ` Simon Glass -1 siblings, 0 replies; 41+ messages in thread From: Simon Glass @ 2013-02-17 22:20 UTC (permalink / raw) To: Hiroshi Doyu Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, pdeschrijver-DDmLM1+adcrQT0dZR+AlfA, pgaikwad-DDmLM1+adcrQT0dZR+AlfA, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Hi Hiroshi, On Fri, Feb 15, 2013 at 12:43 AM, Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote: > Hi, > > With new dtc+cpp feature, we could get rid of magic numbers in dts* > files. This patch replaces CLK IDs. > > We also plan to share those DT header files with kernel source > later[1]. > > This series depends on: > [PATCH 0/9] ARM: tegra: use new dtc+cpp feature > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149613.html > > [5/6] and [6/6] depend on: > [PATCH v6 00/10] Tegra114 clockframework > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/148895.html > > v2: > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149816.html > > v1: > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149672.html > > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html > > > Hiroshi Doyu (6): > ARM: tegra20: create a DT header defining CLK IDs > ARM: tegra20: convert device tree files to use CLK defines > ARM: tegra30: create a DT header defining CLK IDs > ARM: tegra30: convert device tree files to use CLK defines > ARM: tegra114: create a DT header defining CLK IDs > ARM: tegra114: convert device tree files to use CLK defines I wonder what sort of error message do you get when you make a mistake in the .dts or one of the .dtsi includes? If cpp is handling the including, does dtc just see a single file, in which case are the line numbers printed with each error not much use? Or does dtc handle the #line directives? Just curious... Regards, Simon > > .../bindings/clock/nvidia,tegra114-car.txt | 261 +------------------ > .../bindings/clock/nvidia,tegra20-car.txt | 150 +---------- > .../bindings/clock/nvidia,tegra30-car.txt | 207 +-------------- > arch/arm/boot/dts/tegra114-car.h | 272 ++++++++++++++++++++ > arch/arm/boot/dts/tegra114.dtsip | 13 +- > arch/arm/boot/dts/tegra20-car.h | 158 ++++++++++++ > arch/arm/boot/dts/tegra20-paz00.dtsp | 2 +- > arch/arm/boot/dts/tegra20.dtsip | 85 +++--- > arch/arm/boot/dts/tegra30-car.h | 218 ++++++++++++++++ > arch/arm/boot/dts/tegra30.dtsip | 87 +++---- > 10 files changed, 746 insertions(+), 707 deletions(-) > create mode 100644 arch/arm/boot/dts/tegra114-car.h > create mode 100644 arch/arm/boot/dts/tegra20-car.h > create mode 100644 arch/arm/boot/dts/tegra30-car.h > > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-17 22:20 ` Simon Glass 0 siblings, 0 replies; 41+ messages in thread From: Simon Glass @ 2013-02-17 22:20 UTC (permalink / raw) To: linux-arm-kernel Hi Hiroshi, On Fri, Feb 15, 2013 at 12:43 AM, Hiroshi Doyu <hdoyu@nvidia.com> wrote: > Hi, > > With new dtc+cpp feature, we could get rid of magic numbers in dts* > files. This patch replaces CLK IDs. > > We also plan to share those DT header files with kernel source > later[1]. > > This series depends on: > [PATCH 0/9] ARM: tegra: use new dtc+cpp feature > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149613.html > > [5/6] and [6/6] depend on: > [PATCH v6 00/10] Tegra114 clockframework > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/148895.html > > v2: > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149816.html > > v1: > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149672.html > > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html > > > Hiroshi Doyu (6): > ARM: tegra20: create a DT header defining CLK IDs > ARM: tegra20: convert device tree files to use CLK defines > ARM: tegra30: create a DT header defining CLK IDs > ARM: tegra30: convert device tree files to use CLK defines > ARM: tegra114: create a DT header defining CLK IDs > ARM: tegra114: convert device tree files to use CLK defines I wonder what sort of error message do you get when you make a mistake in the .dts or one of the .dtsi includes? If cpp is handling the including, does dtc just see a single file, in which case are the line numbers printed with each error not much use? Or does dtc handle the #line directives? Just curious... Regards, Simon > > .../bindings/clock/nvidia,tegra114-car.txt | 261 +------------------ > .../bindings/clock/nvidia,tegra20-car.txt | 150 +---------- > .../bindings/clock/nvidia,tegra30-car.txt | 207 +-------------- > arch/arm/boot/dts/tegra114-car.h | 272 ++++++++++++++++++++ > arch/arm/boot/dts/tegra114.dtsip | 13 +- > arch/arm/boot/dts/tegra20-car.h | 158 ++++++++++++ > arch/arm/boot/dts/tegra20-paz00.dtsp | 2 +- > arch/arm/boot/dts/tegra20.dtsip | 85 +++--- > arch/arm/boot/dts/tegra30-car.h | 218 ++++++++++++++++ > arch/arm/boot/dts/tegra30.dtsip | 87 +++---- > 10 files changed, 746 insertions(+), 707 deletions(-) > create mode 100644 arch/arm/boot/dts/tegra114-car.h > create mode 100644 arch/arm/boot/dts/tegra20-car.h > create mode 100644 arch/arm/boot/dts/tegra30-car.h > > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-17 22:20 ` Simon Glass 0 siblings, 0 replies; 41+ messages in thread From: Simon Glass @ 2013-02-17 22:20 UTC (permalink / raw) To: Hiroshi Doyu Cc: linux-tegra, pdeschrijver, pgaikwad, Grant Likely, Rob Herring, Rob Landley, Stephen Warren, Russell King, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel Hi Hiroshi, On Fri, Feb 15, 2013 at 12:43 AM, Hiroshi Doyu <hdoyu@nvidia.com> wrote: > Hi, > > With new dtc+cpp feature, we could get rid of magic numbers in dts* > files. This patch replaces CLK IDs. > > We also plan to share those DT header files with kernel source > later[1]. > > This series depends on: > [PATCH 0/9] ARM: tegra: use new dtc+cpp feature > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149613.html > > [5/6] and [6/6] depend on: > [PATCH v6 00/10] Tegra114 clockframework > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/148895.html > > v2: > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149816.html > > v1: > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149672.html > > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149804.html > > > Hiroshi Doyu (6): > ARM: tegra20: create a DT header defining CLK IDs > ARM: tegra20: convert device tree files to use CLK defines > ARM: tegra30: create a DT header defining CLK IDs > ARM: tegra30: convert device tree files to use CLK defines > ARM: tegra114: create a DT header defining CLK IDs > ARM: tegra114: convert device tree files to use CLK defines I wonder what sort of error message do you get when you make a mistake in the .dts or one of the .dtsi includes? If cpp is handling the including, does dtc just see a single file, in which case are the line numbers printed with each error not much use? Or does dtc handle the #line directives? Just curious... Regards, Simon > > .../bindings/clock/nvidia,tegra114-car.txt | 261 +------------------ > .../bindings/clock/nvidia,tegra20-car.txt | 150 +---------- > .../bindings/clock/nvidia,tegra30-car.txt | 207 +-------------- > arch/arm/boot/dts/tegra114-car.h | 272 ++++++++++++++++++++ > arch/arm/boot/dts/tegra114.dtsip | 13 +- > arch/arm/boot/dts/tegra20-car.h | 158 ++++++++++++ > arch/arm/boot/dts/tegra20-paz00.dtsp | 2 +- > arch/arm/boot/dts/tegra20.dtsip | 85 +++--- > arch/arm/boot/dts/tegra30-car.h | 218 ++++++++++++++++ > arch/arm/boot/dts/tegra30.dtsip | 87 +++---- > 10 files changed, 746 insertions(+), 707 deletions(-) > create mode 100644 arch/arm/boot/dts/tegra114-car.h > create mode 100644 arch/arm/boot/dts/tegra20-car.h > create mode 100644 arch/arm/boot/dts/tegra30-car.h > > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [v3 0/6] ARM: tegra: convert device tree files to use CLK defines 2013-02-17 22:20 ` Simon Glass @ 2013-02-19 17:08 ` Stephen Warren -1 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-19 17:08 UTC (permalink / raw) To: Simon Glass Cc: Hiroshi Doyu, linux-tegra, pdeschrijver, pgaikwad, Grant Likely, Rob Herring, Rob Landley, Russell King, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel On 02/17/2013 03:20 PM, Simon Glass wrote: > Hi Hiroshi, > > On Fri, Feb 15, 2013 at 12:43 AM, Hiroshi Doyu <hdoyu@nvidia.com> wrote: >> Hi, >> >> With new dtc+cpp feature, we could get rid of magic numbers in dts* >> files. This patch replaces CLK IDs. ... > I wonder what sort of error message do you get when you make a mistake > in the .dts or one of the .dtsi includes? If cpp is handling the > including, does dtc just see a single file, It is. > in which case are the line > numbers printed with each error not much use? Or does dtc handle the > #line directives? cpp does generate #line directives, which dtc does know how to interpret, so this should all work just fine. IIRC, I did test out this aspect when adding #line support to dtc. ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 0/6] ARM: tegra: convert device tree files to use CLK defines @ 2013-02-19 17:08 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-02-19 17:08 UTC (permalink / raw) To: linux-arm-kernel On 02/17/2013 03:20 PM, Simon Glass wrote: > Hi Hiroshi, > > On Fri, Feb 15, 2013 at 12:43 AM, Hiroshi Doyu <hdoyu@nvidia.com> wrote: >> Hi, >> >> With new dtc+cpp feature, we could get rid of magic numbers in dts* >> files. This patch replaces CLK IDs. ... > I wonder what sort of error message do you get when you make a mistake > in the .dts or one of the .dtsi includes? If cpp is handling the > including, does dtc just see a single file, It is. > in which case are the line > numbers printed with each error not much use? Or does dtc handle the > #line directives? cpp does generate #line directives, which dtc does know how to interpret, so this should all work just fine. IIRC, I did test out this aspect when adding #line support to dtc. ^ permalink raw reply [flat|nested] 41+ messages in thread
* [v3 1/6] ARM: tegra20: create a DT header defining CLK IDs @ 2013-05-22 16:45 Hiroshi Doyu [not found] ` <1369241136-21903-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 41+ messages in thread From: Hiroshi Doyu @ 2013-05-22 16:45 UTC (permalink / raw) To: linux-tegra-u79uwXL29TY76Z2rM5mHXA Cc: mturquette-QSEj5FYQhm4dnm+yROfE0A, Hiroshi Doyu Create a header file to define the clock IDs used by the Tegra20 clock binding. Remove the list of definitions from the binding documentation, and refer the reader to the header file. This will allow the same header to be used by both device tree files, and drivers implementing this binding, which guarantees that the two stay in sync. This also makes device trees more readable by using names instead of magic numbers. Signed-off-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- .../bindings/clock/nvidia,tegra20-car.txt | 154 +------------------- include/dt-bindings/clk/tegra20-car.h | 158 +++++++++++++++++++++ 2 files changed, 162 insertions(+), 150 deletions(-) create mode 100644 include/dt-bindings/clk/tegra20-car.h diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt index e885680..e6b9986 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt @@ -12,155 +12,9 @@ Required properties : - clocks : Should contain phandle and clock specifiers for two clocks: the 32 KHz "32k_in", and the board-specific oscillator "osc". - #clock-cells : Should be 1. - In clock consumers, this cell represents the clock ID exposed by the CAR. - - The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 95 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 96 and - above. - - 0 cpu - 1 unassigned - 2 unassigned - 3 ac97 - 4 rtc - 5 tmr - 6 uart1 - 7 unassigned (register bit affects uart2 and vfir) - 8 gpio - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 twc - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 ide - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 unassigned - 31 cache2 - - 32 mem - 33 ahbdma - 34 apbdma - 35 unassigned - 36 kbc - 37 stat_mon - 38 pmc - 39 fuse - 40 kfuse - 41 sbc1 - 42 snor - 43 spi1 - 44 sbc2 - 45 xio - 46 sbc3 - 47 dvc - 48 dsi - 49 unassigned (register bit affects tvo and cve) - 50 mipi - 51 hdmi - 52 csi - 53 tvdac - 54 i2c2 - 55 uart3 - 56 unassigned - 57 emc - 58 usb2 - 59 usb3 - 60 mpe - 61 vde - 62 bsea - 63 bsev - - 64 speedo - 65 uart4 - 66 uart5 - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 pcie - 71 owr - 72 afi - 73 csite - 74 unassigned - 75 avpucq - 76 la - 77 unassigned - 78 unassigned - 79 unassigned - 80 unassigned - 81 unassigned - 82 unassigned - 83 unassigned - 84 irama - 85 iramb - 86 iramc - 87 iramd - 88 cram2 - 89 audio_2x a/k/a audio_2x_sync_clk - 90 clk_d - 91 unassigned - 92 sus - 93 cdev2 - 94 cdev1 - 95 unassigned - - 96 uart2 - 97 vfir - 98 spdif_in - 99 spdif_out - 100 vi - 101 vi_sensor - 102 tvo - 103 cve - 104 osc - 105 clk_32k a/k/a clk_s - 106 clk_m - 107 sclk - 108 cclk - 109 hclk - 110 pclk - 111 blink - 112 pll_a - 113 pll_a_out0 - 114 pll_c - 115 pll_c_out1 - 116 pll_d - 117 pll_d_out0 - 118 pll_e - 119 pll_m - 120 pll_m_out1 - 121 pll_p - 122 pll_p_out1 - 123 pll_p_out2 - 124 pll_p_out3 - 125 pll_p_out4 - 126 pll_s - 127 pll_u - 128 pll_x - 129 cop a/k/a avp - 130 audio a/k/a audio_sync_clk - 131 pll_ref - 132 twd + In clock consumers, this cell represents the clock ID exposed by the + CAR. The assignments may be found in header file + <dt-bindings/clk/tegra20-car.h>. Example SoC include file: @@ -172,7 +26,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA20_CLK_USB2>; }; }; diff --git a/include/dt-bindings/clk/tegra20-car.h b/include/dt-bindings/clk/tegra20-car.h new file mode 100644 index 0000000..e30b4bd --- /dev/null +++ b/include/dt-bindings/clk/tegra20-car.h @@ -0,0 +1,158 @@ +/* + * This header provides constants for binding nvidia,tegra20-car. + * + * The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB + * registers. These IDs often match those in the CAR's RST_DEVICES registers, + * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In + * this case, those clocks are assigned IDs above 95 in order to highlight + * this issue. Implementations that interpret these clock IDs as bit values + * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to + * explicitly handle these special cases. + * + * The balance of the clocks controlled by the CAR are assigned IDs of 96 and + * above. + */ + +#ifndef _DT_BINDINGS_CLK_TEGRA20_CAR_H +#define _DT_BINDINGS_CLK_TEGRA20_CAR_H + +#define TEGRA20_CLK_CPU 0 +/* 1 */ +/* 2 */ +#define TEGRA20_CLK_AC97 3 +#define TEGRA20_CLK_RTC 4 +#define TEGRA20_CLK_TIMER 5 +#define TEGRA20_CLK_UARTA 6 +/* 7 (register bit affects uart2 and vfir) */ +#define TEGRA20_CLK_GPIO 8 +#define TEGRA20_CLK_SDMMC2 9 +/* 10 (register bit affects spdif_in and spdif_out) */ +#define TEGRA20_CLK_I2S1 11 +#define TEGRA20_CLK_I2C1 12 +#define TEGRA20_CLK_NDFLASH 13 +#define TEGRA20_CLK_SDMMC1 14 +#define TEGRA20_CLK_SDMMC4 15 +#define TEGRA20_CLK_TWC 16 +#define TEGRA20_CLK_PWM 17 +#define TEGRA20_CLK_I2S2 18 +#define TEGRA20_CLK_EPP 19 +/* 20 (register bit affects vi and vi_sensor) */ +#define TEGRA20_CLK_GR2D 21 +#define TEGRA20_CLK_USBD 22 +#define TEGRA20_CLK_ISP 23 +#define TEGRA20_CLK_GR3D 24 +#define TEGRA20_CLK_IDE 25 +#define TEGRA20_CLK_DISP2 26 +#define TEGRA20_CLK_DISP1 27 +#define TEGRA20_CLK_HOST1X 28 +#define TEGRA20_CLK_VCP 29 +/* 30 */ +#define TEGRA20_CLK_CACHE2 31 + +#define TEGRA20_CLK_MEM 32 +#define TEGRA20_CLK_AHBDMA 33 +#define TEGRA20_CLK_APBDMA 34 +/* 35 */ +#define TEGRA20_CLK_KBC 36 +#define TEGRA20_CLK_STAT_MON 37 +#define TEGRA20_CLK_PMC 38 +#define TEGRA20_CLK_FUSE 39 +#define TEGRA20_CLK_KFUSE 40 +#define TEGRA20_CLK_SBC1 41 +#define TEGRA20_CLK_NOR 42 +#define TEGRA20_CLK_SPI 43 +#define TEGRA20_CLK_SBC2 44 +#define TEGRA20_CLK_XIO 45 +#define TEGRA20_CLK_SBC3 46 +#define TEGRA20_CLK_DVC 47 +#define TEGRA20_CLK_DSI 48 +/* 49 (register bit affects tvo and cve) */ +#define TEGRA20_CLK_MIPI 50 +#define TEGRA20_CLK_HDMI 51 +#define TEGRA20_CLK_CSI 52 +#define TEGRA20_CLK_TVDAC 53 +#define TEGRA20_CLK_I2C2 54 +#define TEGRA20_CLK_UARTC 55 +/* 56 */ +#define TEGRA20_CLK_EMC 57 +#define TEGRA20_CLK_USB2 58 +#define TEGRA20_CLK_USB3 59 +#define TEGRA20_CLK_MPE 60 +#define TEGRA20_CLK_VDE 61 +#define TEGRA20_CLK_BSEA 62 +#define TEGRA20_CLK_BSEV 63 + +#define TEGRA20_CLK_SPEEDO 64 +#define TEGRA20_CLK_UARTD 65 +#define TEGRA20_CLK_UARTE 66 +#define TEGRA20_CLK_I2C3 67 +#define TEGRA20_CLK_SBC4 68 +#define TEGRA20_CLK_SDMMC3 69 +#define TEGRA20_CLK_PEX 70 +#define TEGRA20_CLK_OWR 71 +#define TEGRA20_CLK_AFI 72 +#define TEGRA20_CLK_CSITE 73 +#define TEGRA20_CLK_PCIE_XCLK 74 +#define TEGRA20_CLK_AVPUCQ 75 +#define TEGRA20_CLK_LA 76 +/* 77 */ +/* 78 */ +/* 79 */ +/* 80 */ +/* 81 */ +/* 82 */ +/* 83 */ +#define TEGRA20_CLK_IRAMA 84 +#define TEGRA20_CLK_IRAMB 85 +#define TEGRA20_CLK_IRAMC 86 +#define TEGRA20_CLK_IRAMD 87 +#define TEGRA20_CLK_CRAM2 88 +#define TEGRA20_CLK_AUDIO_2X 89 /* a/k/a audio_2x_sync_clk */ +#define TEGRA20_CLK_CLK_D 90 +/* 91 */ +#define TEGRA20_CLK_CSUS 92 +#define TEGRA20_CLK_CDEV2 93 +#define TEGRA20_CLK_CDEV1 94 +/* 95 */ + +#define TEGRA20_CLK_UARTB 96 +#define TEGRA20_CLK_VFIR 97 +#define TEGRA20_CLK_SPDIF_IN 98 +#define TEGRA20_CLK_SPDIF_OUT 99 +#define TEGRA20_CLK_VI 100 +#define TEGRA20_CLK_VI_SENSOR 101 +#define TEGRA20_CLK_TVO 102 +#define TEGRA20_CLK_CVE 103 +#define TEGRA20_CLK_OSC 104 +#define TEGRA20_CLK_CLK_32K 105 /* a/k/a clk_s */ +#define TEGRA20_CLK_CLK_M 106 +#define TEGRA20_CLK_SCLK 107 +#define TEGRA20_CLK_CCLK 108 +#define TEGRA20_CLK_HCLK 109 +#define TEGRA20_CLK_PCLK 110 +#define TEGRA20_CLK_BLINK 111 +#define TEGRA20_CLK_PLL_A 112 +#define TEGRA20_CLK_PLL_A_OUT0 113 +#define TEGRA20_CLK_PLL_C 114 +#define TEGRA20_CLK_PLL_C_OUT1 115 +#define TEGRA20_CLK_PLL_D 116 +#define TEGRA20_CLK_PLL_D_OUT0 117 +#define TEGRA20_CLK_PLL_E 118 +#define TEGRA20_CLK_PLL_M 119 +#define TEGRA20_CLK_PLL_M_OUT1 120 +#define TEGRA20_CLK_PLL_P 121 +#define TEGRA20_CLK_PLL_P_OUT1 122 +#define TEGRA20_CLK_PLL_P_OUT2 123 +#define TEGRA20_CLK_PLL_P_OUT3 124 +#define TEGRA20_CLK_PLL_P_OUT4 125 +#define TEGRA20_CLK_PLL_S 126 +#define TEGRA20_CLK_PLL_U 127 + +#define TEGRA20_CLK_PLL_X 128 +#define TEGRA20_CLK_COP 129 /* a/k/a avp */ +#define TEGRA20_CLK_AUDIO 130 /* a/k/a audio_sync_clk */ +#define TEGRA20_CLK_PLL_REF 131 +#define TEGRA20_CLK_TWD 132 +#define TEGRA20_CLK_CLK_MAX 133 + +#endif /* _DT_BINDINGS_CLK_TEGRA20_CAR_H */ -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 41+ messages in thread
[parent not found: <1369241136-21903-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [v3 1/6] ARM: tegra20: create a DT header defining CLK IDs [not found] ` <1369241136-21903-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> @ 2013-05-22 21:16 ` Stephen Warren [not found] ` <519D35A7.5090102-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 0 siblings, 1 reply; 41+ messages in thread From: Stephen Warren @ 2013-05-22 21:16 UTC (permalink / raw) To: Hiroshi Doyu Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, mturquette-QSEj5FYQhm4dnm+yROfE0A On 05/22/2013 10:45 AM, Hiroshi Doyu wrote: > Create a header file to define the clock IDs used by the Tegra20 clock > binding. Remove the list of definitions from the binding documentation, > and refer the reader to the header file. > > This will allow the same header to be used by both device tree files, > and drivers implementing this binding, which guarantees that the two > stay in sync. This also makes device trees more readable by using names > instead of magic numbers. I have applied patches 1, 3, 5 to Tegra's for-3.11/deps-for-clk branch, merged that into Tegra's for-3.11/dt branch, and then applied patches 2, 4, 6 to Tegra's for-3.11/dt branch. Once you send the drivers/clk changes that build on top of this, I'll create a tag and send a pull request to Mike to pick up the headers so he can apply the clk changes. ^ permalink raw reply [flat|nested] 41+ messages in thread
[parent not found: <519D35A7.5090102-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [v3 1/6] ARM: tegra20: create a DT header defining CLK IDs [not found] ` <519D35A7.5090102-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2013-05-28 22:09 ` Stephen Warren 0 siblings, 0 replies; 41+ messages in thread From: Stephen Warren @ 2013-05-28 22:09 UTC (permalink / raw) To: Hiroshi Doyu Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, mturquette-QSEj5FYQhm4dnm+yROfE0A On 05/22/2013 03:16 PM, Stephen Warren wrote: > On 05/22/2013 10:45 AM, Hiroshi Doyu wrote: >> Create a header file to define the clock IDs used by the Tegra20 clock >> binding. Remove the list of definitions from the binding documentation, >> and refer the reader to the header file. >> >> This will allow the same header to be used by both device tree files, >> and drivers implementing this binding, which guarantees that the two >> stay in sync. This also makes device trees more readable by using names >> instead of magic numbers. > > I have applied patches 1, 3, 5 to Tegra's for-3.11/deps-for-clk branch, > merged that into Tegra's for-3.11/dt branch, and then applied patches 2, > 4, 6 to Tegra's for-3.11/dt branch. Oops. I actually forgot to apply patches 2, 4, 6 before. I just applied them. I noticed one issue: The new headers were added to <dt-bindings/clk/>. However, some other similar files have since shown up in <dt-bindings/clock/>. Since the latter location better matches the path-names of the DT bindings themselves, I moved the header files while applying the patches, and fixed up the usage. > Once you send the drivers/clk changes that build on top of this, I'll > create a tag and send a pull request to Mike to pick up the headers so > he can apply the clk changes. ^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2013-05-28 22:09 UTC | newest] Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-02-15 8:43 [v3 0/6] ARM: tegra: convert device tree files to use CLK defines Hiroshi Doyu 2013-02-15 8:43 ` Hiroshi Doyu 2013-02-15 8:43 ` Hiroshi Doyu 2013-02-15 8:43 ` [v3 1/6] ARM: tegra20: create a DT header defining CLK IDs Hiroshi Doyu 2013-02-15 8:43 ` Hiroshi Doyu 2013-02-15 8:43 ` [v3 3/6] ARM: tegra30: " Hiroshi Doyu 2013-02-15 8:43 ` Hiroshi Doyu 2013-02-15 8:43 ` [v3 5/6] ARM: tegra114: " Hiroshi Doyu 2013-02-15 8:43 ` Hiroshi Doyu [not found] ` <1360917814-27236-6-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2013-02-15 16:43 ` Stephen Warren 2013-02-15 16:43 ` Stephen Warren 2013-02-15 16:43 ` Stephen Warren 2013-02-15 8:43 ` [v3 6/6] ARM: tegra114: convert device tree files to use CLK defines Hiroshi Doyu 2013-02-15 8:43 ` Hiroshi Doyu [not found] ` <1360917814-27236-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2013-02-15 8:43 ` [v3 2/6] ARM: tegra20: " Hiroshi Doyu 2013-02-15 8:43 ` Hiroshi Doyu [not found] ` <1360917814-27236-3-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2013-02-15 16:41 ` Stephen Warren 2013-02-15 16:41 ` Stephen Warren 2013-02-15 16:41 ` Stephen Warren 2013-02-15 8:43 ` [v3 4/6] ARM: tegra30: " Hiroshi Doyu 2013-02-15 8:43 ` Hiroshi Doyu 2013-02-17 22:05 ` [v3 0/6] ARM: tegra: " Rob Landley 2013-02-17 22:05 ` Rob Landley 2013-02-17 22:05 ` Rob Landley 2013-02-19 17:10 ` Stephen Warren 2013-02-19 17:10 ` Stephen Warren 2013-02-19 17:10 ` Stephen Warren [not found] ` <5123B1F8.4040102-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-02-23 19:51 ` Rob Landley 2013-02-23 19:51 ` Rob Landley 2013-02-23 19:51 ` Rob Landley 2013-02-23 23:52 ` Stephen Warren 2013-02-23 23:52 ` Stephen Warren 2013-02-23 23:52 ` Stephen Warren 2013-02-17 22:20 ` Simon Glass 2013-02-17 22:20 ` Simon Glass 2013-02-17 22:20 ` Simon Glass 2013-02-19 17:08 ` Stephen Warren 2013-02-19 17:08 ` Stephen Warren 2013-05-22 16:45 [v3 1/6] ARM: tegra20: create a DT header defining CLK IDs Hiroshi Doyu [not found] ` <1369241136-21903-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2013-05-22 21:16 ` Stephen Warren [not found] ` <519D35A7.5090102-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-05-28 22:09 ` Stephen Warren
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.