GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline...

28
GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL [email protected]

Transcript of GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline...

Page 1: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

GOOGLE NEXUS 5X & 6P MAINLINING EFFORT

JEREMY MCNICOLL

[email protected]

Page 2: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

$> WHOAMI

Jeremy McNicoll – Nexus Mainline Effort 2

Page 3: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Jeremy McNicoll – Nexus Mainline Effort 3

Page 4: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

WHY?

Jeremy McNicoll – Nexus Mainline Effort 4

Page 5: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

NEXUS 5X SPECS

Jeremy McNicoll – Nexus Mainline Effort 5

Page 6: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

NEXUS 6P SPECS

Jeremy McNicoll – Nexus Mainline Effort 6

Page 7: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Jeremy McNicoll – Nexus Mainline Effort 7

TERMINOLOGY

•  Nexus 5X çèMSM8992 çè Snapdragon 808 •  Nexus 6P çèMSM8994 çè Snapdragon 810 •  MSM == Mobile Station Modem •  Linaro Integration branch •  Downstream

•  Msm 3.10 •  Msm 3.18

Page 8: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

THE BEGINNING…

Jeremy McNicoll – Nexus Mainline Effort 8

Page 9: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Jeremy McNicoll – Nexus Mainline Effort 9

ELC 2016 – SAN DIEGO •  Mainline support of Nexus 5X ? •  Downstream working •  Community help / assistance

Page 10: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Jeremy McNicoll – Nexus Mainline Effort 10

DEBUG CABLE

Page 11: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Jeremy McNicoll – Nexus Mainline Effort 11

WHAT’S WORKING?

•  Single CPU •  INITRD / RAMDISK •  Debug Serial •  Global Clocks •  SDHCI / MMC / onboard storage •  Pinctrl •  Bluetooth (WIP)

Page 12: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Where can I get this cool new hotness?!? MAINLINE STATUS

$  git  tag  -­‐-­‐contains  a77a713395392a    v4.10-­‐rc1  v4.10-­‐rc2  v4.10-­‐rc3  v4.10-­‐rc4  v4.10-­‐rc5  v4.10-­‐rc6  

Jeremy McNicoll – Nexus Mainline Effort 12

Page 13: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

UPDATING CLOCKS

Jeremy McNicoll – Nexus Mainline Effort 13

Where are the values hiding?

(mainline)  drivers/clk/qcom/gcc-­‐msm8916.c   (downstream)  drivers/clk/qcom/clock-­‐gcc-­‐8916.c  

Page 14: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

UPDATING CLOCKS

Jeremy McNicoll – Nexus Mainline Effort 14

Where are the values hiding?

(downstream)  drivers/clk/qcom/clock-­‐gcc-­‐8992.c   (Mainline)  drivers/clk/qcom/gcc-­‐msm8996.c  

Page 15: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

UPDATING CLOCKS

Jeremy McNicoll – Nexus Mainline Effort 15

Downstream  vs  Upstream  ?   continued…

Page 16: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

LESSONS LEARN

Jeremy McNicoll – Nexus Mainline Effort 16

Page 17: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Tips and tricks for those brave enough to repeat this!!

Jeremy McNicoll – Nexus Mainline Effort 17

LESSONS LEARNED

•  Get things sent upstream ASAP (3.10 vs 4.5) •  Don’t take on too much •  Keep your goals small and attainable •  Cheerleaders are helpful •  Don’t just focus on getting X lines committed into the kernel. Helping others and

the community is greatly appreciated and goes a long way. •  Community is not big bad and scary. People are quite cooperative / helpful if you

play nice and are not an A$$H0l3

Page 18: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

NEXT SUBSYSTEM?

Jeremy McNicoll – Nexus Mainline Effort 18

Page 19: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Jeremy McNicoll – Nexus Mainline Effort 19

SUBSYSTEM SELECTION?

•  SDHCI done •  Screen / graphics 418 & 430 via Freedreno •  USB (good candidate) •  WIFI •  I2C •  SPI •  Modem •  Sound •  Camera •  Others…… ?

Page 20: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

BLUETOOTH (WIP…)

Jeremy McNicoll – Nexus Mainline Effort 20

Page 21: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Jeremy McNicoll – Nexus Mainline Effort 21

Downstream investigation BLUETOOTH

•  Qualcomm  QCA6174  802.11ac  Wi-­‐Fi  2x2  MIMO  Combo  SoC  •  PyHS0  at  MMIO  0xf995e000  (irq  =  146)  is  a  MSM  HS  UART    •  Sequence  of  events:  

1.  Enable  BT  via  GPIO  (drivers/bluetooth/bluetooth-­‐power.c)  2.  Send  reset  (HCI_RESET    0x0C03)  to  /dev/PyHS0    3.  Communica_on  starts….  

Page 22: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Jeremy McNicoll – Nexus Mainline Effort 22

Modifications for upstream BLUETOOTH

•  PCIe  clocks    •  PCIe  PHY  clocks  

•  PHY  QMP  not  upstream  •  PCIe  QCA6174  supported  via  ath10k  driver  

•  Use  latest  ath10k  on  3.10  using  backports  •  RPM  SMD  •  Luser  space  with  Bluez  and  firmware  

Page 23: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

Jeremy McNicoll – Nexus Mainline Effort 23

Page 24: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

WISH LIST / TODO LIST / HELP LIST

Jeremy McNicoll – Nexus Mainline Effort 24

GETTING INVOLVED!

•  RAMDISK / InitRD > 2.1 MB booting •  Subsystem volunteers •  Hardware (Cables & Phones) •  Preconfigured VM to build AOSP? •  Help Jeremy investigate various subsystems downstream •  Kernel newbie •  Documentation published or subset

Page 25: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

•  IRC: Freenode ##linux-msm (yes, there are 2 #’s) •  Mailing lists: [email protected], [email protected] •  Git Repo’s

•  MSM kernel 3.14 --> https://us.codeaurora.org/cgit/quic/la/kernel/msm-3.14/ •  MSM kernel 3.18 --> https://us.codeaurora.org/cgit/quic/la/kernel/msm-3.18/ •  Linaro http://git.linaro.org/landing-teams/working/qualcomm/kernel.git

•  Initial Nexus mainline patches (http://lists.infradead.org/pipermail/linux-arm-kernel/2016-July/442069.html)

•  http://source.android.com/source/building-kernels.html •  iFixit Teardown: https://www.ifixit.com/Teardown/Nexus+5X+Teardown/51318

Jeremy McNicoll – Nexus Mainline Effort 25

LINKS AND REFERENCES

Page 26: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

•  Dissecting the QCOM 1.7M line fork (https://youtu.be/JnGL85SglbA)

•  Debug Cable: •  http://people.redhat.com/jmcnicol/nexus_debug/ •  https://android.googlesource.com/device/google/debugcable/+/master

Jeremy McNicoll – Nexus Mainline Effort 26

LINKS AND REFERENCES – PART 2

Page 27: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

THANK YOU

Jeremy McNicoll – Nexus Mainline Effort 27

Page 28: GOOGLE NEXUS 5X & 6P MAINLINING EFFORT JEREMY MCNICOLL · 17 Jeremy McNicoll – Nexus Mainline Effort LESSONS LEARNED • Get things sent upstream ASAP (3.10 vs 4.5) • Don’t

QUESTIONS & OPEN DISCUSSION

Jeremy McNicoll – Nexus Mainline Effort 28