linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add support of Temperature sensor Clock for G12 SoC
@ 2019-04-12 10:02 Guillaume La Roque
  2019-04-12 10:02 ` [PATCH v3 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID Guillaume La Roque
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Guillaume La Roque @ 2019-04-12 10:02 UTC (permalink / raw)
  To: jbrunet, narmstrong, khilman, linux-amlogic, linux-clk,
	linux-arm-kernel, linux-kernel, devicetree

This patch series add support of Clock for temperature sensor
on Amlogic G12a SoC.

Guillaume

cahnges sinve v2:
- rebase on good branch

changes since v1:
- fix .width value

Guillaume La Roque (2):
  dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID
  clk: meson-g12a: Add Temperature Sensor clock

 drivers/clk/meson/g12a.c              | 31 +++++++++++++++++++++++++++
 drivers/clk/meson/g12a.h              |  3 ++-
 include/dt-bindings/clock/g12a-clkc.h |  1 +
 3 files changed, 34 insertions(+), 1 deletion(-)

-- 
2.17.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID
  2019-04-12 10:02 [PATCH v3 0/2] Add support of Temperature sensor Clock for G12 SoC Guillaume La Roque
@ 2019-04-12 10:02 ` Guillaume La Roque
  2019-04-13 11:41   ` Martin Blumenstingl
  2019-04-26 21:45   ` Rob Herring
  2019-04-12 10:02 ` [PATCH v3 2/2] clk: meson-g12a: Add Temperature Sensor clock Guillaume La Roque
  2019-06-11 12:32 ` [PATCH v3 0/2] Add support of Temperature sensor Clock for G12 SoC Jerome Brunet
  2 siblings, 2 replies; 7+ messages in thread
From: Guillaume La Roque @ 2019-04-12 10:02 UTC (permalink / raw)
  To: jbrunet, narmstrong, khilman, linux-amlogic, linux-clk,
	linux-arm-kernel, linux-kernel, devicetree

Add clock id used by temperature sensor for G12A Socs

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
---
 include/dt-bindings/clock/g12a-clkc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/dt-bindings/clock/g12a-clkc.h b/include/dt-bindings/clock/g12a-clkc.h
index 82c9e0c020b2..cfda463091b7 100644
--- a/include/dt-bindings/clock/g12a-clkc.h
+++ b/include/dt-bindings/clock/g12a-clkc.h
@@ -136,5 +136,6 @@
 #define CLKID_VDEC_1				204
 #define CLKID_VDEC_HEVC				207
 #define CLKID_VDEC_HEVCF			210
+#define CLKID_TS				212
 
 #endif /* __G12A_CLKC_H */
-- 
2.17.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 2/2] clk: meson-g12a: Add Temperature Sensor clock
  2019-04-12 10:02 [PATCH v3 0/2] Add support of Temperature sensor Clock for G12 SoC Guillaume La Roque
  2019-04-12 10:02 ` [PATCH v3 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID Guillaume La Roque
@ 2019-04-12 10:02 ` Guillaume La Roque
  2019-04-13 11:43   ` Martin Blumenstingl
  2019-06-11 12:32 ` [PATCH v3 0/2] Add support of Temperature sensor Clock for G12 SoC Jerome Brunet
  2 siblings, 1 reply; 7+ messages in thread
From: Guillaume La Roque @ 2019-04-12 10:02 UTC (permalink / raw)
  To: jbrunet, narmstrong, khilman, linux-amlogic, linux-clk,
	linux-arm-kernel, linux-kernel, devicetree

Add TS clock used by two temperature sensor

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
---
 drivers/clk/meson/g12a.c | 31 +++++++++++++++++++++++++++++++
 drivers/clk/meson/g12a.h |  3 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index 86a7c1b5bd42..0a1cf782670b 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -2480,6 +2480,33 @@ static struct clk_regmap g12a_mali = {
 	},
 };
 
+static struct clk_regmap g12a_ts_div = {
+	.data = &(struct clk_regmap_div_data){
+		.offset = HHI_TS_CLK_CNTL,
+		.shift = 0,
+		.width = 8,
+	},
+	.hw.init = &(struct clk_init_data){
+		.name = "ts_div",
+		.ops = &clk_regmap_divider_ro_ops,
+		.parent_names = (const char *[]){ "xtal" },
+		.num_parents = 1,
+	},
+};
+
+static struct clk_regmap g12a_ts = {
+	.data = &(struct clk_regmap_gate_data){
+		.offset = HHI_TS_CLK_CNTL,
+		.bit_idx = 8,
+	},
+	.hw.init = &(struct clk_init_data){
+		.name = "ts",
+		.ops = &clk_regmap_gate_ops,
+		.parent_names = (const char *[]){ "ts_div" },
+		.num_parents = 1,
+	},
+};
+
 /* Everything Else (EE) domain gates */
 static MESON_GATE(g12a_ddr,			HHI_GCLK_MPEG0,	0);
 static MESON_GATE(g12a_dos,			HHI_GCLK_MPEG0,	1);
@@ -2769,6 +2796,8 @@ static struct clk_hw_onecell_data g12a_hw_onecell_data = {
 		[CLKID_VDEC_HEVCF_SEL]		= &g12a_vdec_hevcf_sel.hw,
 		[CLKID_VDEC_HEVCF_DIV]		= &g12a_vdec_hevcf_div.hw,
 		[CLKID_VDEC_HEVCF]		= &g12a_vdec_hevcf.hw,
+		[CLKID_TS_DIV]			= &g12a_ts_div.hw,
+		[CLKID_TS]			= &g12a_ts.hw,
 		[NR_CLKS]			= NULL,
 	},
 	.num = NR_CLKS,
@@ -2966,6 +2995,8 @@ static struct clk_regmap *const g12a_clk_regmaps[] = {
 	&g12a_vdec_hevcf_sel,
 	&g12a_vdec_hevcf_div,
 	&g12a_vdec_hevcf,
+	&g12a_ts_div,
+	&g12a_ts,
 };
 
 static const struct meson_eeclkc_data g12a_clkc_data = {
diff --git a/drivers/clk/meson/g12a.h b/drivers/clk/meson/g12a.h
index 39c41af70804..877b8d205f12 100644
--- a/drivers/clk/meson/g12a.h
+++ b/drivers/clk/meson/g12a.h
@@ -195,8 +195,9 @@
 #define CLKID_VDEC_HEVC_DIV			206
 #define CLKID_VDEC_HEVCF_SEL			208
 #define CLKID_VDEC_HEVCF_DIV			209
+#define CLKID_TS_DIV				211
 
-#define NR_CLKS					211
+#define NR_CLKS					213
 
 /* include the CLKIDs that have been made part of the DT binding */
 #include <dt-bindings/clock/g12a-clkc.h>
-- 
2.17.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID
  2019-04-12 10:02 ` [PATCH v3 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID Guillaume La Roque
@ 2019-04-13 11:41   ` Martin Blumenstingl
  2019-04-26 21:45   ` Rob Herring
  1 sibling, 0 replies; 7+ messages in thread
From: Martin Blumenstingl @ 2019-04-13 11:41 UTC (permalink / raw)
  To: Guillaume La Roque
  Cc: devicetree, Neil Armstrong, khilman, linux-kernel, linux-amlogic,
	linux-clk, linux-arm-kernel, jbrunet

On Fri, Apr 12, 2019 at 12:02 PM Guillaume La Roque
<glaroque@baylibre.com> wrote:
>
> Add clock id used by temperature sensor for G12A Socs
nit-pick if you have to re-send if for some reason: "used by the
temperature sensors for G12A SoCs" (because as far as I know the two
temperature sensors share this clock)

> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Reviewed-by: Martin Blumenstingl<martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 2/2] clk: meson-g12a: Add Temperature Sensor clock
  2019-04-12 10:02 ` [PATCH v3 2/2] clk: meson-g12a: Add Temperature Sensor clock Guillaume La Roque
@ 2019-04-13 11:43   ` Martin Blumenstingl
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Blumenstingl @ 2019-04-13 11:43 UTC (permalink / raw)
  To: Guillaume La Roque
  Cc: devicetree, Neil Armstrong, khilman, linux-kernel, linux-amlogic,
	linux-clk, linux-arm-kernel, jbrunet

On Fri, Apr 12, 2019 at 12:03 PM Guillaume La Roque
<glaroque@baylibre.com> wrote:
>
> Add TS clock used by two temperature sensor
>
> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Reviewed-by: Martin Blumenstingl<martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID
  2019-04-12 10:02 ` [PATCH v3 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID Guillaume La Roque
  2019-04-13 11:41   ` Martin Blumenstingl
@ 2019-04-26 21:45   ` Rob Herring
  1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2019-04-26 21:45 UTC (permalink / raw)
  To: Guillaume La Roque
  Cc: devicetree, narmstrong, khilman, linux-kernel, linux-amlogic,
	linux-clk, linux-arm-kernel, jbrunet

On Fri, Apr 12, 2019 at 12:02:20PM +0200, Guillaume La Roque wrote:
> Add clock id used by temperature sensor for G12A Socs
> 
> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> ---
>  include/dt-bindings/clock/g12a-clkc.h | 1 +
>  1 file changed, 1 insertion(+)

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 0/2] Add support of Temperature sensor Clock for G12 SoC
  2019-04-12 10:02 [PATCH v3 0/2] Add support of Temperature sensor Clock for G12 SoC Guillaume La Roque
  2019-04-12 10:02 ` [PATCH v3 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID Guillaume La Roque
  2019-04-12 10:02 ` [PATCH v3 2/2] clk: meson-g12a: Add Temperature Sensor clock Guillaume La Roque
@ 2019-06-11 12:32 ` Jerome Brunet
  2 siblings, 0 replies; 7+ messages in thread
From: Jerome Brunet @ 2019-06-11 12:32 UTC (permalink / raw)
  To: Guillaume La Roque, narmstrong, khilman, linux-amlogic,
	linux-clk, linux-arm-kernel, linux-kernel, devicetree

On Fri, 2019-04-12 at 12:02 +0200, Guillaume La Roque wrote:
> This patch series add support of Clock for temperature sensor
> on Amlogic G12a SoC.
> 
> Guillaume
> 
> cahnges sinve v2:
> - rebase on good branch
> 
> changes since v1:
> - fix .width value
> 
> Guillaume La Roque (2):
>   dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID
>   clk: meson-g12a: Add Temperature Sensor clock
> 
>  drivers/clk/meson/g12a.c              | 31 +++++++++++++++++++++++++++
>  drivers/clk/meson/g12a.h              |  3 ++-
>  include/dt-bindings/clock/g12a-clkc.h |  1 +
>  3 files changed, 34 insertions(+), 1 deletion(-)
> 

Fixed the commit messages as suggested by Martin and applied
Thx


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-11 12:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12 10:02 [PATCH v3 0/2] Add support of Temperature sensor Clock for G12 SoC Guillaume La Roque
2019-04-12 10:02 ` [PATCH v3 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID Guillaume La Roque
2019-04-13 11:41   ` Martin Blumenstingl
2019-04-26 21:45   ` Rob Herring
2019-04-12 10:02 ` [PATCH v3 2/2] clk: meson-g12a: Add Temperature Sensor clock Guillaume La Roque
2019-04-13 11:43   ` Martin Blumenstingl
2019-06-11 12:32 ` [PATCH v3 0/2] Add support of Temperature sensor Clock for G12 SoC Jerome Brunet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).