Skip to contentSkip to conversation

fix the TSHUT issue on rockchip thermal

PATCH Superseded Caesar Wang 3 participants 5 messages Oct 22, 2015

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover fix the TSHUT issue on rockchip thermal

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(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/2 dt-bindings: Add the "init" pinctrl in this document

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.

---

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(-)
Documentation/devicetree/bindings/thermal/rockchip-thermal.txt +3 -2
index ef802de..28e84f7 100644
@@ -27,8 +27,9 @@ tsadc: tsadc at 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>;
Signature · 1 line
1.9.1
#4 lore raw

PATCH v2 2/2 ARM: dts: rockchip: Add the OTP gpio pinctrl

In reply to Caesar Wang

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/

---

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(-)
arch/arm/boot/dts/rk3288.dtsi +7 -2
index 906e938..6ea89aa 100644
@@ -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>;
 			};
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document

In reply to Caesar Wang
Quoted 23 lines · Caesar Wang

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.

Quoted 6 lines

---

Changes in v2:
- As the Rob comments, add the 'init' pinctrl more decription in document.

Where?

Quoted 28 lines

- 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(-)
Documentation/devicetree/bindings/thermal/rockchip-thermal.txt +3 -3
index ef802de..28e84f7 100644
@@ -27,8 +27,9 @@ tsadc: tsadc at 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

#3 lore raw

Re: [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document

? 2015?10?22? 09:34, Rob Herring ??:

Quoted 24 lines · Caesar Wang
Quoted 23 lines

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.

Quoted 7 lines
Quoted 6 lines

---

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.:-(

Quoted 33 lines
Quoted 27 lines

- 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(-)
Documentation/devicetree/bindings/thermal/rockchip-thermal.txt +3 -3
index ef802de..28e84f7 100644
@@ -27,8 +27,9 @@ tsadc: tsadc at 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>;
--
Quoted 2 lines

1.9.1

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

Signature · 2 lines
Thanks,
Caesar