Another interesting thing is that a read here the RTC issue and some 
workaround for that.
I do not anything wrong with RTC (yet) with this DTS, maybe i misunderstood 
what the problem is or was just lucky!?

On Sunday, January 13, 2019 at 7:51:06 PM UTC-2, @lex wrote:
>
> Ok, the sound seems to be fixed. The thermal thing is still a mystery to 
> me. I would need to see if someone has it working.
>
> On Sunday, January 13, 2019 at 5:10:16 PM UTC-2, @lex wrote:
>>
>> Sounds good. I think i'd better restart with linux-next as a reference. 
>>
>> On Sunday, January 13, 2019 at 4:51:20 PM UTC-2, CodeKipper wrote:
>>>
>>> On Sun, 13 Jan 2019 at 18:42, @lex <[email protected]> wrote: 
>>> > 
>>> > Hmm, i thought you would know about the wrong size, or where to look 
>>> for. 
>>> > The patches are maybe from Icenowy, Jagan and some others, maybe they 
>>> can give some directions. 
>>> > I have seen a showcase of Pine64SO with sound working but have yet to 
>>> see a public DTS for kernel 4.20 as i have provided here, but if someone 
>>> can point me to a complete DTS and dtsi please do so. 
>>> the changes have now made it into linux-next 
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/arch/arm64/boot/dts/allwinner?h=next-20190111
>>>  
>>>
>>> > 
>>> > my little understanding is that A64 has 2 sensors, it is certainly not 
>>> 0 in #thermal-sensor-cells. 
>>> > 
>>> > Thermal sensor devices are nodes providing temperature sensing 
>>> capabilities on 
>>> > thermal zones. Typical devices are I2C ADC converters and bandgaps. 
>>> These are 
>>> > nodes providing temperature data to thermal zones. Thermal sensor 
>>> devices may 
>>> > control one or more internal sensors. 
>>> > 
>>> > Required property: 
>>> > - #thermal-sensor-cells: Used to provide sensor device specific 
>>> information 
>>> >   Type: unsigned while referring to it. Typically 0 on thermal sensor 
>>> >   Size: one cell nodes with only one sensor, and at least 1 on nodes 
>>> > with several internal sensors, in order 
>>> > to identify uniquely the sensor instances within 
>>> > the IC. See thermal zone binding for more details 
>>> > on how consumers refer to sensor devices. 
>>> > 
>>> > 
>>> >         /* 
>>> > * An IC with several temperature sensor. 
>>> > */ 
>>> > adc_dummy: sensor@50 { 
>>> > ... 
>>> > #thermal-sensor-cells = <1>; /* sensor internal ID */ 
>>> > }; 
>>> > 
>>> > 
>>> > Thanks 
>>> > 
>>> > On Sunday, January 13, 2019 at 12:48:43 PM UTC-2, CodeKipper wrote: 
>>> >> 
>>> >> On Sun, 13 Jan 2019 at 13:35, @lex <[email protected]> wrote: 
>>> >> > 
>>> >> > Hi Marcus, 
>>> >> > Thank you for the input. 
>>> >> > 
>>> >> > The patch seems to be verbatim. 
>>> >> > The message is clear about the size mismatch, but where it should 
>>> be fixed? 
>>> >> > 
>>> >> > #thermal-sensor-cells = <2>; <= this gives the warning about the 
>>> wronng size 
>>> >> > 
>>> >> > The bootlog below is when #thermal-sensor-cells = <1>;  and no ths 
>>> calibration. 
>>> >> > 
>>> >> > Here i provide the complete DTS for the NanoPi A4 / BananaPi M64. 
>>> >> > Tested on NanoPi A64 with the following working: 
>>> >> > * ethernet 
>>> >> > * wifi 
>>> >> > * mali (3D) 
>>> >> > * hdmi 
>>> >> > 
>>> >> > Not tested yet: 
>>> >> > sunxi_cedrus 
>>> >> > 
>>> >> > Not working (yet I presume): 
>>> >> > * sound 
>>> >> > * thermal 
>>> >> just doing a comparison with a fresh armbian install. Audio doesn't 
>>> >> seem to work for you as sun8i-codec, sun4i-i2s, sun50i_codec_analog 
>>> >> and sun8i_adda_pr_regmap haven't been probed. They all seem to be in 
>>> >> the config file so should be available to you. 
>>> >> Not sure about the thermal side but the Documentation states that 
>>> >> thernal-sensor-cells should be 0. The patchset that you've 
>>> >> cherry-picked had a lot of comments, maybe contact the author to see 
>>> >> if he's updated it. 
>>> >> BR, 
>>> >> CK 
>>> >> > Modules loaded 
>>> >> > https://gist.github.com/avafinger/59a44d3429627939ac026268b8f2fef3 
>>> >> > 
>>> >> > .config 
>>> >> > https://gist.github.com/avafinger/b86ab9474401991796d2d6f3be447cc6 
>>> >> > 
>>> >> > boot log 
>>> >> > https://gist.github.com/avafinger/e50e084c09124b567f9ba66fb35903f7 
>>> >> > 
>>> >> > DTS 
>>> >> > https://gist.github.com/avafinger/c326ebf61d5bb87423a9541f785b77c6 
>>> >> > 
>>> >> > Thanks 
>>> >> > 
>>> >> > On Sunday, January 13, 2019 at 7:10:41 AM UTC-2, CodeKipper wrote: 
>>> >> >> 
>>> >> >> s 
>>> >> >> s 
>>> >> >> 
>>> >> >> On Sat, 12 Jan 2019 at 20:33, @lex <[email protected]> wrote: 
>>> >> >> > 
>>> >> >> > I've tried to apply this patch in a hope to get the thermal 
>>> sensor working but things got hairy, can anyone please explain what is 
>>> wrong with this patch: 
>>> >> >> > https://patchwork.kernel.org/patch/10555615/ 
>>> >> >> Hi Alex, 
>>> >> >> check the patch after applying git show BLAH to check that it 
>>> lsooks 
>>> >> >> the same as the original. For debugging the below and also the 
>>> sound 
>>> >> >> card could you paste the following somewhere 
>>> >> >> arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts 
>>> >> >> arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts 
>>> >> >> arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi 
>>> >> >> .config 
>>> >> >> serial console/dmesg 
>>> >> >> BR, 
>>> >> >> CK 
>>> >> >> > 
>>> >> >> > Warnings: 
>>> >> >> > 
>>> >> >> >  DTC     
>>> arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (reg_format): /soc/eeprom@1c14000/calib@234:reg: property has 
>>> invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (pci_device_bus_num): Failed prerequisite 'reg_format' 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (simple_bus_reg): Failed prerequisite 'reg_format' 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (i2c_bus_reg): Failed prerequisite 'reg_format' 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (spi_bus_reg): Failed prerequisite 'reg_format' 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (avoid_default_addr_size): /soc/eeprom@1c14000/calib@234: Relying 
>>> on default #address-cells value 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (avoid_default_addr_size): /soc/eeprom@1c14000/calib@234: Relying 
>>> on default #size-cells value 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (thermal_sensors_property): 
>>> /thermal-zones/cpu0-thermal:thermal-sensors: property size (8) too small 
>>> for cell size 2 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (thermal_sensors_property): 
>>> /thermal-zones/gpu0-thermal:thermal-sensors: property size (8) too small 
>>> for cell size 2 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb: 
>>> Warning (thermal_sensors_property): 
>>> /thermal-zones/gpu1-thermal:thermal-sensors: property size (8) too small 
>>> for cell size 2 
>>> >> >> >   DTC     
>>> arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (reg_format): /soc/eeprom@1c14000/calib@234:reg: property has invalid 
>>> length (8 bytes) (#address-cells == 2, #size-cells == 1) 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (pci_device_bus_num): Failed prerequisite 'reg_format' 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (simple_bus_reg): Failed prerequisite 'reg_format' 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (i2c_bus_reg): Failed prerequisite 'reg_format' 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (spi_bus_reg): Failed prerequisite 'reg_format' 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (avoid_default_addr_size): /soc/eeprom@1c14000/calib@234: Relying on 
>>> default #address-cells value 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (avoid_default_addr_size): /soc/eeprom@1c14000/calib@234: Relying on 
>>> default #size-cells value 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (thermal_sensors_property): /thermal-zones/cpu0-thermal:thermal-sensors: 
>>> property size (8) too small for cell size 2 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (thermal_sensors_property): /thermal-zones/gpu0-thermal:thermal-sensors: 
>>> property size (8) too small for cell size 2 
>>> >> >> > arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb: Warning 
>>> (thermal_sensors_property): /thermal-zones/gpu1-thermal:thermal-sensors: 
>>> property size (8) too small for cell size 2 
>>> >> >> > 
>>> >> >> > 
>>> >> >> > 
>>> >> >> > On Friday, January 11, 2019 at 6:38:05 PM UTC-2, @lex wrote: 
>>> >> >> >> 
>>> >> >> >> Hi, 
>>> >> >> >> I am running stable kernel 4.20.1 on NanoPi A64 with the 
>>> linux-sunxi community patches and it works really well thanks for the hard 
>>> work however i am struggling to get the sound card (any) detected and the 
>>> upper USB receptacle is not working (for some reason). 
>>> >> >> >> 
>>> >> >> >> Regarding the USB upper slot i have in my dtsi: 
>>> >> >> >> 
>>> >> >> >>  usbphy: phy@1c19400 { 
>>> >> >> >>  compatible = "allwinner,sun50i-a64-usb-phy"; 
>>> >> >> >>  reg = <0x01c19400 0x14>, 
>>> >> >> >>        <0x01c1a800 0x4>, 
>>> >> >> >>        <0x01c1b800 0x4>; 
>>> >> >> >>  reg-names = "phy_ctrl", 
>>> >> >> >>      "pmu0", 
>>> >> >> >>      "pmu1"; 
>>> >> >> >>  clocks = <&ccu CLK_USB_PHY0>, 
>>> >> >> >>  <&ccu CLK_USB_PHY1>; 
>>> >> >> >>  clock-names = "usb0_phy", 
>>> >> >> >>        "usb1_phy"; 
>>> >> >> >>  resets = <&ccu RST_USB_PHY0>, 
>>> >> >> >>  <&ccu RST_USB_PHY1>; 
>>> >> >> >>  reset-names = "usb0_reset", 
>>> >> >> >>        "usb1_reset"; 
>>> >> >> >>  status = "disabled"; 
>>> >> >> >>  #phy-cells = <1>; 
>>> >> >> >>  }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>  ehci0: usb@1c1a000 { 
>>> >> >> >>  compatible = "allwinner,sun50i-a64-ehci", "generic-ehci"; 
>>> >> >> >>  reg = <0x01c1a000 0x100>; 
>>> >> >> >>  interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 
>>> >> >> >>  clocks = <&ccu CLK_BUS_OHCI0>, 
>>> >> >> >>  <&ccu CLK_BUS_EHCI0>, 
>>> >> >> >>  <&ccu CLK_USB_OHCI0>; 
>>> >> >> >>  resets = <&ccu RST_BUS_OHCI0>, 
>>> >> >> >>  <&ccu RST_BUS_EHCI0>; 
>>> >> >> >>  status = "disabled"; 
>>> >> >> >>  }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>  ohci0: usb@1c1a400 { 
>>> >> >> >>  compatible = "allwinner,sun50i-a64-ohci", "generic-ohci"; 
>>> >> >> >>  reg = <0x01c1a400 0x100>; 
>>> >> >> >>  interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 
>>> >> >> >>  clocks = <&ccu CLK_BUS_OHCI0>, 
>>> >> >> >>  <&ccu CLK_USB_OHCI0>; 
>>> >> >> >>  resets = <&ccu RST_BUS_OHCI0>; 
>>> >> >> >>  status = "disabled"; 
>>> >> >> >>  }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>  ehci1: usb@1c1b000 { 
>>> >> >> >>  compatible = "allwinner,sun50i-a64-ehci", "generic-ehci"; 
>>> >> >> >>  reg = <0x01c1b000 0x100>; 
>>> >> >> >>  interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 
>>> >> >> >>  clocks = <&ccu CLK_BUS_OHCI1>, 
>>> >> >> >>  <&ccu CLK_BUS_EHCI1>, 
>>> >> >> >>  <&ccu CLK_USB_OHCI1>; 
>>> >> >> >>  resets = <&ccu RST_BUS_OHCI1>, 
>>> >> >> >>  <&ccu RST_BUS_EHCI1>; 
>>> >> >> >>  phys = <&usbphy 1>; 
>>> >> >> >>  phy-names = "usb"; 
>>> >> >> >>  status = "disabled"; 
>>> >> >> >>  }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>  ohci1: usb@1c1b400 { 
>>> >> >> >>  compatible = "allwinner,sun50i-a64-ohci", "generic-ohci"; 
>>> >> >> >>  reg = <0x01c1b400 0x100>; 
>>> >> >> >>  interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; 
>>> >> >> >>  clocks = <&ccu CLK_BUS_OHCI1>, 
>>> >> >> >>  <&ccu CLK_USB_OHCI1>; 
>>> >> >> >>  resets = <&ccu RST_BUS_OHCI1>; 
>>> >> >> >>  phys = <&usbphy 1>; 
>>> >> >> >>  phy-names = "usb"; 
>>> >> >> >>  status = "disabled"; 
>>> >> >> >>  }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> and my dts: 
>>> >> >> >> 
>>> >> >> >> &ehci0 { 
>>> >> >> >>  status = "okay"; 
>>> >> >> >> }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> &ehci1 { 
>>> >> >> >>  status = "okay"; 
>>> >> >> >> }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> &ohci0 { 
>>> >> >> >>  status = "okay"; 
>>> >> >> >> }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> &ohci1 { 
>>> >> >> >>  status = "okay"; 
>>> >> >> >> }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> But the upper slot is dead (but works with legacy kernel, so no 
>>> hardware issue) 
>>> >> >> >> Can someone pinpoint what is wrong with this setup or what i 
>>> missed? 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> Regarding sound card, i have: 
>>> >> >> >> &codec { 
>>> >> >> >>  status = "okay"; 
>>> >> >> >> }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> &codec_analog { 
>>> >> >> >>  status = "okay"; 
>>> >> >> >> }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> &sound { 
>>> >> >> >>  status = "okay"; 
>>> >> >> >> }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> but no sound card detected (audiocodec or hdmicodec), any 
>>> advice? 
>>> >> >> >> 
>>> >> >> >> Another question, i cannot have thermal readout even with: 
>>> >> >> >>  thermal-zones { 
>>> >> >> >>   cpu_thermal: cpu0-thermal { 
>>> >> >> >>  /* milliseconds */ 
>>> >> >> >>  polling-delay-passive = <250>; 
>>> >> >> >>  polling-delay = <1000>; 
>>> >> >> >>  thermal-sensors = <&ths 0>; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>  cooling-maps { 
>>> >> >> >>  map0 { 
>>> >> >> >>  trip = <&cpu_alert0>; 
>>> >> >> >>  cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 
>>> >> >> >>  }; 
>>> >> >> >>  map1 { 
>>> >> >> >>  trip = <&cpu_alert1>; 
>>> >> >> >>  cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 
>>> >> >> >>  }; 
>>> >> >> >>  }; 
>>> >> >> >>  trips { 
>>> >> >> >>  cpu_alert0: cpu_alert0 { 
>>> >> >> >>  /* milliCelsius */ 
>>> >> >> >>  temperature = <75000>; 
>>> >> >> >>  hysteresis = <2000>; 
>>> >> >> >>  type = "passive"; 
>>> >> >> >>  }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>  cpu_alert1: cpu_alert1 { 
>>> >> >> >>  /* milliCelsius */ 
>>> >> >> >>  temperature = <90000>; 
>>> >> >> >>  hysteresis = <2000>; 
>>> >> >> >>  type = "hot"; 
>>> >> >> >>  }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>  cpu_crit: cpu_crit { 
>>> >> >> >>  /* milliCelsius */ 
>>> >> >> >>  temperature = <110000>; 
>>> >> >> >>  hysteresis = <2000>; 
>>> >> >> >>  type = "critical"; 
>>> >> >> >>  }; 
>>> >> >> >>  }; 
>>> >> >> >>  }; 
>>> >> >> >>   gpu0_thermal: gpu0-thermal { 
>>> >> >> >>  /* milliseconds */ 
>>> >> >> >>  polling-delay-passive = <250>; 
>>> >> >> >>  polling-delay = <1000>; 
>>> >> >> >>  thermal-sensors = <&ths 1>; 
>>> >> >> >>   }; 
>>> >> >> >>   gpu1_thermal: gpu1-thermal { 
>>> >> >> >>  /* milliseconds */ 
>>> >> >> >>  polling-delay-passive = <250>; 
>>> >> >> >>  polling-delay = <1000>; 
>>> >> >> >>  thermal-sensors = <&ths 1>; 
>>> >> >> >>   }; 
>>> >> >> >>   }; 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> I can't see any ths driver for the A64 or any entity that reads 
>>> it, is it working on the A64? 
>>> >> >> >> 
>>> >> >> >> Jagan, you are extensively working on BananaPii M64 and NanoPi 
>>> A64, do you have this working and can you give some directions? 
>>> >> >> >> 
>>> >> >> >> Thank you. 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> > -- 
>>> >> >> > You received this message because you are subscribed to the 
>>> Google Groups "linux-sunxi" group. 
>>> >> >> > To unsubscribe from this group and stop receiving emails from 
>>> it, send an email to [email protected]. 
>>> >> >> > For more options, visit https://groups.google.com/d/optout. 
>>> >> > 
>>> >> > -- 
>>> >> > You received this message because you are subscribed to the Google 
>>> Groups "linux-sunxi" group. 
>>> >> > To unsubscribe from this group and stop receiving emails from it, 
>>> send an email to [email protected]. 
>>> >> > For more options, visit https://groups.google.com/d/optout. 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> Groups "linux-sunxi" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected]. 
>>> > For more options, visit https://groups.google.com/d/optout. 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to