{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/1664","repository_url":"https://api.github.com/repos/raspberrypi/linux","labels_url":"https://api.github.com/repos/raspberrypi/linux/issues/1664/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/linux/issues/1664/comments","events_url":"https://api.github.com/repos/raspberrypi/linux/issues/1664/events","html_url":"https://github.com/raspberrypi/linux/pull/1664","id":180686909,"number":1664,"title":"BCM270X_DT: Use bcm283x.dtsi, bcm2835.dtsi and bcm2836.dtsi","user":{"login":"notro","id":530887,"avatar_url":"https://avatars.githubusercontent.com/u/530887?v=3","gravatar_id":"","url":"https://api.github.com/users/notro","html_url":"https://github.com/notro","followers_url":"https://api.github.com/users/notro/followers","following_url":"https://api.github.com/users/notro/following{/other_user}","gists_url":"https://api.github.com/users/notro/gists{/gist_id}","starred_url":"https://api.github.com/users/notro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notro/subscriptions","organizations_url":"https://api.github.com/users/notro/orgs","repos_url":"https://api.github.com/users/notro/repos","events_url":"https://api.github.com/users/notro/events{/privacy}","received_events_url":"https://api.github.com/users/notro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-03T16:37:32Z","updated_at":"2016-10-05T10:47:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/raspberrypi/linux/pulls/1664","html_url":"https://github.com/raspberrypi/linux/pull/1664","diff_url":"https://github.com/raspberrypi/linux/pull/1664.diff","patch_url":"https://github.com/raspberrypi/linux/pull/1664.patch"},"body":"The mainline Device Tree files are quite close to downstream now.\r\nThis is a proposal to take advantage of that and take yet another \"mainline\" step.\r\n\r\nI have made a diff file: bcm270x.dtsi instead of patching bcm283x.dtsi directly. I don't know what's the best maintainable solution. One benefit is that it is overly clear how we differ from mainline. The changes could also be included in bcm2708-rpi.dtsi as well, but IMO that's not so good since we loose the distinction made in mainline.\r\n\r\nI haven't followed downstream so close the last months, so I don't know if this has any side effects on the overlays.\r\nThere's some more details in the commit message.\r\n\r\nThis is the diff introduced by this patch that applies to all dts. I have removed phandle changes that are due to node order changes and lines without change.\r\n```diff\r\n\r\n@@ -34,7 +34,6 @@\r\n \taliases {\r\n-\t\tclocks = \"/clocks\";\r\n-\t\tleds = \"/soc/leds\";\r\n+\t\tleds = \"/leds\";\r\n-\t\tspi2 = \"/soc/spi@7e2150C0\";\r\n+\t\tspi2 = \"/soc/spi@7e2150c0\";\r\n@@ -65,19 +64,31 @@\r\n-\tclocks: clocks {\r\n+\tclocks {\r\n-\t\tclk_osc: clock@6 {\r\n+\t\tclk_osc: clock@3 {\r\n-\t\t\treg = <0x6>;\r\n+\t\t\treg = <0x3>;\r\n+\t\t};\r\n+\t};\r\n+\r\n+\tleds: leds {\r\n+\t\tcompatible = \"gpio-leds\";\r\n+\r\n+\t\tact_led: act {\r\n+\t\t\tgpios = <0x8 0x10 0x1>;\r\n+\t\t\tlabel = \"led0\";\r\n+\t\t\tlinux,default-trigger = \"mmc0\";\r\n+\t\t\tlinux,phandle = <0x19>;\r\n+\t\t\tphandle = <0x19>;\r\n \t\t};\r\n \t};\r\n@@ -110,12 +121,12 @@\r\n-\t\tcprman: cprman@7e101000 {\r\n+\t\tcprman: clocks: cprman@7e101000 {\r\n@@ -179,53 +190,52 @@\r\n \t\tgpiomem {\r\n-\t\t\tstatus = \"okay\";\r\n \t\t};\r\n\r\n-\t\tgpu: gpu {\r\n+\t\tgpu: vc4: gpu {\r\n@@ -234,15 +244,17 @@ hdmi\r\n+\t\t\tinterrupts = <0x2 0x8 0x2 0x9>;\r\n \t\t};\r\n\r\n \t\thvs: hvs@7e400000 {\r\n+\t\t\tinterrupts = <0x2 0x1>;\r\n \t\t};\r\n@@ -313,18 +325,6 @@\r\n-\t\tleds: leds {\r\n-\t\t\tcompatible = \"gpio-leds\";\r\n-\r\n-\t\t\tact_led: act {\r\n-\t\t\t\tgpios = <0x7 0x10 0x1>;\r\n-\t\t\t\tlabel = \"led0\";\r\n-\t\t\t\tlinux,default-trigger = \"mmc0\";\r\n-\t\t\t\tlinux,phandle = <0x19>;\r\n-\t\t\t\tphandle = <0x19>;\r\n-\t\t\t};\r\n-\t\t};\r\n-\r\n@@ -347,18 +347,21 @@\r\n \t\tpixelvalve0: pixelvalve@7e206000 {\r\n+\t\t\tinterrupts = <0x2 0xd>;\r\n \t\t};\r\n\r\n \t\tpixelvalve1: pixelvalve@7e207000 {\r\n+\t\t\tinterrupts = <0x2 0xe>;\r\n \t\t};\r\n\r\n \t\tpixelvalve2: pixelvalve@7e807000 {\r\n+\t\t\tinterrupts = <0x2 0xa>;\r\n \t\t};\r\n@@ -386,7 +389,6 @@ random\r\n-\t\t\tstatus = \"okay\";\r\n \t\t};\r\n@@ -444,18 +446,18 @@\r\n-\t\tspi0: spi@7e204000 {\r\n+\t\tspi0: spi: spi@7e204000 {\r\n@@ -480,17 +482,17 @@\r\n-\t\tspi2: spi@7e2150C0 {\r\n+\t\tspi2: spi@7e2150c0 {\r\n@@ -510,6 +512,8 @@\r\n \t\tusb: usb@7e980000 {\r\n+\t\t\t#address-cells = <0x1>;\r\n+\t\t\t#size-cells = <0x0>;\r\n@@ -517,6 +521,7 @@\r\n \t\tv3d: v3d@7ec00000 {\r\n+\t\t\tinterrupts = <0x1 0xa>;\r\n \t\t};\r\n@@ -536,7 +541,6 @@ watchdog\r\n-\t\t\tstatus = \"okay\";\r\n \t\t};\r\n\r\n```\r\n\r\nThe diff is produced like this, the resulting diff is sorted:\r\n```\r\nARCH=arm ./scripts/dtc/dtx_diff arch/arm/boot/dts/bcm2708-rpi-b.dts > ../bcm283x-dtsi/org/bcm2708-rpi-b.dts\r\n<patch>\r\nARCH=arm ./scripts/dtc/dtx_diff arch/arm/boot/dts/bcm2708-rpi-b.dts > ../bcm283x-dtsi/new/bcm2708-rpi-b.dts\r\n./scripts/dtc/dtx_diff ../bcm283x-dtsi/org/bcm2708-rpi-b.dts ../bcm283x-dtsi/new/bcm2708-rpi-b.dts > ../bcm283x-dtsi/bcm2708-rpi-b.diff\r\n```\r\n\r\nResulting full diffs:\r\n- [bcm2708-rpi-b.diff](https://gist.github.com/notro/bb34d239030f68b0e76a621030f7d065)\r\n- [bcm2708-rpi-b-plus.diff](https://gist.github.com/notro/a9735cdc370b8916e7ac18af9bde7d23)\r\n- [bcm2708-rpi-cm.diff](https://gist.github.com/notro/b5de2ccdbcf16e68ad82f892fa3f93b1)\r\n- [bcm2709-rpi-2-b.diff](https://gist.github.com/notro/98bcb05097bd9ecc17fb6e23ef066916)\r\n- [bcm2710-rpi-3-b.diff](https://gist.github.com/notro/091d440631df462e6c0510bd1d431722)\r\n- [RPI364-bcm2710-rpi-3-b.diff](https://gist.github.com/notro/f439d7d36b4d230f05299e7df6fba30e)\r\n- [bcm2710-rpi-cm3.diff](https://gist.github.com/notro/67d56da6b73ebc473ecd2f826b05242d)\r\n\r\nI have only boot tested on Pi1 B+.\r\n\r\n\r\nOne thing I discovered is that we set timer clock-frequency in bcm2708.dtsi and bcm2709.dtsi, but apparently this should be avoided:\r\n\r\n[Documentation/devicetree/bindings/arm/arch_timer.txt](https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/arch_timer.txt)\r\n```\r\n** CP15 Timer node properties:\r\n\r\n- compatible : Should at least contain one of\r\n        \"arm,armv7-timer\"\r\n        \"arm,armv8-timer\"\r\n\r\n- clock-frequency : The frequency of the main counter, in Hz. Should be present\r\n  only where necessary to work around broken firmware which does not configure\r\n  CNTFRQ on all CPUs to a uniform correct value. Use of this property is\r\n  strongly discouraged; fix your firmware unless absolutely impossible.\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/comments/251642110","html_url":"https://github.com/raspberrypi/linux/pull/1664#issuecomment-251642110","issue_url":"https://api.github.com/repos/raspberrypi/linux/issues/1664","id":251642110,"user":{"login":"pelwell","id":8911409,"avatar_url":"https://avatars.githubusercontent.com/u/8911409?v=3","gravatar_id":"","url":"https://api.github.com/users/pelwell","html_url":"https://github.com/pelwell","followers_url":"https://api.github.com/users/pelwell/followers","following_url":"https://api.github.com/users/pelwell/following{/other_user}","gists_url":"https://api.github.com/users/pelwell/gists{/gist_id}","starred_url":"https://api.github.com/users/pelwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelwell/subscriptions","organizations_url":"https://api.github.com/users/pelwell/orgs","repos_url":"https://api.github.com/users/pelwell/repos","events_url":"https://api.github.com/users/pelwell/events{/privacy}","received_events_url":"https://api.github.com/users/pelwell/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T10:47:15Z","updated_at":"2016-10-05T10:47:15Z","body":"I think the changes look good. All overlays still apply. It's just a shame that the multiple inclusions make it harder to follow.\r\n\r\nIf the bindings say not to include \"clock-frequency\" then we should take it out.\r\n"}}
{"actor":{"display_login":"pelwell"}}