Message ID | 1370330226-6030-1-git-send-email-shawn.guo@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Shawn, On 04/06/2013 09:17, Shawn Guo wrote: > Mark ocotp as a syscon node and add tempmon for imx6q thermal support. > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org> > --- > arch/arm/boot/dts/imx6qdl.dtsi | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi > index 9e8296e..13e1d7f 100644 > --- a/arch/arm/boot/dts/imx6qdl.dtsi > +++ b/arch/arm/boot/dts/imx6qdl.dtsi > @@ -489,6 +489,13 @@ > }; > }; > > + tempmon: tempmon { > + compatible = "fsl,imx6q-tempmon"; > + interrupts = <0 49 0x04>; > + fsl,tempmon = <&anatop>; > + fsl,tempmon-data = <&ocotp>; > + }; > + > usbphy1: usbphy@020c9000 { > compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; > reg = <0x020c9000 0x1000>; > @@ -747,8 +754,8 @@ > interrupts = <0 14 0x04>; > }; > > - ocotp@021bc000 { > - compatible = "fsl,imx6q-ocotp"; > + ocotp: ocotp@021bc000 { > + compatible = "fsl,imx6q-ocotp", "syscon"; > reg = <0x021bc000 0x4000>; Sorry to check this very late - is ocotp@021bc000 the right address for the thermal data ? According to User Manual (Table 62.3), the start address is 0x20C8180. Using your patch, by loading the driver I get : imx_thermal tempmon.7: invalid sensor calibration data imx_thermal tempmon.7: failed to get sensor data imx_thermal: probe of tempmon.7 failed with error -22 The driver is loaded successfully if I changed the tempdata to point to 020C8180. Not sure if I get the right values from temp1_crit and temp1_input, but no error at the initialisation. Am I missing something ? Best regards, Stefano
Hi Stefano, On Tue, Jul 09, 2013 at 04:59:57PM +0200, Stefano Babic wrote: > > - ocotp@021bc000 { > > - compatible = "fsl,imx6q-ocotp"; > > + ocotp: ocotp@021bc000 { > > + compatible = "fsl,imx6q-ocotp", "syscon"; > > reg = <0x021bc000 0x4000>; > > Sorry to check this very late - is ocotp@021bc000 the right address for > the thermal data ? According to User Manual (Table 62.3), the start > address is 0x20C8180. Using your patch, by loading the driver I get : Address 0x20C8180 is where TEMPMON control registers are - they are embedded in ANATOP block, while calibration data is stored in OCOTP fuse block. > imx_thermal tempmon.7: invalid sensor calibration data > imx_thermal tempmon.7: failed to get sensor data > imx_thermal: probe of tempmon.7 failed with error -22 What's your chip revision? Early revisions may not have the calibration data. TO1.2 should have, I think. > The driver is loaded successfully if I changed the tempdata to point to > 020C8180. Not sure if I get the right values from temp1_crit and > temp1_input, but no error at the initialisation. Am I missing something ? It reads some data but that's not calibration data, so it should not work. Also, you need a cpu_cooling fix [1], if you want to play the thermal patches on imx6q. Shawn [1] http://thread.gmane.org/gmane.linux.power-management.general/34389
Hi Shawn, On 10/07/2013 09:09, Shawn Guo wrote: > Address 0x20C8180 is where TEMPMON control registers are - they are > embedded in ANATOP block, while calibration data is stored in OCOTP fuse > block. > Thanks, it is clear now. >> imx_thermal tempmon.7: invalid sensor calibration data >> imx_thermal tempmon.7: failed to get sensor data >> imx_thermal: probe of tempmon.7 failed with error -22 > > What's your chip revision? Early revisions may not have the calibration > data. TO1.2 should have, I think. That is the point - on the board I tested there is a T01.0 running. > >> The driver is loaded successfully if I changed the tempdata to point to >> 020C8180. Not sure if I get the right values from temp1_crit and >> temp1_input, but no error at the initialisation. Am I missing something ? > > It reads some data but that's not calibration data, so it should not work. > > Also, you need a cpu_cooling fix [1], if you want to play the thermal > patches on imx6q. Understood, thanks. Stefano
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 9e8296e..13e1d7f 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -489,6 +489,13 @@ }; }; + tempmon: tempmon { + compatible = "fsl,imx6q-tempmon"; + interrupts = <0 49 0x04>; + fsl,tempmon = <&anatop>; + fsl,tempmon-data = <&ocotp>; + }; + usbphy1: usbphy@020c9000 { compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; reg = <0x020c9000 0x1000>; @@ -747,8 +754,8 @@ interrupts = <0 14 0x04>; }; - ocotp@021bc000 { - compatible = "fsl,imx6q-ocotp"; + ocotp: ocotp@021bc000 { + compatible = "fsl,imx6q-ocotp", "syscon"; reg = <0x021bc000 0x4000>; };
Mark ocotp as a syscon node and add tempmon for imx6q thermal support. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> --- arch/arm/boot/dts/imx6qdl.dtsi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)