Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v5 00/16] Allwinner A100 Initial support
@ 2020-07-24  6:52 Frank Lee
  2020-07-24  7:10 ` [PATCH v5 07/16] dt-bindings: thermal: sun8i: Add binding for A100's THS controller Frank Lee
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Frank Lee @ 2020-07-24  6:52 UTC (permalink / raw)
  To: robh+dt, mripard, wens, mturquette, sboyd, gregory.clement, tglx,
	jason, maz, srinivas.kandagatla, linus.walleij, anarsoul,
	tiny.windzz, rui.zhang, daniel.lezcano, amit.kucheria, lee.jones,
	p.zabel, icenowy, megous, clabbe, bage, devicetree
  Cc: linux-arm-kernel, linux-kernel, linux-clk, linux-i2c, linux-gpio,
	linux-pm, Frank Lee

This patch set adds initial support for allwinner a100 soc,
which is a 64-bit tablet chip.

v5:
-Drop redundant SOB for thermal series patch
-Trival a100 dtsi fix

v4:
-Drop "dt-bindings: pinctrl: sunxi: make gpio banks supplies required"
-Fix dcdc1 regulator name
-Get rid of underscore in dts node name
-Some trivial things in yaml files

v3:
-Add pmu and nmi support
-Add read data mask for calibration
-Code style
-Some trivial things in yaml files

v2:
-Some naming consistency
-Repair email address
-Fix mmc clock
-Don't export system clock
-Fix checkpatch warning
-Drop unneeded pin function, convert to jtag_gpu and i2s_x

Yangtao Li (16):
  dt-bindings: clk: sunxi-ccu: add compatible string for A100 CCU and
    R-CCU
  clk: sunxi-ng: add support for the Allwinner A100 CCU
  dt-bindings: pinctrl: sunxi: Get rid of continual nesting
  dt-bindings: pinctrl: sunxi: Add A100 pinctrl bindings
  pinctrl: sunxi: add support for the Allwinner A100 pin controller
  dt-bindings: nvmem: SID: add binding for A100's SID controller
  dt-bindings: thermal: sun8i: Add binding for A100's THS controller
  thermal: sun8i: add TEMP_CALIB_MASK for calibration data in
    sun50i_h6_ths_calibrate
  thermal: sun8i: Add A100's THS controller support
  mfd: axp20x: Allow the AXP803 to be probed by I2C
  dt-bindings: irq: sun7i-nmi: fix dt-binding for a80 nmi
  dt-bindings: irq: sun7i-nmi: Add binding for A100's NMI controller
  dt-bindings: i2c: mv64xxx: Add compatible for the A100 i2c node.
  arm64: allwinner: A100: add the basical Allwinner A100 DTSI file
  dt-bindings: arm: sunxi: Add Allwinner A100 Perf1 Board bindings
  arm64: allwinner: A100: add support for Allwinner Perf1 board

 .../devicetree/bindings/arm/sunxi.yaml        |    5 +
 .../clock/allwinner,sun4i-a10-ccu.yaml        |    7 +-
 .../bindings/i2c/marvell,mv64xxx-i2c.yaml     |    3 +
 .../allwinner,sun7i-a20-sc-nmi.yaml           |    5 +-
 .../nvmem/allwinner,sun4i-a10-sid.yaml        |   19 +-
 .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml  |  139 +-
 .../thermal/allwinner,sun8i-a83t-ths.yaml     |    6 +-
 arch/arm64/boot/dts/allwinner/Makefile        |    1 +
 .../allwinner/sun50i-a100-allwinner-perf1.dts |  180 +++
 .../arm64/boot/dts/allwinner/sun50i-a100.dtsi |  364 +++++
 drivers/clk/sunxi-ng/Kconfig                  |   10 +
 drivers/clk/sunxi-ng/Makefile                 |    2 +
 drivers/clk/sunxi-ng/ccu-sun50i-a100-r.c      |  214 +++
 drivers/clk/sunxi-ng/ccu-sun50i-a100-r.h      |   21 +
 drivers/clk/sunxi-ng/ccu-sun50i-a100.c        | 1276 +++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun50i-a100.h        |   56 +
 drivers/mfd/axp20x-i2c.c                      |    2 +
 drivers/pinctrl/sunxi/Kconfig                 |   10 +
 drivers/pinctrl/sunxi/Makefile                |    2 +
 drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c |  105 ++
 drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c   |  708 +++++++++
 drivers/thermal/sun8i_thermal.c               |   16 +-
 include/dt-bindings/clock/sun50i-a100-ccu.h   |  116 ++
 include/dt-bindings/clock/sun50i-a100-r-ccu.h |   23 +
 include/dt-bindings/reset/sun50i-a100-ccu.h   |   68 +
 include/dt-bindings/reset/sun50i-a100-r-ccu.h |   18 +
 26 files changed, 3308 insertions(+), 68 deletions(-)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun50i-a100-r.c
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun50i-a100-r.h
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun50i-a100.c
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun50i-a100.h
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c
 create mode 100644 include/dt-bindings/clock/sun50i-a100-ccu.h
 create mode 100644 include/dt-bindings/clock/sun50i-a100-r-ccu.h
 create mode 100644 include/dt-bindings/reset/sun50i-a100-ccu.h
 create mode 100644 include/dt-bindings/reset/sun50i-a100-r-ccu.h

-- 
2.24.0


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

* [PATCH v5 07/16] dt-bindings: thermal: sun8i: Add binding for A100's THS controller
  2020-07-24  6:52 [PATCH v5 00/16] Allwinner A100 Initial support Frank Lee
@ 2020-07-24  7:10 ` Frank Lee
  2020-07-24  7:11 ` [PATCH v5 08/16] thermal: sun8i: add TEMP_CALIB_MASK for calibration data in sun50i_h6_ths_calibrate Frank Lee
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Frank Lee @ 2020-07-24  7:10 UTC (permalink / raw)
  To: anarsoul, tiny.windzz, rui.zhang, daniel.lezcano, amit.kucheria,
	robh+dt, mripard, wens, linux-pm
  Cc: devicetree, linux-arm-kernel, linux-kernel, huangshuosheng,
	liyong, Yangtao Li, Rob Herring

From: Yangtao Li <frank@allwinnertech.com>

Add a binding for A100's ths controller.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../bindings/thermal/allwinner,sun8i-a83t-ths.yaml          | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml
index 87369264feb9..9d40fc7ff6fd 100644
--- a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml
+++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml
@@ -17,6 +17,7 @@ properties:
       - allwinner,sun8i-h3-ths
       - allwinner,sun8i-r40-ths
       - allwinner,sun50i-a64-ths
+      - allwinner,sun50i-a100-ths
       - allwinner,sun50i-h5-ths
       - allwinner,sun50i-h6-ths
 
@@ -61,7 +62,9 @@ allOf:
       properties:
         compatible:
           contains:
-            const: allwinner,sun50i-h6-ths
+            enum:
+              - allwinner,sun50i-a100-ths
+              - allwinner,sun50i-h6-ths
 
     then:
       properties:
@@ -103,6 +106,7 @@ allOf:
               - const: allwinner,sun8i-h3-ths
               - const: allwinner,sun8i-r40-ths
               - const: allwinner,sun50i-a64-ths
+              - const: allwinner,sun50i-a100-ths
               - const: allwinner,sun50i-h5-ths
               - const: allwinner,sun50i-h6-ths
 
-- 
2.24.0


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

* [PATCH v5 08/16] thermal: sun8i: add TEMP_CALIB_MASK for calibration data in sun50i_h6_ths_calibrate
  2020-07-24  6:52 [PATCH v5 00/16] Allwinner A100 Initial support Frank Lee
  2020-07-24  7:10 ` [PATCH v5 07/16] dt-bindings: thermal: sun8i: Add binding for A100's THS controller Frank Lee
@ 2020-07-24  7:11 ` Frank Lee
  2020-07-24  7:11 ` [PATCH v5 09/16] thermal: sun8i: Add A100's THS controller support Frank Lee
  2020-07-30  1:20 ` [PATCH v5 00/16] Allwinner A100 Initial support Frank Lee
  3 siblings, 0 replies; 5+ messages in thread
From: Frank Lee @ 2020-07-24  7:11 UTC (permalink / raw)
  To: anarsoul, tiny.windzz, rui.zhang, daniel.lezcano, amit.kucheria,
	robh+dt, mripard, wens, linux-pm
  Cc: devicetree, linux-arm-kernel, linux-kernel, huangshuosheng,
	liyong, Yangtao Li

From: Yangtao Li <frank@allwinnertech.com>

For sun50i_h6_ths_calibrate(), the data read from nvmem needs a round of
calculation. On the other hand, the newer SOC may store other data in
the space other than 12bit sensor data. Add mask operation to read data
to avoid conversion error.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 drivers/thermal/sun8i_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 74d73be16496..f423d44b9290 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -244,7 +244,7 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev,
 	ft_temp = (caldata[0] & FT_TEMP_MASK) * 100;
 
 	for (i = 0; i < tmdev->chip->sensor_num; i++) {
-		int sensor_reg = caldata[i + 1];
+		int sensor_reg = caldata[i + 1] & TEMP_CALIB_MASK;
 		int cdata, offset;
 		int sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg);
 
-- 
2.24.0


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

* [PATCH v5 09/16] thermal: sun8i: Add A100's THS controller support
  2020-07-24  6:52 [PATCH v5 00/16] Allwinner A100 Initial support Frank Lee
  2020-07-24  7:10 ` [PATCH v5 07/16] dt-bindings: thermal: sun8i: Add binding for A100's THS controller Frank Lee
  2020-07-24  7:11 ` [PATCH v5 08/16] thermal: sun8i: add TEMP_CALIB_MASK for calibration data in sun50i_h6_ths_calibrate Frank Lee
@ 2020-07-24  7:11 ` Frank Lee
  2020-07-30  1:20 ` [PATCH v5 00/16] Allwinner A100 Initial support Frank Lee
  3 siblings, 0 replies; 5+ messages in thread
From: Frank Lee @ 2020-07-24  7:11 UTC (permalink / raw)
  To: anarsoul, tiny.windzz, rui.zhang, daniel.lezcano, amit.kucheria,
	robh+dt, mripard, wens, linux-pm
  Cc: devicetree, linux-arm-kernel, linux-kernel, huangshuosheng,
	liyong, Yangtao Li

From: Yangtao Li <frank@allwinnertech.com>

This patch add thermal sensor controller support for A100,
which is similar to the previous ones.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 drivers/thermal/sun8i_thermal.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index f423d44b9290..f8b13071a6f4 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -590,6 +590,19 @@ static const struct ths_thermal_chip sun50i_a64_ths = {
 	.calc_temp = sun8i_ths_calc_temp,
 };
 
+static const struct ths_thermal_chip sun50i_a100_ths = {
+	.sensor_num = 3,
+	.has_bus_clk_reset = true,
+	.ft_deviation = 8000,
+	.offset = 187744,
+	.scale = 672,
+	.temp_data_base = SUN50I_H6_THS_TEMP_DATA,
+	.calibrate = sun50i_h6_ths_calibrate,
+	.init = sun50i_h6_thermal_init,
+	.irq_ack = sun50i_h6_irq_ack,
+	.calc_temp = sun8i_ths_calc_temp,
+};
+
 static const struct ths_thermal_chip sun50i_h5_ths = {
 	.sensor_num = 2,
 	.has_mod_clk = true,
@@ -619,6 +632,7 @@ static const struct of_device_id of_ths_match[] = {
 	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
 	{ .compatible = "allwinner,sun8i-r40-ths", .data = &sun8i_r40_ths },
 	{ .compatible = "allwinner,sun50i-a64-ths", .data = &sun50i_a64_ths },
+	{ .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths },
 	{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
 	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
 	{ /* sentinel */ },
-- 
2.24.0


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

* Re: [PATCH v5 00/16] Allwinner A100 Initial support
  2020-07-24  6:52 [PATCH v5 00/16] Allwinner A100 Initial support Frank Lee
                   ` (2 preceding siblings ...)
  2020-07-24  7:11 ` [PATCH v5 09/16] thermal: sun8i: Add A100's THS controller support Frank Lee
@ 2020-07-30  1:20 ` Frank Lee
  3 siblings, 0 replies; 5+ messages in thread
From: Frank Lee @ 2020-07-30  1:20 UTC (permalink / raw)
  To: Frank Lee
  Cc: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Michael Turquette,
	Stephen Boyd, gregory.clement, Thomas Gleixner, jason,
	Marc Zyngier, Srini Kandagatla, Linus Walleij, Vasily Khoruzhick,
	Zhang Rui, Daniel Lezcano, Amit Kucheria, Lee Jones, p.zabel,
	Icenowy Zheng, Ondřej Jirman, clabbe, bage, devicetree,
	Linux ARM, Linux Kernel Mailing List, linux-clk, linux-i2c,
	linux-gpio, Linux PM

HI Maxime,

Any comments on thermal and other patches?
I hope these patches can be integrated into the mainline as soon as possible.

Thx,
Yangtao

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24  6:52 [PATCH v5 00/16] Allwinner A100 Initial support Frank Lee
2020-07-24  7:10 ` [PATCH v5 07/16] dt-bindings: thermal: sun8i: Add binding for A100's THS controller Frank Lee
2020-07-24  7:11 ` [PATCH v5 08/16] thermal: sun8i: add TEMP_CALIB_MASK for calibration data in sun50i_h6_ths_calibrate Frank Lee
2020-07-24  7:11 ` [PATCH v5 09/16] thermal: sun8i: Add A100's THS controller support Frank Lee
2020-07-30  1:20 ` [PATCH v5 00/16] Allwinner A100 Initial support Frank Lee

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org
	public-inbox-index linux-pm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git