linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fix the TSHUT issue on rockchip thermal
@ 2015-10-22  1:25 Caesar Wang
  2015-10-22  1:25 ` [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document Caesar Wang
  2015-10-22  1:25 ` [PATCH v2 2/2] ARM: dts: rockchip: Add the OTP gpio pinctrl Caesar Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Caesar Wang @ 2015-10-22  1:25 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Dmitry Torokhov, dianders, Eduardo Valentin, Caesar Wang,
	devicetree, linux-pm, Kumar Gala, linux-kernel, Ian Campbell,
	linux-rockchip, Rob Herring, linux-arm-kernel, Pawel Moll,
	Zhang Rui, Mark Rutland, Russell King

We need the OTP pin is gpio state before resetting the TSADC controller,
since the tshut polarity will generate a high signal.

Says:
The TSHUT temperature is setting more than 80 degree, the default
tshut polarity is HIGH.

If T > 80C, the OTP output the High Signal.
If T < 80C, the OTP output the Low Signal.

On the moment, the TSADC controller is reset, the tshut polarity will be
Low in a short period of time.

So:
If T < 80C, the OTP output the High Signal.
If T > 80C, the OTP output the Low Signal.

In some cases, the OTP pin is connected to the PMIC, maybe the PMIC can
accept the reset response time to avoid this issue.

In other words, the system will be always reboot if we make the OTP pin
is connected the others IC to control the power.

This series patchs are depend on Doug's patch.(https://patchwork.kernel.org/patch/7454311/)

This series patchs are based on the Linus master branch.

518cd44 ARM: dts: rockchip: Add the OTP gpio pinctrl
83e0bab dt-bindings: Add the "init" pinctrl in this document
150426c drivers/pinctrl: Add the concept of an "init" state
ce1fad2 Merge branch 'keys-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
1099f86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
911b79c KEYS: Don't permit request_key() to construct a new keyring
37850e3 net: bcmgenet: Fix early link interrupt enabling
afc050d Merge tag 'wireless-drivers-for-davem-2015-10-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
e277de5 tunnels: Don't require remote endpoint or ID during creation.
740dbc2 openvswitch: Scrub skb between namespaces
....

Tested on box board.


Changes in v2:
  - As the Rob comments, add the 'init' pinctrl more decription in document.
  - fix the subject to make more obvious in PATCH[1/2]
Series-changes: 1
  - As the Doug comments, add the 'init' property to sync document.
  - Add some commits for more obvious in PATCH[2/2]

Changes in v1:
  - As the Doug comments, drop the thermal driver patchs since
    we can with pinctrl changing to work.
  - As the Doug's patch to add the 'init' property.

Caesar Wang (2):
  dt-bindings: Add the "init" pinctrl in this document
  ARM: dts: rockchip: Add the OTP gpio pinctrl

 Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 5 +++--
 arch/arm/boot/dts/rk3288.dtsi                                  | 9 +++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

-- 
1.9.1


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

* [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document
  2015-10-22  1:25 [PATCH v2 0/2] fix the TSHUT issue on rockchip thermal Caesar Wang
@ 2015-10-22  1:25 ` Caesar Wang
  2015-10-22  1:34   ` Rob Herring
  2015-10-22  1:25 ` [PATCH v2 2/2] ARM: dts: rockchip: Add the OTP gpio pinctrl Caesar Wang
  1 sibling, 1 reply; 5+ messages in thread
From: Caesar Wang @ 2015-10-22  1:25 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Dmitry Torokhov, dianders, Eduardo Valentin, Caesar Wang,
	devicetree, linux-pm, Kumar Gala, linux-kernel, Ian Campbell,
	linux-rockchip, Rob Herring, linux-arm-kernel, Pawel Moll,
	Zhang Rui, Mark Rutland

The "init" pinctrl is defined we'll set
pinctrl to this state before probe and then "default" after probe.

Add the "init" pinctrl as the OTP gpio state, since we need switch
the pin to gpio state before the TSADC controller is reset.

As I know, the TSADC controller is reset, the tshut polarity will be
a *low* signal in a short period of time for some devices.

Says:
The TSADC get the temperature on rockchip thermal.

If T(current temperature) < (setting temperature), the OTP output the
*high* signal.
If T(current temperature) > (setting temperature), the OTP output the
*low* Signal.

In some cases, the OTP pin is connected to the PMIC, maybe the
PMIC can accept the reset response time to avoid this issue.

In other words, the system will be always reboot if we make the
OTP pin is connected the others IC to control the power.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v2:
  - As the Rob comments, add the 'init' pinctrl more decription in document.
  - fix the subject to make more obvious in PATCH[1/2]
Series-changes: 1
  - As the Doug comments, add the 'init' property to sync document.

Changes in v1: None

 Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
index ef802de..28e84f7 100644
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
@@ -27,8 +27,9 @@ tsadc: tsadc@ff280000 {
 	clock-names = "tsadc", "apb_pclk";
 	resets = <&cru SRST_TSADC>;
 	reset-names = "tsadc-apb";
-	pinctrl-names = "default";
-	pinctrl-0 = <&otp_out>;
+	pinctrl-names = "init", "default";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
 	#thermal-sensor-cells = <1>;
 	rockchip,hw-tshut-temp = <95000>;
 	rockchip,hw-tshut-mode = <0>;
-- 
1.9.1


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

* [PATCH v2 2/2] ARM: dts: rockchip: Add the OTP gpio pinctrl
  2015-10-22  1:25 [PATCH v2 0/2] fix the TSHUT issue on rockchip thermal Caesar Wang
  2015-10-22  1:25 ` [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document Caesar Wang
@ 2015-10-22  1:25 ` Caesar Wang
  1 sibling, 0 replies; 5+ messages in thread
From: Caesar Wang @ 2015-10-22  1:25 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Dmitry Torokhov, dianders, Eduardo Valentin, Caesar Wang,
	Russell King, devicetree, Kumar Gala, linux-kernel, Ian Campbell,
	linux-rockchip, Rob Herring, Pawel Moll, Mark Rutland,
	linux-arm-kernel

Add the "init" pinctrl as the OTP gpio state.
We need the OTP pin is gpio state before resetting the TSADC controller,
since the tshut polarity will generate a high signal.

"init" pinctrl property is defined by Doug's Patch[0].

Patch[0]:
https://patchwork.kernel.org/patch/7454311/

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v2:
  - Add some commits for more obvious in PATCH[2/2]

Changes in v1:
  - As the Doug comments, drop the thermal driver patchs since
    we can with pinctrl changing to work.
  - As the Doug's patch to add the 'init' property.

 arch/arm/boot/dts/rk3288.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 906e938..6ea89aa 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -447,8 +447,9 @@
 		clock-names = "tsadc", "apb_pclk";
 		resets = <&cru SRST_TSADC>;
 		reset-names = "tsadc-apb";
-		pinctrl-names = "default";
-		pinctrl-0 = <&otp_out>;
+		pinctrl-names = "init", "default";
+		pinctrl-0 = <&otp_gpio>;
+		pinctrl-1 = <&otp_out>;
 		#thermal-sensor-cells = <1>;
 		rockchip,hw-tshut-temp = <95000>;
 		status = "disabled";
@@ -1273,6 +1274,10 @@
 		};
 
 		tsadc {
+			otp_gpio: otp-gpio {
+				rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
+			};
+
 			otp_out: otp-out {
 				rockchip,pins = <0 10 RK_FUNC_1 &pcfg_pull_none>;
 			};
-- 
1.9.1


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

* Re: [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document
  2015-10-22  1:25 ` [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document Caesar Wang
@ 2015-10-22  1:34   ` Rob Herring
  2015-10-22  1:46     ` Caesar Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2015-10-22  1:34 UTC (permalink / raw)
  To: Caesar Wang
  Cc: Heiko Stuebner, Dmitry Torokhov, Doug Anderson, Eduardo Valentin,
	devicetree, linux-pm, Kumar Gala, linux-kernel, Ian Campbell,
	linux-rockchip, linux-arm-kernel, Pawel Moll, Zhang Rui,
	Mark Rutland

On Wed, Oct 21, 2015 at 8:25 PM, Caesar Wang <wxt@rock-chips.com> wrote:
> The "init" pinctrl is defined we'll set
> pinctrl to this state before probe and then "default" after probe.
>
> Add the "init" pinctrl as the OTP gpio state, since we need switch
> the pin to gpio state before the TSADC controller is reset.
>
> As I know, the TSADC controller is reset, the tshut polarity will be
> a *low* signal in a short period of time for some devices.
>
> Says:
> The TSADC get the temperature on rockchip thermal.
>
> If T(current temperature) < (setting temperature), the OTP output the
> *high* signal.
> If T(current temperature) > (setting temperature), the OTP output the
> *low* Signal.
>
> In some cases, the OTP pin is connected to the PMIC, maybe the
> PMIC can accept the reset response time to avoid this issue.
>
> In other words, the system will be always reboot if we make the
> OTP pin is connected the others IC to control the power.
>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> ---
>
> Changes in v2:
>   - As the Rob comments, add the 'init' pinctrl more decription in document.

Where?

>   - fix the subject to make more obvious in PATCH[1/2]
> Series-changes: 1
>   - As the Doug comments, add the 'init' property to sync document.
>
> Changes in v1: None
>
>  Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
> index ef802de..28e84f7 100644
> --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
> @@ -27,8 +27,9 @@ tsadc: tsadc@ff280000 {
>         clock-names = "tsadc", "apb_pclk";
>         resets = <&cru SRST_TSADC>;
>         reset-names = "tsadc-apb";
> -       pinctrl-names = "default";
> -       pinctrl-0 = <&otp_out>;
> +       pinctrl-names = "init", "default";
> +       pinctrl-0 = <&otp_gpio>;
> +       pinctrl-1 = <&otp_out>;
>         #thermal-sensor-cells = <1>;
>         rockchip,hw-tshut-temp = <95000>;
>         rockchip,hw-tshut-mode = <0>;
> --
> 1.9.1
>

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

* Re: [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document
  2015-10-22  1:34   ` Rob Herring
@ 2015-10-22  1:46     ` Caesar Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Caesar Wang @ 2015-10-22  1:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: Caesar Wang, Mark Rutland, devicetree, Ian Campbell,
	Heiko Stuebner, Pawel Moll, linux-pm, Dmitry Torokhov,
	Doug Anderson, linux-kernel, Eduardo Valentin, linux-rockchip,
	Kumar Gala, Zhang Rui, linux-arm-kernel



在 2015年10月22日 09:34, Rob Herring 写道:
> On Wed, Oct 21, 2015 at 8:25 PM, Caesar Wang <wxt@rock-chips.com> wrote:
>> The "init" pinctrl is defined we'll set
>> pinctrl to this state before probe and then "default" after probe.
>>
>> Add the "init" pinctrl as the OTP gpio state, since we need switch
>> the pin to gpio state before the TSADC controller is reset.
>>
>> As I know, the TSADC controller is reset, the tshut polarity will be
>> a *low* signal in a short period of time for some devices.
>>
>> Says:
>> The TSADC get the temperature on rockchip thermal.
>>
>> If T(current temperature) < (setting temperature), the OTP output the
>> *high* signal.
>> If T(current temperature) > (setting temperature), the OTP output the
>> *low* Signal.
>>
>> In some cases, the OTP pin is connected to the PMIC, maybe the
>> PMIC can accept the reset response time to avoid this issue.
>>
>> In other words, the system will be always reboot if we make the
>> OTP pin is connected the others IC to control the power.
>>
>> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>> Reviewed-by: Douglas Anderson <dianders@chromium.org>
>> ---
>>
>> Changes in v2:
>>    - As the Rob comments, add the 'init' pinctrl more decription in document.
> Where?

Okay,  Mr, Rob
That strictly speaking only in commit.:-(


>
>>    - fix the subject to make more obvious in PATCH[1/2]
>> Series-changes: 1
>>    - As the Doug comments, add the 'init' property to sync document.
>>
>> Changes in v1: None
>>
>>   Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
>> index ef802de..28e84f7 100644
>> --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
>> +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
>> @@ -27,8 +27,9 @@ tsadc: tsadc@ff280000 {
>>          clock-names = "tsadc", "apb_pclk";
>>          resets = <&cru SRST_TSADC>;
>>          reset-names = "tsadc-apb";
>> -       pinctrl-names = "default";
>> -       pinctrl-0 = <&otp_out>;
>> +       pinctrl-names = "init", "default";
>> +       pinctrl-0 = <&otp_gpio>;
>> +       pinctrl-1 = <&otp_out>;
>>          #thermal-sensor-cells = <1>;
>>          rockchip,hw-tshut-temp = <95000>;
>>          rockchip,hw-tshut-mode = <0>;
>> --
>> 1.9.1
>>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip


-- 
Thanks,
Caesar


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

end of thread, other threads:[~2015-10-22  1:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-22  1:25 [PATCH v2 0/2] fix the TSHUT issue on rockchip thermal Caesar Wang
2015-10-22  1:25 ` [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document Caesar Wang
2015-10-22  1:34   ` Rob Herring
2015-10-22  1:46     ` Caesar Wang
2015-10-22  1:25 ` [PATCH v2 2/2] ARM: dts: rockchip: Add the OTP gpio pinctrl Caesar Wang

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).