{"id":811,"date":"2026-02-27T08:00:35","date_gmt":"2026-02-27T00:00:35","guid":{"rendered":"https:\/\/www.zhoubin.asia\/?p=811"},"modified":"2026-01-17T07:52:04","modified_gmt":"2026-01-16T23:52:04","slug":"bring-up-imx678-sensor","status":"publish","type":"post","link":"https:\/\/www.zhoubin.asia\/index.php\/2026\/02\/27\/bring-up-imx678-sensor\/","title":{"rendered":"\u5982\u4f55\u5728 H15 \u4e0a Bring Up \u4e00\u4e2a\u65b0\u7684 IMX678 Sensor"},"content":{"rendered":"<p>\u672c\u6587\u8bb0\u5f55\u4e86\u5728 Hailo15\uff08H15H\uff09\u5e73\u53f0\u4e0a bring up \u4e00\u4e2a\u65b0\u7684 Sony IMX678 camera sensor<br \/>\n\u7684\u5b8c\u6574\u8fc7\u7a0b\uff0c\u4e3b\u8981\u6d89\u53ca I2C \u5730\u5740\u786e\u8ba4\u3001GPIO reset \u9a8c\u8bc1\u4ee5\u53ca sensor \u65f6\u949f\u9891\u7387\u4fee\u6539\u7b49\u6b65\u9aa4\u3002<\/p>\n<hr \/>\n<h2>1. \u786e\u8ba4 Sensor \u7684 I2C \u5730\u5740<\/h2>\n<p>\u5728 <strong>1.9.1<\/strong> \u7248\u672c\u4e2d\uff0cH15H \u53ea\u652f\u6301\u4e00\u4e2a sensor\u3002<br \/>\n\u9996\u5148\u6211\u4eec\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b I2C0 \u603b\u7ebf\u4e0a\u7684\u8bbe\u5907\uff1a<\/p>\n<pre><code>i2cdetect -y 0 -r<\/code><\/pre>\n<p>\u786e\u8ba4 sensor \u5b9e\u9645\u6302\u8f7d\u5728 <strong>I2C0<\/strong> \u901a\u9053\u4e0b\uff0c\u5730\u5740\u4e3a <strong>0x36<\/strong>\uff0c<br \/>\n\u56e0\u6b64\u9700\u8981\u4fee\u6539\u8bbe\u5907\u6811\u4e2d\u7684 <code>reg<\/code>\u3002<\/p>\n<pre><code>sensor_0: camera-sensor@1a {\r\n         status = \"ok\";\r\n         compatible = \"sony,imx334\", \"sony,imx664\", \"sony,imx675\", \"sony,imx678\", \"sony,imx715\";\r\n-        reg = &lt;0x1a&gt;;\r\n+        reg = &lt;0x36&gt;;\r\n<\/code><\/pre>\n<hr \/>\n<h2>2. \u786e\u8ba4 Reset GPIO \u53ca\u5176\u6781\u6027<\/h2>\n<p>\u6839\u636e\u539f\u7406\u56fe\uff0csensor \u7684 reset pin \u5bf9\u5e94\u7684\u662f <strong>GPIO4<\/strong>\u3002<br \/>\nH15 \u652f\u6301\u901a\u7528\u7684 GPIO \u547d\u4ee4\uff0c\u5982 <code>gpiodetect<\/code>\u3001<code>gpioinfo<\/code>\u3001<code>gpioset<\/code><br \/>\n\uff08\u67d0\u4e9b SoC \u53ef\u80fd\u4f7f\u7528\u5176\u4ed6\u65b9\u5f0f\uff09\u3002<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u5982\u4e0b\u547d\u4ee4\uff0c\u7ed3\u5408\u539f\u7406\u56fe\u8fdb\u884c\u786e\u8ba4\uff1a<\/p>\n<pre><code>gpioset gpiochip0 4=0\r\nsleep 0.02\r\ni2cdetect -y 0 -r\r\n\r\ngpioset gpiochip0 4=1\r\nsleep 0.02\r\ni2cdetect -y 0 -r\r\n<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-812\" src=\"https:\/\/www.zhoubin.asia\/wp-content\/uploads\/2026\/01\/H15_GPIO.png\" alt=\"\" width=\"598\" height=\"614\" \/><br \/>\n\u901a\u8fc7\u5bf9\u6bd4 reset \u524d\u540e I2C \u63a2\u6d4b\u7ed3\u679c\uff0c\u53ef\u4ee5\u5224\u65ad\uff1a<\/p>\n<ul>\n<li>reset \u4fe1\u53f7\u662f\u5426\u771f\u5b9e\u8fde\u901a<\/li>\n<li>reset \u7684\u6709\u6548\u7535\u5e73\u662f\u4f4e\u6709\u6548\u8fd8\u662f\u9ad8\u6709\u6548<\/li>\n<\/ul>\n<p>\u6700\u7ec8\u8bbe\u5907\u6811\u4e2d reset GPIO \u7684\u6781\u6027\u4fee\u6539\u5982\u4e0b\uff1a<\/p>\n<pre><code>-        reset-gpios = &lt;&amp;gpio0 4 GPIO_ACTIVE_HIGH&gt;;\r\n+        reset-gpios = &lt;&amp;gpio0 4 GPIO_ACTIVE_LOW&gt;;\r\n<\/code><\/pre>\n<hr \/>\n<h2>3. \u4fee\u6539 Sensor \u8f93\u5165\u65f6\u949f\uff0824M \u2192 27M\uff09<\/h2>\n<p>H15H \u6807\u51c6 SBC \u677f\u4f7f\u7528\u7684\u662f <strong>24MHz<\/strong> \u6676\u632f\uff08CAM_0_CLK\uff09\u3002<br \/>\n\u4f46\u901a\u8fc7\u539f\u7406\u56fe\u786e\u8ba4\uff0c\u5ba2\u6237\u677f\u4e0a\u4f7f\u7528\u7684\u662f<br \/>\n<strong>OSC-SMD2520_4P<\/strong>\uff0c\u5b9e\u9645\u4e3a <strong>27MHz<\/strong>\u3002<\/p>\n<p>\u56e0\u6b64\u9700\u8981\u4fee\u6539 DTS \u4e2d\u7684\u65f6\u949f\u9891\u7387\uff1a<\/p>\n<pre><code>-        clock-frequency = &lt;24000000&gt;;\r\n+        clock-frequency = &lt;27000000&gt;;\r\n<\/code><\/pre>\n<p>\u540c\u65f6\uff0cfixed-clock \u4e5f\u9700\u8981\u540c\u6b65\u4fee\u6539\uff1a<\/p>\n<pre><code>sensor_clk: sensor_clk {\r\n         compatible = \"fixed-clock\";\r\n         #clock-cells = &lt;0&gt;;\r\n-        clock-frequency = &lt;24000000&gt;;\r\n+        clock-frequency = &lt;27000000&gt;;\r\n     };\r\n<\/code><\/pre>\n<p>\u53e6\u5916\uff0c\u5efa\u8bae\u540c\u65f6\u4fee\u6539 IMX678 \u9a71\u52a8\u6e90\u7801\u4e2d\u7684\u9ed8\u8ba4\u8f93\u5165\u65f6\u949f\uff08\u662f\u5426\u5fc5\u987b\u5c1a\u672a\u9a8c\u8bc1\uff09\uff1a<\/p>\n<pre><code>+++ b\/drivers\/media\/i2c\/imx678.c\r\n@@ -107,8 +107,8 @@ enum imx678_input_clk_rate_code {\r\n        INPUT_CLK_13_5_MHZ,\r\n };\r\n\r\n-#define IMX678_INCLK_CODE INPUT_CLK_24_MHZ\r\n-#define IMX678_INCLK_RATE 24000000\r\n+#define IMX678_INCLK_CODE INPUT_CLK_27_MHZ\r\n+#define IMX678_INCLK_RATE 27000000\r\n<\/code><\/pre>\n<p>\u53ef\u4ee5\u901a\u8fc7\u5982\u4e0b\u547d\u4ee4\u67e5\u770b\u6700\u7ec8\u8bbe\u7f6e\u7684CLK<\/p>\n<pre><code>cat \/sys\/kernel\/debug\/clk\/clk_summary | grep sensor_clk <\/code><\/pre>\n<hr \/>\n<div class=\"note\">\n<h3>\u6ce8\u610f\u4e8b\u9879<\/h3>\n<p>\u5728\u901a\u8fc7 Yocto \u5c1d\u8bd5\u7f16\u8bd1 kernel \u65f6\uff0c\u6211\u91c7\u7528\u4e86\u5982\u4e0b\u65b9\u5f0f\u6765\u91cd\u65b0\u751f\u6210 <code>fitImage<\/code>\uff1a<\/p>\n<pre><code>devtool modify linux-yocto-hailo\r\ndevtool build linux-yocto-hailo\r\n<\/code><\/pre>\n<p>\u4f46\u8fd9\u79cd\u65b9\u5f0f\u5728 camera sensor \u76f8\u5173\u90e8\u5206\u4ecd\u7136\u9057\u6f0f\u4e86\u4e00\u4e9bdriver\u7684module\uff0c<br \/>\n\u5bfc\u81f4\u90e8\u5206\u5730\u65b9\u4e0d\u517c\u5bb9\u3002<\/p>\n<p>\u63a8\u6d4b\u539f\u56e0\u53ef\u80fd\u662f kernel \u7248\u672c\u5305\u542b\u5c0f\u7248\u672c\u53f7\u6240\u81f4\uff1a<\/p>\n<pre><code>5.15.325.15.32-yocto-standard-g5aaf14507b5a-dirty<\/code><\/pre>\n<p>\uff08\u5c1a\u672a\u5b8c\u5168\u9a8c\u8bc1\uff09<\/p>\n<p>\u6b64\u5916\uff0c\u6211\u8fd8\u5728 kernel \u914d\u7f6e\u4e2d\u589e\u52a0\u4e86\uff1a<\/p>\n<pre><code>CONFIG_VIDEO_IMX678=y<\/code><\/pre>\n<p>\u8be5\u914d\u7f6e\u662f\u5426\u4e3a\u5fc5\u987b\u9879\uff0c\u76ee\u524d\u540c\u6837\u5c1a\u672a\u9a8c\u8bc1\u3002<\/p>\n<\/div>\n<hr \/>\n<p><strong>\u5b8c<\/strong><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u8bb0\u5f55\u4e86\u5728 Hailo15\uff08H15H\uff09\u5e73\u53f0\u4e0a bring up \u4e00\u4e2a\u65b0\u7684 Sony IMX678 camer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-811","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/comments?post=811"}],"version-history":[{"count":1,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/811\/revisions"}],"predecessor-version":[{"id":813,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/811\/revisions\/813"}],"wp:attachment":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/media?parent=811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/categories?post=811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/tags?post=811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}